@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
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'tslib';
|
|
|
2
2
|
import { Optional, Self, Inject, ChangeDetectorRef, ViewChild, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { isNativeFocused, setNativeFocused, TUI_IS_MOBILE, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiFocusableModule, TuiFocusedModule, TuiHoveredModule, TuiPressedModule, TuiMapperPipeModule, TuiInputModeModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
|
|
5
|
-
import {
|
|
5
|
+
import { maskedMoneyValueIsEmpty, maskedNumberStringToNumber, formatNumber, TuiModeDirective, TUI_NUMBER_FORMAT, TuiWrapperModule } from '@taiga-ui/core';
|
|
6
6
|
import { AbstractTuiInputSlider } from '@taiga-ui/kit/abstract';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import { TuiRangeModule } from '@taiga-ui/kit/components/range';
|
|
@@ -11,10 +11,11 @@ import { TextMaskModule } from 'angular2-text-mask';
|
|
|
11
11
|
var TuiInputRangeComponent_1;
|
|
12
12
|
// @dynamic
|
|
13
13
|
let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeComponent extends AbstractTuiInputSlider {
|
|
14
|
-
constructor(control, changeDetectorRef, modeDirective, isMobile) {
|
|
14
|
+
constructor(control, changeDetectorRef, modeDirective, isMobile, numberFormat) {
|
|
15
15
|
super(control, changeDetectorRef);
|
|
16
16
|
this.modeDirective = modeDirective;
|
|
17
17
|
this.isMobile = isMobile;
|
|
18
|
+
this.numberFormat = numberFormat;
|
|
18
19
|
}
|
|
19
20
|
get nativeFocusableElement() {
|
|
20
21
|
return !this.nativeLeft || this.disabled ? null : this.nativeLeft.nativeElement;
|
|
@@ -41,10 +42,10 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
41
42
|
return this.nativeRight ? this.nativeRight.nativeElement.value : '';
|
|
42
43
|
}
|
|
43
44
|
get computedValueLeft() {
|
|
44
|
-
return formatNumber(this.value[0]);
|
|
45
|
+
return this.formatNumber(this.value[0]);
|
|
45
46
|
}
|
|
46
47
|
get computedValueRight() {
|
|
47
|
-
return formatNumber(this.value[1]);
|
|
48
|
+
return this.formatNumber(this.value[1]);
|
|
48
49
|
}
|
|
49
50
|
onActiveZone(active) {
|
|
50
51
|
this.updateFocused(active);
|
|
@@ -89,7 +90,7 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
89
90
|
if (maskedMoneyValueIsEmpty(value) || capped === null) {
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
|
-
const newValue = formatNumber(capped) + postfix;
|
|
93
|
+
const newValue = this.formatNumber(capped) + postfix;
|
|
93
94
|
if (this.nativeLeft && this.inputValueLeft !== newValue) {
|
|
94
95
|
this.nativeLeft.nativeElement.value = newValue;
|
|
95
96
|
}
|
|
@@ -102,7 +103,7 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
102
103
|
if (maskedMoneyValueIsEmpty(value) || capped === null) {
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
|
-
const newValue = formatNumber(capped) + postfix;
|
|
106
|
+
const newValue = this.formatNumber(capped) + postfix;
|
|
106
107
|
if (this.nativeRight && this.inputValueRight !== newValue) {
|
|
107
108
|
this.nativeRight.nativeElement.value = newValue;
|
|
108
109
|
}
|
|
@@ -124,15 +125,15 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
124
125
|
setNativeFocused(element);
|
|
125
126
|
}
|
|
126
127
|
this.updateValue(guardedValue);
|
|
127
|
-
this.nativeLeft.nativeElement.value = formatNumber(guardedValue[0]);
|
|
128
|
+
this.nativeLeft.nativeElement.value = this.formatNumber(guardedValue[0]);
|
|
128
129
|
}
|
|
129
130
|
onLeftFocused(focused) {
|
|
130
131
|
if (focused || !this.nativeLeft) {
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
133
|
-
const inputValue = maskedNumberStringToNumber(this.computedValueLeft);
|
|
134
|
+
const inputValue = maskedNumberStringToNumber(this.computedValueLeft, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
134
135
|
const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);
|
|
135
|
-
this.nativeLeft.nativeElement.value = formatNumber(value);
|
|
136
|
+
this.nativeLeft.nativeElement.value = this.formatNumber(value);
|
|
136
137
|
if (value !== this.value[0]) {
|
|
137
138
|
this.updateValue([value, this.value[1]]);
|
|
138
139
|
}
|
|
@@ -141,11 +142,11 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
141
142
|
if (focused || !this.nativeRight) {
|
|
142
143
|
return;
|
|
143
144
|
}
|
|
144
|
-
const inputValue = maskedNumberStringToNumber(this.computedValueRight);
|
|
145
|
+
const inputValue = maskedNumberStringToNumber(this.computedValueRight, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
145
146
|
const value = isNaN(inputValue)
|
|
146
147
|
? this.value[0]
|
|
147
148
|
: this.valueGuard(Math.max(inputValue, this.value[0]));
|
|
148
|
-
this.nativeRight.nativeElement.value = formatNumber(value);
|
|
149
|
+
this.nativeRight.nativeElement.value = this.formatNumber(value);
|
|
149
150
|
if (value !== this.value[1]) {
|
|
150
151
|
this.updateValue([this.value[0], value]);
|
|
151
152
|
}
|
|
@@ -153,6 +154,9 @@ let TuiInputRangeComponent = TuiInputRangeComponent_1 = class TuiInputRangeCompo
|
|
|
153
154
|
getFallbackValue() {
|
|
154
155
|
return [0, 0];
|
|
155
156
|
}
|
|
157
|
+
formatNumber(value) {
|
|
158
|
+
return formatNumber(value, null, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
159
|
+
}
|
|
156
160
|
processStep(increment, right) {
|
|
157
161
|
const start = this.valueGuard(increment ? this.value[0] + this.step : this.value[0] - this.step);
|
|
158
162
|
const end = this.valueGuard(increment ? this.value[1] + this.step : this.value[1] - this.step);
|
|
@@ -169,7 +173,8 @@ TuiInputRangeComponent.ctorParameters = () => [
|
|
|
169
173
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
170
174
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
171
175
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] },
|
|
172
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] }
|
|
176
|
+
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
177
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
173
178
|
];
|
|
174
179
|
__decorate([
|
|
175
180
|
ViewChild('nativeLeft')
|
|
@@ -186,7 +191,7 @@ __decorate([
|
|
|
186
191
|
TuiInputRangeComponent = TuiInputRangeComponent_1 = __decorate([
|
|
187
192
|
Component({
|
|
188
193
|
selector: 'tui-input-range',
|
|
189
|
-
template: "<div class=\"zone\" (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <tui-wrapper\n appearance=\"textfield\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n >\n <span\n *ngIf=\"hasPlaceholder\"\n class=\"placeholder\"\n automation-id=\"tui-input-range__placeholder\"\n >\n <ng-content></ng-content>\n </span>\n <div class=\"content\">\n <span *ngIf=\"!showMinLabel\" class=\"label\">\n <span class=\"value\">{{inputValueLeft}}</span>\n <span\n *ngIf=\"
|
|
194
|
+
template: "<div class=\"zone\" (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <tui-wrapper\n appearance=\"textfield\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n >\n <span\n *ngIf=\"hasPlaceholder\"\n class=\"placeholder\"\n automation-id=\"tui-input-range__placeholder\"\n >\n <ng-content></ng-content>\n </span>\n <div class=\"content\">\n <span *ngIf=\"!showMinLabel\" class=\"label\">\n <span class=\"value\">{{inputValueLeft}}</span>\n <span\n *ngIf=\"pluralizeMap\"\n class=\"pluralize\"\n automation-id=\"tui-input-range__pluralize-left\"\n >\n {{value[0] | i18nPlural: pluralizeMap}}\n </span>\n </span>\n <span\n *ngIf=\"showMinLabel\"\n class=\"label\"\n automation-id=\"tui-input-range__min-label\"\n >\n {{minLabel}}\n </span>\n <span\n *ngIf=\"showMaxLabel\"\n automation-id=\"tui-input-range__max-label\"\n class=\"max\"\n >\n {{maxLabel}}\n </span>\n </div>\n <tui-range\n class=\"slider\"\n [min]=\"min\"\n [max]=\"max\"\n [steps]=\"computedSteps\"\n [segments]=\"segments\"\n [keySteps]=\"keySteps\"\n [pluralize]=\"segmentsPluralize\"\n [focusable]=\"false\"\n [disabled]=\"readOnly || disabled\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onRangeValue($event)\"\n (mousedown.prevent)=\"onMouseDown()\"\n ></tui-range>\n </tui-wrapper>\n\n <div class=\"native-wrapper\" (tuiHoveredChange)=\"onHovered($event)\">\n <input\n #nativeLeft\n class=\"native\"\n automation-id=\"tui-input-range__native-left\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [class.native_hidden]=\"showMinLabel\"\n [tuiInputMode]=\"inputMode\"\n [tuiFocusable]=\"focusable\"\n [textMask]=\"quantum | tuiMapper: mask: min\"\n [ngModel]=\"computedValueLeft\"\n (ngModelChange)=\"onInputLeft()\"\n (tuiFocusedChange)=\"onLeftFocused($event)\"\n (keydown.arrowUp)=\"onKeyDownArrowUpLeft($event)\"\n (keydown.arrowDown)=\"onKeyDownArrowDownLeft($event)\"\n />\n <input\n #nativeRight\n class=\"native native_right\"\n automation-id=\"tui-input-range__native-right\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [class.native_hidden]=\"showMaxLabel\"\n [tuiInputMode]=\"inputMode\"\n [tuiFocusable]=\"focusable\"\n [textMask]=\"quantum | tuiMapper: mask: min\"\n [ngModel]=\"computedValueRight\"\n (ngModelChange)=\"onInputRight()\"\n (tuiFocusedChange)=\"onRightFocused($event)\"\n (keydown.arrowUp)=\"onKeyDownArrowUpRight($event)\"\n (keydown.arrowDown)=\"onKeyDownArrowDownRight($event)\"\n />\n <span\n *ngIf=\"pluralizeMap && !showMaxLabel\"\n class=\"pluralize pluralize_right\"\n automation-id=\"tui-input-range__pluralize-right\"\n (mousedown)=\"onMouseDown()\"\n >\n {{value[1] | i18nPlural: pluralizeMap}}\n </span>\n </div>\n</div>\n",
|
|
190
195
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
191
196
|
providers: [
|
|
192
197
|
{
|
|
@@ -194,7 +199,7 @@ TuiInputRangeComponent = TuiInputRangeComponent_1 = __decorate([
|
|
|
194
199
|
useExisting: forwardRef(() => TuiInputRangeComponent_1),
|
|
195
200
|
},
|
|
196
201
|
],
|
|
197
|
-
styles: [":host{font:var(--tui-font-text-m);position:relative;z-index:0;display:block;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host._segmented{border-bottom:26px solid transparent}:host[data-mode=onDark]{color:var(--tui-base-01)}.zone{border-radius:inherit}.native-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex}.pluralize{display:flex;align-items:center;padding-right:.75rem;margin-left:-.5rem}.pluralize_right{margin-left:-.75rem}:host[data-tui-host-size='l'] .pluralize_right{padding-top:1.25rem}:host._disabled .pluralize_right{color:var(--tui-text-03)}:host[data-mode=onDark]._disabled .pluralize_right{color:var(--tui-text-03-night)}.native{padding:0 1rem;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;flex:1;min-width:0;color:var(--tui-text-01);box-sizing:border-box;outline:0}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-webkit-autofill:hover{border-radius:inherit;-webkit-text-fill-color:
|
|
202
|
+
styles: [":host{font:var(--tui-font-text-m);position:relative;z-index:0;display:block;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host._segmented{border-bottom:26px solid transparent}:host[data-mode=onDark]{color:var(--tui-base-01)}.zone{border-radius:inherit}.native-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex}.pluralize{display:flex;align-items:center;padding-right:.75rem;margin-left:-.5rem}.pluralize_right{margin-left:-.75rem}:host[data-tui-host-size='l'] .pluralize_right{padding-top:1.25rem}:host._disabled .pluralize_right{color:var(--tui-text-03)}:host[data-mode=onDark]._disabled .pluralize_right{color:var(--tui-text-03-night)}.native{padding:0 1rem;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;flex:1;min-width:0;color:var(--tui-text-01);box-sizing:border-box;outline:0}.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}.native_right{text-align:right}.native_hidden{opacity:0}:host._disabled .native{color:var(--tui-text-03);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host[data-tui-host-size='l'] .native{padding:1.25rem 1rem 0}:host[data-mode=onDark] .native{color:var(--tui-text-01-night)}:host[data-mode=onDark]._disabled .native{color:var(--tui-text-03-night)}.content{display:flex;height:var(--tui-height-m);padding:0 1rem;justify-content:space-between;align-items:center}:host[data-tui-host-size='l'] .content{height:var(--tui-height-l);padding:0 1rem}:host[data-tui-host-size='l']._disabled .content{color:var(--tui-text-03)}:host[data-tui-host-size='l'][data-mode=onDark]._disabled .content{color:var(--tui-text-03-night)}.placeholder{transition-property:transform,min-width,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;font-size:.8125rem;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;color:var(--tui-text-02);transform-origin:left;letter-spacing:normal;text-transform:none;position:absolute;top:0;width:100%;height:100%;left:1rem;transform:translateY(-.625rem) scale(.87);line-height:var(--tui-height-l);max-width:calc(114% - 2rem)}.placeholder_raised{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m'] .placeholder_raised{width:118%;transform:translateY(-.5rem) scale(.85);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}.value{visibility:hidden;overflow:hidden;padding-right:.75rem}:host._disabled .value{color:var(--tui-text-03)}.label{display:flex;width:50%}:host[data-tui-host-size='l'] .label{padding-top:1.25rem}.max{text-align:right;flex:1}:host[data-tui-host-size='l'] .max{padding-top:1.25rem;line-height:calc(var(--tui-height-l) - 1.25rem)}.slider{position:absolute;top:100%;left:0;right:0;z-index:1;border-top-left-radius:0;border-top-right-radius:0;margin:-.5625rem 0 0;color:transparent}:host._disabled .slider,:host._readonly .slider{pointer-events:none}"]
|
|
198
203
|
}),
|
|
199
204
|
__param(0, Optional()),
|
|
200
205
|
__param(0, Self()),
|
|
@@ -202,7 +207,8 @@ TuiInputRangeComponent = TuiInputRangeComponent_1 = __decorate([
|
|
|
202
207
|
__param(1, Inject(ChangeDetectorRef)),
|
|
203
208
|
__param(2, Optional()),
|
|
204
209
|
__param(2, Inject(TuiModeDirective)),
|
|
205
|
-
__param(3, Inject(TUI_IS_MOBILE))
|
|
210
|
+
__param(3, Inject(TUI_IS_MOBILE)),
|
|
211
|
+
__param(4, Inject(TUI_NUMBER_FORMAT))
|
|
206
212
|
], TuiInputRangeComponent);
|
|
207
213
|
|
|
208
214
|
let TuiInputRangeModule = class TuiInputRangeModule {
|
|
@@ -221,7 +227,6 @@ TuiInputRangeModule = __decorate([
|
|
|
221
227
|
TuiMapperPipeModule,
|
|
222
228
|
TuiInputModeModule,
|
|
223
229
|
TuiActiveZoneModule,
|
|
224
|
-
TuiPluralizePipeModule,
|
|
225
230
|
TuiRangeModule,
|
|
226
231
|
TuiWrapperModule,
|
|
227
232
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-range.js","sources":["ng://@taiga-ui/kit/components/input-range/input-range.component.ts","ng://@taiga-ui/kit/components/input-range/input-range.module.ts","ng://@taiga-ui/kit/components/input-range/taiga-ui-kit-components-input-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-range',\n templateUrl: './input-range.template.html',\n styleUrls: ['./input-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputRangeComponent),\n },\n ],\n})\nexport class TuiInputRangeComponent\n extends AbstractTuiInputSlider<[number, number]>\n implements TuiFocusableElementAccessor {\n @ViewChild('nativeLeft')\n private readonly nativeLeft?: ElementRef<HTMLInputElement>;\n\n @ViewChild('nativeRight')\n private readonly nativeRight?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.nativeLeft || this.disabled ? null : this.nativeLeft.nativeElement;\n }\n\n get focused(): boolean {\n return this.focusedLeft || this.focusedRight;\n }\n\n get focusedLeft(): boolean {\n return !!this.nativeLeft && isNativeFocused(this.nativeLeft.nativeElement);\n }\n\n get focusedRight(): boolean {\n return !!this.nativeRight && isNativeFocused(this.nativeRight.nativeElement);\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focusedLeft && !!this.minLabel && this.value[0] === this.min;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focusedRight && !!this.maxLabel && this.value[1] === this.max;\n }\n\n get inputValueLeft(): string {\n return this.nativeLeft ? this.nativeLeft.nativeElement.value : '';\n }\n\n get inputValueRight(): string {\n return this.nativeRight ? this.nativeRight.nativeElement.value : '';\n }\n\n get computedValueLeft(): string {\n return formatNumber(this.value[0]);\n }\n\n get computedValueRight(): string {\n return formatNumber(this.value[1]);\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onMouseDown() {\n if (this.nativeRight && !this.isMobile) {\n setNativeFocused(this.nativeRight.nativeElement);\n }\n }\n\n onKeyDownArrowUpLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, false);\n }\n\n onKeyDownArrowDownLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, false);\n }\n\n onKeyDownArrowUpRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, true);\n }\n\n onKeyDownArrowDownRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, true);\n }\n\n onInputLeft() {\n const value = this.inputValueLeft;\n const capped = this.capInputValue(value, this.value[1]);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = formatNumber(capped) + postfix;\n\n if (this.nativeLeft && this.inputValueLeft !== newValue) {\n this.nativeLeft.nativeElement.value = newValue;\n }\n\n this.updateValue([capped, this.value[1]]);\n }\n\n onInputRight() {\n const value = this.inputValueRight;\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = formatNumber(capped) + postfix;\n\n if (this.nativeRight && this.inputValueRight !== newValue) {\n this.nativeRight.nativeElement.value = newValue;\n }\n\n if (capped >= this.value[0]) {\n this.updateValue([this.value[0], capped]);\n }\n }\n\n onRangeValue(value: [number, number]) {\n const guardedValue = value.map(item => this.valueGuard(item)) as [number, number];\n\n if (\n !this.nativeLeft ||\n !this.nativeRight ||\n (guardedValue[0] === this.value[0] && guardedValue[1] === this.value[1])\n ) {\n return;\n }\n\n if (!this.isMobile) {\n const element =\n guardedValue[0] !== this.value[0]\n ? this.nativeLeft.nativeElement\n : this.nativeRight.nativeElement;\n\n setNativeFocused(element);\n }\n\n this.updateValue(guardedValue);\n this.nativeLeft.nativeElement.value = formatNumber(guardedValue[0]);\n }\n\n onLeftFocused(focused: boolean) {\n if (focused || !this.nativeLeft) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(this.computedValueLeft);\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.nativeLeft.nativeElement.value = formatNumber(value);\n\n if (value !== this.value[0]) {\n this.updateValue([value, this.value[1]]);\n }\n }\n\n onRightFocused(focused: boolean) {\n if (focused || !this.nativeRight) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(this.computedValueRight);\n const value = isNaN(inputValue)\n ? this.value[0]\n : this.valueGuard(Math.max(inputValue, this.value[0]));\n\n this.nativeRight.nativeElement.value = formatNumber(value);\n\n if (value !== this.value[1]) {\n this.updateValue([this.value[0], value]);\n }\n }\n\n protected getFallbackValue(): [number, number] {\n return [0, 0];\n }\n\n private processStep(increment: boolean, right: boolean) {\n const start = this.valueGuard(\n increment ? this.value[0] + this.step : this.value[0] - this.step,\n );\n const end = this.valueGuard(\n increment ? this.value[1] + this.step : this.value[1] - this.step,\n );\n const value: [number, number] = [\n right ? this.value[0] : Math.min(start, this.value[1]),\n right ? Math.max(end, this.value[0]) : this.value[1],\n ];\n\n if (value[0] !== this.value[0] || value[1] !== this.value[1]) {\n this.updateValue(value);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiPluralizePipeModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRangeModule} from '@taiga-ui/kit/components/range';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputRangeComponent} from './input-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiActiveZoneModule,\n TuiPluralizePipeModule,\n TuiRangeModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputRangeComponent],\n exports: [TuiInputRangeComponent],\n})\nexport class TuiInputRangeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA6BA;IAaa,sBAAsB,8BAAnC,MAAa,sBACT,SAAQ,sBAAwC;IAQhD,YAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EACjB,QAAiB;QAEzD,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAHf,kBAAa,GAAb,aAAa,CAAyB;QACjB,aAAQ,GAAR,QAAQ,CAAS;KAG5D;IAED,IAAI,sBAAsB;QACtB,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;KACnF;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,YAAY,CAAC;KAChD;IAED,IAAI,WAAW;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;KAC9E;IAED,IAAI,YAAY;QACZ,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;KAChF;IAGD,IAAI,YAAY;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC;KAC7E;IAGD,IAAI,YAAY;QACZ,OAAO,CAAC,IA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C,aAAa;;AAdzB;IADC,SAAS,CAAC,YAAY,CAAC;0DACmC;AAG3D;IADC,SAAS,CAAC,aAAa,CAAC;2DACmC;AAiC5D;IADC,WAAW,CAAC,kBAAkB,CAAC;0DAG/B;AAGD;IADC,WAAW,CAAC,kBAAkB,CAAC;0DAG/B;AA/CQ,sBAAsB;IAZlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,wuHAA0C;QAE1C,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,wBAAsB,CAAC;aACxD;SACJ;;KACJ,CAAC;IAWO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAExB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;GAlBjB,sBAAsB,CAiOlC;;ICrOY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IApB/B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,cAAc;YACd,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,sBAAsB;YACtB,cAAc;YACd,gBAAgB;SACnB;QACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;QACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;KACpC,CAAC;GACW,mBAAmB,CAAG;;ACtCnC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-range.js","sources":["ng://@taiga-ui/kit/components/input-range/input-range.component.ts","ng://@taiga-ui/kit/components/input-range/input-range.module.ts","ng://@taiga-ui/kit/components/input-range/taiga-ui-kit-components-input-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n NumberFormatSettings,\n TUI_NUMBER_FORMAT,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-range',\n templateUrl: './input-range.template.html',\n styleUrls: ['./input-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputRangeComponent),\n },\n ],\n})\nexport class TuiInputRangeComponent\n extends AbstractTuiInputSlider<[number, number]>\n implements TuiFocusableElementAccessor {\n @ViewChild('nativeLeft')\n private readonly nativeLeft?: ElementRef<HTMLInputElement>;\n\n @ViewChild('nativeRight')\n private readonly nativeRight?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_IS_MOBILE)\n private readonly isMobile: boolean,\n @Inject(TUI_NUMBER_FORMAT)\n protected readonly numberFormat: NumberFormatSettings,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.nativeLeft || this.disabled ? null : this.nativeLeft.nativeElement;\n }\n\n get focused(): boolean {\n return this.focusedLeft || this.focusedRight;\n }\n\n get focusedLeft(): boolean {\n return !!this.nativeLeft && isNativeFocused(this.nativeLeft.nativeElement);\n }\n\n get focusedRight(): boolean {\n return !!this.nativeRight && isNativeFocused(this.nativeRight.nativeElement);\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focusedLeft && !!this.minLabel && this.value[0] === this.min;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focusedRight && !!this.maxLabel && this.value[1] === this.max;\n }\n\n get inputValueLeft(): string {\n return this.nativeLeft ? this.nativeLeft.nativeElement.value : '';\n }\n\n get inputValueRight(): string {\n return this.nativeRight ? this.nativeRight.nativeElement.value : '';\n }\n\n get computedValueLeft(): string {\n return this.formatNumber(this.value[0]);\n }\n\n get computedValueRight(): string {\n return this.formatNumber(this.value[1]);\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onMouseDown() {\n if (this.nativeRight && !this.isMobile) {\n setNativeFocused(this.nativeRight.nativeElement);\n }\n }\n\n onKeyDownArrowUpLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, false);\n }\n\n onKeyDownArrowDownLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, false);\n }\n\n onKeyDownArrowUpRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, true);\n }\n\n onKeyDownArrowDownRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, true);\n }\n\n onInputLeft() {\n const value = this.inputValueLeft;\n const capped = this.capInputValue(value, this.value[1]);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeLeft && this.inputValueLeft !== newValue) {\n this.nativeLeft.nativeElement.value = newValue;\n }\n\n this.updateValue([capped, this.value[1]]);\n }\n\n onInputRight() {\n const value = this.inputValueRight;\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeRight && this.inputValueRight !== newValue) {\n this.nativeRight.nativeElement.value = newValue;\n }\n\n if (capped >= this.value[0]) {\n this.updateValue([this.value[0], capped]);\n }\n }\n\n onRangeValue(value: [number, number]) {\n const guardedValue = value.map(item => this.valueGuard(item)) as [number, number];\n\n if (\n !this.nativeLeft ||\n !this.nativeRight ||\n (guardedValue[0] === this.value[0] && guardedValue[1] === this.value[1])\n ) {\n return;\n }\n\n if (!this.isMobile) {\n const element =\n guardedValue[0] !== this.value[0]\n ? this.nativeLeft.nativeElement\n : this.nativeRight.nativeElement;\n\n setNativeFocused(element);\n }\n\n this.updateValue(guardedValue);\n this.nativeLeft.nativeElement.value = this.formatNumber(guardedValue[0]);\n }\n\n onLeftFocused(focused: boolean) {\n if (focused || !this.nativeLeft) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueLeft,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.nativeLeft.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[0]) {\n this.updateValue([value, this.value[1]]);\n }\n }\n\n onRightFocused(focused: boolean) {\n if (focused || !this.nativeRight) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueRight,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n\n const value = isNaN(inputValue)\n ? this.value[0]\n : this.valueGuard(Math.max(inputValue, this.value[0]));\n\n this.nativeRight.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[1]) {\n this.updateValue([this.value[0], value]);\n }\n }\n\n protected getFallbackValue(): [number, number] {\n return [0, 0];\n }\n\n private formatNumber(value: number): string {\n return formatNumber(\n value,\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n\n private processStep(increment: boolean, right: boolean) {\n const start = this.valueGuard(\n increment ? this.value[0] + this.step : this.value[0] - this.step,\n );\n const end = this.valueGuard(\n increment ? this.value[1] + this.step : this.value[1] - this.step,\n );\n const value: [number, number] = [\n right ? this.value[0] : Math.min(start, this.value[1]),\n right ? Math.max(end, this.value[0]) : this.value[1],\n ];\n\n if (value[0] !== this.value[0] || value[1] !== this.value[1]) {\n this.updateValue(value);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRangeModule} from '@taiga-ui/kit/components/range';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputRangeComponent} from './input-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiActiveZoneModule,\n TuiRangeModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputRangeComponent],\n exports: [TuiInputRangeComponent],\n})\nexport class TuiInputRangeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA+BA;IAaa,sBAAsB,8BAAnC,MAAa,sBACT,SAAQ,sBAAwC;IAQhD,YAII,O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mBAAmB,CAAG;;ACrCnC;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'tslib';
|
|
|
2
2
|
import { Optional, Self, Inject, ChangeDetectorRef, Input, ViewChild, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { isNativeFocused, setNativeFocused, tuiDefaultProp, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiFocusableModule, TuiFocusedModule, TuiHoveredModule, TuiPressedModule, TuiMapperPipeModule, TuiInputModeModule } from '@taiga-ui/cdk';
|
|
5
|
-
import { maskedNumberStringToNumber, maskedMoneyValueIsEmpty, formatNumber, TuiModeDirective, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER,
|
|
5
|
+
import { maskedNumberStringToNumber, maskedMoneyValueIsEmpty, formatNumber, TuiModeDirective, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER, TUI_NUMBER_FORMAT, HINT_CONTROLLER_PROVIDER, TuiTooltipModule, TuiWrapperModule } from '@taiga-ui/core';
|
|
6
6
|
import { AbstractTuiInputSlider } from '@taiga-ui/kit/abstract';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import { TuiSliderModule } from '@taiga-ui/kit/components/slider';
|
|
@@ -11,10 +11,11 @@ import { TextMaskModule } from 'angular2-text-mask';
|
|
|
11
11
|
var TuiInputSliderComponent_1;
|
|
12
12
|
// @dynamic
|
|
13
13
|
let TuiInputSliderComponent = TuiInputSliderComponent_1 = class TuiInputSliderComponent extends AbstractTuiInputSlider {
|
|
14
|
-
constructor(control, changeDetectorRef, modeDirective, hintController) {
|
|
14
|
+
constructor(control, changeDetectorRef, modeDirective, hintController, numberFormat) {
|
|
15
15
|
super(control, changeDetectorRef);
|
|
16
16
|
this.modeDirective = modeDirective;
|
|
17
17
|
this.hintController = hintController;
|
|
18
|
+
this.numberFormat = numberFormat;
|
|
18
19
|
this.secondary = '';
|
|
19
20
|
}
|
|
20
21
|
get nativeFocusableElement() {
|
|
@@ -77,7 +78,7 @@ let TuiInputSliderComponent = TuiInputSliderComponent_1 = class TuiInputSliderCo
|
|
|
77
78
|
if (focused) {
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
|
-
const inputValue = maskedNumberStringToNumber(this.computedValue);
|
|
81
|
+
const inputValue = maskedNumberStringToNumber(this.computedValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
81
82
|
const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);
|
|
82
83
|
this.updateValue(value);
|
|
83
84
|
this.inputValue = this.formattedValue;
|
|
@@ -88,7 +89,7 @@ let TuiInputSliderComponent = TuiInputSliderComponent_1 = class TuiInputSliderCo
|
|
|
88
89
|
if (maskedMoneyValueIsEmpty(value) || capped === null) {
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
|
-
const newValue = formatNumber(capped) + postfix;
|
|
92
|
+
const newValue = this.formatNumber(capped) + postfix;
|
|
92
93
|
if (value !== newValue) {
|
|
93
94
|
this.inputValue = newValue;
|
|
94
95
|
}
|
|
@@ -102,13 +103,13 @@ let TuiInputSliderComponent = TuiInputSliderComponent_1 = class TuiInputSliderCo
|
|
|
102
103
|
return 0;
|
|
103
104
|
}
|
|
104
105
|
get formattedValue() {
|
|
105
|
-
return formatNumber(this.value);
|
|
106
|
+
return this.formatNumber(this.value);
|
|
106
107
|
}
|
|
107
108
|
get isInputValueNotFinished() {
|
|
108
109
|
if (this.inputValue === '') {
|
|
109
110
|
return true;
|
|
110
111
|
}
|
|
111
|
-
const nativeNumberValue = maskedNumberStringToNumber(this.inputValue);
|
|
112
|
+
const nativeNumberValue = maskedNumberStringToNumber(this.inputValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
112
113
|
return nativeNumberValue < 0
|
|
113
114
|
? nativeNumberValue > this.max
|
|
114
115
|
: nativeNumberValue < this.min;
|
|
@@ -119,12 +120,16 @@ let TuiInputSliderComponent = TuiInputSliderComponent_1 = class TuiInputSliderCo
|
|
|
119
120
|
this.updateValue(value);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
123
|
+
formatNumber(value) {
|
|
124
|
+
return formatNumber(value, null, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
125
|
+
}
|
|
122
126
|
};
|
|
123
127
|
TuiInputSliderComponent.ctorParameters = () => [
|
|
124
128
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
125
129
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
126
130
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] },
|
|
127
|
-
{ type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] }
|
|
131
|
+
{ type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
|
|
132
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
128
133
|
];
|
|
129
134
|
__decorate([
|
|
130
135
|
Input(),
|
|
@@ -145,7 +150,7 @@ __decorate([
|
|
|
145
150
|
TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
146
151
|
Component({
|
|
147
152
|
selector: 'tui-input-slider',
|
|
148
|
-
template: "<tui-wrapper\n appearance=\"textfield\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n>\n <span\n *ngIf=\"hasPlaceholder\"\n class=\"placeholder\"\n automation-id=\"tui-input-slider__placeholder\"\n >\n <ng-content></ng-content>\n </span>\n <input\n #focusableElement\n class=\"native\"\n automation-id=\"tui-input-slider__native\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [tuiInputMode]=\"inputMode\"\n [tuiFocusable]=\"focusable\"\n [textMask]=\"quantum | tuiMapper: mask: min\"\n [ngModel]=\"computedValue\"\n (ngModelChange)=\"onValue($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (keydown.arrowUp)=\"onKeyDownArrowUp($event)\"\n (keydown.arrowDown)=\"onKeyDownArrowDown($event)\"\n />\n <div class=\"content\">\n <span *ngIf=\"showValue\" class=\"label\">\n <span class=\"value\">{{computedValue}}</span>\n <span\n *ngIf=\"
|
|
153
|
+
template: "<tui-wrapper\n appearance=\"textfield\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n>\n <span\n *ngIf=\"hasPlaceholder\"\n class=\"placeholder\"\n automation-id=\"tui-input-slider__placeholder\"\n >\n <ng-content></ng-content>\n </span>\n <input\n #focusableElement\n class=\"native\"\n automation-id=\"tui-input-slider__native\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [tuiInputMode]=\"inputMode\"\n [tuiFocusable]=\"focusable\"\n [textMask]=\"quantum | tuiMapper: mask: min\"\n [ngModel]=\"computedValue\"\n (ngModelChange)=\"onValue($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (keydown.arrowUp)=\"onKeyDownArrowUp($event)\"\n (keydown.arrowDown)=\"onKeyDownArrowDown($event)\"\n />\n <div class=\"content\">\n <span *ngIf=\"showValue\" class=\"label\">\n <span class=\"value\">{{computedValue}}</span>\n <span\n *ngIf=\"pluralizeMap\"\n automation-id=\"tui-input-slider__pluralize\"\n >\n {{value | i18nPlural: pluralizeMap}}\n </span>\n </span>\n <span\n *ngIf=\"showMinLabel\"\n class=\"label\"\n automation-id=\"tui-input-slider__min-label\"\n >\n {{minLabel}}\n </span>\n <span\n *ngIf=\"showMaxLabel\"\n class=\"label\"\n automation-id=\"tui-input-slider__max-label\"\n >\n {{maxLabel}}\n </span>\n <span class=\"secondary\" automation-id=\"tui-input-slider__secondary\">\n {{secondary}}\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-input-slider__tooltip\"\n class=\"tooltip\"\n describeId=\"placeholer_until_accesibility_is_added\"\n [content]=\"hintController.content\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n (mousedown.prevent)=\"onMouseDown()\"\n ></tui-tooltip>\n </span>\n </div>\n</tui-wrapper>\n<tui-slider\n class=\"slider\"\n [min]=\"min\"\n [max]=\"max\"\n [steps]=\"computedSteps\"\n [segments]=\"segments\"\n [keySteps]=\"keySteps\"\n [pluralize]=\"segmentsPluralize\"\n [focusable]=\"false\"\n [disabled]=\"readOnly || disabled\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onSliderValue($event)\"\n (mousedown)=\"onMouseDown()\"\n></tui-slider>\n",
|
|
149
154
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
150
155
|
providers: [
|
|
151
156
|
{
|
|
@@ -154,7 +159,7 @@ TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
|
154
159
|
},
|
|
155
160
|
HINT_CONTROLLER_PROVIDER,
|
|
156
161
|
],
|
|
157
|
-
styles: [":host{font:var(--tui-font-text-m);position:relative;z-index:0;display:block;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host._segmented{border-bottom:26px solid transparent}.native{position:absolute;top:0;left:0;height:100%;padding:0 1rem;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;width:100%;color:var(--tui-text-01);box-sizing:border-box;outline:0}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-webkit-autofill:hover{border-radius:inherit;-webkit-text-fill-color:
|
|
162
|
+
styles: [":host{font:var(--tui-font-text-m);position:relative;z-index:0;display:block;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host._segmented{border-bottom:26px solid transparent}.native{position:absolute;top:0;left:0;height:100%;padding:0 1rem;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;width:100%;color:var(--tui-text-01);box-sizing:border-box;outline:0}.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{color:var(--tui-text-03);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host._max-label .native,:host._min-label .native{opacity:0}:host[data-tui-host-size='l'] .native{padding:1.25rem 1rem 0}:host[data-mode=onDark] .native{color:var(--tui-text-01-night)}:host[data-mode=onDark]._disabled .native{color:var(--tui-text-03-night)}.content{display:flex;align-items:center;height:var(--tui-height-m);padding:0 1rem;justify-content:space-between}:host[data-tui-host-size='l'] .content{height:var(--tui-height-l);padding:0 1rem}.placeholder{transition-property:transform,min-width,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;font-size:.8125rem;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;color:var(--tui-text-02);transform-origin:left;letter-spacing:normal;text-transform:none;position:absolute;top:0;width:100%;height:100%;left:1rem;transform:translateY(-.625rem) scale(.87);line-height:var(--tui-height-l);max-width:calc(114% - 2rem)}.placeholder_raised{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m'] .placeholder_raised{width:118%;transform:translateY(-.5rem) scale(.85);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}:host._has-tooltip .placeholder{max-width:calc(114% - 3.75rem)}.value{visibility:hidden}.label{line-height:.9375rem;overflow:hidden;text-overflow:ellipsis}:host[data-tui-host-size='l'] .label{padding-top:1.25rem}.secondary{color:var(--tui-text-01)}:host._disabled .secondary{color:var(--tui-text-03)}:host[data-mode=onDark]._disabled .secondary{color:var(--tui-text-03-night)}.tooltip{margin-left:.75rem}.slider{position:absolute;top:100%;left:0;right:0;border-top-left-radius:0;border-top-right-radius:0;margin:-.5625rem 0 0;color:transparent}:host._disabled .slider,:host._readonly .slider{pointer-events:none}"]
|
|
158
163
|
}),
|
|
159
164
|
__param(0, Optional()),
|
|
160
165
|
__param(0, Self()),
|
|
@@ -162,7 +167,8 @@ TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
|
162
167
|
__param(1, Inject(ChangeDetectorRef)),
|
|
163
168
|
__param(2, Optional()),
|
|
164
169
|
__param(2, Inject(TuiModeDirective)),
|
|
165
|
-
__param(3, Inject(TUI_HINT_WATCHED_CONTROLLER))
|
|
170
|
+
__param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
|
|
171
|
+
__param(4, Inject(TUI_NUMBER_FORMAT))
|
|
166
172
|
], TuiInputSliderComponent);
|
|
167
173
|
|
|
168
174
|
let TuiInputSliderModule = class TuiInputSliderModule {
|
|
@@ -180,7 +186,6 @@ TuiInputSliderModule = __decorate([
|
|
|
180
186
|
TuiPressedModule,
|
|
181
187
|
TuiMapperPipeModule,
|
|
182
188
|
TuiInputModeModule,
|
|
183
|
-
TuiPluralizePipeModule,
|
|
184
189
|
TuiTooltipModule,
|
|
185
190
|
TuiSliderModule,
|
|
186
191
|
TuiWrapperModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-slider.js","sources":["ng://@taiga-ui/kit/components/input-slider/input-slider.component.ts","ng://@taiga-ui/kit/components/input-slider/input-slider.module.ts","ng://@taiga-ui/kit/components/input-slider/taiga-ui-kit-components-input-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n HINT_CONTROLLER_PROVIDER,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-slider',\n templateUrl: './input-slider.template.html',\n styleUrls: ['./input-slider.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputSliderComponent),\n },\n HINT_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiInputSliderComponent\n extends AbstractTuiInputSlider<number>\n implements TuiFocusableElementAccessor {\n @Input()\n @tuiDefaultProp()\n secondary = '';\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.focusableElement || this.computedDisabled\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focused && this.value === this.min && !!this.minLabel;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focused && this.value === this.max && !!this.maxLabel;\n }\n\n get computedValue(): string {\n if (this.focused && this.isInputValueNotFinished) {\n return this.inputValue;\n }\n\n return this.formattedValue;\n }\n\n get showValue(): boolean {\n return !this.showMinLabel && !this.showMaxLabel;\n }\n\n get inputValue(): string {\n return this.focusableElement ? this.focusableElement.nativeElement.value : '';\n }\n\n set inputValue(value: string) {\n if (this.focusableElement) {\n this.focusableElement.nativeElement.value = value;\n }\n }\n\n onMouseDown() {\n if (this.focusableElement) {\n setNativeFocused(this.focusableElement.nativeElement);\n }\n }\n\n onKeyDownArrowUp(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true);\n this.inputValue = this.formattedValue;\n }\n\n onKeyDownArrowDown(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false);\n this.inputValue = this.formattedValue;\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n\n if (focused) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(this.computedValue);\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.updateValue(value);\n this.inputValue = this.formattedValue;\n }\n\n onValue(value: string) {\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = formatNumber(capped) + postfix;\n\n if (value !== newValue) {\n this.inputValue = newValue;\n }\n\n this.updateValue(capped);\n }\n\n onSliderValue(value: number) {\n this.updateValue(this.valueGuard(value));\n this.inputValue = this.formattedValue;\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private get formattedValue(): string {\n return formatNumber(this.value);\n }\n\n private get isInputValueNotFinished(): boolean {\n if (this.inputValue === '') {\n return true;\n }\n\n const nativeNumberValue = maskedNumberStringToNumber(this.inputValue);\n\n return nativeNumberValue < 0\n ? nativeNumberValue > this.max\n : nativeNumberValue < this.min;\n }\n\n private processStep(increment: boolean) {\n const value = this.valueGuard(\n increment ? this.value + this.step : this.value - this.step,\n );\n\n if (value !== this.value) {\n this.updateValue(value);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiPluralizePipeModule, TuiTooltipModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiSliderModule} from '@taiga-ui/kit/components/slider';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputSliderComponent} from './input-slider.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiPluralizePipeModule,\n TuiTooltipModule,\n TuiSliderModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputSliderComponent],\n exports: [TuiInputSliderComponent],\n})\nexport class TuiInputSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAiCA;IAca,uBAAuB,+BAApC,MAAa,uBACT,SAAQ,sBAA8B;IAStC,YAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAEhD,cAA0C;QAEnD,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAJf,kBAAa,GAAb,aAAa,CAAyB;QAEhD,mBAAc,GAAd,cAAc,CAA4B;QAfvD,cAAS,GAAG,EAAE,CAAC;KAkBd;IAED,IAAI,sBAAsB;QACtB,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;cAChD,IAAI;cACJ,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;KAC7C;IAED,IAAI,OAAO;QACP,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KACvD;IAGD,IAAI,UAAU;QACV,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC1D;IAGD,IAAI,YAAY;QACZ,OAAO,CA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eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,2BAA2B;gBACpC,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAuB,CAAC;aACzD;YACD,wBAAwB;SAC3B;;KACJ,CAAC;IAYO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAExB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GAnB/B,uBAAuB,CAmKnC;;IC7KY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IApBhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,cAAc;YACd,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;YACnB,kBAAkB;YAClB,sBAAsB;YACtB,gBAAgB;YAChB,eAAe;YACf,gBAAgB;SACnB;QACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACrCpC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-slider.js","sources":["ng://@taiga-ui/kit/components/input-slider/input-slider.component.ts","ng://@taiga-ui/kit/components/input-slider/input-slider.module.ts","ng://@taiga-ui/kit/components/input-slider/taiga-ui-kit-components-input-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n HINT_CONTROLLER_PROVIDER,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n NumberFormatSettings,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_NUMBER_FORMAT,\n TuiHintControllerDirective,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-slider',\n templateUrl: './input-slider.template.html',\n styleUrls: ['./input-slider.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputSliderComponent),\n },\n HINT_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiInputSliderComponent\n extends AbstractTuiInputSlider<number>\n implements TuiFocusableElementAccessor {\n @Input()\n @tuiDefaultProp()\n secondary = '';\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_NUMBER_FORMAT)\n protected readonly numberFormat: NumberFormatSettings,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.focusableElement || this.computedDisabled\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focused && this.value === this.min && !!this.minLabel;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focused && this.value === this.max && !!this.maxLabel;\n }\n\n get computedValue(): string {\n if (this.focused && this.isInputValueNotFinished) {\n return this.inputValue;\n }\n\n return this.formattedValue;\n }\n\n get showValue(): boolean {\n return !this.showMinLabel && !this.showMaxLabel;\n }\n\n get inputValue(): string {\n return this.focusableElement ? this.focusableElement.nativeElement.value : '';\n }\n\n set inputValue(value: string) {\n if (this.focusableElement) {\n this.focusableElement.nativeElement.value = value;\n }\n }\n\n onMouseDown() {\n if (this.focusableElement) {\n setNativeFocused(this.focusableElement.nativeElement);\n }\n }\n\n onKeyDownArrowUp(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true);\n this.inputValue = this.formattedValue;\n }\n\n onKeyDownArrowDown(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false);\n this.inputValue = this.formattedValue;\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n\n if (focused) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.updateValue(value);\n this.inputValue = this.formattedValue;\n }\n\n onValue(value: string) {\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (value !== newValue) {\n this.inputValue = newValue;\n }\n\n this.updateValue(capped);\n }\n\n onSliderValue(value: number) {\n this.updateValue(this.valueGuard(value));\n this.inputValue = this.formattedValue;\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private get formattedValue(): string {\n return this.formatNumber(this.value);\n }\n\n private get isInputValueNotFinished(): boolean {\n if (this.inputValue === '') {\n return true;\n }\n\n const nativeNumberValue = maskedNumberStringToNumber(\n this.inputValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n\n return nativeNumberValue < 0\n ? nativeNumberValue > this.max\n : nativeNumberValue < this.min;\n }\n\n private processStep(increment: boolean) {\n const value = this.valueGuard(\n increment ? this.value + this.step : this.value - this.step,\n );\n\n if (value !== this.value) {\n this.updateValue(value);\n }\n }\n\n private formatNumber(value: number): string {\n return formatNumber(\n value,\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiTooltipModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiSliderModule} from '@taiga-ui/kit/components/slider';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputSliderComponent} from './input-slider.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiTooltipModule,\n TuiSliderModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputSliderComponent],\n exports: [TuiInputSliderComponent],\n})\nexport class TuiInputSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmCA;IAca,uBAAuB,+BAApC,MAAa,uBACT,SAAQ,sBAA8B;IAStC,YAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAEhD,cAA0C,EAEhC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C,iBAAiB,CAAC,CAAA;IACzB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAExB,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;IAEnC,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GArBrB,uBAAuB,CAsLnC;;ICnMY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAnBhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,cAAc;YACd,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,gBAAgB;YAChB,mBAAmB;YACnB,kBAAkB;YAClB,gBAAgB;YAChB,eAAe;YACf,gBAAgB;SACnB;QACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACpCpC;;;;;;"}
|
|
@@ -60,7 +60,8 @@ let TuiInputTagComponent = TuiInputTagComponent_1 = class TuiInputTagComponent e
|
|
|
60
60
|
return this.controller.size;
|
|
61
61
|
}
|
|
62
62
|
get labelOutside() {
|
|
63
|
-
|
|
63
|
+
const { size, labelOutside } = this.controller;
|
|
64
|
+
return size === 's' || labelOutside;
|
|
64
65
|
}
|
|
65
66
|
get hasCleaner() {
|
|
66
67
|
return (this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly);
|
|
@@ -124,6 +125,7 @@ let TuiInputTagComponent = TuiInputTagComponent_1 = class TuiInputTagComponent e
|
|
|
124
125
|
const actualTarget = getActualTarget(event);
|
|
125
126
|
if (!this.focusableElement ||
|
|
126
127
|
actualTarget === this.focusableElement.nativeElement ||
|
|
128
|
+
// TODO: iframe warning
|
|
127
129
|
!(event.target instanceof Element) ||
|
|
128
130
|
(this.cleanerSvg && this.cleanerSvg.nativeElement.contains(event.target)) ||
|
|
129
131
|
(this.tagsContainer &&
|
|
@@ -367,7 +369,7 @@ TuiInputTagComponent = TuiInputTagComponent_1 = __decorate([
|
|
|
367
369
|
Component({
|
|
368
370
|
selector: 'tui-input-tag',
|
|
369
371
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
370
|
-
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"canOpen\"\n [content]=\"datalist || ''\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-wrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"content\">\n <div *ngIf=\"iconAlignLeft\" class=\"icons icons_left\">\n <tui-svg class=\"icon\" [src]=\"icon\"></tui-svg>\n </div>\n <div class=\"wrapper\">\n <div class=\"absolute-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-input-tag__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"hasExampleText\"\n automation-id=\"tui-input-tag__example-text\"\n class=\"value-decoration\"\n >\n <span class=\"example-text-inner\">\n {{controller.exampleText}}\n </span>\n </div>\n </div>\n <tui-scrollbar\n *ngIf=\"!expandable; else items\"\n class=\"scrollbar\"\n [hidden]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"items\"></ng-container>\n </tui-scrollbar>\n <ng-template #items>\n <div #tagsContainer class=\"tags\">\n <ng-container
|
|
372
|
+
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"canOpen\"\n [content]=\"datalist || ''\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-wrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"content\">\n <div *ngIf=\"iconAlignLeft\" class=\"icons icons_left\">\n <tui-svg class=\"icon\" [src]=\"icon\"></tui-svg>\n </div>\n <div class=\"wrapper\">\n <div class=\"absolute-wrapper\">\n <div\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-input-tag__placeholder\"\n class=\"placeholder\"\n [class.placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"hasExampleText\"\n automation-id=\"tui-input-tag__example-text\"\n class=\"value-decoration\"\n >\n <span class=\"example-text-inner\">\n {{controller.exampleText}}\n </span>\n </div>\n </div>\n <tui-scrollbar\n *ngIf=\"!expandable; else items\"\n class=\"scrollbar\"\n [hidden]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"items\"></ng-container>\n </tui-scrollbar>\n <ng-template #items>\n <div #tagsContainer class=\"tags\">\n <ng-container *ngIf=\"labelOutside; else text\">\n <tui-tag\n *ngFor=\"let item of value; index as index\"\n #tag\n class=\"tag\"\n automation-id=\"tui-input-tag__tag\"\n [status]=\"status\"\n [leftContent]=\"getLeftContent(item)\"\n [allowSpaces]=\"allowSpaces\"\n [tuiFocusable]=\"false\"\n [disabled]=\"computedDisabled || disabledItemHandler(item)\"\n [editable]=\"editable && !readOnly\"\n [hoverable]=\"!readOnly\"\n [removable]=\"!readOnly\"\n [maxLength]=\"controller.maxLength\"\n [size]=\"controller.size\"\n [value]=\"item.toString()\"\n (edited)=\"onTagEdited($event, item)\"\n (keydown.arrowLeft.prevent)=\"onTagKeyDownArrowLeft(index)\"\n (keydown.arrowRight.prevent)=\"onTagKeyDownArrowRight(index)\"\n ></tui-tag>\n </ng-container>\n <ng-template #text>\n <span\n *ngFor=\"let item of value\"\n class=\"text\"\n [class.text_disabled]=\"disabledItemHandler(item)\"\n [class.text_error]=\"!tagValidator(item)\"\n >{{item}}</span\n >\n </ng-template>\n <div\n class=\"input-wrapper\"\n [class.input-wrapper_collapsed]=\"computedDisabled || readOnly || inputHidden\"\n >\n <div class=\"ghost\">{{search}}</div>\n <input\n #focusableElement\n type=\"text\"\n automation-id=\"tui-input-tag__native\"\n class=\"native\"\n [class.native_hidden]=\"inputHidden\"\n [attr.maxLength]=\"controller.maxLength\"\n [id]=\"id\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly || inputHidden\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"search\"\n (ngModelChange)=\"onInput($event)\"\n (keydown.arrowLeft)=\"onFieldKeyDownArrowLeft($event)\"\n (keydown.backspace)=\"onFieldKeyDownBackspace($event)\"\n (keydown.enter.prevent)=\"onFieldKeyDownEnter()\"\n />\n </div>\n </div>\n </ng-template>\n </div>\n <div *ngIf=\"hasRightIcons\" class=\"icons icons_right\">\n <tui-svg\n *ngIf=\"hasCleaner\"\n #cleaner\n class=\"cleaner\"\n automation-id=\"tui-input-tag__cleaner\"\n src=\"tuiIconCloseLarge\"\n (click.stop)=\"onCleanerClick()\"\n ></tui-svg>\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-input-tag__tooltip\"\n class=\"tooltip\"\n describeId=\"placeholer_until_accesibility_is_added\"\n [direction]=\"hintController.direction\"\n [mode]=\"hintController.mode\"\n [content]=\"hintController.content\"\n [showDelay]=\"hintController.showDelay\"\n [hideDelay]=\"hintController.hideDelay\"\n ></tui-tooltip>\n <tui-svg\n *ngIf=\"iconAlignRight\"\n class=\"icon\"\n [src]=\"icon\"\n ></tui-svg>\n </div>\n </div>\n <ng-template #errorIcon>\n <tui-svg class=\"error-icon\" src=\"tuiIconAttention\"></tui-svg>\n </ng-template>\n </tui-wrapper>\n</tui-hosted-dropdown>\n",
|
|
371
373
|
providers: [
|
|
372
374
|
{
|
|
373
375
|
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
@@ -381,7 +383,7 @@ TuiInputTagComponent = TuiInputTagComponent_1 = __decorate([
|
|
|
381
383
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
382
384
|
HINT_CONTROLLER_PROVIDER,
|
|
383
385
|
],
|
|
384
|
-
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m)}:host[data-tui-host-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-tui-host-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-tui-host-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);
|
|
386
|
+
styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m)}:host[data-tui-host-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-tui-host-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-tui-host-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);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%;padding:0;border:solid transparent;border-width:0 .75rem;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-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[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}:host[data-tui-host-size='s'] .input{border-width:0 5rem 0 .75rem}:host[data-tui-host-size='l'] .input{border-width:0 1rem}:host._disabled .input{pointer-events:none}:host._right-aligned .input{text-align:right}:host[data-tui-host-size='l']:not(._label-outside) .input{padding-top:1.25rem}:host[data-tui-host-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m']:not(._label-outside) .input{padding-top:1.125rem}:host[data-tui-host-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:118%;transform:translateY(-.5rem) scale(.85)}.ghost{visibility:hidden;white-space:pre;text-overflow:clip}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-tui-host-size='l'] .content{padding-left:1rem}.wrapper{flex:1;min-width:0}.value-decoration{display:flex;align-items:center;height:1.25rem;margin:-1.25rem 0;padding:.625rem 0;box-sizing:content-box;color:var(--tui-text-03);letter-spacing:normal;text-transform:none}:host._right-aligned .value-decoration{flex-direction:row-reverse;margin-right:-.25rem}:host[data-tui-host-size='m']._label-outside .value-decoration{margin-top:-1.1875rem}:host[data-mode=onDark] .value-decoration{color:var(--tui-text-03-night)}.value-decoration-inner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.postfix{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-text-01)}.postfix_shifted{margin-left:.5ch}:host[data-mode=onDark] .postfix{color:var(--tui-text-01-night)}.placeholder{transition-property:transform,min-width,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;height:1.25rem;font-size:.8125rem;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;color:var(--tui-text-02);transform-origin:left;letter-spacing:normal;text-transform:none}.placeholder_raised{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m'] .placeholder_raised{width:118%;transform:translateY(-.5rem) scale(.85);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}.icon_left{margin:0 .5rem 0 -.25rem}:host[data-tui-host-size='s'] .icon_left{margin-right:.25rem}:host{cursor:text}:host._expandable{height:auto;max-height:none}:host._disabled{pointer-events:none}:host._readonly{cursor:default}.hosted{display:block;border-radius:inherit}.scrollbar{margin:0 -.25rem;padding:0 .25rem}.tags{display:flex;align-items:center;box-sizing:border-box}:host._expandable .tags{flex-wrap:wrap;white-space:normal}:host._readonly .tags{pointer-events:none}:host[data-tui-host-size='s'] .tags{min-height:var(--tui-height-s);padding:.25rem .25rem .25rem 0}:host[data-tui-host-size='m'] .tags{min-height:var(--tui-height-m);padding:.5rem .25rem .5rem 0}:host[data-tui-host-size='l'] .tags{min-height:var(--tui-height-l);padding:.625rem .25rem .625rem 0}:host[data-tui-host-size='m']:not(._label-outside) .tags{padding:1.1875rem 1rem 0 0}:host[data-tui-host-size='l']:not(._label-outside) .tags{padding:1.6875rem 1rem .5625rem 0}.content{padding:0;align-items:flex-start}:host[data-tui-host-size='m'] .content,:host[data-tui-host-size='s'] .content{padding-left:.75rem}:host[data-tui-host-size='s'] .content{padding-right:0}.icons{display:flex;align-items:center;padding:0 .75rem}.icons_left{padding:0;margin-right:.5rem;margin-left:-.25rem}:host._expandable .icons_right{margin-left:-.625rem}:host[data-tui-host-size='s'] .icons{height:var(--tui-height-s)}:host[data-tui-host-size='m'] .icons{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .icons{height:var(--tui-height-l)}.absolute-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}:host[data-tui-host-size='m'] .absolute-wrapper{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .absolute-wrapper{height:var(--tui-height-l)}.wrapper{position:relative;padding:0}.tag{margin:.125rem .5rem .125rem -.25rem;max-width:100%;flex-shrink:0}.text:after{content:',\\00a0'}.text_disabled{color:var(--tui-text-03)}.text_error{color:var(--tui-negative)}:host:not(._expandable) .text{white-space:nowrap}:host:not(:focus-within) .text:last-of-type:after{content:''}.input-wrapper{position:relative;flex:1;max-width:100%}.input-wrapper_collapsed{flex:0;margin-left:-.5rem}:host[data-tui-host-size='s'] .input-wrapper{min-height:1.5rem}:host[data-tui-host-size='m'] .input-wrapper{min-height:calc(var(--tui-height-xs) + 2 * .125rem)}:host[data-tui-host-size='l'] .input-wrapper{min-height:calc(var(--tui-height-s) + 2 * .125rem)}:host:not(._label-outside) .input-wrapper{min-height:1.25rem}.ghost{min-width:.125rem}:host:not(._expandable) .ghost{min-width:2rem}.native{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%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding:0;cursor:inherit}.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}.native_hidden{opacity:0;text-indent:-10em}.error-icon{display:block;color:var(--tui-error-fill);width:1rem;height:1rem}"]
|
|
385
387
|
}),
|
|
386
388
|
__param(0, Optional()),
|
|
387
389
|
__param(0, Self()),
|