@taiga-ui/core 2.38.0 → 2.41.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-modules-notifications.umd.js → taiga-ui-core-components-alert.umd.js} +94 -136
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -0
- package/bundles/taiga-ui-core-components-alert.umd.min.js +16 -0
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -0
- package/bundles/taiga-ui-core-components-button.umd.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +2 -2
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +1 -0
- 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 +18 -3
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +14 -18
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.js +12 -4
- package/bundles/taiga-ui-core-components.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +3 -1
- 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-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-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 +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.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 +4 -2
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +14 -8
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +3 -2
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core.umd.js +4 -12
- package/bundles/taiga-ui-core.umd.js.map +1 -1
- package/bundles/taiga-ui-core.umd.min.js +1 -1
- package/components/alert/alert.component.d.ts +35 -0
- package/components/alert/alert.module.d.ts +4 -0
- package/components/alert/alert.service.d.ts +18 -0
- package/components/alert/index.d.ts +3 -0
- package/components/alert/package.json +13 -0
- package/{modules/notifications/taiga-ui-core-modules-notifications.d.ts → components/alert/taiga-ui-core-components-alert.d.ts} +0 -0
- package/components/alert/taiga-ui-core-components-alert.metadata.json +1 -0
- package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
- package/components/data-list/data-list.component.d.ts +1 -1
- package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.metadata.json +1 -1
- package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/root/root.component.d.ts +3 -4
- package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
- package/components/taiga-ui-core-components.metadata.json +1 -1
- package/constants/decimal-symbols.d.ts +1 -1
- package/constants/regexp.d.ts +1 -0
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/mask-accessor/mask-accessor.directive.d.ts +1 -1
- package/esm2015/components/alert/alert.component.js +89 -0
- package/esm2015/components/alert/alert.module.js +29 -0
- package/esm2015/components/alert/alert.service.js +49 -0
- package/esm2015/components/alert/index.js +4 -0
- package/esm2015/components/alert/taiga-ui-core-components-alert.js +5 -0
- package/esm2015/components/button/button.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +1 -1
- package/esm2015/components/data-list/data-list.component.js +2 -2
- package/esm2015/components/data-list/option/option.component.js +2 -2
- package/esm2015/components/dialog/dialog.component.js +2 -2
- package/esm2015/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm2015/components/expand/expand.component.js +2 -2
- package/esm2015/components/group/group.module.js +2 -1
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +18 -3
- package/esm2015/components/hints-host/hints-host.component.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/label/label.component.js +2 -2
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +2 -2
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +3 -3
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
- package/esm2015/components/root/root.component.js +11 -17
- package/esm2015/components/root/root.module.js +3 -2
- package/esm2015/components/scroll-controls/scroll-controls.component.js +2 -2
- package/esm2015/constants/decimal-symbols.js +1 -1
- package/esm2015/constants/regexp.js +2 -1
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +1 -1
- package/esm2015/index.js +1 -2
- package/esm2015/interfaces/alert-options.js +1 -0
- package/esm2015/interfaces/data-list-accessor.js +1 -1
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/interfaces/notification-options.js +1 -1
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm2015/pipes/format-number/format-number.pipe.js +4 -3
- package/esm2015/services/hint.service.js +1 -1
- package/esm2015/tokens/notification-options.js +1 -1
- package/esm2015/types/direction.js +1 -1
- package/esm2015/utils/format/capitalize-first-letter.js +4 -0
- package/esm2015/utils/format/format-number.js +10 -9
- package/esm2015/utils/format/index.js +2 -1
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +1 -1
- package/esm5/components/alert/alert.component.js +96 -0
- package/esm5/components/alert/alert.module.js +32 -0
- package/esm5/components/alert/alert.service.js +54 -0
- package/esm5/components/alert/index.js +4 -0
- package/esm5/components/alert/taiga-ui-core-components-alert.js +5 -0
- package/esm5/components/button/button.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +1 -1
- package/esm5/components/data-list/data-list.component.js +2 -2
- package/esm5/components/data-list/option/option.component.js +2 -2
- package/esm5/components/dialog/dialog.component.js +2 -2
- package/esm5/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm5/components/expand/expand.component.js +2 -2
- package/esm5/components/group/group.module.js +2 -1
- package/esm5/components/hints-host/hint-box/hint-box.component.js +18 -3
- package/esm5/components/hints-host/hints-host.component.js +2 -2
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
- package/esm5/components/index.js +2 -1
- package/esm5/components/label/label.component.js +2 -2
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +2 -2
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +3 -3
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
- package/esm5/components/root/root.component.js +11 -17
- package/esm5/components/root/root.module.js +3 -2
- package/esm5/components/scroll-controls/scroll-controls.component.js +2 -2
- package/esm5/constants/decimal-symbols.js +1 -1
- package/esm5/constants/regexp.js +2 -1
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/mask-accessor/mask-accessor.directive.js +1 -1
- package/esm5/index.js +1 -2
- package/esm5/interfaces/alert-options.js +1 -0
- package/esm5/interfaces/data-list-accessor.js +1 -1
- package/esm5/interfaces/index.js +1 -1
- package/esm5/interfaces/notification-options.js +1 -1
- package/esm5/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm5/pipes/format-number/format-number.pipe.js +5 -3
- package/esm5/services/hint.service.js +1 -1
- package/esm5/tokens/notification-options.js +1 -1
- package/esm5/types/direction.js +1 -1
- package/esm5/utils/format/capitalize-first-letter.js +4 -0
- package/esm5/utils/format/format-number.js +10 -9
- package/esm5/utils/format/index.js +2 -1
- package/esm5/utils/mask/create-auto-corrected-money-pipe.js +4 -3
- package/esm5/utils/mask/create-number-mask.js +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +156 -0
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -0
- package/fesm2015/taiga-ui-core-components-button.js +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +2 -2
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +1 -0
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +18 -3
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +1 -1
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +12 -17
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components.js +1 -0
- package/fesm2015/taiga-ui-core-components.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +3 -2
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +3 -2
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +14 -9
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +2 -2
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core.js +0 -1
- package/fesm2015/taiga-ui-core.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +171 -0
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -0
- package/fesm5/taiga-ui-core-components-button.js +1 -1
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +2 -2
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +1 -1
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js +1 -0
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +18 -3
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +1 -1
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +5 -5
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +12 -17
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components.js +1 -0
- package/fesm5/taiga-ui-core-components.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +3 -2
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js +4 -2
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +14 -9
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +3 -2
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core.js +0 -1
- package/fesm5/taiga-ui-core.js.map +1 -1
- package/index.d.ts +0 -1
- package/interfaces/alert-options.d.ts +12 -0
- package/interfaces/data-list-accessor.d.ts +1 -1
- package/interfaces/index.d.ts +1 -0
- package/interfaces/notification-options.d.ts +3 -0
- package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
- package/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.metadata.json +1 -1
- package/package.json +4 -4
- package/pipes/calendar-sheet/calendar-sheet.pipe.d.ts +1 -1
- package/pipes/format-number/format-number.pipe.d.ts +2 -1
- package/services/hint.service.d.ts +1 -1
- package/styles/markup/tui-group.less +1 -1
- package/styles/mixins/mixins.less +1 -0
- package/styles/mixins/slider.less +17 -0
- package/styles/taiga-ui-global-old.less +18 -18
- package/styles/taiga-ui-global.less +18 -18
- package/styles/taiga-ui-local-old.less +5 -5
- package/styles/taiga-ui-local.less +7 -7
- package/styles/taiga-ui-local.scss +7 -7
- package/styles/taiga-ui-theme.less +4 -4
- package/styles/theme/dialog.less +1 -1
- package/styles/theme/wrapper/accent.less +1 -1
- package/styles/theme/wrapper/base.less +1 -1
- package/styles/theme/wrapper/icon.less +1 -1
- package/styles/theme/wrapper/none.less +6 -0
- package/styles/theme/wrapper/outline.less +1 -1
- package/styles/theme/wrapper/primary.less +1 -1
- package/styles/theme/wrapper/secondary.less +1 -1
- package/styles/theme/wrapper/table.less +1 -1
- package/styles/theme/wrapper/textfield.less +2 -2
- package/styles/theme/wrapper/whiteblock.less +2 -2
- package/styles/theme/wrapper.less +10 -10
- package/taiga-ui-core.metadata.json +1 -1
- package/tokens/notification-options.d.ts +2 -10
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/types/direction.d.ts +1 -1
- package/utils/format/capitalize-first-letter.d.ts +1 -0
- package/utils/format/index.d.ts +1 -0
- package/utils/format/taiga-ui-core-utils-format.metadata.json +1 -1
- package/utils/mask/create-auto-corrected-money-pipe.d.ts +1 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.js.map +0 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js +0 -16
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js.map +0 -1
- package/bundles/taiga-ui-core-modules.umd.js +0 -23
- package/bundles/taiga-ui-core-modules.umd.js.map +0 -1
- package/bundles/taiga-ui-core-modules.umd.min.js +0 -2
- package/bundles/taiga-ui-core-modules.umd.min.js.map +0 -1
- package/esm2015/modules/index.js +0 -2
- package/esm2015/modules/notifications/index.js +0 -7
- package/esm2015/modules/notifications/notification-alert/Notification-alert.js +0 -22
- package/esm2015/modules/notifications/notification-alert/notification-alert.component.js +0 -74
- package/esm2015/modules/notifications/notification-alert/notification-alert.module.js +0 -17
- package/esm2015/modules/notifications/notification-content-context.js +0 -1
- package/esm2015/modules/notifications/notifications-host/notifications-host.component.js +0 -35
- package/esm2015/modules/notifications/notifications.module.js +0 -26
- package/esm2015/modules/notifications/notifications.service.js +0 -38
- package/esm2015/modules/notifications/taiga-ui-core-modules-notifications.js +0 -5
- package/esm2015/modules/taiga-ui-core-modules.js +0 -5
- package/esm5/modules/index.js +0 -2
- package/esm5/modules/notifications/index.js +0 -7
- package/esm5/modules/notifications/notification-alert/Notification-alert.js +0 -24
- package/esm5/modules/notifications/notification-alert/notification-alert.component.js +0 -81
- package/esm5/modules/notifications/notification-alert/notification-alert.module.js +0 -20
- package/esm5/modules/notifications/notification-content-context.js +0 -1
- package/esm5/modules/notifications/notifications-host/notifications-host.component.js +0 -36
- package/esm5/modules/notifications/notifications.module.js +0 -29
- package/esm5/modules/notifications/notifications.service.js +0 -41
- package/esm5/modules/notifications/taiga-ui-core-modules-notifications.js +0 -5
- package/esm5/modules/taiga-ui-core-modules.js +0 -5
- package/fesm2015/taiga-ui-core-modules-notifications.js +0 -192
- package/fesm2015/taiga-ui-core-modules-notifications.js.map +0 -1
- package/fesm2015/taiga-ui-core-modules.js +0 -6
- package/fesm2015/taiga-ui-core-modules.js.map +0 -1
- package/fesm5/taiga-ui-core-modules-notifications.js +0 -210
- package/fesm5/taiga-ui-core-modules-notifications.js.map +0 -1
- package/fesm5/taiga-ui-core-modules.js +0 -6
- package/fesm5/taiga-ui-core-modules.js.map +0 -1
- package/modules/index.d.ts +0 -1
- package/modules/notifications/index.d.ts +0 -7
- package/modules/notifications/notification-alert/Notification-alert.d.ts +0 -19
- package/modules/notifications/notification-alert/notification-alert.component.d.ts +0 -17
- package/modules/notifications/notification-alert/notification-alert.module.d.ts +0 -2
- package/modules/notifications/notification-content-context.d.ts +0 -10
- package/modules/notifications/notifications-host/notifications-host.component.d.ts +0 -9
- package/modules/notifications/notifications.module.d.ts +0 -4
- package/modules/notifications/notifications.service.d.ts +0 -15
- package/modules/notifications/package.json +0 -13
- package/modules/notifications/taiga-ui-core-modules-notifications.metadata.json +0 -1
- package/modules/package.json +0 -13
- package/modules/taiga-ui-core-modules.d.ts +0 -4
- package/modules/taiga-ui-core-modules.metadata.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-scroll-controls.js","sources":["ng://@taiga-ui/core/components/scroll-controls/scroll-controls.component.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar-wrapper.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scroll-controls.module.ts","ng://@taiga-ui/core/components/scroll-controls/taiga-ui-core-components-scroll-controls.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_ANIMATION_OPTIONS, TUI_MODE, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-scroll-controls',\n templateUrl: './scroll-controls.template.html',\n styleUrls: ['./scroll-controls.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiScrollControlsComponent {\n readonly refresh$ = this.animationFrame$.pipe(\n throttleTime(300),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(this.ngZone),\n );\n\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef\n ? this.scrollRef.nativeElement\n : this.documentRef.documentElement;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","import {DOCUMENT, ViewportScroller} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n POLLING_TIME,\n preventDefault,\n stopPropagation,\n TuiDestroyService,\n tuiZonefree,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiOrientationT} from '@taiga-ui/core/types';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {map, switchMap, takeUntil, throttleTime} from 'rxjs/operators';\n\nconst MIN_WIDTH = 24;\n\n// @dynamic\n@Directive({\n selector: '[tuiScrollbar]',\n providers: [TuiDestroyService],\n})\nexport class TuiScrollbarDirective {\n @Input()\n tuiScrollbar: TuiOrientationT = 'vertical';\n\n constructor(\n @Inject(NgZone) ngZone: NgZone,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TUI_ELEMENT_REF) private readonly wrapper: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly container: ElementRef<HTMLElement> | null,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(ViewportScroller) private readonly viewportScroller: ViewportScroller,\n ) {\n const {nativeElement} = this.elementRef;\n const mousedown$ = typedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseup$ = typedFromEvent(this.documentRef, 'mouseup');\n const mousedownWrapper$ = typedFromEvent(wrapper.nativeElement, 'mousedown');\n\n merge(\n mousedownWrapper$.pipe(\n preventDefault(),\n map(event => this.getScrolled(event, 0.5, 0.5)),\n ),\n mousedown$.pipe(\n preventDefault(),\n stopPropagation(),\n switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return mousemove$.pipe(\n map(event => this.getScrolled(event, vertical, horizontal)),\n takeUntil(mouseup$),\n );\n }),\n ),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(([scrollTop, scrollLeft]) => {\n const [x, y] = this.viewportScroller.getScrollPosition();\n\n if (!this.container) {\n this.viewportScroller.scrollToPosition([\n this.tuiScrollbar === 'vertical' ? x : scrollLeft,\n this.tuiScrollbar === 'vertical' ? scrollTop : y,\n ]);\n\n return;\n }\n\n if (this.tuiScrollbar === 'vertical') {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollTop',\n scrollTop,\n );\n } else {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollLeft',\n scrollLeft,\n );\n }\n });\n\n merge(\n fromEvent(\n this.container ? this.container.nativeElement : this.windowRef,\n 'scroll',\n ),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n renderer.setStyle(nativeElement, 'top', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'height', `${this.view * 100}%`);\n } else {\n renderer.setStyle(nativeElement, 'left', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'width', `${this.view * 100}%`);\n }\n });\n }\n\n private get scrolled(): number {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? scrollTop / (scrollHeight - clientHeight)\n : scrollLeft / (scrollWidth - clientWidth);\n }\n\n private get compensation(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n if (\n ((clientHeight * clientHeight) / scrollHeight > MIN_WIDTH &&\n this.tuiScrollbar === 'vertical') ||\n ((clientWidth * clientWidth) / scrollWidth > MIN_WIDTH &&\n this.tuiScrollbar === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar === 'vertical'\n ? MIN_WIDTH / clientHeight\n : MIN_WIDTH / clientWidth;\n }\n\n private get thumb(): number {\n const compensation = this.compensation || this.view;\n\n return this.scrolled * (1 - compensation);\n }\n\n private get view(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? Math.ceil((clientHeight / scrollHeight) * 100) / 100\n : Math.ceil((clientWidth / scrollWidth) * 100) / 100;\n }\n\n private get computedContainer(): Element {\n return this.container\n ? this.container.nativeElement\n : this.documentRef.scrollingElement!;\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetVertical: number,\n offsetHorizontal: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.elementRef.nativeElement;\n const {top, left, width, height} =\n this.wrapper.nativeElement.getBoundingClientRect();\n\n const maxTop = this.computedContainer.scrollHeight - height;\n const maxLeft = this.computedContainer.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: ClientRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: ClientRect): number {\n return (clientX - left) / width;\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiScrollbarWrapper]',\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiScrollbarWrapperDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiScrollControlsComponent} from './scroll-controls.component';\nimport {TuiScrollbarDirective} from './scrollbar.directive';\nimport {TuiScrollbarWrapperDirective} from './scrollbar-wrapper.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [\n TuiScrollbarDirective,\n TuiScrollbarWrapperDirective,\n TuiScrollControlsComponent,\n ],\n exports: [TuiScrollControlsComponent],\n})\nexport class TuiScrollControlsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiScrollbarWrapperDirective as ɵa} from './scrollbar-wrapper.directive';"],"names":[],"mappings":";;;;;;;;;;;AAmBA;IAYa,0BAA0B,GAAvC,MAAa,0BAA0B;IAcnC,YACoD,OAAyB,EACxC,MAAc,EACZ,WAAqB,EAGvC,SAAyC,EAChB,eAAmC,EAClD,KAAuC;QAPlB,YAAO,GAAP,OAAO,CAAkB;QACxC,WAAM,GAAN,MAAM,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAU;QAGvC,cAAS,GAAT,SAAS,CAAg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C5B,0BAA0B;SAC7B;QACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;KACxC,CAAC;GACW,uBAAuB,CAAG;;ACjBvC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-scroll-controls.js","sources":["ng://@taiga-ui/core/components/scroll-controls/scroll-controls.component.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scrollbar-wrapper.directive.ts","ng://@taiga-ui/core/components/scroll-controls/scroll-controls.module.ts","ng://@taiga-ui/core/components/scroll-controls/taiga-ui-core-components-scroll-controls.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_ANIMATION_OPTIONS, TUI_MODE, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-scroll-controls',\n templateUrl: './scroll-controls.template.html',\n styleUrls: ['./scroll-controls.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiScrollControlsComponent {\n readonly refresh$ = this.animationFrame$.pipe(\n throttleTime(300),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(this.ngZone),\n );\n\n readonly animation = {\n value: '',\n ...this.options,\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n ) {}\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef\n ? this.scrollRef.nativeElement\n : this.documentRef.documentElement;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","import {DOCUMENT, ViewportScroller} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n Renderer2,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n POLLING_TIME,\n preventDefault,\n stopPropagation,\n TuiDestroyService,\n tuiZonefree,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TUI_ELEMENT_REF, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {TuiOrientationT} from '@taiga-ui/core/types';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {map, switchMap, takeUntil, throttleTime} from 'rxjs/operators';\n\nconst MIN_WIDTH = 24;\n\n// @dynamic\n@Directive({\n selector: '[tuiScrollbar]',\n providers: [TuiDestroyService],\n})\nexport class TuiScrollbarDirective {\n @Input()\n tuiScrollbar: TuiOrientationT = 'vertical';\n\n constructor(\n @Inject(NgZone) ngZone: NgZone,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TUI_ELEMENT_REF) private readonly wrapper: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_SCROLL_REF)\n private readonly container: ElementRef<HTMLElement> | null,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(ViewportScroller) private readonly viewportScroller: ViewportScroller,\n ) {\n const {nativeElement} = this.elementRef;\n const mousedown$ = typedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseup$ = typedFromEvent(this.documentRef, 'mouseup');\n const mousedownWrapper$ = typedFromEvent(wrapper.nativeElement, 'mousedown');\n\n merge(\n mousedownWrapper$.pipe(\n preventDefault(),\n map(event => this.getScrolled(event, 0.5, 0.5)),\n ),\n mousedown$.pipe(\n preventDefault(),\n stopPropagation(),\n switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return mousemove$.pipe(\n map(event => this.getScrolled(event, vertical, horizontal)),\n takeUntil(mouseup$),\n );\n }),\n ),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(([scrollTop, scrollLeft]) => {\n const [x, y] = this.viewportScroller.getScrollPosition();\n\n if (!this.container) {\n this.viewportScroller.scrollToPosition([\n this.tuiScrollbar === 'vertical' ? x : scrollLeft,\n this.tuiScrollbar === 'vertical' ? scrollTop : y,\n ]);\n\n return;\n }\n\n if (this.tuiScrollbar === 'vertical') {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollTop',\n scrollTop,\n );\n } else {\n renderer.setProperty(\n this.container.nativeElement,\n 'scrollLeft',\n scrollLeft,\n );\n }\n });\n\n merge(\n fromEvent(\n this.container ? this.container.nativeElement : this.windowRef,\n 'scroll',\n ),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n )\n .pipe(takeUntil(destroy$), tuiZonefree(ngZone))\n .subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n renderer.setStyle(nativeElement, 'top', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'height', `${this.view * 100}%`);\n } else {\n renderer.setStyle(nativeElement, 'left', `${this.thumb * 100}%`);\n renderer.setStyle(nativeElement, 'width', `${this.view * 100}%`);\n }\n });\n }\n\n private get scrolled(): number {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? scrollTop / (scrollHeight - clientHeight)\n : scrollLeft / (scrollWidth - clientWidth);\n }\n\n private get compensation(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n if (\n ((clientHeight * clientHeight) / scrollHeight > MIN_WIDTH &&\n this.tuiScrollbar === 'vertical') ||\n ((clientWidth * clientWidth) / scrollWidth > MIN_WIDTH &&\n this.tuiScrollbar === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar === 'vertical'\n ? MIN_WIDTH / clientHeight\n : MIN_WIDTH / clientWidth;\n }\n\n private get thumb(): number {\n const compensation = this.compensation || this.view;\n\n return this.scrolled * (1 - compensation);\n }\n\n private get view(): number {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} =\n this.computedContainer;\n\n return this.tuiScrollbar === 'vertical'\n ? Math.ceil((clientHeight / scrollHeight) * 100) / 100\n : Math.ceil((clientWidth / scrollWidth) * 100) / 100;\n }\n\n private get computedContainer(): Element {\n return this.container\n ? this.container.nativeElement\n : this.documentRef.scrollingElement!;\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetVertical: number,\n offsetHorizontal: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.elementRef.nativeElement;\n const {top, left, width, height} =\n this.wrapper.nativeElement.getBoundingClientRect();\n\n const maxTop = this.computedContainer.scrollHeight - height;\n const maxLeft = this.computedContainer.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: ClientRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: ClientRect): number {\n return (clientX - left) / width;\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {TUI_ELEMENT_REF} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiScrollbarWrapper]',\n providers: [\n {\n provide: TUI_ELEMENT_REF,\n useExisting: ElementRef,\n },\n ],\n})\nexport class TuiScrollbarWrapperDirective {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiScrollControlsComponent} from './scroll-controls.component';\nimport {TuiScrollbarDirective} from './scrollbar.directive';\nimport {TuiScrollbarWrapperDirective} from './scrollbar-wrapper.directive';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [\n TuiScrollbarDirective,\n TuiScrollbarWrapperDirective,\n TuiScrollControlsComponent,\n ],\n exports: [TuiScrollControlsComponent],\n})\nexport class TuiScrollControlsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiScrollbarWrapperDirective as ɵa} from './scrollbar-wrapper.directive';"],"names":[],"mappings":";;;;;;;;;;;AAmBA;IAYa,0BAA0B,GAAvC,MAAa,0BAA0B;IAcnC,YACoD,OAAyB,EACxC,MAAc,EACZ,WAAqB,EAGvC,SAAyC,EAChB,eAAmC,EAClD,KAAuC;QAPlB,YAAO,GAAP,OAAO,CAAkB;QACxC,WAAM,GAAN,MAAM,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAU;QAGvC,cAAS,GAAT,SAAS,CAAgC;QAChB,oBAAe,GAAf,eAAe,CAAoB;QAClD,UAAK,G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B,CAAC;KACxC,CAAC;GACW,uBAAuB,CAAG;;ACjBvC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components.js","sources":["ng://@taiga-ui/core/components/taiga-ui-core-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components.js","sources":["ng://@taiga-ui/core/components/taiga-ui-core-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
|
|
@@ -59,15 +59,16 @@ const TUI_DIGIT_REGEXP = /\d/;
|
|
|
59
59
|
const TUI_NON_DIGIT_REGEXP = /\D/;
|
|
60
60
|
const TUI_NON_DIGITS_REGEXP = /\D+/g;
|
|
61
61
|
const TUI_LEADING_ZEROES_REGEXP = /^0+/;
|
|
62
|
+
const TUI_MASK_SYMBOLS_REGEXP = /[ \-_()]/g;
|
|
62
63
|
const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\/#!$%\\^&\\*;:{}=\\-_`~()]$/;
|
|
63
64
|
const TUI_LATIN_REGEXP = /[A-z]/;
|
|
64
65
|
const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;
|
|
65
66
|
|
|
66
|
-
const VERSION = '2.
|
|
67
|
+
const VERSION = '2.41.0';
|
|
67
68
|
|
|
68
69
|
/**
|
|
69
70
|
* Generated bundle index. Do not edit.
|
|
70
71
|
*/
|
|
71
72
|
|
|
72
|
-
export { DEFAULT_ICONS_PATH, DEFAULT_MARGIN, DEFAULT_MAX_HEIGHT, DEFAULT_MAX_WIDTH, DEFAULT_MIN_HEIGHT, MASK_CARET_TRAP, MEDIA, TUI_DECIMAL_SYMBOLS, TUI_DEFAULT_MARKER_HANDLER, TUI_DIGIT_REGEXP, TUI_EXPAND_LOADED, TUI_ICON_ERROR, TUI_LAST_PUNCTUATION_MARK_REGEXP, TUI_LATIN_AND_NUMBERS_REGEXP, TUI_LATIN_REGEXP, TUI_LEADING_ZEROES_REGEXP, TUI_NON_DIGITS_REGEXP, TUI_NON_DIGIT_REGEXP, TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW, VERSION, tuiEditingKeys };
|
|
73
|
+
export { DEFAULT_ICONS_PATH, DEFAULT_MARGIN, DEFAULT_MAX_HEIGHT, DEFAULT_MAX_WIDTH, DEFAULT_MIN_HEIGHT, MASK_CARET_TRAP, MEDIA, TUI_DECIMAL_SYMBOLS, TUI_DEFAULT_MARKER_HANDLER, TUI_DIGIT_REGEXP, TUI_EXPAND_LOADED, TUI_ICON_ERROR, TUI_LAST_PUNCTUATION_MARK_REGEXP, TUI_LATIN_AND_NUMBERS_REGEXP, TUI_LATIN_REGEXP, TUI_LEADING_ZEROES_REGEXP, TUI_MASK_SYMBOLS_REGEXP, TUI_NON_DIGITS_REGEXP, TUI_NON_DIGIT_REGEXP, TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW, VERSION, tuiEditingKeys };
|
|
73
74
|
//# sourceMappingURL=taiga-ui-core-constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: readonly string[] = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.41.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAAa,cAAc,GAAG,EAAE;MACnB,kBAAkB,GAAG,GAAG;MACxB,kBAAkB,GAAG,IAAI;MACzB,iBAAiB,GAAG;;MCHpB,mBAAmB,GAAsB,CAAC,GAAG,EAAE,GAAG;;MCElD,kBAAkB,GAA6B,IAAI,IAC5D,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,IAAI;;MCA/B,0BAA0B,GAAqB,MAAM;;MCHrD,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;MAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;MAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;MAIa,cAAc,GAAG,iBAAiB;AAE/C;;;MAGa,cAAc,GAAG;;MCpBjB,eAAe,GAAG;;ACA/B;;;;MAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;MCRT,gBAAgB,GAAG,KAAK;MACxB,oBAAoB,GAAG,KAAK;MAC5B,qBAAqB,GAAG,OAAO;MAC/B,yBAAyB,GAAG,MAAM;MAClC,uBAAuB,GAAG,YAAY;MACtC,gCAAgC,GAAG,mCAAmC;MACtE,gBAAgB,GAAG,QAAQ;MAC3B,4BAA4B,GAAG;;MCP/B,OAAO,GAAG;;ACAvB;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-mask-accessor.js","sources":["ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.directive.ts","ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.module.ts","ng://@taiga-ui/core/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.ts"],"sourcesContent":["import {Directive, Optional} from '@angular/core';\nimport {\n ControlValueAccessor,\n DefaultValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport {TUI_VALUE_ACCESSOR} from '@taiga-ui/core/tokens';\n\nexport function fallbackAccessorFactory(\n accessor:
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-mask-accessor.js","sources":["ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.directive.ts","ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.module.ts","ng://@taiga-ui/core/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.ts"],"sourcesContent":["import {Directive, Optional} from '@angular/core';\nimport {\n ControlValueAccessor,\n DefaultValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport {TUI_VALUE_ACCESSOR} from '@taiga-ui/core/tokens';\n\nexport function fallbackAccessorFactory(\n accessor: readonly ControlValueAccessor[] | null,\n fallback: ControlValueAccessor,\n): ControlValueAccessor {\n return accessor ? accessor[0] : fallback;\n}\n\n@Directive({\n selector: 'input[tuiMaskAccessor]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n deps: [[new Optional(), TUI_VALUE_ACCESSOR], DefaultValueAccessor],\n useFactory: fallbackAccessorFactory,\n multi: true,\n },\n ],\n})\nexport class TuiMaskAccessorDirective {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMaskAccessorDirective} from './mask-accessor.directive';\n\n/**\n * @internal\n */\n@NgModule({\n declarations: [TuiMaskAccessorDirective],\n exports: [TuiMaskAccessorDirective],\n})\nexport class TuiMaskAccessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;SAQgB,uBAAuB,CACnC,QAAgD,EAChD,QAA8B;IAE9B,OAAO,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC7C,CAAC;IAaY,wBAAwB,GAArC,MAAa,wBAAwB;EAAG;AAA3B,wBAAwB;IAXpC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,iBAAiB;gBAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;gBAClE,UAAU,EAAE,uBAAuB;gBACnC,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,wBAAwB,CAAG;;ACtBxC;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAqB;EAAG;AAAxB,qBAAqB;IAJjC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;QACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;KACtC,CAAC;GACW,qBAAqB,CAAG;;ACXrC;;;;;;"}
|
|
@@ -34,7 +34,7 @@ TuiSvgDefsHostComponent.ctorParameters = () => [
|
|
|
34
34
|
TuiSvgDefsHostComponent = __decorate([
|
|
35
35
|
Component({
|
|
36
36
|
selector: 'tui-svg-defs-host',
|
|
37
|
-
template: "<svg:svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <ng-container *ngIf=\"isBrowser; else server\">\n <defs
|
|
37
|
+
template: "<svg:svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <ng-container *ngIf=\"isBrowser; else server\">\n <defs\n *ngFor=\"let def of items\"\n [innerHTML]=\"def\"\n ></defs>\n </ng-container>\n <ng-template #server>\n <!--svg[outerHTML] - to support SSR, because there is no support of innerHTML for for defs element in domino-->\n <defs *ngFor=\"let def of items\">\n <svg [outerHTML]=\"def\"></svg>\n </defs>\n </ng-template>\n</svg:svg>\n",
|
|
38
38
|
providers: [TuiDestroyService],
|
|
39
39
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40
40
|
styles: [":host{display:none}"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-internal-svg-defs-host.js","sources":["ng://@taiga-ui/core/internal/svg-defs-host/svg-defs-host.component.ts","ng://@taiga-ui/core/internal/svg-defs-host/svg-defs-host.module.ts","ng://@taiga-ui/core/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.ts"],"sourcesContent":["import {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n PLATFORM_ID,\n} from '@angular/core';\nimport {SafeHtml} from '@angular/platform-browser';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {TuiSvgService} from '@taiga-ui/core/services';\nimport {innerHTML} from '@taiga-ui/core/utils/polyfills';\nimport {takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-svg-defs-host',\n templateUrl: './svg-defs-host.template.html',\n styleUrls: ['./svg-defs-host.style.less'],\n providers: [TuiDestroyService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSvgDefsHostComponent implements OnInit {\n items!: IterableIterator<SafeHtml>;\n isBrowser = true;\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TuiSvgService) private readonly svgService: TuiSvgService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService)\n private readonly destroy$: TuiDestroyService,\n @Inject(PLATFORM_ID) platformId: Object,\n ) {\n this.isBrowser = !isPlatformServer(platformId);\n innerHTML(documentRef);\n }\n\n // @bad TODO: Looks like it could be async piped but it was probably written like that for a reason\n ngOnInit() {\n this.svgService.items$.pipe(takeUntil(this.destroy$)).subscribe(defsMap => {\n this.items = defsMap.values();\n this.changeDetectorRef.detectChanges();\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiSvgDefsHostComponent} from './svg-defs-host.component';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [TuiSvgDefsHostComponent],\n exports: [TuiSvgDefsHostComponent],\n})\nexport class TuiSvgDefsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeA;IAQa,uBAAuB,GAApC,MAAa,uBAAuB;IAIhC,YACsB,WAAqB,EACC,UAAyB,EACrB,iBAAoC,EAE/D,QAA2B,EACvB,UAAkB;QAJC,eAAU,GAAV,UAAU,CAAe;QACrB,sBAAiB,GAAjB,iBAAiB,CAAmB;QAE/D,aAAQ,GAAR,QAAQ,CAAmB;QAPhD,cAAS,GAAG,IAAI,CAAC;QAUb,IAAI,CAAC,SAAS,GAAG,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC/C,SAAS,CAAC,WAAW,CAAC,CAAC;KAC1B;;IAGD,QAAQ;QACJ,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO;YACnE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;SAC1C,CAAC,CAAC;KACN;EACJ;;YAlBsC,QAAQ,uBAAtC,MAAM,SAAC,QAAQ;YACoC,aAAa,uBAAhE,MAAM,SAAC,aAAa;YAC0C,iBAAiB,uBAA/E,MAAM,SAAC,iBAAiB;YAEE,iBAAiB,uBAD3C,MAAM,SAAC,iBAAiB;YAEQ,MAAM,uBAAtC,MAAM,SAAC,WAAW;;AAVd,uBAAuB;IAPnC,SAAS,CAAC;QACP,QAAQ,EAAE,mBAAmB;QAC7B,
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-internal-svg-defs-host.js","sources":["ng://@taiga-ui/core/internal/svg-defs-host/svg-defs-host.component.ts","ng://@taiga-ui/core/internal/svg-defs-host/svg-defs-host.module.ts","ng://@taiga-ui/core/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.ts"],"sourcesContent":["import {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n PLATFORM_ID,\n} from '@angular/core';\nimport {SafeHtml} from '@angular/platform-browser';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {TuiSvgService} from '@taiga-ui/core/services';\nimport {innerHTML} from '@taiga-ui/core/utils/polyfills';\nimport {takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-svg-defs-host',\n templateUrl: './svg-defs-host.template.html',\n styleUrls: ['./svg-defs-host.style.less'],\n providers: [TuiDestroyService],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSvgDefsHostComponent implements OnInit {\n items!: IterableIterator<SafeHtml>;\n isBrowser = true;\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(TuiSvgService) private readonly svgService: TuiSvgService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService)\n private readonly destroy$: TuiDestroyService,\n @Inject(PLATFORM_ID) platformId: Object,\n ) {\n this.isBrowser = !isPlatformServer(platformId);\n innerHTML(documentRef);\n }\n\n // @bad TODO: Looks like it could be async piped but it was probably written like that for a reason\n ngOnInit() {\n this.svgService.items$.pipe(takeUntil(this.destroy$)).subscribe(defsMap => {\n this.items = defsMap.values();\n this.changeDetectorRef.detectChanges();\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule} from '@taiga-ui/cdk';\n\nimport {TuiSvgDefsHostComponent} from './svg-defs-host.component';\n\n@NgModule({\n imports: [CommonModule, TuiLetModule],\n declarations: [TuiSvgDefsHostComponent],\n exports: [TuiSvgDefsHostComponent],\n})\nexport class TuiSvgDefsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeA;IAQa,uBAAuB,GAApC,MAAa,uBAAuB;IAIhC,YACsB,WAAqB,EACC,UAAyB,EACrB,iBAAoC,EAE/D,QAA2B,EACvB,UAAkB;QAJC,eAAU,GAAV,UAAU,CAAe;QACrB,sBAAiB,GAAjB,iBAAiB,CAAmB;QAE/D,aAAQ,GAAR,QAAQ,CAAmB;QAPhD,cAAS,GAAG,IAAI,CAAC;QAUb,IAAI,CAAC,SAAS,GAAG,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC/C,SAAS,CAAC,WAAW,CAAC,CAAC;KAC1B;;IAGD,QAAQ;QACJ,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO;YACnE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;SAC1C,CAAC,CAAC;KACN;EACJ;;YAlBsC,QAAQ,uBAAtC,MAAM,SAAC,QAAQ;YACoC,aAAa,uBAAhE,MAAM,SAAC,aAAa;YAC0C,iBAAiB,uBAA/E,MAAM,SAAC,iBAAiB;YAEE,iBAAiB,uBAD3C,MAAM,SAAC,iBAAiB;YAEQ,MAAM,uBAAtC,MAAM,SAAC,WAAW;;AAVd,uBAAuB;IAPnC,SAAS,CAAC;QACP,QAAQ,EAAE,mBAAmB;QAC7B,6lBAA4C;QAE5C,SAAS,EAAE,CAAC,iBAAiB,CAAC;QAC9B,eAAe,EAAE,uBAAuB,CAAC,MAAM;;KAClD,CAAC;IAMO,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IACrB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,WAAW,CAAC,CAAA;GAVf,uBAAuB,CAuBnC;;ICnCY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IALhC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACXpC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-pipes-calendar-sheet.js","sources":["ng://@taiga-ui/core/pipes/calendar-sheet/utils.ts","ng://@taiga-ui/core/pipes/calendar-sheet/calendar-sheet.pipe.ts","ng://@taiga-ui/core/pipes/calendar-sheet/calendar-sheet.module.ts","ng://@taiga-ui/core/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.ts"],"sourcesContent":["import {\n DAYS_IN_WEEK,\n inRange,\n tuiAssert,\n TuiDay,\n TuiDayOfWeek,\n TuiMonth,\n} from '@taiga-ui/cdk';\n\n// TODO: Remove export in ivy compiation\n/**\n * Computes day of week offset of the beginning of the month\n */\nexport const getMonthStartDaysOffset = (\n month: TuiMonth,\n firstDayOfWeek: TuiDayOfWeek,\n): number => {\n const startMonthOffsetFromSunday = new Date(month.year, month.month, 1).getDay();\n\n return startMonthOffsetFromSunday >= firstDayOfWeek\n ? startMonthOffsetFromSunday - firstDayOfWeek\n : DAYS_IN_WEEK - (firstDayOfWeek - startMonthOffsetFromSunday);\n};\n\n/*\nTODO: delete in v3.0:\n * TuiDay.getDayFromMonthRowCol\n * TuiMonth.monthStartDaysOffset\n * TuiMonth.weeksRowsCount\n * TuiYear.yearStartDaysOffset\n * TuiYear.getYearStartDaysOffset\n */\n/**\n * Calculated day on a calendar grid\n * @return resulting day on these coordinates (could exceed passed month)\n */\nexport const getDayFromMonthRowCol = ({\n month,\n rowIndex,\n colIndex,\n firstDayOfWeek,\n}: {\n month: TuiMonth;\n /**\n * row in a calendar\n */\n rowIndex: number;\n /**\n * column in a calendar\n */\n colIndex: number;\n /**\n * first day of the week index (Sunday - 0, Saturday - 6)\n */\n firstDayOfWeek: TuiDayOfWeek;\n}): TuiDay => {\n tuiAssert.assert(Number.isInteger(rowIndex));\n tuiAssert.assert(inRange(rowIndex, 0, 6));\n tuiAssert.assert(Number.isInteger(colIndex));\n tuiAssert.assert(inRange(colIndex, 0, DAYS_IN_WEEK));\n\n let day =\n rowIndex * DAYS_IN_WEEK +\n colIndex -\n getMonthStartDaysOffset(month, firstDayOfWeek) +\n 1;\n\n if (day > month.daysCount) {\n day = day - month.daysCount;\n month = month.append({month: 1});\n }\n\n if (day <= 0) {\n month = month.append({month: -1});\n day = month.daysCount + day;\n }\n\n return new TuiDay(month.year, month.month, day);\n};\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {DAYS_IN_WEEK, TuiDay, TuiDayOfWeek, TuiMonth} from '@taiga-ui/cdk';\nimport {TUI_FIRST_DAY_OF_WEEK} from '@taiga-ui/core/tokens';\n\nimport {getDayFromMonthRowCol} from './utils';\n\nconst CALENDAR_ROWS_COUNT = 6;\n\n@Pipe({\n name: 'tuiCalendarSheet',\n})\nexport class TuiCalendarSheetPipe implements PipeTransform {\n private currentMonth: TuiMonth | null = null;\n private currentSheet: ReadonlyArray<
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-pipes-calendar-sheet.js","sources":["ng://@taiga-ui/core/pipes/calendar-sheet/utils.ts","ng://@taiga-ui/core/pipes/calendar-sheet/calendar-sheet.pipe.ts","ng://@taiga-ui/core/pipes/calendar-sheet/calendar-sheet.module.ts","ng://@taiga-ui/core/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.ts"],"sourcesContent":["import {\n DAYS_IN_WEEK,\n inRange,\n tuiAssert,\n TuiDay,\n TuiDayOfWeek,\n TuiMonth,\n} from '@taiga-ui/cdk';\n\n// TODO: Remove export in ivy compiation\n/**\n * Computes day of week offset of the beginning of the month\n */\nexport const getMonthStartDaysOffset = (\n month: TuiMonth,\n firstDayOfWeek: TuiDayOfWeek,\n): number => {\n const startMonthOffsetFromSunday = new Date(month.year, month.month, 1).getDay();\n\n return startMonthOffsetFromSunday >= firstDayOfWeek\n ? startMonthOffsetFromSunday - firstDayOfWeek\n : DAYS_IN_WEEK - (firstDayOfWeek - startMonthOffsetFromSunday);\n};\n\n/*\nTODO: delete in v3.0:\n * TuiDay.getDayFromMonthRowCol\n * TuiMonth.monthStartDaysOffset\n * TuiMonth.weeksRowsCount\n * TuiYear.yearStartDaysOffset\n * TuiYear.getYearStartDaysOffset\n */\n/**\n * Calculated day on a calendar grid\n * @return resulting day on these coordinates (could exceed passed month)\n */\nexport const getDayFromMonthRowCol = ({\n month,\n rowIndex,\n colIndex,\n firstDayOfWeek,\n}: {\n month: TuiMonth;\n /**\n * row in a calendar\n */\n rowIndex: number;\n /**\n * column in a calendar\n */\n colIndex: number;\n /**\n * first day of the week index (Sunday - 0, Saturday - 6)\n */\n firstDayOfWeek: TuiDayOfWeek;\n}): TuiDay => {\n tuiAssert.assert(Number.isInteger(rowIndex));\n tuiAssert.assert(inRange(rowIndex, 0, 6));\n tuiAssert.assert(Number.isInteger(colIndex));\n tuiAssert.assert(inRange(colIndex, 0, DAYS_IN_WEEK));\n\n let day =\n rowIndex * DAYS_IN_WEEK +\n colIndex -\n getMonthStartDaysOffset(month, firstDayOfWeek) +\n 1;\n\n if (day > month.daysCount) {\n day = day - month.daysCount;\n month = month.append({month: 1});\n }\n\n if (day <= 0) {\n month = month.append({month: -1});\n day = month.daysCount + day;\n }\n\n return new TuiDay(month.year, month.month, day);\n};\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {DAYS_IN_WEEK, TuiDay, TuiDayOfWeek, TuiMonth} from '@taiga-ui/cdk';\nimport {TUI_FIRST_DAY_OF_WEEK} from '@taiga-ui/core/tokens';\n\nimport {getDayFromMonthRowCol} from './utils';\n\nconst CALENDAR_ROWS_COUNT = 6;\n\n@Pipe({\n name: 'tuiCalendarSheet',\n})\nexport class TuiCalendarSheetPipe implements PipeTransform {\n private currentMonth: TuiMonth | null = null;\n private currentSheet: ReadonlyArray<readonly TuiDay[]> = [];\n\n constructor(\n @Inject(TUI_FIRST_DAY_OF_WEEK)\n private readonly firstDayOfWeek: TuiDayOfWeek,\n ) {}\n\n transform(\n month: TuiMonth,\n showAdjacentDays: boolean = false,\n ): ReadonlyArray<readonly TuiDay[]> {\n if (this.currentMonth && this.currentMonth.monthSame(month)) {\n return this.currentSheet;\n }\n\n const sheet: (readonly TuiDay[])[] = [];\n\n for (let rowIndex = 0; rowIndex < CALENDAR_ROWS_COUNT; rowIndex++) {\n const row: TuiDay[] = [];\n\n for (let colIndex = 0; colIndex < DAYS_IN_WEEK; colIndex++) {\n const day = getDayFromMonthRowCol({\n month,\n rowIndex,\n colIndex,\n firstDayOfWeek: this.firstDayOfWeek,\n });\n\n const isPrevMonthDay = (day: TuiDay, relativeToMonth = month) =>\n day.year < relativeToMonth.year || day.month < relativeToMonth.month;\n\n const isNextMonthDay = (day: TuiDay, relativeToMonth = month) =>\n day.year > relativeToMonth.year || day.month > relativeToMonth.month;\n\n if (isPrevMonthDay(day) && !showAdjacentDays) {\n continue;\n }\n\n if (isNextMonthDay(day) && !showAdjacentDays) {\n break;\n }\n\n row.push(day);\n }\n\n sheet.push(row);\n }\n\n this.currentSheet = sheet.filter(row => row.length);\n this.currentMonth = month;\n\n return this.currentSheet;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCalendarSheetPipe} from './calendar-sheet.pipe';\n\n@NgModule({\n declarations: [TuiCalendarSheetPipe],\n exports: [TuiCalendarSheetPipe],\n})\nexport class TuiCalendarSheetPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;AACA;;;AAGO,MAAM,uBAAuB,GAAG,CACnC,KAAe,EACf,cAA4B;IAE5B,MAAM,0BAA0B,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAEjF,OAAO,0BAA0B,IAAI,cAAc;UAC7C,0BAA0B,GAAG,cAAc;UAC3C,YAAY,IAAI,cAAc,GAAG,0BAA0B,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF;;;;;;;;AAQA;;;;AAIO,MAAM,qBAAqB,GAAG,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,cAAc,GAejB;IACG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAA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,MAAM,CAAC,qBAAqB,CAAC,CAAA;GALzB,oBAAoB,CAuDhC;;IC1DY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IAJtC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAClC,CAAC;GACW,0BAA0B,CAAG;;ACR1C;;;;;;"}
|
|
@@ -14,9 +14,10 @@ let TuiFormatNumberPipe = class TuiFormatNumberPipe {
|
|
|
14
14
|
* @param decimalSeparator
|
|
15
15
|
* @param thousandSeparator
|
|
16
16
|
* @param decimalLimit number of digits of decimal part, null to keep untouched
|
|
17
|
+
* @param zeroPadding enable zeros at the end of decimal part
|
|
17
18
|
*/
|
|
18
|
-
transform(value, decimalLimit = null, decimalSeparator = this.numberFormat.decimalSeparator, thousandSeparator = this.numberFormat.thousandSeparator) {
|
|
19
|
-
return formatNumber(value, decimalLimit, decimalSeparator, thousandSeparator);
|
|
19
|
+
transform(value, decimalLimit = null, decimalSeparator = this.numberFormat.decimalSeparator, thousandSeparator = this.numberFormat.thousandSeparator, zeroPadding = this.numberFormat.zeroPadding) {
|
|
20
|
+
return formatNumber(value, decimalLimit, decimalSeparator, thousandSeparator, zeroPadding);
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
TuiFormatNumberPipe.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-pipes-format-number.js","sources":["ng://@taiga-ui/core/pipes/format-number/format-number.pipe.ts","ng://@taiga-ui/core/pipes/format-number/format-number.module.ts","ng://@taiga-ui/core/pipes/format-number/taiga-ui-core-pipes-format-number.ts"],"sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {NumberFormatSettings} from '@taiga-ui/core/interfaces';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {formatNumber} from '@taiga-ui/core/utils/format';\n\n@Pipe({name: 'tuiFormatNumber'})\nexport class TuiFormatNumberPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: NumberFormatSettings,\n ) {}\n\n /**\n * Formats number adding thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n * @param value number\n * @param decimalSeparator\n * @param thousandSeparator\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n */\n transform(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = this.numberFormat.decimalSeparator,\n thousandSeparator: string = this.numberFormat.thousandSeparator,\n ): string {\n return formatNumber(value
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-pipes-format-number.js","sources":["ng://@taiga-ui/core/pipes/format-number/format-number.pipe.ts","ng://@taiga-ui/core/pipes/format-number/format-number.module.ts","ng://@taiga-ui/core/pipes/format-number/taiga-ui-core-pipes-format-number.ts"],"sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {NumberFormatSettings} from '@taiga-ui/core/interfaces';\nimport {TUI_NUMBER_FORMAT} from '@taiga-ui/core/tokens';\nimport {formatNumber} from '@taiga-ui/core/utils/format';\n\n@Pipe({name: 'tuiFormatNumber'})\nexport class TuiFormatNumberPipe implements PipeTransform {\n constructor(\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: NumberFormatSettings,\n ) {}\n\n /**\n * Formats number adding thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n * @param value number\n * @param decimalSeparator\n * @param thousandSeparator\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n * @param zeroPadding enable zeros at the end of decimal part\n */\n transform(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = this.numberFormat.decimalSeparator,\n thousandSeparator: string = this.numberFormat.thousandSeparator,\n zeroPadding: boolean = this.numberFormat.zeroPadding,\n ): string {\n return formatNumber(\n value,\n decimalLimit,\n decimalSeparator,\n thousandSeparator,\n zeroPadding,\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFormatNumberPipe} from './format-number.pipe';\n\n@NgModule({\n exports: [TuiFormatNumberPipe],\n declarations: [TuiFormatNumberPipe],\n})\nexport class TuiFormatNumberPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAMa,mBAAmB,GAAhC,MAAa,mBAAmB;IAC5B,YAEqB,YAAkC;QAAlC,iBAAY,GAAZ,YAAY,CAAsB;KACnD;;;;;;;;;;IAWJ,SAAS,CACL,KAAa,EACb,eAA8B,IAAI,EAClC,mBAA2B,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAC7D,oBAA4B,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAC/D,cAAuB,IAAI,CAAC,YAAY,CAAC,WAAW;QAEpD,OAAO,YAAY,CACf,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,CACd,CAAC;KACL;EACJ;;4CA5BQ,MAAM,SAAC,iBAAiB;;AAFpB,mBAAmB;IAD/B,IAAI,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;IAGvB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAFrB,mBAAmB,CA8B/B;;IC5BY,yBAAyB,GAAtC,MAAa,yBAAyB;EAAG;AAA5B,yBAAyB;IAJrC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,mBAAmB,CAAC;QAC9B,YAAY,EAAE,CAAC,mBAAmB,CAAC;KACtC,CAAC;GACW,yBAAyB,CAAG;;ACRzC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-services.js","sources":["ng://@taiga-ui/core/services/hint.service.ts","ng://@taiga-ui/core/services/night-theme.service.ts","ng://@taiga-ui/core/services/router-link-active.service.ts","ng://@taiga-ui/core/services/svg.service.ts","ng://@taiga-ui/core/services/taiga-ui-core-services.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\n\n// TODO: remove after v2.0 separating. It prevents seps cycling.\ntype TuiHintDirective = any;\n\ntype AbstractTuiHint = any;\n\n/**\n * Service for displaying hints/tooltips\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiHintService extends BehaviorSubject<ReadonlyArray<AbstractTuiHint>> {\n /**\n * TODO: v2.0\n * We need the following logic for desribedBy\n * move it into another service that can register hints and\n * manage it using TuiHintService inside\n */\n private directives: ReadonlyArray<TuiHintDirective> = [];\n\n constructor() {\n super([]);\n }\n\n add(directive: AbstractTuiHint) {\n this.next(this.value.concat(directive));\n }\n\n remove(directive: AbstractTuiHint) {\n if (this.value.includes(directive)) {\n this.next(this.value.filter(hint => hint !== directive));\n }\n }\n\n register(directive: TuiHintDirective) {\n this.directives = [...this.directives, directive];\n }\n\n unregister(directive: TuiHintDirective) {\n this.remove(directive);\n this.directives = this.directives.filter(dir => dir !== directive);\n }\n\n showHintForId(id: string) {\n const directive = this.findDirectiveWithHintId(id);\n\n if (directive) {\n this.add(directive);\n }\n }\n\n hideHintForId(id: string) {\n const directive = this.findDirectiveWithHintId(id);\n\n if (directive) {\n this.remove(directive);\n }\n }\n\n private findDirectiveWithHintId(id: string): TuiHintDirective | undefined {\n return this.directives.find(directive => directive.tuiHintId === id);\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map, share, startWith} from 'rxjs/operators';\n\n// @dynamic\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiNightThemeService extends Observable<boolean> {\n constructor(@Inject(WINDOW) windowRef: Window) {\n const media = windowRef.matchMedia('(prefers-color-scheme: dark)');\n const media$ = fromEvent(media, 'change').pipe(\n startWith(null),\n map(() => media.matches),\n share(),\n );\n\n super(subscriber => media$.subscribe(subscriber));\n }\n}\n","import {Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {RouterLinkActive} from '@angular/router';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiDestroyService, tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiRouterLinkActiveService extends Observable<boolean> {\n constructor(\n @Optional()\n @Inject(RouterLinkActive)\n routerLinkActive: RouterLinkActive | null,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n const stream$ = routerLinkActive\n ? animationFrame$.pipe(\n map(() => routerLinkActive.isActive),\n distinctUntilChanged(),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n : EMPTY;\n\n super(subscriber => stream$.subscribe(subscriber));\n }\n}\n","import {Inject, Injectable, Optional, Sanitizer, SecurityContext} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {tuiAssert} from '@taiga-ui/cdk';\nimport {TUI_ICONS, TUI_SANITIZER} from '@taiga-ui/core/tokens';\nimport {processIcon} from '@taiga-ui/core/utils/dom';\nimport {BehaviorSubject} from 'rxjs';\n\n/**\n * Service for reusing SVGs without inlining each instance\n */\n// @dynamic\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiSvgService {\n private originals: Record<string, string> = {};\n\n readonly items$ = new BehaviorSubject<Map<string, SafeHtml>>(new Map());\n\n constructor(\n @Optional()\n @Inject(TUI_SANITIZER)\n private readonly tuiSanitizer: Sanitizer | null,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_ICONS) icons: Record<string, string>,\n ) {\n this.define(icons);\n }\n\n define(icons: Record<string, string>) {\n const {value} = this.items$;\n\n Object.keys(icons).forEach(key => {\n this.defineIcon(key, icons[key], value);\n });\n\n this.items$.next(value);\n }\n\n getOriginal(name: string): string | null {\n return this.originals[name] || null;\n }\n\n private defineIcon(name: string, src: string, map: Map<string, SafeHtml>) {\n if (map.has(name)) {\n return;\n }\n\n const parsed = this.parseSrc(name, src);\n\n if (!parsed) {\n tuiAssert.assert(false, 'Unable to parse given SVG src');\n\n return;\n }\n\n map.set(name, parsed);\n this.originals = {\n ...this.originals,\n [name]: src,\n };\n }\n\n private parseSrc(name: string, src: string): SafeHtml {\n return this.sanitize(processIcon(src, name));\n }\n\n private sanitize(src: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(\n (this.tuiSanitizer\n ? this.tuiSanitizer.sanitize(SecurityContext.HTML, src)\n : this.sanitizer.sanitize(SecurityContext.HTML, src)) || '',\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA;;;IAMa,cAAc,GAA3B,MAAa,cAAe,SAAQ,eAA+C;IAS/E;QACI,KAAK,CAAC,EAAE,CAAC,CAAC;;;;;;;QAHN,eAAU,GAAoC,EAAE,CAAC;KAIxD;IAED,GAAG,CAAC,SAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;KAC3C;IAED,MAAM,CAAC,SAA0B;QAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;SAC5D;KACJ;IAED,QAAQ,CAAC,SAA2B;QAChC,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;KACrD;IAED,UAAU,CAAC,SAA2B;QAClC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC;KACtE;IA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AAC,aAAa;YAE6B,YAAY,uBAA7D,MAAM,SAAC,YAAY;4CACnB,MAAM,SAAC,SAAS;;;AAVZ,aAAa;IAHzB,UAAU,CAAC;QACR,UAAU,EAAE,MAAM;KACrB,CAAC;IAOO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;IACpB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;GAVb,aAAa,CA4DzB;;AC1ED;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-services.js","sources":["ng://@taiga-ui/core/services/hint.service.ts","ng://@taiga-ui/core/services/night-theme.service.ts","ng://@taiga-ui/core/services/router-link-active.service.ts","ng://@taiga-ui/core/services/svg.service.ts","ng://@taiga-ui/core/services/taiga-ui-core-services.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\n\n// TODO: remove after v2.0 separating. It prevents seps cycling.\ntype TuiHintDirective = any;\n\ntype AbstractTuiHint = any;\n\n/**\n * Service for displaying hints/tooltips\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiHintService extends BehaviorSubject<readonly AbstractTuiHint[]> {\n /**\n * TODO: v2.0\n * We need the following logic for desribedBy\n * move it into another service that can register hints and\n * manage it using TuiHintService inside\n */\n private directives: readonly TuiHintDirective[] = [];\n\n constructor() {\n super([]);\n }\n\n add(directive: AbstractTuiHint) {\n this.next(this.value.concat(directive));\n }\n\n remove(directive: AbstractTuiHint) {\n if (this.value.includes(directive)) {\n this.next(this.value.filter(hint => hint !== directive));\n }\n }\n\n register(directive: TuiHintDirective) {\n this.directives = [...this.directives, directive];\n }\n\n unregister(directive: TuiHintDirective) {\n this.remove(directive);\n this.directives = this.directives.filter(dir => dir !== directive);\n }\n\n showHintForId(id: string) {\n const directive = this.findDirectiveWithHintId(id);\n\n if (directive) {\n this.add(directive);\n }\n }\n\n hideHintForId(id: string) {\n const directive = this.findDirectiveWithHintId(id);\n\n if (directive) {\n this.remove(directive);\n }\n }\n\n private findDirectiveWithHintId(id: string): TuiHintDirective | undefined {\n return this.directives.find(directive => directive.tuiHintId === id);\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map, share, startWith} from 'rxjs/operators';\n\n// @dynamic\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiNightThemeService extends Observable<boolean> {\n constructor(@Inject(WINDOW) windowRef: Window) {\n const media = windowRef.matchMedia('(prefers-color-scheme: dark)');\n const media$ = fromEvent(media, 'change').pipe(\n startWith(null),\n map(() => media.matches),\n share(),\n );\n\n super(subscriber => media$.subscribe(subscriber));\n }\n}\n","import {Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {RouterLinkActive} from '@angular/router';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiDestroyService, tuiZoneOptimized} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiRouterLinkActiveService extends Observable<boolean> {\n constructor(\n @Optional()\n @Inject(RouterLinkActive)\n routerLinkActive: RouterLinkActive | null,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n const stream$ = routerLinkActive\n ? animationFrame$.pipe(\n map(() => routerLinkActive.isActive),\n distinctUntilChanged(),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n : EMPTY;\n\n super(subscriber => stream$.subscribe(subscriber));\n }\n}\n","import {Inject, Injectable, Optional, Sanitizer, SecurityContext} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {tuiAssert} from '@taiga-ui/cdk';\nimport {TUI_ICONS, TUI_SANITIZER} from '@taiga-ui/core/tokens';\nimport {processIcon} from '@taiga-ui/core/utils/dom';\nimport {BehaviorSubject} from 'rxjs';\n\n/**\n * Service for reusing SVGs without inlining each instance\n */\n// @dynamic\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiSvgService {\n private originals: Record<string, string> = {};\n\n readonly items$ = new BehaviorSubject<Map<string, SafeHtml>>(new Map());\n\n constructor(\n @Optional()\n @Inject(TUI_SANITIZER)\n private readonly tuiSanitizer: Sanitizer | null,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_ICONS) icons: Record<string, string>,\n ) {\n this.define(icons);\n }\n\n define(icons: Record<string, string>) {\n const {value} = this.items$;\n\n Object.keys(icons).forEach(key => {\n this.defineIcon(key, icons[key], value);\n });\n\n this.items$.next(value);\n }\n\n getOriginal(name: string): string | null {\n return this.originals[name] || null;\n }\n\n private defineIcon(name: string, src: string, map: Map<string, SafeHtml>) {\n if (map.has(name)) {\n return;\n }\n\n const parsed = this.parseSrc(name, src);\n\n if (!parsed) {\n tuiAssert.assert(false, 'Unable to parse given SVG src');\n\n return;\n }\n\n map.set(name, parsed);\n this.originals = {\n ...this.originals,\n [name]: src,\n };\n }\n\n private parseSrc(name: string, src: string): SafeHtml {\n return this.sanitize(processIcon(src, name));\n }\n\n private sanitize(src: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(\n (this.tuiSanitizer\n ? this.tuiSanitizer.sanitize(SecurityContext.HTML, src)\n : this.sanitizer.sanitize(SecurityContext.HTML, src)) || '',\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA;;;IAMa,cAAc,GAA3B,MAAa,cAAe,SAAQ,eAA2C;IAS3E;QACI,KAAK,CAAC,EAAE,CAAC,CAAC;;;;;;;QAHN,eAAU,GAAgC,EAAE,CAAC;KAIpD;IAED,GAAG,CAAC,SAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,CA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,EAAE,MAAM,CAAC,CAAC;QACtB,IAAI,CAAC,SAAS,mCACP,IAAI,CAAC,SAAS,KACjB,CAAC,IAAI,GAAG,GAAG,GACd,CAAC;KACL;IAEO,QAAQ,CAAC,IAAY,EAAE,GAAW;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KAChD;IAEO,QAAQ,CAAC,GAAW;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CACzC,CAAC,IAAI,CAAC,YAAY;cACZ,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC;cACrD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,CAClE,CAAC;KACL;EACJ;;YApDsC,SAAS,uBAFvC,QAAQ,YACR,MAAM,SAAC,aAAa;YAE6B,YAAY,uBAA7D,MAAM,SAAC,YAAY;4CACnB,MAAM,SAAC,SAAS;;;AAVZ,aAAa;IAHzB,UAAU,CAAC;QACR,UAAU,EAAE,MAAM;KACrB,CAAC;IAOO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;IACpB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;GAVb,aAAa,CA4DzB;;AC1ED;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-tokens.js","sources":["ng://@taiga-ui/core/tokens/animations-duration.ts","ng://@taiga-ui/core/tokens/animation-options.ts","ng://@taiga-ui/core/tokens/assert-enabled.ts","ng://@taiga-ui/core/tokens/data-list-accessor.ts","ng://@taiga-ui/core/tokens/data-list-host.ts","ng://@taiga-ui/core/tokens/document-or-shadow-root.ts","ng://@taiga-ui/core/tokens/dropdown-directive.ts","ng://@taiga-ui/core/tokens/element-ref.ts","ng://@taiga-ui/core/tokens/first-day-of-week.ts","ng://@taiga-ui/core/tokens/i18n.ts","ng://@taiga-ui/core/tokens/icons.ts","ng://@taiga-ui/core/tokens/icons-path.ts","ng://@taiga-ui/core/tokens/is-mobile-resolution.ts","ng://@taiga-ui/core/tokens/media.ts","ng://@taiga-ui/core/tokens/mode.ts","ng://@taiga-ui/core/tokens/notification-options.ts","ng://@taiga-ui/core/tokens/number-format.ts","ng://@taiga-ui/core/tokens/option-content.ts","ng://@taiga-ui/core/tokens/ordered-short-week-days.ts","ng://@taiga-ui/core/tokens/sanitizer.ts","ng://@taiga-ui/core/tokens/scroll-ref.ts","ng://@taiga-ui/core/tokens/svg-src-processor.ts","ng://@taiga-ui/core/tokens/textfield-appearance.ts","ng://@taiga-ui/core/tokens/textfield-host.ts","ng://@taiga-ui/core/tokens/theme.ts","ng://@taiga-ui/core/tokens/value-accessor.ts","ng://@taiga-ui/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nexport const TUI_ANIMATIONS_DURATION = new InjectionToken<number>(\n 'Duration of all Taiga UI animations in ms',\n {\n factory: () => 300,\n },\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\nexport const TUI_ANIMATION_OPTIONS = new InjectionToken<AnimationOptions>(\n 'Options for Taiga UI animations',\n {\n factory: () => ({\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n }),\n },\n);\n","import {InjectionToken, isDevMode} from '@angular/core';\n\nexport const TUI_ASSERT_ENABLED = new InjectionToken(\n 'Flag to enable assertions across Taiga UI',\n {\n factory: () => isDevMode(),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n 'Accessor for options',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<any>>(\n 'DataList controller',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n 'Document or ShadowRoot',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DROPDOWN_DIRECTIVE = new InjectionToken<TuiDropdown>(\n 'Directive controlling TuiDropdownBoxComponent',\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(\n 'ElementRef when you cannot use @Input for single time injection',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk';\n\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<TuiDayOfWeek>(\n 'The first day of the week index',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\n\nexport const TUI_MONTHS = new InjectionToken('Localized months names', {\n factory: extractI18n('months'),\n});\n\nexport const TUI_CLOSE_WORD = new InjectionToken(`i18n 'close' word`, {\n factory: extractI18n('close'),\n});\n\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n `i18n 'Nothing found' message`,\n {\n factory: extractI18n('nothingFoundMessage'),\n },\n);\n\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(`i18n of error message`, {\n factory: extractI18n('defaultErrorMessage'),\n});\n\nexport const TUI_SPIN_TEXTS = new InjectionToken('spin i18n texts', {\n factory: extractI18n('spinTexts'),\n});\n\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken('calendars i18n texts', {\n factory: extractI18n('shortWeekDays'),\n});\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS = new InjectionToken<Record<string, string>>(\n 'A key/value dictionary of icon names and src to be defined with TuiSvgService',\n {\n factory: () => ({}),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {iconsPathFactory} from '@taiga-ui/core/utils';\n\nexport const TUI_ICONS_PATH: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'A handler to retrieve USE id for icon by name',\n {\n factory: () => iconsPathFactory('assets/taiga-ui/icons/'),\n },\n );\n","import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport const TUI_IS_MOBILE_RES = new InjectionToken<Observable<boolean>>(\n 'Mobile resolution stream for private providers',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>('Token for media constant', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(\n 'Mode stream for private providers',\n );\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiNotificationAutoClose} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiNotificationDefaultOptions {\n readonly autoClose: TuiNotificationAutoClose;\n readonly label: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;\n readonly status: TuiNotification;\n readonly hasIcon: boolean;\n readonly hasCloseButton: boolean;\n readonly defaultAutoCloseTime: number;\n}\n\n/**\n * @deprecated: remove in v3.0, use TuiNotificationDefaultOptions\n */\nexport type NotificationTokenOptions = TuiNotificationDefaultOptions;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: true,\n label: '',\n status: TuiNotification.Info,\n hasIcon: true,\n hasCloseButton: true,\n defaultAutoCloseTime: 3000,\n};\n\nexport const TUI_NOTIFICATION_OPTIONS = new InjectionToken<TuiNotificationDefaultOptions>(\n 'Default parameters for notification alert component',\n {\n factory: () => TUI_NOTIFICATION_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_NOTIFICATION_OPTIONS,\n useValue: {...TUI_NOTIFICATION_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {NumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_NUMBER_FORMAT = new InjectionToken<NumberFormatSettings>(\n 'Formatting configuration for displayed numbers',\n {\n factory: () => ({\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n }),\n },\n);\n","import {InjectionToken, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<{}>>>\n>('Content for tuiOption component');\n","import {inject, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK, TUI_SHORT_WEEK_DAYS} from './index';\n\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\n// TODO: Remove export in ivy compiation\nexport const convertToSundayFirstWeekFormat = (weekDaysNames: WEEK_DAYS_NAMES) => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = new InjectionToken<\n Observable<WEEK_DAYS_NAMES>\n>('Ordered calendars i18n texts', {\n factory: () => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n },\n});\n","import {TUI_SANITIZER as TOKEN} from '@taiga-ui/cdk';\n\nexport const TUI_SANITIZER = TOKEN;\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken<ElementRef<HTMLElement>>(\n 'Scrollable container',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\nexport const TUI_SVG_SRC_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>('Source path processor for svg', {\n factory: () => identity,\n });\n","import {InjectionToken} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\nexport const TUI_TEXTFIELD_APPEARANCE = new InjectionToken<string>(\n 'Appearance for inputs',\n {\n factory: () => TuiAppearance.Textfield,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n 'An interface to communicate with textfield based controls',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken<string>('Theme name', {\n factory: () => 'Taiga',\n});\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n 'Buffer token to pass NG_VALUE_ACCESSOR to a different Injector',\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TOKEN"],"mappings":";;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CACrD,2CAA2C,EAC3C;IACI,OAAO,EAAE,MAAM,GAAG;CACrB;;MCDQ,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE,OAAO;QACZ,MAAM,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,uBAAuB,CAAC;SAC5C;KACJ,CAAC;CACL;;MCXQ,kBAAkB,GAAG,IAAI,cAAc,CAChD,2CAA2C,EAC3C;IACI,OAAO,EAAE,MAAM,SAAS,EAAE;CAC7B;;MCHQ,sBAAsB,GAAG,IAAI,cAAc,CACpD,sBAAsB;;MCDb,kBAAkB,GAAG,IAAI,cAAc,CAChD,qBAAqB;;MCFZ,2BAA2B,GAAG,IAAI,cAAc,CACzD,wBAAwB;;MCAf,sBAAsB,GAAG,IAAI,cAAc,CACpD,+CAA+C;;MCFtC,eAAe,GAAG,IAAI,cAAc,CAC7C,iEAAiE;;MCAxD,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE;CACZ;;MCJQ,UAAU,GAAG,IAAI,cAAc,CAAC,wBAAwB,EAAE;IACnE,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC;CACjC,EAAE;MAEU,cAAc,GAAG,IAAI,cAAc,CAAC,mBAAmB,EAAE;IAClE,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;CAChC,EAAE;MAEU,yBAAyB,GAAG,IAAI,cAAc,CACvD,8BAA8B,EAC9B;IACI,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC;CAC9C,EACH;MAEW,yBAAyB,GAAG,IAAI,cAAc,CAAC,uBAAuB,EAAE;IACjF,OAAO,EAAE,WAAW,CAAC,qBAAqB,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ng://@taiga-ui/core/tokens/animation-options.ts","ng://@taiga-ui/core/tokens/assert-enabled.ts","ng://@taiga-ui/core/tokens/data-list-accessor.ts","ng://@taiga-ui/core/tokens/data-list-host.ts","ng://@taiga-ui/core/tokens/document-or-shadow-root.ts","ng://@taiga-ui/core/tokens/dropdown-directive.ts","ng://@taiga-ui/core/tokens/element-ref.ts","ng://@taiga-ui/core/tokens/first-day-of-week.ts","ng://@taiga-ui/core/tokens/i18n.ts","ng://@taiga-ui/core/tokens/icons.ts","ng://@taiga-ui/core/tokens/icons-path.ts","ng://@taiga-ui/core/tokens/is-mobile-resolution.ts","ng://@taiga-ui/core/tokens/media.ts","ng://@taiga-ui/core/tokens/mode.ts","ng://@taiga-ui/core/tokens/notification-options.ts","ng://@taiga-ui/core/tokens/number-format.ts","ng://@taiga-ui/core/tokens/option-content.ts","ng://@taiga-ui/core/tokens/ordered-short-week-days.ts","ng://@taiga-ui/core/tokens/sanitizer.ts","ng://@taiga-ui/core/tokens/scroll-ref.ts","ng://@taiga-ui/core/tokens/svg-src-processor.ts","ng://@taiga-ui/core/tokens/textfield-appearance.ts","ng://@taiga-ui/core/tokens/textfield-host.ts","ng://@taiga-ui/core/tokens/theme.ts","ng://@taiga-ui/core/tokens/value-accessor.ts","ng://@taiga-ui/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nexport const TUI_ANIMATIONS_DURATION = new InjectionToken<number>(\n 'Duration of all Taiga UI animations in ms',\n {\n factory: () => 300,\n },\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\nexport const TUI_ANIMATION_OPTIONS = new InjectionToken<AnimationOptions>(\n 'Options for Taiga UI animations',\n {\n factory: () => ({\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n }),\n },\n);\n","import {InjectionToken, isDevMode} from '@angular/core';\n\nexport const TUI_ASSERT_ENABLED = new InjectionToken(\n 'Flag to enable assertions across Taiga UI',\n {\n factory: () => isDevMode(),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n 'Accessor for options',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<any>>(\n 'DataList controller',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n 'Document or ShadowRoot',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DROPDOWN_DIRECTIVE = new InjectionToken<TuiDropdown>(\n 'Directive controlling TuiDropdownBoxComponent',\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(\n 'ElementRef when you cannot use @Input for single time injection',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk';\n\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<TuiDayOfWeek>(\n 'The first day of the week index',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\n\nexport const TUI_MONTHS = new InjectionToken('Localized months names', {\n factory: extractI18n('months'),\n});\n\nexport const TUI_CLOSE_WORD = new InjectionToken(`i18n 'close' word`, {\n factory: extractI18n('close'),\n});\n\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n `i18n 'Nothing found' message`,\n {\n factory: extractI18n('nothingFoundMessage'),\n },\n);\n\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(`i18n of error message`, {\n factory: extractI18n('defaultErrorMessage'),\n});\n\nexport const TUI_SPIN_TEXTS = new InjectionToken('spin i18n texts', {\n factory: extractI18n('spinTexts'),\n});\n\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken('calendars i18n texts', {\n factory: extractI18n('shortWeekDays'),\n});\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS = new InjectionToken<Record<string, string>>(\n 'A key/value dictionary of icon names and src to be defined with TuiSvgService',\n {\n factory: () => ({}),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {iconsPathFactory} from '@taiga-ui/core/utils';\n\nexport const TUI_ICONS_PATH: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'A handler to retrieve USE id for icon by name',\n {\n factory: () => iconsPathFactory('assets/taiga-ui/icons/'),\n },\n );\n","import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport const TUI_IS_MOBILE_RES = new InjectionToken<Observable<boolean>>(\n 'Mobile resolution stream for private providers',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>('Token for media constant', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(\n 'Mode stream for private providers',\n );\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\n\nexport interface TuiNotificationDefaultOptions\n extends Omit<TuiAlertOptions<unknown>, 'data'> {\n readonly defaultAutoCloseTime: number;\n}\n\n/**\n * @deprecated: remove in v3.0, use TuiNotificationDefaultOptions\n */\nexport type NotificationTokenOptions = TuiNotificationDefaultOptions;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: true,\n label: '',\n status: TuiNotification.Info,\n hasIcon: true,\n hasCloseButton: true,\n defaultAutoCloseTime: 3000,\n};\n\nexport const TUI_NOTIFICATION_OPTIONS = new InjectionToken<TuiNotificationDefaultOptions>(\n 'Default parameters for notification alert component',\n {\n factory: () => TUI_NOTIFICATION_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_NOTIFICATION_OPTIONS,\n useValue: {...TUI_NOTIFICATION_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {NumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_NUMBER_FORMAT = new InjectionToken<NumberFormatSettings>(\n 'Formatting configuration for displayed numbers',\n {\n factory: () => ({\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n }),\n },\n);\n","import {InjectionToken, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<{}>>>\n>('Content for tuiOption component');\n","import {inject, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK, TUI_SHORT_WEEK_DAYS} from './index';\n\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\n// TODO: Remove export in ivy compiation\nexport const convertToSundayFirstWeekFormat = (weekDaysNames: WEEK_DAYS_NAMES) => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = new InjectionToken<\n Observable<WEEK_DAYS_NAMES>\n>('Ordered calendars i18n texts', {\n factory: () => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n },\n});\n","import {TUI_SANITIZER as TOKEN} from '@taiga-ui/cdk';\n\nexport const TUI_SANITIZER = TOKEN;\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken<ElementRef<HTMLElement>>(\n 'Scrollable container',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\nexport const TUI_SVG_SRC_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>('Source path processor for svg', {\n factory: () => identity,\n });\n","import {InjectionToken} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\nexport const TUI_TEXTFIELD_APPEARANCE = new InjectionToken<string>(\n 'Appearance for inputs',\n {\n factory: () => TuiAppearance.Textfield,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n 'An interface to communicate with textfield based controls',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken<string>('Theme name', {\n factory: () => 'Taiga',\n});\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n 'Buffer token to pass NG_VALUE_ACCESSOR to a different Injector',\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TOKEN"],"mappings":";;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CACrD,2CAA2C,EAC3C;IACI,OAAO,EAAE,MAAM,GAAG;CACrB;;MCDQ,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE,OAAO;QACZ,MAAM,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,uBAAuB,CAAC;SAC5C;KACJ,CAAC;CACL;;MCXQ,kBAAkB,GAAG,IAAI,cAAc,CAChD,2CAA2C,EAC3C;IACI,OAAO,EAAE,MAAM,SAAS,EAAE;CAC7B;;MCHQ,sBAAsB,GAAG,IAAI,cAAc,CACpD,sBAAsB;;MCDb,kBAAkB,GAAG,IAAI,cAAc,CAChD,qBAAqB;;MCFZ,2BAA2B,GAAG,IAAI,cAAc,CACzD,wBAAwB;;MCAf,sBAAsB,GAAG,IAAI,cAAc,CACpD,+CAA+C;;MCFtC,eAAe,GAAG,IAAI,cAAc,CAC7C,iEAAiE;;MCAxD,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE;CACZ;;MCJQ,UAAU,GAAG,IAAI,cAAc,CAAC,wBAAwB,EAAE;IACnE,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC;CACjC,EAAE;MAEU,cAAc,GAAG,IAAI,cAAc,CAAC,mBAAmB,EAAE;IAClE,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;CAChC,EAAE;MAEU,yBAAyB,GAAG,IAAI,cAAc,CACvD,8BAA8B,EAC9B;IACI,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC;CAC9C,EACH;MAEW,yBAAyB,GAAG,IAAI,cAAc,CAAC,uBAAuB,EAAE;IACjF,O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
|
return value.toLowerCase().replace(/(?:^|\s)\S/g, char => char.toUpperCase());
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function capitalizeFirstLetter(value) {
|
|
15
|
+
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
/**
|
|
15
19
|
* Convert number to string with replacing exponent part on decimals
|
|
16
20
|
*
|
|
@@ -58,11 +62,14 @@ function formatNumber(value, decimalLimit = null, decimalSeparator = ',', thousa
|
|
|
58
62
|
const integerPartString = String(Math.floor(Math.abs(value)));
|
|
59
63
|
let fractionPartPadded = getFractionPartPadded(value, decimalLimit);
|
|
60
64
|
if (decimalLimit !== null) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
if (zeroPadding) {
|
|
66
|
+
const zeroPaddingSize = Math.max(decimalLimit - fractionPartPadded.length, 0);
|
|
67
|
+
const zeroPartString = '0'.repeat(zeroPaddingSize);
|
|
68
|
+
fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
fractionPartPadded = fractionPartPadded.replace(/0*$/, '');
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
74
|
const remainder = integerPartString.length % 3;
|
|
68
75
|
const sign = value < 0 ? '-' : '';
|
|
@@ -73,9 +80,7 @@ function formatNumber(value, decimalLimit = null, decimalSeparator = ',', thousa
|
|
|
73
80
|
}
|
|
74
81
|
result += integerPartString.charAt(i);
|
|
75
82
|
}
|
|
76
|
-
return
|
|
77
|
-
? result + decimalSeparator + fractionPartPadded
|
|
78
|
-
: result;
|
|
83
|
+
return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
/**
|
|
@@ -160,5 +165,5 @@ function tuiPluralizeToICU(pluralize) {
|
|
|
160
165
|
* Generated bundle index. Do not edit.
|
|
161
166
|
*/
|
|
162
167
|
|
|
163
|
-
export { capitalize, formatNumber, formatPhone, getFractionPartPadded, numberToStringWithoutExp, otherDecimalSymbol, pluralize, tuiPluralizeToICU };
|
|
168
|
+
export { capitalize, capitalizeFirstLetter, formatNumber, formatPhone, getFractionPartPadded, numberToStringWithoutExp, otherDecimalSymbol, pluralize, tuiPluralizeToICU };
|
|
164
169
|
//# sourceMappingURL=taiga-ui-core-utils-format.js.map
|
|
@@ -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/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 * 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 */\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","/**\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 */\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","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\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 */\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');\n\n return typeof precision === 'number'\n ? fractionPartPadded.substr(0, precision)\n : fractionPartPadded;\n}\n","import {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n/**\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 */\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 const zeroPaddingSize: number = zeroPadding\n ? Math.max(decimalLimit - fractionPartPadded.length, 0)\n : 0;\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? '-' : '';\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 || decimalLimit\n ? result + decimalSeparator + fractionPartPadded\n : result;\n}\n","/**\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 */\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('+', '');\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","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === '.' ? ',' : '.';\n}\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 */\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: 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;;;;;;;SAOgB,UAAU,CAAC,KAAa;IACpC,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AI,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;;ACvBA;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 * 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 */\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","export function capitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","/**\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 */\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","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\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 */\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');\n\n return typeof precision === 'number'\n ? fractionPartPadded.substr(0, precision)\n : fractionPartPadded;\n}\n","import {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n/**\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 */\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 ? '-' : '';\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","/**\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 */\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('+', '');\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","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === '.' ? ',' : '.';\n}\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 */\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: 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;;;;;;;SAOgB,UAAU,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAClF;;SCTgB,qBAAqB,CAAC,KAAa;IAC/C,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/D;;ACFA;;;;;;SAMgB,wBAAwB,CAAC,KAAa;IAClD,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExD,IAAI,eAAe,GAAG,aAAa,CAAC;IAEpC,IAAI,OAAO,EAAE;QACT,MAAM,GAAG,cAAc,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,MAAM,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;;AClBA;;;;;;;SAOgB,qBAAqB,CAAC,KAAa,EAAE,SAAyB;IAC1E,MAAM,GAAG,kBAAkB,GAAG,EAAE,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC,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SAC3B;aAAM;YACH,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;SAC/B;KACJ;IAED,OAAO,MAAM,CAAC;AAClB;;SC/CgB,kBAAkB,CAAC,MAAwB;IACvD,OAAO,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACtC;;ACFA;;;;;;;;SAQgB,SAAS,CAAC,KAAa,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAe;IACnE,MAAM,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC;IACvB,MAAM,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;;ACvBA;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;;;;;;"}
|
|
@@ -5,12 +5,12 @@ import { otherDecimalSymbol } from '@taiga-ui/core/utils/format';
|
|
|
5
5
|
/**
|
|
6
6
|
* Used to finish a number with zeros to a given precision
|
|
7
7
|
*/
|
|
8
|
-
function tuiCreateAutoCorrectedNumberPipe(decimalLimit = 0, decimalSymbol = ',', thousandSymbol = CHAR_NO_BREAK_SPACE, nativeInput, allowNegative) {
|
|
8
|
+
function tuiCreateAutoCorrectedNumberPipe(decimalLimit = 0, decimalSymbol = ',', thousandSymbol = CHAR_NO_BREAK_SPACE, nativeInput, allowNegative, isIOS = false) {
|
|
9
9
|
tuiAssert.assert(Number.isInteger(decimalLimit));
|
|
10
10
|
tuiAssert.assert(decimalLimit >= 0);
|
|
11
11
|
// Guess for which browser I need this :)
|
|
12
12
|
let previousCaret = -1;
|
|
13
|
-
const unlucky = !!nativeInput && isSafari(nativeInput);
|
|
13
|
+
const unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;
|
|
14
14
|
if (nativeInput && unlucky) {
|
|
15
15
|
nativeInput.addEventListener('beforeinput', () => {
|
|
16
16
|
previousCaret = nativeInput.selectionStart || 0;
|