@taiga-ui/core 2.54.1 → 2.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-core-abstract.umd.js +15 -15
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.js +138 -138
- package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +12 -12
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +17 -17
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +34 -34
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +24 -24
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +38 -38
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +4 -4
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +12 -12
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +19 -19
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +47 -47
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +10 -10
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +4 -4
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +11 -11
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +4 -4
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +8 -8
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +7 -7
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +54 -54
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +4 -4
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +26 -26
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +8 -8
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +15 -15
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +2 -2
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +7 -7
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +17 -17
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.js +6 -6
- package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.js +8 -8
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +11 -11
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +8 -8
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +7 -7
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +4 -4
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +5 -5
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +35 -35
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +9 -9
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.js +2 -2
- package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +3 -3
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +2 -2
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +7 -7
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +40 -40
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +16 -16
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +17 -17
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +28 -28
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +12 -12
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.js +4 -4
- package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/alert/taiga-ui-core-components-alert.metadata.json +1 -1
- package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/dropdown-controller/taiga-ui-core-directives-dropdown-controller.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +12 -12
- package/esm2015/abstract/abstract-hint-options.js +2 -2
- package/esm2015/abstract/abstract-hint.js +4 -4
- package/esm2015/animations/animations.js +140 -140
- package/esm2015/components/alert/alert.component.js +11 -11
- package/esm2015/components/alert/alert.service.js +3 -3
- package/esm2015/components/button/button-options.js +3 -3
- package/esm2015/components/button/button.component.js +16 -16
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +7 -7
- package/esm2015/components/data-list/data-list.component.js +12 -12
- package/esm2015/components/data-list/data-list.directive.js +2 -2
- package/esm2015/components/data-list/opt-group.directive.js +5 -5
- package/esm2015/components/data-list/option/option.component.js +12 -12
- package/esm2015/components/dialog/dialog.component.js +12 -12
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- package/esm2015/components/dialog/dialog.providers.js +7 -7
- package/esm2015/components/dialog/dialog.service.js +5 -5
- package/esm2015/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm2015/components/error/error.component.js +5 -5
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +12 -12
- package/esm2015/components/group/group-styles.component.js +2 -2
- package/esm2015/components/group/group.component.js +7 -5
- package/esm2015/components/group/group.directive.js +15 -15
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm2015/components/hints-host/hints-host.component.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm2015/components/label/label.component.js +5 -5
- package/esm2015/components/link/link.component.js +12 -12
- package/esm2015/components/loader/loader-options.js +3 -3
- package/esm2015/components/loader/loader.component.js +3 -3
- package/esm2015/components/notification/notification.component.js +9 -9
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm2015/components/root/root.component.js +5 -5
- package/esm2015/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +7 -7
- package/esm2015/components/svg/svg.component.js +16 -16
- package/esm2015/components/theme-night/theme-night.component.js +3 -3
- package/esm2015/components/tooltip/tooltip.component.js +8 -8
- package/esm2015/constants/decimal-symbols.js +2 -2
- package/esm2015/constants/default-icons-path.js +2 -2
- package/esm2015/constants/editing-keys.js +10 -10
- package/esm2015/constants/events.js +5 -5
- package/esm2015/constants/mask-caret-trap.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/color/color.directive.js +7 -7
- package/esm2015/directives/described-by/described-by.directive.js +5 -5
- package/esm2015/directives/described-by/described-by.providers.js +3 -3
- package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
- package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm2015/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm2015/directives/hint/hint-options.js +3 -3
- package/esm2015/directives/hint/hint.directive.js +6 -6
- package/esm2015/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/directives/table-mode/table-mode.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/enums/appearance.js +1 -1
- package/esm2015/enums/base-color.js +1 -1
- package/esm2015/enums/button-shape.js +1 -1
- package/esm2015/enums/decimal.js +1 -1
- package/esm2015/enums/dropdown-animation.js +1 -1
- package/esm2015/enums/dropdown-width.js +1 -1
- package/esm2015/enums/hint-mode.js +1 -1
- package/esm2015/enums/interactive-state.js +1 -1
- package/esm2015/enums/link-mode.js +1 -1
- package/esm2015/enums/notification.js +1 -1
- package/esm2015/enums/orientation.js +1 -1
- package/esm2015/enums/range-state.js +1 -1
- package/esm2015/enums/support-color.js +1 -1
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm2015/observables/smart-search.js +3 -3
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm2015/pipes/format-number/format-number.pipe.js +2 -2
- package/esm2015/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm2015/pipes/month/month.pipe.js +2 -2
- package/esm2015/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm2015/providers/is-mobile-resolution.provider.js +2 -2
- package/esm2015/providers/mode.provider.js +2 -2
- package/esm2015/services/hint.service.js +2 -2
- package/esm2015/services/night-theme.service.js +4 -4
- package/esm2015/services/svg.service.js +4 -4
- package/esm2015/tokens/animation-options.js +2 -2
- package/esm2015/tokens/animations-duration.js +2 -2
- package/esm2015/tokens/assert-enabled.js +2 -2
- package/esm2015/tokens/data-list-accessor.js +2 -2
- package/esm2015/tokens/data-list-host.js +2 -2
- package/esm2015/tokens/document-or-shadow-root.js +2 -2
- package/esm2015/tokens/dropdown-directive.js +2 -2
- package/esm2015/tokens/element-ref.js +2 -2
- package/esm2015/tokens/first-day-of-week.js +2 -2
- package/esm2015/tokens/i18n.js +10 -10
- package/esm2015/tokens/icon-place.js +3 -3
- package/esm2015/tokens/icons-path.js +2 -2
- package/esm2015/tokens/icons.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +3 -3
- package/esm2015/tokens/media.js +2 -2
- package/esm2015/tokens/mode.js +2 -2
- package/esm2015/tokens/notification-options.js +3 -3
- package/esm2015/tokens/number-format.js +3 -3
- package/esm2015/tokens/option-content.js +2 -2
- package/esm2015/tokens/ordered-short-week-days.js +2 -2
- package/esm2015/tokens/scroll-ref.js +2 -2
- package/esm2015/tokens/svg-content-processor.js +2 -2
- package/esm2015/tokens/svg-src-processor.js +2 -2
- package/esm2015/tokens/textfield-appearance.js +2 -2
- package/esm2015/tokens/textfield-host.js +2 -2
- package/esm2015/tokens/theme.js +3 -3
- package/esm2015/tokens/value-accessor.js +2 -2
- package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
- package/esm2015/utils/dom/check-fixed-position.js +3 -3
- package/esm2015/utils/dom/get-safe-area-size.js +4 -4
- package/esm2015/utils/dom/process-icon.js +11 -11
- package/esm2015/utils/format/format-number.js +5 -5
- package/esm2015/utils/format/format-phone.js +9 -9
- package/esm2015/utils/format/get-fractional-part-padded.js +3 -3
- package/esm2015/utils/format/number-to-string-without-exp.js +3 -3
- package/esm2015/utils/format/other-decimal-symbol.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +11 -11
- package/esm2015/utils/mask/create-correction-mask.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +13 -13
- package/esm2015/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm2015/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm2015/utils/miscellaneous/color-fallback.js +8 -8
- package/esm2015/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm2015/utils/miscellaneous/size-bigger.js +3 -3
- package/esm2015/utils/polyfills/inner-html.js +5 -5
- package/esm5/abstract/abstract-dropdown.js +12 -12
- package/esm5/abstract/abstract-hint-options.js +2 -2
- package/esm5/abstract/abstract-hint.js +4 -4
- package/esm5/animations/animations.js +140 -140
- package/esm5/components/alert/alert.component.js +11 -11
- package/esm5/components/alert/alert.service.js +3 -3
- package/esm5/components/button/button-options.js +3 -3
- package/esm5/components/button/button.component.js +16 -16
- package/esm5/components/calendar/calendar.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +8 -8
- package/esm5/components/data-list/data-list.component.js +12 -12
- package/esm5/components/data-list/data-list.directive.js +2 -2
- package/esm5/components/data-list/opt-group.directive.js +5 -5
- package/esm5/components/data-list/option/option.component.js +12 -12
- package/esm5/components/dialog/dialog.component.js +12 -12
- package/esm5/components/dialog/dialog.directive.js +4 -4
- package/esm5/components/dialog/dialog.providers.js +7 -7
- package/esm5/components/dialog/dialog.service.js +5 -5
- package/esm5/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm5/components/error/error.component.js +5 -5
- package/esm5/components/expand/expand-content.directive.js +2 -2
- package/esm5/components/expand/expand.component.js +12 -12
- package/esm5/components/group/group-styles.component.js +2 -2
- package/esm5/components/group/group.component.js +5 -5
- package/esm5/components/group/group.directive.js +15 -15
- package/esm5/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm5/components/hints-host/hints-host.component.js +3 -3
- package/esm5/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm5/components/label/label.component.js +5 -5
- package/esm5/components/link/link.component.js +12 -12
- package/esm5/components/loader/loader-options.js +3 -3
- package/esm5/components/loader/loader.component.js +3 -3
- package/esm5/components/notification/notification.component.js +9 -9
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm5/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm5/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm5/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm5/components/root/root.component.js +5 -5
- package/esm5/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm5/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm5/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm5/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm5/components/scrollbar/scrollable.directive.js +2 -2
- package/esm5/components/scrollbar/scrollbar.component.js +7 -7
- package/esm5/components/svg/svg.component.js +16 -16
- package/esm5/components/theme-night/theme-night.component.js +3 -3
- package/esm5/components/tooltip/tooltip.component.js +8 -8
- package/esm5/constants/decimal-symbols.js +2 -2
- package/esm5/constants/default-icons-path.js +2 -2
- package/esm5/constants/editing-keys.js +10 -10
- package/esm5/constants/events.js +5 -5
- package/esm5/constants/mask-caret-trap.js +2 -2
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/color/color.directive.js +7 -7
- package/esm5/directives/described-by/described-by.directive.js +5 -5
- package/esm5/directives/described-by/described-by.providers.js +5 -5
- package/esm5/directives/dropdown/dropdown.directive.js +3 -3
- package/esm5/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm5/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm5/directives/hint/hint-options.js +3 -3
- package/esm5/directives/hint/hint.directive.js +6 -6
- package/esm5/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm5/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm5/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm5/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm5/directives/mode/mode.directive.js +3 -3
- package/esm5/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm5/directives/table-mode/table-mode.directive.js +3 -3
- package/esm5/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm5/directives/wrapper/wrapper.directive.js +10 -10
- package/esm5/enums/appearance.js +1 -1
- package/esm5/enums/base-color.js +1 -1
- package/esm5/enums/button-shape.js +1 -1
- package/esm5/enums/decimal.js +1 -1
- package/esm5/enums/dropdown-animation.js +1 -1
- package/esm5/enums/dropdown-width.js +1 -1
- package/esm5/enums/hint-mode.js +1 -1
- package/esm5/enums/interactive-state.js +1 -1
- package/esm5/enums/link-mode.js +1 -1
- package/esm5/enums/notification.js +1 -1
- package/esm5/enums/orientation.js +1 -1
- package/esm5/enums/range-state.js +1 -1
- package/esm5/enums/support-color.js +1 -1
- package/esm5/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm5/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm5/observables/smart-search.js +3 -3
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm5/pipes/format-number/format-number.pipe.js +2 -2
- package/esm5/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm5/pipes/month/month.pipe.js +2 -2
- package/esm5/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm5/providers/is-mobile-resolution.provider.js +2 -2
- package/esm5/providers/mode.provider.js +2 -2
- package/esm5/services/hint.service.js +2 -2
- package/esm5/services/night-theme.service.js +4 -4
- package/esm5/services/svg.service.js +4 -4
- package/esm5/tokens/animation-options.js +2 -2
- package/esm5/tokens/animations-duration.js +2 -2
- package/esm5/tokens/assert-enabled.js +2 -2
- package/esm5/tokens/data-list-accessor.js +2 -2
- package/esm5/tokens/data-list-host.js +2 -2
- package/esm5/tokens/document-or-shadow-root.js +2 -2
- package/esm5/tokens/dropdown-directive.js +2 -2
- package/esm5/tokens/element-ref.js +2 -2
- package/esm5/tokens/first-day-of-week.js +2 -2
- package/esm5/tokens/i18n.js +10 -10
- package/esm5/tokens/icon-place.js +3 -3
- package/esm5/tokens/icons-path.js +2 -2
- package/esm5/tokens/icons.js +2 -2
- package/esm5/tokens/is-mobile-resolution.js +3 -3
- package/esm5/tokens/media.js +2 -2
- package/esm5/tokens/mode.js +2 -2
- package/esm5/tokens/notification-options.js +3 -3
- package/esm5/tokens/number-format.js +3 -3
- package/esm5/tokens/option-content.js +2 -2
- package/esm5/tokens/ordered-short-week-days.js +2 -2
- package/esm5/tokens/scroll-ref.js +2 -2
- package/esm5/tokens/svg-content-processor.js +2 -2
- package/esm5/tokens/svg-src-processor.js +2 -2
- package/esm5/tokens/textfield-appearance.js +2 -2
- package/esm5/tokens/textfield-host.js +2 -2
- package/esm5/tokens/theme.js +3 -3
- package/esm5/tokens/value-accessor.js +2 -2
- package/esm5/utils/dom/are-css-vars-supported.js +2 -2
- package/esm5/utils/dom/check-fixed-position.js +3 -3
- package/esm5/utils/dom/get-safe-area-size.js +4 -4
- package/esm5/utils/dom/process-icon.js +11 -11
- package/esm5/utils/format/format-number.js +5 -5
- package/esm5/utils/format/format-phone.js +9 -9
- package/esm5/utils/format/get-fractional-part-padded.js +3 -3
- package/esm5/utils/format/number-to-string-without-exp.js +3 -3
- package/esm5/utils/format/other-decimal-symbol.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-money-pipe.js +12 -12
- package/esm5/utils/mask/create-correction-mask.js +3 -3
- package/esm5/utils/mask/create-number-mask.js +13 -13
- package/esm5/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm5/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm5/utils/miscellaneous/color-fallback.js +8 -8
- package/esm5/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm5/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm5/utils/miscellaneous/size-bigger.js +3 -3
- package/esm5/utils/polyfills/inner-html.js +5 -5
- package/fesm2015/taiga-ui-core-abstract.js +15 -15
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-animations.js +138 -138
- package/fesm2015/taiga-ui-core-animations.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +12 -12
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +17 -17
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +33 -33
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +24 -24
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +4 -4
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +12 -12
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +21 -19
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +4 -4
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +11 -11
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +4 -4
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +8 -8
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +4 -4
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +15 -15
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +17 -17
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-color.js +6 -6
- package/fesm2015/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-described-by.js +6 -6
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +7 -7
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-observables.js +2 -2
- package/fesm2015/taiga-ui-core-observables.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +2 -2
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +7 -7
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +40 -40
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +16 -16
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +17 -17
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +27 -27
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +15 -15
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-animations.js +138 -138
- package/fesm5/taiga-ui-core-animations.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +12 -12
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js +17 -17
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +34 -34
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +24 -24
- package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-error.js +4 -4
- package/fesm5/taiga-ui-core-components-error.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +12 -12
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js +19 -19
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +4 -4
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-link.js +11 -11
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +4 -4
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-notification.js +8 -8
- package/fesm5/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +4 -4
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-svg.js +15 -15
- package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm5/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +17 -17
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-color.js +6 -6
- package/fesm5/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-described-by.js +8 -8
- package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +7 -7
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-core-enums.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-observables.js +2 -2
- package/fesm5/taiga-ui-core-observables.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm5/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +2 -2
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +7 -7
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +40 -40
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +16 -16
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +17 -17
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +28 -28
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/package.json +4 -4
|
@@ -12,7 +12,7 @@ import { filter, switchMapTo, take, takeUntil } from 'rxjs/operators';
|
|
|
12
12
|
import { TuiIdService } from '@taiga-ui/cdk/services';
|
|
13
13
|
import { TuiButtonModule } from '@taiga-ui/core/components/button';
|
|
14
14
|
|
|
15
|
-
var TUI_DIALOGS_CLOSE = new InjectionToken(
|
|
15
|
+
var TUI_DIALOGS_CLOSE = new InjectionToken("A stream to close dialogs", {
|
|
16
16
|
factory: function () { return EMPTY; },
|
|
17
17
|
});
|
|
18
18
|
var SCROLLBAR_PLACEHOLDER = 17;
|
|
@@ -21,15 +21,15 @@ function dialogCloseStreamFactory(documentRef, windowRef, _a, close$, destroy$,
|
|
|
21
21
|
var nativeElement = _a.nativeElement;
|
|
22
22
|
var dismissible = _b.dismissible;
|
|
23
23
|
return dismissible
|
|
24
|
-
? merge(typedFromEvent(nativeElement,
|
|
24
|
+
? merge(typedFromEvent(nativeElement, "click").pipe(filter(isCurrentTarget)), typedFromEvent(documentRef, "keydown").pipe(
|
|
25
25
|
// TODO: iframe warning
|
|
26
26
|
filter(function (_a) {
|
|
27
27
|
var key = _a.key, target = _a.target;
|
|
28
|
-
return key ===
|
|
28
|
+
return key === "Escape" &&
|
|
29
29
|
target instanceof Element &&
|
|
30
30
|
(!containsOrAfter(nativeElement, target) ||
|
|
31
31
|
nativeElement.contains(target));
|
|
32
|
-
})), typedFromEvent(documentRef,
|
|
32
|
+
})), typedFromEvent(documentRef, "mousedown").pipe(
|
|
33
33
|
// TODO: iframe warning
|
|
34
34
|
filter(function (_a) {
|
|
35
35
|
var target = _a.target, clientX = _a.clientX;
|
|
@@ -37,7 +37,7 @@ function dialogCloseStreamFactory(documentRef, windowRef, _a, close$, destroy$,
|
|
|
37
37
|
tuiGetViewportWidth(windowRef) - clientX >
|
|
38
38
|
SCROLLBAR_PLACEHOLDER &&
|
|
39
39
|
!containsOrAfter(nativeElement, target);
|
|
40
|
-
}), switchMapTo(typedFromEvent(documentRef,
|
|
40
|
+
}), switchMapTo(typedFromEvent(documentRef, "mouseup").pipe(take(1),
|
|
41
41
|
// TODO: iframe warning
|
|
42
42
|
filter(function (_a) {
|
|
43
43
|
var target = _a.target;
|
|
@@ -46,7 +46,7 @@ function dialogCloseStreamFactory(documentRef, windowRef, _a, close$, destroy$,
|
|
|
46
46
|
})))), close$).pipe(takeUntil(destroy$))
|
|
47
47
|
: close$;
|
|
48
48
|
}
|
|
49
|
-
var TUI_DIALOG_CLOSE_STREAM = new InjectionToken(
|
|
49
|
+
var TUI_DIALOG_CLOSE_STREAM = new InjectionToken("Dialogs closing stream");
|
|
50
50
|
var TUI_DIALOG_PROVIDERS = [
|
|
51
51
|
TuiDestroyService,
|
|
52
52
|
{
|
|
@@ -63,7 +63,7 @@ var TUI_DIALOG_PROVIDERS = [
|
|
|
63
63
|
},
|
|
64
64
|
];
|
|
65
65
|
|
|
66
|
-
var REQUIRED_ERROR = new Error(
|
|
66
|
+
var REQUIRED_ERROR = new Error("Required dialog was dismissed");
|
|
67
67
|
// @dynamic
|
|
68
68
|
var TuiDialogComponent = /** @class */ (function () {
|
|
69
69
|
function TuiDialogComponent(duration, isMobile, context, close$, closeWord$) {
|
|
@@ -73,16 +73,16 @@ var TuiDialogComponent = /** @class */ (function () {
|
|
|
73
73
|
this.context = context;
|
|
74
74
|
this.closeWord$ = closeWord$;
|
|
75
75
|
this.animation = {
|
|
76
|
-
value:
|
|
76
|
+
value: "",
|
|
77
77
|
params: {
|
|
78
|
-
start:
|
|
78
|
+
start: "40px",
|
|
79
79
|
duration: this.duration,
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
this.fullscreenAnimation = {
|
|
83
|
-
value:
|
|
83
|
+
value: "",
|
|
84
84
|
params: {
|
|
85
|
-
start:
|
|
85
|
+
start: "100vh",
|
|
86
86
|
duration: this.duration,
|
|
87
87
|
},
|
|
88
88
|
};
|
|
@@ -106,7 +106,7 @@ var TuiDialogComponent = /** @class */ (function () {
|
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(TuiDialogComponent.prototype, "slideInTop", {
|
|
108
108
|
get: function () {
|
|
109
|
-
return this.size ===
|
|
109
|
+
return this.size === "fullscreen" || this.size === "page" || this.isMobile
|
|
110
110
|
? this.fullscreenAnimation
|
|
111
111
|
: this.animation;
|
|
112
112
|
},
|
|
@@ -129,18 +129,18 @@ var TuiDialogComponent = /** @class */ (function () {
|
|
|
129
129
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_CLOSE_WORD,] }] }
|
|
130
130
|
]; };
|
|
131
131
|
__decorate([
|
|
132
|
-
HostBinding(
|
|
132
|
+
HostBinding("attr.data-size")
|
|
133
133
|
], TuiDialogComponent.prototype, "size", null);
|
|
134
134
|
__decorate([
|
|
135
|
-
HostBinding(
|
|
135
|
+
HostBinding("class._centered")
|
|
136
136
|
], TuiDialogComponent.prototype, "header", null);
|
|
137
137
|
__decorate([
|
|
138
|
-
HostBinding(
|
|
139
|
-
HostBinding(
|
|
138
|
+
HostBinding("@tuiSlideInTop"),
|
|
139
|
+
HostBinding("@tuiFadeIn")
|
|
140
140
|
], TuiDialogComponent.prototype, "slideInTop", null);
|
|
141
141
|
TuiDialogComponent = __decorate([
|
|
142
142
|
Component({
|
|
143
|
-
selector:
|
|
143
|
+
selector: "tui-dialog",
|
|
144
144
|
template: "<header\n *ngIf=\"header\"\n polymorpheus-outlet\n class=\"t-header\"\n [content]=\"header\"\n [context]=\"context\"\n></header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section\n polymorpheus-outlet\n [context]=\"context\"\n [content]=\"context.content\"\n >\n <ng-template let-text>\n {{ text }}\n <div class=\"t-buttons\">\n <button\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-template>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close()\"\n ></button>\n</div>\n",
|
|
145
145
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
146
146
|
providers: TUI_DIALOG_PROVIDERS,
|
|
@@ -158,12 +158,12 @@ var TuiDialogComponent = /** @class */ (function () {
|
|
|
158
158
|
|
|
159
159
|
var DIALOG = new PolymorpheusComponent(TuiDialogComponent);
|
|
160
160
|
var DEFAULT_OPTIONS = {
|
|
161
|
-
size:
|
|
161
|
+
size: "m",
|
|
162
162
|
required: false,
|
|
163
163
|
closeable: true,
|
|
164
164
|
dismissible: true,
|
|
165
|
-
label:
|
|
166
|
-
header:
|
|
165
|
+
label: "",
|
|
166
|
+
header: "",
|
|
167
167
|
};
|
|
168
168
|
var TuiDialogService = /** @class */ (function (_super) {
|
|
169
169
|
__extends(TuiDialogService, _super);
|
|
@@ -176,7 +176,7 @@ var TuiDialogService = /** @class */ (function (_super) {
|
|
|
176
176
|
TuiDialogService.ɵprov = ɵɵdefineInjectable({ factory: function TuiDialogService_Factory() { return new TuiDialogService(ɵɵinject(TuiIdService)); }, token: TuiDialogService, providedIn: "root" });
|
|
177
177
|
TuiDialogService = __decorate([
|
|
178
178
|
Injectable({
|
|
179
|
-
providedIn:
|
|
179
|
+
providedIn: "root",
|
|
180
180
|
})
|
|
181
181
|
], TuiDialogService);
|
|
182
182
|
return TuiDialogService;
|
|
@@ -189,15 +189,15 @@ var TuiDialogDirective = /** @class */ (function (_super) {
|
|
|
189
189
|
}
|
|
190
190
|
TuiDialogDirective = __decorate([
|
|
191
191
|
Directive({
|
|
192
|
-
selector:
|
|
192
|
+
selector: "ng-template[tuiDialog]",
|
|
193
193
|
providers: [
|
|
194
194
|
{
|
|
195
195
|
provide: AbstractTuiDialogService,
|
|
196
196
|
useExisting: TuiDialogService,
|
|
197
197
|
},
|
|
198
198
|
],
|
|
199
|
-
inputs: [
|
|
200
|
-
outputs: [
|
|
199
|
+
inputs: ["options: tuiDialogOptions", "open: tuiDialog"],
|
|
200
|
+
outputs: ["openChange: tuiDialogChange"],
|
|
201
201
|
})
|
|
202
202
|
], TuiDialogDirective);
|
|
203
203
|
return TuiDialogDirective;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["ng://@taiga-ui/core/components/dialog/dialog.providers.ts","ng://@taiga-ui/core/components/dialog/dialog.component.ts","ng://@taiga-ui/core/components/dialog/dialog.service.ts","ng://@taiga-ui/core/components/dialog/dialog.directive.ts","ng://@taiga-ui/core/components/dialog/dialog.module.ts","ng://@taiga-ui/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n containsOrAfter,\n isCurrentTarget,\n TuiDestroyService,\n TuiDialog,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMapTo, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n 'A stream to close dialogs',\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function dialogCloseStreamFactory(\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n): Observable<unknown> {\n return dismissible\n ? merge(\n typedFromEvent(nativeElement, 'click').pipe(filter(isCurrentTarget)),\n typedFromEvent(documentRef, 'keydown').pipe(\n // TODO: iframe warning\n filter(\n ({key, target}) =>\n key === 'Escape' &&\n target instanceof Element &&\n (!containsOrAfter(nativeElement, target) ||\n nativeElement.contains(target)),\n ),\n ),\n typedFromEvent(documentRef, 'mousedown').pipe(\n // TODO: iframe warning\n filter(\n ({target, clientX}) =>\n target instanceof Element &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !containsOrAfter(nativeElement, target),\n ),\n switchMapTo(\n typedFromEvent(documentRef, 'mouseup').pipe(\n take(1),\n // TODO: iframe warning\n filter(\n ({target}) =>\n target instanceof Element &&\n !containsOrAfter(nativeElement, target),\n ),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n}\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n 'Dialogs closing stream',\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: dialogCloseStreamFactory,\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n// @dynamic\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nconst DEFAULT_OPTIONS = {\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: '',\n} as const;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = DEFAULT_OPTIONS as any;\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_DIALOGS, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n entryComponents: [TuiDialogComponent],\n providers: [\n {\n provide: TUI_DIALOGS,\n useExisting: TuiDialogService,\n multi: true,\n },\n ],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAgBa,iBAAiB,GAAG,IAAI,cAAc,CAC/C,2BAA2B,EAC3B;IACI,OAAO,EAAE,cAAM,OAAA,KAAK,GAAA;CACvB,EACH;AAEF,IAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;SACgB,wBAAwB,CACpC,WAAqB,EACrB,SAAiB,EACjB,EAAwC,EACxC,MAAwB,EACxB,QAA0B,EAC1B,EAA4D;QAH3D,gCAAa;QAGb,4BAAW;IAEZ,OAAO,WAAW;UACZ,KAAK,CACD,cAAc,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EACpE,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI;;QAEvC,MAAM,CACF,UAAC,EAAa;gBAAZ,YAAG,EAAE,kBAAM;YACT,OAAA,GAAG,KAAK,QAAQ;gBAChB,MAAM,YAAY,OAAO;iBACxB,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC;oBACpC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAAA,CAC1C,CACJ,EACD,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,IAAI;;QAEzC,MAAM,CACF,UAAC,EAAiB;gBAAhB,kBAAM,EAAE,oBAAO;YACb,OAAA,MAAM,YAAY,OAAO;gBACzB,mBAAmB,CAAC,SAAS,CAAC,GAAG,OAAO;oBACpC,qBAAqB;gBACzB,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC;SAAA,CAC9C,EACD,WAAW,CACP,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,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CAAC,kBAAkB,CAAC;YACrC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,WAAW;oBACpB,WAAW,EAAE,gBAAgB;oBAC7B,KAAK,EAAE,IAAI;iBACd;aACJ;SACJ,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACvBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["ng://@taiga-ui/core/components/dialog/dialog.providers.ts","ng://@taiga-ui/core/components/dialog/dialog.component.ts","ng://@taiga-ui/core/components/dialog/dialog.service.ts","ng://@taiga-ui/core/components/dialog/dialog.directive.ts","ng://@taiga-ui/core/components/dialog/dialog.module.ts","ng://@taiga-ui/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n containsOrAfter,\n isCurrentTarget,\n TuiDestroyService,\n TuiDialog,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMapTo, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function dialogCloseStreamFactory(\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n): Observable<unknown> {\n return dismissible\n ? merge(\n typedFromEvent(nativeElement, `click`).pipe(filter(isCurrentTarget)),\n typedFromEvent(documentRef, `keydown`).pipe(\n // TODO: iframe warning\n filter(\n ({key, target}) =>\n key === `Escape` &&\n target instanceof Element &&\n (!containsOrAfter(nativeElement, target) ||\n nativeElement.contains(target)),\n ),\n ),\n typedFromEvent(documentRef, `mousedown`).pipe(\n // TODO: iframe warning\n filter(\n ({target, clientX}) =>\n target instanceof Element &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !containsOrAfter(nativeElement, target),\n ),\n switchMapTo(\n typedFromEvent(documentRef, `mouseup`).pipe(\n take(1),\n // TODO: iframe warning\n filter(\n ({target}) =>\n target instanceof Element &&\n !containsOrAfter(nativeElement, target),\n ),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n}\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n `Dialogs closing stream`,\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: dialogCloseStreamFactory,\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error(`Required dialog was dismissed`);\n\n// @dynamic\n@Component({\n selector: `tui-dialog`,\n templateUrl: `./dialog.template.html`,\n styleUrls: [`./dialog.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: ``,\n params: {\n start: `40px`,\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: ``,\n params: {\n start: `100vh`,\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding(`attr.data-size`)\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding(`class._centered`)\n get header(): PolymorpheusContent {\n return this.context.header;\n }\n\n @HostBinding(`@tuiSlideInTop`)\n @HostBinding(`@tuiFadeIn`)\n get slideInTop(): TuiAnimationOptions {\n return this.size === `fullscreen` || this.size === `page` || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nconst DEFAULT_OPTIONS = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n} as const;\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = DEFAULT_OPTIONS as any;\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: `ng-template[tuiDialog]`,\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: [`options: tuiDialogOptions`, `open: tuiDialog`],\n outputs: [`openChange: tuiDialogChange`],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_DIALOGS, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n entryComponents: [TuiDialogComponent],\n providers: [\n {\n provide: TUI_DIALOGS,\n useExisting: TuiDialogService,\n multi: true,\n },\n ],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAgBa,iBAAiB,GAAG,IAAI,cAAc,CAC/C,2BAA2B,EAC3B;IACI,OAAO,EAAE,cAAM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ACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACJ,CAAC;;IAK2B,oCAA+C;IAArF;QAAA,qEAGC;QAFsB,eAAS,GAAG,MAAM,CAAC;QACnB,oBAAc,GAA0B,eAAsB,CAAC;;KACrF;;IAHY,gBAAgB;QAH5B,UAAU,CAAC;YACR,UAAU,EAAE,MAAM;SACrB,CAAC;OACW,gBAAgB,CAG5B;2BAvBD;CAuBC,CAHqC,wBAAwB;;;ICHnB,sCAE1C;IAFD;;KAEI;IAFS,kBAAkB;QAX9B,SAAS,CAAC;YACP,QAAQ,EAAE,wBAAwB;YAClC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,wBAAwB;oBACjC,WAAW,EAAE,gBAAgB;iBAChC;aACJ;YACD,MAAM,EAAE,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;YACxD,OAAO,EAAE,CAAC,6BAA6B,CAAC;SAC3C,CAAC;OACW,kBAAkB,CAE3B;IAAD,yBAAC;CAAA,CAFuC,0BAA0B;;;ICMrE;KAA+B;IAAlB,eAAe;QAb3B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;YACrF,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;YACtD,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;YACjD,eAAe,EAAE,CAAC,kBAAkB,CAAC;YACrC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,WAAW;oBACpB,WAAW,EAAE,gBAAgB;oBAC7B,KAAK,EAAE,IAAI;iBACd;aACJ;SACJ,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACvBA;;;;;;"}
|
|
@@ -32,7 +32,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
32
32
|
* Is previous position on top (to prevent jumping up and down on scroll)
|
|
33
33
|
*/
|
|
34
34
|
this.prevDirectionIsTop = false;
|
|
35
|
-
merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), this.directive.refresh$, fromEvent(this.windowRef,
|
|
35
|
+
merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), this.directive.refresh$, fromEvent(this.windowRef, "resize"))
|
|
36
36
|
.pipe(tuiZonefree(ngZone), takeUntil(destroy$))
|
|
37
37
|
.subscribe(function () {
|
|
38
38
|
_this.calculatePositionAndSize();
|
|
@@ -40,7 +40,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
40
40
|
}
|
|
41
41
|
Object.defineProperty(TuiDropdownBoxComponent.prototype, "overscroll", {
|
|
42
42
|
get: function () {
|
|
43
|
-
return this.inModal ?
|
|
43
|
+
return this.inModal ? "all" : "scroll";
|
|
44
44
|
},
|
|
45
45
|
enumerable: true,
|
|
46
46
|
configurable: true
|
|
@@ -60,7 +60,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
60
60
|
Object.defineProperty(TuiDropdownBoxComponent.prototype, "inModal", {
|
|
61
61
|
get: function () {
|
|
62
62
|
// @awful TODO: get rid of component tag name dependency
|
|
63
|
-
return !!this.directive.host.closest(
|
|
63
|
+
return !!this.directive.host.closest("tui-dialog-host");
|
|
64
64
|
},
|
|
65
65
|
enumerable: true,
|
|
66
66
|
configurable: true
|
|
@@ -68,7 +68,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
68
68
|
Object.defineProperty(TuiDropdownBoxComponent.prototype, "inOption", {
|
|
69
69
|
get: function () {
|
|
70
70
|
// @awful TODO: get rid of component tag name dependency
|
|
71
|
-
return !!this.directive.host.closest(
|
|
71
|
+
return !!this.directive.host.closest("[tuiOption]");
|
|
72
72
|
},
|
|
73
73
|
enumerable: true,
|
|
74
74
|
configurable: true
|
|
@@ -79,7 +79,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
79
79
|
var hostRect = this.directive.fixed
|
|
80
80
|
? this.portalHost.fixedPositionOffset()
|
|
81
81
|
: this.portalHost.clientRect;
|
|
82
|
-
style.position = this.directive.fixed ?
|
|
82
|
+
style.position = this.directive.fixed ? "fixed" : "absolute";
|
|
83
83
|
this.calculateVerticalPosition(style, clientRect, hostRect);
|
|
84
84
|
this.calculateHorizontalPosition(style, clientRect, hostRect);
|
|
85
85
|
this.calculateWidth(style, clientRect);
|
|
@@ -93,23 +93,23 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
93
93
|
var isDropdownSizeActuallyFitsViewport = dropdownRect.right <= screenWidth && dropdownRect.left >= 0;
|
|
94
94
|
var finalAlign = this.directive.align;
|
|
95
95
|
switch (this.directive.align) {
|
|
96
|
-
case
|
|
96
|
+
case "left":
|
|
97
97
|
if (isDropdownSizeHypotheticallyFitsViewport &&
|
|
98
98
|
dropdownRect.right > screenWidth) {
|
|
99
|
-
finalAlign =
|
|
99
|
+
finalAlign = "right";
|
|
100
100
|
}
|
|
101
101
|
break;
|
|
102
|
-
case
|
|
102
|
+
case "right":
|
|
103
103
|
if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {
|
|
104
|
-
finalAlign =
|
|
104
|
+
finalAlign = "left";
|
|
105
105
|
}
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
|
-
if (style.right ===
|
|
109
|
-
finalAlign =
|
|
108
|
+
if (style.right === "auto" && isDropdownSizeActuallyFitsViewport) {
|
|
109
|
+
finalAlign = "left";
|
|
110
110
|
}
|
|
111
|
-
if (style.left ===
|
|
112
|
-
finalAlign =
|
|
111
|
+
if (style.left === "auto" && isDropdownSizeActuallyFitsViewport) {
|
|
112
|
+
finalAlign = "right";
|
|
113
113
|
}
|
|
114
114
|
return finalAlign;
|
|
115
115
|
};
|
|
@@ -128,26 +128,26 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
128
128
|
var right = Math.floor(hostRect.right - directiveRect.right - offset);
|
|
129
129
|
var viewportWidth = tuiGetViewportWidth(this.windowRef);
|
|
130
130
|
switch (this.getFinalAlign(style, directiveRect)) {
|
|
131
|
-
case
|
|
131
|
+
case "left":
|
|
132
132
|
if (right + DEFAULT_MARGIN > viewportWidth ||
|
|
133
133
|
inRange(left + DEFAULT_MARGIN, 0, viewportWidth)) {
|
|
134
134
|
style.left = px(left);
|
|
135
|
-
style.right =
|
|
135
|
+
style.right = "auto";
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
|
-
style.left =
|
|
138
|
+
style.left = "auto";
|
|
139
139
|
style.right = px(right);
|
|
140
140
|
}
|
|
141
141
|
break;
|
|
142
|
-
case
|
|
142
|
+
case "right":
|
|
143
143
|
if (inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||
|
|
144
144
|
left + DEFAULT_MARGIN > viewportWidth) {
|
|
145
|
-
style.left =
|
|
145
|
+
style.left = "auto";
|
|
146
146
|
style.right = px(right);
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
149
|
style.left = px(left);
|
|
150
|
-
style.right =
|
|
150
|
+
style.right = "auto";
|
|
151
151
|
}
|
|
152
152
|
break;
|
|
153
153
|
}
|
|
@@ -170,11 +170,11 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
170
170
|
var bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;
|
|
171
171
|
var finalDirection = this.getFinalDirection(directiveRect);
|
|
172
172
|
var optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;
|
|
173
|
-
this.prevDirectionIsTop = finalDirection ===
|
|
174
|
-
if (finalDirection ===
|
|
173
|
+
this.prevDirectionIsTop = finalDirection === "top";
|
|
174
|
+
if (finalDirection === "top") {
|
|
175
175
|
this.dropdownAnimation = this.animationBottom;
|
|
176
176
|
style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));
|
|
177
|
-
style.top =
|
|
177
|
+
style.top = "auto";
|
|
178
178
|
style.bottom = px(hostRect.bottom -
|
|
179
179
|
directiveRect.top -
|
|
180
180
|
DEFAULT_MARGIN +
|
|
@@ -189,7 +189,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
189
189
|
DEFAULT_MARGIN +
|
|
190
190
|
offset -
|
|
191
191
|
optionOffset);
|
|
192
|
-
style.bottom =
|
|
192
|
+
style.bottom = "auto";
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
TuiDropdownBoxComponent.prototype.getFinalDirection = function (directiveRect) {
|
|
@@ -203,14 +203,14 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
203
203
|
var finalDirection = null;
|
|
204
204
|
// Given direction is applied if we can fit the box in the limits that way
|
|
205
205
|
switch (this.directive.direction) {
|
|
206
|
-
case
|
|
206
|
+
case "top":
|
|
207
207
|
if (topAvailableHeight >= this.directive.minHeight) {
|
|
208
|
-
finalDirection =
|
|
208
|
+
finalDirection = "top";
|
|
209
209
|
}
|
|
210
210
|
break;
|
|
211
|
-
case
|
|
211
|
+
case "bottom":
|
|
212
212
|
if (bottomAvailableHeight >= this.directive.minHeight) {
|
|
213
|
-
finalDirection =
|
|
213
|
+
finalDirection = "bottom";
|
|
214
214
|
}
|
|
215
215
|
break;
|
|
216
216
|
}
|
|
@@ -225,15 +225,15 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
225
225
|
// If there is enough space to fit below without scroll,
|
|
226
226
|
// choose 'bottom', unless it was previously on the top
|
|
227
227
|
if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {
|
|
228
|
-
finalDirection =
|
|
228
|
+
finalDirection = "top";
|
|
229
229
|
}
|
|
230
230
|
else if (bottomAvailableHeight >= visualHeight) {
|
|
231
|
-
finalDirection =
|
|
231
|
+
finalDirection = "bottom";
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
234
|
// Corner case — select direction with more space
|
|
235
235
|
finalDirection =
|
|
236
|
-
bottomAvailableHeight >= topAvailableHeight ?
|
|
236
|
+
bottomAvailableHeight >= topAvailableHeight ? "bottom" : "top";
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
return finalDirection;
|
|
@@ -246,16 +246,16 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
246
246
|
*/
|
|
247
247
|
TuiDropdownBoxComponent.prototype.calculateWidth = function (style, directiveRect) {
|
|
248
248
|
style.width =
|
|
249
|
-
this.directive.limitMinWidth ===
|
|
249
|
+
this.directive.limitMinWidth === "fixed" && !this.directive.sided
|
|
250
250
|
? px(directiveRect.width)
|
|
251
|
-
:
|
|
252
|
-
if (this.directive.limitMinWidth ===
|
|
251
|
+
: "";
|
|
252
|
+
if (this.directive.limitMinWidth === "min" && !this.directive.sided) {
|
|
253
253
|
style.minWidth = px(directiveRect.width);
|
|
254
254
|
style.maxWidth = px(DEFAULT_MAX_WIDTH);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
style.minWidth =
|
|
258
|
-
style.maxWidth =
|
|
257
|
+
style.minWidth = "";
|
|
258
|
+
style.maxWidth = "";
|
|
259
259
|
};
|
|
260
260
|
TuiDropdownBoxComponent.prototype.moveFocusOutside = function (previous) {
|
|
261
261
|
var host = this.directive.host;
|
|
@@ -279,10 +279,10 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
279
279
|
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] }
|
|
280
280
|
]; };
|
|
281
281
|
__decorate([
|
|
282
|
-
HostBinding(
|
|
282
|
+
HostBinding("@tuiDropdownAnimation")
|
|
283
283
|
], TuiDropdownBoxComponent.prototype, "dropdownAnimation", void 0);
|
|
284
284
|
__decorate([
|
|
285
|
-
ViewChild(
|
|
285
|
+
ViewChild("content", { read: ElementRef })
|
|
286
286
|
], TuiDropdownBoxComponent.prototype, "contentElementRef", void 0);
|
|
287
287
|
__decorate([
|
|
288
288
|
tuiPure
|
|
@@ -295,7 +295,7 @@ var TuiDropdownBoxComponent = /** @class */ (function () {
|
|
|
295
295
|
], TuiDropdownBoxComponent.prototype, "inOption", null);
|
|
296
296
|
TuiDropdownBoxComponent = __decorate([
|
|
297
297
|
Component({
|
|
298
|
-
selector:
|
|
298
|
+
selector: "tui-dropdown-box",
|
|
299
299
|
template: "<div\n #activeZone=\"tuiActiveZone\"\n class=\"wrapper\"\n [tuiOverscroll]=\"overscroll\"\n [tuiMode]=\"null\"\n [tuiActiveZoneParent]=\"directive.activeZone || null\"\n>\n <tui-scrollbar class=\"scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n #content\n polymorpheus-outlet\n class=\"content\"\n [content]=\"directive.content\"\n [context]=\"getContext(directive.context, activeZone)\"\n ></div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n",
|
|
300
300
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
301
301
|
providers: [TuiDestroyService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth, tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-dropdown-box',\n templateUrl: './dropdown-box.template.html',\n styleUrls: ['./dropdown-box.style.less'],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding('@tuiDropdownAnimation')\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild('content', {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, 'resize'),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? 'all' : 'scroll';\n }\n\n @tuiPure\n getContext<T extends object>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | (T & {activeZone?: TuiActiveZoneDirective})\n | {activeZone?: TuiActiveZoneDirective} {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('tui-dialog-host');\n }\n\n @tuiPure\n private get inOption(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('[tuiOption]');\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? 'fixed' : 'absolute';\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case 'left':\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = 'right';\n }\n\n break;\n case 'right':\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = 'left';\n }\n\n break;\n }\n\n if (style.right === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'left';\n }\n\n if (style.left === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'right';\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n const viewportWidth = tuiGetViewportWidth(this.windowRef);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case 'left':\n if (\n right + DEFAULT_MARGIN > viewportWidth ||\n inRange(left + DEFAULT_MARGIN, 0, viewportWidth)\n ) {\n style.left = px(left);\n style.right = 'auto';\n } else {\n style.left = 'auto';\n style.right = px(right);\n }\n\n break;\n case 'right':\n if (\n inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||\n left + DEFAULT_MARGIN > viewportWidth\n ) {\n style.left = 'auto';\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = 'auto';\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;\n\n this.prevDirectionIsTop = finalDirection === 'top';\n\n if (finalDirection === 'top') {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = 'auto';\n style.bottom = px(\n hostRect.bottom -\n directiveRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(\n directiveRect.bottom -\n hostRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n style.bottom = 'auto';\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case 'top':\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'top';\n }\n\n break;\n case 'bottom':\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'bottom';\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = 'top';\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = 'bottom';\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? 'bottom' : 'top';\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === 'fixed' && !this.directive.sided\n ? px(directiveRect.width)\n : '';\n\n if (this.directive.limitMinWidth === 'min' && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = '';\n style.maxWidth = '';\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n focusable?.focus();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA;;;AAGA;AACA;AACA;;IA+BI,iCAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QAVhE,iBAqBC;QAjB4C,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,iBAAY,cACzB,KAAK,iCACF,IAAI,CAAC,OAAO,EACjB;QAEe,oBAAe,cAC5B,KAAK,uCACF,IAAI,CAAC,OAAO,EACjB;;;;QAKM,uBAAkB,GAAG,KAAK,CAAC;QAoB/B,KAAK,CACD,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CACtC;aACI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC9C,SAAS,CAAC;YACP,KAAI,CAAC,wBAAwB,EAAE,CAAC;SACnC,CAAC,CAAC;KACV;IAED,sBAAI,+CAAU;aAAd;YACI,OAAO,IAAI,CAAC,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;SAC1C;;;OAAA;IAGD,4CAAU,GAAV,UAC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AuB,CAsVnC;IAAD,8BAAC;CAtVD;;;IC9BA;KAAoC;IAAvB,oBAAoB;QAZhC,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,mBAAmB;gBACnB,kBAAkB;gBAClB,mBAAmB;gBACnB,kBAAkB;gBAClB,aAAa;aAChB;YACD,eAAe,EAAE,CAAC,uBAAuB,CAAC;YAC1C,YAAY,EAAE,CAAC,uBAAuB,CAAC;YACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;SACrC,CAAC;OACW,oBAAoB,CAAG;IAAD,2BAAC;CAApC;;ACpBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth, tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: `tui-dropdown-box`,\n templateUrl: `./dropdown-box.template.html`,\n styleUrls: [`./dropdown-box.style.less`],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding(`@tuiDropdownAnimation`)\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild(`content`, {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, `resize`),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? `all` : `scroll`;\n }\n\n @tuiPure\n getContext<T extends object>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | (T & {activeZone?: TuiActiveZoneDirective})\n | {activeZone?: TuiActiveZoneDirective} {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest(`tui-dialog-host`);\n }\n\n @tuiPure\n private get inOption(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest(`[tuiOption]`);\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? `fixed` : `absolute`;\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case `left`:\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = `right`;\n }\n\n break;\n case `right`:\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = `left`;\n }\n\n break;\n }\n\n if (style.right === `auto` && isDropdownSizeActuallyFitsViewport) {\n finalAlign = `left`;\n }\n\n if (style.left === `auto` && isDropdownSizeActuallyFitsViewport) {\n finalAlign = `right`;\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n const viewportWidth = tuiGetViewportWidth(this.windowRef);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case `left`:\n if (\n right + DEFAULT_MARGIN > viewportWidth ||\n inRange(left + DEFAULT_MARGIN, 0, viewportWidth)\n ) {\n style.left = px(left);\n style.right = `auto`;\n } else {\n style.left = `auto`;\n style.right = px(right);\n }\n\n break;\n case `right`:\n if (\n inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||\n left + DEFAULT_MARGIN > viewportWidth\n ) {\n style.left = `auto`;\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = `auto`;\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;\n\n this.prevDirectionIsTop = finalDirection === `top`;\n\n if (finalDirection === `top`) {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = `auto`;\n style.bottom = px(\n hostRect.bottom -\n directiveRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(\n directiveRect.bottom -\n hostRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n style.bottom = `auto`;\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case `top`:\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = `top`;\n }\n\n break;\n case `bottom`:\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = `bottom`;\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = `top`;\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = `bottom`;\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? `bottom` : `top`;\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === `fixed` && !this.directive.sided\n ? px(directiveRect.width)\n : ``;\n\n if (this.directive.limitMinWidth === `min` && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = ``;\n style.maxWidth = ``;\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n focusable?.focus();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA;;;AAGA;AACA;AACA;;IA+BI,iCAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QAVhE,iBAqBC;QAjB4C,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,iBAAY,cACzB,KAAK,iCACF,IAAI,CAAC,OAAO,EACjB;QAEe,oBAAe,cAC5B,KAAK,uCACF,IAAI,CAAC,OAAO,EACjB;;;;QAKM,uBAAkB,GAAG,KAAK,CAAC;QAoB/B,KAAK,CACD,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,QAAQ,EACvB,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CACtC;aACI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC9C,SAAS,CAAC;YACP,KAAI,CAAC,wBAAwB,EAAE,CAAC;SACnC,CAAC,CAAC;KACV;IAED,sBAAI,+CAAU;aAAd;YACI,OAAO,IAAI,CAAC,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;SAC1C;;;OAAA;IAGD,4CAAU,GAAV,UACI,OAAW,EACX,UAAmC;QAInC,6BAAW,OAAO,KAAE,UAAU,YAAA,IAAE;KACnC;IAED,oDAAkB,GAAlB;QACI,IAAI,CAAC,wBAAwB,EAAE,CAAC;KACnC;IAED,4CAAU,GAAV;QACI,IAAI,CAAC,gBAAgB,CAAC,IAAI,C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AAe,EAAE,CAAC,uBAAuB,CAAC;YAC1C,YAAY,EAAE,CAAC,uBAAuB,CAAC;YACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;SACrC,CAAC;OACW,oBAAoB,CAAG;IAAD,2BAAC;CAApC;;ACpBA;;;;;;"}
|
|
@@ -14,11 +14,11 @@ var TuiErrorComponent = /** @class */ (function () {
|
|
|
14
14
|
this.mode$ = mode$;
|
|
15
15
|
this.defaultErrorMessage$ = defaultErrorMessage$;
|
|
16
16
|
this.error = null;
|
|
17
|
-
this.animation = __assign({ value:
|
|
17
|
+
this.animation = __assign({ value: "" }, this.options);
|
|
18
18
|
}
|
|
19
19
|
Object.defineProperty(TuiErrorComponent.prototype, "errorSetter", {
|
|
20
20
|
set: function (error) {
|
|
21
|
-
this.error = typeof error ===
|
|
21
|
+
this.error = typeof error === "string" ? new TuiValidationError(error) : error;
|
|
22
22
|
},
|
|
23
23
|
enumerable: true,
|
|
24
24
|
configurable: true
|
|
@@ -29,12 +29,12 @@ var TuiErrorComponent = /** @class */ (function () {
|
|
|
29
29
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_DEFAULT_ERROR_MESSAGE,] }] }
|
|
30
30
|
]; };
|
|
31
31
|
__decorate([
|
|
32
|
-
Input(
|
|
32
|
+
Input("error"),
|
|
33
33
|
tuiDefaultProp()
|
|
34
34
|
], TuiErrorComponent.prototype, "errorSetter", null);
|
|
35
35
|
TuiErrorComponent = __decorate([
|
|
36
36
|
Component({
|
|
37
|
-
selector:
|
|
37
|
+
selector: "tui-error",
|
|
38
38
|
template: "<div\n *ngIf=\"error\"\n polymorpheus-outlet\n automation-id=\"tui-error__text\"\n class=\"message-text\"\n [@tuiHeightCollapse]=\"animation\"\n [@tuiFadeIn]=\"animation\"\n [class.message-text_light]=\"(mode$ | async) === 'onDark'\"\n [content]=\"error.message || (defaultErrorMessage$ | async)\"\n [context]=\"error.context || {}\"\n></div>\n",
|
|
39
39
|
providers: [MODE_PROVIDER],
|
|
40
40
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-error.js","sources":["ng://@taiga-ui/core/components/error/error.component.ts","ng://@taiga-ui/core/components/error/error.module.ts","ng://@taiga-ui/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {tuiDefaultProp, TuiValidationError} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_DEFAULT_ERROR_MESSAGE,\n TUI_MODE,\n} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-error.js","sources":["ng://@taiga-ui/core/components/error/error.component.ts","ng://@taiga-ui/core/components/error/error.module.ts","ng://@taiga-ui/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {tuiDefaultProp, TuiValidationError} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_DEFAULT_ERROR_MESSAGE,\n TUI_MODE,\n} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-error`,\n templateUrl: `./error.template.html`,\n styleUrls: [`./error.style.less`],\n providers: [MODE_PROVIDER],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiHeightCollapse, tuiFadeIn],\n})\nexport class TuiErrorComponent {\n @Input(`error`)\n @tuiDefaultProp()\n set errorSetter(error: TuiValidationError | string | null) {\n this.error = typeof error === `string` ? new TuiValidationError(error) : error;\n }\n\n error: TuiValidationError | null = null;\n\n readonly animation = {value: ``, ...this.options} as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_DEFAULT_ERROR_MESSAGE)\n readonly defaultErrorMessage$: Observable<string>,\n ) {}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiErrorComponent} from './error.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule],\n declarations: [TuiErrorComponent],\n exports: [TuiErrorComponent],\n})\nexport class TuiErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;IAgCI,2BACoD,OAAyB,EAC9C,KAAuC,EAEzD,oBAAwC;QAHD,YAAO,GAAP,OAAO,CAAkB;QAC9C,UAAK,GAAL,KAAK,CAAkC;QAEzD,yBAAoB,GAApB,oBAAoB,CAAoB;QARrD,UAAK,GAA8B,IAAI,CAAC;QAE/B,cAAS,GAAG,WAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,OAAO,CAAU,CAAC;KAOvD;IAbJ,sBAAI,0CAAW;aAAf,UAAgB,KAAyC;YACrD,IAAI,CAAC,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;SAClF;;;OAAA;;gDAOI,MAAM,SAAC,qBAAqB;gBACK,UAAU,uBAA3C,MAAM,SAAC,QAAQ;gBAEe,UAAU,uBADxC,MAAM,SAAC,yBAAyB;;IAXrC;QAFC,KAAK,CAAC,OAAO,CAAC;QACd,cAAc,EAAE;wDAGh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