@taiga-ui/kit 2.31.0 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +2 -2
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js +44 -8
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +2 -2
- 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-calendar-month.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +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-combo-box.umd.js +128 -48
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +17 -11
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.js +10 -15
- package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +47 -17
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +43 -5
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
- 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 +69 -25
- 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 +70 -26
- 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 +65 -25
- 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-inline.umd.js +2 -15
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +106 -34
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-month-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +94 -24
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +50 -4
- 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-password.umd.js +49 -3
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +14 -5
- 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 +1 -1
- 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 +64 -22
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +8 -5
- 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 +8 -5
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +53 -17
- 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 +19 -7
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +32 -3
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +24 -14
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +67 -19
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +140 -73
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +7 -2
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +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 -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-rating.umd.js +5 -0
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +107 -36
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +155 -27
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +1 -1
- 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 +11 -5
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +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 +6 -4
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +7 -2
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +8 -0
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +421 -0
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes.umd.js +12 -4
- package/bundles/taiga-ui-kit-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-providers.umd.js +31 -13
- package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +242 -4
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js +15 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +17 -8
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.min.js.map +1 -1
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/arrow/arrow-options.d.ts +18 -0
- package/components/arrow/arrow.component.d.ts +5 -3
- package/components/arrow/index.d.ts +1 -0
- package/components/arrow/taiga-ui-kit-components-arrow.metadata.json +1 -1
- package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
- package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
- package/components/badged-content/taiga-ui-kit-components-badged-content.metadata.json +1 -1
- package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/carousel/carousel-buttons.directive.d.ts +2 -2
- package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -1
- package/components/checkbox/checkbox.component.d.ts +2 -2
- package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
- package/components/checkbox-block/taiga-ui-kit-components-checkbox-block.metadata.json +1 -1
- package/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.metadata.json +1 -1
- package/components/combo-box/combo-box-strict.directive.d.ts +7 -0
- package/components/combo-box/combo-box.component.d.ts +11 -7
- package/components/combo-box/combo-box.directive.d.ts +6 -0
- package/components/combo-box/combo-box.providers.d.ts +2 -0
- package/components/combo-box/index.d.ts +3 -0
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +5 -3
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/field-error/field-error.component.d.ts +1 -2
- package/components/field-error/field-error.module.d.ts +3 -0
- package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
- package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
- package/components/input/index.d.ts +1 -0
- package/components/input/input.directive.d.ts +5 -0
- package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
- package/components/input-copy/index.d.ts +2 -0
- package/components/input-copy/input-copy.directive.d.ts +5 -0
- package/components/input-copy/input-copy.providers.d.ts +2 -0
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/index.d.ts +1 -0
- package/components/input-count/input-count-options.d.ts +10 -4
- package/components/input-count/input-count.component.d.ts +3 -3
- package/components/input-count/input-count.directive.d.ts +6 -0
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/index.d.ts +2 -0
- package/components/input-date/input-date.component.d.ts +0 -1
- package/components/input-date/input-date.directive.d.ts +7 -0
- package/components/input-date/input-date.providers.d.ts +4 -0
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/index.d.ts +2 -0
- package/components/input-date-range/input-date-range.component.d.ts +0 -1
- package/components/input-date-range/input-date-range.directive.d.ts +7 -0
- package/components/input-date-range/input-date-range.providers.d.ts +4 -0
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/index.d.ts +2 -0
- package/components/input-date-time/input-date-time.component.d.ts +0 -1
- package/components/input-date-time/input-date-time.directive.d.ts +7 -0
- package/components/input-date-time/input-date-time.providers.d.ts +4 -0
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-inline/input-inline.component.d.ts +0 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-month/index.d.ts +2 -0
- package/components/input-month/input-month.component.d.ts +4 -2
- package/components/input-month/input-month.directive.d.ts +14 -0
- package/components/input-month/input-month.providers.d.ts +2 -0
- package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
- package/components/input-month-range/index.d.ts +2 -0
- package/components/input-month-range/input-month-range.component.d.ts +4 -5
- package/components/input-month-range/input-month-range.directive.d.ts +14 -0
- package/components/input-month-range/input-month-range.providers.d.ts +2 -0
- package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
- package/components/input-number/index.d.ts +1 -0
- package/components/input-number/input-number.component.d.ts +1 -1
- package/components/input-number/input-number.directive.d.ts +10 -0
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/index.d.ts +1 -0
- package/components/input-password/input-password-options.d.ts +10 -4
- package/components/input-password/input-password.component.d.ts +3 -3
- package/components/input-password/input-password.directive.d.ts +8 -0
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/index.d.ts +1 -0
- package/components/input-phone/input-phone.component.d.ts +1 -1
- package/components/input-phone/input-phone.directive.d.ts +10 -0
- 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 +2 -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 +2 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +2 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/index.d.ts +1 -0
- package/components/input-tag/input-tag-options.d.ts +7 -0
- package/components/input-tag/input-tag.component.d.ts +9 -4
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/input-time-options.d.ts +13 -4
- package/components/input-time/input-time.component.d.ts +9 -9
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/line-clamp.component.d.ts +7 -3
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/marker-icon/taiga-ui-kit-components-marker-icon.metadata.json +1 -1
- package/components/multi-select/hide-selected.pipe.d.ts +1 -1
- package/components/multi-select/index.d.ts +1 -0
- package/components/multi-select/multi-select-options.d.ts +10 -0
- package/components/multi-select/multi-select.component.d.ts +17 -8
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/progress/index.d.ts +4 -3
- package/components/progress/progress-bar/progress-color-segments.directive.d.ts +11 -0
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
- package/components/progress/{pipes → utils}/abstract-color-segments.d.ts +0 -0
- package/components/progress/utils/calculate-color-segments.d.ts +5 -0
- package/components/progress/{pipes → utils}/progress-color-segments-async.pipe.d.ts +5 -0
- package/components/progress/utils/progress-color-segments.pipe.d.ts +9 -0
- package/components/radio/radio-options.d.ts +10 -4
- package/components/radio/radio.component.d.ts +2 -2
- package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
- package/components/radio-block/taiga-ui-kit-components-radio-block.metadata.json +1 -1
- package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
- package/components/radio-list/taiga-ui-kit-components-radio-list.metadata.json +1 -1
- package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
- package/components/rating/rating-options.d.ts +2 -1
- package/components/rating/taiga-ui-kit-components-rating.metadata.json +1 -1
- package/components/select/index.d.ts +3 -0
- package/components/select/select-options.d.ts +9 -0
- package/components/select/select.component.d.ts +11 -5
- package/components/select/select.directive.d.ts +7 -0
- package/components/select/select.providers.d.ts +2 -0
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/slider/index.d.ts +1 -0
- package/components/slider/slider-old.component.d.ts +19 -0
- package/components/slider/slider.component.d.ts +15 -13
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/tag.component.d.ts +1 -0
- package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/toggle/toggle-options.d.ts +10 -4
- package/components/toggle/toggle.component.d.ts +3 -3
- package/constants/index.d.ts +1 -0
- package/constants/max-time-values.d.ts +2 -0
- package/constants/taiga-ui-kit-constants.metadata.json +1 -1
- package/directives/lazy-loading/index.d.ts +1 -0
- package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.d.ts +0 -1
- package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +2 -2
- package/esm2015/abstract/slider/slider.js +2 -2
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +3 -3
- package/esm2015/components/accordion/accordion.component.js +3 -3
- package/esm2015/components/arrow/arrow-options.js +28 -0
- package/esm2015/components/arrow/arrow.component.js +12 -8
- package/esm2015/components/arrow/arrow.module.js +3 -2
- package/esm2015/components/arrow/index.js +2 -1
- package/esm2015/components/avatar/avatar.component.js +3 -3
- package/esm2015/components/badge/badge.component.js +3 -3
- package/esm2015/components/badged-content/badged-content.component.js +3 -3
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +3 -3
- package/esm2015/components/calendar-month/calendar-month.component.js +3 -3
- package/esm2015/components/carousel/carousel-buttons.directive.js +1 -1
- package/esm2015/components/carousel/carousel.component.js +1 -1
- package/esm2015/components/checkbox/checkbox.component.js +3 -3
- package/esm2015/components/checkbox-block/checkbox-block.component.js +3 -3
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +3 -3
- package/esm2015/components/combo-box/combo-box-strict.directive.js +31 -0
- package/esm2015/components/combo-box/combo-box.component.js +40 -51
- package/esm2015/components/combo-box/combo-box.directive.js +25 -0
- package/esm2015/components/combo-box/combo-box.module.js +15 -4
- package/esm2015/components/combo-box/combo-box.providers.js +28 -0
- package/esm2015/components/combo-box/index.js +4 -1
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +17 -11
- package/esm2015/components/field-error/field-error.component.js +8 -12
- package/esm2015/components/field-error/field-error.module.js +6 -2
- package/esm2015/components/filter/filter.component.js +3 -3
- package/esm2015/components/input/index.js +2 -1
- package/esm2015/components/input/input.component.js +2 -2
- package/esm2015/components/input/input.directive.js +22 -0
- package/esm2015/components/input/input.module.js +5 -4
- package/esm2015/components/input/input.providers.js +6 -2
- package/esm2015/components/input-copy/index.js +3 -1
- package/esm2015/components/input-copy/input-copy.component.js +8 -15
- package/esm2015/components/input-copy/input-copy.directive.js +22 -0
- package/esm2015/components/input-copy/input-copy.module.js +5 -4
- package/esm2015/components/input-copy/input-copy.providers.js +16 -0
- package/esm2015/components/input-count/index.js +2 -1
- package/esm2015/components/input-count/input-count-options.js +5 -1
- package/esm2015/components/input-count/input-count.component.js +8 -4
- package/esm2015/components/input-count/input-count.directive.js +26 -0
- package/esm2015/components/input-count/input-count.module.js +5 -4
- package/esm2015/components/input-date/index.js +3 -1
- package/esm2015/components/input-date/input-date.component.js +9 -27
- package/esm2015/components/input-date/input-date.directive.js +28 -0
- package/esm2015/components/input-date/input-date.module.js +5 -4
- package/esm2015/components/input-date/input-date.providers.js +29 -0
- package/esm2015/components/input-date-range/index.js +3 -1
- package/esm2015/components/input-date-range/input-date-range.component.js +9 -27
- package/esm2015/components/input-date-range/input-date-range.directive.js +28 -0
- package/esm2015/components/input-date-range/input-date-range.module.js +9 -4
- package/esm2015/components/input-date-range/input-date-range.providers.js +29 -0
- package/esm2015/components/input-date-time/index.js +3 -1
- package/esm2015/components/input-date-time/input-date-time.component.js +10 -28
- package/esm2015/components/input-date-time/input-date-time.directive.js +28 -0
- package/esm2015/components/input-date-time/input-date-time.module.js +9 -4
- package/esm2015/components/input-date-time/input-date-time.providers.js +29 -0
- package/esm2015/components/input-inline/input-inline.component.js +4 -13
- package/esm2015/components/input-month/index.js +3 -1
- package/esm2015/components/input-month/input-month.component.js +19 -21
- package/esm2015/components/input-month/input-month.directive.js +55 -0
- package/esm2015/components/input-month/input-month.module.js +7 -6
- package/esm2015/components/input-month/input-month.providers.js +19 -0
- package/esm2015/components/input-month-range/index.js +3 -1
- package/esm2015/components/input-month-range/input-month-range.component.js +21 -33
- package/esm2015/components/input-month-range/input-month-range.directive.js +60 -0
- package/esm2015/components/input-month-range/input-month-range.module.js +11 -5
- package/esm2015/components/input-month-range/input-month-range.providers.js +19 -0
- package/esm2015/components/input-number/index.js +2 -1
- package/esm2015/components/input-number/input-number.component.js +8 -4
- package/esm2015/components/input-number/input-number.directive.js +35 -0
- package/esm2015/components/input-number/input-number.module.js +5 -4
- package/esm2015/components/input-password/index.js +2 -1
- package/esm2015/components/input-password/input-password-options.js +5 -1
- package/esm2015/components/input-password/input-password.component.js +7 -3
- package/esm2015/components/input-password/input-password.directive.js +30 -0
- package/esm2015/components/input-password/input-password.module.js +9 -4
- package/esm2015/components/input-phone/index.js +2 -1
- package/esm2015/components/input-phone/input-phone.component.js +13 -24
- package/esm2015/components/input-phone/input-phone.directive.js +35 -0
- package/esm2015/components/input-phone/input-phone.module.js +5 -4
- package/esm2015/components/input-phone/input-phone.providers.js +17 -3
- package/esm2015/components/input-phone-international/input-phone-international.component.js +11 -6
- package/esm2015/components/input-range/input-range.component.js +10 -7
- package/esm2015/components/input-slider/input-slider.component.js +10 -7
- package/esm2015/components/input-tag/index.js +2 -1
- package/esm2015/components/input-tag/input-tag-options.js +9 -0
- package/esm2015/components/input-tag/input-tag.component.js +40 -17
- package/esm2015/components/input-time/input-time-options.js +8 -1
- package/esm2015/components/input-time/input-time.component.js +10 -5
- package/esm2015/components/line-clamp/line-clamp.component.js +25 -15
- package/esm2015/components/marker-icon/marker-icon.component.js +3 -3
- package/esm2015/components/multi-select/hide-selected.pipe.js +4 -3
- package/esm2015/components/multi-select/index.js +2 -1
- package/esm2015/components/multi-select/multi-select-options.js +13 -0
- package/esm2015/components/multi-select/multi-select.component.js +42 -15
- package/esm2015/components/multi-select/multi-select.module.js +3 -1
- package/esm2015/components/progress/index.js +5 -4
- package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +48 -0
- package/esm2015/components/progress/progress.module.js +6 -3
- package/esm2015/components/progress/utils/abstract-color-segments.js +32 -0
- package/esm2015/components/progress/utils/calculate-color-segments.js +10 -0
- package/esm2015/components/progress/utils/progress-color-segments-async.pipe.js +21 -0
- package/esm2015/components/progress/utils/progress-color-segments.pipe.js +19 -0
- package/esm2015/components/radio/radio-options.js +5 -1
- package/esm2015/components/radio/radio.component.js +3 -3
- package/esm2015/components/radio-block/radio-block.component.js +3 -3
- package/esm2015/components/radio-labeled/radio-labeled.component.js +3 -3
- package/esm2015/components/radio-list/radio-list.component.js +3 -3
- package/esm2015/components/range/range.component.js +1 -1
- package/esm2015/components/rating/rating-options.js +5 -1
- package/esm2015/components/select/index.js +4 -1
- package/esm2015/components/select/select-options.js +12 -0
- package/esm2015/components/select/select.component.js +36 -39
- package/esm2015/components/select/select.directive.js +28 -0
- package/esm2015/components/select/select.module.js +5 -4
- package/esm2015/components/select/select.providers.js +28 -0
- package/esm2015/components/slider/index.js +2 -1
- package/esm2015/components/slider/slider-old.component.js +71 -0
- package/esm2015/components/slider/slider.component.js +78 -44
- package/esm2015/components/slider/slider.module.js +4 -3
- package/esm2015/components/stepper/step/step.component.js +3 -3
- package/esm2015/components/tabs/tab/tab.providers.js +3 -3
- package/esm2015/components/tag/tag.component.js +12 -6
- package/esm2015/components/text-area/text-area.component.js +7 -4
- package/esm2015/components/text-area/text-area.module.js +2 -3
- package/esm2015/components/toggle/toggle-options.js +5 -1
- package/esm2015/components/toggle/toggle.component.js +3 -3
- package/esm2015/constants/index.js +2 -1
- package/esm2015/constants/max-time-values.js +7 -0
- package/esm2015/directives/lazy-loading/index.js +2 -1
- package/esm2015/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.js +1 -2
- package/esm2015/pipes/field-error/field-error-content-pipe.js +35 -0
- package/esm2015/pipes/field-error/field-error-pipe.js +120 -0
- package/esm2015/pipes/field-error/field-error.module.js +14 -0
- package/esm2015/pipes/field-error/index.js +4 -0
- package/esm2015/pipes/field-error/taiga-ui-kit-pipes-field-error.js +5 -0
- package/esm2015/pipes/index.js +2 -1
- package/esm2015/providers/index.js +2 -1
- package/esm2015/providers/month-formatter.provider.js +17 -0
- package/esm2015/providers/value-accessor.provider.js +4 -3
- package/esm2015/tokens/index.js +3 -1
- package/esm2015/tokens/items-handlers.js +15 -0
- package/esm2015/tokens/month-formatter.js +3 -0
- package/esm2015/types/index.js +1 -1
- package/esm2015/types/time-format-parts.js +1 -0
- package/esm2015/utils/mask/create-auto-corrected-time-pipe.js +7 -6
- package/esm2015/utils/mask/create-time-mask.js +16 -8
- package/esm2015/utils/miscellaneous/get-precision.js +2 -2
- package/esm5/abstract/input-slider.js +2 -2
- package/esm5/abstract/slider/slider.js +2 -2
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +3 -3
- package/esm5/components/accordion/accordion.component.js +3 -3
- package/esm5/components/arrow/arrow-options.js +29 -0
- package/esm5/components/arrow/arrow.component.js +12 -8
- package/esm5/components/arrow/arrow.module.js +3 -2
- package/esm5/components/arrow/index.js +2 -1
- package/esm5/components/avatar/avatar.component.js +3 -3
- package/esm5/components/badge/badge.component.js +3 -3
- package/esm5/components/badged-content/badged-content.component.js +3 -3
- package/esm5/components/breadcrumbs/breadcrumbs.component.js +3 -3
- package/esm5/components/calendar-month/calendar-month.component.js +3 -3
- package/esm5/components/carousel/carousel-buttons.directive.js +1 -1
- package/esm5/components/carousel/carousel.component.js +1 -1
- package/esm5/components/checkbox/checkbox.component.js +3 -3
- package/esm5/components/checkbox-block/checkbox-block.component.js +3 -3
- package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +3 -3
- package/esm5/components/combo-box/combo-box-strict.directive.js +32 -0
- package/esm5/components/combo-box/combo-box.component.js +39 -51
- package/esm5/components/combo-box/combo-box.directive.js +35 -0
- package/esm5/components/combo-box/combo-box.module.js +15 -4
- package/esm5/components/combo-box/combo-box.providers.js +28 -0
- package/esm5/components/combo-box/index.js +4 -1
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +18 -11
- package/esm5/components/field-error/field-error.component.js +8 -16
- package/esm5/components/field-error/field-error.module.js +6 -2
- package/esm5/components/filter/filter.component.js +3 -3
- package/esm5/components/input/index.js +2 -1
- package/esm5/components/input/input.component.js +2 -2
- package/esm5/components/input/input.directive.js +28 -0
- package/esm5/components/input/input.module.js +5 -4
- package/esm5/components/input/input.providers.js +6 -2
- package/esm5/components/input-copy/index.js +3 -1
- package/esm5/components/input-copy/input-copy.component.js +7 -15
- package/esm5/components/input-copy/input-copy.directive.js +28 -0
- package/esm5/components/input-copy/input-copy.module.js +5 -4
- package/esm5/components/input-copy/input-copy.providers.js +16 -0
- package/esm5/components/input-count/index.js +2 -1
- package/esm5/components/input-count/input-count-options.js +6 -1
- package/esm5/components/input-count/input-count.component.js +8 -4
- package/esm5/components/input-count/input-count.directive.js +32 -0
- package/esm5/components/input-count/input-count.module.js +5 -4
- package/esm5/components/input-date/index.js +3 -1
- package/esm5/components/input-date/input-date.component.js +8 -27
- package/esm5/components/input-date/input-date.directive.js +38 -0
- package/esm5/components/input-date/input-date.module.js +5 -4
- package/esm5/components/input-date/input-date.providers.js +29 -0
- package/esm5/components/input-date-range/index.js +3 -1
- package/esm5/components/input-date-range/input-date-range.component.js +8 -27
- package/esm5/components/input-date-range/input-date-range.directive.js +38 -0
- package/esm5/components/input-date-range/input-date-range.module.js +9 -4
- package/esm5/components/input-date-range/input-date-range.providers.js +29 -0
- package/esm5/components/input-date-time/index.js +3 -1
- package/esm5/components/input-date-time/input-date-time.component.js +9 -28
- package/esm5/components/input-date-time/input-date-time.directive.js +38 -0
- package/esm5/components/input-date-time/input-date-time.module.js +9 -4
- package/esm5/components/input-date-time/input-date-time.providers.js +29 -0
- package/esm5/components/input-inline/input-inline.component.js +4 -17
- package/esm5/components/input-month/index.js +3 -1
- package/esm5/components/input-month/input-month.component.js +18 -21
- package/esm5/components/input-month/input-month.directive.js +67 -0
- package/esm5/components/input-month/input-month.module.js +7 -6
- package/esm5/components/input-month/input-month.providers.js +19 -0
- package/esm5/components/input-month-range/index.js +3 -1
- package/esm5/components/input-month-range/input-month-range.component.js +20 -34
- package/esm5/components/input-month-range/input-month-range.directive.js +74 -0
- package/esm5/components/input-month-range/input-month-range.module.js +11 -5
- package/esm5/components/input-month-range/input-month-range.providers.js +19 -0
- package/esm5/components/input-number/index.js +2 -1
- package/esm5/components/input-number/input-number.component.js +8 -4
- package/esm5/components/input-number/input-number.directive.js +45 -0
- package/esm5/components/input-number/input-number.module.js +5 -4
- package/esm5/components/input-password/index.js +2 -1
- package/esm5/components/input-password/input-password-options.js +6 -1
- package/esm5/components/input-password/input-password.component.js +7 -3
- package/esm5/components/input-password/input-password.directive.js +36 -0
- package/esm5/components/input-password/input-password.module.js +9 -4
- package/esm5/components/input-phone/index.js +2 -1
- package/esm5/components/input-phone/input-phone.component.js +12 -24
- package/esm5/components/input-phone/input-phone.directive.js +45 -0
- package/esm5/components/input-phone/input-phone.module.js +5 -4
- package/esm5/components/input-phone/input-phone.providers.js +17 -3
- package/esm5/components/input-phone-international/input-phone-international.component.js +15 -6
- package/esm5/components/input-range/input-range.component.js +10 -7
- package/esm5/components/input-slider/input-slider.component.js +10 -7
- package/esm5/components/input-tag/index.js +2 -1
- package/esm5/components/input-tag/input-tag-options.js +9 -0
- package/esm5/components/input-tag/input-tag.component.js +45 -18
- package/esm5/components/input-time/input-time-options.js +9 -1
- package/esm5/components/input-time/input-time.component.js +10 -5
- package/esm5/components/line-clamp/line-clamp.component.js +26 -16
- package/esm5/components/marker-icon/marker-icon.component.js +3 -3
- package/esm5/components/multi-select/hide-selected.pipe.js +4 -4
- package/esm5/components/multi-select/index.js +2 -1
- package/esm5/components/multi-select/multi-select-options.js +14 -0
- package/esm5/components/multi-select/multi-select.component.js +50 -15
- package/esm5/components/multi-select/multi-select.module.js +3 -1
- package/esm5/components/progress/index.js +5 -4
- package/esm5/components/progress/progress-bar/progress-color-segments.directive.js +56 -0
- package/esm5/components/progress/progress.module.js +6 -3
- package/esm5/components/progress/utils/abstract-color-segments.js +33 -0
- package/esm5/components/progress/utils/calculate-color-segments.js +12 -0
- package/esm5/components/progress/utils/progress-color-segments-async.pipe.js +27 -0
- package/esm5/components/progress/utils/progress-color-segments.pipe.js +24 -0
- package/esm5/components/radio/radio-options.js +6 -1
- package/esm5/components/radio/radio.component.js +3 -3
- package/esm5/components/radio-block/radio-block.component.js +3 -3
- package/esm5/components/radio-labeled/radio-labeled.component.js +3 -3
- package/esm5/components/radio-list/radio-list.component.js +3 -3
- package/esm5/components/range/range.component.js +1 -1
- package/esm5/components/rating/rating-options.js +6 -1
- package/esm5/components/select/index.js +4 -1
- package/esm5/components/select/select-options.js +13 -0
- package/esm5/components/select/select.component.js +35 -39
- package/esm5/components/select/select.directive.js +42 -0
- package/esm5/components/select/select.module.js +5 -4
- package/esm5/components/select/select.providers.js +28 -0
- package/esm5/components/slider/index.js +2 -1
- package/esm5/components/slider/slider-old.component.js +90 -0
- package/esm5/components/slider/slider.component.js +95 -51
- package/esm5/components/slider/slider.module.js +4 -3
- package/esm5/components/stepper/step/step.component.js +3 -3
- package/esm5/components/tabs/tab/tab.providers.js +3 -3
- package/esm5/components/tag/tag.component.js +12 -6
- package/esm5/components/text-area/text-area.component.js +7 -4
- package/esm5/components/text-area/text-area.module.js +2 -3
- package/esm5/components/toggle/toggle-options.js +6 -1
- package/esm5/components/toggle/toggle.component.js +3 -3
- package/esm5/constants/index.js +2 -1
- package/esm5/constants/max-time-values.js +7 -0
- package/esm5/directives/lazy-loading/index.js +2 -1
- package/esm5/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.js +1 -2
- package/esm5/pipes/field-error/field-error-content-pipe.js +36 -0
- package/esm5/pipes/field-error/field-error-pipe.js +153 -0
- package/esm5/pipes/field-error/field-error.module.js +17 -0
- package/esm5/pipes/field-error/index.js +4 -0
- package/esm5/pipes/field-error/taiga-ui-kit-pipes-field-error.js +5 -0
- package/esm5/pipes/index.js +2 -1
- package/esm5/providers/index.js +2 -1
- package/esm5/providers/month-formatter.provider.js +19 -0
- package/esm5/providers/value-accessor.provider.js +4 -3
- package/esm5/tokens/index.js +3 -1
- package/esm5/tokens/items-handlers.js +16 -0
- package/esm5/tokens/month-formatter.js +3 -0
- package/esm5/types/index.js +1 -1
- package/esm5/types/time-format-parts.js +1 -0
- package/esm5/utils/mask/create-auto-corrected-time-pipe.js +8 -5
- package/esm5/utils/mask/create-time-mask.js +15 -7
- package/esm5/utils/miscellaneous/get-precision.js +2 -2
- package/fesm2015/taiga-ui-kit-abstract.js +2 -2
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +4 -4
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +40 -11
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +2 -2
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +2 -2
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +2 -2
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +2 -2
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +2 -2
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +2 -2
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +2 -2
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +117 -49
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +16 -10
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-field-error.js +12 -13
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +2 -2
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +41 -18
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +38 -8
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +61 -28
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +62 -29
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +57 -28
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +3 -12
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +95 -35
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +85 -25
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +43 -8
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +44 -6
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +10 -5
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +58 -26
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +9 -6
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +9 -6
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +48 -18
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +16 -4
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +28 -6
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +24 -14
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js +2 -2
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +58 -18
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +113 -55
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +2 -2
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +2 -2
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +2 -2
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +7 -3
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +5 -1
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +91 -37
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +114 -14
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +2 -2
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +2 -2
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +11 -5
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +7 -5
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +7 -3
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +8 -1
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js +166 -0
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -0
- package/fesm2015/taiga-ui-kit-pipes.js +1 -0
- package/fesm2015/taiga-ui-kit-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +19 -4
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +17 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +20 -12
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +2 -2
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +4 -4
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-arrow.js +41 -12
- package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js +2 -2
- package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badge.js +2 -2
- package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badged-content.js +2 -2
- package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +2 -2
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-block.js +2 -2
- package/fesm5/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js +2 -2
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +2 -2
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +127 -49
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +17 -10
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-field-error.js +12 -17
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +2 -2
- package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +46 -18
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +45 -9
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +70 -28
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +71 -29
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +66 -28
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +3 -16
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +109 -37
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +96 -25
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +53 -8
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +51 -7
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +14 -5
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +67 -26
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +9 -6
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +9 -6
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +53 -19
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +17 -5
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +35 -7
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +25 -15
- package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-marker-icon.js +2 -2
- package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +67 -20
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +135 -69
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +2 -2
- package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +2 -2
- package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-list.js +2 -2
- package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +8 -4
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-rating.js +6 -2
- package/fesm5/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +105 -38
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +155 -26
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +2 -2
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +2 -2
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +11 -5
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +7 -5
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +8 -4
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +8 -1
- package/fesm5/taiga-ui-kit-constants.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js +1 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-field-error.js +203 -0
- package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -0
- package/fesm5/taiga-ui-kit-pipes.js +1 -0
- package/fesm5/taiga-ui-kit-pipes.js.map +1 -1
- package/fesm5/taiga-ui-kit-providers.js +21 -4
- package/fesm5/taiga-ui-kit-providers.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +18 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js +19 -10
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js +1 -1
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/package.json +12 -12
- package/pipes/field-error/field-error-content-pipe.d.ts +11 -0
- package/pipes/field-error/field-error-pipe.d.ts +29 -0
- package/pipes/field-error/field-error.module.d.ts +2 -0
- package/pipes/field-error/index.d.ts +3 -0
- package/pipes/field-error/package.json +13 -0
- package/pipes/field-error/taiga-ui-kit-pipes-field-error.d.ts +4 -0
- package/pipes/field-error/taiga-ui-kit-pipes-field-error.metadata.json +1 -0
- package/pipes/index.d.ts +1 -0
- package/pipes/taiga-ui-kit-pipes.metadata.json +1 -1
- package/providers/index.d.ts +1 -0
- package/providers/month-formatter.provider.d.ts +6 -0
- package/providers/taiga-ui-kit-providers.metadata.json +1 -1
- package/providers/value-accessor.provider.d.ts +1 -1
- package/tokens/index.d.ts +2 -0
- package/tokens/items-handlers.d.ts +10 -0
- package/tokens/month-formatter.d.ts +4 -0
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/types/index.d.ts +1 -0
- package/types/taiga-ui-kit-types.metadata.json +1 -1
- package/types/time-format-parts.d.ts +1 -0
- package/utils/mask/create-auto-corrected-time-pipe.d.ts +2 -1
- package/utils/mask/create-time-mask.d.ts +2 -1
- package/utils/mask/taiga-ui-kit-utils-mask.metadata.json +1 -1
- package/components/progress/pipes/progress-color-segments.pipe.d.ts +0 -9
- package/esm2015/components/progress/pipes/abstract-color-segments.js +0 -32
- package/esm2015/components/progress/pipes/progress-color-segments-async.pipe.js +0 -15
- package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +0 -18
- package/esm5/components/progress/pipes/abstract-color-segments.js +0 -35
- package/esm5/components/progress/pipes/progress-color-segments-async.pipe.js +0 -21
- package/esm5/components/progress/pipes/progress-color-segments.pipe.js +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-phone.js","sources":["ng://@taiga-ui/kit/components/input-phone/input-phone.providers.ts","ng://@taiga-ui/kit/components/input-phone/input-phone.component.ts","ng://@taiga-ui/kit/components/input-phone/input-phone.module.ts","ng://@taiga-ui/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {InjectionToken} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {flatMap, startWith, takeUntil, windowToggle} from 'rxjs/operators';\n\nexport const SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n 'A stream of selection changes',\n);\nexport const INPUT_PHONE_PROVIDERS = [\n TuiDestroyService,\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n {\n provide: SELECTION_STREAM,\n deps: [TuiDestroyService, DOCUMENT],\n useFactory: selectionStreamFactory,\n },\n];\n\nexport function selectionStreamFactory(\n destroy$: Observable<unknown>,\n documentRef: Document,\n): Observable<unknown> {\n return fromEvent(documentRef, 'selectionchange').pipe(\n windowToggle(\n merge(fromEvent(documentRef, 'mouseup'), fromEvent(documentRef, 'keydown')),\n () => fromEvent(documentRef, 'mousedown'),\n ),\n flatMap(windowed$ => windowed$.pipe(startWith(null))),\n takeUntil(destroy$),\n );\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n getClipboardDataText,\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiActiveZoneDirective,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiInputModeT,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {\n formatPhone,\n TUI_DATA_LIST_HOST,\n TUI_TEXTFIELD_CLEANER,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHostedDropdownComponent,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldCleanerDirective,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {INPUT_PHONE_PROVIDERS, SELECTION_STREAM} from './input-phone.providers';\n\nconst NON_PLUS_AND_DIGITS_REGEX = /[ \\-_()]/g;\n\n// @dynamic\n@Component({\n selector: 'tui-input-phone',\n templateUrl: './input-phone.template.html',\n styleUrls: ['./input-phone.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputPhoneComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiInputPhoneComponent),\n },\n INPUT_PHONE_PROVIDERS,\n ],\n})\nexport class TuiInputPhoneComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string>\n{\n @ViewChild(TuiHostedDropdownComponent)\n private readonly dropdown?: TuiHostedDropdownComponent;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n @Input('countryCode')\n @tuiRequiredSetter()\n set countryCodeSetter(countryCode: string) {\n this.updateValueWithNewContryCode(countryCode);\n this.countryCode = countryCode;\n }\n\n @Input()\n @tuiDefaultProp()\n phoneMaskAfterCountryCode = '(###) ###-##-##';\n\n @Input()\n @tuiDefaultProp()\n allowText = false;\n\n @Input()\n @tuiDefaultProp()\n search = '';\n\n @Output()\n readonly searchChange = new EventEmitter<string>();\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist?: TemplateRef<TuiContextWithImplicit<TuiActiveZoneDirective>>;\n\n readonly textMaskOptions: TuiTextMaskOptions = {\n mask: value =>\n this.allowText && !this.value && isText(value) && value !== '+'\n ? false\n : [\n ...this.countryCode.split(''),\n ' ',\n ...this.phoneMaskAfterCountryCode\n .replace(/[^#\\- ()]+/g, '')\n .split('')\n .map(item => (item === '#' ? /\\d/ : item)),\n ],\n pipe: value => {\n if (this.allowText) {\n return value;\n }\n\n return value === '' && this.focused && !this.readOnly\n ? `${this.countryCode} `\n : value.replace(/-$/, '');\n },\n guide: false,\n };\n\n countryCode = '+7';\n\n open = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(SELECTION_STREAM)\n selection$: Observable<unknown>,\n @Inject(TUI_TEXTFIELD_CLEANER)\n private readonly textfieldCleaner: TuiTextfieldCleanerDirective,\n ) {\n super(control, changeDetectorRef);\n\n selection$.subscribe(() => {\n this.setCaretPosition();\n });\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.textfield || this.computedDisabled\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return (\n isNativeFocused(this.nativeFocusableElement) ||\n (!!this.dropdown && this.dropdown.focused)\n );\n }\n\n get nativeValue(): string {\n return this.value\n ? formatPhone(this.value, this.countryCode, this.phoneMaskAfterCountryCode)\n : this.search || '';\n }\n\n get inputMode(): TuiInputModeT {\n return this.allowText ? 'text' : 'numeric';\n }\n\n get canOpen(): boolean {\n return this.interactive && !!this.datalist;\n }\n\n get canClean(): boolean {\n return this.nativeValue !== this.countryCode && this.textfieldCleaner.cleaner;\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onDrop(event: DragEvent) {\n if (!event.dataTransfer) {\n return;\n }\n\n this.setValueWithoutPrefix(event.dataTransfer.getData('text'));\n event.preventDefault();\n }\n\n onPaste(event: ClipboardEvent) {\n this.setValueWithoutPrefix(getClipboardDataText(event));\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n\n if (active && !this.nativeValue && !this.readOnly && !this.allowText) {\n this.updateSearch(this.countryCode);\n\n return;\n }\n\n if (\n this.nativeValue === this.countryCode ||\n (this.search !== null &&\n isNaN(parseInt(this.search.replace(NON_PLUS_AND_DIGITS_REGEX, ''), 10)))\n ) {\n this.updateSearch('');\n }\n }\n\n onBackspace(event: Event & {target: HTMLInputElement}) {\n if (\n (event.target.selectionStart || 0) <= this.nonRemovableLength &&\n event.target.selectionStart === event.target.selectionEnd\n ) {\n event.preventDefault();\n }\n }\n\n onValueChange(value: string) {\n value = value === '' ? this.countryCode : value;\n\n const parsed = isText(value)\n ? value\n : value.replace(NON_PLUS_AND_DIGITS_REGEX, '');\n\n this.updateSearch(parsed);\n this.updateValue(parsed === this.countryCode || isText(parsed) ? '' : parsed);\n this.open = true;\n }\n\n handleOption(item: string) {\n this.focusInput();\n this.updateValue(item);\n this.updateSearch('');\n this.open = false;\n }\n\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n\n writeValue(value: string | null) {\n super.writeValue(value);\n this.updateSearch('');\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private get caretIsInForbiddenArea(): boolean {\n const {nativeFocusableElement} = this;\n\n if (!nativeFocusableElement) {\n return false;\n }\n\n const {selectionStart, selectionEnd} = nativeFocusableElement;\n\n return (\n isNativeFocused(nativeFocusableElement) &&\n selectionStart !== null &&\n selectionStart < this.nonRemovableLength &&\n selectionStart === selectionEnd\n );\n }\n\n private get nonRemovableLength(): number {\n return this.isTextValue ? 0 : this.countryCode.length + 1;\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode.length +\n this.phoneMaskAfterCountryCode.replace(/[^#]+/g, '').length\n );\n }\n\n private get isTextValue(): boolean {\n return !!this.search && isText(this.search);\n }\n\n private setCaretPosition() {\n if (this.caretIsInForbiddenArea && !!this.nativeFocusableElement) {\n this.nativeFocusableElement.setSelectionRange(\n this.nonRemovableLength,\n this.nonRemovableLength,\n );\n }\n }\n\n private setValueWithoutPrefix(value: string) {\n if (this.readOnly) {\n return;\n }\n\n this.open = true;\n this.updateValue(this.cleanValue(value));\n this.updateSearch(\n this.allowText && isText(value)\n ? value\n : value.replace(NON_PLUS_AND_DIGITS_REGEX, ''),\n );\n }\n\n private cleanValue(value: string): string {\n const reg: RegExp =\n this.countryCode === '+7'\n ? /^7|^8/\n : new RegExp(this.countryCode.substring(1));\n const oldValueExist =\n this.value.length > this.countryCode.length &&\n this.value.length < this.maxPhoneLength;\n const newValueLength = value.replace(NON_PLUS_AND_DIGITS_REGEX, '').length;\n const cleanNewValue = value.replace(/[^0-9]+/g, '');\n const selectionLength = getSelection()!.toString().length;\n\n if (oldValueExist && selectionLength === 0) {\n return `${this.value}${cleanNewValue}`.slice(0, this.maxPhoneLength);\n }\n\n if (newValueLength < this.maxPhoneLength - 1) {\n return `${this.countryCode}${cleanNewValue}`.slice(0, this.maxPhoneLength);\n }\n\n return `${this.countryCode}${cleanNewValue.replace(reg, '')}`.slice(\n 0,\n this.maxPhoneLength,\n );\n }\n\n private focusInput() {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, true);\n }\n }\n\n private updateSearch(search: string) {\n if (this.search === search) {\n return;\n }\n\n this.search = search;\n this.searchChange.emit(search);\n }\n\n private updateValueWithNewContryCode(newCountryCode: string) {\n if (!this.isTextValue) {\n this.updateValue(this.value.replace(this.countryCode, newCountryCode));\n }\n }\n}\n\nfunction isText(value: string): boolean {\n return isNaN(parseInt(value.replace(NON_PLUS_AND_DIGITS_REGEX, ''), 10));\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {\n TuiHostedDropdownModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputPhoneComponent} from './input-phone.component';\n\n@NgModule({\n imports: [\n TextMaskModule,\n TuiPrimitiveTextfieldModule,\n TuiHostedDropdownModule,\n TuiTextfieldControllerModule,\n TuiActiveZoneModule,\n TuiValueAccessorModule,\n ],\n declarations: [TuiInputPhoneComponent],\n exports: [TuiInputPhoneComponent],\n})\nexport class TuiInputPhoneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;IAOa,gBAAgB,GAAG,IAAI,cAAc,CAC9C,+BAA+B,EACjC;IACW,qBAAqB,GAAG;IACjC,iBAAiB;IACjB,kCAAkC;IAClC;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;QACnC,UAAU,EAAE,sBAAsB;KACrC;EACH;SAEc,sBAAsB,CAClC,QAA6B,EAC7B,WAAqB;IAErB,OAAO,SAAS,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,IAAI,CACjD,YAAY,CACR,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CA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AAA,wBAAsB,GAAA,CAAC;iBACxD;gBACD;oBACI,OAAO,EAAE,kBAAkB;oBAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,wBAAsB,GAAA,CAAC;iBACxD;gBACD,qBAAqB;aACxB;;SACJ,CAAC;QAiEO,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,IAAI,EAAE,CAAA;QACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QAExB,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;OAvEzB,sBAAsB,CAkSlC;IAAD,6BAAC;CAAA,CAjSW,kBAAkB,GAiS7B;AAED,SAAS,MAAM,CAAC,KAAa;IACzB,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7E;;;IC9UA;KAAmC;IAAtB,mBAAmB;QAZ/B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,cAAc;gBACd,2BAA2B;gBAC3B,uBAAuB;gBACvB,4BAA4B;gBAC5B,mBAAmB;gBACnB,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;YACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SACpC,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACxBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-phone.js","sources":["ng://@taiga-ui/kit/components/input-phone/input-phone.providers.ts","ng://@taiga-ui/kit/components/input-phone/input-phone.component.ts","ng://@taiga-ui/kit/components/input-phone/input-phone.directive.ts","ng://@taiga-ui/kit/components/input-phone/input-phone.module.ts","ng://@taiga-ui/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {forwardRef, InjectionToken} from '@angular/core';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiDestroyService,\n} from '@taiga-ui/cdk';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {flatMap, startWith, takeUntil, windowToggle} from 'rxjs/operators';\n\nimport {TuiInputPhoneComponent} from './input-phone.component';\n\nexport const SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n 'A stream of selection changes',\n);\nexport const INPUT_PHONE_PROVIDERS = [\n TuiDestroyService,\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputPhoneComponent),\n },\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputPhoneComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiInputPhoneComponent),\n },\n {\n provide: SELECTION_STREAM,\n deps: [TuiDestroyService, DOCUMENT],\n useFactory: selectionStreamFactory,\n },\n];\n\nexport function selectionStreamFactory(\n destroy$: Observable<unknown>,\n documentRef: Document,\n): Observable<unknown> {\n return fromEvent(documentRef, 'selectionchange').pipe(\n windowToggle(\n merge(fromEvent(documentRef, 'mouseup'), fromEvent(documentRef, 'keydown')),\n () => fromEvent(documentRef, 'mousedown'),\n ),\n flatMap(windowed$ => windowed$.pipe(startWith(null))),\n takeUntil(destroy$),\n );\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n getClipboardDataText,\n isNativeFocused,\n setNativeFocused,\n TuiActiveZoneDirective,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiInputModeT,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {\n formatPhone,\n TUI_TEXTFIELD_CLEANER,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHostedDropdownComponent,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldCleanerDirective,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\nimport {INPUT_PHONE_PROVIDERS, SELECTION_STREAM} from './input-phone.providers';\n\nconst NON_PLUS_AND_DIGITS_REGEX = /[ \\-_()]/g;\n\n// @dynamic\n@Component({\n selector: 'tui-input-phone',\n templateUrl: './input-phone.template.html',\n styleUrls: ['./input-phone.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: INPUT_PHONE_PROVIDERS,\n})\nexport class TuiInputPhoneComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string>\n{\n @ViewChild(TuiHostedDropdownComponent)\n private readonly dropdown?: TuiHostedDropdownComponent;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n @Input('countryCode')\n @tuiRequiredSetter()\n set countryCodeSetter(countryCode: string) {\n this.updateValueWithNewContryCode(countryCode);\n this.countryCode = countryCode;\n }\n\n @Input()\n @tuiDefaultProp()\n phoneMaskAfterCountryCode = '(###) ###-##-##';\n\n @Input()\n @tuiDefaultProp()\n allowText = false;\n\n @Input()\n @tuiDefaultProp()\n search = '';\n\n @Output()\n readonly searchChange = new EventEmitter<string>();\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist?: TemplateRef<TuiContextWithImplicit<TuiActiveZoneDirective>>;\n\n readonly textMaskOptions: TuiTextMaskOptions = {\n mask: value =>\n this.allowText && !this.value && isText(value) && value !== '+'\n ? false\n : [\n ...this.countryCode.split(''),\n ' ',\n ...this.phoneMaskAfterCountryCode\n .replace(/[^#\\- ()]+/g, '')\n .split('')\n .map(item => (item === '#' ? /\\d/ : item)),\n ],\n pipe: value => {\n if (this.allowText) {\n return value;\n }\n\n return value === '' && this.focused && !this.readOnly\n ? `${this.countryCode} `\n : value.replace(/-$/, '');\n },\n guide: false,\n };\n\n countryCode = '+7';\n\n open = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(SELECTION_STREAM)\n selection$: Observable<unknown>,\n @Inject(TUI_TEXTFIELD_CLEANER)\n private readonly textfieldCleaner: TuiTextfieldCleanerDirective,\n ) {\n super(control, changeDetectorRef);\n\n selection$.subscribe(() => {\n this.setCaretPosition();\n });\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.textfield || this.computedDisabled\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return (\n isNativeFocused(this.nativeFocusableElement) ||\n (!!this.dropdown && this.dropdown.focused)\n );\n }\n\n get computedValue(): string {\n return this.value\n ? formatPhone(this.value, this.countryCode, this.phoneMaskAfterCountryCode)\n : this.search || '';\n }\n\n get inputMode(): TuiInputModeT {\n return this.allowText ? 'text' : 'numeric';\n }\n\n get canOpen(): boolean {\n return this.interactive && !!this.datalist;\n }\n\n get canClean(): boolean {\n return this.computedValue !== this.countryCode && this.textfieldCleaner.cleaner;\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onDrop(event: DragEvent) {\n if (!event.dataTransfer) {\n return;\n }\n\n this.setValueWithoutPrefix(event.dataTransfer.getData('text'));\n event.preventDefault();\n }\n\n onPaste(event: ClipboardEvent) {\n this.setValueWithoutPrefix(getClipboardDataText(event));\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n\n if (active && !this.computedValue && !this.readOnly && !this.allowText) {\n this.updateSearch(this.countryCode);\n\n return;\n }\n\n if (\n this.computedValue === this.countryCode ||\n (this.search !== null &&\n isNaN(parseInt(this.search.replace(NON_PLUS_AND_DIGITS_REGEX, ''), 10)))\n ) {\n this.updateSearch('');\n }\n }\n\n onBackspace(event: Event & {target: HTMLInputElement}) {\n if (\n (event.target.selectionStart || 0) <= this.nonRemovableLength &&\n event.target.selectionStart === event.target.selectionEnd\n ) {\n event.preventDefault();\n }\n }\n\n onValueChange(value: string) {\n value = value === '' ? this.countryCode : value;\n\n const parsed = isText(value)\n ? value\n : value.replace(NON_PLUS_AND_DIGITS_REGEX, '');\n\n this.updateSearch(parsed);\n this.updateValue(parsed === this.countryCode || isText(parsed) ? '' : parsed);\n this.open = true;\n }\n\n handleOption(item: string) {\n this.focusInput();\n this.updateValue(item);\n this.updateSearch('');\n this.open = false;\n }\n\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n\n writeValue(value: string | null) {\n super.writeValue(value);\n this.updateSearch('');\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private get caretIsInForbiddenArea(): boolean {\n const {nativeFocusableElement} = this;\n\n if (!nativeFocusableElement) {\n return false;\n }\n\n const {selectionStart, selectionEnd} = nativeFocusableElement;\n\n return (\n isNativeFocused(nativeFocusableElement) &&\n selectionStart !== null &&\n selectionStart < this.nonRemovableLength &&\n selectionStart === selectionEnd\n );\n }\n\n private get nonRemovableLength(): number {\n return this.isTextValue ? 0 : this.countryCode.length + 1;\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode.length +\n this.phoneMaskAfterCountryCode.replace(/[^#]+/g, '').length\n );\n }\n\n private get isTextValue(): boolean {\n return !!this.search && isText(this.search);\n }\n\n private setCaretPosition() {\n if (this.caretIsInForbiddenArea && !!this.nativeFocusableElement) {\n this.nativeFocusableElement.setSelectionRange(\n this.nonRemovableLength,\n this.nonRemovableLength,\n );\n }\n }\n\n private setValueWithoutPrefix(value: string) {\n if (this.readOnly) {\n return;\n }\n\n this.open = true;\n this.updateValue(this.cleanValue(value));\n this.updateSearch(\n this.allowText && isText(value)\n ? value\n : value.replace(NON_PLUS_AND_DIGITS_REGEX, ''),\n );\n }\n\n private cleanValue(value: string): string {\n const reg: RegExp =\n this.countryCode === '+7'\n ? /^7|^8/\n : new RegExp(this.countryCode.substring(1));\n const oldValueExist =\n this.value.length > this.countryCode.length &&\n this.value.length < this.maxPhoneLength;\n const newValueLength = value.replace(NON_PLUS_AND_DIGITS_REGEX, '').length;\n const cleanNewValue = value.replace(/[^0-9]+/g, '');\n const selectionLength = String(getSelection()).length;\n\n if (oldValueExist && selectionLength === 0) {\n return `${this.value}${cleanNewValue}`.slice(0, this.maxPhoneLength);\n }\n\n if (newValueLength < this.maxPhoneLength - 1) {\n return `${this.countryCode}${cleanNewValue}`.slice(0, this.maxPhoneLength);\n }\n\n return `${this.countryCode}${cleanNewValue.replace(reg, '')}`.slice(\n 0,\n this.maxPhoneLength,\n );\n }\n\n private focusInput() {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, true);\n }\n }\n\n private updateSearch(search: string) {\n if (this.search === search) {\n return;\n }\n\n this.search = search;\n this.searchChange.emit(search);\n }\n\n private updateValueWithNewContryCode(newCountryCode: string) {\n if (!this.isTextValue) {\n this.updateValue(this.value.replace(this.countryCode, newCountryCode));\n }\n }\n}\n\nfunction isText(value: string): boolean {\n return isNaN(parseInt(value.replace(NON_PLUS_AND_DIGITS_REGEX, ''), 10));\n}\n","import {Directive, DoCheck, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputPhoneComponent} from './input-phone.component';\n\n@Directive({\n selector: 'tui-input-phone',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputPhoneDirective),\n },\n ],\n})\nexport class TuiInputPhoneDirective\n extends TuiAbstractTextfieldHost<TuiInputPhoneComponent>\n implements DoCheck\n{\n input?: HTMLInputElement;\n\n get value(): string {\n return this.host.computedValue;\n }\n\n onValueChange(value: string) {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement) {\n this.input = input;\n }\n\n ngDoCheck() {\n if (!this.input) {\n return;\n }\n\n this.input.type = 'tel';\n this.input.inputMode = this.host.inputMode;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {\n TuiHostedDropdownModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputPhoneComponent} from './input-phone.component';\nimport {TuiInputPhoneDirective} from './input-phone.directive';\n\n@NgModule({\n imports: [\n TextMaskModule,\n TuiPrimitiveTextfieldModule,\n TuiHostedDropdownModule,\n TuiTextfieldControllerModule,\n TuiActiveZoneModule,\n TuiValueAccessorModule,\n ],\n declarations: [TuiInputPhoneComponent, TuiInputPhoneDirective],\n exports: [TuiInputPhoneComponent, TuiInputPhoneDirective, TuiTextfieldComponent],\n})\nexport class TuiInputPhoneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;IAca,gBAAgB,GAAG,IAAI,cAAc,CAC9C,+BAA+B,EACjC;IACW,qBAAqB,GAAG;IACjC,iBAAiB;IACjB,kCAAkC;IAClC;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAsB,GAAA,CAAC;KACxD;IACD;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAsB,GAAA,CAAC;KACxD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAsB,GAAA,CAAC;KACxD;IACD;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,iBAAiB,EAAE,QAA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AE,kBAAkB;oBAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,wBAAsB,GAAA,CAAC;iBACxD;aACJ;SACJ,CAAC;OACW,sBAAsB,CA0BlC;IAAD,6BAAC;CAAA,CAzBW,wBAAwB;;;ICWpC;KAAmC;IAAtB,mBAAmB;QAZ/B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,cAAc;gBACd,2BAA2B;gBAC3B,uBAAuB;gBACvB,4BAA4B;gBAC5B,mBAAmB;gBACnB,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;YAC9D,OAAO,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC;SACnF,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;AC1BA;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { __extends, __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 { maskedMoneyValueIsEmpty, maskedNumberStringToNumber, formatNumber, TuiModeDirective, TUI_NUMBER_FORMAT, TuiWrapperModule } from '@taiga-ui/core';
|
|
5
|
+
import { maskedMoneyValueIsEmpty, maskedNumberStringToNumber, formatNumber, TuiModeDirective, TUI_NUMBER_FORMAT, TUI_TEXTFIELD_APPEARANCE, 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,11 +11,12 @@ import { TextMaskModule } from 'angular2-text-mask';
|
|
|
11
11
|
// @dynamic
|
|
12
12
|
var TuiInputRangeComponent = /** @class */ (function (_super) {
|
|
13
13
|
__extends(TuiInputRangeComponent, _super);
|
|
14
|
-
function TuiInputRangeComponent(control, changeDetectorRef, modeDirective, isMobile, numberFormat) {
|
|
14
|
+
function TuiInputRangeComponent(control, changeDetectorRef, modeDirective, isMobile, numberFormat, appearance) {
|
|
15
15
|
var _this = _super.call(this, control, changeDetectorRef) || this;
|
|
16
16
|
_this.modeDirective = modeDirective;
|
|
17
17
|
_this.isMobile = isMobile;
|
|
18
18
|
_this.numberFormat = numberFormat;
|
|
19
|
+
_this.appearance = appearance;
|
|
19
20
|
return _this;
|
|
20
21
|
}
|
|
21
22
|
TuiInputRangeComponent_1 = TuiInputRangeComponent;
|
|
@@ -217,7 +218,8 @@ var TuiInputRangeComponent = /** @class */ (function (_super) {
|
|
|
217
218
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
218
219
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] },
|
|
219
220
|
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
220
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
221
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] },
|
|
222
|
+
{ type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] }
|
|
221
223
|
]; };
|
|
222
224
|
__decorate([
|
|
223
225
|
ViewChild('nativeLeft')
|
|
@@ -234,7 +236,7 @@ var TuiInputRangeComponent = /** @class */ (function (_super) {
|
|
|
234
236
|
TuiInputRangeComponent = TuiInputRangeComponent_1 = __decorate([
|
|
235
237
|
Component({
|
|
236
238
|
selector: 'tui-input-range',
|
|
237
|
-
template: "<div class=\"zone\" (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <tui-wrapper\n appearance=\"
|
|
239
|
+
template: "<div class=\"zone\" (tuiActiveZoneChange)=\"onActiveZone($event)\">\n <tui-wrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n >\n <span\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-input-range__placeholder\"\n class=\"placeholder placeholder_raised\"\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 automation-id=\"tui-input-range__pluralize-left\"\n class=\"pluralize\"\n >\n {{ value[0] | i18nPlural: pluralizeMap }}\n </span>\n </span>\n <span\n *ngIf=\"showMinLabel\"\n automation-id=\"tui-input-range__min-label\"\n class=\"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 automation-id=\"tui-input-range__native-left\"\n class=\"native\"\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 automation-id=\"tui-input-range__native-right\"\n class=\"native 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 automation-id=\"tui-input-range__pluralize-right\"\n class=\"pluralize pluralize_right\"\n (mousedown)=\"onMouseDown()\"\n >\n {{ value[1] | i18nPlural: pluralizeMap }}\n </span>\n </div>\n</div>\n",
|
|
238
240
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
239
241
|
providers: [
|
|
240
242
|
{
|
|
@@ -242,7 +244,7 @@ var TuiInputRangeComponent = /** @class */ (function (_super) {
|
|
|
242
244
|
useExisting: forwardRef(function () { return TuiInputRangeComponent_1; }),
|
|
243
245
|
},
|
|
244
246
|
],
|
|
245
|
-
styles: [":host{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);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-
|
|
247
|
+
styles: [":host{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);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-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-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-size='l'] .content{height:var(--tui-height-l);padding:0 1rem}:host[data-size='l']._disabled .content{color:var(--tui-text-03)}:host[data-size='l'][data-mode=onDark]._disabled .content{color:var(--tui-text-03-night)}.placeholder{transition-property:transform,font-size,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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;position:absolute;top:0;width:100%;height:100%;left:1rem;line-height:var(--tui-height-l)}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);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-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-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-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-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-size='l'] .label{padding-top:1.25rem}.max{text-align:right;flex:1}:host[data-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}"]
|
|
246
248
|
}),
|
|
247
249
|
__param(0, Optional()),
|
|
248
250
|
__param(0, Self()),
|
|
@@ -251,7 +253,8 @@ var TuiInputRangeComponent = /** @class */ (function (_super) {
|
|
|
251
253
|
__param(2, Optional()),
|
|
252
254
|
__param(2, Inject(TuiModeDirective)),
|
|
253
255
|
__param(3, Inject(TUI_IS_MOBILE)),
|
|
254
|
-
__param(4, Inject(TUI_NUMBER_FORMAT))
|
|
256
|
+
__param(4, Inject(TUI_NUMBER_FORMAT)),
|
|
257
|
+
__param(5, Inject(TUI_TEXTFIELD_APPEARANCE))
|
|
255
258
|
], TuiInputRangeComponent);
|
|
256
259
|
return TuiInputRangeComponent;
|
|
257
260
|
}(AbstractTuiInputSlider));
|
|
@@ -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 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{\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;;IAcY,0CAAwC;IAShD,gCAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAExC,QAAiB,EAEf,YAAkC;QAZzD,YAcI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAPsB,mBAAa,GAAb,aAAa,CAAyB;QAExC,cAAQ,GAAR,QAAQ,CAAS;QAEf,kBAAY,GAAZ,YAAY,CAAsB;;KAGxD;+BAzBQ,sBAAsB;IA2B/B,sBAAI,0DAAsB;aAA1B;YACI,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;SACnF;;;OAAA;IAED,sBAAI,2CAAO;aAAX;YACI,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,YAAY,CAAC;SAChD;;;OAAA;IAED,sBAAI,+CAAW;aAAf;YACI,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC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,sBAAsB;QAZlC,SAAS,CAAC;YACP,QAAQ,EAAE,iBAAiB;YAC3B,+uHAA0C;YAE1C,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,2BAA2B;oBACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,wBAAsB,GAAA,CAAC;iBACxD;aACJ;;SACJ,CAAC;QAYO,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,IAAI,EAAE,CAAA;QACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QAExB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;QAErB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OArBrB,sBAAsB,CAuPlC;IAAD,6BAAC;CAAA,CAtPW,sBAAsB;;;ICRlC;KAAmC;IAAtB,mBAAmB;QAnB/B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,mBAAmB;gBACnB,cAAc;gBACd,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,gBAAgB;gBAChB,mBAAmB;gBACnB,kBAAkB;gBAClB,mBAAmB;gBACnB,cAAc;gBACd,gBAAgB;aACnB;YACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;YACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SACpC,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACrCA;;;;;;"}
|
|
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 TUI_TEXTFIELD_APPEARANCE,\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{\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 @Inject(TUI_TEXTFIELD_APPEARANCE)\n readonly appearance: string,\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":";;;;;;;;;;AAgCA;;IAcY,0CAAwC;IAShD,gCAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAExC,QAAiB,EAEf,YAAkC,EAE5C,U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CAAA;OAvB5B,sBAAsB,CAyPlC;IAAD,6BAAC;CAAA,CAxPW,sBAAsB;;;ICTlC;KAAmC;IAAtB,mBAAmB;QAnB/B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,mBAAmB;gBACnB,cAAc;gBACd,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,gBAAgB;gBAChB,mBAAmB;gBACnB,kBAAkB;gBAClB,mBAAmB;gBACnB,cAAc;gBACd,gBAAgB;aACnB;YACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;YACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SACpC,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACrCA;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { __extends, __decorate, __param } from 'tslib';
|
|
|
2
2
|
import { Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, 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, TUI_NUMBER_FORMAT, HINT_CONTROLLER_PROVIDER, TuiTooltipModule, TuiWrapperModule } from '@taiga-ui/core';
|
|
5
|
+
import { maskedNumberStringToNumber, maskedMoneyValueIsEmpty, formatNumber, TuiModeDirective, TuiHintControllerDirective, TUI_HINT_WATCHED_CONTROLLER, TUI_NUMBER_FORMAT, TUI_TEXTFIELD_APPEARANCE, 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,11 +11,12 @@ import { TextMaskModule } from 'angular2-text-mask';
|
|
|
11
11
|
// @dynamic
|
|
12
12
|
var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
13
13
|
__extends(TuiInputSliderComponent, _super);
|
|
14
|
-
function TuiInputSliderComponent(control, changeDetectorRef, modeDirective, hintController, numberFormat) {
|
|
14
|
+
function TuiInputSliderComponent(control, changeDetectorRef, modeDirective, hintController, numberFormat, appearance) {
|
|
15
15
|
var _this = _super.call(this, control, changeDetectorRef) || this;
|
|
16
16
|
_this.modeDirective = modeDirective;
|
|
17
17
|
_this.hintController = hintController;
|
|
18
18
|
_this.numberFormat = numberFormat;
|
|
19
|
+
_this.appearance = appearance;
|
|
19
20
|
_this.secondary = '';
|
|
20
21
|
return _this;
|
|
21
22
|
}
|
|
@@ -171,7 +172,8 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
171
172
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
172
173
|
{ type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] },
|
|
173
174
|
{ type: TuiHintControllerDirective, decorators: [{ type: Inject, args: [TUI_HINT_WATCHED_CONTROLLER,] }] },
|
|
174
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] }
|
|
175
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NUMBER_FORMAT,] }] },
|
|
176
|
+
{ type: String, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_APPEARANCE,] }] }
|
|
175
177
|
]; };
|
|
176
178
|
__decorate([
|
|
177
179
|
ViewChild('focusableElement')
|
|
@@ -192,7 +194,7 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
192
194
|
TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
193
195
|
Component({
|
|
194
196
|
selector: 'tui-input-slider',
|
|
195
|
-
template: "<tui-wrapper\n appearance=\"
|
|
197
|
+
template: "<tui-wrapper\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n>\n <span\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-input-slider__placeholder\"\n class=\"placeholder placeholder_raised\"\n >\n <ng-content></ng-content>\n </span>\n <input\n #focusableElement\n automation-id=\"tui-input-slider__native\"\n class=\"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 automation-id=\"tui-input-slider__min-label\"\n class=\"label\"\n >\n {{ minLabel }}\n </span>\n <span\n *ngIf=\"showMaxLabel\"\n automation-id=\"tui-input-slider__max-label\"\n class=\"label\"\n >\n {{ maxLabel }}\n </span>\n <span automation-id=\"tui-input-slider__secondary\" class=\"secondary\">\n {{ secondary }}\n <tui-tooltip\n *ngIf=\"hasTooltip\"\n automation-id=\"tui-input-slider__tooltip\"\n describeId=\"placeholer_until_accesibility_is_added\"\n class=\"tooltip\"\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",
|
|
196
198
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
197
199
|
providers: [
|
|
198
200
|
{
|
|
@@ -201,7 +203,7 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
201
203
|
},
|
|
202
204
|
HINT_CONTROLLER_PROVIDER,
|
|
203
205
|
],
|
|
204
|
-
styles: [":host{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);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-
|
|
206
|
+
styles: [":host{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);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-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-size='l'] .content{height:var(--tui-height-l);padding:0 1rem}.placeholder{transition-property:transform,font-size,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;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-l);line-height:var(--tui-height-l);box-sizing:border-box;pointer-events:none}.placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .placeholder_raised{font-size:.69rem;transform:translateY(-.5rem);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-size='l']._focused._label-outside .placeholder,:host[data-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-size='l'] .placeholder{font-size:.9375rem}:host[data-size='l'] .placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .placeholder,:host[data-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-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}:host._has-tooltip .placeholder{max-width:calc(100% - 1.75rem)}.value{visibility:hidden}.label{overflow:hidden;text-overflow:ellipsis}:host[data-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}"]
|
|
205
207
|
}),
|
|
206
208
|
__param(0, Optional()),
|
|
207
209
|
__param(0, Self()),
|
|
@@ -210,7 +212,8 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
210
212
|
__param(2, Optional()),
|
|
211
213
|
__param(2, Inject(TuiModeDirective)),
|
|
212
214
|
__param(3, Inject(TUI_HINT_WATCHED_CONTROLLER)),
|
|
213
|
-
__param(4, Inject(TUI_NUMBER_FORMAT))
|
|
215
|
+
__param(4, Inject(TUI_NUMBER_FORMAT)),
|
|
216
|
+
__param(5, Inject(TUI_TEXTFIELD_APPEARANCE))
|
|
214
217
|
], TuiInputSliderComponent);
|
|
215
218
|
return TuiInputSliderComponent;
|
|
216
219
|
}(AbstractTuiInputSlider));
|
|
@@ -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 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{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n secondary = '';\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;;IAeY,2CAA8B;IAUtC,iCAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAEhD,cAA0C,EAEhC,YAAkC;QAZzD,YAcI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAPsB,mBAAa,GAAb,aAAa,CAAyB;QAEhD,oBAAc,GAAd,cAAc,CAA4B;QAEhC,kBAAY,GAAZ,YAAY,CAAsB;QAdzD,eAAS,GAAG,EAAE,CAAC;;KAiBd;gCA1BQ,uBAAuB;IA4BhC,sBAAI,2DAAsB;aAA1B;YACI,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;kBAChD,IAAI;kBACJ,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;SAC7C;;;OAAA;IAED,sBAAI,4CAAO;aAAX;YACI,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACvD;;;OAAA;IAGD,sBAAI,+CAAU;aAAd;YACI,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC1D;;;OAAA;IAGD,sBAA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AAmB;gBACnB,cAAc;gBACd,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,gBAAgB;gBAChB,mBAAmB;gBACnB,kBAAkB;gBAClB,gBAAgB;gBAChB,eAAe;gBACf,gBAAgB;aACnB;YACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;YACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;SACrC,CAAC;OACW,oBAAoB,CAAG;IAAD,2BAAC;CAApC;;ACpCA;;;;;;"}
|
|
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 TUI_TEXTFIELD_APPEARANCE,\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{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n secondary = '';\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 @Inject(TUI_TEXTFIELD_APPEARANCE)\n readonly appearance: string,\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":";;;;;;;;;;AAoCA;;IAeY,2CAA8B;IAUtC,iCAII,OAAyB,EACE,iBAAoC,EAG5C,aAAsC,EAEhD,cAA0C,EAEhC,YAAkC,EAE5C,UAAkB;QAd/B,YAgBI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QATsB,mBAAa,GAAb,aAAa,CAAyB;QAEhD,oBAAc,GAAd,cAAc,CAA4B;QAEhC,kBAAY,GAAZ,YAAY,CAAsB;QAE5C,gBAAU,GAAV,UAAU,CAAQ;QAhB/B,eAAS,GAAG,EAAE,CAAC;;KAmBd;gCA5BQ,uBAAuB;IA8BhC,sBAAI,2DAAsB;aAA1B;YACI,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;kBAChD,IAAI;kBACJ,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;SAC7C;;;OAAA;IAED,sBAAI,4CAAO;aAAX;YACI,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACvD;;;OA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