@taiga-ui/kit 2.13.0 → 2.16.0-fixed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/input-slider.d.ts +4 -3
- package/abstract/slider/slider.d.ts +2 -2
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +28 -12
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.js +17 -6
- package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +86 -30
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +24 -24
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +61 -32
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +18 -17
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.js +1 -0
- package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +28 -14
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +23 -7
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +15 -4
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +20 -15
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +15 -10
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +5 -3
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +1 -0
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +20 -6
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +325 -0
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-components-radio.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +1 -2
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +1 -2
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +17 -9
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +16 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +52 -26
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components.umd.js +12 -4
- package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js +390 -0
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +1 -0
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives.umd.js +12 -4
- package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +4 -0
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +7 -7
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-validators.umd.js +1 -0
- package/bundles/taiga-ui-kit-validators.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-validators.umd.min.js.map +1 -1
- package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
- package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
- package/components/field-error/field-error.component.d.ts +2 -0
- package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/input-count/index.d.ts +1 -0
- package/components/input-count/input-count-options.d.ts +19 -0
- package/components/input-count/input-count.component.d.ts +10 -3
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/input-date.component.d.ts +7 -4
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/input-date-range.component.d.ts +8 -5
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/input-date-time.component.d.ts +10 -5
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-number/input-number.component.d.ts +4 -2
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-phone/input-phone.component.d.ts +4 -2
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +5 -1
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-range/input-range.component.d.ts +4 -2
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +4 -2
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/multi-select/multi-select.component.d.ts +4 -2
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/progress/index.d.ts +4 -0
- package/components/progress/package.json +13 -0
- package/components/progress/pipes/progress-color-segments.pipe.d.ts +8 -0
- package/components/progress/progress-bar/progress-bar.component.d.ts +5 -0
- package/components/progress/progress-label/progress-label.component.d.ts +2 -0
- package/components/progress/progress.module.d.ts +2 -0
- package/components/progress/taiga-ui-kit-components-progress.d.ts +4 -0
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -0
- package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
- package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
- package/components/select-option/taiga-ui-kit-components-select-option.metadata.json +1 -1
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/tabs/tab/tab.component.d.ts +5 -2
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
- package/components/taiga-ui-kit-components.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/text-area/text-area.component.d.ts +2 -0
- package/components/toggle/index.d.ts +1 -0
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/toggle/toggle-options.d.ts +16 -0
- package/components/toggle/toggle.component.d.ts +7 -4
- package/directives/dropdown-context/dropdown-context.directive.d.ts +28 -0
- package/directives/dropdown-context/dropdown-context.module.d.ts +2 -0
- package/directives/dropdown-context/index.d.ts +2 -0
- package/directives/dropdown-context/package.json +13 -0
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +4 -0
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.metadata.json +1 -0
- package/directives/index.d.ts +1 -0
- package/directives/taiga-ui-kit-directives.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +14 -9
- package/esm2015/abstract/slider/slider.js +10 -6
- package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
- package/esm2015/components/checkbox/checkbox.component.js +1 -1
- package/esm2015/components/field-error/field-error.component.js +10 -2
- package/esm2015/components/field-error/field-error.module.js +2 -3
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/input-count/index.js +2 -1
- package/esm2015/components/input-count/input-count-options.js +21 -0
- package/esm2015/components/input-count/input-count.component.js +49 -25
- package/esm2015/components/input-count/input-count.module.js +3 -1
- package/esm2015/components/input-date/input-date.component.js +18 -13
- package/esm2015/components/input-date/input-date.module.js +3 -2
- package/esm2015/components/input-date-range/input-date-range.component.js +25 -20
- package/esm2015/components/input-date-time/input-date-time.component.js +58 -38
- package/esm2015/components/input-file/file/file.component.js +2 -1
- package/esm2015/components/input-number/input-number.component.js +26 -16
- package/esm2015/components/input-phone/input-phone.component.js +13 -6
- package/esm2015/components/input-phone-international/input-phone-international.component.js +23 -8
- package/esm2015/components/input-phone-international/input-phone-international.module.js +5 -4
- package/esm2015/components/input-range/input-range.component.js +22 -16
- package/esm2015/components/input-range/input-range.module.js +2 -3
- package/esm2015/components/input-slider/input-slider.component.js +17 -11
- package/esm2015/components/input-slider/input-slider.module.js +2 -3
- package/esm2015/components/input-tag/input-tag.component.js +6 -4
- package/esm2015/components/input-time/input-time.component.js +2 -1
- package/esm2015/components/multi-select/multi-select.component.js +18 -8
- package/esm2015/components/progress/index.js +5 -0
- package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +34 -0
- package/esm2015/components/progress/progress-bar/progress-bar.component.js +27 -0
- package/esm2015/components/progress/progress-label/progress-label.component.js +14 -0
- package/esm2015/components/progress/progress.module.js +25 -0
- package/esm2015/components/progress/taiga-ui-kit-components-progress.js +5 -0
- package/esm2015/components/radio/radio.component.js +1 -1
- package/esm2015/components/range/range.component.js +2 -2
- package/esm2015/components/range/range.module.js +2 -3
- package/esm2015/components/select-option/select-option.component.js +1 -1
- package/esm2015/components/slider/slider.component.js +2 -2
- package/esm2015/components/slider/slider.module.js +2 -3
- package/esm2015/components/tabs/tab/tab.component.js +19 -11
- package/esm2015/components/tabs/underline/underline.component.js +1 -1
- package/esm2015/components/tag/tag.component.js +1 -1
- package/esm2015/components/text-area/text-area.component.js +9 -3
- package/esm2015/components/toggle/index.js +2 -1
- package/esm2015/components/toggle/toggle-options.js +19 -0
- package/esm2015/components/toggle/toggle.component.js +19 -15
- package/esm2015/components/toggle/toggle.module.js +3 -1
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +137 -0
- package/esm2015/directives/dropdown-context/dropdown-context.module.js +15 -0
- package/esm2015/directives/dropdown-context/index.js +3 -0
- package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +5 -0
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +2 -1
- package/esm2015/directives/index.js +2 -1
- package/esm2015/interfaces/with-date-mask-pipe-config.js +1 -1
- package/esm2015/tokens/i18n.js +4 -1
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -3
- package/esm2015/utils/mask/create-auto-corrected-date-range-pipe.js +7 -7
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -2
- package/esm2015/validators/unfinished.validator.js +2 -1
- package/esm5/abstract/input-slider.js +18 -9
- package/esm5/abstract/slider/slider.js +14 -6
- package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
- package/esm5/components/checkbox/checkbox.component.js +1 -1
- package/esm5/components/field-error/field-error.component.js +14 -2
- package/esm5/components/field-error/field-error.module.js +2 -3
- package/esm5/components/index.js +2 -1
- package/esm5/components/input-count/index.js +2 -1
- package/esm5/components/input-count/input-count-options.js +21 -0
- package/esm5/components/input-count/input-count.component.js +61 -29
- package/esm5/components/input-count/input-count.module.js +3 -1
- package/esm5/components/input-date/input-date.component.js +18 -17
- package/esm5/components/input-date/input-date.module.js +3 -2
- package/esm5/components/input-date-range/input-date-range.component.js +25 -24
- package/esm5/components/input-date-time/input-date-time.component.js +66 -37
- package/esm5/components/input-file/file/file.component.js +2 -1
- package/esm5/components/input-number/input-number.component.js +30 -16
- package/esm5/components/input-phone/input-phone.component.js +17 -6
- package/esm5/components/input-phone-international/input-phone-international.component.js +23 -8
- package/esm5/components/input-phone-international/input-phone-international.module.js +5 -4
- package/esm5/components/input-range/input-range.component.js +22 -16
- package/esm5/components/input-range/input-range.module.js +2 -3
- package/esm5/components/input-slider/input-slider.component.js +17 -11
- package/esm5/components/input-slider/input-slider.module.js +2 -3
- package/esm5/components/input-tag/input-tag.component.js +6 -4
- package/esm5/components/input-time/input-time.component.js +2 -1
- package/esm5/components/multi-select/multi-select.component.js +22 -8
- package/esm5/components/progress/index.js +5 -0
- package/esm5/components/progress/pipes/progress-color-segments.pipe.js +37 -0
- package/esm5/components/progress/progress-bar/progress-bar.component.js +28 -0
- package/esm5/components/progress/progress-label/progress-label.component.js +17 -0
- package/esm5/components/progress/progress.module.js +28 -0
- package/esm5/components/progress/taiga-ui-kit-components-progress.js +5 -0
- package/esm5/components/radio/radio.component.js +1 -1
- package/esm5/components/range/range.component.js +2 -2
- package/esm5/components/range/range.module.js +2 -3
- package/esm5/components/select-option/select-option.component.js +1 -1
- package/esm5/components/slider/slider.component.js +2 -2
- package/esm5/components/slider/slider.module.js +2 -3
- package/esm5/components/tabs/tab/tab.component.js +19 -11
- package/esm5/components/tabs/underline/underline.component.js +1 -1
- package/esm5/components/tag/tag.component.js +1 -1
- package/esm5/components/text-area/text-area.component.js +17 -3
- package/esm5/components/toggle/index.js +2 -1
- package/esm5/components/toggle/toggle-options.js +21 -0
- package/esm5/components/toggle/toggle.component.js +27 -23
- package/esm5/components/toggle/toggle.module.js +3 -1
- package/esm5/directives/dropdown-context/dropdown-context.directive.js +153 -0
- package/esm5/directives/dropdown-context/dropdown-context.module.js +18 -0
- package/esm5/directives/dropdown-context/index.js +3 -0
- package/esm5/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +5 -0
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +2 -1
- package/esm5/directives/index.js +2 -1
- package/esm5/interfaces/with-date-mask-pipe-config.js +1 -1
- package/esm5/tokens/i18n.js +4 -1
- package/esm5/utils/mask/create-auto-corrected-date-pipe.js +3 -3
- package/esm5/utils/mask/create-auto-corrected-date-range-pipe.js +7 -7
- package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +3 -2
- package/esm5/validators/unfinished.validator.js +2 -1
- package/fesm2015/taiga-ui-kit-abstract.js +21 -13
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +1 -1
- package/fesm2015/taiga-ui-kit-components-field-error.js +11 -3
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +71 -26
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +24 -19
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +56 -36
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +18 -12
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +1 -0
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +25 -15
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +26 -10
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +12 -5
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +21 -16
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +16 -11
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +5 -3
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +1 -0
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +17 -7
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +93 -0
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -0
- package/fesm2015/taiga-ui-kit-components-radio.js +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +2 -3
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +2 -3
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +18 -10
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +8 -2
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +39 -16
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components.js +1 -0
- package/fesm2015/taiga-ui-kit-components.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +153 -0
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -0
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +1 -0
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives.js +1 -0
- package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +4 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +8 -8
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-validators.js +1 -0
- package/fesm2015/taiga-ui-kit-validators.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +29 -13
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +1 -1
- package/fesm5/taiga-ui-kit-components-field-error.js +15 -3
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +83 -30
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +24 -23
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +66 -37
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +18 -16
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +1 -0
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +29 -15
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +26 -10
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +16 -5
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +21 -16
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +16 -11
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +5 -3
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +1 -0
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +21 -7
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +103 -0
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -0
- package/fesm5/taiga-ui-kit-components-radio.js +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +2 -3
- package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select-option.js +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +2 -3
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +18 -10
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +16 -2
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +49 -24
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components.js +1 -0
- package/fesm5/taiga-ui-kit-components.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js +172 -0
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -0
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +1 -0
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives.js +1 -0
- package/fesm5/taiga-ui-kit-directives.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +4 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js +8 -8
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-validators.js +1 -0
- package/fesm5/taiga-ui-kit-validators.js.map +1 -1
- package/interfaces/with-date-mask-pipe-config.d.ts +4 -1
- package/package.json +4 -4
- package/tokens/i18n.d.ts +2 -0
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +3 -4
- package/utils/mask/create-auto-corrected-date-range-pipe.d.ts +2 -3
- package/utils/mask/create-auto-corrected-date-time-pipe.d.ts +2 -3
- package/utils/mask/taiga-ui-kit-utils-mask.metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { Input, HostBinding, Directive, ChangeDetectorRef, Inject, ViewChild } from '@angular/core';
|
|
3
3
|
import { AbstractTuiControl, clamp, round, tuiDefaultProp, typedFromEvent, setNativeFocused, quantize, nonNegativeFiniteAssertion } from '@taiga-ui/cdk';
|
|
4
|
-
import { tuiCreateNumberMask, tuiCreateAutoCorrectedNumberPipe, maskedNumberStringToNumber } from '@taiga-ui/core';
|
|
4
|
+
import { tuiCreateNumberMask, tuiCreateAutoCorrectedNumberPipe, tuiPluralizeToICU, maskedNumberStringToNumber } from '@taiga-ui/core';
|
|
5
5
|
import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/constants';
|
|
6
6
|
import { NgControl } from '@angular/forms';
|
|
7
7
|
import { TUI_FROM_TO_TEXTS } from '@taiga-ui/kit/tokens';
|
|
@@ -21,7 +21,6 @@ let AbstractTuiInputSlider = class AbstractTuiInputSlider extends AbstractTuiCon
|
|
|
21
21
|
this.max = Infinity;
|
|
22
22
|
this.minLabel = '';
|
|
23
23
|
this.maxLabel = '';
|
|
24
|
-
this.pluralize = null;
|
|
25
24
|
this.segmentsPluralize = null;
|
|
26
25
|
this.segments = 0;
|
|
27
26
|
this.steps = 0;
|
|
@@ -32,10 +31,19 @@ let AbstractTuiInputSlider = class AbstractTuiInputSlider extends AbstractTuiCon
|
|
|
32
31
|
mask: tuiCreateNumberMask({
|
|
33
32
|
allowNegative: min < 0,
|
|
34
33
|
allowDecimal: !Number.isInteger(quantum),
|
|
34
|
+
decimalSymbol: this.numberFormat.decimalSeparator,
|
|
35
|
+
thousandSymbol: this.numberFormat.thousandSeparator,
|
|
35
36
|
}),
|
|
36
|
-
pipe: tuiCreateAutoCorrectedNumberPipe(),
|
|
37
|
+
pipe: tuiCreateAutoCorrectedNumberPipe(0, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator),
|
|
37
38
|
guide: false,
|
|
38
39
|
});
|
|
40
|
+
this.pluralizeMap = null;
|
|
41
|
+
}
|
|
42
|
+
// TODO: remove setter in v3.0:
|
|
43
|
+
set pluralize(pluralize) {
|
|
44
|
+
this.pluralizeMap = Array.isArray(pluralize)
|
|
45
|
+
? tuiPluralizeToICU(pluralize)
|
|
46
|
+
: pluralize;
|
|
39
47
|
}
|
|
40
48
|
get segmented() {
|
|
41
49
|
return this.segments > 0;
|
|
@@ -61,16 +69,13 @@ let AbstractTuiInputSlider = class AbstractTuiInputSlider extends AbstractTuiCon
|
|
|
61
69
|
onHovered(hovered) {
|
|
62
70
|
this.updateHovered(hovered);
|
|
63
71
|
}
|
|
64
|
-
isPluralized(pluralize) {
|
|
65
|
-
return pluralize !== null && pluralize.length === 3;
|
|
66
|
-
}
|
|
67
72
|
valueGuard(value) {
|
|
68
73
|
return this.quantum
|
|
69
74
|
? clamp(round(Math.round(value / this.quantum) * this.quantum, TUI_FLOATING_PRECISION), this.min, this.max)
|
|
70
75
|
: clamp(value, this.min, this.max);
|
|
71
76
|
}
|
|
72
77
|
capInputValue(value, max = this.max) {
|
|
73
|
-
const capped = Math.min(maskedNumberStringToNumber(value), max);
|
|
78
|
+
const capped = Math.min(maskedNumberStringToNumber(value, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator), max);
|
|
74
79
|
if (this.min < 0 && capped < this.min) {
|
|
75
80
|
return this.min;
|
|
76
81
|
}
|
|
@@ -96,7 +101,7 @@ __decorate([
|
|
|
96
101
|
__decorate([
|
|
97
102
|
Input(),
|
|
98
103
|
tuiDefaultProp()
|
|
99
|
-
], AbstractTuiInputSlider.prototype, "pluralize",
|
|
104
|
+
], AbstractTuiInputSlider.prototype, "pluralize", null);
|
|
100
105
|
__decorate([
|
|
101
106
|
Input(),
|
|
102
107
|
tuiDefaultProp()
|
|
@@ -151,14 +156,20 @@ let AbstractTuiSlider = class AbstractTuiSlider extends AbstractTuiControl {
|
|
|
151
156
|
this.segments = 0;
|
|
152
157
|
this.steps = 0;
|
|
153
158
|
this.quantum = 0;
|
|
154
|
-
this.pluralize = null;
|
|
155
159
|
this.size = 'm';
|
|
156
160
|
this.keySteps = null;
|
|
157
161
|
this.focusVisibleLeft = false;
|
|
158
162
|
this.focusVisibleRight = false;
|
|
163
|
+
this.pluralizeMap = null;
|
|
159
164
|
// @bad TODO: handle pointer events instead of mouse and touch events
|
|
160
165
|
this.pointerDown$ = new Subject();
|
|
161
166
|
}
|
|
167
|
+
// TODO: remove setter in v3.0:
|
|
168
|
+
set pluralize(pluralize) {
|
|
169
|
+
this.pluralizeMap = Array.isArray(pluralize)
|
|
170
|
+
? tuiPluralizeToICU(pluralize)
|
|
171
|
+
: pluralize;
|
|
172
|
+
}
|
|
162
173
|
get segmented() {
|
|
163
174
|
return this.segments > 0;
|
|
164
175
|
}
|
|
@@ -230,9 +241,6 @@ let AbstractTuiSlider = class AbstractTuiSlider extends AbstractTuiControl {
|
|
|
230
241
|
event.preventDefault();
|
|
231
242
|
this.pointerDown$.next(event);
|
|
232
243
|
}
|
|
233
|
-
isPluralized(pluralize) {
|
|
234
|
-
return pluralize !== null && pluralize.length === 3;
|
|
235
|
-
}
|
|
236
244
|
decrement(right) {
|
|
237
245
|
this.processStep(false, right);
|
|
238
246
|
}
|
|
@@ -361,7 +369,7 @@ __decorate([
|
|
|
361
369
|
__decorate([
|
|
362
370
|
Input(),
|
|
363
371
|
tuiDefaultProp()
|
|
364
|
-
], AbstractTuiSlider.prototype, "pluralize",
|
|
372
|
+
], AbstractTuiSlider.prototype, "pluralize", null);
|
|
365
373
|
__decorate([
|
|
366
374
|
Input(),
|
|
367
375
|
HostBinding('attr.data-tui-host-size'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-abstract.js","sources":["ng://@taiga-ui/kit/abstract/input-slider.ts","ng://@taiga-ui/kit/abstract/slider/slider.ts","ng://@taiga-ui/kit/abstract/taiga-ui-kit-abstract.ts"],"sourcesContent":["import {Directive, HostBinding, Input} from '@angular/core';\nimport {\n AbstractTuiControl,\n clamp,\n round,\n tuiDefaultProp,\n TuiInputModeT,\n TuiMapper,\n} from '@taiga-ui/cdk';\nimport {\n maskedNumberStringToNumber,\n TuiBrightness,\n tuiCreateAutoCorrectedNumberPipe,\n tuiCreateNumberMask,\n TuiModeDirective,\n TuiPluralize,\n TuiSizeL,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\n\nexport function quantumAssertion(quantum: number): boolean {\n return quantum > 0;\n}\n\n/**\n * @internal\n */\n@Directive()\nexport abstract class AbstractTuiInputSlider<T>\n extends AbstractTuiControl<T>\n implements TuiWithOptionalMinMax<number> {\n @Input()\n @tuiDefaultProp()\n min = 0;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n minLabel = '';\n\n @Input()\n @tuiDefaultProp()\n maxLabel = '';\n\n @Input()\n @tuiDefaultProp()\n pluralize: TuiPluralize | null = null;\n\n @Input()\n @tuiDefaultProp()\n segmentsPluralize: TuiPluralize | null = null;\n\n @Input()\n @tuiDefaultProp()\n segments = 0;\n\n @Input()\n @tuiDefaultProp()\n steps = 0;\n\n @Input()\n @tuiDefaultProp(quantumAssertion, 'Quantum must be positive')\n quantum = 1;\n\n @Input()\n @tuiDefaultProp()\n keySteps: TuiKeySteps | null = null;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n size: TuiSizeL = 'l';\n\n mask: TuiMapper<number, TuiTextMaskOptions> = (quantum: number, min: number) => ({\n mask: tuiCreateNumberMask({\n allowNegative: min < 0,\n allowDecimal: !Number.isInteger(quantum),\n }),\n pipe: tuiCreateAutoCorrectedNumberPipe(),\n guide: false,\n });\n\n protected abstract readonly modeDirective: TuiModeDirective | null;\n\n @HostBinding('class._segmented')\n get segmented(): boolean {\n return this.segments > 0;\n }\n\n get hasPlaceholder(): boolean {\n return this.size === 'l';\n }\n\n get inputMode(): TuiInputModeT {\n return Number.isInteger(this.quantum) ? 'numeric' : 'decimal';\n }\n\n get length(): number {\n return this.max - this.min;\n }\n\n get computedSteps(): number {\n return this.steps || this.length / this.quantum;\n }\n\n get step(): number {\n return this.length / this.computedSteps;\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective && this.modeDirective.mode;\n }\n\n abstract get showMinLabel(): boolean;\n\n abstract get showMaxLabel(): boolean;\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n isPluralized(pluralize: TuiPluralize | null): pluralize is TuiPluralize {\n return pluralize !== null && pluralize.length === 3;\n }\n\n protected valueGuard(value: number): number {\n return this.quantum\n ? clamp(\n round(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n ),\n this.min,\n this.max,\n )\n : clamp(value, this.min, this.max);\n }\n\n protected capInputValue(value: string, max: number = this.max): number | null {\n const capped = Math.min(maskedNumberStringToNumber(value), max);\n\n if (this.min < 0 && capped < this.min) {\n return this.min;\n }\n\n return isNaN(capped) || capped < this.min ? null : capped;\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n clamp,\n nonNegativeFiniteAssertion,\n quantize,\n round,\n setNativeFocused,\n tuiDefaultProp,\n TuiEventWith,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiPluralize, TuiSizeS, TuiWithOptionalMinMax} from '@taiga-ui/core';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {Observable, race, Subject} from 'rxjs';\nimport {map, switchMap, takeUntil} from 'rxjs/operators';\n\nexport const SLIDER_KEYBOARD_STEP = 0.05;\nexport const DOT_WIDTH: {[key: string]: number} = {\n s: 8,\n m: 16,\n};\n\n/**\n * @awful TODO: refactor\n * @internal\n * @dynamic\n */\n@Directive()\nexport abstract class AbstractTuiSlider<T>\n extends AbstractTuiControl<T>\n implements TuiWithOptionalMinMax<number> {\n @Input()\n @tuiDefaultProp()\n min = 0;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n segments = 0;\n\n @Input()\n @tuiDefaultProp()\n steps = 0;\n\n @Input()\n @tuiDefaultProp(nonNegativeFiniteAssertion, 'Quantum must be a non-negative number')\n quantum = 0;\n\n @Input()\n @tuiDefaultProp()\n pluralize: TuiPluralize | null = null;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeS = 'm';\n\n @Input()\n @tuiDefaultProp()\n keySteps: TuiKeySteps | null = null;\n\n focusVisibleLeft = false;\n\n focusVisibleRight = false;\n\n @ViewChild('dotLeft')\n protected dotLeft?: ElementRef<TuiNativeFocusableElement>;\n\n @ViewChild('dotRight')\n protected dotRight?: ElementRef<TuiNativeFocusableElement>;\n\n // @bad TODO: handle pointer events instead of mouse and touch events\n private pointerDown$ = new Subject<\n TuiEventWith<MouseEvent | TouchEvent, HTMLElement>\n >();\n\n protected constructor(\n ngControl: NgControl | null,\n changeDetectorRef: ChangeDetectorRef,\n private readonly documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS)\n readonly fromToTexts$: Observable<[string, string]>,\n ) {\n super(ngControl, changeDetectorRef);\n }\n\n @HostBinding('class._segmented')\n get segmented(): boolean {\n return this.segments > 0;\n }\n\n get discrete(): boolean {\n return this.steps > 0;\n }\n\n get length(): number {\n return this.max - this.min;\n }\n\n get computedStep(): number {\n if (this.steps) {\n return 1 / this.steps;\n }\n\n return this.quantum ? this.quantum / this.length : SLIDER_KEYBOARD_STEP;\n }\n\n get isLeftFocusable(): boolean {\n return !this.disabled && this.focusable && this.right !== 100;\n }\n\n get isRightFocusable(): boolean {\n return !this.disabled && this.focusable && this.left !== 100;\n }\n\n abstract get left(): number;\n\n abstract get right(): number;\n\n ngOnInit() {\n super.ngOnInit();\n\n const mouseMoves$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseUps$ = typedFromEvent(this.documentRef, 'mouseup');\n const touchMoves$ = typedFromEvent(this.documentRef, 'touchmove');\n const touchEnds$ = typedFromEvent(this.documentRef, 'touchend');\n let isPointerDownRight: boolean;\n\n this.pointerDown$\n .pipe(\n map((event: MouseEvent | TouchEvent) => {\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect();\n const clientX =\n event instanceof MouseEvent\n ? event.clientX\n : event.touches[0].clientX;\n const fraction = clamp(\n this.getFractionFromEvents(rect, clientX),\n 0,\n 1,\n );\n const deltaLeft = fraction * 100 - this.left;\n const deltaRight = fraction * 100 - 100 + this.right;\n\n isPointerDownRight =\n Math.abs(deltaLeft) > Math.abs(deltaRight) ||\n deltaRight > 0 ||\n (this.left === 0 && this.right === 100);\n\n const calibratedFraction = clamp(\n this.getCalibratedFractionFromEvents(\n rect,\n clientX,\n isPointerDownRight,\n ),\n 0,\n 1,\n );\n const value = this.getValueFromFraction(\n this.fractionGuard(calibratedFraction),\n );\n\n this.processValue(value, isPointerDownRight);\n this.processFocus(isPointerDownRight);\n\n return rect;\n }),\n switchMap(rect =>\n race([touchMoves$, mouseMoves$]).pipe(\n map((event: any) =>\n this.getCalibratedFractionFromEvents(\n rect,\n event instanceof MouseEvent\n ? event.clientX\n : event.touches[0].clientX,\n isPointerDownRight,\n ),\n ),\n takeUntil(race([mouseUps$, touchEnds$])),\n ),\n ),\n map(fraction => this.fractionGuard(fraction)),\n )\n .subscribe(fraction => {\n this.processValue(\n this.getValueFromFraction(fraction),\n isPointerDownRight,\n );\n });\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.pointerDown$.complete();\n }\n\n onMouseDown(event: TuiEventWith<MouseEvent, HTMLElement>) {\n if (this.disabled) {\n return;\n }\n\n event.preventDefault();\n this.pointerDown$.next(event);\n }\n\n onTouchStart(event: TuiEventWith<TouchEvent, HTMLElement>) {\n if (this.disabled) {\n return;\n }\n\n event.preventDefault();\n this.pointerDown$.next(event);\n }\n\n isPluralized(pluralize: TuiPluralize | null): pluralize is TuiPluralize {\n return pluralize !== null && pluralize.length === 3;\n }\n\n decrement(right: boolean) {\n this.processStep(false, right);\n }\n\n increment(right: boolean) {\n this.processStep(true, right);\n }\n\n getSegmentLabel(segment: number): number {\n return round(this.getValueFromFraction(segment / this.segments), 2);\n }\n\n getSegmentPrefix(segment: number, texts: [string, string]): string {\n if (this.segments !== 1) {\n return '';\n }\n\n if (segment === 0) {\n return `${texts[0]} `;\n }\n\n return `${texts[1]} `;\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onLeftFocusVisible(focusVisible: boolean) {\n this.focusVisibleLeft = focusVisible;\n }\n\n onRightFocusVisible(focusVisible: boolean) {\n this.focusVisibleRight = focusVisible;\n }\n\n protected abstract processValue(value: number, right?: boolean): void;\n\n protected abstract processStep(increment: boolean, right?: boolean): void;\n\n protected getFractionFromValue(value: number): number {\n const fraction = (value - this.min) / this.length;\n\n return this.keySteps !== null\n ? this.fractionValueKeyStepConverter(value, false)\n : clamp(Number.isFinite(fraction) ? fraction : 1, 0, 1);\n }\n\n protected getValueFromFraction(fraction: number): number {\n return this.keySteps !== null\n ? this.fractionValueKeyStepConverter(fraction, true)\n : round(\n this.fractionGuard(fraction) * this.length + this.min,\n TUI_FLOATING_PRECISION,\n );\n }\n\n protected getCalibratedFractionFromEvents(\n rect: ClientRect,\n clientX: number,\n _: boolean,\n ): number {\n return this.getFractionFromEvents(rect, clientX);\n }\n\n protected valueGuard(value: number): number {\n return this.quantum\n ? clamp(\n round(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n ),\n this.min,\n this.max,\n )\n : clamp(value, this.min, this.max);\n }\n\n private processFocus(right: boolean) {\n if (!this.focusable || !this.dotRight || !this.dotLeft) {\n return;\n }\n\n if (right) {\n setNativeFocused(this.dotRight.nativeElement);\n } else {\n setNativeFocused(this.dotLeft.nativeElement);\n }\n }\n\n /**\n * Function for converting the fullness of the slider to a value and vice versa\n * taking into account the steps of linear dependence.\n *\n * @param value passed value\n * @param isFraction translation is carried out from fullness to value\n */\n private fractionValueKeyStepConverter(value: number, isFraction: boolean): number {\n const steps = [[0, this.min]].concat(this.keySteps as TuiKeySteps, [\n [100, this.max],\n ]);\n\n let prevFraction = 0;\n let nextFraction = 100;\n let prevValue = this.min;\n let nextValue = this.max;\n\n for (let i = 1; i < steps.length; i++) {\n if (\n (isFraction && steps[i][0] / 100 > value) ||\n (!isFraction && steps[i][1] > value)\n ) {\n prevFraction = steps[i - 1][0] || 0;\n nextFraction = steps[i][0];\n prevValue = steps[i - 1][1];\n nextValue = steps[i][1];\n break;\n }\n }\n\n const deltaFraction = nextFraction - prevFraction;\n const deltaValue = nextValue - prevValue;\n\n return isFraction\n ? round(\n ((value * 100 - prevFraction) / deltaFraction) * deltaValue + prevValue,\n TUI_FLOATING_PRECISION,\n )\n : clamp(\n ((value - prevValue) / deltaValue) * deltaFraction + prevFraction,\n 0,\n 100,\n ) / 100;\n }\n\n private fractionGuard(fraction: number): number {\n return this.discrete\n ? clamp(quantize(fraction, 1 / this.steps), 0, 1)\n : clamp(fraction, 0, 1);\n }\n\n private getFractionFromEvents(rect: ClientRect, clientX: number): number {\n const value = clientX - rect.left - DOT_WIDTH[this.size] / 2;\n const total = rect.width - DOT_WIDTH[this.size];\n\n return round(value / total, TUI_FLOATING_PRECISION);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;SAuBgB,gBAAgB,CAAC,OAAe;IAC5C,OAAO,OAAO,GAAG,CAAC,CAAC;AACvB,CAAC;AAED;;;IAIsB,sBAAsB,GAA5C,MAAsB,sBAClB,SAAQ,kBAAqB;IADjC;;QAKI,QAAG,GAAG,CAAC,CAAC;QAIR,QAAG,GAAG,QAAQ,CAAC;QAIf,aAAQ,GAAG,EAAE,CAAC;QAId,aAAQ,GAAG,EAAE,CAAC;QAId,cAAS,GAAwB,IAAI,CAAC;QAItC,sBAAiB,GAAwB,IAAI,CAAC;QAI9C,aAAQ,GAAG,CAAC,CAAC;QAIb,UAAK,GAAG,CAAC,CAAC;QAIV,YAAO,GAAG,CAAC,CAAC;QAIZ,aAAQ,GAAuB,IAAI,CAAC;QAIpC,SAAI,GAAa,GAAG,CAAC;QAErB,SAAI,GAA0C,CAAC,OAAe,EAAE,GAAW,MAAM;YAC7E,IAAI,EAAE,mBAAmB,CAAC;gBACtB,aAAa,EAAE,GAAG,GAAG,CAAC;gBACtB,YAAY,EAAE,CAAC,MAAM,CAA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;AAIrB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mDACmB;AAOpC;IADC,SAAS,CAAC,SAAS,CAAC;kDACqC;AAG1D;IADC,SAAS,CAAC,UAAU,CAAC;mDACqC;AAkB3D;IADC,WAAW,CAAC,kBAAkB,CAAC;kDAG/B;AAhEiB,iBAAiB;IADtC,SAAS,EAAE;IAwDH,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GAvDZ,iBAAiB,CAoVtC;;AC7XD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-abstract.js","sources":["ng://@taiga-ui/kit/abstract/input-slider.ts","ng://@taiga-ui/kit/abstract/slider/slider.ts","ng://@taiga-ui/kit/abstract/taiga-ui-kit-abstract.ts"],"sourcesContent":["import {Directive, HostBinding, Input} from '@angular/core';\nimport {\n AbstractTuiControl,\n clamp,\n round,\n tuiDefaultProp,\n TuiInputModeT,\n TuiMapper,\n} from '@taiga-ui/cdk';\nimport {\n maskedNumberStringToNumber,\n NumberFormatSettings,\n TuiBrightness,\n tuiCreateAutoCorrectedNumberPipe,\n tuiCreateNumberMask,\n TuiModeDirective,\n TuiPluralize,\n tuiPluralizeToICU,\n TuiSizeL,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\n\nexport function quantumAssertion(quantum: number): boolean {\n return quantum > 0;\n}\n\n/**\n * @internal\n */\n@Directive()\nexport abstract class AbstractTuiInputSlider<T>\n extends AbstractTuiControl<T>\n implements TuiWithOptionalMinMax<number> {\n @Input()\n @tuiDefaultProp()\n min = 0;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n minLabel = '';\n\n @Input()\n @tuiDefaultProp()\n maxLabel = '';\n\n // TODO: remove setter in v3.0:\n @Input()\n @tuiDefaultProp()\n set pluralize(pluralize: TuiPluralize | Record<string, string> | null) {\n this.pluralizeMap = Array.isArray(pluralize)\n ? tuiPluralizeToICU(pluralize)\n : pluralize;\n }\n\n @Input()\n @tuiDefaultProp()\n segmentsPluralize: TuiPluralize | null = null;\n\n @Input()\n @tuiDefaultProp()\n segments = 0;\n\n @Input()\n @tuiDefaultProp()\n steps = 0;\n\n @Input()\n @tuiDefaultProp(quantumAssertion, 'Quantum must be positive')\n quantum = 1;\n\n @Input()\n @tuiDefaultProp()\n keySteps: TuiKeySteps | null = null;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n size: TuiSizeL = 'l';\n\n mask: TuiMapper<number, TuiTextMaskOptions> = (quantum: number, min: number) => ({\n mask: tuiCreateNumberMask({\n allowNegative: min < 0,\n allowDecimal: !Number.isInteger(quantum),\n decimalSymbol: this.numberFormat.decimalSeparator,\n thousandSymbol: this.numberFormat.thousandSeparator,\n }),\n pipe: tuiCreateAutoCorrectedNumberPipe(\n 0,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n ),\n guide: false,\n });\n\n pluralizeMap: Record<string, string> | null = null;\n\n protected abstract readonly modeDirective: TuiModeDirective | null;\n\n protected abstract readonly numberFormat: NumberFormatSettings;\n\n @HostBinding('class._segmented')\n get segmented(): boolean {\n return this.segments > 0;\n }\n\n get hasPlaceholder(): boolean {\n return this.size === 'l';\n }\n\n get inputMode(): TuiInputModeT {\n return Number.isInteger(this.quantum) ? 'numeric' : 'decimal';\n }\n\n get length(): number {\n return this.max - this.min;\n }\n\n get computedSteps(): number {\n return this.steps || this.length / this.quantum;\n }\n\n get step(): number {\n return this.length / this.computedSteps;\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective && this.modeDirective.mode;\n }\n\n abstract get showMinLabel(): boolean;\n\n abstract get showMaxLabel(): boolean;\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n protected valueGuard(value: number): number {\n return this.quantum\n ? clamp(\n round(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n ),\n this.min,\n this.max,\n )\n : clamp(value, this.min, this.max);\n }\n\n protected capInputValue(value: string, max: number = this.max): number | null {\n const capped = Math.min(\n maskedNumberStringToNumber(\n value,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n ),\n max,\n );\n\n if (this.min < 0 && capped < this.min) {\n return this.min;\n }\n\n return isNaN(capped) || capped < this.min ? null : capped;\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n clamp,\n nonNegativeFiniteAssertion,\n quantize,\n round,\n setNativeFocused,\n tuiDefaultProp,\n TuiEventWith,\n TuiNativeFocusableElement,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n TuiPluralize,\n tuiPluralizeToICU,\n TuiSizeS,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TUI_FROM_TO_TEXTS} from '@taiga-ui/kit/tokens';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\nimport {Observable, race, Subject} from 'rxjs';\nimport {map, switchMap, takeUntil} from 'rxjs/operators';\n\nexport const SLIDER_KEYBOARD_STEP = 0.05;\nexport const DOT_WIDTH: {[key: string]: number} = {\n s: 8,\n m: 16,\n};\n\n/**\n * @awful TODO: refactor\n * @internal\n * @dynamic\n */\n@Directive()\nexport abstract class AbstractTuiSlider<T>\n extends AbstractTuiControl<T>\n implements TuiWithOptionalMinMax<number>\n{\n @Input()\n @tuiDefaultProp()\n min = 0;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n segments = 0;\n\n @Input()\n @tuiDefaultProp()\n steps = 0;\n\n @Input()\n @tuiDefaultProp(nonNegativeFiniteAssertion, 'Quantum must be a non-negative number')\n quantum = 0;\n\n // TODO: remove setter in v3.0:\n @Input()\n @tuiDefaultProp()\n set pluralize(pluralize: TuiPluralize | Record<string, string> | null) {\n this.pluralizeMap = Array.isArray(pluralize)\n ? tuiPluralizeToICU(pluralize)\n : pluralize;\n }\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeS = 'm';\n\n @Input()\n @tuiDefaultProp()\n keySteps: TuiKeySteps | null = null;\n\n focusVisibleLeft = false;\n\n focusVisibleRight = false;\n\n pluralizeMap: Record<string, string> | null = null;\n\n @ViewChild('dotLeft')\n protected dotLeft?: ElementRef<TuiNativeFocusableElement>;\n\n @ViewChild('dotRight')\n protected dotRight?: ElementRef<TuiNativeFocusableElement>;\n\n // @bad TODO: handle pointer events instead of mouse and touch events\n private pointerDown$ = new Subject<\n TuiEventWith<MouseEvent | TouchEvent, HTMLElement>\n >();\n\n protected constructor(\n ngControl: NgControl | null,\n changeDetectorRef: ChangeDetectorRef,\n private readonly documentRef: Document,\n @Inject(TUI_FROM_TO_TEXTS)\n readonly fromToTexts$: Observable<[string, string]>,\n ) {\n super(ngControl, changeDetectorRef);\n }\n\n @HostBinding('class._segmented')\n get segmented(): boolean {\n return this.segments > 0;\n }\n\n get discrete(): boolean {\n return this.steps > 0;\n }\n\n get length(): number {\n return this.max - this.min;\n }\n\n get computedStep(): number {\n if (this.steps) {\n return 1 / this.steps;\n }\n\n return this.quantum ? this.quantum / this.length : SLIDER_KEYBOARD_STEP;\n }\n\n get isLeftFocusable(): boolean {\n return !this.disabled && this.focusable && this.right !== 100;\n }\n\n get isRightFocusable(): boolean {\n return !this.disabled && this.focusable && this.left !== 100;\n }\n\n abstract get left(): number;\n\n abstract get right(): number;\n\n ngOnInit() {\n super.ngOnInit();\n\n const mouseMoves$ = typedFromEvent(this.documentRef, 'mousemove');\n const mouseUps$ = typedFromEvent(this.documentRef, 'mouseup');\n const touchMoves$ = typedFromEvent(this.documentRef, 'touchmove');\n const touchEnds$ = typedFromEvent(this.documentRef, 'touchend');\n let isPointerDownRight: boolean;\n\n this.pointerDown$\n .pipe(\n map((event: MouseEvent | TouchEvent) => {\n const rect = (\n event.currentTarget as HTMLElement\n ).getBoundingClientRect();\n const clientX =\n event instanceof MouseEvent\n ? event.clientX\n : event.touches[0].clientX;\n const fraction = clamp(\n this.getFractionFromEvents(rect, clientX),\n 0,\n 1,\n );\n const deltaLeft = fraction * 100 - this.left;\n const deltaRight = fraction * 100 - 100 + this.right;\n\n isPointerDownRight =\n Math.abs(deltaLeft) > Math.abs(deltaRight) ||\n deltaRight > 0 ||\n (this.left === 0 && this.right === 100);\n\n const calibratedFraction = clamp(\n this.getCalibratedFractionFromEvents(\n rect,\n clientX,\n isPointerDownRight,\n ),\n 0,\n 1,\n );\n const value = this.getValueFromFraction(\n this.fractionGuard(calibratedFraction),\n );\n\n this.processValue(value, isPointerDownRight);\n this.processFocus(isPointerDownRight);\n\n return rect;\n }),\n switchMap(rect =>\n race([touchMoves$, mouseMoves$]).pipe(\n map((event: any) =>\n this.getCalibratedFractionFromEvents(\n rect,\n event instanceof MouseEvent\n ? event.clientX\n : event.touches[0].clientX,\n isPointerDownRight,\n ),\n ),\n takeUntil(race([mouseUps$, touchEnds$])),\n ),\n ),\n map(fraction => this.fractionGuard(fraction)),\n )\n .subscribe(fraction => {\n this.processValue(\n this.getValueFromFraction(fraction),\n isPointerDownRight,\n );\n });\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.pointerDown$.complete();\n }\n\n onMouseDown(event: TuiEventWith<MouseEvent, HTMLElement>) {\n if (this.disabled) {\n return;\n }\n\n event.preventDefault();\n this.pointerDown$.next(event);\n }\n\n onTouchStart(event: TuiEventWith<TouchEvent, HTMLElement>) {\n if (this.disabled) {\n return;\n }\n\n event.preventDefault();\n this.pointerDown$.next(event);\n }\n\n decrement(right: boolean) {\n this.processStep(false, right);\n }\n\n increment(right: boolean) {\n this.processStep(true, right);\n }\n\n getSegmentLabel(segment: number): number {\n return round(this.getValueFromFraction(segment / this.segments), 2);\n }\n\n getSegmentPrefix(segment: number, texts: [string, string]): string {\n if (this.segments !== 1) {\n return '';\n }\n\n if (segment === 0) {\n return `${texts[0]} `;\n }\n\n return `${texts[1]} `;\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onLeftFocusVisible(focusVisible: boolean) {\n this.focusVisibleLeft = focusVisible;\n }\n\n onRightFocusVisible(focusVisible: boolean) {\n this.focusVisibleRight = focusVisible;\n }\n\n protected abstract processValue(value: number, right?: boolean): void;\n\n protected abstract processStep(increment: boolean, right?: boolean): void;\n\n protected getFractionFromValue(value: number): number {\n const fraction = (value - this.min) / this.length;\n\n return this.keySteps !== null\n ? this.fractionValueKeyStepConverter(value, false)\n : clamp(Number.isFinite(fraction) ? fraction : 1, 0, 1);\n }\n\n protected getValueFromFraction(fraction: number): number {\n return this.keySteps !== null\n ? this.fractionValueKeyStepConverter(fraction, true)\n : round(\n this.fractionGuard(fraction) * this.length + this.min,\n TUI_FLOATING_PRECISION,\n );\n }\n\n protected getCalibratedFractionFromEvents(\n rect: ClientRect,\n clientX: number,\n _: boolean,\n ): number {\n return this.getFractionFromEvents(rect, clientX);\n }\n\n protected valueGuard(value: number): number {\n return this.quantum\n ? clamp(\n round(\n Math.round(value / this.quantum) * this.quantum,\n TUI_FLOATING_PRECISION,\n ),\n this.min,\n this.max,\n )\n : clamp(value, this.min, this.max);\n }\n\n private processFocus(right: boolean) {\n if (!this.focusable || !this.dotRight || !this.dotLeft) {\n return;\n }\n\n if (right) {\n setNativeFocused(this.dotRight.nativeElement);\n } else {\n setNativeFocused(this.dotLeft.nativeElement);\n }\n }\n\n /**\n * Function for converting the fullness of the slider to a value and vice versa\n * taking into account the steps of linear dependence.\n *\n * @param value passed value\n * @param isFraction translation is carried out from fullness to value\n */\n private fractionValueKeyStepConverter(value: number, isFraction: boolean): number {\n const steps = [[0, this.min]].concat(this.keySteps as TuiKeySteps, [\n [100, this.max],\n ]);\n\n let prevFraction = 0;\n let nextFraction = 100;\n let prevValue = this.min;\n let nextValue = this.max;\n\n for (let i = 1; i < steps.length; i++) {\n if (\n (isFraction && steps[i][0] / 100 > value) ||\n (!isFraction && steps[i][1] > value)\n ) {\n prevFraction = steps[i - 1][0] || 0;\n nextFraction = steps[i][0];\n prevValue = steps[i - 1][1];\n nextValue = steps[i][1];\n break;\n }\n }\n\n const deltaFraction = nextFraction - prevFraction;\n const deltaValue = nextValue - prevValue;\n\n return isFraction\n ? round(\n ((value * 100 - prevFraction) / deltaFraction) * deltaValue + prevValue,\n TUI_FLOATING_PRECISION,\n )\n : clamp(\n ((value - prevValue) / deltaValue) * deltaFraction + prevFraction,\n 0,\n 100,\n ) / 100;\n }\n\n private fractionGuard(fraction: number): number {\n return this.discrete\n ? clamp(quantize(fraction, 1 / this.steps), 0, 1)\n : clamp(fraction, 0, 1);\n }\n\n private getFractionFromEvents(rect: ClientRect, clientX: number): number {\n const value = clientX - rect.left - DOT_WIDTH[this.size] / 2;\n const total = rect.width - DOT_WIDTH[this.size];\n\n return round(value / total, TUI_FLOATING_PRECISION);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;SAyBgB,gBAAgB,CAAC,OAAe;IAC5C,OAAO,OAAO,GAAG,CAAC,CAAC;AACvB,CAAC;AAED;;;IAIsB,sBAAsB,GAA5C,MAAsB,sBAClB,SAAQ,kBAAqB;IADjC;;QAKI,QAAG,GAAG,CAAC,CAAC;QAIR,QAAG,GAAG,QAAQ,CAAC;QAIf,aAAQ,GAAG,EAAE,CAAC;QAId,aAAQ,GAAG,EAAE,CAAC;QAad,sBAAiB,GAAwB,IAAI,CAAC;QAI9C,aAAQ,GAAG,CAAC,CAAC;QAIb,UAAK,GAAG,CAAC,CAAC;QAIV,YAAO,GAAG,CAAC,CAAC;QAIZ,aAAQ,GAAuB,IAAI,CAAC;QAIpC,SAAI,GAAa,GAAG,CAAC;QAErB,SAAI,GAA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KAAK,CAAC,KAAK,GAAG,KAAK,EAAE,sBAAsB,CAAC,CAAC;KACvD;EACJ;;YA9RkB,SAAS;YACD,iBAAiB;YACN,QAAQ;YAEf,UAAU,uBADhC,MAAM,SAAC,iBAAiB;;AAzD7B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;8CACT;AAIR;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;8CACF;AAIf;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mDACJ;AAIb;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;gDACP;AAIV;IAFC,KAAK,EAAE;IACP,cAAc,CAAC,0BAA0B,EAAE,uCAAuC,CAAC;kDACxE;AAKZ;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;kDAKhB;AAKD;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,yBAAyB,CAAC;IACtC,cAAc,EAAE;+CACI;AAIrB;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;mDACmB;AASpC;IADC,SAAS,CAAC,SAAS,CAAC;kDACqC;AAG1D;IADC,SAAS,CAAC,UAAU,CAAC;mDACqC;AAkB3D;IADC,WAAW,CAAC,kBAAkB,CAAC;kDAG/B;AAxEiB,iBAAiB;IADtC,SAAS,EAAE;IAgEH,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GA/DZ,iBAAiB,CA0VtC;;ACxYD;;;;;;"}
|
|
@@ -63,7 +63,7 @@ TuiBreadcrumbsWrapperComponent = TuiBreadcrumbsWrapperComponent_1 = __decorate([
|
|
|
63
63
|
Component({
|
|
64
64
|
selector: 'tui-breadcrumbs:not([items])',
|
|
65
65
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
66
|
-
template: "<ng-container *ngFor=\"let item of items; let last = last\">\n <ng-container *ngTemplateOutlet=\"item\"></ng-container>\n <tui-svg *ngIf=\"!last\" class=\"icon\" src=\"tuiIconChevronRight\"></tui-svg>\n</ng-container>\n",
|
|
66
|
+
template: "<ng-container *ngIf=\"items.changes | async\"></ng-container>\n<ng-container *ngFor=\"let item of items; let last = last\">\n <ng-container *ngTemplateOutlet=\"item\"></ng-container>\n <tui-svg *ngIf=\"!last\" class=\"icon\" src=\"tuiIconChevronRight\"></tui-svg>\n</ng-container>\n",
|
|
67
67
|
providers: [
|
|
68
68
|
{
|
|
69
69
|
provide: TuiModeDirective,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-breadcrumbs.js","sources":["ng://@taiga-ui/kit/components/breadcrumbs/breadcrumb.directive.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs.component.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs-wrapper.component.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs.module.ts","ng://@taiga-ui/kit/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n@Directive({\n selector: `ng-template[tuiBreadcrumb]`,\n})\nexport class TuiBreadcrumbDirective {}\n","import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp, TuiMapper} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {DEFAULT_ROUTER_LINK_OPTIONS} from '@taiga-ui/kit/constants';\nimport {TuiBreadCrumbsItem} from '@taiga-ui/kit/interfaces';\n\n/** @deprecated use `<tui-breadcrumbs>` from {@link TuiBreadcrumbsWrapperComponent} */\n@Component({\n selector: 'tui-breadcrumbs[items]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './breadcrumbs.template.html',\n styleUrls: ['./breadcrumbs.style.less'],\n})\nexport class TuiBreadcrumbsComponent {\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<TuiBreadCrumbsItem> = [];\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n readonly routerLinkOptions: TuiMapper<TuiBreadCrumbsItem, any> = ({\n routerLinkOptions,\n }) => routerLinkOptions || DEFAULT_ROUTER_LINK_OPTIONS;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n Input,\n QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiModeDirective, TuiSizeL} from '@taiga-ui/core';\nimport {Subject} from 'rxjs';\nimport {TuiBreadcrumbDirective} from './breadcrumb.directive';\n\n@Component({\n selector: 'tui-breadcrumbs:not([items])',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './breadcrumbs-wrapper.template.html',\n styleUrls: ['./breadcrumbs-wrapper.style.less'],\n providers: [\n {\n provide: TuiModeDirective,\n useExisting: forwardRef(() => TuiBreadcrumbsWrapperComponent),\n },\n ],\n})\nexport class TuiBreadcrumbsWrapperComponent implements TuiModeDirective {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @ContentChildren(TuiBreadcrumbDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<{}>> = EMPTY_QUERY;\n\n readonly change$ = new Subject<void>();\n readonly mode = 'onLight';\n\n ngOnChanges() {}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {RouterModule} from '@angular/router';\nimport {TuiLetModule, TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiLinkModule, TuiModeModule, TuiSvgModule} from '@taiga-ui/core';\nimport {TuiBreadcrumbDirective} from './breadcrumb.directive';\nimport {TuiBreadcrumbsWrapperComponent} from './breadcrumbs-wrapper.component';\nimport {TuiBreadcrumbsComponent} from './breadcrumbs.component';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n TuiMapperPipeModule,\n TuiLetModule,\n TuiLinkModule,\n TuiSvgModule,\n TuiModeModule,\n ],\n declarations: [\n TuiBreadcrumbsComponent,\n TuiBreadcrumbsWrapperComponent,\n TuiBreadcrumbDirective,\n ],\n exports: [\n TuiBreadcrumbsComponent,\n TuiBreadcrumbsWrapperComponent,\n TuiBreadcrumbDirective,\n ],\n})\nexport class TuiBreadcrumbsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAKa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IAHlC,SAAS,CAAC;QACP,QAAQ,EAAE,4BAA4B;KACzC,CAAC;GACW,sBAAsB,CAAG;;ACCtC;IAOa,uBAAuB,GAApC,MAAa,uBAAuB;IAApC;QAGI,UAAK,GAAsC,EAAE,CAAC;QAK9C,SAAI,GAAa,GAAG,CAAC;QAEZ,sBAAiB,GAAuC,CAAC,EAC9D,iBAAiB,GACpB,KAAK,iBAAiB,IAAI,2BAA2B,CAAC;KAC1D;EAAA;AAVG;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;sDAC6B;AAK9C;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,yBAAyB,CAAC;IACtC,cAAc,EAAE;qDACI;AARZ,uBAAuB;IANnC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,qhCAA0C;;KAE7C,CAAC;GACW,uBAAuB,CAanC;;;ICCY,8BAA8B,sCAA3C,MAAa,8BAA8B;IAA3C;QAII,SAAI,GAAa,GAAG,CAAC;QAGZ,UAAK,GAA+B,WAAW,CAAC;QAEhD,YAAO,GAAG,IAAI,OAAO,EAAQ,CAAC;QAC9B,SAAI,GAAG,SAAS,CAAC;KAG7B;IADG,WAAW,MAAK;EACnB;AATG;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,gBAAgB,CAAC;IAC7B,cAAc,EAAE;4DACI;AAGrB;IADC,eAAe,CAAC,sBAAsB,EAAE,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;6DACJ;AAPhD,8BAA8B;IAZ1C,SAAS,CAAC;QACP,QAAQ,EAAE,8BAA8B;QACxC,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-breadcrumbs.js","sources":["ng://@taiga-ui/kit/components/breadcrumbs/breadcrumb.directive.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs.component.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs-wrapper.component.ts","ng://@taiga-ui/kit/components/breadcrumbs/breadcrumbs.module.ts","ng://@taiga-ui/kit/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n@Directive({\n selector: `ng-template[tuiBreadcrumb]`,\n})\nexport class TuiBreadcrumbDirective {}\n","import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp, TuiMapper} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {DEFAULT_ROUTER_LINK_OPTIONS} from '@taiga-ui/kit/constants';\nimport {TuiBreadCrumbsItem} from '@taiga-ui/kit/interfaces';\n\n/** @deprecated use `<tui-breadcrumbs>` from {@link TuiBreadcrumbsWrapperComponent} */\n@Component({\n selector: 'tui-breadcrumbs[items]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './breadcrumbs.template.html',\n styleUrls: ['./breadcrumbs.style.less'],\n})\nexport class TuiBreadcrumbsComponent {\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<TuiBreadCrumbsItem> = [];\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n readonly routerLinkOptions: TuiMapper<TuiBreadCrumbsItem, any> = ({\n routerLinkOptions,\n }) => routerLinkOptions || DEFAULT_ROUTER_LINK_OPTIONS;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n Input,\n QueryList,\n TemplateRef,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TuiModeDirective, TuiSizeL} from '@taiga-ui/core';\nimport {Subject} from 'rxjs';\nimport {TuiBreadcrumbDirective} from './breadcrumb.directive';\n\n@Component({\n selector: 'tui-breadcrumbs:not([items])',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './breadcrumbs-wrapper.template.html',\n styleUrls: ['./breadcrumbs-wrapper.style.less'],\n providers: [\n {\n provide: TuiModeDirective,\n useExisting: forwardRef(() => TuiBreadcrumbsWrapperComponent),\n },\n ],\n})\nexport class TuiBreadcrumbsWrapperComponent implements TuiModeDirective {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @ContentChildren(TuiBreadcrumbDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<{}>> = EMPTY_QUERY;\n\n readonly change$ = new Subject<void>();\n readonly mode = 'onLight';\n\n ngOnChanges() {}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {RouterModule} from '@angular/router';\nimport {TuiLetModule, TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiLinkModule, TuiModeModule, TuiSvgModule} from '@taiga-ui/core';\nimport {TuiBreadcrumbDirective} from './breadcrumb.directive';\nimport {TuiBreadcrumbsWrapperComponent} from './breadcrumbs-wrapper.component';\nimport {TuiBreadcrumbsComponent} from './breadcrumbs.component';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n TuiMapperPipeModule,\n TuiLetModule,\n TuiLinkModule,\n TuiSvgModule,\n TuiModeModule,\n ],\n declarations: [\n TuiBreadcrumbsComponent,\n TuiBreadcrumbsWrapperComponent,\n TuiBreadcrumbDirective,\n ],\n exports: [\n TuiBreadcrumbsComponent,\n TuiBreadcrumbsWrapperComponent,\n TuiBreadcrumbDirective,\n ],\n})\nexport class TuiBreadcrumbsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n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8B,CAAC;aAChE;SACJ;;KACJ,CAAC;GACW,8BAA8B,CAa1C;;ICVY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IArBhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,aAAa;SAChB;QACD,YAAY,EAAE;YACV,uBAAuB;YACvB,8BAA8B;YAC9B,sBAAsB;SACzB;QACD,OAAO,EAAE;YACL,uBAAuB;YACvB,8BAA8B;YAC9B,sBAAsB;SACzB;KACJ,CAAC;GACW,oBAAoB,CAAG;;AC9BpC;;;;;;"}
|
|
@@ -63,7 +63,7 @@ TuiCheckboxComponent = TuiCheckboxComponent_1 = __decorate([
|
|
|
63
63
|
useExisting: forwardRef(() => TuiCheckboxComponent_1),
|
|
64
64
|
},
|
|
65
65
|
],
|
|
66
|
-
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}:host[data-tui-host-size='m']{width:1rem;height:1rem}:host[data-tui-host-size='l']{width:1.5rem;height:1.5rem}.native{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-webkit-autofill:hover{border-radius:inherit;-webkit-text-fill-color:
|
|
66
|
+
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;flex-shrink:0}:host[data-tui-host-size='m']{width:1rem;height:1rem}:host[data-tui-host-size='l']{width:1.5rem;height:1.5rem}.native{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host._disabled .native,:host._readonly .native{pointer-events:none}"]
|
|
67
67
|
}),
|
|
68
68
|
__param(0, Optional()),
|
|
69
69
|
__param(0, Self()),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { Optional, Self, Inject, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
-
import { NgControl, FormArrayName, FormGroupName, FormGroupDirective
|
|
3
|
+
import { NgControl, FormArrayName, FormGroupName, FormGroupDirective } from '@angular/forms';
|
|
4
4
|
import { TuiValidationError, tuiDefaultProp, tuiPure } from '@taiga-ui/cdk';
|
|
5
5
|
import { TUI_VALIDATION_ERRORS } from '@taiga-ui/kit/tokens';
|
|
6
|
+
import { merge, EMPTY } from 'rxjs';
|
|
6
7
|
import { CommonModule } from '@angular/common';
|
|
7
8
|
import { TuiErrorModule } from '@taiga-ui/core';
|
|
8
9
|
|
|
@@ -20,6 +21,10 @@ let TuiFieldErrorComponent = class TuiFieldErrorComponent {
|
|
|
20
21
|
this.ngControl.valueAccessor = this;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
24
|
+
get change$() {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return merge(((_a = this.control) === null || _a === void 0 ? void 0 : _a.valueChanges) || EMPTY, ((_b = this.control) === null || _b === void 0 ? void 0 : _b.statusChanges) || EMPTY);
|
|
27
|
+
}
|
|
23
28
|
get computedError() {
|
|
24
29
|
return (this.invalid && this.touched && this.error) || null;
|
|
25
30
|
}
|
|
@@ -88,6 +93,9 @@ __decorate([
|
|
|
88
93
|
Input(),
|
|
89
94
|
tuiDefaultProp()
|
|
90
95
|
], TuiFieldErrorComponent.prototype, "order", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
tuiPure
|
|
98
|
+
], TuiFieldErrorComponent.prototype, "change$", null);
|
|
91
99
|
__decorate([
|
|
92
100
|
tuiPure
|
|
93
101
|
], TuiFieldErrorComponent.prototype, "getErrorId", null);
|
|
@@ -100,7 +108,7 @@ TuiFieldErrorComponent = __decorate([
|
|
|
100
108
|
// @bad TODO: find a way to get 'touched' state change
|
|
101
109
|
// https://github.com/angular/angular/issues/10887
|
|
102
110
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
103
|
-
template: "<tui-error [error]=\"computedError\"></tui-error>\n",
|
|
111
|
+
template: "<ng-container *ngIf=\"change$ | async\"></ng-container>\n<tui-error [error]=\"computedError\"></tui-error>\n",
|
|
104
112
|
styles: [":host{display:block}"]
|
|
105
113
|
}),
|
|
106
114
|
__param(0, Optional()),
|
|
@@ -122,7 +130,7 @@ let TuiFieldErrorModule = class TuiFieldErrorModule {
|
|
|
122
130
|
};
|
|
123
131
|
TuiFieldErrorModule = __decorate([
|
|
124
132
|
NgModule({
|
|
125
|
-
imports: [CommonModule,
|
|
133
|
+
imports: [CommonModule, TuiErrorModule],
|
|
126
134
|
declarations: [TuiFieldErrorComponent],
|
|
127
135
|
exports: [TuiFieldErrorComponent],
|
|
128
136
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-field-error.js","sources":["ng://@taiga-ui/kit/components/field-error/field-error.component.ts","ng://@taiga-ui/kit/components/field-error/field-error.module.ts","ng://@taiga-ui/kit/components/field-error/taiga-ui-kit-components-field-error.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormArrayName,\n FormGroupDirective,\n FormGroupName,\n NgControl,\n} from '@angular/forms';\nimport {tuiDefaultProp, tuiPure, TuiValidationError} from '@taiga-ui/cdk';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nconst EMPTY_RECORD = {};\n\n// @dynamic\n@Component({\n selector: 'tui-field-error',\n // @bad TODO: find a way to get 'touched' state change\n // https://github.com/angular/angular/issues/10887\n changeDetection: ChangeDetectionStrategy.Default,\n templateUrl: './field-error.template.html',\n styleUrls: ['./field-error.style.less'],\n})\nexport class TuiFieldErrorComponent {\n @Input()\n @tuiDefaultProp()\n order: readonly string[] = [];\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null,\n @Optional()\n @Self()\n @Inject(FormArrayName)\n private readonly formArrayName: FormArrayName | null,\n @Optional()\n @Self()\n @Inject(FormGroupName)\n private readonly formGroupName: FormGroupName | null,\n @Optional()\n @Self()\n @Inject(FormGroupDirective)\n private readonly formGroup: FormGroupDirective | null,\n @Inject(TUI_VALIDATION_ERRORS)\n private readonly validationErrors: Record<string, PolymorpheusContent>,\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n get computedError(): TuiValidationError | null {\n return (this.invalid && this.touched && this.error) || null;\n }\n\n registerOnChange() {}\n\n registerOnTouched() {}\n\n setDisabledState() {}\n\n writeValue() {}\n\n private get error(): TuiValidationError | null {\n const {errorId} = this;\n\n if (!errorId) {\n return null;\n }\n\n const firstError = this.controlErrors[errorId];\n const errorContent = this.validationErrors[errorId];\n\n return this.getError(firstError, errorContent);\n }\n\n private get invalid(): boolean {\n return !!this.control && this.control.invalid;\n }\n\n private get touched(): boolean {\n return !!this.control && this.control.touched;\n }\n\n private get control(): AbstractControl | null {\n if (this.ngControl) {\n return this.ngControl.control;\n }\n\n if (this.formArrayName) {\n return this.formArrayName.control;\n }\n\n if (this.formGroupName) {\n return this.formGroupName.control;\n }\n\n if (this.formGroup) {\n return this.formGroup.control;\n }\n\n return null;\n }\n\n private get errorId(): string {\n return this.getErrorId(this.order, this.controlErrors);\n }\n\n private get controlErrors(): Record<string, any> {\n return (this.control && this.control.errors) || EMPTY_RECORD;\n }\n\n @tuiPure\n private getErrorId(\n order: readonly string[],\n controlErrors: Record<string, any>,\n ): string {\n const id = order && order.find(errorId => controlErrors[errorId]);\n const fallback = Object.keys(controlErrors)[0];\n\n return id || fallback || '';\n }\n\n @tuiPure\n private getError(\n firstError: any,\n errorContent?: PolymorpheusContent,\n ): TuiValidationError | null {\n if (firstError instanceof TuiValidationError) {\n return firstError;\n }\n\n return errorContent === undefined && typeof firstError === 'string'\n ? new TuiValidationError(firstError)\n : new TuiValidationError(errorContent || '', firstError);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-field-error.js","sources":["ng://@taiga-ui/kit/components/field-error/field-error.component.ts","ng://@taiga-ui/kit/components/field-error/field-error.module.ts","ng://@taiga-ui/kit/components/field-error/taiga-ui-kit-components-field-error.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormArrayName,\n FormGroupDirective,\n FormGroupName,\n NgControl,\n} from '@angular/forms';\nimport {tuiDefaultProp, tuiPure, TuiValidationError} from '@taiga-ui/cdk';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\n\nconst EMPTY_RECORD = {};\n\n// @dynamic\n@Component({\n selector: 'tui-field-error',\n // @bad TODO: find a way to get 'touched' state change\n // https://github.com/angular/angular/issues/10887\n changeDetection: ChangeDetectionStrategy.Default,\n templateUrl: './field-error.template.html',\n styleUrls: ['./field-error.style.less'],\n})\nexport class TuiFieldErrorComponent {\n @Input()\n @tuiDefaultProp()\n order: readonly string[] = [];\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null,\n @Optional()\n @Self()\n @Inject(FormArrayName)\n private readonly formArrayName: FormArrayName | null,\n @Optional()\n @Self()\n @Inject(FormGroupName)\n private readonly formGroupName: FormGroupName | null,\n @Optional()\n @Self()\n @Inject(FormGroupDirective)\n private readonly formGroup: FormGroupDirective | null,\n @Inject(TUI_VALIDATION_ERRORS)\n private readonly validationErrors: Record<string, PolymorpheusContent>,\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n @tuiPure\n get change$(): Observable<unknown> {\n return merge(\n this.control?.valueChanges || EMPTY,\n this.control?.statusChanges || EMPTY,\n );\n }\n\n get computedError(): TuiValidationError | null {\n return (this.invalid && this.touched && this.error) || null;\n }\n\n registerOnChange() {}\n\n registerOnTouched() {}\n\n setDisabledState() {}\n\n writeValue() {}\n\n private get error(): TuiValidationError | null {\n const {errorId} = this;\n\n if (!errorId) {\n return null;\n }\n\n const firstError = this.controlErrors[errorId];\n const errorContent = this.validationErrors[errorId];\n\n return this.getError(firstError, errorContent);\n }\n\n private get invalid(): boolean {\n return !!this.control && this.control.invalid;\n }\n\n private get touched(): boolean {\n return !!this.control && this.control.touched;\n }\n\n private get control(): AbstractControl | null {\n if (this.ngControl) {\n return this.ngControl.control;\n }\n\n if (this.formArrayName) {\n return this.formArrayName.control;\n }\n\n if (this.formGroupName) {\n return this.formGroupName.control;\n }\n\n if (this.formGroup) {\n return this.formGroup.control;\n }\n\n return null;\n }\n\n private get errorId(): string {\n return this.getErrorId(this.order, this.controlErrors);\n }\n\n private get controlErrors(): Record<string, any> {\n return (this.control && this.control.errors) || EMPTY_RECORD;\n }\n\n @tuiPure\n private getErrorId(\n order: readonly string[],\n controlErrors: Record<string, any>,\n ): string {\n const id = order && order.find(errorId => controlErrors[errorId]);\n const fallback = Object.keys(controlErrors)[0];\n\n return id || fallback || '';\n }\n\n @tuiPure\n private getError(\n firstError: any,\n errorContent?: PolymorpheusContent,\n ): TuiValidationError | null {\n if (firstError instanceof TuiValidationError) {\n return firstError;\n }\n\n return errorContent === undefined && typeof firstError === 'string'\n ? new TuiValidationError(firstError)\n : new TuiValidationError(errorContent || '', firstError);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiErrorModule} from '@taiga-ui/core';\nimport {TuiFieldErrorComponent} from './field-error.component';\n\n@NgModule({\n imports: [CommonModule, TuiErrorModule],\n declarations: [TuiFieldErrorComponent],\n exports: [TuiFieldErrorComponent],\n})\nexport class TuiFieldErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoBA,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;IASa,sBAAsB,GAAnC,MAAa,sBAAsB;IAK/B,YAIqB,SAA2B,EAI3B,aAAmC,EAInC,aAAmC,EAInC,SAAoC,EAEpC,gBAAqD;QAdrD,cAAS,GAAT,SAAS,CAAkB;QAI3B,kBAAa,GAAb,aAAa,CAAsB;QAInC,kBAAa,GAAb,aAAa,CAAsB;QAInC,cAAS,GAAT,SAAS,CAA2B;QAEpC,qBAAgB,GAAhB,gBAAgB,CAAqC;QApB1E,UAAK,GAAsB,EAAE,CAAC;QAsB1B,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;SACvC;KACJ;IAGD,IAAI,OAAO;;QACP,OAAO,KAAK,CACR,OAAA,IAAI,CAAC,OAAO,0CAAE,YAAY,KAAI,KAAK,EACnC,OAAA,IAAI,CAAC,OAAO,0CAAE,aAAa,KAAI,KAAK,CACvC,CAAC;KACL;IAED,IAAI,aAAa;QACb,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC;KAC/D;IAED,gBAAgB,MAAK;IAErB,iBAAiB,MA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AAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;IAE1B,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;GAtBzB,sBAAsB,CA2HlC;;IChJY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAL/B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;QACvC,YAAY,EAAE,CAAC,sBAAsB,CAAC;QACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;KACpC,CAAC;GACW,mBAAmB,CAAG;;ACVnC;;;;;;"}
|
|
@@ -1,31 +1,71 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Optional, Self, Inject, ChangeDetectorRef, Input, ViewChild, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, Input, ViewChild, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl } from '@angular/forms';
|
|
4
|
-
import { AbstractTuiControl, isNativeFocused, isPresent, setNativeFocused,
|
|
5
|
-
import { tuiCreateNumberMask, formatNumber, TUI_TEXTFIELD_APPEARANCE, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TuiPrimitiveTextfieldComponent, TuiButtonModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule } from '@taiga-ui/core';
|
|
4
|
+
import { AbstractTuiControl, isNativeFocused, isPresent, setNativeFocused, clamp, TUI_IS_MOBILE, tuiDefaultProp, tuiPure, TUI_FOCUSABLE_ITEM_ACCESSOR } from '@taiga-ui/cdk';
|
|
5
|
+
import { tuiCreateNumberMask, formatNumber, TUI_TEXTFIELD_APPEARANCE, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TUI_NUMBER_FORMAT, TuiPrimitiveTextfieldComponent, TuiButtonModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule } from '@taiga-ui/core';
|
|
6
6
|
import { TUI_PLUS_MINUS_TEXTS } from '@taiga-ui/kit/tokens';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import { TuiValueAccessorModule } from '@taiga-ui/kit/directives';
|
|
10
|
+
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
10
11
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
11
12
|
|
|
13
|
+
// TODO: remove in ivy compilation
|
|
14
|
+
const PASSWORD_ICON_UP = 'tuiIconPlus';
|
|
15
|
+
const PASSWORD_ICON_DOWN = 'tuiIconMinus';
|
|
16
|
+
/** Default values for the input count options. */
|
|
17
|
+
const TUI_INPUT_COUNT_DEFAULT_OPTIONS = {
|
|
18
|
+
icons: {
|
|
19
|
+
up: PASSWORD_ICON_UP,
|
|
20
|
+
down: PASSWORD_ICON_DOWN,
|
|
21
|
+
},
|
|
22
|
+
appearance: 'textfield',
|
|
23
|
+
hideButtons: false,
|
|
24
|
+
min: 0,
|
|
25
|
+
max: Infinity,
|
|
26
|
+
step: 1,
|
|
27
|
+
postfix: '',
|
|
28
|
+
};
|
|
29
|
+
const TUI_INPUT_COUNT_OPTIONS = new InjectionToken('Default parameters for input count component', {
|
|
30
|
+
factory: () => TUI_INPUT_COUNT_DEFAULT_OPTIONS,
|
|
31
|
+
});
|
|
32
|
+
|
|
12
33
|
var TuiInputCountComponent_1;
|
|
13
34
|
// @dynamic
|
|
14
35
|
let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountComponent extends AbstractTuiControl {
|
|
15
|
-
constructor(control, changeDetectorRef, appearance, textfieldSize, minusTexts$, isMobile) {
|
|
36
|
+
constructor(control, changeDetectorRef, appearance, textfieldSize, minusTexts$, isMobile, options, numberFormat) {
|
|
16
37
|
super(control, changeDetectorRef);
|
|
17
38
|
this.appearance = appearance;
|
|
18
39
|
this.textfieldSize = textfieldSize;
|
|
19
40
|
this.minusTexts$ = minusTexts$;
|
|
20
41
|
this.isMobile = isMobile;
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
42
|
+
this.options = options;
|
|
43
|
+
this.numberFormat = numberFormat;
|
|
44
|
+
this.step = this.options.step;
|
|
45
|
+
this.min = this.options.min;
|
|
46
|
+
this.max = this.options.max;
|
|
47
|
+
this.hideButtons = this.options.hideButtons;
|
|
48
|
+
this.postfix = this.options.postfix;
|
|
26
49
|
}
|
|
27
50
|
getMask(allowNegative) {
|
|
28
|
-
return {
|
|
51
|
+
return {
|
|
52
|
+
mask: tuiCreateNumberMask({
|
|
53
|
+
allowNegative,
|
|
54
|
+
decimalSymbol: this.numberFormat.decimalSeparator,
|
|
55
|
+
thousandSymbol: this.numberFormat.thousandSeparator,
|
|
56
|
+
}),
|
|
57
|
+
guide: false,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
// TODO: Remove in v.3
|
|
61
|
+
get buttonsHidden() {
|
|
62
|
+
return this.hideButtons || this.appearance === 'table';
|
|
63
|
+
}
|
|
64
|
+
get iconUp() {
|
|
65
|
+
return this.options.icons.up;
|
|
66
|
+
}
|
|
67
|
+
get iconDown() {
|
|
68
|
+
return this.options.icons.down;
|
|
29
69
|
}
|
|
30
70
|
get nativeFocusableElement() {
|
|
31
71
|
return !this.primitiveTextfield || this.computedDisabled
|
|
@@ -38,14 +78,11 @@ let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountCompo
|
|
|
38
78
|
get focused() {
|
|
39
79
|
return isNativeFocused(this.nativeFocusableElement);
|
|
40
80
|
}
|
|
41
|
-
get hasButtons() {
|
|
42
|
-
return !this.hideButtons && this.appearance !== "table" /* Table */;
|
|
43
|
-
}
|
|
44
81
|
get exampleText() {
|
|
45
82
|
return String(this.min);
|
|
46
83
|
}
|
|
47
84
|
get computedValue() {
|
|
48
|
-
return formatNumber(this.value);
|
|
85
|
+
return this.formatNumber(this.value);
|
|
49
86
|
}
|
|
50
87
|
get minusButtonDisabled() {
|
|
51
88
|
return (this.disabled ||
|
|
@@ -81,7 +118,7 @@ let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountCompo
|
|
|
81
118
|
if (capped === null || isNaN(capped)) {
|
|
82
119
|
return;
|
|
83
120
|
}
|
|
84
|
-
const newValue = formatNumber(capped);
|
|
121
|
+
const newValue = this.formatNumber(capped);
|
|
85
122
|
if (this.nativeValue !== newValue) {
|
|
86
123
|
this.nativeValue = newValue;
|
|
87
124
|
}
|
|
@@ -121,7 +158,7 @@ let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountCompo
|
|
|
121
158
|
return 0;
|
|
122
159
|
}
|
|
123
160
|
get nativeNumberValue() {
|
|
124
|
-
return parseInt(this.nativeValue.split(
|
|
161
|
+
return parseInt(this.nativeValue.split(this.numberFormat.thousandSeparator).join(''), 10);
|
|
125
162
|
}
|
|
126
163
|
get nativeValue() {
|
|
127
164
|
return this.nativeFocusableElement ? this.nativeFocusableElement.value : '';
|
|
@@ -135,7 +172,7 @@ let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountCompo
|
|
|
135
172
|
safeUpdateValue(newValue) {
|
|
136
173
|
const value = clamp(newValue, this.min, this.max);
|
|
137
174
|
this.updateValue(value);
|
|
138
|
-
this.nativeValue = formatNumber(value);
|
|
175
|
+
this.nativeValue = this.formatNumber(value);
|
|
139
176
|
}
|
|
140
177
|
capValue(value) {
|
|
141
178
|
const capped = Math.min(value, this.max);
|
|
@@ -143,13 +180,16 @@ let TuiInputCountComponent = TuiInputCountComponent_1 = class TuiInputCountCompo
|
|
|
143
180
|
}
|
|
144
181
|
onBlur() {
|
|
145
182
|
const value = Math.max(this.nativeNumberValue || 0, this.min);
|
|
146
|
-
const formattedValue = formatNumber(value);
|
|
183
|
+
const formattedValue = this.formatNumber(value);
|
|
147
184
|
this.nativeValue = formattedValue;
|
|
148
185
|
this.updateValue(value);
|
|
149
186
|
if (this.primitiveTextfield) {
|
|
150
187
|
this.primitiveTextfield.value = formattedValue;
|
|
151
188
|
}
|
|
152
189
|
}
|
|
190
|
+
formatNumber(value) {
|
|
191
|
+
return formatNumber(value, null, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
192
|
+
}
|
|
153
193
|
};
|
|
154
194
|
TuiInputCountComponent.ctorParameters = () => [
|
|
155
195
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
@@ -157,7 +197,9 @@ TuiInputCountComponent.ctorParameters = () => [
|
|
|
157
197
|
{ type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] },
|
|
158
198
|
{ type: TuiTextfieldSizeDirective, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_SIZE,] }] },
|
|
159
199
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_PLUS_MINUS_TEXTS,] }] },
|
|
160
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] }
|
|
200
|
+
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
201
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_INPUT_COUNT_OPTIONS,] }] },
|
|
202
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
161
203
|
];
|
|
162
204
|
__decorate([
|
|
163
205
|
Input(),
|
|
@@ -185,16 +227,16 @@ __decorate([
|
|
|
185
227
|
__decorate([
|
|
186
228
|
ViewChild(TuiPrimitiveTextfieldComponent)
|
|
187
229
|
], TuiInputCountComponent.prototype, "primitiveTextfield", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
HostBinding('class._hide-buttons')
|
|
232
|
+
], TuiInputCountComponent.prototype, "buttonsHidden", null);
|
|
188
233
|
__decorate([
|
|
189
234
|
HostBinding('attr.data-tui-host-size')
|
|
190
235
|
], TuiInputCountComponent.prototype, "size", null);
|
|
191
|
-
__decorate([
|
|
192
|
-
HostBinding('class._has-buttons')
|
|
193
|
-
], TuiInputCountComponent.prototype, "hasButtons", null);
|
|
194
236
|
TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
195
237
|
Component({
|
|
196
238
|
selector: 'tui-input-count',
|
|
197
|
-
template: "<tui-primitive-textfield\n class=\"textfield\"\n tuiValueAccessor\n tuiTextfieldAutocomplete=\"off\"\n tuiTextfieldInputMode=\"numeric\"\n [tuiTextfieldMaxLength]=\"18\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [postfix]=\"postfix\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [textMask]=\"getMask(min < 0)\"\n [invalid]=\"computedInvalid\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange()\"\n (keydown)=\"onKeydown($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n<ng-container *ngIf=\"
|
|
239
|
+
template: "<tui-primitive-textfield\n class=\"textfield\"\n tuiValueAccessor\n tuiTextfieldAutocomplete=\"off\"\n tuiTextfieldInputMode=\"numeric\"\n [tuiTextfieldMaxLength]=\"18\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [postfix]=\"postfix\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [textMask]=\"getMask(min < 0)\"\n [invalid]=\"computedInvalid\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange()\"\n (keydown)=\"onKeydown($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n<ng-container *ngIf=\"!buttonsHidden && (minusTexts$ | async) as texts\">\n <section class=\"buttons\">\n <button\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-input-count__plus-button\"\n size=\"s\"\n [icon]=\"iconUp\"\n class=\"button button_plus\"\n [appearance]=\"options.appearance\"\n [title]=\"texts[0]\"\n [disabled]=\"plusButtonDisabled\"\n [focusable]=\"false\"\n (mousedown)=\"onButtonMouseDown($event, plusButtonDisabled)\"\n (click)=\"increaseValue()\"\n ></button>\n <button\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-input-count__minus-button\"\n size=\"s\"\n [icon]=\"iconDown\"\n class=\"button button_minus\"\n [appearance]=\"options.appearance\"\n [disabled]=\"minusButtonDisabled\"\n [focusable]=\"false\"\n [title]=\"texts[1]\"\n (mousedown)=\"onButtonMouseDown($event, minusButtonDisabled)\"\n (click)=\"decreaseValue()\"\n ></button>\n </section>\n</ng-container>\n",
|
|
198
240
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
199
241
|
providers: [
|
|
200
242
|
{
|
|
@@ -202,7 +244,7 @@ TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
|
202
244
|
useExisting: forwardRef(() => TuiInputCountComponent_1),
|
|
203
245
|
},
|
|
204
246
|
],
|
|
205
|
-
styles: [":host{font:var(--tui-font-text-s);
|
|
247
|
+
styles: [":host{display:flex;font:var(--tui-font-text-s);border-radius:var(--tui-radius-m);height:var(--tui-height-m);color:var(--tui-text-01)}:host._disabled{pointer-events:none}:host[data-tui-host-size='l']{font:var(--tui-font-text-m);height:var(--tui-height-l)}.textfield{position:relative;border-radius:inherit;flex-grow:1;min-width:0}:host:not(._hide-buttons) .textfield{border-top-right-radius:0;border-bottom-right-radius:0}.buttons{display:flex;flex-direction:column;margin-left:.125rem;height:100%}.buttons .button{display:flex;width:calc(var(--tui-height-m) * .75);height:calc(50% - .0625rem)}.buttons .button_plus{margin-bottom:.125rem;border-radius:0 var(--tui-radius-m) 0 0}.buttons .button_minus{border-radius:0 0 var(--tui-radius-m)}:host[data-tui-host-size='l'] .buttons .button{width:calc(var(--tui-height-l) * .75)}"]
|
|
206
248
|
}),
|
|
207
249
|
__param(0, Optional()),
|
|
208
250
|
__param(0, Self()),
|
|
@@ -211,7 +253,9 @@ TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
|
211
253
|
__param(2, Inject(TUI_TEXTFIELD_APPEARANCE)),
|
|
212
254
|
__param(3, Inject(TUI_TEXTFIELD_SIZE)),
|
|
213
255
|
__param(4, Inject(TUI_PLUS_MINUS_TEXTS)),
|
|
214
|
-
__param(5, Inject(TUI_IS_MOBILE))
|
|
256
|
+
__param(5, Inject(TUI_IS_MOBILE)),
|
|
257
|
+
__param(6, Inject(TUI_INPUT_COUNT_OPTIONS)),
|
|
258
|
+
__param(7, Inject(TUI_NUMBER_FORMAT))
|
|
215
259
|
], TuiInputCountComponent);
|
|
216
260
|
|
|
217
261
|
let TuiInputCountModule = class TuiInputCountModule {
|
|
@@ -225,6 +269,7 @@ TuiInputCountModule = __decorate([
|
|
|
225
269
|
TuiPrimitiveTextfieldModule,
|
|
226
270
|
TuiTextfieldControllerModule,
|
|
227
271
|
TuiValueAccessorModule,
|
|
272
|
+
PolymorpheusModule,
|
|
228
273
|
],
|
|
229
274
|
declarations: [TuiInputCountComponent],
|
|
230
275
|
exports: [TuiInputCountComponent],
|
|
@@ -235,5 +280,5 @@ TuiInputCountModule = __decorate([
|
|
|
235
280
|
* Generated bundle index. Do not edit.
|
|
236
281
|
*/
|
|
237
282
|
|
|
238
|
-
export { TuiInputCountComponent, TuiInputCountModule };
|
|
283
|
+
export { PASSWORD_ICON_DOWN, PASSWORD_ICON_UP, TUI_INPUT_COUNT_DEFAULT_OPTIONS, TUI_INPUT_COUNT_OPTIONS, TuiInputCountComponent, TuiInputCountModule };
|
|
239
284
|
//# sourceMappingURL=taiga-ui-kit-components-input-count.js.map
|