@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
|
@@ -37,4 +37,4 @@ export function innerHTML(documentRef) {
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5uZXItaHRtbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL3V0aWxzL3BvbHlmaWxscy8iLCJzb3VyY2VzIjpbImlubmVyLWh0bWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLHNCQUFzQixFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRXJEOzs7R0FHRztBQUNILGdFQUFnRTtBQUNoRSxNQUFNLFVBQVUsU0FBUyxDQUFDLFdBQXFCO0lBQzNDLElBQU0sR0FBRyxHQUFHLFdBQVcsQ0FBQyxlQUFlLENBQUMsNEJBQTRCLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFFN0UsSUFBSSxHQUFHLENBQUMsU0FBUyxLQUFLLFNBQVMsRUFBRTtRQUM3QixPQUFPO0tBQ1Y7SUFFRCxJQUFNLFVBQVUsR0FBRyxJQUFJLGFBQWEsRUFBRSxDQUFDO0lBQ3ZDLElBQU0sTUFBTSxHQUFHLElBQUksU0FBUyxFQ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aWJsaW5nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0LmpvaW4oYGApO1xuICAgICAgICB9LFxuICAgICAgICBzZXQodGhpczogU1ZHRWxlbWVudCwgdGV4dDogc3RyaW5nKSB7XG4gICAgICAgICAgICB3aGlsZSAodGhpcy5maXJzdENoaWxkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVDaGlsZCh0aGlzLmZpcnN0Q2hpbGQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN2Z0RvY0VsZW1lbnQgPSBwYXJzZXIucGFyc2VGcm9tU3RyaW5nKFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LFxuICAgICAgICAgICAgICAgICAgICBgaW1hZ2Uvc3ZnK3htbGAsXG4gICAgICAgICAgICAgICAgKS5kb2N1bWVudEVsZW1lbnQ7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vd25lckRvY3VtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYXBwZW5kQ2hpbGQodGhpcy5vd25lckRvY3VtZW50LmltcG9ydE5vZGUoc3ZnRG9jRWxlbWVudCwgdHJ1ZSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHVpWG1sUGFyc2luZ0V4Y2VwdGlvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgIH0pO1xufVxuIl19
|
|
@@ -161,7 +161,9 @@ const TUI_ABSTRACT_HINT_DEFAULT_OPTIONS = {
|
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
// @dynamic
|
|
164
|
-
let TuiAbstractTextfieldHost =
|
|
164
|
+
let TuiAbstractTextfieldHost =
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
166
|
+
class TuiAbstractTextfieldHost {
|
|
165
167
|
constructor(host) {
|
|
166
168
|
this.host = host;
|
|
167
169
|
}
|
|
@@ -186,7 +188,9 @@ TuiAbstractTextfieldHost.ctorParameters = () => [
|
|
|
186
188
|
{ type: undefined, decorators: [{ type: Inject, args: [AbstractTuiControl,] }] }
|
|
187
189
|
];
|
|
188
190
|
TuiAbstractTextfieldHost = __decorate([
|
|
189
|
-
Directive()
|
|
191
|
+
Directive()
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
193
|
+
,
|
|
190
194
|
__param(0, Inject(AbstractTuiControl))
|
|
191
195
|
], TuiAbstractTextfieldHost);
|
|
192
196
|
|
|
@@ -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;IAEsB,mBAAmB,GAAzC,MAAsB,mBAAmB;IAuCrC,YACqB,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,WAAW;QACP,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAC3B;I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;EACJ;;YAnBsC,UAAU;YACT,cAAc;YACzB,sBAAsB;;;AAX/C;IAFC,KAAK,CAAC,aAAa,CAAC;IACpB,cAAc,EAAE;6CACwC;AAIzD;IAFC,KAAK,CAAC,kBAAkB,CAAC;IACzB,cAAc,EAAE;kDACuD;AAPtD,eAAe;IADpC,SAAS,EAAE;GACU,eAAe,CA+BpC;;AChCD;MACa,iCAAiC,GAA2B;IACrE,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,aAAa;;;ACN5B;IAEsB,wBAAwB,GAA9C,MAAsB,wBAAwB;IAG1C,YAA2D,IAAO;QAAP,SAAI,GAAJ,IAAI,CAAG;KAAI;IAEtE,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC7B;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;KACrC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;KACpC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;KACtC;IAED,IAAI,KAAK;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAClC;IAID,OAAO,CAAC,MAAwB,KAAU;EAC7C;;4CAzBgB,MAAM,SAAC,kBAAkB;;AAHpB,wBAAwB;IAD7C,SAAS,EAAE;IAIK,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;GAHrB,wBAAwB,CA4B7C;;AClCD;;;;;;"}
|
|
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: 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 index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA6BA;IAEsB,mBAAmB,GAAzC,MAAsB,mBAAmB;IAuCrC,YACqB,wBAAkD,EAClD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T,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;KACtC;IAED,IAAI,KAAK;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAClC;IAID,OAAO,CAAC,MAAwB,KAAU;EAC7C;;4CAzBgB,MAAM,SAAC,kBAAkB;;AAHpB,wBAAwB;IAF7C,SAAS,EAAE;;;IAKK,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;GAHrB,wBAAwB,CA4B7C;;ACnCD;;;;;;"}
|
|
@@ -18,10 +18,10 @@ let TuiAlertComponent = class TuiAlertComponent {
|
|
|
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 = Object.assign({ value:
|
|
24
|
+
this.animation = Object.assign({ value: '' }, this.animationOptions);
|
|
25
25
|
}
|
|
26
26
|
ngOnInit() {
|
|
27
27
|
this.initAutoClose();
|
|
@@ -54,9 +54,9 @@ let TuiAlertComponent = class TuiAlertComponent {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
timer(isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime)
|
|
57
|
-
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement,
|
|
57
|
+
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),
|
|
58
58
|
// eslint-disable-next-line rxjs/no-ignored-notifier
|
|
59
|
-
repeatWhen(() => fromEvent(this.elementRef.nativeElement,
|
|
59
|
+
repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')), takeUntil(this.destroy$))
|
|
60
60
|
.subscribe(() => this.closeNotification());
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -68,21 +68,21 @@ TuiAlertComponent.ctorParameters = () => [
|
|
|
68
68
|
{ type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
|
|
69
69
|
];
|
|
70
70
|
__decorate([
|
|
71
|
-
HostBinding(
|
|
72
|
-
HostBinding(
|
|
73
|
-
HostBinding(
|
|
71
|
+
HostBinding('@tuiFadeIn'),
|
|
72
|
+
HostBinding('@tuiSlideInRight'),
|
|
73
|
+
HostBinding('@tuiHeightCollapse')
|
|
74
74
|
], TuiAlertComponent.prototype, "animation", void 0);
|
|
75
75
|
__decorate([
|
|
76
76
|
tuiPure
|
|
77
77
|
], TuiAlertComponent.prototype, "calculateContext", null);
|
|
78
78
|
TuiAlertComponent = __decorate([
|
|
79
79
|
Component({
|
|
80
|
-
selector:
|
|
80
|
+
selector: 'tui-alert',
|
|
81
81
|
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",
|
|
82
82
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
83
83
|
providers: [TuiDestroyService],
|
|
84
84
|
animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],
|
|
85
|
-
host: { role:
|
|
85
|
+
host: { role: 'alert' },
|
|
86
86
|
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}"]
|
|
87
87
|
}),
|
|
88
88
|
__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;IAUa,iBAAiB,GAA9B,MAAa,iBAAiB;IAW1B,YACyC,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,gBAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,gBAAgB,C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hB,eAAe,CAU3B;AAED;IAEa,uBAAuB,GAApC,MAAa,uBAAuB;IAChC,YAAsD,KAAsB;QAAtB,UAAK,GAAL,KAAK,CAAiB;KAAI;IAahF,IAAI,CACA,OAAiE,EACjE,UAAsE,EAAE;QAExE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAc,EAAE,OAAO,CAA6B,CAAC;KAC/E;EACJ;;YAnBgE,eAAe,uBAA/D,MAAM,SAAC,eAAe;;;AAD1B,uBAAuB;IADnC,UAAU,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC;IAEhB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;GAD3B,uBAAuB,CAoBnC;;IC1BY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAb1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;QAClE,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;QAC5B,eAAe,EAAE,CAAC,iBAAiB,CAAC;QACpC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,eAAe;gBAC5B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,cAAc,CAAG;AAE9B;IAEa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;GACzB,sBAAsB,CAAG;;AC1BtC;;;;;;"}
|
|
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;IAUa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,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,eAAe;gBAC5B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,cAAc,CAAG;AAE9B;IAEa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;GACzB,sBAAsB,CAAG;;AC1BtC;;;;;;"}
|
|
@@ -35,8 +35,8 @@ let TuiButtonComponent = TuiButtonComponent_1 = class TuiButtonComponent extends
|
|
|
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;
|
|
@@ -65,14 +65,14 @@ let TuiButtonComponent = TuiButtonComponent_1 = class TuiButtonComponent extends
|
|
|
65
65
|
return !this.showLoader && isNativeFocused(this.elementRef.nativeElement);
|
|
66
66
|
}
|
|
67
67
|
get loaderSize() {
|
|
68
|
-
return this.size ===
|
|
68
|
+
return this.size === 'l' || this.size === 'xl' ? 'm' : 's';
|
|
69
69
|
}
|
|
70
70
|
get computedAppearance() {
|
|
71
71
|
var _a;
|
|
72
|
-
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance ||
|
|
72
|
+
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance || '');
|
|
73
73
|
}
|
|
74
74
|
get nativeDisabled() {
|
|
75
|
-
return this.computedDisabled || this.showLoader ?
|
|
75
|
+
return this.computedDisabled || this.showLoader ? '' : null;
|
|
76
76
|
}
|
|
77
77
|
get tabIndex() {
|
|
78
78
|
return this.focusable ? 0 : -1;
|
|
@@ -109,35 +109,35 @@ __decorate([
|
|
|
109
109
|
], TuiButtonComponent.prototype, "iconRight", void 0);
|
|
110
110
|
__decorate([
|
|
111
111
|
Input(),
|
|
112
|
-
HostBinding(
|
|
112
|
+
HostBinding('attr.data-shape'),
|
|
113
113
|
tuiDefaultProp()
|
|
114
114
|
], TuiButtonComponent.prototype, "shape", void 0);
|
|
115
115
|
__decorate([
|
|
116
116
|
Input(),
|
|
117
|
-
HostBinding(
|
|
117
|
+
HostBinding('class._loading'),
|
|
118
118
|
tuiDefaultProp()
|
|
119
119
|
], TuiButtonComponent.prototype, "showLoader", void 0);
|
|
120
120
|
__decorate([
|
|
121
121
|
Input(),
|
|
122
|
-
HostBinding(
|
|
122
|
+
HostBinding('attr.data-size'),
|
|
123
123
|
tuiDefaultProp()
|
|
124
124
|
], TuiButtonComponent.prototype, "size", void 0);
|
|
125
125
|
__decorate([
|
|
126
|
-
HostBinding(
|
|
126
|
+
HostBinding('attr.data-appearance')
|
|
127
127
|
], TuiButtonComponent.prototype, "computedAppearance", null);
|
|
128
128
|
__decorate([
|
|
129
|
-
HostBinding(
|
|
129
|
+
HostBinding('attr.disabled')
|
|
130
130
|
], TuiButtonComponent.prototype, "nativeDisabled", null);
|
|
131
131
|
__decorate([
|
|
132
|
-
HostBinding(
|
|
132
|
+
HostBinding('tabIndex')
|
|
133
133
|
], TuiButtonComponent.prototype, "tabIndex", null);
|
|
134
134
|
__decorate([
|
|
135
|
-
HostListener(
|
|
136
|
-
HostListener(
|
|
135
|
+
HostListener('focusin', ['true']),
|
|
136
|
+
HostListener('focusout', ['false'])
|
|
137
137
|
], TuiButtonComponent.prototype, "onFocused", null);
|
|
138
138
|
TuiButtonComponent = TuiButtonComponent_1 = __decorate([
|
|
139
139
|
Component({
|
|
140
|
-
selector:
|
|
140
|
+
selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',
|
|
141
141
|
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",
|
|
142
142
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
143
|
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":";;;;;;;;;;;;MAoBa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,UAAU;EACZ;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;;ICSY,kBAAkB,0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,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,4BAA4B,CAAC,CAAA;IAEpC,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;GAtDtB,kBAAkB,CA4G9B;;ICvIY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAX3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;SAClB;QACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACpB/B;;;;;;"}
|
|
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":";;;;;;;;;;;;MAoBa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,UAAU;EACZ;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;IAC1D,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;;ICSY,kBAAkB,0BAA/B,MAAa,kBACT,SAAQ,sBAAsB;IA0C9B,YAGqB,IAA6B,EACT,UAAmC,EACxC,aAAqC,EAC1C,cAAiC,EACjC,QAA0B,EAC1B,iBAAoC,EAE9C,qBAA8B,EACF,OAAyB;;QAEtE,KAAK,EAAE,CAAC;QAVS,SAAI,GAAJ,IAAI,CAAyB;Q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GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAX3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;SAClB;QACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACpB/B;;;;;;"}
|
|
@@ -119,7 +119,7 @@ __decorate([
|
|
|
119
119
|
], TuiCalendarComponent.prototype, "hoveredItemChange", void 0);
|
|
120
120
|
TuiCalendarComponent = __decorate([
|
|
121
121
|
Component({
|
|
122
|
-
selector:
|
|
122
|
+
selector: 'tui-calendar',
|
|
123
123
|
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",
|
|
124
124
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
125
125
|
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,oBAAoB,GAAjC,MAAa,oBAAoB;IAAjC;QAGI,UAAK,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QA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G;AAIpB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;2DAC4C;AAG7D;IADC,MAAM,EAAE;sDACsC;AAG/C;IADC,MAAM,EAAE;yDAC2C;AAGpD;IADC,MAAM,EAAE;+DACsD;AAhDtD,oBAAoB;IANhC,SAAS,CAAC;QACP,QAAQ,EAAE,cAAc;QACxB,80CAAuC;QAEvC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;GACW,oBAAoB,CA4GhC;;ICrHY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAZ7B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,qCAAqC;YACrC,0BAA0B;YAC1B,4BAA4B;YAC5B,kBAAkB;YAClB,mBAAmB;SACtB;QACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAClC,CAAC;GACW,iBAAiB,CAAG;;ACtBjC;;;;;;"}
|
|
@@ -23,8 +23,8 @@ let TuiOptionComponent = class TuiOptionComponent {
|
|
|
23
23
|
this.elementRef = elementRef;
|
|
24
24
|
this.host = host;
|
|
25
25
|
this.dropdown = dropdown;
|
|
26
|
-
this.size =
|
|
27
|
-
this.role =
|
|
26
|
+
this.size = 'm';
|
|
27
|
+
this.role = 'option';
|
|
28
28
|
this.disabled = false;
|
|
29
29
|
}
|
|
30
30
|
get active() {
|
|
@@ -53,12 +53,12 @@ TuiOptionComponent.ctorParameters = () => [
|
|
|
53
53
|
];
|
|
54
54
|
__decorate([
|
|
55
55
|
Input(),
|
|
56
|
-
HostBinding(
|
|
56
|
+
HostBinding('attr.data-size'),
|
|
57
57
|
tuiDefaultProp()
|
|
58
58
|
], TuiOptionComponent.prototype, "size", void 0);
|
|
59
59
|
__decorate([
|
|
60
60
|
Input(),
|
|
61
|
-
HostBinding(
|
|
61
|
+
HostBinding('attr.role'),
|
|
62
62
|
tuiDefaultProp()
|
|
63
63
|
], TuiOptionComponent.prototype, "role", void 0);
|
|
64
64
|
__decorate([
|
|
@@ -69,25 +69,25 @@ __decorate([
|
|
|
69
69
|
Input()
|
|
70
70
|
], TuiOptionComponent.prototype, "value", void 0);
|
|
71
71
|
__decorate([
|
|
72
|
-
HostBinding(
|
|
72
|
+
HostBinding('class._with-dropdown')
|
|
73
73
|
], TuiOptionComponent.prototype, "active", null);
|
|
74
74
|
__decorate([
|
|
75
|
-
HostListener(
|
|
75
|
+
HostListener('click')
|
|
76
76
|
], TuiOptionComponent.prototype, "onClick", null);
|
|
77
77
|
__decorate([
|
|
78
78
|
shouldCall(shouldFocus),
|
|
79
|
-
HostListener(
|
|
80
|
-
HostListener(
|
|
79
|
+
HostListener('mousemove.init', ['$event']),
|
|
80
|
+
HostListener('mousemove.silent', ['$event'])
|
|
81
81
|
], TuiOptionComponent.prototype, "onMouseMove", null);
|
|
82
82
|
TuiOptionComponent = __decorate([
|
|
83
83
|
Component({
|
|
84
|
-
selector:
|
|
84
|
+
selector: 'button[tuiOption], a[tuiOption]',
|
|
85
85
|
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",
|
|
86
86
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
87
87
|
host: {
|
|
88
|
-
tabIndex:
|
|
89
|
-
type:
|
|
90
|
-
'[attr.disabled]':
|
|
88
|
+
tabIndex: '-1',
|
|
89
|
+
type: 'button',
|
|
90
|
+
'[attr.disabled]': 'disabled || null',
|
|
91
91
|
},
|
|
92
92
|
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}"]
|
|
93
93
|
}),
|
|
@@ -110,8 +110,8 @@ let TuiDataListComponent = TuiDataListComponent_1 = class TuiDataListComponent {
|
|
|
110
110
|
this.elementRef = elementRef;
|
|
111
111
|
this.defaultEmptyContent$ = defaultEmptyContent$;
|
|
112
112
|
this.options = EMPTY_QUERY;
|
|
113
|
-
this.role =
|
|
114
|
-
this.emptyContent =
|
|
113
|
+
this.role = 'listbox';
|
|
114
|
+
this.emptyContent = '';
|
|
115
115
|
}
|
|
116
116
|
get empty$() {
|
|
117
117
|
return itemsQueryListObservable(this.options).pipe(map(({ length }) => !length));
|
|
@@ -146,7 +146,7 @@ let TuiDataListComponent = TuiDataListComponent_1 = class TuiDataListComponent {
|
|
|
146
146
|
this.handleFocusLossIfNecessary(target);
|
|
147
147
|
}
|
|
148
148
|
get elements() {
|
|
149
|
-
return Array.from(this.elementRef.nativeElement.querySelectorAll(
|
|
149
|
+
return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
TuiDataListComponent.ctorParameters = () => [
|
|
@@ -158,7 +158,7 @@ __decorate([
|
|
|
158
158
|
], TuiDataListComponent.prototype, "options", void 0);
|
|
159
159
|
__decorate([
|
|
160
160
|
Input(),
|
|
161
|
-
HostBinding(
|
|
161
|
+
HostBinding('attr.role'),
|
|
162
162
|
tuiDefaultProp()
|
|
163
163
|
], TuiDataListComponent.prototype, "role", void 0);
|
|
164
164
|
__decorate([
|
|
@@ -169,22 +169,22 @@ __decorate([
|
|
|
169
169
|
tuiPure
|
|
170
170
|
], TuiDataListComponent.prototype, "empty$", null);
|
|
171
171
|
__decorate([
|
|
172
|
-
HostListener(
|
|
172
|
+
HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])
|
|
173
173
|
], TuiDataListComponent.prototype, "onFocusIn", null);
|
|
174
174
|
__decorate([
|
|
175
|
-
HostListener(
|
|
175
|
+
HostListener('mousedown.prevent')
|
|
176
176
|
], TuiDataListComponent.prototype, "noop", null);
|
|
177
177
|
__decorate([
|
|
178
|
-
HostListener(
|
|
179
|
-
HostListener(
|
|
178
|
+
HostListener('keydown.arrowDown.prevent', ['$event.target', '1']),
|
|
179
|
+
HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])
|
|
180
180
|
], TuiDataListComponent.prototype, "onKeyDownArrow", null);
|
|
181
181
|
__decorate([
|
|
182
|
-
HostListener(
|
|
183
|
-
HostListener(
|
|
182
|
+
HostListener('wheel.silent.passive'),
|
|
183
|
+
HostListener('mouseleave', ['$event.target'])
|
|
184
184
|
], TuiDataListComponent.prototype, "handleFocusLossIfNecessary", null);
|
|
185
185
|
TuiDataListComponent = TuiDataListComponent_1 = __decorate([
|
|
186
186
|
Component({
|
|
187
|
-
selector:
|
|
187
|
+
selector: 'tui-data-list',
|
|
188
188
|
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",
|
|
189
189
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
190
190
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -204,7 +204,7 @@ let TuiDataListDirective = class TuiDataListDirective {
|
|
|
204
204
|
};
|
|
205
205
|
TuiDataListDirective = __decorate([
|
|
206
206
|
Directive({
|
|
207
|
-
selector:
|
|
207
|
+
selector: 'ng-template[tuiDataList]',
|
|
208
208
|
})
|
|
209
209
|
], TuiDataListDirective);
|
|
210
210
|
|
|
@@ -229,8 +229,8 @@ let TuiDataListDropdownManagerDirective = class TuiDataListDropdownManagerDirect
|
|
|
229
229
|
return EMPTY;
|
|
230
230
|
}
|
|
231
231
|
const { nativeElement } = dropdown.dropdownBoxRef.location;
|
|
232
|
-
const mouseEnter$ = typedFromEvent(nativeElement,
|
|
233
|
-
const esc$ = merge(typedFromEvent(element.nativeElement,
|
|
232
|
+
const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(take(1));
|
|
233
|
+
const esc$ = merge(typedFromEvent(element.nativeElement, 'keydown'), typedFromEvent(nativeElement, 'keydown')).pipe(filter(({ keyCode }) => keyCode === 27));
|
|
234
234
|
return merge(mouseEnter$, esc$).pipe(tap(event => {
|
|
235
235
|
if (dropdown.dropdownBoxRef) {
|
|
236
236
|
event.stopPropagation();
|
|
@@ -246,19 +246,18 @@ let TuiDataListDropdownManagerDirective = class TuiDataListDropdownManagerDirect
|
|
|
246
246
|
return itemsQueryListObservable(this.elements).pipe(map(array => array.map(({ nativeElement }) => nativeElement)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
247
247
|
}
|
|
248
248
|
get right$() {
|
|
249
|
-
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => typedFromEvent(element,
|
|
249
|
+
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => typedFromEvent(element, 'keydown').pipe(filter(({ keyCode }) => keyCode === 39), preventDefault(), mapTo(index))))));
|
|
250
250
|
}
|
|
251
251
|
get immediate$() {
|
|
252
|
-
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => typedFromEvent(element,
|
|
252
|
+
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => typedFromEvent(element, 'click').pipe(mapTo(index))))));
|
|
253
253
|
}
|
|
254
254
|
get debounce$() {
|
|
255
|
-
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => merge(typedFromEvent(element,
|
|
255
|
+
return this.elements$.pipe(switchMap(elements => merge(...elements.map((element, index) => merge(typedFromEvent(element, 'focus'), typedFromEvent(element, 'blur')).pipe(filter(({ relatedTarget }) => this.notInDropdown(relatedTarget, index)), map(({ type }) => (type === 'focus' ? index : NaN)))))), debounceTime(300));
|
|
256
256
|
}
|
|
257
257
|
notInDropdown(element, index) {
|
|
258
|
+
var _a;
|
|
258
259
|
const dropdown = this.dropdowns.toArray()[index];
|
|
259
|
-
return (
|
|
260
|
-
!dropdown.dropdownBoxRef ||
|
|
261
|
-
!dropdown.dropdownBoxRef.location.nativeElement.contains(element));
|
|
260
|
+
return !((_a = dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(element));
|
|
262
261
|
}
|
|
263
262
|
tryToFocus(index) {
|
|
264
263
|
var _a;
|
|
@@ -293,25 +292,25 @@ __decorate([
|
|
|
293
292
|
], TuiDataListDropdownManagerDirective.prototype, "debounce$", null);
|
|
294
293
|
TuiDataListDropdownManagerDirective = __decorate([
|
|
295
294
|
Directive({
|
|
296
|
-
selector:
|
|
295
|
+
selector: 'tui-data-list[tuiDataListDropdownManager]',
|
|
297
296
|
})
|
|
298
297
|
], TuiDataListDropdownManagerDirective);
|
|
299
298
|
|
|
300
299
|
let TuiOptGroupDirective = class TuiOptGroupDirective {
|
|
301
300
|
constructor() {
|
|
302
|
-
this.label =
|
|
301
|
+
this.label = '';
|
|
303
302
|
}
|
|
304
303
|
};
|
|
305
304
|
__decorate([
|
|
306
305
|
Input(),
|
|
307
|
-
HostBinding(
|
|
306
|
+
HostBinding('attr.data-label'),
|
|
308
307
|
tuiDefaultProp()
|
|
309
308
|
], TuiOptGroupDirective.prototype, "label", void 0);
|
|
310
309
|
TuiOptGroupDirective = __decorate([
|
|
311
310
|
Directive({
|
|
312
|
-
selector:
|
|
311
|
+
selector: 'tui-opt-group',
|
|
313
312
|
host: {
|
|
314
|
-
role:
|
|
313
|
+
role: 'group',
|
|
315
314
|
},
|
|
316
315
|
})
|
|
317
316
|
], TuiOptGroupDirective);
|