@taiga-ui/core 2.55.0 → 2.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-core-abstract.umd.js +15 -15
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.js +138 -138
- package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +11 -11
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +16 -16
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +34 -34
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +24 -24
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +38 -38
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +4 -4
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +12 -12
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +19 -19
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +47 -47
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +10 -10
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +4 -4
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +11 -11
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +4 -4
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +8 -8
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +7 -7
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +54 -54
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +4 -4
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +26 -26
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +8 -8
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +15 -15
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +2 -2
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +7 -7
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +17 -17
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.js +6 -6
- package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.js +8 -8
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +11 -11
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +8 -8
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +7 -7
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +4 -4
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +5 -5
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +35 -35
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +9 -9
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.js +2 -2
- package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +3 -3
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +2 -2
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +7 -7
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +40 -40
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +16 -16
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +17 -17
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +28 -28
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +12 -12
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.js +4 -4
- package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/dropdown-controller/taiga-ui-core-directives-dropdown-controller.metadata.json +1 -1
- package/esm2015/abstract/abstract-dropdown.js +12 -12
- package/esm2015/abstract/abstract-hint-options.js +2 -2
- package/esm2015/abstract/abstract-hint.js +4 -4
- package/esm2015/animations/animations.js +140 -140
- package/esm2015/components/alert/alert.component.js +10 -10
- package/esm2015/components/alert/alert.service.js +3 -3
- package/esm2015/components/button/button-options.js +3 -3
- package/esm2015/components/button/button.component.js +15 -15
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +7 -7
- package/esm2015/components/data-list/data-list.component.js +12 -12
- package/esm2015/components/data-list/data-list.directive.js +2 -2
- package/esm2015/components/data-list/opt-group.directive.js +5 -5
- package/esm2015/components/data-list/option/option.component.js +12 -12
- package/esm2015/components/dialog/dialog.component.js +12 -12
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- package/esm2015/components/dialog/dialog.providers.js +7 -7
- package/esm2015/components/dialog/dialog.service.js +5 -5
- package/esm2015/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm2015/components/error/error.component.js +5 -5
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +12 -12
- package/esm2015/components/group/group-styles.component.js +2 -2
- package/esm2015/components/group/group.component.js +7 -5
- package/esm2015/components/group/group.directive.js +15 -15
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm2015/components/hints-host/hints-host.component.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm2015/components/label/label.component.js +5 -5
- package/esm2015/components/link/link.component.js +12 -12
- package/esm2015/components/loader/loader-options.js +3 -3
- package/esm2015/components/loader/loader.component.js +3 -3
- package/esm2015/components/notification/notification.component.js +9 -9
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm2015/components/root/root.component.js +5 -5
- package/esm2015/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +7 -7
- package/esm2015/components/svg/svg.component.js +16 -16
- package/esm2015/components/theme-night/theme-night.component.js +3 -3
- package/esm2015/components/tooltip/tooltip.component.js +8 -8
- package/esm2015/constants/decimal-symbols.js +2 -2
- package/esm2015/constants/default-icons-path.js +2 -2
- package/esm2015/constants/editing-keys.js +10 -10
- package/esm2015/constants/events.js +5 -5
- package/esm2015/constants/mask-caret-trap.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/color/color.directive.js +7 -7
- package/esm2015/directives/described-by/described-by.directive.js +5 -5
- package/esm2015/directives/described-by/described-by.providers.js +3 -3
- package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
- package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm2015/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm2015/directives/hint/hint-options.js +3 -3
- package/esm2015/directives/hint/hint.directive.js +6 -6
- package/esm2015/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm2015/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/directives/table-mode/table-mode.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/enums/appearance.js +1 -1
- package/esm2015/enums/base-color.js +1 -1
- package/esm2015/enums/button-shape.js +1 -1
- package/esm2015/enums/decimal.js +1 -1
- package/esm2015/enums/dropdown-animation.js +1 -1
- package/esm2015/enums/dropdown-width.js +1 -1
- package/esm2015/enums/hint-mode.js +1 -1
- package/esm2015/enums/interactive-state.js +1 -1
- package/esm2015/enums/link-mode.js +1 -1
- package/esm2015/enums/notification.js +1 -1
- package/esm2015/enums/orientation.js +1 -1
- package/esm2015/enums/range-state.js +1 -1
- package/esm2015/enums/support-color.js +1 -1
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm2015/observables/smart-search.js +3 -3
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm2015/pipes/format-number/format-number.pipe.js +2 -2
- package/esm2015/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm2015/pipes/month/month.pipe.js +2 -2
- package/esm2015/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm2015/providers/is-mobile-resolution.provider.js +2 -2
- package/esm2015/providers/mode.provider.js +2 -2
- package/esm2015/services/hint.service.js +2 -2
- package/esm2015/services/night-theme.service.js +4 -4
- package/esm2015/services/svg.service.js +4 -4
- package/esm2015/tokens/animation-options.js +2 -2
- package/esm2015/tokens/animations-duration.js +2 -2
- package/esm2015/tokens/assert-enabled.js +2 -2
- package/esm2015/tokens/data-list-accessor.js +2 -2
- package/esm2015/tokens/data-list-host.js +2 -2
- package/esm2015/tokens/document-or-shadow-root.js +2 -2
- package/esm2015/tokens/dropdown-directive.js +2 -2
- package/esm2015/tokens/element-ref.js +2 -2
- package/esm2015/tokens/first-day-of-week.js +2 -2
- package/esm2015/tokens/i18n.js +10 -10
- package/esm2015/tokens/icon-place.js +3 -3
- package/esm2015/tokens/icons-path.js +2 -2
- package/esm2015/tokens/icons.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +3 -3
- package/esm2015/tokens/media.js +2 -2
- package/esm2015/tokens/mode.js +2 -2
- package/esm2015/tokens/notification-options.js +3 -3
- package/esm2015/tokens/number-format.js +3 -3
- package/esm2015/tokens/option-content.js +2 -2
- package/esm2015/tokens/ordered-short-week-days.js +2 -2
- package/esm2015/tokens/scroll-ref.js +2 -2
- package/esm2015/tokens/svg-content-processor.js +2 -2
- package/esm2015/tokens/svg-src-processor.js +2 -2
- package/esm2015/tokens/textfield-appearance.js +2 -2
- package/esm2015/tokens/textfield-host.js +2 -2
- package/esm2015/tokens/theme.js +3 -3
- package/esm2015/tokens/value-accessor.js +2 -2
- package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
- package/esm2015/utils/dom/check-fixed-position.js +3 -3
- package/esm2015/utils/dom/get-safe-area-size.js +4 -4
- package/esm2015/utils/dom/process-icon.js +11 -11
- package/esm2015/utils/format/format-number.js +5 -5
- package/esm2015/utils/format/format-phone.js +9 -9
- package/esm2015/utils/format/get-fractional-part-padded.js +3 -3
- package/esm2015/utils/format/number-to-string-without-exp.js +3 -3
- package/esm2015/utils/format/other-decimal-symbol.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +11 -11
- package/esm2015/utils/mask/create-correction-mask.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +13 -13
- package/esm2015/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm2015/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm2015/utils/miscellaneous/color-fallback.js +8 -8
- package/esm2015/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm2015/utils/miscellaneous/size-bigger.js +3 -3
- package/esm2015/utils/polyfills/inner-html.js +5 -5
- package/esm5/abstract/abstract-dropdown.js +12 -12
- package/esm5/abstract/abstract-hint-options.js +2 -2
- package/esm5/abstract/abstract-hint.js +4 -4
- package/esm5/animations/animations.js +140 -140
- package/esm5/components/alert/alert.component.js +10 -10
- package/esm5/components/alert/alert.service.js +3 -3
- package/esm5/components/button/button-options.js +3 -3
- package/esm5/components/button/button.component.js +15 -15
- package/esm5/components/calendar/calendar.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +8 -8
- package/esm5/components/data-list/data-list.component.js +12 -12
- package/esm5/components/data-list/data-list.directive.js +2 -2
- package/esm5/components/data-list/opt-group.directive.js +5 -5
- package/esm5/components/data-list/option/option.component.js +12 -12
- package/esm5/components/dialog/dialog.component.js +12 -12
- package/esm5/components/dialog/dialog.directive.js +4 -4
- package/esm5/components/dialog/dialog.providers.js +7 -7
- package/esm5/components/dialog/dialog.service.js +5 -5
- package/esm5/components/dropdown-box/dropdown-box.component.js +39 -39
- package/esm5/components/error/error.component.js +5 -5
- package/esm5/components/expand/expand-content.directive.js +2 -2
- package/esm5/components/expand/expand.component.js +12 -12
- package/esm5/components/group/group-styles.component.js +2 -2
- package/esm5/components/group/group.component.js +5 -5
- package/esm5/components/group/group.directive.js +15 -15
- package/esm5/components/hints-host/hint-box/hint-box.component.js +46 -46
- package/esm5/components/hints-host/hints-host.component.js +3 -3
- package/esm5/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
- package/esm5/components/label/label.component.js +5 -5
- package/esm5/components/link/link.component.js +12 -12
- package/esm5/components/loader/loader-options.js +3 -3
- package/esm5/components/loader/loader.component.js +3 -3
- package/esm5/components/notification/notification.component.js +9 -9
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm5/components/primitive-checkbox/checkbox-options.js +5 -5
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
- package/esm5/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +4 -4
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +28 -28
- package/esm5/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
- package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm5/components/root/root.component.js +5 -5
- package/esm5/components/scroll-controls/scroll-controls.component.js +4 -4
- package/esm5/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm5/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm5/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm5/components/scrollbar/scrollable.directive.js +2 -2
- package/esm5/components/scrollbar/scrollbar.component.js +7 -7
- package/esm5/components/svg/svg.component.js +16 -16
- package/esm5/components/theme-night/theme-night.component.js +3 -3
- package/esm5/components/tooltip/tooltip.component.js +8 -8
- package/esm5/constants/decimal-symbols.js +2 -2
- package/esm5/constants/default-icons-path.js +2 -2
- package/esm5/constants/editing-keys.js +10 -10
- package/esm5/constants/events.js +5 -5
- package/esm5/constants/mask-caret-trap.js +2 -2
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/color/color.directive.js +7 -7
- package/esm5/directives/described-by/described-by.directive.js +5 -5
- package/esm5/directives/described-by/described-by.providers.js +5 -5
- package/esm5/directives/dropdown/dropdown.directive.js +3 -3
- package/esm5/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm5/directives/dropdown-controller/dropdown-controller.token.js +2 -2
- package/esm5/directives/hint/hint-options.js +3 -3
- package/esm5/directives/hint/hint.directive.js +6 -6
- package/esm5/directives/hint-controller/hint-controller.directive.js +7 -7
- package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.token.js +2 -2
- package/esm5/directives/manual-hint/manual-hint-options.js +2 -2
- package/esm5/directives/manual-hint/manual-hint.directive.js +4 -4
- package/esm5/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm5/directives/mode/mode.directive.js +3 -3
- package/esm5/directives/pointer-hint/pointer-hint-options.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +5 -5
- package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm5/directives/table-mode/table-mode.directive.js +3 -3
- package/esm5/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-example-text.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-max-length.directive.js +4 -4
- package/esm5/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield-type.directive.js +5 -5
- package/esm5/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm5/directives/wrapper/wrapper.directive.js +10 -10
- package/esm5/enums/appearance.js +1 -1
- package/esm5/enums/base-color.js +1 -1
- package/esm5/enums/button-shape.js +1 -1
- package/esm5/enums/decimal.js +1 -1
- package/esm5/enums/dropdown-animation.js +1 -1
- package/esm5/enums/dropdown-width.js +1 -1
- package/esm5/enums/hint-mode.js +1 -1
- package/esm5/enums/interactive-state.js +1 -1
- package/esm5/enums/link-mode.js +1 -1
- package/esm5/enums/notification.js +1 -1
- package/esm5/enums/orientation.js +1 -1
- package/esm5/enums/range-state.js +1 -1
- package/esm5/enums/support-color.js +1 -1
- package/esm5/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
- package/esm5/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm5/observables/smart-search.js +3 -3
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm5/pipes/format-number/format-number.pipe.js +2 -2
- package/esm5/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm5/pipes/month/month.pipe.js +2 -2
- package/esm5/pipes/pluralize/pluralize.pipe.js +2 -2
- package/esm5/providers/is-mobile-resolution.provider.js +2 -2
- package/esm5/providers/mode.provider.js +2 -2
- package/esm5/services/hint.service.js +2 -2
- package/esm5/services/night-theme.service.js +4 -4
- package/esm5/services/svg.service.js +4 -4
- package/esm5/tokens/animation-options.js +2 -2
- package/esm5/tokens/animations-duration.js +2 -2
- package/esm5/tokens/assert-enabled.js +2 -2
- package/esm5/tokens/data-list-accessor.js +2 -2
- package/esm5/tokens/data-list-host.js +2 -2
- package/esm5/tokens/document-or-shadow-root.js +2 -2
- package/esm5/tokens/dropdown-directive.js +2 -2
- package/esm5/tokens/element-ref.js +2 -2
- package/esm5/tokens/first-day-of-week.js +2 -2
- package/esm5/tokens/i18n.js +10 -10
- package/esm5/tokens/icon-place.js +3 -3
- package/esm5/tokens/icons-path.js +2 -2
- package/esm5/tokens/icons.js +2 -2
- package/esm5/tokens/is-mobile-resolution.js +3 -3
- package/esm5/tokens/media.js +2 -2
- package/esm5/tokens/mode.js +2 -2
- package/esm5/tokens/notification-options.js +3 -3
- package/esm5/tokens/number-format.js +3 -3
- package/esm5/tokens/option-content.js +2 -2
- package/esm5/tokens/ordered-short-week-days.js +2 -2
- package/esm5/tokens/scroll-ref.js +2 -2
- package/esm5/tokens/svg-content-processor.js +2 -2
- package/esm5/tokens/svg-src-processor.js +2 -2
- package/esm5/tokens/textfield-appearance.js +2 -2
- package/esm5/tokens/textfield-host.js +2 -2
- package/esm5/tokens/theme.js +3 -3
- package/esm5/tokens/value-accessor.js +2 -2
- package/esm5/utils/dom/are-css-vars-supported.js +2 -2
- package/esm5/utils/dom/check-fixed-position.js +3 -3
- package/esm5/utils/dom/get-safe-area-size.js +4 -4
- package/esm5/utils/dom/process-icon.js +11 -11
- package/esm5/utils/format/format-number.js +5 -5
- package/esm5/utils/format/format-phone.js +9 -9
- package/esm5/utils/format/get-fractional-part-padded.js +3 -3
- package/esm5/utils/format/number-to-string-without-exp.js +3 -3
- package/esm5/utils/format/other-decimal-symbol.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-money-pipe.js +12 -12
- package/esm5/utils/mask/create-correction-mask.js +3 -3
- package/esm5/utils/mask/create-number-mask.js +13 -13
- package/esm5/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm5/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm5/utils/miscellaneous/color-fallback.js +8 -8
- package/esm5/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm5/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm5/utils/miscellaneous/size-bigger.js +3 -3
- package/esm5/utils/polyfills/inner-html.js +5 -5
- package/fesm2015/taiga-ui-core-abstract.js +15 -15
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-animations.js +138 -138
- package/fesm2015/taiga-ui-core-animations.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +11 -11
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +16 -16
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +33 -33
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +24 -24
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +4 -4
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +12 -12
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +21 -19
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +4 -4
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +11 -11
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +4 -4
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +8 -8
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +4 -4
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +15 -15
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +17 -17
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-color.js +6 -6
- package/fesm2015/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-described-by.js +6 -6
- package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +7 -7
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-observables.js +2 -2
- package/fesm2015/taiga-ui-core-observables.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +2 -2
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +7 -7
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +40 -40
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +16 -16
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +17 -17
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +27 -27
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +15 -15
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-animations.js +138 -138
- package/fesm5/taiga-ui-core-animations.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +11 -11
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js +16 -16
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js +1 -1
- package/fesm5/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +34 -34
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +24 -24
- package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +38 -38
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-error.js +4 -4
- package/fesm5/taiga-ui-core-components-error.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +12 -12
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js +19 -19
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +47 -47
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +4 -4
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-link.js +11 -11
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +4 -4
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-notification.js +8 -8
- package/fesm5/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +54 -54
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js +2 -2
- package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +4 -4
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +26 -26
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +8 -8
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-svg.js +15 -15
- package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm5/taiga-ui-core-components-theme-night.js +2 -2
- package/fesm5/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +17 -17
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-color.js +6 -6
- package/fesm5/taiga-ui-core-directives-color.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-described-by.js +8 -8
- package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +11 -11
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown.js +2 -2
- package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +8 -8
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +7 -7
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +4 -4
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +5 -5
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm5/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js +2 -2
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +35 -35
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-core-enums.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
- package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-observables.js +2 -2
- package/fesm5/taiga-ui-core-observables.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm5/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js +1 -1
- package/fesm5/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js +1 -1
- package/fesm5/taiga-ui-core-pipes-pluralize.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +2 -2
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +7 -7
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +40 -40
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +16 -16
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +17 -17
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +28 -28
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-miscellaneous.js +12 -12
- package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js +4 -4
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ import { isEdgeOlderThan } from '@taiga-ui/cdk';
|
|
|
6
6
|
*/
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
8
|
function areCssVarsSupported(cssRef, userAgent) {
|
|
9
|
-
return cssRef.supports(
|
|
9
|
+
return cssRef.supports("(--a: 0)") && !isEdgeOlderThan(17, userAgent);
|
|
10
10
|
}
|
|
11
11
|
var tuiAreCssVarsSupported = areCssVarsSupported;
|
|
12
12
|
|
|
@@ -15,11 +15,11 @@ var tuiAreCssVarsSupported = areCssVarsSupported;
|
|
|
15
15
|
*/
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
17
17
|
function checkFixedPosition(element) {
|
|
18
|
-
if (!element || typeof getComputedStyle ===
|
|
18
|
+
if (!element || typeof getComputedStyle === "undefined") {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
var style = getComputedStyle(element);
|
|
22
|
-
return (style.getPropertyValue(
|
|
22
|
+
return (style.getPropertyValue("position") === "fixed" ||
|
|
23
23
|
checkFixedPosition(element.parentElement));
|
|
24
24
|
}
|
|
25
25
|
var tuiCheckFixedPosition = checkFixedPosition;
|
|
@@ -32,11 +32,11 @@ var tuiCheckFixedPosition = checkFixedPosition;
|
|
|
32
32
|
*/
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
34
34
|
function getSafeAreaSize() {
|
|
35
|
-
if (!CSS.supports(
|
|
35
|
+
if (!CSS.supports("padding-top: env(safe-area-inset-top)")) {
|
|
36
36
|
return 0;
|
|
37
37
|
}
|
|
38
|
-
var div = document.createElement(
|
|
39
|
-
div.style.paddingTop =
|
|
38
|
+
var div = document.createElement("div");
|
|
39
|
+
div.style.paddingTop = "env(safe-area-inset-top)";
|
|
40
40
|
document.body.appendChild(div);
|
|
41
41
|
var safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;
|
|
42
42
|
document.body.removeChild(div);
|
|
@@ -97,9 +97,9 @@ function tuiGetViewportWidth(_a) {
|
|
|
97
97
|
return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
var WIDTH_SEARCH =
|
|
101
|
-
var HEIGHT_SEARCH =
|
|
102
|
-
var START =
|
|
100
|
+
var WIDTH_SEARCH = "width=\"";
|
|
101
|
+
var HEIGHT_SEARCH = "height=\"";
|
|
102
|
+
var START = "<svg";
|
|
103
103
|
/**
|
|
104
104
|
* @deprecated: use {@link tuiProcessIcon} instead
|
|
105
105
|
*/
|
|
@@ -109,7 +109,7 @@ function processIcon(source, name) {
|
|
|
109
109
|
return source;
|
|
110
110
|
}
|
|
111
111
|
var src = source.slice(Math.max(0, source.indexOf(START)));
|
|
112
|
-
var attributes = src.slice(0, Math.max(0, src.indexOf(
|
|
112
|
+
var attributes = src.slice(0, Math.max(0, src.indexOf(">")));
|
|
113
113
|
if (!attributes ||
|
|
114
114
|
!attributes.includes(WIDTH_SEARCH) ||
|
|
115
115
|
!attributes.includes(HEIGHT_SEARCH)) {
|
|
@@ -119,14 +119,14 @@ function processIcon(source, name) {
|
|
|
119
119
|
var indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);
|
|
120
120
|
var widthOffset = indexOfWidth + WIDTH_SEARCH.length;
|
|
121
121
|
var heightOffset = indexOfHeight + HEIGHT_SEARCH.length;
|
|
122
|
-
var widthString = attributes.slice(widthOffset, attributes.indexOf(
|
|
123
|
-
var heightString = attributes.slice(heightOffset, attributes.indexOf(
|
|
122
|
+
var widthString = attributes.slice(widthOffset, attributes.indexOf("\"", widthOffset));
|
|
123
|
+
var heightString = attributes.slice(heightOffset, attributes.indexOf("\"", heightOffset));
|
|
124
124
|
if (!heightString ||
|
|
125
125
|
!widthString ||
|
|
126
|
-
widthString.includes(
|
|
127
|
-
heightString.includes(
|
|
128
|
-
widthString.includes(
|
|
129
|
-
heightString.includes(
|
|
126
|
+
widthString.includes("%") ||
|
|
127
|
+
heightString.includes("%") ||
|
|
128
|
+
widthString.includes("em") ||
|
|
129
|
+
heightString.includes("em")) {
|
|
130
130
|
return src.replace(START, "<svg id=\"" + name + "\"");
|
|
131
131
|
}
|
|
132
132
|
var width = parseInt(widthString, 10);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["ng://@taiga-ui/core/utils/dom/are-css-vars-supported.ts","ng://@taiga-ui/core/utils/dom/check-fixed-position.ts","ng://@taiga-ui/core/utils/dom/get-safe-area-size.ts","ng://@taiga-ui/core/utils/dom/get-screen-width.ts","ng://@taiga-ui/core/utils/dom/get-viewport-height.ts","ng://@taiga-ui/core/utils/dom/get-viewport-width.ts","ng://@taiga-ui/core/utils/dom/process-icon.ts","ng://@taiga-ui/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["import {isEdgeOlderThan} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiAreCssVarsSupported} instead\n * TODO: 3.0 remove this function\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function areCssVarsSupported(cssRef: typeof CSS, userAgent: string): boolean {\n return cssRef.supports(
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["ng://@taiga-ui/core/utils/dom/are-css-vars-supported.ts","ng://@taiga-ui/core/utils/dom/check-fixed-position.ts","ng://@taiga-ui/core/utils/dom/get-safe-area-size.ts","ng://@taiga-ui/core/utils/dom/get-screen-width.ts","ng://@taiga-ui/core/utils/dom/get-viewport-height.ts","ng://@taiga-ui/core/utils/dom/get-viewport-width.ts","ng://@taiga-ui/core/utils/dom/process-icon.ts","ng://@taiga-ui/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["import {isEdgeOlderThan} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiAreCssVarsSupported} instead\n * TODO: 3.0 remove this function\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function areCssVarsSupported(cssRef: typeof CSS, userAgent: string): boolean {\n return cssRef.supports(`(--a: 0)`) && !isEdgeOlderThan(17, userAgent);\n}\n\nexport const tuiAreCssVarsSupported = areCssVarsSupported;\n","/**\n * @deprecated: use {@link tuiCheckFixedPosition} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function checkFixedPosition(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 checkFixedPosition(element.parentElement)\n );\n}\n\nexport const tuiCheckFixedPosition = checkFixedPosition;\n","/**\n * @deprecated: use {@link tuiGetSafeAreaSize} instead\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getSafeAreaSize(): 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\nexport const tuiGetSafeAreaSize = getSafeAreaSize;\n","/**\n * @deprecated: use {@link tuiGetScreenWidth} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getScreenWidth(documentRef: Document): number {\n return Math.max(\n documentRef.documentElement.clientWidth,\n documentRef.defaultView ? documentRef.defaultView.innerWidth : 0,\n );\n}\n\nexport const tuiGetScreenWidth = getScreenWidth;\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","const WIDTH_SEARCH = `width=\"`;\nconst HEIGHT_SEARCH = `height=\"`;\nconst START = `<svg`;\n\n/**\n * @deprecated: use {@link tuiProcessIcon} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function processIcon(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 (\n !attributes ||\n !attributes.includes(WIDTH_SEARCH) ||\n !attributes.includes(HEIGHT_SEARCH)\n ) {\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\nexport const tuiProcessIcon = processIcon;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA;;;;AAIA;SACgB,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IACrE,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1E,CAAC;IAEY,sBAAsB,GAAG;;ACXtC;;;AAGA;SACgB,kBAAkB,CAAC,OAA2B;IAC1D,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;QACrD,OAAO,KAAK,CAAC;KAChB;IAED,IAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAExC,QACI,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO;QAC9C,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,EAC3C;AACN,CAAC;IAEY,qBAAqB,GAAG;;ACjBrC;;;;;;AA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QACb,CAAC,WAAW;QACZ,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC;QACzB,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC1B,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC1B,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B;QACE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,eAAY,IAAI,OAAG,CAAC,CAAC;KAClD;IAED,IAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACxC,IAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE1C,OAAO,aAAU,IAAI,kFACjB,KAAK,GAAG,EAAE,sBAEV,MAAM,GAAG,EAAE,gDACwB,KAAK,SAAI,MAAM,oBAAa,CAAC,KAAK,GAAG,CAAC,eACzE,CAAC,MAAM,GAAG,CAAC,WACV,GAAG,qBAAkB,CAAC;AAC/B,CAAC;IAEY,cAAc,GAAG;;AC/D9B;;;;;;"}
|
|
@@ -34,10 +34,10 @@ var tuiCapitalizeFirstLetter = capitalizeFirstLetter;
|
|
|
34
34
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
35
35
|
function numberToStringWithoutExp(value) {
|
|
36
36
|
var valueAsString = String(value);
|
|
37
|
-
var _a = __read(valueAsString.split(
|
|
37
|
+
var _a = __read(valueAsString.split("e-"), 2), numberPart = _a[0], expPart = _a[1];
|
|
38
38
|
var valueWithoutExp = valueAsString;
|
|
39
39
|
if (expPart) {
|
|
40
|
-
var _b = __read(numberPart.split(
|
|
40
|
+
var _b = __read(numberPart.split("."), 2), fractionalPart = _b[1];
|
|
41
41
|
var decimalDigits = Number(expPart) + ((fractionalPart === null || fractionalPart === void 0 ? void 0 : fractionalPart.length) || 0);
|
|
42
42
|
valueWithoutExp = value.toFixed(decimalDigits);
|
|
43
43
|
}
|
|
@@ -55,8 +55,8 @@ var tuiNumberToStringWithoutExp = numberToStringWithoutExp;
|
|
|
55
55
|
*/
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
57
57
|
function getFractionPartPadded(value, precision) {
|
|
58
|
-
var _a = __read(numberToStringWithoutExp(value).split(
|
|
59
|
-
return typeof precision ===
|
|
58
|
+
var _a = __read(numberToStringWithoutExp(value).split("."), 2), _b = _a[1], fractionPartPadded = _b === void 0 ? "" : _b;
|
|
59
|
+
return typeof precision === "number"
|
|
60
60
|
? fractionPartPadded.slice(0, Math.max(0, precision))
|
|
61
61
|
: fractionPartPadded;
|
|
62
62
|
}
|
|
@@ -78,7 +78,7 @@ var tuiGetFractionPartPadded = getFractionPartPadded;
|
|
|
78
78
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
79
79
|
function formatNumber(value, decimalLimit, decimalSeparator, thousandSeparator, zeroPadding) {
|
|
80
80
|
if (decimalLimit === void 0) { decimalLimit = null; }
|
|
81
|
-
if (decimalSeparator === void 0) { decimalSeparator =
|
|
81
|
+
if (decimalSeparator === void 0) { decimalSeparator = ","; }
|
|
82
82
|
if (thousandSeparator === void 0) { thousandSeparator = CHAR_NO_BREAK_SPACE; }
|
|
83
83
|
if (zeroPadding === void 0) { zeroPadding = true; }
|
|
84
84
|
var integerPartString = String(Math.floor(Math.abs(value)));
|
|
@@ -86,15 +86,15 @@ function formatNumber(value, decimalLimit, decimalSeparator, thousandSeparator,
|
|
|
86
86
|
if (decimalLimit !== null) {
|
|
87
87
|
if (zeroPadding) {
|
|
88
88
|
var zeroPaddingSize = Math.max(decimalLimit - fractionPartPadded.length, 0);
|
|
89
|
-
var zeroPartString =
|
|
89
|
+
var zeroPartString = "0".repeat(zeroPaddingSize);
|
|
90
90
|
fractionPartPadded = "" + fractionPartPadded + zeroPartString;
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
|
-
fractionPartPadded = fractionPartPadded.replace(/0*$/,
|
|
93
|
+
fractionPartPadded = fractionPartPadded.replace(/0*$/, "");
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
var remainder = integerPartString.length % 3;
|
|
97
|
-
var sign = value < 0 ? CHAR_HYPHEN :
|
|
97
|
+
var sign = value < 0 ? CHAR_HYPHEN : "";
|
|
98
98
|
var result = sign + integerPartString.charAt(0);
|
|
99
99
|
for (var i = 1; i < integerPartString.length; i++) {
|
|
100
100
|
if (i % 3 === remainder && integerPartString.length > 3) {
|
|
@@ -119,16 +119,16 @@ var tuiFormatNumber = formatNumber;
|
|
|
119
119
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
120
120
|
function formatPhone(value, countryCode, phoneMask) {
|
|
121
121
|
if (!value) {
|
|
122
|
-
return
|
|
122
|
+
return "";
|
|
123
123
|
}
|
|
124
124
|
var result = countryCode;
|
|
125
|
-
countryCode = countryCode.replace(/[()]/g,
|
|
125
|
+
countryCode = countryCode.replace(/[()]/g, "");
|
|
126
126
|
if (!value.startsWith(countryCode)) {
|
|
127
|
-
value = countryCode + value.replace(CHAR_PLUS,
|
|
127
|
+
value = countryCode + value.replace(CHAR_PLUS, "");
|
|
128
128
|
}
|
|
129
|
-
var splitPhoneMask = phoneMask.split(
|
|
130
|
-
var splitValue = value.slice(countryCode.length).split(
|
|
131
|
-
result +=
|
|
129
|
+
var splitPhoneMask = phoneMask.split("");
|
|
130
|
+
var splitValue = value.slice(countryCode.length).split("");
|
|
131
|
+
result += " ";
|
|
132
132
|
if (splitValue.length === 0) {
|
|
133
133
|
return result;
|
|
134
134
|
}
|
|
@@ -136,8 +136,8 @@ function formatPhone(value, countryCode, phoneMask) {
|
|
|
136
136
|
if (splitValue.length === 0) {
|
|
137
137
|
break;
|
|
138
138
|
}
|
|
139
|
-
if (splitPhoneMask[i] ===
|
|
140
|
-
result += splitValue[0] ||
|
|
139
|
+
if (splitPhoneMask[i] === "#") {
|
|
140
|
+
result += splitValue[0] || "";
|
|
141
141
|
splitValue.splice(0, 1);
|
|
142
142
|
}
|
|
143
143
|
else {
|
|
@@ -153,7 +153,7 @@ var tuiFormatPhone = formatPhone;
|
|
|
153
153
|
*/
|
|
154
154
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
155
155
|
function otherDecimalSymbol(symbol) {
|
|
156
|
-
return symbol ===
|
|
156
|
+
return symbol === "." ? "," : ".";
|
|
157
157
|
}
|
|
158
158
|
var tuiOtherDecimalSymbol = otherDecimalSymbol;
|
|
159
159
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-format.js","sources":["ng://@taiga-ui/core/utils/format/capitalize.ts","ng://@taiga-ui/core/utils/format/capitalize-first-letter.ts","ng://@taiga-ui/core/utils/format/number-to-string-without-exp.ts","ng://@taiga-ui/core/utils/format/get-fractional-part-padded.ts","ng://@taiga-ui/core/utils/format/format-number.ts","ng://@taiga-ui/core/utils/format/format-phone.ts","ng://@taiga-ui/core/utils/format/other-decimal-symbol.ts","ng://@taiga-ui/core/utils/format/pluralize.ts","ng://@taiga-ui/core/utils/format/pluralize-to-icu.ts","ng://@taiga-ui/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiCapitalize} instead\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n\nexport const tuiCapitalize = capitalize;\n","/**\n * @deprecated: use {@link tuiCapitalizeFirstLetter} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function capitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport const tuiCapitalizeFirstLetter = capitalizeFirstLetter;\n","/**\n * @deprecated: use {@link tuiNumberToStringWithoutExp} instead\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function numberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split('.');\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n\nexport const tuiNumberToStringWithoutExp = numberToStringWithoutExp;\n","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * @deprecated: use {@link tuiGetFractionPartPadded} instead\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');\n\n return typeof precision === 'number'\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n\nexport const tuiGetFractionPartPadded = getFractionPartPadded;\n","import {CHAR_HYPHEN, CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n// TODO: refactor later to `formatNumber(value: number, options: Partial<AllTheStuff>)`\n/**\n * @deprecated: use {@link tuiFormatNumber} instead\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n * @param decimalSeparator separator between the integer and the decimal part\n * @param thousandSeparator separator between thousands\n * @param zeroPadding enable zeros at the end of decimal part\n * @return the formatted string\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function formatNumber(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = ',',\n thousandSeparator: string = CHAR_NO_BREAK_SPACE,\n zeroPadding: boolean = true,\n): string {\n const integerPartString = String(Math.floor(Math.abs(value)));\n\n let fractionPartPadded = getFractionPartPadded(value, decimalLimit);\n\n if (decimalLimit !== null) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n\nexport const tuiFormatNumber = formatNumber;\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiFormatPhone} instead\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function formatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return '';\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, '');\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, '');\n }\n\n const splitPhoneMask = phoneMask.split('');\n const splitValue = value.slice(countryCode.length).split('');\n\n result += ' ';\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (let i = 0; i < splitPhoneMask.length; i++) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (splitPhoneMask[i] === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += splitPhoneMask[i];\n }\n }\n\n return result;\n}\n\nexport const tuiFormatPhone = formatPhone;\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * @deprecated: use {@link tuiOtherDecimalSymbol} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === '.' ? ',' : '.';\n}\n\nexport const tuiOtherDecimalSymbol = otherDecimalSymbol;\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n/**\n * Selects the correct plural form to display.\n *\n * @param value the input number\n * @param args an array of three plural forms, e.g. ['год', 'года', 'лет']\n * @deprecated This implementation targets Russian.\n * Use https://angular.io/api/common/NgPlural for your implementations.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function pluralize(value: number, [one, few, many]: TuiPluralize): string {\n const ten = value % 10;\n const hundred = value % 100;\n\n // 1, 21, 101, 121, но не 11, 111, 211...\n if (ten === 1 && hundred !== 11) {\n return one;\n }\n\n // 2, 3, 4, 22, 33, 44, 152, 163, 174, но не 12, 13, 14, 112, 213, 314...\n if (ten >= 2 && ten <= 4 && (hundred < 10 || hundred >= 20)) {\n return few;\n }\n\n return many;\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n// TODO: 3.0 remove in 3.0\n\n/**\n * Temporary util for mapping TuiPluralize array to ICU format\n */\nexport function tuiPluralizeToICU(pluralize: TuiPluralize): Record<string, string> {\n return {\n one: pluralize[0],\n few: pluralize[1],\n many: pluralize[2],\n other: pluralize[2],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;AAQA;SACgB,UAAU,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;AAClF,CAAC;IAEY,aAAa,GAAG;;ACb7B;;;AAGA;SACgB,qBAAqB,CAAC,KAAa;IAC/C,OAAO,KAAG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S,CAAC,KAAa,EAAE,EAA8B;QAA9B,kBAA8B,EAA7B,WAAG,EAAE,WAAG,EAAE,YAAI;IACpD,IAAM,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC;IACvB,IAAM,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC;;IAG5B,IAAI,GAAG,KAAK,CAAC,IAAI,OAAO,KAAK,EAAE,EAAE;QAC7B,OAAO,GAAG,CAAC;KACd;;IAGD,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,OAAO,GAAG,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,EAAE;QACzD,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB;;ACxBA;AAEA;;;SAGgB,iBAAiB,CAAC,SAAuB;IACrD,OAAO;QACH,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAClB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;KACtB,CAAC;AACN;;ACdA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-format.js","sources":["ng://@taiga-ui/core/utils/format/capitalize.ts","ng://@taiga-ui/core/utils/format/capitalize-first-letter.ts","ng://@taiga-ui/core/utils/format/number-to-string-without-exp.ts","ng://@taiga-ui/core/utils/format/get-fractional-part-padded.ts","ng://@taiga-ui/core/utils/format/format-number.ts","ng://@taiga-ui/core/utils/format/format-phone.ts","ng://@taiga-ui/core/utils/format/other-decimal-symbol.ts","ng://@taiga-ui/core/utils/format/pluralize.ts","ng://@taiga-ui/core/utils/format/pluralize-to-icu.ts","ng://@taiga-ui/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiCapitalize} instead\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n\nexport const tuiCapitalize = capitalize;\n","/**\n * @deprecated: use {@link tuiCapitalizeFirstLetter} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function capitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport const tuiCapitalizeFirstLetter = capitalizeFirstLetter;\n","/**\n * @deprecated: use {@link tuiNumberToStringWithoutExp} instead\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function numberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split(`e-`);\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split(`.`);\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n\nexport const tuiNumberToStringWithoutExp = numberToStringWithoutExp;\n","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * @deprecated: use {@link tuiGetFractionPartPadded} instead\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ``] = numberToStringWithoutExp(value).split(`.`);\n\n return typeof precision === `number`\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n\nexport const tuiGetFractionPartPadded = getFractionPartPadded;\n","import {CHAR_HYPHEN, CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n// TODO: refactor later to `formatNumber(value: number, options: Partial<AllTheStuff>)`\n/**\n * @deprecated: use {@link tuiFormatNumber} instead\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n * @param decimalSeparator separator between the integer and the decimal part\n * @param thousandSeparator separator between thousands\n * @param zeroPadding enable zeros at the end of decimal part\n * @return the formatted string\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function formatNumber(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = `,`,\n thousandSeparator: string = CHAR_NO_BREAK_SPACE,\n zeroPadding: boolean = true,\n): string {\n const integerPartString = String(Math.floor(Math.abs(value)));\n\n let fractionPartPadded = getFractionPartPadded(value, decimalLimit);\n\n if (decimalLimit !== null) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = `0`.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, ``);\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : ``;\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n\nexport const tuiFormatNumber = formatNumber;\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiFormatPhone} instead\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function formatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return ``;\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, ``);\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, ``);\n }\n\n const splitPhoneMask = phoneMask.split(``);\n const splitValue = value.slice(countryCode.length).split(``);\n\n result += ` `;\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (let i = 0; i < splitPhoneMask.length; i++) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (splitPhoneMask[i] === `#`) {\n result += splitValue[0] || ``;\n splitValue.splice(0, 1);\n } else {\n result += splitPhoneMask[i];\n }\n }\n\n return result;\n}\n\nexport const tuiFormatPhone = formatPhone;\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * @deprecated: use {@link tuiOtherDecimalSymbol} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === `.` ? `,` : `.`;\n}\n\nexport const tuiOtherDecimalSymbol = otherDecimalSymbol;\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n/**\n * Selects the correct plural form to display.\n *\n * @param value the input number\n * @param args an array of three plural forms, e.g. ['год', 'года', 'лет']\n * @deprecated This implementation targets Russian.\n * Use https://angular.io/api/common/NgPlural for your implementations.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function pluralize(value: number, [one, few, many]: TuiPluralize): string {\n const ten = value % 10;\n const hundred = value % 100;\n\n // 1, 21, 101, 121, но не 11, 111, 211...\n if (ten === 1 && hundred !== 11) {\n return one;\n }\n\n // 2, 3, 4, 22, 33, 44, 152, 163, 174, но не 12, 13, 14, 112, 213, 314...\n if (ten >= 2 && ten <= 4 && (hundred < 10 || hundred >= 20)) {\n return few;\n }\n\n return many;\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n// TODO: 3.0 remove in 3.0\n\n/**\n * Temporary util for mapping TuiPluralize array to ICU format\n */\nexport function tuiPluralizeToICU(pluralize: TuiPluralize): Record<string, string> {\n return {\n one: pluralize[0],\n few: pluralize[1],\n many: pluralize[2],\n other: pluralize[2],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;AAQA;SACgB,UAAU,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;AAClF,CAAC;IAEY,aAAa,GAAG;;ACb7B;;;AAGA;SACgB,qBAAqB,CAAC,KAAa;IAC/C,OAAO,KAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAG,CAAC;AAC/D,CAAC;IAEY,wBAAwB,GAAG;;ACRxC;;;;;;;AAOA;SACgB,wBAAwB,CAAC,KAAa;IAClD,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAA,yCAAiD,EAAhD,kBAAU,EAAE,eAAoC,CAAC;IAExD,IAAI,eAAe,GAAG,aAAa,CAAC;IAEpC,IAAI,OAAO,EAAE;QACH,IAAA,qCAA0C,EAAvC,sBAAuC,CAAC;QACjD,IAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,KAAI,CAAC,CAAC,CAAC;QAEtE,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;KAClD;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC;IAEY,2BAA2B,GAAG;;ACtB3C;;;;;;;;AAQA;SACgB,qBAAqB,CAAC,KAAa,EAAE,SAAyB;IACpE,IAAA,0DAAwE,EAArE,UAAuB,EAAvB,4CAAqE,CAAC;IAE/E,OA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*/
|
|
9
9
|
function tuiCreateAutoCorrectedNumberPipe(decimalLimit, decimalSymbol, thousandSymbol, nativeInput, allowNegative, isIOS) {
|
|
10
10
|
if (decimalLimit === void 0) { decimalLimit = 0; }
|
|
11
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
11
|
+
if (decimalSymbol === void 0) { decimalSymbol = ","; }
|
|
12
12
|
if (thousandSymbol === void 0) { thousandSymbol = CHAR_NO_BREAK_SPACE; }
|
|
13
13
|
if (isIOS === void 0) { isIOS = false; }
|
|
14
14
|
tuiAssert.assert(Number.isInteger(decimalLimit));
|
|
@@ -17,7 +17,7 @@ function tuiCreateAutoCorrectedNumberPipe(decimalLimit, decimalSymbol, thousandS
|
|
|
17
17
|
var previousCaret = -1;
|
|
18
18
|
var unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;
|
|
19
19
|
if (nativeInput && unlucky) {
|
|
20
|
-
nativeInput.addEventListener(
|
|
20
|
+
nativeInput.addEventListener("beforeinput", function () {
|
|
21
21
|
previousCaret = nativeInput.selectionStart || 0;
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -43,27 +43,27 @@ function tuiCreateAutoCorrectedNumberPipe(decimalLimit, decimalSymbol, thousandS
|
|
|
43
43
|
nativeInput.setSelectionRange(realCaretPosition_1, realCaretPosition_1);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
if (conformedValue ===
|
|
46
|
+
if (conformedValue === "" || !decimalLimit) {
|
|
47
47
|
return { value: conformedValue };
|
|
48
48
|
}
|
|
49
49
|
var withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);
|
|
50
50
|
var decimalPart = withDecimalSymbol.split(decimalSymbol)[1];
|
|
51
51
|
var zeroPaddingSize = decimalLimit - decimalPart.length;
|
|
52
52
|
return {
|
|
53
|
-
value: withDecimalSymbol +
|
|
53
|
+
value: withDecimalSymbol + "0".repeat(zeroPaddingSize),
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function addDecimalSymbolIfNeeded(value, decimalSymbol) {
|
|
58
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
58
|
+
if (decimalSymbol === void 0) { decimalSymbol = ","; }
|
|
59
59
|
return !value.includes(decimalSymbol) ? value + decimalSymbol : value;
|
|
60
60
|
}
|
|
61
61
|
function calculateSafariCaret(previousValue, current, previousCaret, decimalSymbol) {
|
|
62
|
-
if (previousValue === void 0) { previousValue =
|
|
63
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
62
|
+
if (previousValue === void 0) { previousValue = ""; }
|
|
63
|
+
if (decimalSymbol === void 0) { decimalSymbol = ","; }
|
|
64
64
|
var tailRegex = new RegExp(decimalSymbol + ".+");
|
|
65
|
-
var previousWithoutTail = previousValue.replace(tailRegex,
|
|
66
|
-
var currentWithoutTail = current.replace(tailRegex,
|
|
65
|
+
var previousWithoutTail = previousValue.replace(tailRegex, "");
|
|
66
|
+
var currentWithoutTail = current.replace(tailRegex, "");
|
|
67
67
|
var pasteOrCutOperation = Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;
|
|
68
68
|
if (pasteOrCutOperation) {
|
|
69
69
|
return current.length;
|
|
@@ -85,13 +85,13 @@ function calculateSafariCaret(previousValue, current, previousCaret, decimalSymb
|
|
|
85
85
|
function calculateChangedTailIndex(previous, current) {
|
|
86
86
|
for (var i = 0; i < current.length; i++) {
|
|
87
87
|
if (previous[i] !== current[i]) {
|
|
88
|
-
return current[i] ===
|
|
88
|
+
return current[i] === "0" ? i : i + 1;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return current.length;
|
|
92
92
|
}
|
|
93
93
|
function calculateCaretGap(previousValue, current, thousandSymbol) {
|
|
94
|
-
if (previousValue === void 0) { previousValue =
|
|
94
|
+
if (previousValue === void 0) { previousValue = ""; }
|
|
95
95
|
var pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;
|
|
96
96
|
if (pasteOrCutOperation) {
|
|
97
97
|
return 0;
|
|
@@ -101,10 +101,10 @@ function calculateCaretGap(previousValue, current, thousandSymbol) {
|
|
|
101
101
|
return nowSpaces - wereSpaces;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
var ASSERTION =
|
|
104
|
+
var ASSERTION = "Correction function must return single char or null";
|
|
105
105
|
function tuiCreateCorrectionMask(allowed, correctionHandler) {
|
|
106
106
|
return function (rawValue) {
|
|
107
|
-
var mask = rawValue.split(
|
|
107
|
+
var mask = rawValue.split("").reduce(function (result, char, index) {
|
|
108
108
|
var corrected = correctionHandler(char, index);
|
|
109
109
|
tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);
|
|
110
110
|
if (!allowed.test(char) && !corrected) {
|
|
@@ -130,7 +130,7 @@ var NON_ZERO_DIGIT = /[1-9]/;
|
|
|
130
130
|
* Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}
|
|
131
131
|
*/
|
|
132
132
|
function tuiCreateNumberMask(_a) {
|
|
133
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.allowDecimal, allowDecimal = _c === void 0 ? false : _c, _d = _b.decimalSymbol, decimalSymbol = _d === void 0 ?
|
|
133
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.allowDecimal, allowDecimal = _c === void 0 ? false : _c, _d = _b.decimalSymbol, decimalSymbol = _d === void 0 ? "," : _d, _e = _b.thousandSymbol, thousandSymbol = _e === void 0 ? CHAR_NO_BREAK_SPACE : _e, _f = _b.autoCorrectDecimalSymbol, autoCorrectDecimalSymbol = _f === void 0 ? true : _f, _g = _b.decimalLimit, decimalLimit = _g === void 0 ? 2 : _g, _h = _b.requireDecimal, requireDecimal = _h === void 0 ? false : _h, _j = _b.allowNegative, allowNegative = _j === void 0 ? false : _j, _k = _b.integerLimit, integerLimit = _k === void 0 ? 0 : _k;
|
|
134
134
|
tuiAssert.assert(Number.isInteger(decimalLimit));
|
|
135
135
|
tuiAssert.assert(decimalLimit >= 0);
|
|
136
136
|
tuiAssert.assert(Number.isInteger(integerLimit));
|
|
@@ -138,12 +138,12 @@ function tuiCreateNumberMask(_a) {
|
|
|
138
138
|
return function (rawValue, _a) {
|
|
139
139
|
var previousConformedValue = _a.previousConformedValue;
|
|
140
140
|
if (previousConformedValue && requireDecimal) {
|
|
141
|
-
var conformedWithoutSeparator = rawValue.split(thousandSymbol).join(
|
|
141
|
+
var conformedWithoutSeparator = rawValue.split(thousandSymbol).join("");
|
|
142
142
|
var previousConformedValueWithoutDecimalSymbolAndSeparator = previousConformedValue
|
|
143
143
|
.split(thousandSymbol)
|
|
144
|
-
.join(
|
|
144
|
+
.join("")
|
|
145
145
|
.split(decimalSymbol)
|
|
146
|
-
.join(
|
|
146
|
+
.join("");
|
|
147
147
|
// Forbid removal of decimal separator if decimal part is required
|
|
148
148
|
if (conformedWithoutSeparator ===
|
|
149
149
|
previousConformedValueWithoutDecimalSymbolAndSeparator) {
|
|
@@ -154,7 +154,7 @@ function tuiCreateNumberMask(_a) {
|
|
|
154
154
|
allowNegative;
|
|
155
155
|
if (isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&
|
|
156
156
|
allowDecimal) {
|
|
157
|
-
return [
|
|
157
|
+
return ["0", decimalSymbol, TUI_DIGIT_REGEXP];
|
|
158
158
|
}
|
|
159
159
|
if (isNegative) {
|
|
160
160
|
rawValue = rawValue.slice(1);
|
|
@@ -162,21 +162,21 @@ function tuiCreateNumberMask(_a) {
|
|
|
162
162
|
var decimalIndex = getDecimalSymbolIndex(rawValue, decimalSymbol, autoCorrectDecimalSymbol);
|
|
163
163
|
var hasDecimal = decimalIndex !== -1;
|
|
164
164
|
var integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;
|
|
165
|
-
var thousandSeparators = integer.match(new RegExp(thousandSymbol,
|
|
165
|
+
var thousandSeparators = integer.match(new RegExp(thousandSymbol, "g")) || [];
|
|
166
166
|
var integerCapped = integerLimit
|
|
167
167
|
? integer.slice(0, integerLimit + thousandSeparators.length)
|
|
168
168
|
: integer;
|
|
169
|
-
var integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP,
|
|
170
|
-
var _b = __read(integerCappedClean.match(TUI_LEADING_ZEROES_REGEXP) || [
|
|
169
|
+
var integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, "");
|
|
170
|
+
var _b = __read(integerCappedClean.match(TUI_LEADING_ZEROES_REGEXP) || [""], 1), leadingZerosMatch = _b[0];
|
|
171
171
|
var leadingZerosAmount = leadingZerosMatch.length;
|
|
172
172
|
var integerCappedZerosClean = integerCappedClean
|
|
173
|
-
.replace(/^0+(?!\.|$)/,
|
|
173
|
+
.replace(/^0+(?!\.|$)/, "")
|
|
174
174
|
.trim();
|
|
175
175
|
var withSeparator = addThousandsSeparator(integerCappedZerosClean, thousandSymbol);
|
|
176
176
|
var mask = convertToMask(withSeparator);
|
|
177
177
|
if ((hasDecimal && allowDecimal) || requireDecimal) {
|
|
178
178
|
var fraction = hasDecimal
|
|
179
|
-
? convertToMask(rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP,
|
|
179
|
+
? convertToMask(rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ""))
|
|
180
180
|
: [];
|
|
181
181
|
var fractionCapped = decimalLimit
|
|
182
182
|
? fraction.slice(0, decimalLimit)
|
|
@@ -189,7 +189,7 @@ function tuiCreateNumberMask(_a) {
|
|
|
189
189
|
mask.push(TUI_DIGIT_REGEXP);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
var isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean ===
|
|
192
|
+
var isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === "0";
|
|
193
193
|
if (isNegative) {
|
|
194
194
|
if (mask.length === 0) {
|
|
195
195
|
mask.push(TUI_DIGIT_REGEXP);
|
|
@@ -235,7 +235,7 @@ function isDecimalSymbol(str, decimalSymbol, autoCorrectDecimalSymbol) {
|
|
|
235
235
|
}
|
|
236
236
|
function convertToMask(strNumber) {
|
|
237
237
|
return strNumber
|
|
238
|
-
.split(
|
|
238
|
+
.split("")
|
|
239
239
|
.map(function (char) { return (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char); });
|
|
240
240
|
}
|
|
241
241
|
function addThousandsSeparator(strNumber, thousandSymbol) {
|
|
@@ -257,9 +257,9 @@ function tuiEnableAutoCorrectDecimalSymbol(_a) {
|
|
|
257
257
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
258
258
|
function maskedMoneyValueIsEmpty(value) {
|
|
259
259
|
switch (value) {
|
|
260
|
-
case
|
|
260
|
+
case "":
|
|
261
261
|
case CHAR_HYPHEN:
|
|
262
|
-
case
|
|
262
|
+
case ",":
|
|
263
263
|
case CHAR_HYPHEN + ",":
|
|
264
264
|
return true;
|
|
265
265
|
default:
|
|
@@ -273,7 +273,7 @@ var tuiMaskedMoneyValueIsEmpty = maskedMoneyValueIsEmpty;
|
|
|
273
273
|
*/
|
|
274
274
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
275
275
|
function maskedNumberStringToNumber(value, decimalsSymbol, thousandSymbol) {
|
|
276
|
-
return parseFloat(value.split(thousandSymbol).join(
|
|
276
|
+
return parseFloat(value.split(thousandSymbol).join("").split(decimalsSymbol).join("."));
|
|
277
277
|
}
|
|
278
278
|
var tuiMaskedNumberStringToNumber = maskedNumberStringToNumber;
|
|
279
279
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["ng://@taiga-ui/core/utils/mask/create-auto-corrected-money-pipe.ts","ng://@taiga-ui/core/utils/mask/create-correction-mask.ts","ng://@taiga-ui/core/utils/mask/create-number-mask.ts","ng://@taiga-ui/core/utils/mask/enable-auto-correct-decimal-symbol.ts","ng://@taiga-ui/core/utils/mask/masked-money-value-is-empty.ts","ng://@taiga-ui/core/utils/mask/masked-number-string-to-number.ts","ng://@taiga-ui/core/utils/mask/taiga-ui-core-utils-mask.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n getDocumentOrShadowRoot,\n isNativeFocused,\n isSafari,\n tuiAssert,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = ',',\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener('beforeinput', () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && isNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== getDocumentOrShadowRoot(nativeInput) &&\n isNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === '' || !decimalLimit) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + '0'.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = ',',\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = '',\n current: string,\n previousCaret: number,\n decimalSymbol: string = ',',\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, '');\n const currentWithoutTail = current.replace(tailRegex, '');\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === '0' ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = '',\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = 'Correction function must return single char or null';\n\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split('').reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {otherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = ',',\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n tuiAssert.assert(Number.isInteger(integerLimit));\n tuiAssert.assert(integerLimit >= 0);\n\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join('');\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join('')\n .split(decimalSymbol)\n .join('');\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue[0] === CHAR_HYPHEN || rawValue[0] === CHAR_EN_DASH) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return ['0', decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, 'g')) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, '');\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [''];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, '')\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ''),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== otherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < decimalLimit - fractionCapped.length; i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === '0';\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<string | RegExp>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<string | RegExp> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n } else if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(otherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<string | RegExp> {\n return strNumber\n .split('')\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.\n // eslint-disable-next-line unicorn/no-unsafe-regex\n strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiMaskedMoneyValueIsEmpty} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function maskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case '':\n case CHAR_HYPHEN:\n case ',':\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n\nexport const tuiMaskedMoneyValueIsEmpty = maskedMoneyValueIsEmpty;\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * @deprecated: use {@link tuiMaskedNumberStringToNumber} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function maskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join('').split(decimalsSymbol).join('.'),\n );\n}\n\nexport const tuiMaskedNumberStringToNumber = maskedNumberStringToNumber;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;SAGgB,gCAAgC,CAC5C,YAAwB,EACxB,aAAqC,EACrC,cAA4C,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAa;IALb,6BAAA,EAAA,gBAAwB;IACxB,8BAAA,EAAA,mBAAqC;IACrC,+BAAA,EAAA,oCAA4C;IAG5C,sBAAA,EAAA,aAAa;IAEb,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IACjD,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;;IAGpC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IACvB,IAAM,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC;IAElE,IAAI,WAAW,IAAI,OAAO,EAAE;QACxB,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE;YACxC,aAAa,GAAG,WAAW,CAAC,cAAc,IAAI,CAAC,CAAC;SACnD,CAAC,CAAC;KACN;IAED,OAAO,UAAC,cAAc,EAAE,MAAM;;QAE1B,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,aAAa,EAAE;YACrE,OAAO,WAAW,CAAC;SACtB;;QAGD,IAAI,WAAW,IAAI,OAAO,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE;YACxD,IAAM,OAAK,GAAG,oBAAoB,CAC9B,MAAM,CAAC,sBAAsB,EAC7B,cAAc,EACd,aAAa,CAChB,CAAC;YAEF,UAAU,CAAC;gBACP,WAAW,CAAC,iBAAiB,CAAC,OAAK,EAAE,OAAK,CAAC,CAAC;aAC/C,CAAC,CAAC;SACN;QAED,IACI,WAAW;YACX,WAAW,CAAC,aAAa,KAAK,uBAAuB,CAAC,WAAW,CAAC;YA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AAC,IAAI,CAAC,IAAI,CAAC,GAAG,gBAAgB,GAAG,IAAI,IAAC,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,qBAAqB,CAAC,SAAiB,EAAE,cAAsB;IACpE,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC;;;YAGrB,SAAS,CAAC,OAAO,CAAC,uBAAuB,EAAE,cAAc,CAAC;UAC1D,SAAS,CAAC;AACpB;;SChMgB,iCAAiC,CAAC,EAExB;QADtB,wCAAiB;IAEjB,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC5D;;ACLA;;;AAGA;SACgB,uBAAuB,CAAC,KAAa;IACjD,QAAQ,KAAK;QACT,KAAK,EAAE,CAAC;QACR,KAAK,WAAW,CAAC;QACjB,KAAK,GAAG,CAAC;QACT,KAAQ,WAAW,MAAG;YAClB,OAAO,IAAI,CAAC;QAChB;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC;IAEY,0BAA0B,GAAG;;AChB1C;;;AAGA;SACgB,0BAA0B,CACtC,KAAa,EACb,cAAgC,EAChC,cAAsB;IAEtB,OAAO,UAAU,CACb,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CACvE,CAAC;AACN,CAAC;IAEY,6BAA6B,GAAG;;AChB7C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["ng://@taiga-ui/core/utils/mask/create-auto-corrected-money-pipe.ts","ng://@taiga-ui/core/utils/mask/create-correction-mask.ts","ng://@taiga-ui/core/utils/mask/create-number-mask.ts","ng://@taiga-ui/core/utils/mask/enable-auto-correct-decimal-symbol.ts","ng://@taiga-ui/core/utils/mask/masked-money-value-is-empty.ts","ng://@taiga-ui/core/utils/mask/masked-number-string-to-number.ts","ng://@taiga-ui/core/utils/mask/taiga-ui-core-utils-mask.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n getDocumentOrShadowRoot,\n isNativeFocused,\n isSafari,\n tuiAssert,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = `,`,\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener(`beforeinput`, () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && isNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== getDocumentOrShadowRoot(nativeInput) &&\n isNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === `` || !decimalLimit) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + `0`.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = `,`,\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = ``,\n current: string,\n previousCaret: number,\n decimalSymbol: string = `,`,\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, ``);\n const currentWithoutTail = current.replace(tailRegex, ``);\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === `0` ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = ``,\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = `Correction function must return single char or null`;\n\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split(``).reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {otherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = `,`,\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n tuiAssert.assert(Number.isInteger(integerLimit));\n tuiAssert.assert(integerLimit >= 0);\n\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join(``);\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join(``)\n .split(decimalSymbol)\n .join(``);\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue[0] === CHAR_HYPHEN || rawValue[0] === CHAR_EN_DASH) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return [`0`, decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, `g`)) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, ``);\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [``];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, ``)\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ``),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== otherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < decimalLimit - fractionCapped.length; i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === `0`;\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<string | RegExp>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<string | RegExp> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n } else if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(otherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<string | RegExp> {\n return strNumber\n .split(``)\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.\n // eslint-disable-next-line unicorn/no-unsafe-regex\n strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiMaskedMoneyValueIsEmpty} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function maskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case ``:\n case CHAR_HYPHEN:\n case `,`:\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n\nexport const tuiMaskedMoneyValueIsEmpty = maskedMoneyValueIsEmpty;\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * @deprecated: use {@link tuiMaskedNumberStringToNumber} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function maskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join(``).split(decimalsSymbol).join(`.`),\n );\n}\n\nexport const tuiMaskedNumberStringToNumber = maskedNumberStringToNumber;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;SAGgB,gCAAgC,CAC5C,YAAwB,EACxB,aAAqC,EACrC,cAA4C,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAa;IALb,6BAAA,EAAA,gBAAwB;IACxB,8BAAA,EAAA,mBAAqC;IACrC,+BAAA,EAAA,oCAA4C;IAG5C,sBAAA,EAAA,aAAa;IAEb,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IACjD,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;;IAGpC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IACvB,IAAM,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC;IAElE,IAAI,WAAW,IAAI,OAAO,EAAE;QACxB,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE;YACxC,aAAa,GAAG,WAAW,CAAC,cAAc,IAAI,CAAC,CAAC;SACnD,CAAC,CAAC;KACN;IAED,OAAO,UAAC,cAAc,EAAE,MAAM;;QAE1B,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,aAAa,EAAE;YACrE,OAAO,WAAW,CAAC;SACtB;;QAGD,IAAI,WAAW,IAAI,OAAO,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE;YACxD,IAAM,OAAK,GAAG,oBAAoB,CAC9B,MAAM,CAAC,sBAAsB,EAC7B,cAAc,EACd,aAAa,CAChB,CAAC;YAEF,UAAU,CAAC;gBACP,WAAW,CAAC,iBAAiB,CAAC,OAAK,EAAE,OAAK,CAAC,CAAC;aAC/C,CAAC,CAAC;SACN;QAED,IACI,WAAW;YACX,WAAW,CAAC,aAAa,KAAK,uBAAuB,CAAC,WAAW,CAAC;YACl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