@taiga-ui/core 2.74.0 → 2.76.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/abstract/abstract-dropdown.d.ts +2 -2
- package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-core-abstract.umd.js +49 -2
- 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-components-alert.umd.js +55 -10
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +60 -15
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +47 -2
- 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 +83 -39
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +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 +60 -15
- 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 +84 -39
- 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 +50 -5
- 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 +58 -13
- 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 +64 -19
- package/bundles/taiga-ui-core-components-group.umd.js.map +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 +93 -48
- 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 +56 -11
- 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 +51 -6
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +57 -12
- 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 +48 -3
- 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 +54 -9
- 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 +48 -3
- 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 +49 -4
- 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 +48 -3
- 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 +97 -52
- 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 +48 -3
- 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 +50 -5
- 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 +72 -27
- 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 +54 -9
- 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 +61 -16
- 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 +48 -3
- 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 +53 -8
- 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-directives-color.umd.js +52 -7
- 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 +50 -5
- 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 +55 -10
- 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 +48 -3
- 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 +52 -7
- 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 +51 -6
- 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 +49 -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 +47 -2
- 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 +48 -3
- 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 +50 -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 +47 -2
- 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 +48 -3
- 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 +79 -34
- 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 +55 -10
- 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-internal-primitive-year-month-pagination.umd.js +47 -2
- 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 +47 -2
- 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-pipes-calendar-sheet.umd.js +47 -2
- 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-date.umd.js +46 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +46 -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 +46 -1
- 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 +46 -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 +46 -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-services.umd.js +46 -1
- 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 +46 -1
- 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 +1 -3
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +46 -1
- 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 +47 -2
- 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-polyfills.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/button/button-options.d.ts +3 -3
- package/components/button/button.component.d.ts +2 -2
- package/components/calendar/calendar.component.d.ts +1 -1
- package/components/data-list/option/option.component.d.ts +1 -1
- package/components/dropdown-box/dropdown-box.component.d.ts +3 -3
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/link/link.component.d.ts +1 -1
- package/components/loader/loader.component.d.ts +1 -1
- package/components/notification/notification.component.d.ts +1 -1
- package/components/primitive-calendar/primitive-calendar.component.d.ts +2 -2
- package/components/primitive-textfield/primitive-textfield.component.d.ts +2 -2
- package/components/primitive-year-picker/primitive-year-picker.component.d.ts +1 -1
- package/components/svg/svg.component.d.ts +1 -1
- package/components/svg/taiga-ui-core-components-svg.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/directives/textfield-controller/textfield-size.directive.d.ts +1 -1
- package/directives/textfield-controller/textfield.controller.d.ts +1 -1
- package/esm2015/abstract/abstract-dropdown.js +1 -1
- package/esm2015/abstract/abstract-textfield-host.js +7 -3
- package/esm2015/components/alert/alert.component.js +10 -10
- package/esm2015/components/button/button-options.js +1 -1
- package/esm2015/components/button/button.component.js +15 -15
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +9 -10
- 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 +13 -13
- package/esm2015/components/dialog/dialog.component.js +12 -12
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- 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 +4 -4
- 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 +6 -6
- package/esm2015/components/link/link.component.js +12 -12
- 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/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.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/directives/color/color.directive.js +7 -7
- package/esm2015/directives/described-by/described-by.directive.js +5 -5
- package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
- package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm2015/directives/hint/hint.directive.js +6 -6
- package/esm2015/directives/hint-controller/hint-controller.directive.js +7 -7
- 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.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-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 +1 -1
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/interfaces/alert-options.js +1 -1
- package/esm2015/interfaces/dropdown-directive.js +1 -1
- package/esm2015/interfaces/hint.js +1 -1
- package/esm2015/interfaces/notification-options.js +1 -1
- package/esm2015/interfaces/number-format-settings.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/mask/text-mask-list.js +1 -1
- package/esm2015/mask/text-mask-pipe-handler.js +1 -1
- package/esm2015/pipes/calendar-sheet/utils.js +2 -2
- package/esm2015/pipes/format-date/format-date.pipe.js +1 -1
- package/esm2015/types/brightness.js +1 -1
- package/esm2015/types/decimal-symbol.js +1 -1
- package/esm2015/types/decimal.js +1 -1
- package/esm2015/types/dialog-size.js +1 -1
- package/esm2015/types/direction.js +1 -1
- package/esm2015/types/dropdown-width.js +1 -1
- package/esm2015/types/marker-handler.js +1 -1
- package/esm2015/types/option-role.js +1 -1
- package/esm2015/types/orientation.js +1 -1
- package/esm2015/types/size.js +1 -1
- package/esm2015/utils/dom/get-safe-area-size.js +1 -1
- package/esm2015/utils/dom/process-icon.js +2 -4
- package/esm2015/utils/mask/create-number-mask.js +2 -2
- package/esm2015/utils/polyfills/inner-html.js +3 -3
- package/esm5/abstract/abstract-dropdown.js +1 -1
- package/esm5/abstract/abstract-textfield-host.js +4 -2
- package/esm5/components/alert/alert.component.js +10 -10
- package/esm5/components/button/button-options.js +1 -1
- package/esm5/components/button/button.component.js +15 -15
- package/esm5/components/calendar/calendar.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +10 -11
- 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 +13 -13
- package/esm5/components/dialog/dialog.component.js +12 -12
- package/esm5/components/dialog/dialog.directive.js +4 -4
- 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 +4 -4
- 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 +6 -6
- package/esm5/components/link/link.component.js +12 -12
- 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/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.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/directives/color/color.directive.js +7 -7
- package/esm5/directives/described-by/described-by.directive.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/hint/hint.directive.js +6 -6
- package/esm5/directives/hint-controller/hint-controller.directive.js +7 -7
- 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.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-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 +1 -1
- package/esm5/directives/wrapper/wrapper.directive.js +10 -10
- package/esm5/interfaces/alert-options.js +1 -1
- package/esm5/interfaces/dropdown-directive.js +1 -1
- package/esm5/interfaces/hint.js +1 -1
- package/esm5/interfaces/notification-options.js +1 -1
- package/esm5/interfaces/number-format-settings.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/mask/text-mask-list.js +1 -1
- package/esm5/mask/text-mask-pipe-handler.js +1 -1
- package/esm5/pipes/calendar-sheet/utils.js +2 -2
- package/esm5/pipes/format-date/format-date.pipe.js +1 -1
- package/esm5/types/brightness.js +1 -1
- package/esm5/types/decimal-symbol.js +1 -1
- package/esm5/types/decimal.js +1 -1
- package/esm5/types/dialog-size.js +1 -1
- package/esm5/types/direction.js +1 -1
- package/esm5/types/dropdown-width.js +1 -1
- package/esm5/types/marker-handler.js +1 -1
- package/esm5/types/option-role.js +1 -1
- package/esm5/types/orientation.js +1 -1
- package/esm5/types/size.js +1 -1
- package/esm5/utils/dom/get-safe-area-size.js +1 -1
- package/esm5/utils/dom/process-icon.js +2 -4
- package/esm5/utils/mask/create-number-mask.js +2 -2
- package/esm5/utils/polyfills/inner-html.js +1 -1
- package/fesm2015/taiga-ui-core-abstract.js +6 -2
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +9 -9
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +14 -14
- 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 +36 -37
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +14 -14
- 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 +18 -18
- 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 +5 -5
- 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 +2 -2
- 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 +3 -3
- 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 +51 -51
- 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-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 +4 -4
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +9 -9
- 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 +6 -6
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +5 -5
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +3 -3
- 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 +4 -4
- 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 +33 -33
- 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-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-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-date.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +1 -3
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js +2 -2
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +3 -1
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +9 -9
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js +14 -14
- 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 +37 -38
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +14 -14
- 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 +18 -18
- 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 +5 -5
- 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 +2 -2
- 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 +3 -3
- 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 +51 -51
- 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-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 +4 -4
- package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +9 -9
- 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 +6 -6
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +5 -5
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +3 -3
- 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 +4 -4
- 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 +33 -33
- 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-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-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-date.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +1 -3
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/interfaces/alert-options.d.ts +1 -1
- package/interfaces/dropdown-directive.d.ts +2 -2
- package/interfaces/hint.d.ts +1 -1
- package/interfaces/notification-options.d.ts +1 -1
- package/interfaces/number-format-settings.d.ts +1 -2
- package/mask/text-mask-list.d.ts +1 -1
- package/mask/text-mask-pipe-handler.d.ts +1 -1
- package/package.json +4 -4
- package/pipes/format-date/format-date.pipe.d.ts +1 -1
- package/tokens/dropdown-directive.d.ts +1 -1
- package/types/brightness.d.ts +1 -1
- package/types/decimal-symbol.d.ts +1 -1
- package/types/decimal.d.ts +1 -1
- package/types/dialog-size.d.ts +1 -1
- package/types/direction.d.ts +2 -2
- package/types/dropdown-width.d.ts +1 -1
- package/types/marker-handler.d.ts +1 -1
- package/types/option-role.d.ts +1 -1
- package/types/orientation.d.ts +1 -1
- package/types/size.d.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-abstract.js","sources":["ng://@taiga-ui/core/abstract/abstract-dropdown.ts","ng://@taiga-ui/core/abstract/abstract-hint.ts","ng://@taiga-ui/core/abstract/abstract-hint-options.ts","ng://@taiga-ui/core/abstract/abstract-textfield-host.ts","ng://@taiga-ui/core/abstract/taiga-ui-core-abstract.ts"],"sourcesContent":["import {\n AfterViewChecked,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n Injector,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiNativeFocusableElement,\n TuiPortalService,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownBoxComponent} from '@taiga-ui/core/components/dropdown-box';\nimport {DEFAULT_MAX_HEIGHT, DEFAULT_MIN_HEIGHT} from '@taiga-ui/core/constants';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {\n TuiDropdownWidthT,\n TuiHorizontalDirection,\n TuiVerticalDirection,\n} from '@taiga-ui/core/types';\nimport {checkFixedPosition} from '@taiga-ui/core/utils/dom';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n// @bad TODO: Possibly refactor to make more abstract\n@Directive()\nexport abstract class AbstractTuiDropdown\n implements TuiDropdown, AfterViewChecked, OnDestroy\n{\n abstract refresh$: Observable<unknown>;\n\n @Input(`tuiDropdownContent`)\n @tuiDefaultProp()\n content: PolymorpheusContent = ``;\n\n @Input(`tuiDropdownHost`)\n @tuiDefaultProp()\n tuiDropdownHost: TuiNativeFocusableElement | HTMLElement | null = null;\n\n @Input(`tuiDropdownMinHeight`)\n @tuiDefaultProp()\n minHeight = DEFAULT_MIN_HEIGHT;\n\n @Input(`tuiDropdownMaxHeight`)\n @tuiDefaultProp()\n maxHeight = DEFAULT_MAX_HEIGHT;\n\n @Input(`tuiDropdownAlign`)\n @tuiDefaultProp()\n align: TuiHorizontalDirection = `left`;\n\n @Input(`tuiDropdownDirection`)\n @tuiDefaultProp()\n direction: TuiVerticalDirection | null = null;\n\n @Input(`tuiDropdownSided`)\n @tuiDefaultProp()\n sided = false;\n\n @Input(`tuiDropdownLimitWidth`)\n @tuiDefaultProp()\n limitMinWidth: TuiDropdownWidthT = `min`;\n\n dropdownBoxRef: ComponentRef<TuiDropdownBoxComponent> | null = null;\n\n protected constructor(\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n private readonly injector: Injector,\n private readonly portalService: TuiPortalService,\n protected readonly elementRef: ElementRef<HTMLElement>,\n readonly activeZone: TuiActiveZoneDirective | null,\n ) {}\n\n ngOnDestroy(): void {\n this.closeDropdownBox();\n }\n\n ngAfterViewChecked(): void {\n // @awful TODO: This is probably wrong to call both but in TuiHostedDropdown some changes do not propagate otherwise\n if (this.dropdownBoxRef !== null) {\n this.dropdownBoxRef.changeDetectorRef.detectChanges();\n this.dropdownBoxRef.changeDetectorRef.markForCheck();\n }\n }\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n get host(): TuiNativeFocusableElement | HTMLElement {\n return this.tuiDropdownHost || this.elementRef.nativeElement;\n }\n\n @tuiPure\n get fixed(): boolean {\n return checkFixedPosition(this.elementRef.nativeElement);\n }\n\n @tuiPure\n protected toggleDropdown(value: boolean): void {\n if (value) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n }\n\n protected openDropdownBox(): void {\n if (this.dropdownBoxRef !== null) {\n return;\n }\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(\n TuiDropdownBoxComponent,\n );\n\n this.dropdownBoxRef = this.portalService.add(componentFactory, this.injector);\n this.dropdownBoxRef.changeDetectorRef.detectChanges();\n }\n\n protected closeDropdownBox(): void {\n if (this.dropdownBoxRef === null) {\n return;\n }\n\n this.portalService.remove(this.dropdownBoxRef);\n this.dropdownBoxRef = null;\n }\n}\n","import {Directive, ElementRef, Input, OnDestroy} from '@angular/core';\nimport {TuiActiveZoneDirective, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAbstractHintOptions} from './abstract-hint-options';\n\n@Directive()\nexport abstract class AbstractTuiHint implements OnDestroy {\n @Input(`tuiHintMode`)\n @tuiDefaultProp()\n mode: TuiAbstractHintOptions['mode'] = this.options.mode;\n\n @Input(`tuiHintDirection`)\n @tuiDefaultProp()\n direction: TuiAbstractHintOptions['direction'] = this.options.direction;\n\n content: PolymorpheusContent = ``;\n\n protected constructor(\n protected readonly elementRef: ElementRef<HTMLElement>,\n protected readonly hintService: TuiHintService,\n readonly activeZone: TuiActiveZoneDirective | null,\n protected readonly options: TuiAbstractHintOptions,\n ) {}\n\n abstract getElementClientRect(): ClientRect;\n\n ngOnDestroy(): void {\n this.hideTooltip();\n }\n\n protected showTooltip(): void {\n this.hintService.add(this);\n }\n\n protected hideTooltip(): void {\n this.hintService.remove(this);\n }\n}\n","import {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\n\nexport interface TuiAbstractHintOptions {\n readonly mode: TuiHintModeT | null;\n readonly direction: TuiDirection;\n}\n\n/** Default values for abstract hint options */\nexport const TUI_ABSTRACT_HINT_DEFAULT_OPTIONS: TuiAbstractHintOptions = {\n mode: null,\n direction: `bottom-left`,\n};\n","import {Directive, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n// @dynamic\n@Directive()\nexport abstract class TuiAbstractTextfieldHost<T extends AbstractTuiControl<any>>\n implements TuiTextfieldHost\n{\n constructor(@Inject(AbstractTuiControl) protected readonly host: T) {}\n\n get readOnly(): boolean {\n return this.host.readOnly;\n }\n\n get disabled(): boolean {\n return this.host.computedDisabled;\n }\n\n get invalid(): boolean {\n return this.host.computedInvalid;\n }\n\n get focusable(): boolean {\n return this.host.computedFocusable;\n }\n\n get value(): string {\n return String(this.host.value);\n }\n\n abstract onValueChange(value: string): void;\n\n process(_input: HTMLInputElement): void {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA6BA;;IAyCI,6BACqB,wBAAkD,EAClD,QAAkB,EAClB,aAA+B,EAC7B,UAAmC,EAC7C,UAAyC;QAJjC,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,aAAQ,GAAR,QAAQ,CAAU;QAClB,kBAAa,GAAb,aAAa,CAAkB;QAC7B,eAAU,GAAV,UAAU,CAAyB;QAC7C,eAAU,GAAV,UAAU,CAA+B;QArCtD,YAAO,GAAwB,EAAE,CAAC;QAIlC,oBAAe,GAAmD,IAAI,CAAC;QAIvE,cAAS,GAAG,kBAAkB,CAAC;QAI/B,cAAS,GAAG,kBAAkB,CAAC;QAI/B,UAAK,GAA2B,MAAM,CAAC;QAIvC,cAAS,GAAgC,IAAI,CAAC;QAI9C,UAAK,GAAG,KAAK,CAAC;QAId,kBAAa,GAAsB,KAAK,CAAC;QAEzC,mBAAc,GAAiD,IAAI,CAAC;KAQhE;IAEJ,yCAAW,GAAX;QACI,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAC3B;IAED,gDAAkB,GAAlB;;QAEI,IAAI,IAAI,CAAC,cAAc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core/abstract/abstract-hint-options.ts","ng://@taiga-ui/core/abstract/abstract-textfield-host.ts","ng://@taiga-ui/core/abstract/taiga-ui-core-abstract.ts"],"sourcesContent":["import {\n AfterViewChecked,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n Injector,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiNativeFocusableElement,\n TuiPortalService,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownBoxComponent} from '@taiga-ui/core/components/dropdown-box';\nimport {DEFAULT_MAX_HEIGHT, DEFAULT_MIN_HEIGHT} from '@taiga-ui/core/constants';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {\n TuiDropdownWidthT,\n TuiHorizontalDirection,\n TuiVerticalDirection,\n} from '@taiga-ui/core/types';\nimport {checkFixedPosition} from '@taiga-ui/core/utils/dom';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n// @bad TODO: Possibly refactor to make more abstract\n@Directive()\nexport abstract class AbstractTuiDropdown\n implements TuiDropdown, AfterViewChecked, OnDestroy\n{\n abstract refresh$: Observable<unknown>;\n\n @Input(`tuiDropdownContent`)\n @tuiDefaultProp()\n content: PolymorpheusContent = ``;\n\n @Input(`tuiDropdownHost`)\n @tuiDefaultProp()\n tuiDropdownHost: HTMLElement | TuiNativeFocusableElement | null = null;\n\n @Input(`tuiDropdownMinHeight`)\n @tuiDefaultProp()\n minHeight = DEFAULT_MIN_HEIGHT;\n\n @Input(`tuiDropdownMaxHeight`)\n @tuiDefaultProp()\n maxHeight = DEFAULT_MAX_HEIGHT;\n\n @Input(`tuiDropdownAlign`)\n @tuiDefaultProp()\n align: TuiHorizontalDirection = `left`;\n\n @Input(`tuiDropdownDirection`)\n @tuiDefaultProp()\n direction: TuiVerticalDirection | null = null;\n\n @Input(`tuiDropdownSided`)\n @tuiDefaultProp()\n sided = false;\n\n @Input(`tuiDropdownLimitWidth`)\n @tuiDefaultProp()\n limitMinWidth: TuiDropdownWidthT = `min`;\n\n dropdownBoxRef: ComponentRef<TuiDropdownBoxComponent> | null = null;\n\n protected constructor(\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n private readonly injector: Injector,\n private readonly portalService: TuiPortalService,\n protected readonly elementRef: ElementRef<HTMLElement>,\n readonly activeZone: TuiActiveZoneDirective | null,\n ) {}\n\n ngOnDestroy(): void {\n this.closeDropdownBox();\n }\n\n ngAfterViewChecked(): void {\n // @awful TODO: This is probably wrong to call both but in TuiHostedDropdown some changes do not propagate otherwise\n if (this.dropdownBoxRef !== null) {\n this.dropdownBoxRef.changeDetectorRef.detectChanges();\n this.dropdownBoxRef.changeDetectorRef.markForCheck();\n }\n }\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n get host(): HTMLElement | TuiNativeFocusableElement {\n return this.tuiDropdownHost || this.elementRef.nativeElement;\n }\n\n @tuiPure\n get fixed(): boolean {\n return checkFixedPosition(this.elementRef.nativeElement);\n }\n\n @tuiPure\n protected toggleDropdown(value: boolean): void {\n if (value) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n }\n\n protected openDropdownBox(): void {\n if (this.dropdownBoxRef !== null) {\n return;\n }\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(\n TuiDropdownBoxComponent,\n );\n\n this.dropdownBoxRef = this.portalService.add(componentFactory, this.injector);\n this.dropdownBoxRef.changeDetectorRef.detectChanges();\n }\n\n protected closeDropdownBox(): void {\n if (this.dropdownBoxRef === null) {\n return;\n }\n\n this.portalService.remove(this.dropdownBoxRef);\n this.dropdownBoxRef = null;\n }\n}\n","import {Directive, ElementRef, Input, OnDestroy} from '@angular/core';\nimport {TuiActiveZoneDirective, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAbstractHintOptions} from './abstract-hint-options';\n\n@Directive()\nexport abstract class AbstractTuiHint implements OnDestroy {\n @Input(`tuiHintMode`)\n @tuiDefaultProp()\n mode: TuiAbstractHintOptions['mode'] = this.options.mode;\n\n @Input(`tuiHintDirection`)\n @tuiDefaultProp()\n direction: TuiAbstractHintOptions['direction'] = this.options.direction;\n\n content: PolymorpheusContent = ``;\n\n protected constructor(\n protected readonly elementRef: ElementRef<HTMLElement>,\n protected readonly hintService: TuiHintService,\n readonly activeZone: TuiActiveZoneDirective | null,\n protected readonly options: TuiAbstractHintOptions,\n ) {}\n\n abstract getElementClientRect(): ClientRect;\n\n ngOnDestroy(): void {\n this.hideTooltip();\n }\n\n protected showTooltip(): void {\n this.hintService.add(this);\n }\n\n protected hideTooltip(): void {\n this.hintService.remove(this);\n }\n}\n","import {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\n\nexport interface TuiAbstractHintOptions {\n readonly mode: TuiHintModeT | null;\n readonly direction: TuiDirection;\n}\n\n/** Default values for abstract hint options */\nexport const TUI_ABSTRACT_HINT_DEFAULT_OPTIONS: TuiAbstractHintOptions = {\n mode: null,\n direction: `bottom-left`,\n};\n","import {Directive, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n// @dynamic\n@Directive()\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiAbstractTextfieldHost<T extends AbstractTuiControl<any>>\n implements TuiTextfieldHost\n{\n constructor(@Inject(AbstractTuiControl) protected readonly host: T) {}\n\n get readOnly(): boolean {\n return this.host.readOnly;\n }\n\n get disabled(): boolean {\n return this.host.computedDisabled;\n }\n\n get invalid(): boolean {\n return this.host.computedInvalid;\n }\n\n get focusable(): boolean {\n return this.host.computedFocusable;\n }\n\n get value(): string {\n return String(this.host.value);\n }\n\n abstract onValueChange(value: string): void;\n\n process(_input: HTMLInputElement): void {}\n}\n","/**\n * Generated bundle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AC7B;;;OAAA;IAED,sBAAI,8CAAQ;aAAZ;YACI,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACrC;;;OAAA;IAED,sBAAI,6CAAO;aAAX;YACI,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;SACpC;;;OAAA;IAED,sBAAI,+CAAS;aAAb;YACI,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;SACtC;;;OAAA;IAED,sBAAI,2CAAK;aAAT;YACI,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClC;;;OAAA;IAID,0CAAO,GAAP,UAAQ,MAAwB,KAAU;;gDAxB7B,MAAM,SAAC,kBAAkB;;IAHpB,wBAAwB;QAF7C,SAAS,EAAE;;;QAKK,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;OAHrB,wBAAwB,CA4B7C;IAAD,+BAAC;CA5BD;;ACPA;;;;;;"}
|
|
@@ -18,10 +18,10 @@ var TuiAlertComponent = /** @class */ (function () {
|
|
|
18
18
|
this.options = options;
|
|
19
19
|
this.animationOptions = animationOptions;
|
|
20
20
|
this.item = item;
|
|
21
|
-
this.autoClose = typeof this.item.autoClose ===
|
|
21
|
+
this.autoClose = typeof this.item.autoClose === 'function'
|
|
22
22
|
? this.item.autoClose(this.item.status)
|
|
23
23
|
: this.item.autoClose;
|
|
24
|
-
this.animation = __assign({ value:
|
|
24
|
+
this.animation = __assign({ value: '' }, this.animationOptions);
|
|
25
25
|
}
|
|
26
26
|
TuiAlertComponent.prototype.ngOnInit = function () {
|
|
27
27
|
this.initAutoClose();
|
|
@@ -60,9 +60,9 @@ var TuiAlertComponent = /** @class */ (function () {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
timer(isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime)
|
|
63
|
-
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement,
|
|
63
|
+
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),
|
|
64
64
|
// eslint-disable-next-line rxjs/no-ignored-notifier
|
|
65
|
-
repeatWhen(function () { return fromEvent(_this.elementRef.nativeElement,
|
|
65
|
+
repeatWhen(function () { return fromEvent(_this.elementRef.nativeElement, 'mouseleave'); }), takeUntil(this.destroy$))
|
|
66
66
|
.subscribe(function () { return _this.closeNotification(); });
|
|
67
67
|
};
|
|
68
68
|
TuiAlertComponent.ctorParameters = function () { return [
|
|
@@ -73,21 +73,21 @@ var TuiAlertComponent = /** @class */ (function () {
|
|
|
73
73
|
{ type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
|
|
74
74
|
]; };
|
|
75
75
|
__decorate([
|
|
76
|
-
HostBinding(
|
|
77
|
-
HostBinding(
|
|
78
|
-
HostBinding(
|
|
76
|
+
HostBinding('@tuiFadeIn'),
|
|
77
|
+
HostBinding('@tuiSlideInRight'),
|
|
78
|
+
HostBinding('@tuiHeightCollapse')
|
|
79
79
|
], TuiAlertComponent.prototype, "animation", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
tuiPure
|
|
82
82
|
], TuiAlertComponent.prototype, "calculateContext", null);
|
|
83
83
|
TuiAlertComponent = __decorate([
|
|
84
84
|
Component({
|
|
85
|
-
selector:
|
|
85
|
+
selector: 'tui-alert',
|
|
86
86
|
template: "<tui-notification\n *ngIf=\"item.hasCloseButton; else noClose\"\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n [content]=\"$any(item.label)\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n [content]=\"item.content\"\n [context]=\"$any(context)\"\n ></div>\n</tui-notification>\n<ng-template #noClose>\n <tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n >\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n [content]=\"$any(item.label)\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n [content]=\"item.content\"\n [context]=\"$any(context)\"\n ></div>\n </tui-notification>\n</ng-template>\n",
|
|
87
87
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
88
88
|
providers: [TuiDestroyService],
|
|
89
89
|
animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],
|
|
90
|
-
host: { role:
|
|
90
|
+
host: { role: 'alert' },
|
|
91
91
|
styles: [":host{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);display:block;border-radius:var(--tui-radius-m);width:18rem;margin:2rem 3rem 0 auto}:host-context(tui-root._mobile) :host{margin:1rem 1rem 0 auto}:host:not(:first-child){margin-top:.75rem}.t-heading{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:700;margin:0}.t-content{color:var(--tui-text-01);word-wrap:break-word}.t-content:empty{display:none}"]
|
|
92
92
|
}),
|
|
93
93
|
__param(0, Inject(ElementRef)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["ng://@taiga-ui/core/components/alert/alert.component.ts","ng://@taiga-ui/core/components/alert/alert.service.ts","ng://@taiga-ui/core/components/alert/alert.module.ts","ng://@taiga-ui/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n} from '@angular/core';\nimport {\n isNumber,\n TuiContextWithImplicit,\n TuiDestroyService,\n TuiDialog,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: 3.0 Remove and start using TuiDialog<TuiAlertOptions<I>, O>\nexport interface TuiNotificationContentContext<O = void, I = undefined>\n extends TuiContextWithImplicit<TuiNotification> {\n label: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;\n data: I;\n closeHook: () => void;\n emitHook: (data: O) => void;\n emitAndCloseHook: (data: O) => void;\n}\n\n// TODO: 3.0 Refactor according to new context by 3.0 and get rid of $any in template\n@Component({\n selector: `tui-alert`,\n templateUrl: `./alert.template.html`,\n styleUrls: [`./alert.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: `alert`},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === `function`\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding(`@tuiFadeIn`)\n @HostBinding(`@tuiSlideInRight`)\n @HostBinding(`@tuiHeightCollapse`)\n readonly animation = {value: ``, ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n get context(): TuiNotificationContentContext<O, I> {\n return this.calculateContext(this.item);\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n @tuiPure\n private calculateContext({\n $implicit,\n status,\n data,\n label,\n }: TuiDialog<TuiAlertOptions<I>, O>): TuiNotificationContentContext<O, I> {\n return {\n $implicit: status,\n data,\n label,\n closeHook: () => {\n $implicit.complete();\n },\n emitHook: (data: O) => {\n $implicit.next(data);\n },\n emitAndCloseHook: (data: O) => {\n $implicit.next(data);\n $implicit.complete();\n },\n };\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, `mouseenter`)),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, `mouseleave`)),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {\n TuiAlertOptions,\n TuiNotificationOptions,\n TuiNotificationOptionsWithData,\n} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiAlertComponent, TuiNotificationContentContext} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n\n/** @deprecated use {@link TuiAlertService} */\n@Injectable({providedIn: `root`})\nexport class TuiNotificationsService {\n constructor(@Inject(TuiAlertService) private readonly alert: TuiAlertService) {}\n\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n ): Observable<O>;\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n options: TuiNotificationOptions,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptionsWithData<I>,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptions | TuiNotificationOptionsWithData<I> = {},\n ): Observable<O> {\n return this.alert.open(content as any, options) as unknown as Observable<O>;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_ALERTS} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n entryComponents: [TuiAlertComponent],\n providers: [\n {\n provide: TUI_ALERTS,\n useExisting: TuiAlertService,\n multi: true,\n },\n ],\n})\nexport class TuiAlertModule {}\n\n/** @deprecated use {@link TuiAlertModule} */\n@NgModule({imports: [TuiAlertModule]})\nexport class TuiNotificationsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsCA;;IAqBI,2BACyC,UAAmC,EAC5B,QAA2B,EAEtD,OAAsC,EAEtC,gBAAkC,EACZ,IAAsC;QANxC,eAAU,GAAV,UAAU,CAAyB;QAC5B,aAAQ,GAAR,QAAQ,CAAmB;QAEtD,YAAO,GAAP,OAAO,CAA+B;QAEtC,qBAAgB,GAAhB,gBAAgB,CAAkB;QACZ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CAA9B,IAA8B;AAE9B;;IAEA;KAAsC;IAAzB,sBAAsB;QADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;OACzB,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;AC1BA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["ng://@taiga-ui/core/components/alert/alert.component.ts","ng://@taiga-ui/core/components/alert/alert.service.ts","ng://@taiga-ui/core/components/alert/alert.module.ts","ng://@taiga-ui/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n} from '@angular/core';\nimport {\n isNumber,\n TuiContextWithImplicit,\n TuiDestroyService,\n TuiDialog,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: 3.0 Remove and start using TuiDialog<TuiAlertOptions<I>, O>\nexport interface TuiNotificationContentContext<O = void, I = undefined>\n extends TuiContextWithImplicit<TuiNotification> {\n label: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;\n data: I;\n closeHook: () => void;\n emitHook: (data: O) => void;\n emitAndCloseHook: (data: O) => void;\n}\n\n// TODO: 3.0 Refactor according to new context by 3.0 and get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding('@tuiFadeIn')\n @HostBinding('@tuiSlideInRight')\n @HostBinding('@tuiHeightCollapse')\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n get context(): TuiNotificationContentContext<O, I> {\n return this.calculateContext(this.item);\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n @tuiPure\n private calculateContext({\n $implicit,\n status,\n data,\n label,\n }: TuiDialog<TuiAlertOptions<I>, O>): TuiNotificationContentContext<O, I> {\n return {\n $implicit: status,\n data,\n label,\n closeHook: () => {\n $implicit.complete();\n },\n emitHook: (data: O) => {\n $implicit.next(data);\n },\n emitAndCloseHook: (data: O) => {\n $implicit.next(data);\n $implicit.complete();\n },\n };\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {\n TuiAlertOptions,\n TuiNotificationOptions,\n TuiNotificationOptionsWithData,\n} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiAlertComponent, TuiNotificationContentContext} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n\n/** @deprecated use {@link TuiAlertService} */\n@Injectable({providedIn: `root`})\nexport class TuiNotificationsService {\n constructor(@Inject(TuiAlertService) private readonly alert: TuiAlertService) {}\n\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n ): Observable<O>;\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n options: TuiNotificationOptions,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptionsWithData<I>,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptions | TuiNotificationOptionsWithData<I> = {},\n ): Observable<O> {\n return this.alert.open(content as any, options) as unknown as Observable<O>;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_ALERTS} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n entryComponents: [TuiAlertComponent],\n providers: [\n {\n provide: TUI_ALERTS,\n useExisting: TuiAlertService,\n multi: true,\n },\n ],\n})\nexport class TuiAlertModule {}\n\n/** @deprecated use {@link TuiAlertModule} */\n@NgModule({imports: [TuiAlertModule]})\nexport class TuiNotificationsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsCA;;IAqBI,2BACyC,UAAmC,EAC5B,QAA2B,EAEtD,OAAsC,EAEtC,gBAAkC,EACZ,IAAsC;QANxC,eAAU,GAAV,UAAU,CAAyB;QAC5B,aAAQ,GAAR,QAAQ,CAAmB;QAEtD,YAAO,GAAP,OAAO,CAA+B;QAEtC,qBAAgB,GAAhB,gBAAgB,CAAkB;QACZ,SAAI,GAAJ,IAAI,CAAkC;QAjBhE,cAAS,GACtB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,UAAU;cACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;cACrC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAKrB,cAAS,GAAG,WAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,gBAAgB,CAAU,CAAC;KAUhE;IAEJ,oCAAQ,GAAR;QACI,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAED,sBAAI,sCAAO;aAAX;YACI,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;;;OAAA;IAED,6CAAiB,GAAjB;QACI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAClC;IAGO,4CAAgB,GAAxB,UAAyB,EAKU;YAJ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AI,CAAC,OAAc,EAAE,OAAO,CAA6B,CAAC;KAC/E;;gBAlB4D,eAAe,uBAA/D,MAAM,SAAC,eAAe;;;IAD1B,uBAAuB;QADnC,UAAU,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC;QAEhB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;OAD3B,uBAAuB,CAoBnC;kCAhDD;CA4BA;;;ICNA;KAA8B;IAAjB,cAAc;QAb1B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;YAClE,YAAY,EAAE,CAAC,iBAAiB,CAAC;YACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;YAC5B,eAAe,EAAE,CAAC,iBAAiB,CAAC;YACpC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,UAAU;oBACnB,WAAW,EAAE,eAAe;oBAC5B,KAAK,EAAE,IAAI;iBACd;aACJ;SACJ,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B,IAA8B;AAE9B;;IAEA;KAAsC;IAAzB,sBAAsB;QADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;OACzB,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;AC1BA;;;;;;"}
|
|
@@ -35,8 +35,8 @@ var TuiButtonComponent = /** @class */ (function (_super) {
|
|
|
35
35
|
_this.mode$ = ((_a = _this.mode) === null || _a === void 0 ? void 0 : _a.change$) || EMPTY;
|
|
36
36
|
_this.appearance = null;
|
|
37
37
|
_this.disabled = false;
|
|
38
|
-
_this.icon =
|
|
39
|
-
_this.iconRight =
|
|
38
|
+
_this.icon = '';
|
|
39
|
+
_this.iconRight = '';
|
|
40
40
|
_this.shape = _this.options.shape;
|
|
41
41
|
_this.showLoader = false;
|
|
42
42
|
_this.size = _this.options.size;
|
|
@@ -76,7 +76,7 @@ var TuiButtonComponent = /** @class */ (function (_super) {
|
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(TuiButtonComponent.prototype, "loaderSize", {
|
|
78
78
|
get: function () {
|
|
79
|
-
return this.size ===
|
|
79
|
+
return this.size === 'l' || this.size === 'xl' ? 'm' : 's';
|
|
80
80
|
},
|
|
81
81
|
enumerable: true,
|
|
82
82
|
configurable: true
|
|
@@ -84,14 +84,14 @@ var TuiButtonComponent = /** @class */ (function (_super) {
|
|
|
84
84
|
Object.defineProperty(TuiButtonComponent.prototype, "computedAppearance", {
|
|
85
85
|
get: function () {
|
|
86
86
|
var _a;
|
|
87
|
-
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance ||
|
|
87
|
+
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance || '');
|
|
88
88
|
},
|
|
89
89
|
enumerable: true,
|
|
90
90
|
configurable: true
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(TuiButtonComponent.prototype, "nativeDisabled", {
|
|
93
93
|
get: function () {
|
|
94
|
-
return this.computedDisabled || this.showLoader ?
|
|
94
|
+
return this.computedDisabled || this.showLoader ? '' : null;
|
|
95
95
|
},
|
|
96
96
|
enumerable: true,
|
|
97
97
|
configurable: true
|
|
@@ -135,35 +135,35 @@ var TuiButtonComponent = /** @class */ (function (_super) {
|
|
|
135
135
|
], TuiButtonComponent.prototype, "iconRight", void 0);
|
|
136
136
|
__decorate([
|
|
137
137
|
Input(),
|
|
138
|
-
HostBinding(
|
|
138
|
+
HostBinding('attr.data-shape'),
|
|
139
139
|
tuiDefaultProp()
|
|
140
140
|
], TuiButtonComponent.prototype, "shape", void 0);
|
|
141
141
|
__decorate([
|
|
142
142
|
Input(),
|
|
143
|
-
HostBinding(
|
|
143
|
+
HostBinding('class._loading'),
|
|
144
144
|
tuiDefaultProp()
|
|
145
145
|
], TuiButtonComponent.prototype, "showLoader", void 0);
|
|
146
146
|
__decorate([
|
|
147
147
|
Input(),
|
|
148
|
-
HostBinding(
|
|
148
|
+
HostBinding('attr.data-size'),
|
|
149
149
|
tuiDefaultProp()
|
|
150
150
|
], TuiButtonComponent.prototype, "size", void 0);
|
|
151
151
|
__decorate([
|
|
152
|
-
HostBinding(
|
|
152
|
+
HostBinding('attr.data-appearance')
|
|
153
153
|
], TuiButtonComponent.prototype, "computedAppearance", null);
|
|
154
154
|
__decorate([
|
|
155
|
-
HostBinding(
|
|
155
|
+
HostBinding('attr.disabled')
|
|
156
156
|
], TuiButtonComponent.prototype, "nativeDisabled", null);
|
|
157
157
|
__decorate([
|
|
158
|
-
HostBinding(
|
|
158
|
+
HostBinding('tabIndex')
|
|
159
159
|
], TuiButtonComponent.prototype, "tabIndex", null);
|
|
160
160
|
__decorate([
|
|
161
|
-
HostListener(
|
|
162
|
-
HostListener(
|
|
161
|
+
HostListener('focusin', ['true']),
|
|
162
|
+
HostListener('focusout', ['false'])
|
|
163
163
|
], TuiButtonComponent.prototype, "onFocused", null);
|
|
164
164
|
TuiButtonComponent = TuiButtonComponent_1 = __decorate([
|
|
165
165
|
Component({
|
|
166
|
-
selector:
|
|
166
|
+
selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',
|
|
167
167
|
template: "<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<tui-wrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [disabled]=\"computedDisabled\"\n [focused]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n polymorpheus-outlet\n class=\"t-left\"\n [content]=\"icon\"\n >\n <ng-template let-icon>\n <tui-svg\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n polymorpheus-outlet\n class=\"t-right\"\n [content]=\"iconRight\"\n >\n <ng-template let-icon>\n <tui-svg\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</tui-wrapper>\n",
|
|
168
168
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
169
169
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["ng://@taiga-ui/core/components/button/button-options.ts","ng://@taiga-ui/core/components/button/button.component.ts","ng://@taiga-ui/core/components/button/button.module.ts","ng://@taiga-ui/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXS | TuiSizeXL;\n readonly appearance:\n | keyof Record<TuiAppearance, string>\n | TuiAppearance\n | string\n | null; // TODO: 3.0 need remove `null`\n readonly shape: 'square' | 'rounded' | null; // TODO: 3.0 need remove `null`\n}\n\n/**\n * @deprecated: use TuiButtonOptions instead\n * todo: remove in 3.0\n */\nexport type ButtonOptions = TuiButtonOptions;\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\nexport const TUI_BUTTON_OPTIONS = new InjectionToken<TuiButtonOptions>(\n `Default parameters for button component`,\n {\n factory: () => TUI_BUTTON_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiButtonOptionsProvider: (\n options: Partial<TuiButtonOptions>,\n) => ValueProvider = (options: Partial<TuiButtonOptions>) => ({\n provide: TUI_BUTTON_OPTIONS,\n useValue: {...TUI_BUTTON_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n pressedObservable,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_TAKE_ONLY_TRUSTED_EVENTS,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiHoveredService,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, takeUntil} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button-options';\n\n@Component({\n selector: `button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]`,\n templateUrl: `./button.template.html`,\n styleUrls: [`./button.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiButtonComponent),\n },\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n @tuiDefaultProp()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n icon: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n iconRight: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-shape`)\n @tuiDefaultProp()\n shape = this.options.shape;\n\n @Input()\n @HostBinding(`class._loading`)\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TAKE_ONLY_TRUSTED_EVENTS)\n private readonly takeOnlyTrustedEvents: boolean,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n\n hoveredService\n .createHovered$(elementRef.nativeElement)\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(hovered => {\n this.updateHovered(hovered);\n });\n pressedObservable(elementRef.nativeElement, {\n onlyTrusted: this.takeOnlyTrustedEvents,\n })\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(pressed => {\n this.updatePressed(pressed);\n });\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && isNativeFocused(this.elementRef.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === `l` || this.size === `xl` ? `m` : `s`;\n }\n\n @HostBinding(`attr.data-appearance`)\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || ``);\n }\n\n @HostBinding(`attr.disabled`)\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? `` : null;\n }\n\n @HostBinding(`tabIndex`)\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener(`focusin`, [`true`])\n @HostListener(`focusout`, [`false`])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;IAoBa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,UAAU;EACZ;IAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA;CAC5C,EACH;IAEW,wBAAwB,GAEhB,UAAC,OAAkC,IAAK,QAAC;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,wBAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;;ICUW,sCAAsB;IA0C9B,4BAGqB,IAA6B,EACT,UAAmC,EACxC,aAAqC,EAC1C,cAAiC,EACjC,QAA0B,EAC1B,iBAAoC,EAE9C,qBAA8B,EACF,OAAyB;;QAX1E,YAaI,iBAAO,SAkBV;QA5BoB,UAAI,GAAJ,IAAI,CAAyB;QACT,gBAAU,GAAV,UAAU,CAAyB;QAMvD,2BAAqB,GAArB,qBAAqB,CAAS;QACF,aAAO,GAAP,OAAO,CAAkB;QAlDzD,WAAK,GAAwB,OAAA,KAAI,CAAC,IAAI,0CAAE,OAAO,KAAI,KAAK,CAAC;QAI1E,gBAAU,GAAmC,IAAI,CAAC;QAIlD,cAAQ,GAAG,KAAK,CAAC;QAIjB,UAAI,GAAwB,EAAE,CAAC;QAI/B,eAAS,G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BACZ,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,eAAe;aAClB;YACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;YAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAChC,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACpBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["ng://@taiga-ui/core/components/button/button-options.ts","ng://@taiga-ui/core/components/button/button.component.ts","ng://@taiga-ui/core/components/button/button.module.ts","ng://@taiga-ui/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n readonly appearance:\n | TuiAppearance\n | string\n | keyof Record<TuiAppearance, string>\n | null; // TODO: 3.0 need remove `null`\n readonly shape: 'rounded' | 'square' | null; // TODO: 3.0 need remove `null`\n}\n\n/**\n * @deprecated: use TuiButtonOptions instead\n * todo: remove in 3.0\n */\nexport type ButtonOptions = TuiButtonOptions;\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\nexport const TUI_BUTTON_OPTIONS = new InjectionToken<TuiButtonOptions>(\n `Default parameters for button component`,\n {\n factory: () => TUI_BUTTON_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiButtonOptionsProvider: (\n options: Partial<TuiButtonOptions>,\n) => ValueProvider = (options: Partial<TuiButtonOptions>) => ({\n provide: TUI_BUTTON_OPTIONS,\n useValue: {...TUI_BUTTON_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n pressedObservable,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_TAKE_ONLY_TRUSTED_EVENTS,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiHoveredService,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, takeUntil} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button-options';\n\n@Component({\n selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiButtonComponent),\n },\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n @tuiDefaultProp()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n icon: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n iconRight: PolymorpheusContent = '';\n\n @Input()\n @HostBinding('attr.data-shape')\n @tuiDefaultProp()\n shape = this.options.shape;\n\n @Input()\n @HostBinding('class._loading')\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TAKE_ONLY_TRUSTED_EVENTS)\n private readonly takeOnlyTrustedEvents: boolean,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n\n hoveredService\n .createHovered$(elementRef.nativeElement)\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(hovered => {\n this.updateHovered(hovered);\n });\n pressedObservable(elementRef.nativeElement, {\n onlyTrusted: this.takeOnlyTrustedEvents,\n })\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(pressed => {\n this.updatePressed(pressed);\n });\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && isNativeFocused(this.elementRef.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n\n @HostBinding('attr.data-appearance')\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || '');\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;IAoBa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,UAAU;EACZ;IAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA;CAC5C,EACH;IAEW,wBAAwB,GAEhB,UAAC,OAAkC,IAAK,QAAC;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,wBAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;;ICUW,sCAAsB;IA0C9B,4BAGqB,IAA6B,EACT,UAAmC,EACxC,aAAqC,EAC1C,cAAiC,EACjC,QAA0B,EAC1B,iBAAoC,EAE9C,qBAA8B,EACF,OAAyB;;QAX1E,YAaI,iBAAO,SAkBV;QA5BoB,UAAI,GAAJ,IAAI,CAAyB;QACT,gBAAU,GAAV,UAAU,CAAyB;QAMvD,2BAAqB,GAArB,qBAAqB,CAAS;QACF,aAAO,GAAP,OAAO,CAAkB;QAlDzD,WAAK,GAAwB,OAAA,KAAI,CAAC,IAAI,0CAAE,OAAO,KAAI,KAAK,CAAC;QAI1E,gBAAU,GAAmC,IAAI,CAAC;QAIlD,cAAQ,GAAG,KAAK,CAAC;QAIjB,UAAI,GAAwB,EAAE,CAAC;QAI/B,eAAS,GAAw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,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,eAAe;aAClB;YACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;YAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAChC,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACpBA;;;;;;"}
|
|
@@ -129,7 +129,7 @@ var TuiCalendarComponent = /** @class */ (function () {
|
|
|
129
129
|
], TuiCalendarComponent.prototype, "hoveredItemChange", void 0);
|
|
130
130
|
TuiCalendarComponent = __decorate([
|
|
131
131
|
Component({
|
|
132
|
-
selector:
|
|
132
|
+
selector: 'tui-calendar',
|
|
133
133
|
template: "<tui-scrollbar\n *ngIf=\"year; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n automation-id=\"tui-calendar__year\"\n [min]=\"min\"\n [max]=\"max\"\n [initialItem]=\"year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-primitive-year-month-pagination\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [min]=\"computedMinViewedMonth\"\n [max]=\"computedMaxViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick($event)\"\n ></tui-primitive-year-month-pagination>\n <tui-primitive-calendar\n automation-id=\"tui-calendar__calendar\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n [month]=\"month\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper:min:max\"\n [markerHandler]=\"markerHandler\"\n [hoveredItem]=\"hoveredItem\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar>\n</ng-template>\n",
|
|
134
134
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
135
135
|
styles: [":host{display:block;height:18.25rem;width:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar{height:18.25rem;width:16.875rem}.t-pagination{margin-bottom:1rem}"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-calendar.js","sources":["ng://@taiga-ui/core/components/calendar/calendar.component.ts","ng://@taiga-ui/core/components/calendar/calendar.module.ts","ng://@taiga-ui/core/components/calendar/taiga-ui-core-components-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n nullableSame,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMapper,\n TuiMonth,\n TuiYear,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiWithOptionalMinMax} from '@taiga-ui/core/interfaces';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\n// @dynamic\n@Component({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-calendar.js","sources":["ng://@taiga-ui/core/components/calendar/calendar.component.ts","ng://@taiga-ui/core/components/calendar/calendar.module.ts","ng://@taiga-ui/core/components/calendar/taiga-ui-core-components-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n nullableSame,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMapper,\n TuiMonth,\n TuiYear,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiWithOptionalMinMax} from '@taiga-ui/core/interfaces';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\n// @dynamic\n@Component({\n selector: 'tui-calendar',\n templateUrl: './calendar.template.html',\n styleUrls: ['./calendar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiCalendarComponent implements TuiWithOptionalMinMax<TuiDay> {\n @Input()\n @tuiDefaultProp()\n month: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n value: TuiDay | TuiDayRange | null = null;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n min = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n max = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n minViewedMonth: TuiMonth = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n maxViewedMonth: TuiMonth = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n hoveredItem: TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n showAdjacent = true;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Output()\n readonly dayClick = new EventEmitter<TuiDay>();\n\n @Output()\n readonly monthChange = new EventEmitter<TuiMonth>();\n\n @Output()\n readonly hoveredItemChange = new EventEmitter<TuiDay | null>();\n\n year: TuiYear | null = null;\n\n readonly disabledItemHandlerMapper: TuiMapper<\n TuiBooleanHandler<TuiDay>,\n TuiBooleanHandler<TuiDay>\n > = (disabledItemHandler, min: TuiDay, max: TuiDay) => item =>\n item.dayBefore(min) || item.dayAfter(max) || disabledItemHandler(item);\n\n get computedMinViewedMonth(): TuiMonth {\n return this.minViewedMonth.monthSameOrAfter(this.min)\n ? this.minViewedMonth\n : this.min;\n }\n\n get computedMaxViewedMonth(): TuiMonth {\n return this.maxViewedMonth.monthSameOrBefore(this.max)\n ? this.maxViewedMonth\n : this.max;\n }\n\n onPaginationYearClick(year: TuiYear): void {\n this.year = year;\n }\n\n onPickerYearClick({year}: TuiYear): void {\n this.year = null;\n this.updateViewedMonth(new TuiMonth(year, this.month.month));\n }\n\n onPaginationValueChange(month: TuiMonth): void {\n this.updateViewedMonth(month);\n }\n\n onDayClick(day: TuiDay): void {\n this.dayClick.emit(day);\n }\n\n onHoveredItemChange(day: TuiDay | null): void {\n this.updateHoveredDay(day);\n }\n\n private updateViewedMonth(month: TuiMonth): void {\n if (this.month.monthSame(month)) {\n return;\n }\n\n this.month = month;\n this.monthChange.emit(month);\n }\n\n private updateHoveredDay(day: TuiDay | null): void {\n if (nullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiPrimitiveCalendarModule} from '@taiga-ui/core/components/primitive-calendar';\nimport {TuiPrimitiveYearPickerModule} from '@taiga-ui/core/components/primitive-year-picker';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiPrimitiveYearMonthPaginationModule} from '@taiga-ui/core/internal/primitive-year-month-pagination';\n\nimport {TuiCalendarComponent} from './calendar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiPrimitiveYearMonthPaginationModule,\n TuiPrimitiveCalendarModule,\n TuiPrimitiveYearPickerModule,\n TuiScrollbarModule,\n TuiMapperPipeModule,\n ],\n declarations: [TuiCalendarComponent],\n exports: [TuiCalendarComponent],\n})\nexport class TuiCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAwBA;;IAOA;QAGI,UAAK,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QAI1C,UAAK,GAAgC,IAAI,CAAC;QAI1C,wBAAmB,GAA8B,oBAAoB,CAAC;QAItE,QAAG,GAA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AIlC;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;8DACG;IAIpB;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;+DAC4C;IAG7D;QADC,MAAM,EAAE;0DACsC;IAG/C;QADC,MAAM,EAAE;6DAC2C;IAGpD;QADC,MAAM,EAAE;mEACsD;IAhDtD,oBAAoB;QANhC,SAAS,CAAC;YACP,QAAQ,EAAE,cAAc;YACxB,80CAAuC;YAEvC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;SAClD,CAAC;OACW,oBAAoB,CA4GhC;IAAD,2BAAC;CA5GD;;;ICTA;KAAiC;IAApB,iBAAiB;QAZ7B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,qCAAqC;gBACrC,0BAA0B;gBAC1B,4BAA4B;gBAC5B,kBAAkB;gBAClB,mBAAmB;aACtB;YACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACtBA;;;;;;"}
|
|
@@ -24,8 +24,8 @@ var TuiOptionComponent = /** @class */ (function () {
|
|
|
24
24
|
this.elementRef = elementRef;
|
|
25
25
|
this.host = host;
|
|
26
26
|
this.dropdown = dropdown;
|
|
27
|
-
this.size =
|
|
28
|
-
this.role =
|
|
27
|
+
this.size = 'm';
|
|
28
|
+
this.role = 'option';
|
|
29
29
|
this.disabled = false;
|
|
30
30
|
}
|
|
31
31
|
Object.defineProperty(TuiOptionComponent.prototype, "active", {
|
|
@@ -58,12 +58,12 @@ var TuiOptionComponent = /** @class */ (function () {
|
|
|
58
58
|
]; };
|
|
59
59
|
__decorate([
|
|
60
60
|
Input(),
|
|
61
|
-
HostBinding(
|
|
61
|
+
HostBinding('attr.data-size'),
|
|
62
62
|
tuiDefaultProp()
|
|
63
63
|
], TuiOptionComponent.prototype, "size", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
Input(),
|
|
66
|
-
HostBinding(
|
|
66
|
+
HostBinding('attr.role'),
|
|
67
67
|
tuiDefaultProp()
|
|
68
68
|
], TuiOptionComponent.prototype, "role", void 0);
|
|
69
69
|
__decorate([
|
|
@@ -74,25 +74,25 @@ var TuiOptionComponent = /** @class */ (function () {
|
|
|
74
74
|
Input()
|
|
75
75
|
], TuiOptionComponent.prototype, "value", void 0);
|
|
76
76
|
__decorate([
|
|
77
|
-
HostBinding(
|
|
77
|
+
HostBinding('class._with-dropdown')
|
|
78
78
|
], TuiOptionComponent.prototype, "active", null);
|
|
79
79
|
__decorate([
|
|
80
|
-
HostListener(
|
|
80
|
+
HostListener('click')
|
|
81
81
|
], TuiOptionComponent.prototype, "onClick", null);
|
|
82
82
|
__decorate([
|
|
83
83
|
shouldCall(shouldFocus),
|
|
84
|
-
HostListener(
|
|
85
|
-
HostListener(
|
|
84
|
+
HostListener('mousemove.init', ['$event']),
|
|
85
|
+
HostListener('mousemove.silent', ['$event'])
|
|
86
86
|
], TuiOptionComponent.prototype, "onMouseMove", null);
|
|
87
87
|
TuiOptionComponent = __decorate([
|
|
88
88
|
Component({
|
|
89
|
-
selector:
|
|
89
|
+
selector: 'button[tuiOption], a[tuiOption]',
|
|
90
90
|
template: "<span\n *ngIf=\"content; else base\"\n polymorpheus-outlet\n class=\"t-content\"\n [content]=\"content\"\n [context]=\"{$implicit: base}\"\n></span>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"t-arrow\"\n ></tui-svg>\n</ng-template>\n",
|
|
91
91
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
92
92
|
host: {
|
|
93
|
-
tabIndex:
|
|
94
|
-
type:
|
|
95
|
-
'[attr.disabled]':
|
|
93
|
+
tabIndex: '-1',
|
|
94
|
+
type: 'button',
|
|
95
|
+
'[attr.disabled]': 'disabled || null',
|
|
96
96
|
},
|
|
97
97
|
styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:padding-box;font-size:inherit;line-height:inherit;transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;font:var(--tui-font-text-m);width:100%;align-items:center;justify-content:space-between;text-align:left;box-sizing:border-box;color:var(--tui-text-01);outline:0;text-decoration:none;cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host._with-dropdown,:host:focus{background-color:var(--tui-base-02)}:host[data-size=xs]{font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .75rem}:host[data-size='s']{min-height:2rem;padding:.3125rem .75rem}:host[data-size='m']{min-height:2.75rem;padding:.375rem 1rem}:host[data-size='l']{min-height:3.5rem;padding:.75rem 1rem}.t-content{display:flex;flex:1;max-width:100%}.t-arrow{margin:0 -.5rem 0 .75rem}"]
|
|
98
98
|
}),
|
|
@@ -116,8 +116,8 @@ var TuiDataListComponent = /** @class */ (function () {
|
|
|
116
116
|
this.elementRef = elementRef;
|
|
117
117
|
this.defaultEmptyContent$ = defaultEmptyContent$;
|
|
118
118
|
this.options = EMPTY_QUERY;
|
|
119
|
-
this.role =
|
|
120
|
-
this.emptyContent =
|
|
119
|
+
this.role = 'listbox';
|
|
120
|
+
this.emptyContent = '';
|
|
121
121
|
}
|
|
122
122
|
TuiDataListComponent_1 = TuiDataListComponent;
|
|
123
123
|
Object.defineProperty(TuiDataListComponent.prototype, "empty$", {
|
|
@@ -170,7 +170,7 @@ var TuiDataListComponent = /** @class */ (function () {
|
|
|
170
170
|
};
|
|
171
171
|
Object.defineProperty(TuiDataListComponent.prototype, "elements", {
|
|
172
172
|
get: function () {
|
|
173
|
-
return Array.from(this.elementRef.nativeElement.querySelectorAll(
|
|
173
|
+
return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));
|
|
174
174
|
},
|
|
175
175
|
enumerable: true,
|
|
176
176
|
configurable: true
|
|
@@ -185,7 +185,7 @@ var TuiDataListComponent = /** @class */ (function () {
|
|
|
185
185
|
], TuiDataListComponent.prototype, "options", void 0);
|
|
186
186
|
__decorate([
|
|
187
187
|
Input(),
|
|
188
|
-
HostBinding(
|
|
188
|
+
HostBinding('attr.role'),
|
|
189
189
|
tuiDefaultProp()
|
|
190
190
|
], TuiDataListComponent.prototype, "role", void 0);
|
|
191
191
|
__decorate([
|
|
@@ -196,22 +196,22 @@ var TuiDataListComponent = /** @class */ (function () {
|
|
|
196
196
|
tuiPure
|
|
197
197
|
], TuiDataListComponent.prototype, "empty$", null);
|
|
198
198
|
__decorate([
|
|
199
|
-
HostListener(
|
|
199
|
+
HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])
|
|
200
200
|
], TuiDataListComponent.prototype, "onFocusIn", null);
|
|
201
201
|
__decorate([
|
|
202
|
-
HostListener(
|
|
202
|
+
HostListener('mousedown.prevent')
|
|
203
203
|
], TuiDataListComponent.prototype, "noop", null);
|
|
204
204
|
__decorate([
|
|
205
|
-
HostListener(
|
|
206
|
-
HostListener(
|
|
205
|
+
HostListener('keydown.arrowDown.prevent', ['$event.target', '1']),
|
|
206
|
+
HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])
|
|
207
207
|
], TuiDataListComponent.prototype, "onKeyDownArrow", null);
|
|
208
208
|
__decorate([
|
|
209
|
-
HostListener(
|
|
210
|
-
HostListener(
|
|
209
|
+
HostListener('wheel.silent.passive'),
|
|
210
|
+
HostListener('mouseleave', ['$event.target'])
|
|
211
211
|
], TuiDataListComponent.prototype, "handleFocusLossIfNecessary", null);
|
|
212
212
|
TuiDataListComponent = TuiDataListComponent_1 = __decorate([
|
|
213
213
|
Component({
|
|
214
|
-
selector:
|
|
214
|
+
selector: 'tui-data-list',
|
|
215
215
|
template: "<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n polymorpheus-outlet\n class=\"t-empty\"\n [content]=\"emptyContent || (defaultEmptyContent$ | async)\"\n></div>\n<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n",
|
|
216
216
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
217
217
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -234,7 +234,7 @@ var TuiDataListDirective = /** @class */ (function () {
|
|
|
234
234
|
}
|
|
235
235
|
TuiDataListDirective = __decorate([
|
|
236
236
|
Directive({
|
|
237
|
-
selector:
|
|
237
|
+
selector: 'ng-template[tuiDataList]',
|
|
238
238
|
})
|
|
239
239
|
], TuiDataListDirective);
|
|
240
240
|
return TuiDataListDirective;
|
|
@@ -262,8 +262,8 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
262
262
|
return EMPTY;
|
|
263
263
|
}
|
|
264
264
|
var nativeElement = dropdown.dropdownBoxRef.location.nativeElement;
|
|
265
|
-
var mouseEnter$ = typedFromEvent(nativeElement,
|
|
266
|
-
var esc$ = merge(typedFromEvent(element.nativeElement,
|
|
265
|
+
var mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(take(1));
|
|
266
|
+
var esc$ = merge(typedFromEvent(element.nativeElement, 'keydown'), typedFromEvent(nativeElement, 'keydown')).pipe(filter(function (_a) {
|
|
267
267
|
var keyCode = _a.keyCode;
|
|
268
268
|
return keyCode === 27;
|
|
269
269
|
}));
|
|
@@ -292,7 +292,7 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
292
292
|
get: function () {
|
|
293
293
|
return this.elements$.pipe(switchMap(function (elements) {
|
|
294
294
|
return merge.apply(void 0, __spread(elements.map(function (element, index) {
|
|
295
|
-
return typedFromEvent(element,
|
|
295
|
+
return typedFromEvent(element, 'keydown').pipe(filter(function (_a) {
|
|
296
296
|
var keyCode = _a.keyCode;
|
|
297
297
|
return keyCode === 39;
|
|
298
298
|
}), preventDefault(), mapTo(index));
|
|
@@ -306,7 +306,7 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
306
306
|
get: function () {
|
|
307
307
|
return this.elements$.pipe(switchMap(function (elements) {
|
|
308
308
|
return merge.apply(void 0, __spread(elements.map(function (element, index) {
|
|
309
|
-
return typedFromEvent(element,
|
|
309
|
+
return typedFromEvent(element, 'click').pipe(mapTo(index));
|
|
310
310
|
})));
|
|
311
311
|
}));
|
|
312
312
|
},
|
|
@@ -318,12 +318,12 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
318
318
|
var _this = this;
|
|
319
319
|
return this.elements$.pipe(switchMap(function (elements) {
|
|
320
320
|
return merge.apply(void 0, __spread(elements.map(function (element, index) {
|
|
321
|
-
return merge(typedFromEvent(element,
|
|
321
|
+
return merge(typedFromEvent(element, 'focus'), typedFromEvent(element, 'blur')).pipe(filter(function (_a) {
|
|
322
322
|
var relatedTarget = _a.relatedTarget;
|
|
323
323
|
return _this.notInDropdown(relatedTarget, index);
|
|
324
324
|
}), map(function (_a) {
|
|
325
325
|
var type = _a.type;
|
|
326
|
-
return (type ===
|
|
326
|
+
return (type === 'focus' ? index : NaN);
|
|
327
327
|
}));
|
|
328
328
|
})));
|
|
329
329
|
}), debounceTime(300));
|
|
@@ -332,10 +332,9 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
332
332
|
configurable: true
|
|
333
333
|
});
|
|
334
334
|
TuiDataListDropdownManagerDirective.prototype.notInDropdown = function (element, index) {
|
|
335
|
+
var _a;
|
|
335
336
|
var dropdown = this.dropdowns.toArray()[index];
|
|
336
|
-
return (
|
|
337
|
-
!dropdown.dropdownBoxRef ||
|
|
338
|
-
!dropdown.dropdownBoxRef.location.nativeElement.contains(element));
|
|
337
|
+
return !((_a = dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(element));
|
|
339
338
|
};
|
|
340
339
|
TuiDataListDropdownManagerDirective.prototype.tryToFocus = function (index) {
|
|
341
340
|
var _a;
|
|
@@ -369,7 +368,7 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
369
368
|
], TuiDataListDropdownManagerDirective.prototype, "debounce$", null);
|
|
370
369
|
TuiDataListDropdownManagerDirective = __decorate([
|
|
371
370
|
Directive({
|
|
372
|
-
selector:
|
|
371
|
+
selector: 'tui-data-list[tuiDataListDropdownManager]',
|
|
373
372
|
})
|
|
374
373
|
], TuiDataListDropdownManagerDirective);
|
|
375
374
|
return TuiDataListDropdownManagerDirective;
|
|
@@ -377,18 +376,18 @@ var TuiDataListDropdownManagerDirective = /** @class */ (function () {
|
|
|
377
376
|
|
|
378
377
|
var TuiOptGroupDirective = /** @class */ (function () {
|
|
379
378
|
function TuiOptGroupDirective() {
|
|
380
|
-
this.label =
|
|
379
|
+
this.label = '';
|
|
381
380
|
}
|
|
382
381
|
__decorate([
|
|
383
382
|
Input(),
|
|
384
|
-
HostBinding(
|
|
383
|
+
HostBinding('attr.data-label'),
|
|
385
384
|
tuiDefaultProp()
|
|
386
385
|
], TuiOptGroupDirective.prototype, "label", void 0);
|
|
387
386
|
TuiOptGroupDirective = __decorate([
|
|
388
387
|
Directive({
|
|
389
|
-
selector:
|
|
388
|
+
selector: 'tui-opt-group',
|
|
390
389
|
host: {
|
|
391
|
-
role:
|
|
390
|
+
role: 'group',
|
|
392
391
|
},
|
|
393
392
|
})
|
|
394
393
|
], TuiOptGroupDirective);
|