@taiga-ui/core 3.51.0 → 3.52.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/taiga-ui-core-abstract.d.ts +3 -0
- package/animations/taiga-ui-core-animations.d.ts +3 -0
- package/bundles/taiga-ui-core-abstract.umd.js +9 -0
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.js +4 -0
- package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +16 -1
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +7 -0
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +4 -0
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +10 -0
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +12 -0
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +4 -0
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +5 -0
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +4 -0
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +8 -0
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +6 -0
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +4 -0
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +5 -0
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +10 -1
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +7 -0
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +7 -0
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +8 -0
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +4 -0
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +33 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -0
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +7 -1
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +5 -0
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +8 -0
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +9 -0
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +4 -0
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +4 -0
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.js +4 -0
- package/bundles/taiga-ui-core-components.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +27 -0
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +34 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +13 -0
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +7 -0
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +4 -0
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-number-format.umd.js +414 -0
- package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -0
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +9 -0
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +11 -0
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +4 -0
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives.umd.js +14 -4
- package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js +22 -0
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-interfaces.umd.js +3 -1
- package/bundles/taiga-ui-core-interfaces.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +4 -0
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +5 -0
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal.umd.js +4 -0
- package/bundles/taiga-ui-core-internal.umd.js.map +1 -1
- package/bundles/taiga-ui-core-mask.umd.js +3 -1
- package/bundles/taiga-ui-core-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.js +11 -0
- package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +11 -0
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-flag.umd.js +4 -0
- package/bundles/taiga-ui-core-pipes-flag.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.js +4 -0
- package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +10 -0
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +11 -0
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +4 -0
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +4 -0
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes.umd.js +4 -0
- package/bundles/taiga-ui-core-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +7 -0
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +20 -2
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +129 -0
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-types.umd.js +3 -1
- package/bundles/taiga-ui-core-types.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +50 -0
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +51 -0
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +40 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +17 -0
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mobile.umd.js +4 -0
- package/bundles/taiga-ui-core-utils-mobile.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils.umd.js +4 -0
- package/bundles/taiga-ui-core-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-core.umd.js +4 -0
- package/bundles/taiga-ui-core.umd.js.map +1 -1
- package/components/alert/taiga-ui-core-components-alert.d.ts +3 -0
- package/components/button/button.options.d.ts +3 -0
- package/components/button/taiga-ui-core-components-button.d.ts +3 -0
- package/components/calendar/taiga-ui-core-components-calendar.d.ts +3 -0
- package/components/data-list/option/option.component.d.ts +1 -0
- package/components/data-list/taiga-ui-core-components-data-list.d.ts +3 -0
- package/components/dialog/dialog.tokens.d.ts +6 -0
- package/components/dialog/taiga-ui-core-components-dialog.d.ts +3 -0
- package/components/error/taiga-ui-core-components-error.d.ts +3 -0
- package/components/expand/taiga-ui-core-components-expand.d.ts +3 -0
- package/components/group/taiga-ui-core-components-group.d.ts +3 -0
- package/components/hints-host/taiga-ui-core-components-hints-host.d.ts +3 -0
- package/components/hosted-dropdown/hosted-dropdown.component.d.ts +1 -0
- package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.d.ts +3 -0
- package/components/label/taiga-ui-core-components-label.d.ts +3 -0
- package/components/link/taiga-ui-core-components-link.d.ts +3 -0
- package/components/loader/loader.options.d.ts +4 -0
- package/components/loader/taiga-ui-core-components-loader.d.ts +3 -0
- package/components/notification/notification.component.d.ts +3 -0
- package/components/notification/taiga-ui-core-components-notification.d.ts +3 -0
- package/components/primitive-calendar/primitive-calendar.component.d.ts +3 -0
- package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.d.ts +3 -0
- package/components/primitive-checkbox/checkbox.options.d.ts +4 -0
- package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.d.ts +3 -0
- package/components/primitive-spin-button/taiga-ui-core-components-primitive-spin-button.d.ts +3 -0
- package/components/primitive-textfield/primitive-textfield-options.d.ts +16 -0
- package/components/primitive-textfield/primitive-textfield.component.d.ts +7 -0
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.d.ts +3 -0
- package/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.d.ts +3 -0
- package/components/root/taiga-ui-core-components-root.d.ts +3 -0
- package/components/scroll-controls/scroll-controls.module.d.ts +1 -0
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.d.ts +3 -0
- package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
- package/components/scrollbar/taiga-ui-core-components-scrollbar.d.ts +3 -0
- package/components/svg/svg-options.d.ts +3 -0
- package/components/svg/taiga-ui-core-components-svg.d.ts +3 -0
- package/components/taiga-ui-core-components.d.ts +3 -0
- package/components/theme-night/taiga-ui-core-components-theme-night.d.ts +3 -0
- package/components/tooltip/taiga-ui-core-components-tooltip.d.ts +3 -0
- package/constants/cache-basting-payload.d.ts +1 -1
- package/constants/decimal-symbols.d.ts +4 -0
- package/constants/events.d.ts +14 -0
- package/constants/mask-caret-trap.d.ts +4 -0
- package/constants/taiga-ui-core-constants.d.ts +3 -0
- package/directives/dropdown/dropdown-hover.options.d.ts +4 -0
- package/directives/dropdown/dropdown-options.directive.d.ts +4 -0
- package/directives/dropdown/dropdown-selection.directive.d.ts +9 -0
- package/directives/dropdown/dropdown.component.d.ts +5 -0
- package/directives/dropdown/dropdown.providers.d.ts +3 -0
- package/directives/dropdown/taiga-ui-core-directives-dropdown.d.ts +3 -0
- package/directives/hint/hint-options.directive.d.ts +4 -0
- package/directives/hint/hint.providers.d.ts +3 -0
- package/directives/hint/taiga-ui-core-directives-hint.d.ts +3 -0
- package/directives/index.d.ts +1 -0
- package/directives/mask-accessor/mask-accessor.module.d.ts +3 -0
- package/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.d.ts +3 -0
- package/directives/mode/taiga-ui-core-directives-mode.d.ts +3 -0
- package/directives/number-format/index.d.ts +2 -0
- package/directives/number-format/number-format.directive.d.ts +10 -0
- package/directives/number-format/number-format.module.d.ts +7 -0
- package/directives/number-format/package.json +10 -0
- package/directives/number-format/taiga-ui-core-directives-number-format.d.ts +5 -0
- package/directives/scroll-into-view/scroll-into-view.directive.d.ts +3 -0
- package/directives/scroll-into-view/taiga-ui-core-directives-scroll-into-view.d.ts +3 -0
- package/directives/taiga-ui-core-directives.d.ts +3 -0
- package/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.d.ts +3 -0
- package/directives/textfield-controller/textfield.options.d.ts +7 -0
- package/directives/wrapper/taiga-ui-core-directives-wrapper.d.ts +3 -0
- package/enums/dropdown-animation.d.ts +1 -0
- package/enums/interactive-state.d.ts +3 -0
- package/enums/notification.d.ts +3 -0
- package/enums/range-state.d.ts +3 -0
- package/enums/taiga-ui-core-enums.d.ts +3 -0
- package/esm2015/abstract/driver.js +2 -1
- package/esm2015/abstract/position-accessor.js +2 -1
- package/esm2015/abstract/rect-accessor.js +3 -1
- package/esm2015/abstract/taiga-ui-core-abstract.js +4 -1
- package/esm2015/abstract/vehicle.js +2 -1
- package/esm2015/animations/taiga-ui-core-animations.js +4 -1
- package/esm2015/components/alert/alert.component.js +13 -2
- package/esm2015/components/alert/taiga-ui-core-components-alert.js +4 -1
- package/esm2015/components/button/button.options.js +4 -1
- package/esm2015/components/button/taiga-ui-core-components-button.js +4 -1
- package/esm2015/components/calendar/taiga-ui-core-components-calendar.js +4 -1
- package/esm2015/components/data-list/data-list.component.js +3 -1
- package/esm2015/components/data-list/option/option.component.js +5 -1
- package/esm2015/components/data-list/taiga-ui-core-components-data-list.js +4 -1
- package/esm2015/components/dialog/dialog.component.js +3 -1
- package/esm2015/components/dialog/dialog.tokens.js +7 -1
- package/esm2015/components/dialog/taiga-ui-core-components-dialog.js +4 -1
- package/esm2015/components/error/taiga-ui-core-components-error.js +4 -1
- package/esm2015/components/expand/expand.component.js +2 -1
- package/esm2015/components/expand/taiga-ui-core-components-expand.js +4 -1
- package/esm2015/components/group/taiga-ui-core-components-group.js +4 -1
- package/esm2015/components/hints-host/hints-host.component.js +5 -1
- package/esm2015/components/hints-host/taiga-ui-core-components-hints-host.js +4 -1
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +3 -1
- package/esm2015/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.js +4 -1
- package/esm2015/components/label/taiga-ui-core-components-label.js +4 -1
- package/esm2015/components/link/link.component.js +2 -1
- package/esm2015/components/link/taiga-ui-core-components-link.js +4 -1
- package/esm2015/components/loader/loader.component.js +3 -2
- package/esm2015/components/loader/loader.options.js +5 -1
- package/esm2015/components/loader/taiga-ui-core-components-loader.js +4 -1
- package/esm2015/components/notification/notification.component.js +4 -1
- package/esm2015/components/notification/taiga-ui-core-components-notification.js +4 -1
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +4 -1
- package/esm2015/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.js +4 -1
- package/esm2015/components/primitive-checkbox/checkbox.options.js +5 -1
- package/esm2015/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.js +4 -1
- package/esm2015/components/primitive-spin-button/taiga-ui-core-components-primitive-spin-button.js +4 -1
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +13 -1
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +9 -1
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +6 -1
- package/esm2015/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.js +4 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -1
- package/esm2015/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.js +4 -1
- package/esm2015/components/root/root.component.js +4 -2
- package/esm2015/components/root/taiga-ui-core-components-root.js +4 -1
- package/esm2015/components/scroll-controls/scroll-controls.module.js +2 -1
- package/esm2015/components/scroll-controls/taiga-ui-core-components-scroll-controls.js +4 -1
- package/esm2015/components/scrollbar/scroll-ref.directive.js +3 -1
- package/esm2015/components/scrollbar/scrollbar.component.js +3 -1
- package/esm2015/components/scrollbar/taiga-ui-core-components-scrollbar.js +4 -1
- package/esm2015/components/svg/svg-options.js +4 -1
- package/esm2015/components/svg/svg.component.js +3 -1
- package/esm2015/components/svg/taiga-ui-core-components-svg.js +4 -1
- package/esm2015/components/taiga-ui-core-components.js +4 -1
- package/esm2015/components/theme-night/taiga-ui-core-components-theme-night.js +4 -1
- package/esm2015/components/tooltip/taiga-ui-core-components-tooltip.js +4 -1
- package/esm2015/constants/decimal-symbols.js +5 -1
- package/esm2015/constants/default-number-format.js +2 -1
- package/esm2015/constants/events.js +15 -1
- package/esm2015/constants/mask-caret-trap.js +5 -1
- package/esm2015/constants/taiga-ui-core-constants.js +4 -1
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +2 -1
- package/esm2015/directives/dropdown/dropdown-hover.options.js +5 -1
- package/esm2015/directives/dropdown/dropdown-options.directive.js +5 -1
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +10 -1
- package/esm2015/directives/dropdown/dropdown.component.js +8 -1
- package/esm2015/directives/dropdown/dropdown.directive.js +2 -1
- package/esm2015/directives/dropdown/dropdown.providers.js +4 -1
- package/esm2015/directives/dropdown/taiga-ui-core-directives-dropdown.js +4 -1
- package/esm2015/directives/hint/hint-driver.directive.js +2 -1
- package/esm2015/directives/hint/hint-hover.directive.js +2 -1
- package/esm2015/directives/hint/hint-options.directive.js +5 -1
- package/esm2015/directives/hint/hint-position.directive.js +2 -1
- package/esm2015/directives/hint/hint.directive.js +2 -1
- package/esm2015/directives/hint/hint.providers.js +5 -1
- package/esm2015/directives/hint/taiga-ui-core-directives-hint.js +4 -1
- package/esm2015/directives/index.js +2 -1
- package/esm2015/directives/mask-accessor/mask-accessor.module.js +4 -1
- package/esm2015/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.js +4 -1
- package/esm2015/directives/mode/taiga-ui-core-directives-mode.js +4 -1
- package/esm2015/directives/number-format/index.js +3 -0
- package/esm2015/directives/number-format/number-format.directive.js +38 -0
- package/esm2015/directives/number-format/number-format.module.js +16 -0
- package/esm2015/directives/number-format/taiga-ui-core-directives-number-format.js +5 -0
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +6 -1
- package/esm2015/directives/scroll-into-view/taiga-ui-core-directives-scroll-into-view.js +4 -1
- package/esm2015/directives/taiga-ui-core-directives.js +4 -1
- package/esm2015/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.js +4 -1
- package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +4 -1
- package/esm2015/directives/textfield-controller/textfield.options.js +5 -1
- package/esm2015/directives/wrapper/taiga-ui-core-directives-wrapper.js +4 -1
- package/esm2015/enums/appearance.js +3 -1
- package/esm2015/enums/dropdown-animation.js +3 -1
- package/esm2015/enums/interactive-state.js +6 -1
- package/esm2015/enums/notification.js +5 -1
- package/esm2015/enums/range-state.js +6 -1
- package/esm2015/enums/taiga-ui-core-enums.js +4 -1
- package/esm2015/interfaces/number-format-settings.js +1 -1
- package/esm2015/interfaces/taiga-ui-core-interfaces.js +4 -1
- package/esm2015/internal/primitive-year-month-pagination/taiga-ui-core-internal-primitive-year-month-pagination.js +4 -1
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -1
- package/esm2015/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.js +4 -1
- package/esm2015/internal/taiga-ui-core-internal.js +4 -1
- package/esm2015/mask/taiga-ui-core-mask.js +4 -1
- package/esm2015/observables/taiga-ui-core-observables.js +4 -1
- package/esm2015/observables/zoneful-map.js +8 -1
- package/esm2015/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.js +4 -1
- package/esm2015/pipes/calendar-sheet/utils.js +8 -1
- package/esm2015/pipes/flag/taiga-ui-core-pipes-flag.js +4 -1
- package/esm2015/pipes/format-date/taiga-ui-core-pipes-format-date.js +4 -1
- package/esm2015/pipes/format-number/format-number.pipe.js +7 -1
- package/esm2015/pipes/format-number/taiga-ui-core-pipes-format-number.js +4 -1
- package/esm2015/pipes/format-phone/format-phone.pipe.js +8 -1
- package/esm2015/pipes/format-phone/taiga-ui-core-pipes-format-phone.js +4 -1
- package/esm2015/pipes/month/taiga-ui-core-pipes-month.js +4 -1
- package/esm2015/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.js +4 -1
- package/esm2015/pipes/taiga-ui-core-pipes.js +4 -1
- package/esm2015/providers/is-mobile-resolution.provider.js +4 -1
- package/esm2015/providers/taiga-ui-core-providers.js +4 -1
- package/esm2015/services/breakpoint.service.js +4 -1
- package/esm2015/services/hint.service.js +4 -1
- package/esm2015/services/position.service.js +4 -2
- package/esm2015/services/router-link-active.service.js +4 -2
- package/esm2015/services/svg.service.js +4 -1
- package/esm2015/services/taiga-ui-core-services.js +4 -1
- package/esm2015/services/visual-viewport.service.js +2 -1
- package/esm2015/taiga-ui-core.js +4 -1
- package/esm2015/tokens/animation-options.js +4 -1
- package/esm2015/tokens/animations-duration.js +4 -1
- package/esm2015/tokens/assert-enabled.js +8 -1
- package/esm2015/tokens/data-list-accessor.js +4 -1
- package/esm2015/tokens/data-list-host.js +4 -1
- package/esm2015/tokens/day-type-handler.js +4 -1
- package/esm2015/tokens/element-ref.js +4 -1
- package/esm2015/tokens/first-day-of-week.js +4 -1
- package/esm2015/tokens/i18n.js +19 -1
- package/esm2015/tokens/icon-place.js +5 -1
- package/esm2015/tokens/icons-path.js +5 -1
- package/esm2015/tokens/icons.js +4 -1
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/is-mobile-resolution.js +6 -1
- package/esm2015/tokens/legacy-mask.js +6 -1
- package/esm2015/tokens/media.js +4 -1
- package/esm2015/tokens/mode.js +4 -1
- package/esm2015/tokens/notification-options.js +6 -1
- package/esm2015/tokens/number-format-observable.js +8 -0
- package/esm2015/tokens/number-format.js +4 -1
- package/esm2015/tokens/option-content.js +4 -1
- package/esm2015/tokens/ordered-short-week-days.js +8 -1
- package/esm2015/tokens/sanitizer.js +4 -1
- package/esm2015/tokens/scroll-ref.js +4 -1
- package/esm2015/tokens/selection-stream.js +4 -1
- package/esm2015/tokens/svg-content-processor.js +5 -1
- package/esm2015/tokens/svg-src-processor.js +5 -1
- package/esm2015/tokens/taiga-ui-core-tokens.js +4 -1
- package/esm2015/tokens/textfield-appearance.js +6 -1
- package/esm2015/tokens/textfield-host.js +4 -1
- package/esm2015/tokens/value-accessor.js +4 -1
- package/esm2015/tokens/viewport.js +4 -1
- package/esm2015/types/size.js +12 -1
- package/esm2015/types/taiga-ui-core-types.js +4 -1
- package/esm2015/utils/dom/get-safe-area-size.js +6 -1
- package/esm2015/utils/dom/get-viewport-height.js +18 -1
- package/esm2015/utils/dom/get-viewport-width.js +18 -1
- package/esm2015/utils/dom/get-word-range.js +8 -1
- package/esm2015/utils/dom/taiga-ui-core-utils-dom.js +4 -1
- package/esm2015/utils/format/capitalize.js +8 -1
- package/esm2015/utils/format/format-number.js +9 -1
- package/esm2015/utils/format/format-phone.js +20 -1
- package/esm2015/utils/format/get-fractional-part-padded.js +8 -1
- package/esm2015/utils/format/number-to-string-without-exp.js +7 -1
- package/esm2015/utils/format/taiga-ui-core-utils-format.js +4 -1
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +9 -1
- package/esm2015/utils/mask/create-correction-mask.js +5 -1
- package/esm2015/utils/mask/create-number-mask.js +10 -2
- package/esm2015/utils/mask/enable-auto-correct-decimal-symbol.js +5 -1
- package/esm2015/utils/mask/masked-money-value-is-empty.js +8 -1
- package/esm2015/utils/mask/masked-number-string-to-number.js +5 -1
- package/esm2015/utils/mask/taiga-ui-core-utils-mask.js +4 -1
- package/esm2015/utils/miscellaneous/is-editing-key.js +4 -1
- package/esm2015/utils/miscellaneous/is-obscured.js +4 -1
- package/esm2015/utils/miscellaneous/override-options.js +2 -1
- package/esm2015/utils/miscellaneous/size-bigger.js +7 -1
- package/esm2015/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.js +4 -1
- package/esm2015/utils/mobile/taiga-ui-core-utils-mobile.js +4 -1
- package/esm2015/utils/taiga-ui-core-utils.js +4 -1
- package/fesm2015/taiga-ui-core-abstract.js +9 -0
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-animations.js +4 -0
- package/fesm2015/taiga-ui-core-animations.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +16 -1
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +7 -0
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +4 -0
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +10 -0
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +12 -0
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +4 -0
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +5 -0
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +4 -0
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +8 -0
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +6 -0
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +4 -0
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +5 -0
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +10 -1
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +7 -0
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +7 -0
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +8 -0
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +4 -0
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +31 -0
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -0
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +7 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +5 -0
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -0
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +9 -0
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +4 -0
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +4 -0
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-components.js +4 -0
- package/fesm2015/taiga-ui-core-components.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +27 -0
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +34 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +14 -0
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +7 -0
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +4 -0
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-number-format.js +58 -0
- package/fesm2015/taiga-ui-core-directives-number-format.js.map +1 -0
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +9 -0
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +11 -0
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +4 -0
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives.js +5 -0
- package/fesm2015/taiga-ui-core-directives.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js +22 -0
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-interfaces.js +3 -1
- package/fesm2015/taiga-ui-core-interfaces.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +4 -0
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +5 -0
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal.js +4 -0
- package/fesm2015/taiga-ui-core-internal.js.map +1 -1
- package/fesm2015/taiga-ui-core-mask.js +3 -1
- package/fesm2015/taiga-ui-core-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-observables.js +11 -0
- package/fesm2015/taiga-ui-core-observables.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +11 -0
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-flag.js +4 -0
- package/fesm2015/taiga-ui-core-pipes-flag.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-date.js +4 -0
- package/fesm2015/taiga-ui-core-pipes-format-date.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +10 -0
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +11 -0
- package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js +4 -0
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-order-week-days.js +4 -0
- package/fesm2015/taiga-ui-core-pipes-order-week-days.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes.js +4 -0
- package/fesm2015/taiga-ui-core-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +7 -0
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +20 -2
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +133 -2
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-types.js +14 -0
- package/fesm2015/taiga-ui-core-types.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +50 -0
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +51 -0
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +40 -1
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +17 -0
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mobile.js +4 -0
- package/fesm2015/taiga-ui-core-utils-mobile.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils.js +4 -0
- package/fesm2015/taiga-ui-core-utils.js.map +1 -1
- package/fesm2015/taiga-ui-core.js +4 -0
- package/fesm2015/taiga-ui-core.js.map +1 -1
- package/interfaces/alert-options.d.ts +2 -0
- package/interfaces/dialog-options.d.ts +11 -0
- package/interfaces/number-format-settings.d.ts +26 -1
- package/interfaces/taiga-ui-core-interfaces.d.ts +3 -0
- package/internal/primitive-year-month-pagination/taiga-ui-core-internal-primitive-year-month-pagination.d.ts +3 -0
- package/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.d.ts +3 -0
- package/internal/taiga-ui-core-internal.d.ts +3 -0
- package/mask/taiga-ui-core-mask.d.ts +3 -0
- package/mask/text-mask-config.d.ts +5 -0
- package/mask/text-mask-correction-handler.d.ts +3 -0
- package/mask/text-mask-list-handler.d.ts +3 -0
- package/mask/text-mask-list.d.ts +4 -0
- package/mask/text-mask-options.d.ts +22 -0
- package/mask/text-mask-pipe-handler.d.ts +4 -0
- package/mask/text-mask-pipe-result.d.ts +4 -0
- package/observables/taiga-ui-core-observables.d.ts +3 -0
- package/observables/zoneful-map.d.ts +7 -0
- package/package.json +4 -4
- package/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.d.ts +3 -0
- package/pipes/calendar-sheet/utils.d.ts +13 -0
- package/pipes/flag/taiga-ui-core-pipes-flag.d.ts +3 -0
- package/pipes/format-date/taiga-ui-core-pipes-format-date.d.ts +3 -0
- package/pipes/format-number/format-number.pipe.d.ts +6 -0
- package/pipes/format-number/taiga-ui-core-pipes-format-number.d.ts +3 -0
- package/pipes/format-phone/format-phone.pipe.d.ts +7 -0
- package/pipes/format-phone/taiga-ui-core-pipes-format-phone.d.ts +3 -0
- package/pipes/month/taiga-ui-core-pipes-month.d.ts +3 -0
- package/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.d.ts +3 -0
- package/pipes/taiga-ui-core-pipes.d.ts +3 -0
- package/providers/is-mobile-resolution.provider.d.ts +3 -0
- package/providers/taiga-ui-core-providers.d.ts +3 -0
- package/services/breakpoint.service.d.ts +3 -0
- package/services/hint.service.d.ts +3 -0
- package/services/svg.service.d.ts +3 -0
- package/services/taiga-ui-core-services.d.ts +3 -0
- package/styles/theme/variables.less +1 -0
- package/taiga-ui-core.d.ts +3 -0
- package/tokens/animation-options.d.ts +3 -0
- package/tokens/animations-duration.d.ts +3 -0
- package/tokens/assert-enabled.d.ts +7 -0
- package/tokens/data-list-accessor.d.ts +3 -0
- package/tokens/data-list-host.d.ts +3 -0
- package/tokens/day-type-handler.d.ts +3 -0
- package/tokens/element-ref.d.ts +3 -0
- package/tokens/first-day-of-week.d.ts +3 -0
- package/tokens/i18n.d.ts +18 -0
- package/tokens/icon-place.d.ts +4 -0
- package/tokens/icons-path.d.ts +4 -0
- package/tokens/icons.d.ts +3 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/is-mobile-resolution.d.ts +5 -0
- package/tokens/legacy-mask.d.ts +5 -0
- package/tokens/media.d.ts +3 -0
- package/tokens/mode.d.ts +3 -0
- package/tokens/notification-options.d.ts +5 -0
- package/tokens/number-format-observable.d.ts +11 -0
- package/tokens/number-format.d.ts +3 -0
- package/tokens/option-content.d.ts +3 -0
- package/tokens/ordered-short-week-days.d.ts +7 -0
- package/tokens/sanitizer.d.ts +3 -0
- package/tokens/scroll-ref.d.ts +3 -0
- package/tokens/selection-stream.d.ts +3 -0
- package/tokens/svg-content-processor.d.ts +4 -0
- package/tokens/svg-src-processor.d.ts +4 -0
- package/tokens/taiga-ui-core-tokens.d.ts +3 -0
- package/tokens/textfield-appearance.d.ts +5 -0
- package/tokens/textfield-host.d.ts +3 -0
- package/tokens/value-accessor.d.ts +3 -0
- package/tokens/viewport.d.ts +3 -0
- package/types/size.d.ts +11 -0
- package/types/taiga-ui-core-types.d.ts +3 -0
- package/utils/dom/get-safe-area-size.d.ts +5 -0
- package/utils/dom/get-viewport-height.d.ts +17 -0
- package/utils/dom/get-viewport-width.d.ts +17 -0
- package/utils/dom/get-word-range.d.ts +6 -0
- package/utils/dom/taiga-ui-core-utils-dom.d.ts +3 -0
- package/utils/format/capitalize.d.ts +7 -0
- package/utils/format/format-number.d.ts +8 -0
- package/utils/format/format-phone.d.ts +19 -0
- package/utils/format/get-fractional-part-padded.d.ts +7 -0
- package/utils/format/number-to-string-without-exp.d.ts +6 -0
- package/utils/format/taiga-ui-core-utils-format.d.ts +3 -0
- package/utils/mask/create-auto-corrected-money-pipe.d.ts +5 -0
- package/utils/mask/create-correction-mask.d.ts +4 -0
- package/utils/mask/create-number-mask.d.ts +5 -0
- package/utils/mask/enable-auto-correct-decimal-symbol.d.ts +4 -0
- package/utils/mask/masked-money-value-is-empty.d.ts +7 -0
- package/utils/mask/masked-number-string-to-number.d.ts +4 -0
- package/utils/mask/taiga-ui-core-utils-mask.d.ts +3 -0
- package/utils/miscellaneous/is-editing-key.d.ts +3 -0
- package/utils/miscellaneous/is-obscured.d.ts +3 -0
- package/utils/miscellaneous/size-bigger.d.ts +6 -0
- package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.d.ts +3 -0
- package/utils/mobile/taiga-ui-core-utils-mobile.d.ts +3 -0
- package/utils/taiga-ui-core-utils.d.ts +3 -0
|
@@ -6,7 +6,7 @@ import { tuiIconsPathFactory, tuiIsMobile } from '@taiga-ui/core/utils';
|
|
|
6
6
|
import { WINDOW } from '@ng-web-apis/common';
|
|
7
7
|
import { share, startWith, map, distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';
|
|
8
8
|
import { TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/constants';
|
|
9
|
-
import { merge, identity } from 'rxjs';
|
|
9
|
+
import { of, merge, identity } from 'rxjs';
|
|
10
10
|
import { TuiAppearance } from '@taiga-ui/core/enums';
|
|
11
11
|
|
|
12
12
|
const TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(() => {
|
|
@@ -15,8 +15,14 @@ const TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(() => {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
const TUI_ANIMATIONS_DEFAULT_DURATION = 300;
|
|
18
|
+
/**
|
|
19
|
+
* Duration of all Taiga UI animations in ms
|
|
20
|
+
*/
|
|
18
21
|
const TUI_ANIMATIONS_DURATION = tuiCreateTokenFromFactory(() => inject(TUI_REDUCED_MOTION) ? 0 : TUI_ANIMATIONS_DEFAULT_DURATION);
|
|
19
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Options for Taiga UI animations
|
|
25
|
+
*/
|
|
20
26
|
const TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory(() => ({
|
|
21
27
|
value: ``,
|
|
22
28
|
params: {
|
|
@@ -24,6 +30,13 @@ const TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory(() => ({
|
|
|
24
30
|
},
|
|
25
31
|
}));
|
|
26
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated:
|
|
35
|
+
* Flag to enable assertions across Taiga UI
|
|
36
|
+
*
|
|
37
|
+
* The current token no longer matters as
|
|
38
|
+
* it will not be provided in production
|
|
39
|
+
*/
|
|
27
40
|
const TUI_ASSERT_ENABLED = tuiCreateTokenFromFactory(() => isDevMode());
|
|
28
41
|
|
|
29
42
|
const COMMON_ICONS = {
|
|
@@ -37,6 +50,9 @@ function tuiCommonIconsProvider(icons) {
|
|
|
37
50
|
return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);
|
|
38
51
|
}
|
|
39
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Accessor for data-list options
|
|
55
|
+
*/
|
|
40
56
|
const TUI_DATA_LIST_ACCESSOR = new InjectionToken(`[TUI_DATA_LIST_ACCESSOR]`);
|
|
41
57
|
function tuiAsDataListAccessor(useExisting) {
|
|
42
58
|
return {
|
|
@@ -45,6 +61,9 @@ function tuiAsDataListAccessor(useExisting) {
|
|
|
45
61
|
};
|
|
46
62
|
}
|
|
47
63
|
|
|
64
|
+
/**
|
|
65
|
+
* DataList controller
|
|
66
|
+
*/
|
|
48
67
|
const TUI_DATA_LIST_HOST = new InjectionToken(`[TUI_DATA_LIST_HOST]`);
|
|
49
68
|
function tuiAsDataListHost(useExisting) {
|
|
50
69
|
return {
|
|
@@ -53,44 +72,99 @@ function tuiAsDataListHost(useExisting) {
|
|
|
53
72
|
};
|
|
54
73
|
}
|
|
55
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Token for adding data-type attribute to calendar cell
|
|
77
|
+
*/
|
|
56
78
|
const TUI_DAY_TYPE_HANDLER = tuiCreateToken(day => day.isWeekend ? `weekend` : `weekday`);
|
|
57
79
|
|
|
58
80
|
const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken(`[TUI_DOCUMENT_OR_SHADOW_ROOT]`);
|
|
59
81
|
|
|
82
|
+
/**
|
|
83
|
+
* ElementRef when you cannot use @Input for single time injection
|
|
84
|
+
*/
|
|
60
85
|
const TUI_ELEMENT_REF = new InjectionToken(`[TUI_ELEMENT_REF]`);
|
|
61
86
|
|
|
87
|
+
/**
|
|
88
|
+
* The first day of the week index
|
|
89
|
+
*/
|
|
62
90
|
const TUI_FIRST_DAY_OF_WEEK = tuiCreateToken(TuiDayOfWeek.Monday);
|
|
63
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Localized months names
|
|
94
|
+
*/
|
|
64
95
|
const TUI_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n(`months`));
|
|
96
|
+
/**
|
|
97
|
+
* i18n 'close' word
|
|
98
|
+
*/
|
|
65
99
|
const TUI_CLOSE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`close`));
|
|
100
|
+
/**
|
|
101
|
+
* i18n 'Nothing found' message
|
|
102
|
+
*/
|
|
66
103
|
const TUI_NOTHING_FOUND_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n(`nothingFoundMessage`));
|
|
104
|
+
/**
|
|
105
|
+
* i18n of error message
|
|
106
|
+
*/
|
|
67
107
|
const TUI_DEFAULT_ERROR_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n(`defaultErrorMessage`));
|
|
108
|
+
/**
|
|
109
|
+
* spin i18n texts
|
|
110
|
+
*/
|
|
68
111
|
const TUI_SPIN_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`spinTexts`));
|
|
112
|
+
/**
|
|
113
|
+
* calendars i18n texts
|
|
114
|
+
*/
|
|
69
115
|
const TUI_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(tuiExtractI18n(`shortWeekDays`));
|
|
70
116
|
|
|
71
117
|
const TUI_DEFAULT_ICONS_PLACE = `assets/taiga-ui/icons`;
|
|
118
|
+
/**
|
|
119
|
+
* Path to icons
|
|
120
|
+
* @deprecated Use {@link TUI_SVG_OPTIONS} instead
|
|
121
|
+
*/
|
|
72
122
|
const TUI_ICONS_PLACE = tuiCreateToken(TUI_DEFAULT_ICONS_PLACE);
|
|
73
123
|
|
|
124
|
+
/**
|
|
125
|
+
* A key/value dictionary of icon names and src to be defined with TuiSvgService
|
|
126
|
+
*/
|
|
74
127
|
const TUI_ICONS = tuiCreateToken({});
|
|
75
128
|
|
|
129
|
+
/**
|
|
130
|
+
* A handler to retrieve USE id for icon by name
|
|
131
|
+
* @deprecated Use {@link TUI_SVG_OPTIONS} instead
|
|
132
|
+
*/
|
|
76
133
|
const TUI_ICONS_PATH = tuiCreateTokenFromFactory(() => tuiIconsPathFactory(inject(TUI_ICONS_PLACE)));
|
|
77
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Token for media constant
|
|
137
|
+
*/
|
|
78
138
|
const TUI_MEDIA = tuiCreateToken({
|
|
79
139
|
mobile: 768,
|
|
80
140
|
desktopSmall: 1024,
|
|
81
141
|
desktopLarge: 1280,
|
|
82
142
|
});
|
|
83
143
|
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated use {@link https://taiga-ui.dev/services/breakpoint-service TuiBreakpointService}
|
|
146
|
+
* TODO: drop in v4.0
|
|
147
|
+
* Mobile resolution stream for private providers
|
|
148
|
+
*/
|
|
84
149
|
const TUI_IS_MOBILE_RES = tuiCreateTokenFromFactory(() => {
|
|
85
150
|
const win = inject(WINDOW);
|
|
86
151
|
const media = inject(TUI_MEDIA);
|
|
87
152
|
return tuiTypedFromEvent(win, `resize`).pipe(share(), startWith(null), map(() => tuiIsMobile(win, media)), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));
|
|
88
153
|
});
|
|
89
154
|
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
* @deprecated
|
|
158
|
+
* Don't use it! Will be removed after changing the mask.
|
|
159
|
+
*/
|
|
90
160
|
const TUI_LEGACY_MASK = new InjectionToken(`[TUI_LEGACY_MASK]`);
|
|
91
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Mode stream for private providers
|
|
164
|
+
*/
|
|
92
165
|
const TUI_MODE = new InjectionToken(`[TUI_MODE]`);
|
|
93
166
|
|
|
167
|
+
/** @deprecated remove export */
|
|
94
168
|
const STATUS_ICON = {
|
|
95
169
|
info: `tuiIconInfo`,
|
|
96
170
|
success: `tuiIconCheckCircle`,
|
|
@@ -98,6 +172,7 @@ const STATUS_ICON = {
|
|
|
98
172
|
warning: `tuiIconAlertCircle`,
|
|
99
173
|
neutral: `tuiIconInfo`,
|
|
100
174
|
};
|
|
175
|
+
/** Default values for the notification options. */
|
|
101
176
|
const TUI_NOTIFICATION_DEFAULT_OPTIONS = {
|
|
102
177
|
autoClose: 3000,
|
|
103
178
|
label: ``,
|
|
@@ -108,16 +183,30 @@ const TUI_NOTIFICATION_DEFAULT_OPTIONS = {
|
|
|
108
183
|
hasIcon: true,
|
|
109
184
|
defaultAutoCloseTime: 3000,
|
|
110
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Default parameters for notification alert component
|
|
188
|
+
*/
|
|
111
189
|
const TUI_NOTIFICATION_OPTIONS = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);
|
|
112
190
|
function tuiNotificationOptionsProvider(options) {
|
|
113
191
|
return tuiProvideOptions(TUI_NOTIFICATION_OPTIONS, options, TUI_NOTIFICATION_DEFAULT_OPTIONS);
|
|
114
192
|
}
|
|
115
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Formatting configuration for displayed numbers
|
|
196
|
+
*/
|
|
116
197
|
const TUI_NUMBER_FORMAT = tuiCreateToken(TUI_DEFAULT_NUMBER_FORMAT);
|
|
117
198
|
function tuiNumberFormatProvider(options) {
|
|
118
199
|
return tuiProvideOptions(TUI_NUMBER_FORMAT, options, TUI_DEFAULT_NUMBER_FORMAT);
|
|
119
200
|
}
|
|
120
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Formatting configuration for displayed numbers
|
|
204
|
+
*/
|
|
205
|
+
const TUI_NUMBER_FORMAT_OBSERVABLE = tuiCreateToken(of(Object.assign(Object.assign({}, TUI_DEFAULT_NUMBER_FORMAT), { decimalLimit: NaN })));
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Content for tuiOption component
|
|
209
|
+
*/
|
|
121
210
|
const TUI_OPTION_CONTENT = new InjectionToken(`[TUI_OPTION_CONTENT]`);
|
|
122
211
|
function tuiAsOptionContent(useValue) {
|
|
123
212
|
return {
|
|
@@ -126,6 +215,9 @@ function tuiAsOptionContent(useValue) {
|
|
|
126
215
|
};
|
|
127
216
|
}
|
|
128
217
|
|
|
218
|
+
/**
|
|
219
|
+
* TODO: v4.0 delete the whole file
|
|
220
|
+
*/
|
|
129
221
|
const convertToSundayFirstWeekFormat = (weekDaysNames) => {
|
|
130
222
|
const sundayIndex = weekDaysNames.length - 1;
|
|
131
223
|
return [
|
|
@@ -133,6 +225,10 @@ const convertToSundayFirstWeekFormat = (weekDaysNames) => {
|
|
|
133
225
|
...weekDaysNames.slice(0, sundayIndex),
|
|
134
226
|
];
|
|
135
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Ordered calendars i18n texts
|
|
230
|
+
* @deprecated
|
|
231
|
+
*/
|
|
136
232
|
const TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {
|
|
137
233
|
const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);
|
|
138
234
|
return inject(TUI_SHORT_WEEK_DAYS).pipe(map(convertToSundayFirstWeekFormat), map(weekDays => [
|
|
@@ -141,10 +237,19 @@ const TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {
|
|
|
141
237
|
]));
|
|
142
238
|
});
|
|
143
239
|
|
|
240
|
+
/**
|
|
241
|
+
* A custom Sanitizer to sanitize source before inlining
|
|
242
|
+
*/
|
|
144
243
|
const TUI_SANITIZER = new InjectionToken(`[TUI_SANITIZER]`);
|
|
145
244
|
|
|
245
|
+
/**
|
|
246
|
+
* @deprecated import from `@taiga-ui/cdk` instead
|
|
247
|
+
*/
|
|
146
248
|
const TUI_SCROLL_REF = TUI_SCROLL_REF$1;
|
|
147
249
|
|
|
250
|
+
/**
|
|
251
|
+
* A stream of possible selection changes
|
|
252
|
+
*/
|
|
148
253
|
const TUI_SELECTION_STREAM = tuiCreateTokenFromFactory(() => {
|
|
149
254
|
const doc = inject(DOCUMENT);
|
|
150
255
|
return merge(tuiTypedFromEvent(doc, `selectionchange`), tuiTypedFromEvent(doc, `mouseup`), tuiTypedFromEvent(doc, `mousedown`).pipe(switchMap(() => tuiTypedFromEvent(doc, `mousemove`).pipe(takeUntil(tuiTypedFromEvent(doc, `mouseup`))))), tuiTypedFromEvent(doc, `keydown`), tuiTypedFromEvent(doc, `keyup`)).pipe(share());
|
|
@@ -155,12 +260,28 @@ const TUI_SPIN_ICONS = tuiCreateToken({
|
|
|
155
260
|
increment: `tuiIconChevronRight`,
|
|
156
261
|
});
|
|
157
262
|
|
|
263
|
+
/**
|
|
264
|
+
* Transform function the contents of the loaded svg file
|
|
265
|
+
* @deprecated Use {@link TUI_SVG_OPTIONS} instead
|
|
266
|
+
*/
|
|
158
267
|
const TUI_SVG_CONTENT_PROCESSOR = tuiCreateToken(tuiSvgLinearGradientProcessor);
|
|
159
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Source path processor for svg
|
|
271
|
+
* @deprecated Use {@link TUI_SVG_OPTIONS} instead
|
|
272
|
+
*/
|
|
160
273
|
const TUI_SVG_SRC_PROCESSOR = tuiCreateToken(identity);
|
|
161
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Appearance for inputs
|
|
277
|
+
* @deprecated use {@link TUI_TEXTFIELD_APPEARANCE_DIRECTIVE} instead
|
|
278
|
+
* TODO: Remove in 4.0
|
|
279
|
+
*/
|
|
162
280
|
const TUI_TEXTFIELD_APPEARANCE = tuiCreateToken(TuiAppearance.Textfield);
|
|
163
281
|
|
|
282
|
+
/**
|
|
283
|
+
* An interface to communicate with textfield based controls
|
|
284
|
+
*/
|
|
164
285
|
const TUI_TEXTFIELD_HOST = new InjectionToken(`[TUI_TEXTFIELD_HOST]`);
|
|
165
286
|
function tuiAsTextfieldHost(useExisting) {
|
|
166
287
|
return {
|
|
@@ -171,8 +292,14 @@ function tuiAsTextfieldHost(useExisting) {
|
|
|
171
292
|
|
|
172
293
|
const TUI_THEME = tuiCreateToken(`Taiga`);
|
|
173
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Buffer token to pass NG_VALUE_ACCESSOR to a different Injector
|
|
297
|
+
*/
|
|
174
298
|
const TUI_VALUE_ACCESSOR = new InjectionToken(`[TUI_VALUE_ACCESSOR]`);
|
|
175
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Viewport accessor
|
|
302
|
+
*/
|
|
176
303
|
const TUI_VIEWPORT = tuiCreateTokenFromFactory(() => {
|
|
177
304
|
const win = inject(WINDOW);
|
|
178
305
|
return {
|
|
@@ -196,5 +323,9 @@ function tuiAsViewport(useExisting) {
|
|
|
196
323
|
};
|
|
197
324
|
}
|
|
198
325
|
|
|
199
|
-
|
|
326
|
+
/**
|
|
327
|
+
* Generated bundle index. Do not edit.
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
export { STATUS_ICON, TUI_ANIMATIONS_DEFAULT_DURATION, TUI_ANIMATIONS_DURATION, TUI_ANIMATION_OPTIONS, TUI_ASSERT_ENABLED, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DATA_LIST_ACCESSOR, TUI_DATA_LIST_HOST, TUI_DAY_TYPE_HANDLER, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_ICONS_PLACE, TUI_DOCUMENT_OR_SHADOW_ROOT, TUI_ELEMENT_REF, TUI_FIRST_DAY_OF_WEEK, TUI_ICONS, TUI_ICONS_PATH, TUI_ICONS_PLACE, TUI_IS_MOBILE_RES, TUI_LEGACY_MASK, TUI_MEDIA, TUI_MODE, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NOTIFICATION_DEFAULT_OPTIONS, TUI_NOTIFICATION_OPTIONS, TUI_NUMBER_FORMAT, TUI_NUMBER_FORMAT_OBSERVABLE, TUI_OPTION_CONTENT, TUI_ORDERED_SHORT_WEEK_DAYS, TUI_REDUCED_MOTION, TUI_SANITIZER, TUI_SCROLL_REF, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_ICONS, TUI_SPIN_TEXTS, TUI_SVG_CONTENT_PROCESSOR, TUI_SVG_SRC_PROCESSOR, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST, TUI_THEME, TUI_VALUE_ACCESSOR, TUI_VIEWPORT, tuiAsDataListAccessor, tuiAsDataListHost, tuiAsOptionContent, tuiAsTextfieldHost, tuiAsViewport, tuiCommonIconsProvider, tuiNotificationOptionsProvider, tuiNumberFormatProvider };
|
|
200
331
|
//# sourceMappingURL=taiga-ui-core-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-tokens.js","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-duration.ts","../../../projects/core/tokens/animation-options.ts","../../../projects/core/tokens/assert-enabled.ts","../../../projects/core/tokens/common-icon.ts","../../../projects/core/tokens/data-list-accessor.ts","../../../projects/core/tokens/data-list-host.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/document-or-shadow-root.ts","../../../projects/core/tokens/element-ref.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon-place.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icons-path.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/is-mobile-resolution.ts","../../../projects/core/tokens/legacy-mask.ts","../../../projects/core/tokens/mode.ts","../../../projects/core/tokens/notification-options.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/option-content.ts","../../../projects/core/tokens/ordered-short-week-days.ts","../../../projects/core/tokens/sanitizer.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/svg-content-processor.ts","../../../projects/core/tokens/svg-src-processor.ts","../../../projects/core/tokens/textfield-appearance.ts","../../../projects/core/tokens/textfield-host.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/value-accessor.ts","../../../projects/core/tokens/viewport.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nexport const TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(\n () =>\n inject(DOCUMENT).defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`)\n .matches ?? false,\n);\n","import {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\nexport const TUI_ANIMATIONS_DEFAULT_DURATION = 300;\n\n/**\n * Duration of all Taiga UI animations in ms\n */\nexport const TUI_ANIMATIONS_DURATION = tuiCreateTokenFromFactory<number>(() =>\n inject(TUI_REDUCED_MOTION) ? 0 : TUI_ANIMATIONS_DEFAULT_DURATION,\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\n/**\n * Options for Taiga UI animations\n */\nexport const TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory<AnimationOptions>(() => ({\n value: ``,\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n}));\n","import {isDevMode} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\n/**\n * @deprecated:\n * Flag to enable assertions across Taiga UI\n *\n * The current token no longer matters as\n * it will not be provided in production\n */\nexport const TUI_ASSERT_ENABLED = tuiCreateTokenFromFactory(() => isDevMode());\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n}\n\nconst COMMON_ICONS: TuiCommonIcons = {\n check: `tuiIconCheck`,\n close: `tuiIconClose`,\n error: `tuiIconAlertCircle`,\n more: `tuiIconChevronRight`,\n};\n\nexport const TUI_COMMON_ICONS = tuiCreateToken(COMMON_ICONS);\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\n/**\n * Accessor for data-list options\n */\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n `[TUI_DATA_LIST_ACCESSOR]`,\n);\n\nexport function tuiAsDataListAccessor(useExisting: Type<TuiDataListAccessor>): Provider {\n return {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting,\n };\n}\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\n/**\n * DataList controller\n */\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n `[TUI_DATA_LIST_HOST]`,\n);\n\nexport function tuiAsDataListHost(useExisting: Type<TuiDataListHost<unknown>>): Provider {\n return {\n provide: TUI_DATA_LIST_HOST,\n useExisting,\n };\n}\n","import {tuiCreateToken, TuiDay, TuiHandler} from '@taiga-ui/cdk';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = tuiCreateToken<TuiHandler<TuiDay, string>>(day =>\n day.isWeekend ? `weekend` : `weekday`,\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n `[TUI_DOCUMENT_OR_SHADOW_ROOT]`,\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\n/**\n * ElementRef when you cannot use @Input for single time injection\n */\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(`[TUI_ELEMENT_REF]`);\n","import {tuiCreateToken, TuiDayOfWeek} from '@taiga-ui/cdk';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = tuiCreateToken<TuiDayOfWeek>(TuiDayOfWeek.Monday);\n","import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {tuiExtractI18n} from '@taiga-ui/i18n';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n(`months`));\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`close`));\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = tuiCreateTokenFromFactory(\n tuiExtractI18n(`nothingFoundMessage`),\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = tuiCreateTokenFromFactory(\n tuiExtractI18n(`defaultErrorMessage`),\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`spinTexts`));\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(\n tuiExtractI18n(`shortWeekDays`),\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiCreateToken} from '@taiga-ui/cdk';\n\nexport const TUI_DEFAULT_ICONS_PLACE = `assets/taiga-ui/icons` as const;\n\n/**\n * Path to icons\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_ICONS_PLACE: InjectionToken<string> = tuiCreateToken<string>(\n TUI_DEFAULT_ICONS_PLACE,\n);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\n\n/**\n * A key/value dictionary of icon names and src to be defined with TuiSvgService\n */\nexport const TUI_ICONS = tuiCreateToken<Record<string, string>>({});\n","import {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {tuiIconsPathFactory} from '@taiga-ui/core/utils';\n\nimport {TUI_ICONS_PLACE} from './icon-place';\n\n/**\n * A handler to retrieve USE id for icon by name\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_ICONS_PATH = tuiCreateTokenFromFactory(() =>\n tuiIconsPathFactory(inject(TUI_ICONS_PLACE)),\n);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = tuiCreateToken<TuiMedia>({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n});\n","import {inject, NgZone} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiCreateTokenFromFactory,\n tuiTypedFromEvent,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {distinctUntilChanged, map, share, startWith} from 'rxjs/operators';\n\nimport {TUI_MEDIA} from './media';\n\n/**\n * @deprecated use {@link https://taiga-ui.dev/services/breakpoint-service TuiBreakpointService}\n * TODO: drop in v4.0\n * Mobile resolution stream for private providers\n */\nexport const TUI_IS_MOBILE_RES = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n const media = inject(TUI_MEDIA);\n\n return tuiTypedFromEvent(win, `resize`).pipe(\n share(),\n startWith(null),\n map(() => tuiIsMobile(win, media)),\n distinctUntilChanged(),\n tuiZoneOptimized(inject(NgZone)),\n );\n});\n","import {InjectionToken} from '@angular/core';\n\n/**\n * @internal\n * @deprecated\n * Don't use it! Will be removed after changing the mask.\n */\nexport const TUI_LEGACY_MASK = new InjectionToken(`[TUI_LEGACY_MASK]`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n/**\n * Mode stream for private providers\n */\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(`[TUI_MODE]`);\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationDefaultOptions\n extends Omit<TuiAlertOptions<unknown>, 'data'> {\n size: TuiSizeL | TuiSizeS;\n}\n\n/** @deprecated remove export */\nexport const STATUS_ICON = {\n info: `tuiIconInfo`,\n success: `tuiIconCheckCircle`,\n error: `tuiIconXCircle`,\n warning: `tuiIconAlertCircle`,\n neutral: `tuiIconInfo`,\n} as const;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: 3000,\n label: ``,\n status: `info`,\n hasCloseButton: true,\n icon: ({$implicit}) => STATUS_ICON[$implicit],\n size: `m`,\n hasIcon: true,\n defaultAutoCloseTime: 3000,\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const TUI_NOTIFICATION_OPTIONS = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_NOTIFICATION_OPTIONS,\n options,\n TUI_NOTIFICATION_DEFAULT_OPTIONS,\n );\n}\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_NUMBER_FORMAT} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = tuiCreateToken(TUI_DEFAULT_NUMBER_FORMAT);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return tuiProvideOptions(TUI_NUMBER_FORMAT, options, TUI_DEFAULT_NUMBER_FORMAT);\n}\n","import {InjectionToken, Provider, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n/**\n * Content for tuiOption component\n */\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>>\n>(`[TUI_OPTION_CONTENT]`);\n\nexport function tuiAsOptionContent(\n useValue: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n >,\n): Provider {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue,\n };\n}\n","/**\n * TODO: v4.0 delete the whole file\n */\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK} from './first-day-of-week';\nimport {TUI_SHORT_WEEK_DAYS} from './i18n';\n\n/**\n * @deprecated\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\nconst convertToSundayFirstWeekFormat = (\n weekDaysNames: WEEK_DAYS_NAMES,\n): WEEK_DAYS_NAMES => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\n/**\n * Ordered calendars i18n texts\n * @deprecated\n */\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n});\n","import {InjectionToken, Sanitizer} from '@angular/core';\n\n/**\n * A custom Sanitizer to sanitize source before inlining\n */\nexport const TUI_SANITIZER = new InjectionToken<Sanitizer>(`[TUI_SANITIZER]`);\n","import {TUI_SCROLL_REF as TOKEN} from '@taiga-ui/cdk';\n\n/**\n * @deprecated import from `@taiga-ui/cdk` instead\n */\nexport const TUI_SCROLL_REF = TOKEN;\n","import {DOCUMENT} from '@angular/common';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory, tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {merge, Observable} from 'rxjs';\nimport {share, switchMap, takeUntil} from 'rxjs/operators';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = tuiCreateTokenFromFactory<Observable<unknown>>(() => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, `selectionchange`),\n tuiTypedFromEvent(doc, `mouseup`),\n tuiTypedFromEvent(doc, `mousedown`).pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, `mousemove`).pipe(\n takeUntil(tuiTypedFromEvent(doc, `mouseup`)),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, `keydown`),\n tuiTypedFromEvent(doc, `keyup`),\n ).pipe(share());\n});\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiSpinIcons {\n readonly decrement: PolymorpheusContent;\n readonly increment: PolymorpheusContent;\n}\n\nexport const TUI_SPIN_ICONS = tuiCreateToken<TuiSpinIcons>({\n decrement: `tuiIconChevronLeft`,\n increment: `tuiIconChevronRight`,\n});\n","import {\n tuiCreateToken,\n TuiHandler,\n TuiSafeHtml,\n tuiSvgLinearGradientProcessor,\n} from '@taiga-ui/cdk';\n\n/**\n * Transform function the contents of the loaded svg file\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_SVG_CONTENT_PROCESSOR = tuiCreateToken<\n TuiHandler<TuiSafeHtml, TuiSafeHtml>\n>(tuiSvgLinearGradientProcessor);\n","import {tuiCreateToken, TuiHandler, TuiSafeHtml} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\n/**\n * Source path processor for svg\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_SVG_SRC_PROCESSOR =\n tuiCreateToken<TuiHandler<TuiSafeHtml, TuiSafeHtml>>(identity);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\n/**\n * Appearance for inputs\n * @deprecated use {@link TUI_TEXTFIELD_APPEARANCE_DIRECTIVE} instead\n * TODO: Remove in 4.0\n */\nexport const TUI_TEXTFIELD_APPEARANCE = tuiCreateToken<string>(TuiAppearance.Textfield);\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n/**\n * An interface to communicate with textfield based controls\n */\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n `[TUI_TEXTFIELD_HOST]`,\n);\n\nexport function tuiAsTextfieldHost(useExisting: Type<TuiTextfieldHost>): Provider {\n return {\n provide: TUI_TEXTFIELD_HOST,\n useExisting,\n };\n}\n","import {tuiCreateToken} from '@taiga-ui/cdk';\n\nexport const TUI_THEME = tuiCreateToken(`Taiga`);\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\n/**\n * Buffer token to pass NG_VALUE_ACCESSOR to a different Injector\n */\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n `[TUI_VALUE_ACCESSOR]`,\n);\n","import {inject, Provider, Type} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {TuiRectAccessor} from '@taiga-ui/core/abstract';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = tuiCreateTokenFromFactory<TuiRectAccessor>(() => {\n const win = inject(WINDOW);\n\n return {\n type: `viewport`,\n getClientRect() {\n return {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: win.innerHeight,\n };\n },\n };\n});\n\nexport function tuiAsViewport(useExisting: Type<TuiRectAccessor>): Provider {\n return {\n provide: TUI_VIEWPORT,\n useExisting,\n };\n}\n"],"names":["TOKEN"],"mappings":";;;;;;;;;;;AAIa,MAAA,kBAAkB,GAAG,yBAAyB,CACvD,MAAK;;AACD,IAAA,OAAA,MAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,UAAU,MA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,GAAG,yBAAyB,CAAkB,MAAK;AACxE,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAE3B,OAAO;AACH,QAAA,IAAI,EAAE,CAAU,QAAA,CAAA;QAChB,aAAa,GAAA;YACT,OAAO;AACH,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG,CAAC,UAAU;gBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;gBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;gBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;aAC1B,CAAC;SACL;KACJ,CAAC;AACN,CAAC,EAAE;AAEG,SAAU,aAAa,CAAC,WAAkC,EAAA;IAC5D,OAAO;AACH,QAAA,OAAO,EAAE,YAAY;QACrB,WAAW;KACd,CAAC;AACN;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-tokens.js","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-duration.ts","../../../projects/core/tokens/animation-options.ts","../../../projects/core/tokens/assert-enabled.ts","../../../projects/core/tokens/common-icon.ts","../../../projects/core/tokens/data-list-accessor.ts","../../../projects/core/tokens/data-list-host.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/document-or-shadow-root.ts","../../../projects/core/tokens/element-ref.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon-place.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icons-path.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/is-mobile-resolution.ts","../../../projects/core/tokens/legacy-mask.ts","../../../projects/core/tokens/mode.ts","../../../projects/core/tokens/notification-options.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/number-format-observable.ts","../../../projects/core/tokens/option-content.ts","../../../projects/core/tokens/ordered-short-week-days.ts","../../../projects/core/tokens/sanitizer.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/svg-content-processor.ts","../../../projects/core/tokens/svg-src-processor.ts","../../../projects/core/tokens/textfield-appearance.ts","../../../projects/core/tokens/textfield-host.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/value-accessor.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nexport const TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(\n () =>\n inject(DOCUMENT).defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`)\n .matches ?? false,\n);\n","import {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\nexport const TUI_ANIMATIONS_DEFAULT_DURATION = 300;\n\n/**\n * Duration of all Taiga UI animations in ms\n */\nexport const TUI_ANIMATIONS_DURATION = tuiCreateTokenFromFactory<number>(() =>\n inject(TUI_REDUCED_MOTION) ? 0 : TUI_ANIMATIONS_DEFAULT_DURATION,\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\n/**\n * Options for Taiga UI animations\n */\nexport const TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory<AnimationOptions>(() => ({\n value: ``,\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n}));\n","import {isDevMode} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\n\n/**\n * @deprecated:\n * Flag to enable assertions across Taiga UI\n *\n * The current token no longer matters as\n * it will not be provided in production\n */\nexport const TUI_ASSERT_ENABLED = tuiCreateTokenFromFactory(() => isDevMode());\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n}\n\nconst COMMON_ICONS: TuiCommonIcons = {\n check: `tuiIconCheck`,\n close: `tuiIconClose`,\n error: `tuiIconAlertCircle`,\n more: `tuiIconChevronRight`,\n};\n\nexport const TUI_COMMON_ICONS = tuiCreateToken(COMMON_ICONS);\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\n/**\n * Accessor for data-list options\n */\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n `[TUI_DATA_LIST_ACCESSOR]`,\n);\n\nexport function tuiAsDataListAccessor(useExisting: Type<TuiDataListAccessor>): Provider {\n return {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting,\n };\n}\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\n/**\n * DataList controller\n */\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n `[TUI_DATA_LIST_HOST]`,\n);\n\nexport function tuiAsDataListHost(useExisting: Type<TuiDataListHost<unknown>>): Provider {\n return {\n provide: TUI_DATA_LIST_HOST,\n useExisting,\n };\n}\n","import {tuiCreateToken, TuiDay, TuiHandler} from '@taiga-ui/cdk';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = tuiCreateToken<TuiHandler<TuiDay, string>>(day =>\n day.isWeekend ? `weekend` : `weekday`,\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n `[TUI_DOCUMENT_OR_SHADOW_ROOT]`,\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\n/**\n * ElementRef when you cannot use @Input for single time injection\n */\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(`[TUI_ELEMENT_REF]`);\n","import {tuiCreateToken, TuiDayOfWeek} from '@taiga-ui/cdk';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = tuiCreateToken<TuiDayOfWeek>(TuiDayOfWeek.Monday);\n","import {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {tuiExtractI18n} from '@taiga-ui/i18n';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n(`months`));\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n(`close`));\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = tuiCreateTokenFromFactory(\n tuiExtractI18n(`nothingFoundMessage`),\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = tuiCreateTokenFromFactory(\n tuiExtractI18n(`defaultErrorMessage`),\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n(`spinTexts`));\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(\n tuiExtractI18n(`shortWeekDays`),\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiCreateToken} from '@taiga-ui/cdk';\n\nexport const TUI_DEFAULT_ICONS_PLACE = `assets/taiga-ui/icons` as const;\n\n/**\n * Path to icons\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_ICONS_PLACE: InjectionToken<string> = tuiCreateToken<string>(\n TUI_DEFAULT_ICONS_PLACE,\n);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\n\n/**\n * A key/value dictionary of icon names and src to be defined with TuiSvgService\n */\nexport const TUI_ICONS = tuiCreateToken<Record<string, string>>({});\n","import {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {tuiIconsPathFactory} from '@taiga-ui/core/utils';\n\nimport {TUI_ICONS_PLACE} from './icon-place';\n\n/**\n * A handler to retrieve USE id for icon by name\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_ICONS_PATH = tuiCreateTokenFromFactory(() =>\n tuiIconsPathFactory(inject(TUI_ICONS_PLACE)),\n);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = tuiCreateToken<TuiMedia>({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n});\n","import {inject, NgZone} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiCreateTokenFromFactory,\n tuiTypedFromEvent,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {distinctUntilChanged, map, share, startWith} from 'rxjs/operators';\n\nimport {TUI_MEDIA} from './media';\n\n/**\n * @deprecated use {@link https://taiga-ui.dev/services/breakpoint-service TuiBreakpointService}\n * TODO: drop in v4.0\n * Mobile resolution stream for private providers\n */\nexport const TUI_IS_MOBILE_RES = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n const media = inject(TUI_MEDIA);\n\n return tuiTypedFromEvent(win, `resize`).pipe(\n share(),\n startWith(null),\n map(() => tuiIsMobile(win, media)),\n distinctUntilChanged(),\n tuiZoneOptimized(inject(NgZone)),\n );\n});\n","import {InjectionToken} from '@angular/core';\n\n/**\n * @internal\n * @deprecated\n * Don't use it! Will be removed after changing the mask.\n */\nexport const TUI_LEGACY_MASK = new InjectionToken(`[TUI_LEGACY_MASK]`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\n/**\n * Mode stream for private providers\n */\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(`[TUI_MODE]`);\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationDefaultOptions\n extends Omit<TuiAlertOptions<unknown>, 'data'> {\n size: TuiSizeL | TuiSizeS;\n}\n\n/** @deprecated remove export */\nexport const STATUS_ICON = {\n info: `tuiIconInfo`,\n success: `tuiIconCheckCircle`,\n error: `tuiIconXCircle`,\n warning: `tuiIconAlertCircle`,\n neutral: `tuiIconInfo`,\n} as const;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: 3000,\n label: ``,\n status: `info`,\n hasCloseButton: true,\n icon: ({$implicit}) => STATUS_ICON[$implicit],\n size: `m`,\n hasIcon: true,\n defaultAutoCloseTime: 3000,\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const TUI_NOTIFICATION_OPTIONS = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_NOTIFICATION_OPTIONS,\n options,\n TUI_NOTIFICATION_DEFAULT_OPTIONS,\n );\n}\n","import {Provider} from '@angular/core';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_NUMBER_FORMAT} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = tuiCreateToken(TUI_DEFAULT_NUMBER_FORMAT);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return tuiProvideOptions(TUI_NUMBER_FORMAT, options, TUI_DEFAULT_NUMBER_FORMAT);\n}\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_NUMBER_FORMAT} from '@taiga-ui/core/constants';\nimport {of} from 'rxjs';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT_OBSERVABLE = tuiCreateToken(\n of({...TUI_DEFAULT_NUMBER_FORMAT, decimalLimit: NaN}),\n);\n","import {InjectionToken, Provider, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n/**\n * Content for tuiOption component\n */\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>>\n>(`[TUI_OPTION_CONTENT]`);\n\nexport function tuiAsOptionContent(\n useValue: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n >,\n): Provider {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue,\n };\n}\n","/**\n * TODO: v4.0 delete the whole file\n */\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK} from './first-day-of-week';\nimport {TUI_SHORT_WEEK_DAYS} from './i18n';\n\n/**\n * @deprecated\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\nconst convertToSundayFirstWeekFormat = (\n weekDaysNames: WEEK_DAYS_NAMES,\n): WEEK_DAYS_NAMES => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\n/**\n * Ordered calendars i18n texts\n * @deprecated\n */\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n});\n","import {InjectionToken, Sanitizer} from '@angular/core';\n\n/**\n * A custom Sanitizer to sanitize source before inlining\n */\nexport const TUI_SANITIZER = new InjectionToken<Sanitizer>(`[TUI_SANITIZER]`);\n","import {TUI_SCROLL_REF as TOKEN} from '@taiga-ui/cdk';\n\n/**\n * @deprecated import from `@taiga-ui/cdk` instead\n */\nexport const TUI_SCROLL_REF = TOKEN;\n","import {DOCUMENT} from '@angular/common';\nimport {inject} from '@angular/core';\nimport {tuiCreateTokenFromFactory, tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {merge, Observable} from 'rxjs';\nimport {share, switchMap, takeUntil} from 'rxjs/operators';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = tuiCreateTokenFromFactory<Observable<unknown>>(() => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, `selectionchange`),\n tuiTypedFromEvent(doc, `mouseup`),\n tuiTypedFromEvent(doc, `mousedown`).pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, `mousemove`).pipe(\n takeUntil(tuiTypedFromEvent(doc, `mouseup`)),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, `keydown`),\n tuiTypedFromEvent(doc, `keyup`),\n ).pipe(share());\n});\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiSpinIcons {\n readonly decrement: PolymorpheusContent;\n readonly increment: PolymorpheusContent;\n}\n\nexport const TUI_SPIN_ICONS = tuiCreateToken<TuiSpinIcons>({\n decrement: `tuiIconChevronLeft`,\n increment: `tuiIconChevronRight`,\n});\n","import {\n tuiCreateToken,\n TuiHandler,\n TuiSafeHtml,\n tuiSvgLinearGradientProcessor,\n} from '@taiga-ui/cdk';\n\n/**\n * Transform function the contents of the loaded svg file\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_SVG_CONTENT_PROCESSOR = tuiCreateToken<\n TuiHandler<TuiSafeHtml, TuiSafeHtml>\n>(tuiSvgLinearGradientProcessor);\n","import {tuiCreateToken, TuiHandler, TuiSafeHtml} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\n/**\n * Source path processor for svg\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nexport const TUI_SVG_SRC_PROCESSOR =\n tuiCreateToken<TuiHandler<TuiSafeHtml, TuiSafeHtml>>(identity);\n","import {tuiCreateToken} from '@taiga-ui/cdk';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\n/**\n * Appearance for inputs\n * @deprecated use {@link TUI_TEXTFIELD_APPEARANCE_DIRECTIVE} instead\n * TODO: Remove in 4.0\n */\nexport const TUI_TEXTFIELD_APPEARANCE = tuiCreateToken<string>(TuiAppearance.Textfield);\n","import {InjectionToken, Provider, Type} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n/**\n * An interface to communicate with textfield based controls\n */\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n `[TUI_TEXTFIELD_HOST]`,\n);\n\nexport function tuiAsTextfieldHost(useExisting: Type<TuiTextfieldHost>): Provider {\n return {\n provide: TUI_TEXTFIELD_HOST,\n useExisting,\n };\n}\n","import {tuiCreateToken} from '@taiga-ui/cdk';\n\nexport const TUI_THEME = tuiCreateToken(`Taiga`);\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\n/**\n * Buffer token to pass NG_VALUE_ACCESSOR to a different Injector\n */\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n `[TUI_VALUE_ACCESSOR]`,\n);\n","import {inject, Provider, Type} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiCreateTokenFromFactory} from '@taiga-ui/cdk';\nimport {TuiRectAccessor} from '@taiga-ui/core/abstract';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = tuiCreateTokenFromFactory<TuiRectAccessor>(() => {\n const win = inject(WINDOW);\n\n return {\n type: `viewport`,\n getClientRect() {\n return {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: win.innerHeight,\n };\n },\n };\n});\n\nexport function tuiAsViewport(useExisting: Type<TuiRectAccessor>): Provider {\n return {\n provide: TUI_VIEWPORT,\n useExisting,\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TOKEN"],"mappings":";;;;;;;;;;;AAIa,MAAA,kBAAkB,GAAG,yBAAyB,CACvD,MAAK;;AACD,IAAA,OAAA,MAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,UAAU,MAAG,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAA,CAAA,gCAAA,CAAkC,EACxE,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,CAAA;AAAA,CAAA;;ACFtB,MAAM,+BAA+B,GAAG,IAAI;AAEnD;;AAEG;MACU,uBAAuB,GAAG,yBAAyB,CAAS,MACr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kBAAkB,GAAG,IAAI,cAAc,CAChD,CAAsB,oBAAA,CAAA,EACxB;AAEI,SAAU,kBAAkB,CAAC,WAAmC,EAAA;IAClE,OAAO;AACH,QAAA,OAAO,EAAE,kBAAkB;QAC3B,WAAW;KACd,CAAC;AACN;;MCba,SAAS,GAAG,cAAc,CAAC,CAAA,KAAA,CAAO;;ACC/C;;AAEG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAChD,CAAsB,oBAAA,CAAA;;ACF1B;;AAEG;AACU,MAAA,YAAY,GAAG,yBAAyB,CAAkB,MAAK;AACxE,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAE3B,OAAO;AACH,QAAA,IAAI,EAAE,CAAU,QAAA,CAAA;QAChB,aAAa,GAAA;YACT,OAAO;AACH,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG,CAAC,UAAU;gBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;gBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;gBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;aAC1B,CAAC;SACL;KACJ,CAAC;AACN,CAAC,EAAE;AAEG,SAAU,aAAa,CAAC,WAAkC,EAAA;IAC5D,OAAO;AACH,QAAA,OAAO,EAAE,YAAY;QACrB,WAAW;KACd,CAAC;AACN;;AC/BA;;AAEG;;;;"}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Various sizes for components
|
|
3
|
+
*
|
|
4
|
+
* 'xxs' - extra extra small
|
|
5
|
+
* 'xs' - extra small
|
|
6
|
+
* 's' - small
|
|
7
|
+
* 'm' - medium (typically default)
|
|
8
|
+
* 'l' - large
|
|
9
|
+
* 'xl' - extra large
|
|
10
|
+
* 'xxl' - extra extra large
|
|
11
|
+
*/
|
|
1
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Generated bundle index. Do not edit.
|
|
15
|
+
*/
|
|
2
16
|
//# sourceMappingURL=taiga-ui-core-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-types.js","sources":["../../../projects/core/types/size.ts","../../../projects/core/types/taiga-ui-core-types.ts"],"sourcesContent":["/**\n * Various sizes for components\n *\n * 'xxs' - extra extra small\n * 'xs' - extra small\n * 's' - small\n * 'm' - medium (typically default)\n * 'l' - large\n * 'xl' - extra large\n * 'xxl' - extra extra large\n */\n\nexport type TuiSizeM = 'm';\n\nexport type TuiSizeS = TuiSizeM | 's';\n\nexport type TuiSizeL = TuiSizeM | 'l';\n\nexport type TuiSizeXS = TuiSizeS | 'xs';\n\nexport type TuiSizeXXS = TuiSizeXS | 'xxs';\n\nexport type TuiSizeXL = TuiSizeL | 'xl';\n\nexport type TuiSizeXXL = TuiSizeXL | 'xxl';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;AAUG;;ACVH;;AAEG"}
|
|
@@ -9,6 +9,11 @@ function tuiCheckFixedPosition(element) {
|
|
|
9
9
|
tuiCheckFixedPosition(element.parentElement));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Calculates size of safe area on mobile devices (status bars)
|
|
14
|
+
*
|
|
15
|
+
* ATTENTION: Only use in browser environment
|
|
16
|
+
*/
|
|
12
17
|
function tuiGetSafeAreaSize() {
|
|
13
18
|
if (!CSS.supports(`padding-top: env(safe-area-inset-top)`)) {
|
|
14
19
|
return 0;
|
|
@@ -25,14 +30,55 @@ function tuiGetScreenWidth(doc) {
|
|
|
25
30
|
return Math.max(doc.documentElement.clientWidth, doc.defaultView ? doc.defaultView.innerWidth : 0);
|
|
26
31
|
}
|
|
27
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @description:
|
|
35
|
+
* Cross-browser @media (height)
|
|
36
|
+
*
|
|
37
|
+
* 1. window.innerWidth
|
|
38
|
+
* 1.1. gets CSS viewport @media (height) which include scrollbars
|
|
39
|
+
* 1.2. initial-scale and zoom variations may cause mobile values to
|
|
40
|
+
* wrongly scale down to what PPK calls the visual
|
|
41
|
+
* viewport and be smaller than the @media values
|
|
42
|
+
* 1.3. zoom may cause values to be 1px off due to native rounding
|
|
43
|
+
*
|
|
44
|
+
* 2. document.documentElement.clientHeight
|
|
45
|
+
* 2.1. equals CSS viewport width minus scrollbar width
|
|
46
|
+
* 2.2. matches @media (height) when there is no scrollbar
|
|
47
|
+
* 2.3. available cross-browser
|
|
48
|
+
* 2.4. inaccurate if doctype is missing
|
|
49
|
+
*/
|
|
28
50
|
function tuiGetViewportHeight({ document, innerHeight }) {
|
|
29
51
|
return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);
|
|
30
52
|
}
|
|
31
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @description:
|
|
56
|
+
* Cross-browser @media (width)
|
|
57
|
+
*
|
|
58
|
+
* 1. window.innerWidth
|
|
59
|
+
* 1.1. gets CSS viewport @media (width) which include scrollbars
|
|
60
|
+
* 1.2. initial-scale and zoom variations may cause mobile values to
|
|
61
|
+
* wrongly scale down to what PPK calls the visual
|
|
62
|
+
* viewport and be smaller than the @media values
|
|
63
|
+
* 1.3. zoom may cause values to be 1px off due to native rounding
|
|
64
|
+
*
|
|
65
|
+
* 2. document.documentElement.clientWidth
|
|
66
|
+
* 2.1. equals CSS viewport width minus scrollbar width
|
|
67
|
+
* 2.2. matches @media (width) when there is no scrollbar
|
|
68
|
+
* 2.3. available cross-browser
|
|
69
|
+
* 2.4. inaccurate if doctype is missing
|
|
70
|
+
*/
|
|
32
71
|
function tuiGetViewportWidth({ document, innerWidth }) {
|
|
33
72
|
return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);
|
|
34
73
|
}
|
|
35
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Creates a cloned range with its boundaries set at word boundaries
|
|
77
|
+
*
|
|
78
|
+
* @param currentRange a range to clone
|
|
79
|
+
* @return modified range
|
|
80
|
+
*/
|
|
81
|
+
// eslint-disable-next-line max-statements
|
|
36
82
|
function tuiGetWordRange(currentRange) {
|
|
37
83
|
const range = currentRange.cloneRange();
|
|
38
84
|
const { startContainer, startOffset, endContainer, endOffset } = range;
|
|
@@ -107,5 +153,9 @@ function tuiProcessIcon(source, name) {
|
|
|
107
153
|
return `<g id="${name}" xmlns="http://www.w3.org/2000/svg"><svg x="50%" y="50%" width="${width / 16}em" height="${height / 16}em" overflow="visible" viewBox="0 0 ${width} ${height}"><svg x="${-width / 2}" y="${-height / 2}">${src}</svg></svg></g>`;
|
|
108
154
|
}
|
|
109
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Generated bundle index. Do not edit.
|
|
158
|
+
*/
|
|
159
|
+
|
|
110
160
|
export { tuiCheckFixedPosition, tuiGetSafeAreaSize, tuiGetScreenWidth, tuiGetViewportHeight, tuiGetViewportWidth, tuiGetWordRange, tuiProcessIcon };
|
|
111
161
|
//# sourceMappingURL=taiga-ui-core-utils-dom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-safe-area-size.ts","../../../projects/core/utils/dom/get-screen-width.ts","../../../projects/core/utils/dom/get-viewport-height.ts","../../../projects/core/utils/dom/get-viewport-width.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/process-icon.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element: HTMLElement | null): boolean {\n if (!element || typeof getComputedStyle === `undefined`) {\n return false;\n }\n\n const style = getComputedStyle(element);\n\n return (\n style.getPropertyValue(`position`) === `fixed` ||\n tuiCheckFixedPosition(element.parentElement)\n );\n}\n","/**\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function tuiGetSafeAreaSize(): number {\n if (!CSS.supports(`padding-top: env(safe-area-inset-top)`)) {\n return 0;\n }\n\n const div = document.createElement(`div`);\n\n div.style.paddingTop = `env(safe-area-inset-top)`;\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","export function tuiGetScreenWidth(doc: Document): number {\n return Math.max(\n doc.documentElement.clientWidth,\n doc.defaultView ? doc.defaultView.innerWidth : 0,\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n","/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_SPACE, svgNodeFilter} from '@taiga-ui/cdk';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\n// eslint-disable-next-line max-statements\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || ``;\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(` `),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || ``;\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(` `),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","const WIDTH_SEARCH = `width=\"`;\nconst HEIGHT_SEARCH = `height=\"`;\nconst START = `<svg`;\n\nexport function tuiProcessIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf(`>`)));\n\n if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf(`\"`, widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf(`\"`, heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes(`%`) ||\n heightString.includes(`%`) ||\n widthString.includes(`em`) ||\n heightString.includes(`em`)\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA2B,EAAA;AAC7D,IAAA,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;AACrD,QAAA,OAAO,KAAK,CAAC;AAChB,KAAA;AAED,IAAA,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAExC,QACI,KAAK,CAAC,gBAAgB,CAAC,CAAU,QAAA,CAAA,CAAC,KAAK,CAAO,KAAA,CAAA;AAC9C,QAAA,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC,EAC9C;AACN;;SCNgB,kBAAkB,GAAA;AAC9B,IAAA,IAAI,CA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EAAE,YAAY,CAAC,CACxC,CAAC;AAEF,IAAA,IACI,CAAC,YAAY;AACb,QAAA,CAAC,WAAW;AACZ,QAAA,WAAW,CAAC,QAAQ,CAAC,CAAA,CAAA,CAAG,CAAC;AACzB,QAAA,YAAY,CAAC,QAAQ,CAAC,CAAA,CAAA,CAAG,CAAC;AAC1B,QAAA,WAAW,CAAC,QAAQ,CAAC,CAAA,EAAA,CAAI,CAAC;AAC1B,QAAA,YAAY,CAAC,QAAQ,CAAC,CAAA,EAAA,CAAI,CAAC,EAC7B;QACE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAY,SAAA,EAAA,IAAI,CAAG,CAAA,CAAA,CAAC,CAAC;AAClD,KAAA;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE1C,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,kEAAA,EACjB,KAAK,GAAG,EACZ,CAAA,YAAA,EACI,MAAM,GAAG,EACb,CAAA,oCAAA,EAAuC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAA,UAAA,EAAa,CAAC,KAAK,GAAG,CAAC,CACzE,KAAA,EAAA,CAAC,MAAM,GAAG,CACd,CAAA,EAAA,EAAK,GAAG,CAAA,gBAAA,CAAkB,CAAC;AAC/B;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-safe-area-size.ts","../../../projects/core/utils/dom/get-screen-width.ts","../../../projects/core/utils/dom/get-viewport-height.ts","../../../projects/core/utils/dom/get-viewport-width.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/process-icon.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element: HTMLElement | null): boolean {\n if (!element || typeof getComputedStyle === `undefined`) {\n return false;\n }\n\n const style = getComputedStyle(element);\n\n return (\n style.getPropertyValue(`position`) === `fixed` ||\n tuiCheckFixedPosition(element.parentElement)\n );\n}\n","/**\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function tuiGetSafeAreaSize(): number {\n if (!CSS.supports(`padding-top: env(safe-area-inset-top)`)) {\n return 0;\n }\n\n const div = document.createElement(`div`);\n\n div.style.paddingTop = `env(safe-area-inset-top)`;\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","export function tuiGetScreenWidth(doc: Document): number {\n return Math.max(\n doc.documentElement.clientWidth,\n doc.defaultView ? doc.defaultView.innerWidth : 0,\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n","/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_SPACE, svgNodeFilter} from '@taiga-ui/cdk';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\n// eslint-disable-next-line max-statements\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || ``;\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(` `),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || ``;\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(` `),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","const WIDTH_SEARCH = `width=\"`;\nconst HEIGHT_SEARCH = `height=\"`;\nconst START = `<svg`;\n\nexport function tuiProcessIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf(`>`)));\n\n if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf(`\"`, widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf(`\"`, heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes(`%`) ||\n heightString.includes(`%`) ||\n widthString.includes(`em`) ||\n heightString.includes(`em`)\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA2B,EAAA;AAC7D,IAAA,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;AACrD,QAAA,OAAO,KAAK,CAAC;AAChB,KAAA;AAED,IA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