@taiga-ui/kit 2.33.0 → 2.36.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 +2 -2
- 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 +14 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js +1 -1
- 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.map +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 +64 -22
- 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-count.umd.js +7 -2
- 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-month-range.umd.js +64 -41
- 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 +57 -32
- 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 +8 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +5 -0
- 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.umd.js +8 -2
- 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 +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +2 -2
- 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 +5 -0
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +25 -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 +51 -16
- 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 +35 -10
- 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 +272 -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-tag.umd.js +9 -3
- 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 +50 -13
- 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-directives-dropdown-selection.umd.js +22 -5
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.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 +29 -12
- 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/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/arrow/arrow-options.d.ts +7 -5
- 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/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 +8 -5
- package/components/combo-box/index.d.ts +1 -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-count/input-count-options.d.ts +10 -4
- package/components/input-count/input-count.component.d.ts +3 -3
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-month/index.d.ts +1 -0
- package/components/input-month/input-month.component.d.ts +6 -4
- package/components/input-month/input-month.directive.d.ts +8 -1
- 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 +1 -0
- package/components/input-month-range/input-month-range.component.d.ts +6 -7
- package/components/input-month-range/input-month-range.directive.d.ts +8 -1
- 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/input-number.directive.d.ts +4 -1
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- 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/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/input-phone.directive.d.ts +4 -1
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -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 +10 -4
- package/components/input-time/input-time.component.d.ts +6 -6
- 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 +14 -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 +1 -0
- package/components/select/select-options.d.ts +9 -0
- package/components/select/select.component.d.ts +9 -4
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/slider/index.d.ts +3 -0
- package/components/slider/slider-key-steps.directive.d.ts +17 -0
- package/components/slider/slider-old.component.d.ts +19 -0
- package/components/slider/slider-options.d.ts +9 -0
- package/components/slider/slider.component.d.ts +18 -13
- package/components/slider/taiga-ui-kit-components-slider.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/index.d.ts +1 -0
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/text-area/text-area.component.d.ts +2 -1
- package/components/text-area/text-area.directive.d.ts +5 -0
- 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/directives/dropdown-selection/dropdown-selection.directive.d.ts +2 -2
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.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/arrow/arrow-options.js +13 -2
- 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/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 +24 -18
- package/esm2015/components/combo-box/combo-box.module.js +13 -3
- package/esm2015/components/combo-box/index.js +2 -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-count/input-count-options.js +5 -1
- package/esm2015/components/input-count/input-count.component.js +3 -3
- package/esm2015/components/input-month/index.js +2 -1
- package/esm2015/components/input-month/input-month.component.js +19 -25
- package/esm2015/components/input-month/input-month.directive.js +32 -7
- package/esm2015/components/input-month/input-month.module.js +4 -4
- package/esm2015/components/input-month/input-month.providers.js +19 -0
- package/esm2015/components/input-month-range/index.js +2 -1
- package/esm2015/components/input-month-range/input-month-range.component.js +21 -37
- package/esm2015/components/input-month-range/input-month-range.directive.js +37 -7
- package/esm2015/components/input-month-range/input-month-range.module.js +3 -2
- package/esm2015/components/input-month-range/input-month-range.providers.js +19 -0
- package/esm2015/components/input-number/input-number.directive.js +9 -3
- package/esm2015/components/input-password/input-password-options.js +5 -1
- package/esm2015/components/input-password/input-password.component.js +2 -2
- package/esm2015/components/input-phone/input-phone.directive.js +9 -3
- package/esm2015/components/input-range/input-range.component.js +3 -3
- package/esm2015/components/input-slider/input-slider.component.js +3 -3
- 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 +5 -1
- package/esm2015/components/input-time/input-time.component.js +1 -1
- package/esm2015/components/line-clamp/line-clamp.component.js +25 -15
- package/esm2015/components/line-clamp/line-clamp.directive.js +2 -1
- 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 +30 -12
- 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 +2 -1
- package/esm2015/components/select/select-options.js +12 -0
- package/esm2015/components/select/select.component.js +21 -8
- package/esm2015/components/slider/index.js +4 -1
- package/esm2015/components/slider/slider-key-steps.directive.js +81 -0
- package/esm2015/components/slider/slider-old.component.js +71 -0
- package/esm2015/components/slider/slider-options.js +11 -0
- package/esm2015/components/slider/slider.component.js +86 -44
- package/esm2015/components/slider/slider.module.js +5 -3
- package/esm2015/components/tag/tag.component.js +10 -4
- package/esm2015/components/text-area/index.js +2 -1
- package/esm2015/components/text-area/text-area.component.js +21 -13
- package/esm2015/components/text-area/text-area.directive.js +22 -0
- package/esm2015/components/text-area/text-area.module.js +7 -6
- package/esm2015/components/text-area/text-area.providers.js +6 -2
- package/esm2015/components/toggle/toggle-options.js +5 -1
- package/esm2015/components/toggle/toggle.component.js +3 -3
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
- 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 +2 -2
- package/esm2015/tokens/index.js +3 -1
- package/esm2015/tokens/items-handlers.js +15 -0
- package/esm2015/tokens/month-formatter.js +3 -0
- 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/arrow/arrow-options.js +14 -2
- 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/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 +24 -18
- package/esm5/components/combo-box/combo-box.module.js +13 -3
- package/esm5/components/combo-box/index.js +2 -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-count/input-count-options.js +6 -1
- package/esm5/components/input-count/input-count.component.js +3 -3
- package/esm5/components/input-month/index.js +2 -1
- package/esm5/components/input-month/input-month.component.js +18 -25
- package/esm5/components/input-month/input-month.directive.js +32 -9
- package/esm5/components/input-month/input-month.module.js +4 -4
- package/esm5/components/input-month/input-month.providers.js +19 -0
- package/esm5/components/input-month-range/index.js +2 -1
- package/esm5/components/input-month-range/input-month-range.component.js +20 -38
- package/esm5/components/input-month-range/input-month-range.directive.js +38 -8
- package/esm5/components/input-month-range/input-month-range.module.js +3 -2
- package/esm5/components/input-month-range/input-month-range.providers.js +19 -0
- package/esm5/components/input-number/input-number.directive.js +9 -3
- package/esm5/components/input-password/input-password-options.js +6 -1
- package/esm5/components/input-password/input-password.component.js +2 -2
- package/esm5/components/input-phone/input-phone.directive.js +9 -3
- package/esm5/components/input-range/input-range.component.js +3 -3
- package/esm5/components/input-slider/input-slider.component.js +3 -3
- 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 +6 -1
- package/esm5/components/input-time/input-time.component.js +1 -1
- package/esm5/components/line-clamp/line-clamp.component.js +26 -16
- package/esm5/components/line-clamp/line-clamp.directive.js +2 -1
- 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 +34 -12
- 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 +2 -1
- package/esm5/components/select/select-options.js +13 -0
- package/esm5/components/select/select.component.js +21 -8
- package/esm5/components/slider/index.js +4 -1
- package/esm5/components/slider/slider-key-steps.directive.js +102 -0
- package/esm5/components/slider/slider-old.component.js +90 -0
- package/esm5/components/slider/slider-options.js +12 -0
- package/esm5/components/slider/slider.component.js +103 -51
- package/esm5/components/slider/slider.module.js +5 -3
- package/esm5/components/tag/tag.component.js +10 -4
- package/esm5/components/text-area/index.js +2 -1
- package/esm5/components/text-area/text-area.component.js +21 -13
- package/esm5/components/text-area/text-area.directive.js +28 -0
- package/esm5/components/text-area/text-area.module.js +7 -6
- package/esm5/components/text-area/text-area.providers.js +6 -2
- package/esm5/components/toggle/toggle-options.js +6 -1
- package/esm5/components/toggle/toggle.component.js +3 -3
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
- 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 +2 -2
- package/esm5/tokens/index.js +3 -1
- package/esm5/tokens/items-handlers.js +16 -0
- package/esm5/tokens/month-formatter.js +3 -0
- 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 +2 -2
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +13 -2
- 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.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 +62 -21
- 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-count.js +7 -3
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +67 -41
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +61 -31
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +8 -2
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +5 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +8 -2
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +2 -2
- 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 +5 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +25 -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 +45 -15
- 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 +32 -9
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +206 -14
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +9 -3
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +47 -17
- 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-directives-dropdown-selection.js +22 -5
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.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 +18 -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/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 +2 -2
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-arrow.js +14 -3
- 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.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 +63 -21
- 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-count.js +8 -4
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +68 -44
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +60 -33
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +8 -2
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +6 -2
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +8 -2
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +2 -2
- 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 +6 -2
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +26 -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 +50 -17
- 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 +33 -10
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +268 -26
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +9 -3
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +53 -17
- 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-directives-dropdown-selection.js +22 -5
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.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 +20 -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/package.json +4 -4
- 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/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/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,34 +1,39 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { ViewChildren, forwardRef, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
-
import { EMPTY_QUERY,
|
|
1
|
+
import { __decorate, __param } from 'tslib';
|
|
2
|
+
import { Inject, ViewChildren, forwardRef, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import { EMPTY_QUERY, isNativeFocused, isPresent, tuiDefaultProp, TuiElementModule } from '@taiga-ui/cdk';
|
|
4
4
|
import { TuiOptionComponent, TUI_DATA_LIST_ACCESSOR, TuiDataListModule, TuiLoaderModule, TuiDataListDirective } from '@taiga-ui/core';
|
|
5
|
+
import { TUI_ITEMS_HANDLERS } from '@taiga-ui/kit/tokens';
|
|
5
6
|
import { CommonModule } from '@angular/common';
|
|
6
7
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
7
8
|
|
|
8
9
|
var TuiDataListWrapperComponent_1;
|
|
9
10
|
let TuiDataListWrapperComponent = TuiDataListWrapperComponent_1 = class TuiDataListWrapperComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.
|
|
11
|
+
constructor(itemsHandlers) {
|
|
12
|
+
this.itemsHandlers = itemsHandlers;
|
|
13
|
+
this.optionsQuery = EMPTY_QUERY;
|
|
12
14
|
this.items = [];
|
|
13
|
-
this.disabledItemHandler =
|
|
15
|
+
this.disabledItemHandler = this.itemsHandlers.disabledItemHandler;
|
|
14
16
|
this.emptyContent = '';
|
|
15
17
|
this.size = 'm';
|
|
16
|
-
this.itemContent = ({ $implicit }) =>
|
|
18
|
+
this.itemContent = ({ $implicit }) => this.itemsHandlers.stringify($implicit);
|
|
17
19
|
}
|
|
18
20
|
getContext($implicit, { nativeElement }) {
|
|
19
21
|
return { $implicit, active: isNativeFocused(nativeElement) };
|
|
20
22
|
}
|
|
21
23
|
getOptions(includeDisabled = false) {
|
|
22
|
-
return this.
|
|
24
|
+
return this.optionsQuery
|
|
23
25
|
.toArray()
|
|
24
26
|
.filter(({ disabled }) => includeDisabled || !disabled)
|
|
25
27
|
.map(({ value }) => value)
|
|
26
28
|
.filter(isPresent);
|
|
27
29
|
}
|
|
28
30
|
};
|
|
31
|
+
TuiDataListWrapperComponent.ctorParameters = () => [
|
|
32
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ITEMS_HANDLERS,] }] }
|
|
33
|
+
];
|
|
29
34
|
__decorate([
|
|
30
35
|
ViewChildren(forwardRef(() => TuiOptionComponent))
|
|
31
|
-
], TuiDataListWrapperComponent.prototype, "
|
|
36
|
+
], TuiDataListWrapperComponent.prototype, "optionsQuery", void 0);
|
|
32
37
|
__decorate([
|
|
33
38
|
Input(),
|
|
34
39
|
tuiDefaultProp()
|
|
@@ -61,7 +66,8 @@ TuiDataListWrapperComponent = TuiDataListWrapperComponent_1 = __decorate([
|
|
|
61
66
|
},
|
|
62
67
|
],
|
|
63
68
|
styles: [":host{display:block}.content{flex:1}"]
|
|
64
|
-
})
|
|
69
|
+
}),
|
|
70
|
+
__param(0, Inject(TUI_ITEMS_HANDLERS))
|
|
65
71
|
], TuiDataListWrapperComponent);
|
|
66
72
|
|
|
67
73
|
var TuiDataListGroupWrapperComponent_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-data-list-wrapper.js","sources":["ng://@taiga-ui/kit/components/data-list-wrapper/data-list-wrapper.component.ts","ng://@taiga-ui/kit/components/data-list-wrapper/data-list-group-wrapper.component.ts","ng://@taiga-ui/kit/components/data-list-wrapper/data-list-wrapper.module.ts","ng://@taiga-ui/kit/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n Input,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-data-list-wrapper.js","sources":["ng://@taiga-ui/kit/components/data-list-wrapper/data-list-wrapper.component.ts","ng://@taiga-ui/kit/components/data-list-wrapper/data-list-group-wrapper.component.ts","ng://@taiga-ui/kit/components/data-list-wrapper/data-list-wrapper.module.ts","ng://@taiga-ui/kit/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY, isNativeFocused, isPresent, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {\n TUI_DATA_LIST_ACCESSOR,\n TuiDataListAccessor,\n TuiOptionComponent,\n TuiSizeL,\n TuiSizeXS,\n TuiValueContentContext,\n} from '@taiga-ui/core';\nimport {TUI_ITEMS_HANDLERS, TuiItemsHandlers} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: 'tui-data-list-wrapper:not([labels])',\n templateUrl: './data-list-wrapper.template.html',\n styleUrls: ['./data-list-wrapper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListWrapperComponent),\n },\n ],\n})\nexport class TuiDataListWrapperComponent<T> implements TuiDataListAccessor<T> {\n @ViewChildren(forwardRef(() => TuiOptionComponent))\n private readonly optionsQuery: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<ReadonlyArray<T>> | ReadonlyArray<T> | null = [];\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiItemsHandlers<T>['disabledItemHandler'] =\n this.itemsHandlers.disabledItemHandler;\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = 'm';\n\n constructor(\n @Inject(TUI_ITEMS_HANDLERS)\n private readonly itemsHandlers: TuiItemsHandlers<T>,\n ) {}\n\n @Input()\n @tuiDefaultProp()\n itemContent: PolymorpheusContent<TuiValueContentContext<T>> = ({$implicit}) =>\n this.itemsHandlers.stringify($implicit);\n\n getContext(\n $implicit: T,\n {nativeElement}: ElementRef<HTMLElement>,\n ): TuiValueContentContext<T> {\n return {$implicit, active: isNativeFocused(nativeElement)};\n }\n\n getOptions(includeDisabled: boolean = false): ReadonlyArray<T> {\n return this.optionsQuery\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n}\n","import {ChangeDetectionStrategy, Component, forwardRef, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_DATA_LIST_ACCESSOR, TuiDataListAccessor} from '@taiga-ui/core';\n\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\n@Component({\n selector: 'tui-data-list-wrapper[labels]',\n templateUrl: './data-list-group-wrapper.template.html',\n styleUrls: ['./data-list-wrapper.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListGroupWrapperComponent),\n },\n ],\n})\nexport class TuiDataListGroupWrapperComponent<T>\n extends TuiDataListWrapperComponent<T>\n implements TuiDataListAccessor<T>\n{\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<ReadonlyArray<T>> | null = [];\n\n @Input()\n @tuiDefaultProp()\n labels: readonly string[] = [];\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiElementModule} from '@taiga-ui/cdk';\nimport {TuiDataListDirective, TuiDataListModule, TuiLoaderModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListGroupWrapperComponent} from './data-list-group-wrapper.component';\nimport {TuiDataListWrapperComponent} from './data-list-wrapper.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiElementModule,\n TuiDataListModule,\n TuiLoaderModule,\n ],\n declarations: [TuiDataListWrapperComponent, TuiDataListGroupWrapperComponent],\n exports: [\n TuiDataListWrapperComponent,\n TuiDataListGroupWrapperComponent,\n TuiDataListDirective,\n ],\n})\nexport class TuiDataListWrapperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAkCa,2BAA2B,mCAAxC,MAAa,2BAA2B;IAqBpC,YAEqB,aAAkC;QAAlC,kBAAa,GAAb,aAAa,CAAqB;QArBtC,iBAAY,GAAqC,WAAW,CAAC;QAI9E,UAAK,GAA8D,EAAE,CAAC;QAItE,wBAAmB,GACf,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC;QAI3C,iBAAY,GAAwB,EAAE,CAAC;QAIvC,SAAI,GAAyB,GAAG,CAAC;QASjC,gBAAW,GAAmD,CAAC,EAAC,SAAS,EAAC,KACtE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KALxC;IAOJ,UAAU,CACN,SAAY,EACZ,EAAC,aAAa,EAA0B;QAExC,OAAO,EAAC,SAAS,EAAE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,gCAAgC;IAZ5C,SAAS,CAAC;QACP,QAAQ,EAAE,+BAA+B;QACzC,u5BAAsD;QAEtD,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,sBAAsB;gBAC/B,WAAW,EAAE,UAAU,CAAC,MAAM,kCAAgC,CAAC;aAClE;SACJ;;KACJ,CAAC;GACW,gCAAgC,CAW5C;;ICLY,wBAAwB,GAArC,MAAa,wBAAwB;EAAG;AAA3B,wBAAwB;IAfpC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,iBAAiB;YACjB,eAAe;SAClB;QACD,YAAY,EAAE,CAAC,2BAA2B,EAAE,gCAAgC,CAAC;QAC7E,OAAO,EAAE;YACL,2BAA2B;YAC3B,gCAAgC;YAChC,oBAAoB;SACvB;KACJ,CAAC;GACW,wBAAwB,CAAG;;ACxBxC;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { Optional, Self, Inject, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
-
import { NgControl, FormArrayName, FormGroupName, FormGroupDirective } from '@angular/forms';
|
|
3
|
+
import { NgControl, FormArrayName, FormGroupName, FormGroupDirective, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { TuiValidationError, tuiDefaultProp, tuiPure } from '@taiga-ui/cdk';
|
|
5
5
|
import { TUI_VALIDATION_ERRORS } from '@taiga-ui/kit/tokens';
|
|
6
|
-
import { merge, EMPTY, isObservable } from 'rxjs';
|
|
6
|
+
import { merge, EMPTY, of, isObservable } from 'rxjs';
|
|
7
7
|
import { map } from 'rxjs/operators';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import { TuiErrorModule } from '@taiga-ui/core';
|
|
@@ -27,11 +27,7 @@ let TuiFieldErrorComponent = class TuiFieldErrorComponent {
|
|
|
27
27
|
return merge(((_a = this.control) === null || _a === void 0 ? void 0 : _a.valueChanges) || EMPTY, ((_b = this.control) === null || _b === void 0 ? void 0 : _b.statusChanges) || EMPTY);
|
|
28
28
|
}
|
|
29
29
|
get computedError() {
|
|
30
|
-
return (this.invalid && this.touched && this.error) || null;
|
|
31
|
-
}
|
|
32
|
-
get isObservable() {
|
|
33
|
-
const { errorId } = this;
|
|
34
|
-
return isObservable(this.validationErrors[errorId]);
|
|
30
|
+
return (this.invalid && this.touched && this.error) || of(null);
|
|
35
31
|
}
|
|
36
32
|
registerOnChange() { }
|
|
37
33
|
registerOnTouched() { }
|
|
@@ -40,7 +36,7 @@ let TuiFieldErrorComponent = class TuiFieldErrorComponent {
|
|
|
40
36
|
get error() {
|
|
41
37
|
const { errorId } = this;
|
|
42
38
|
if (!errorId) {
|
|
43
|
-
return null;
|
|
39
|
+
return of(null);
|
|
44
40
|
}
|
|
45
41
|
const firstError = this.controlErrors[errorId];
|
|
46
42
|
const errorContent = this.validationErrors[errorId];
|
|
@@ -80,15 +76,15 @@ let TuiFieldErrorComponent = class TuiFieldErrorComponent {
|
|
|
80
76
|
}
|
|
81
77
|
getError(firstError, errorContent) {
|
|
82
78
|
if (firstError instanceof TuiValidationError) {
|
|
83
|
-
return firstError;
|
|
79
|
+
return of(firstError);
|
|
84
80
|
}
|
|
85
81
|
if (errorContent === undefined && typeof firstError === 'string') {
|
|
86
|
-
return new TuiValidationError(firstError);
|
|
82
|
+
return of(new TuiValidationError(firstError));
|
|
87
83
|
}
|
|
88
84
|
if (isObservable(errorContent)) {
|
|
89
85
|
return errorContent.pipe(map(error => new TuiValidationError(error || '', firstError)));
|
|
90
86
|
}
|
|
91
|
-
return new TuiValidationError(errorContent || '', firstError);
|
|
87
|
+
return of(new TuiValidationError(errorContent || '', firstError));
|
|
92
88
|
}
|
|
93
89
|
};
|
|
94
90
|
TuiFieldErrorComponent.ctorParameters = () => [
|
|
@@ -117,7 +113,7 @@ TuiFieldErrorComponent = __decorate([
|
|
|
117
113
|
// @bad TODO: find a way to get 'touched' state change
|
|
118
114
|
// https://github.com/angular/angular/issues/10887
|
|
119
115
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
120
|
-
template: "<ng-container *ngIf=\"change$ | async\"></ng-container>\n<tui-error
|
|
116
|
+
template: "<ng-container *ngIf=\"change$ | async\"></ng-container>\n\n<tui-error [error]=\"computedError | async\"></tui-error>\n",
|
|
121
117
|
styles: [":host{display:block}"]
|
|
122
118
|
}),
|
|
123
119
|
__param(0, Optional()),
|
|
@@ -135,11 +131,14 @@ TuiFieldErrorComponent = __decorate([
|
|
|
135
131
|
__param(4, Inject(TUI_VALIDATION_ERRORS))
|
|
136
132
|
], TuiFieldErrorComponent);
|
|
137
133
|
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated use {@link TuiFieldErrorPipeModule} (from '@taiga-ui/kit') instead
|
|
136
|
+
*/
|
|
138
137
|
let TuiFieldErrorModule = class TuiFieldErrorModule {
|
|
139
138
|
};
|
|
140
139
|
TuiFieldErrorModule = __decorate([
|
|
141
140
|
NgModule({
|
|
142
|
-
imports: [CommonModule, TuiErrorModule],
|
|
141
|
+
imports: [CommonModule, TuiErrorModule, ReactiveFormsModule],
|
|
143
142
|
declarations: [TuiFieldErrorComponent],
|
|
144
143
|
exports: [TuiFieldErrorComponent],
|
|
145
144
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-field-error.js","sources":["ng://@taiga-ui/kit/components/field-error/field-error.component.ts","ng://@taiga-ui/kit/components/field-error/field-error.module.ts","ng://@taiga-ui/kit/components/field-error/taiga-ui-kit-components-field-error.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormArrayName,\n FormGroupDirective,\n FormGroupName,\n NgControl,\n} from '@angular/forms';\nimport {tuiDefaultProp, tuiPure, TuiValidationError} from '@taiga-ui/cdk';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, isObservable, merge, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst EMPTY_RECORD = {};\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-field-error.js","sources":["ng://@taiga-ui/kit/components/field-error/field-error.component.ts","ng://@taiga-ui/kit/components/field-error/field-error.module.ts","ng://@taiga-ui/kit/components/field-error/taiga-ui-kit-components-field-error.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormArrayName,\n FormGroupDirective,\n FormGroupName,\n NgControl,\n} from '@angular/forms';\nimport {tuiDefaultProp, tuiPure, TuiValidationError} from '@taiga-ui/cdk';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, isObservable, merge, Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst EMPTY_RECORD = {};\n// @dynamic\n@Component({\n selector: 'tui-field-error',\n // @bad TODO: find a way to get 'touched' state change\n // https://github.com/angular/angular/issues/10887\n changeDetection: ChangeDetectionStrategy.Default,\n templateUrl: './field-error.template.html',\n styleUrls: ['./field-error.style.less'],\n})\nexport class TuiFieldErrorComponent {\n @Input()\n @tuiDefaultProp()\n order: readonly string[] = [];\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null,\n @Optional()\n @Self()\n @Inject(FormArrayName)\n private readonly formArrayName: FormArrayName | null,\n @Optional()\n @Self()\n @Inject(FormGroupName)\n private readonly formGroupName: FormGroupName | null,\n @Optional()\n @Self()\n @Inject(FormGroupDirective)\n private readonly formGroup: FormGroupDirective | null,\n @Inject(TUI_VALIDATION_ERRORS)\n private readonly validationErrors: Record<\n string,\n PolymorpheusContent | Observable<PolymorpheusContent>\n >,\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n @tuiPure\n get change$(): Observable<unknown> {\n return merge(\n this.control?.valueChanges || EMPTY,\n this.control?.statusChanges || EMPTY,\n );\n }\n\n get computedError(): Observable<TuiValidationError | null> {\n return (this.invalid && this.touched && this.error) || of(null);\n }\n\n registerOnChange() {}\n\n registerOnTouched() {}\n\n setDisabledState() {}\n\n writeValue() {}\n\n private get error(): Observable<TuiValidationError | null> {\n const {errorId} = this;\n\n if (!errorId) {\n return of(null);\n }\n\n const firstError = this.controlErrors[errorId];\n const errorContent = this.validationErrors[errorId];\n\n return this.getError(firstError, errorContent);\n }\n\n private get invalid(): boolean {\n return !!this.control && this.control.invalid;\n }\n\n private get touched(): boolean {\n return !!this.control && this.control.touched;\n }\n\n private get control(): AbstractControl | null {\n if (this.ngControl) {\n return this.ngControl.control;\n }\n\n if (this.formArrayName) {\n return this.formArrayName.control;\n }\n\n if (this.formGroupName) {\n return this.formGroupName.control;\n }\n\n if (this.formGroup) {\n return this.formGroup.control;\n }\n\n return null;\n }\n\n private get errorId(): string {\n return this.getErrorId(this.order, this.controlErrors);\n }\n\n private get controlErrors(): Record<string, any> {\n return (this.control && this.control.errors) || EMPTY_RECORD;\n }\n\n @tuiPure\n private getErrorId(\n order: readonly string[],\n controlErrors: Record<string, any>,\n ): string {\n const id = order && order.find(errorId => controlErrors[errorId]);\n const fallback = Object.keys(controlErrors)[0];\n\n return id || fallback || '';\n }\n\n @tuiPure\n private getError(\n firstError: any,\n errorContent?: PolymorpheusContent | Observable<PolymorpheusContent>,\n ): Observable<TuiValidationError> {\n if (firstError instanceof TuiValidationError) {\n return of(firstError);\n }\n\n if (errorContent === undefined && typeof firstError === 'string') {\n return of(new TuiValidationError(firstError));\n }\n\n if (isObservable(errorContent)) {\n return errorContent.pipe(\n map(error => new TuiValidationError(error || '', firstError)),\n );\n }\n\n return of(new TuiValidationError(errorContent || '', firstError));\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {TuiErrorModule} from '@taiga-ui/core';\n\nimport {TuiFieldErrorComponent} from './field-error.component';\n\n/**\n * @deprecated use {@link TuiFieldErrorPipeModule} (from '@taiga-ui/kit') instead\n */\n@NgModule({\n imports: [CommonModule, TuiErrorModule, ReactiveFormsModule],\n declarations: [TuiFieldErrorComponent],\n exports: [TuiFieldErrorComponent],\n})\nexport class TuiFieldErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAqBA,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB;IASa,sBAAsB,GAAnC,MAAa,sBAAsB;IAK/B,YAIqB,SAA2B,EAI3B,aAAmC,EAInC,aAAmC,EAInC,SAAoC,EAEpC,gBAGhB;QAjBgB,cAAS,GAAT,SAAS,CAAkB;QAI3B,kBAAa,GAAb,aAAa,CAAsB;QAInC,kBAAa,GAAb,aAAa,CAAsB;QAInC,cAAS,GAAT,SAAS,CAA2B;QAEpC,qBAAgB,GAAhB,gBAAgB,CAGhC;QAvBL,UAAK,GAAsB,EAAE,CAAC;QAyB1B,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;SACvC;KACJ;IAGD,IAAI,OAAO;;QACP,OAAO,KAAK,CACR,OAAA,IAAI,CAAC,OAAO,0CAAE,YAAY,KAAI,KAAK,EACnC,OAAA,IAAI,CAAC,OAAO,0CAAE,aAAa,KAAI,KAAK,CACvC,CAAC;KACL;IAED,IAAI,aAAa;QACb,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC;KACnE;IAED,gBAAgB,MAAK;IAErB,iBAAiB,MAAK;IAEtB,gBAAgB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DAoBP;AArIQ,sBAAsB;IARlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;;;QAG3B,eAAe,EAAE,uBAAuB,CAAC,OAAO;QAChD,kIAA0C;;KAE7C,CAAC;IAOO,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IAEjB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;IAErB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;IAE1B,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;GAtBzB,sBAAsB,CAsIlC;;AC9JD;;;IAQa,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAL/B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,mBAAmB,CAAC;QAC5D,YAAY,EAAE,CAAC,sBAAsB,CAAC;QACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;KACpC,CAAC;GACW,mBAAmB,CAAG;;ACfnC;;;;;;"}
|
|
@@ -54,7 +54,7 @@ __decorate([
|
|
|
54
54
|
], TuiFilterComponent.prototype, "items", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
Input(),
|
|
57
|
-
HostBinding('attr.data-
|
|
57
|
+
HostBinding('attr.data-size'),
|
|
58
58
|
tuiDefaultProp()
|
|
59
59
|
], TuiFilterComponent.prototype, "size", void 0);
|
|
60
60
|
__decorate([
|
|
@@ -80,7 +80,7 @@ TuiFilterComponent = __decorate([
|
|
|
80
80
|
selector: 'tui-filter',
|
|
81
81
|
template: "<ng-container *ngFor=\"let item of items\">\n <tui-checkbox-block\n automation-id=\"tui-filter__checkbox\"\n class=\"item\"\n [disabled]=\"disabledItemHandler(item)\"\n [hideCheckbox]=\"true\"\n [ngModel]=\"isCheckboxEnabled(item)\"\n [size]=\"size\"\n (ngModelChange)=\"onCheckbox($event, item)\"\n >\n <div automation-id=\"tui-filter__content\" class=\"content\">\n <div\n polymorpheus-outlet\n [content]=\"content\"\n [context]=\"getItemContentContext(item)\"\n ></div>\n <tui-badge\n *ngIf=\"badgeHandler(item) as badgeValue\"\n automation-id=\"tui-filter__badge\"\n tuiMode=\"onLight\"\n class=\"badge\"\n [class.badge_disabled]=\"disabledItemHandler(item)\"\n [size]=\"size\"\n [value]=\"badgeValue\"\n ></tui-badge>\n </div>\n </tui-checkbox-block>\n</ng-container>\n",
|
|
82
82
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
83
|
-
styles: [":host{display:block;margin-bottom:-.25rem}.content{display:flex;align-items:center}.item{margin-right:.25rem;margin-bottom:.25rem}.item:last-child,:host[data-
|
|
83
|
+
styles: [":host{display:block;margin-bottom:-.25rem}.content{display:flex;align-items:center}.item{margin-right:.25rem;margin-bottom:.25rem}.item:last-child,:host[data-size='l'] .item:last-child{margin-right:0}:host[data-size='l'] .item{margin-right:.5rem;margin-bottom:.5rem}.badge{margin-left:.25rem}.badge_disabled{opacity:var(--tui-disabled-opacity)}"]
|
|
84
84
|
}),
|
|
85
85
|
__param(0, Optional()),
|
|
86
86
|
__param(0, Self()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-filter.js","sources":["ng://@taiga-ui/kit/components/filter/filter.component.ts","ng://@taiga-ui/kit/components/filter/filter.module.ts","ng://@taiga-ui/kit/components/filter/taiga-ui-kit-components-filter.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiMultipleControl,\n ALWAYS_FALSE_HANDLER,\n isNativeFocusedIn,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiHandler,\n TuiIdentityMatcher,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n// @bad TODO: Add active zone to track focus\n@Component({\n selector: 'tui-filter',\n templateUrl: './filter.template.html',\n styleUrls: ['./filter.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiFilterComponent<T> extends AbstractTuiMultipleControl<T> {\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<T> = [];\n\n @Input()\n @HostBinding('attr.data-
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-filter.js","sources":["ng://@taiga-ui/kit/components/filter/filter.component.ts","ng://@taiga-ui/kit/components/filter/filter.module.ts","ng://@taiga-ui/kit/components/filter/taiga-ui-kit-components-filter.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiMultipleControl,\n ALWAYS_FALSE_HANDLER,\n isNativeFocusedIn,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiHandler,\n TuiIdentityMatcher,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n// @bad TODO: Add active zone to track focus\n@Component({\n selector: 'tui-filter',\n templateUrl: './filter.template.html',\n styleUrls: ['./filter.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiFilterComponent<T> extends AbstractTuiMultipleControl<T> {\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n items: ReadonlyArray<T> = [];\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<T> = ALWAYS_FALSE_HANDLER;\n\n @Output()\n readonly toggledItem = new EventEmitter<T>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super(control, changeDetectorRef);\n }\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent<any> = ({$implicit}: TuiContextWithImplicit<unknown>) =>\n TUI_DEFAULT_STRINGIFY($implicit);\n\n @Input()\n @tuiDefaultProp()\n badgeHandler: TuiHandler<T, number> = item => Number(item);\n\n get focused(): boolean {\n return isNativeFocusedIn(this.elementRef.nativeElement);\n }\n\n @tuiPure\n getItemContentContext($implicit: T): TuiContextWithImplicit<T> {\n return {\n $implicit,\n };\n }\n\n onCheckbox(value: boolean, item: T) {\n this.toggledItem.emit(item);\n this.updateValue(\n value\n ? [...this.value, item]\n : this.value.filter(arrItem => !this.identityMatcher(arrItem, item)),\n );\n }\n\n isCheckboxEnabled(item: T): boolean {\n return this.value.some(arrItem => this.identityMatcher(arrItem, item));\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiModeModule} from '@taiga-ui/core';\nimport {TuiBadgeModule} from '@taiga-ui/kit/components/badge';\nimport {TuiCheckboxBlockModule} from '@taiga-ui/kit/components/checkbox-block';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiFilterComponent} from './filter.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiCheckboxBlockModule,\n TuiBadgeModule,\n TuiModeModule,\n ],\n declarations: [TuiFilterComponent],\n exports: [TuiFilterComponent],\n})\nexport class TuiFilterModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA8BA;IAOa,kBAAkB,GAA/B,MAAa,kBAAsB,SAAQ,0BAA6B;IAqBpE,YAII,OAAyB,EACE,iBAAoC,EAC1B,UAAmC;QAExE,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAFG,eAAU,GAAV,UAAU,CAAyB;QAxB5E,oBAAe,GAA0B,4BAA4B,CAAC;QAItE,UAAK,GAAqB,EAAE,CAAC;QAK7B,SAAI,GAAwB,GAAG,CAAC;QAIhC,wBAAmB,GAAyB,oBAAoB,CAAC;QAGxD,gBAAW,GAAG,IAAI,YAAY,EAAK,CAAC;QAe7C,YAAO,GAA6B,CAAC,EAAC,SAAS,EAAkC,KAC7E,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAIrC,iBAAY,GAA0B,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;KAT1D;IAWD,IAAI,OAAO;QACP,OAAO,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;KAC3D;IAGD,qBAAqB,CAAC,SAAY;QAC9B,OAAO;YACH,SAAS;SACZ,CAAC;KACL;IAED,UAAU,CAAC,KAAc,EAAE,IAAO;QAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CA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,CAAA;GA3Bd,kBAAkB,CAgE9B;;IC/EY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAZ3B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,sBAAsB;YACtB,cAAc;YACd,aAAa;SAChB;QACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACtB/B;;;;;;"}
|
|
@@ -29,6 +29,10 @@ const TUI_INPUT_COUNT_DEFAULT_OPTIONS = {
|
|
|
29
29
|
const TUI_INPUT_COUNT_OPTIONS = new InjectionToken('Default parameters for input count component', {
|
|
30
30
|
factory: () => TUI_INPUT_COUNT_DEFAULT_OPTIONS,
|
|
31
31
|
});
|
|
32
|
+
const tuiInputCountOptionsProvider = (options) => ({
|
|
33
|
+
provide: TUI_INPUT_COUNT_OPTIONS,
|
|
34
|
+
useValue: Object.assign(Object.assign({}, TUI_INPUT_COUNT_DEFAULT_OPTIONS), options),
|
|
35
|
+
});
|
|
32
36
|
|
|
33
37
|
var TuiInputCountComponent_1;
|
|
34
38
|
// @dynamic
|
|
@@ -232,7 +236,7 @@ __decorate([
|
|
|
232
236
|
HostBinding('class._hide-buttons')
|
|
233
237
|
], TuiInputCountComponent.prototype, "buttonsHidden", null);
|
|
234
238
|
__decorate([
|
|
235
|
-
HostBinding('attr.data-
|
|
239
|
+
HostBinding('attr.data-size')
|
|
236
240
|
], TuiInputCountComponent.prototype, "size", null);
|
|
237
241
|
TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
238
242
|
Component({
|
|
@@ -249,7 +253,7 @@ TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
|
249
253
|
useExisting: forwardRef(() => TuiInputCountComponent_1),
|
|
250
254
|
},
|
|
251
255
|
],
|
|
252
|
-
styles: [":host{display:flex;font:var(--tui-font-text-s);border-radius:var(--tui-radius-m);height:var(--tui-height-m);color:var(--tui-text-01);text-align:left}:host._disabled{pointer-events:none}:host[data-
|
|
256
|
+
styles: [":host{display:flex;font:var(--tui-font-text-s);border-radius:var(--tui-radius-m);height:var(--tui-height-m);color:var(--tui-text-01);text-align:left}:host._disabled{pointer-events:none}:host[data-size='l']{font:var(--tui-font-text-m);height:var(--tui-height-l)}.textfield{position:relative;border-radius:inherit;text-align:inherit;flex-grow:1;min-width:0}:host:not(._hide-buttons) .textfield{border-top-right-radius:0;border-bottom-right-radius:0}.buttons{display:flex;flex-direction:column;margin-left:.125rem;height:100%}.buttons .button{display:flex;width:calc(var(--tui-height-m) * .75);height:calc(50% - .0625rem)}.buttons .button_plus{margin-bottom:.125rem;border-radius:0 var(--tui-radius-m) 0 0}.buttons .button_minus{border-radius:0 0 var(--tui-radius-m)}:host[data-size='l'] .buttons .button{width:calc(var(--tui-height-l) * .75)}"]
|
|
253
257
|
}),
|
|
254
258
|
__param(0, Optional()),
|
|
255
259
|
__param(0, Self()),
|
|
@@ -307,5 +311,5 @@ TuiInputCountModule = __decorate([
|
|
|
307
311
|
* Generated bundle index. Do not edit.
|
|
308
312
|
*/
|
|
309
313
|
|
|
310
|
-
export { PASSWORD_ICON_DOWN, PASSWORD_ICON_UP, TUI_INPUT_COUNT_DEFAULT_OPTIONS, TUI_INPUT_COUNT_OPTIONS, TuiInputCountComponent, TuiInputCountDirective, TuiInputCountModule };
|
|
314
|
+
export { PASSWORD_ICON_DOWN, PASSWORD_ICON_UP, TUI_INPUT_COUNT_DEFAULT_OPTIONS, TUI_INPUT_COUNT_OPTIONS, TuiInputCountComponent, TuiInputCountDirective, TuiInputCountModule, tuiInputCountOptionsProvider };
|
|
311
315
|
//# sourceMappingURL=taiga-ui-kit-components-input-count.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-count.js","sources":["ng://@taiga-ui/kit/components/input-count/input-count-options.ts","ng://@taiga-ui/kit/components/input-count/input-count.component.ts","ng://@taiga-ui/kit/components/input-count/input-count.directive.ts","ng://@taiga-ui/kit/components/input-count/input-count.module.ts","ng://@taiga-ui/kit/components/input-count/taiga-ui-kit-components-input-count.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface InputCountOptions {\n readonly icons: Readonly<{\n up: PolymorpheusContent<{}>;\n down: PolymorpheusContent<{}>;\n }>;\n readonly appearance: string;\n readonly hideButtons: boolean;\n readonly min: number;\n readonly max: number;\n readonly step: number;\n readonly postfix: string;\n}\n\n// TODO: remove in ivy compilation\nexport const PASSWORD_ICON_UP = 'tuiIconPlus';\nexport const PASSWORD_ICON_DOWN = 'tuiIconMinus';\n\n/** Default values for the input count options. */\nexport const TUI_INPUT_COUNT_DEFAULT_OPTIONS: InputCountOptions = {\n icons: {\n up: PASSWORD_ICON_UP,\n down: PASSWORD_ICON_DOWN,\n },\n appearance: 'textfield',\n hideButtons: false,\n min: 0,\n max: Infinity,\n step: 1,\n postfix: '',\n};\n\nexport const TUI_INPUT_COUNT_OPTIONS = new InjectionToken<InputCountOptions>(\n 'Default parameters for input count component',\n {\n factory: () => TUI_INPUT_COUNT_DEFAULT_OPTIONS,\n },\n);\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\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 AbstractTuiControl,\n clamp,\n isNativeFocused,\n isPresent,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n NumberFormatSettings,\n TUI_NUMBER_FORMAT,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_SIZE,\n tuiCreateNumberMask,\n TuiPrimitiveTextfieldComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldSizeDirective,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TUI_PLUS_MINUS_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {InputCountOptions, TUI_INPUT_COUNT_OPTIONS} from './input-count-options';\n\n// @dynamic\n@Component({\n selector: 'tui-input-count',\n templateUrl: './input-count.template.html',\n styleUrls: ['./input-count.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputCountComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputCountComponent),\n },\n ],\n})\nexport class TuiInputCountComponent\n extends AbstractTuiControl<number>\n implements TuiWithOptionalMinMax<number>, TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly primitiveTextfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n step = this.options.step;\n\n @Input()\n @tuiDefaultProp()\n min = this.options.min;\n\n @Input()\n @tuiDefaultProp()\n max = this.options.max;\n\n @Input()\n @tuiDefaultProp()\n hideButtons = this.options.hideButtons;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = this.options.postfix;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE)\n private readonly appearance: string,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_PLUS_MINUS_TEXTS)\n readonly minusTexts$: Observable<[string, string]>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_INPUT_COUNT_OPTIONS)\n readonly options: InputCountOptions,\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: NumberFormatSettings,\n ) {\n super(control, changeDetectorRef);\n }\n\n @tuiPure\n getMask(allowNegative: boolean): TuiTextMaskOptions {\n return {\n mask: tuiCreateNumberMask({\n allowNegative,\n decimalSymbol: this.numberFormat.decimalSeparator,\n thousandSymbol: this.numberFormat.thousandSeparator,\n }),\n guide: false,\n };\n }\n\n // TODO: Remove in v.3\n @HostBinding('class._hide-buttons')\n get buttonsHidden(): boolean {\n return this.hideButtons || this.appearance === 'table';\n }\n\n get iconUp(): PolymorpheusContent<{}> {\n return this.options.icons.up;\n }\n\n get iconDown(): PolymorpheusContent<{}> {\n return this.options.icons.down;\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.primitiveTextfield || this.computedDisabled\n ? null\n : this.primitiveTextfield.nativeFocusableElement;\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.textfieldSize.size;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get exampleText(): string {\n return String(this.min);\n }\n\n get computedValue(): string {\n return this.formatNumber(this.value);\n }\n\n get minusButtonDisabled(): boolean {\n return !this.interactive || (isPresent(this.value) && this.value <= this.min);\n }\n\n get plusButtonDisabled(): boolean {\n return !this.interactive || (isPresent(this.value) && this.value >= this.max);\n }\n\n onButtonMouseDown(event: MouseEvent, disabled: boolean = false) {\n if (disabled || !this.nativeFocusableElement || this.isMobile) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.nativeFocusableElement);\n }\n\n onFocused(focused: boolean) {\n if (!focused) {\n this.onBlur();\n }\n\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValueChange() {\n const capped = this.capValue(this.nativeNumberValue);\n\n if (capped === null || isNaN(capped)) {\n return;\n }\n\n const newValue = this.formatNumber(capped);\n\n if (this.nativeValue !== newValue) {\n this.nativeValue = newValue;\n }\n\n this.updateValue(capped);\n }\n\n decreaseValue() {\n if (this.readOnly) {\n return;\n }\n\n const newValue = (this.value || 0) - this.step;\n\n this.safeUpdateValue(newValue);\n }\n\n increaseValue() {\n if (this.readOnly) {\n return;\n }\n\n const newValue = (this.value || 0) + this.step;\n\n this.safeUpdateValue(newValue);\n }\n\n onKeydown(event: KeyboardEvent) {\n switch (event.key) {\n case 'ArrowUp':\n case 'Up':\n this.increaseValue();\n event.preventDefault();\n break;\n case 'ArrowDown':\n case 'Down':\n this.decreaseValue();\n event.preventDefault();\n break;\n default:\n break;\n }\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private get nativeNumberValue(): number {\n return parseInt(\n this.nativeValue.split(this.numberFormat.thousandSeparator).join(''),\n 10,\n );\n }\n\n private get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : '';\n }\n\n private set nativeValue(value: string) {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n this.nativeFocusableElement.value = value;\n }\n\n private safeUpdateValue(newValue: number) {\n const value = clamp(newValue, this.min, this.max);\n\n this.updateValue(value);\n this.nativeValue = this.formatNumber(value);\n }\n\n private capValue(value: number): number | null {\n const capped = Math.min(value, this.max);\n\n return isNaN(capped) || capped < this.min ? null : capped;\n }\n\n private onBlur() {\n const value = Math.max(this.nativeNumberValue || 0, this.min);\n const formattedValue = this.formatNumber(value);\n\n this.nativeValue = formattedValue;\n this.updateValue(value);\n\n if (this.primitiveTextfield) {\n this.primitiveTextfield.value = formattedValue;\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 {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputCountComponent} from './input-count.component';\n\n@Directive({\n selector: 'tui-input-count',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputCountDirective),\n },\n ],\n})\nexport class TuiInputCountDirective extends TuiAbstractTextfieldHost<TuiInputCountComponent> {\n onValueChange() {\n this.host.onValueChange();\n }\n\n process(input: HTMLInputElement) {\n input.autocomplete = 'off';\n input.inputMode = 'numeric';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiButtonModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputCountComponent} from './input-count.component';\nimport {TuiInputCountDirective} from './input-count.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n TuiButtonModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiValueAccessorModule,\n PolymorpheusModule,\n ],\n declarations: [TuiInputCountComponent, TuiInputCountDirective],\n exports: [TuiInputCountComponent, TuiInputCountDirective, TuiTextfieldComponent],\n})\nexport class TuiInputCountModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAgBA;MACa,gBAAgB,GAAG,cAAc;MACjC,kBAAkB,GAAG,eAAe;AAEjD;MACa,+BAA+B,GAAsB;IAC9D,KAAK,EAAE;QACH,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,kBAAkB;KAC3B;IACD,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,KAAK;IAClB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,EAAE;EACb;MAEW,uBAAuB,GAAG,IAAI,c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Q,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,cAAc;YACd,eAAe;YACf,2BAA2B;YAC3B,4BAA4B;YAC5B,sBAAsB;YACtB,kBAAkB;SACrB;QACD,YAAY,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;QAC9D,OAAO,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC;KACnF,CAAC;GACW,mBAAmB,CAAG;;AC5BnC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-count.js","sources":["ng://@taiga-ui/kit/components/input-count/input-count-options.ts","ng://@taiga-ui/kit/components/input-count/input-count.component.ts","ng://@taiga-ui/kit/components/input-count/input-count.directive.ts","ng://@taiga-ui/kit/components/input-count/input-count.module.ts","ng://@taiga-ui/kit/components/input-count/taiga-ui-kit-components-input-count.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiInputCountOptions {\n readonly icons: Readonly<{\n up: PolymorpheusContent<{}>;\n down: PolymorpheusContent<{}>;\n }>;\n readonly appearance: string;\n readonly hideButtons: boolean;\n readonly min: number;\n readonly max: number;\n readonly step: number;\n readonly postfix: string;\n}\n\n/**\n * @deprecated: use TuiInputCountOptions instead\n * todo: remove in 3.0\n */\nexport type InputCountOptions = TuiInputCountOptions;\n\n// TODO: remove in ivy compilation\nexport const PASSWORD_ICON_UP = 'tuiIconPlus';\nexport const PASSWORD_ICON_DOWN = 'tuiIconMinus';\n\n/** Default values for the input count options. */\nexport const TUI_INPUT_COUNT_DEFAULT_OPTIONS: TuiInputCountOptions = {\n icons: {\n up: PASSWORD_ICON_UP,\n down: PASSWORD_ICON_DOWN,\n },\n appearance: 'textfield',\n hideButtons: false,\n min: 0,\n max: Infinity,\n step: 1,\n postfix: '',\n};\n\nexport const TUI_INPUT_COUNT_OPTIONS = new InjectionToken<TuiInputCountOptions>(\n 'Default parameters for input count component',\n {\n factory: () => TUI_INPUT_COUNT_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiInputCountOptionsProvider: (\n options: Partial<TuiInputCountOptions>,\n) => ValueProvider = (options: Partial<TuiInputCountOptions>) => ({\n provide: TUI_INPUT_COUNT_OPTIONS,\n useValue: {...TUI_INPUT_COUNT_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\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 AbstractTuiControl,\n clamp,\n isNativeFocused,\n isPresent,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n NumberFormatSettings,\n TUI_NUMBER_FORMAT,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_SIZE,\n tuiCreateNumberMask,\n TuiPrimitiveTextfieldComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldSizeDirective,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TUI_PLUS_MINUS_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_INPUT_COUNT_OPTIONS, TuiInputCountOptions} from './input-count-options';\n\n// @dynamic\n@Component({\n selector: 'tui-input-count',\n templateUrl: './input-count.template.html',\n styleUrls: ['./input-count.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputCountComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputCountComponent),\n },\n ],\n})\nexport class TuiInputCountComponent\n extends AbstractTuiControl<number>\n implements TuiWithOptionalMinMax<number>, TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly primitiveTextfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n step = this.options.step;\n\n @Input()\n @tuiDefaultProp()\n min = this.options.min;\n\n @Input()\n @tuiDefaultProp()\n max = this.options.max;\n\n @Input()\n @tuiDefaultProp()\n hideButtons = this.options.hideButtons;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = this.options.postfix;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE)\n private readonly appearance: string,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_PLUS_MINUS_TEXTS)\n readonly minusTexts$: Observable<[string, string]>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_INPUT_COUNT_OPTIONS)\n readonly options: TuiInputCountOptions,\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: NumberFormatSettings,\n ) {\n super(control, changeDetectorRef);\n }\n\n @tuiPure\n getMask(allowNegative: boolean): TuiTextMaskOptions {\n return {\n mask: tuiCreateNumberMask({\n allowNegative,\n decimalSymbol: this.numberFormat.decimalSeparator,\n thousandSymbol: this.numberFormat.thousandSeparator,\n }),\n guide: false,\n };\n }\n\n // TODO: Remove in v.3\n @HostBinding('class._hide-buttons')\n get buttonsHidden(): boolean {\n return this.hideButtons || this.appearance === 'table';\n }\n\n get iconUp(): PolymorpheusContent<{}> {\n return this.options.icons.up;\n }\n\n get iconDown(): PolymorpheusContent<{}> {\n return this.options.icons.down;\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.primitiveTextfield || this.computedDisabled\n ? null\n : this.primitiveTextfield.nativeFocusableElement;\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.textfieldSize.size;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get exampleText(): string {\n return String(this.min);\n }\n\n get computedValue(): string {\n return this.formatNumber(this.value);\n }\n\n get minusButtonDisabled(): boolean {\n return !this.interactive || (isPresent(this.value) && this.value <= this.min);\n }\n\n get plusButtonDisabled(): boolean {\n return !this.interactive || (isPresent(this.value) && this.value >= this.max);\n }\n\n onButtonMouseDown(event: MouseEvent, disabled: boolean = false) {\n if (disabled || !this.nativeFocusableElement || this.isMobile) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.nativeFocusableElement);\n }\n\n onFocused(focused: boolean) {\n if (!focused) {\n this.onBlur();\n }\n\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValueChange() {\n const capped = this.capValue(this.nativeNumberValue);\n\n if (capped === null || isNaN(capped)) {\n return;\n }\n\n const newValue = this.formatNumber(capped);\n\n if (this.nativeValue !== newValue) {\n this.nativeValue = newValue;\n }\n\n this.updateValue(capped);\n }\n\n decreaseValue() {\n if (this.readOnly) {\n return;\n }\n\n const newValue = (this.value || 0) - this.step;\n\n this.safeUpdateValue(newValue);\n }\n\n increaseValue() {\n if (this.readOnly) {\n return;\n }\n\n const newValue = (this.value || 0) + this.step;\n\n this.safeUpdateValue(newValue);\n }\n\n onKeydown(event: KeyboardEvent) {\n switch (event.key) {\n case 'ArrowUp':\n case 'Up':\n this.increaseValue();\n event.preventDefault();\n break;\n case 'ArrowDown':\n case 'Down':\n this.decreaseValue();\n event.preventDefault();\n break;\n default:\n break;\n }\n }\n\n protected getFallbackValue(): number {\n return 0;\n }\n\n private get nativeNumberValue(): number {\n return parseInt(\n this.nativeValue.split(this.numberFormat.thousandSeparator).join(''),\n 10,\n );\n }\n\n private get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : '';\n }\n\n private set nativeValue(value: string) {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n this.nativeFocusableElement.value = value;\n }\n\n private safeUpdateValue(newValue: number) {\n const value = clamp(newValue, this.min, this.max);\n\n this.updateValue(value);\n this.nativeValue = this.formatNumber(value);\n }\n\n private capValue(value: number): number | null {\n const capped = Math.min(value, this.max);\n\n return isNaN(capped) || capped < this.min ? null : capped;\n }\n\n private onBlur() {\n const value = Math.max(this.nativeNumberValue || 0, this.min);\n const formattedValue = this.formatNumber(value);\n\n this.nativeValue = formattedValue;\n this.updateValue(value);\n\n if (this.primitiveTextfield) {\n this.primitiveTextfield.value = formattedValue;\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 {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputCountComponent} from './input-count.component';\n\n@Directive({\n selector: 'tui-input-count',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputCountDirective),\n },\n ],\n})\nexport class TuiInputCountDirective extends TuiAbstractTextfieldHost<TuiInputCountComponent> {\n onValueChange() {\n this.host.onValueChange();\n }\n\n process(input: HTMLInputElement) {\n input.autocomplete = 'off';\n input.inputMode = 'numeric';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiButtonModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputCountComponent} from './input-count.component';\nimport {TuiInputCountDirective} from './input-count.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n TuiButtonModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiValueAccessorModule,\n PolymorpheusModule,\n ],\n declarations: [TuiInputCountComponent, TuiInputCountDirective],\n exports: [TuiInputCountComponent, TuiInputCountDirective, TuiTextfieldComponent],\n})\nexport class TuiInputCountModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBA;MACa,gBAAgB,GAAG,cAAc;MACjC,kBAAkB,GAAG,eAAe;AAEjD;MACa,+BAA+B,GAAyB;IACjE,KAAK,EAAE;QACH,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,kBAAkB;KAC3B;IACD,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,KAAK;IAClB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,EAAE;EACb;MAEW,uBAAuB,GAAG,IAAI,cAAc,CACrD,8CAA8C,EAC9C;IACI,OAAO,EAAE,MAAM,+BAA+B;CACjD,EACH;MAEW,4BAA4B,GAEpB,CAAC,OAAsC,MAAM;IAC9D,OAAO,EAAE,uBAAuB;IAChC,QAAQ,kCAAM,+BAA+B,GAAK,OAAO,CAAC;CAC7D;;;ACPD;IAiBa,sBAAsB,8BAAnC,MAAa,sBACT,SAAQ,kBAA0B;IA8BlC,YAII,OAAyB,EACE,iBAAoC,EAE9C,UAAkB,EAElB,aAAwC,EAEhD,WAAyC,EACV,QAAiB,EAEhD,OAA6B,EAErB,YAAkC;QAEnD,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAXjB,eAAU,GAAV,UAAU,CAAQ;QAElB,kBAAa,GAAb,aAAa,CAA2B;QAEhD,gBAAW,GAAX,WAAW,CAA8B;QACV,aAAQ,GAAR,QAAQ,CAAS;QA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
import { forwardRef, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl } from '@angular/forms';
|
|
4
|
-
import { AbstractTuiNullableControl, TUI_FIRST_DAY, TUI_LAST_DAY, ALWAYS_FALSE_HANDLER, TuiMonthRange, tuiDefaultProp,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl, AbstractTuiNullableControl, TUI_FIRST_DAY, TUI_LAST_DAY, ALWAYS_FALSE_HANDLER, TuiMonthRange, tuiDefaultProp, TuiDestroyService, TuiPreventDefaultModule, TuiActiveZoneModule, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
5
|
+
import { TuiMonthPipe, sizeBigger, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TuiPrimitiveTextfieldComponent, TuiAbstractTextfieldHost, TUI_TEXTFIELD_HOST, TuiHostedDropdownModule, TuiPrimitiveTextfieldModule, TuiSvgModule, TuiTextfieldComponent } from '@taiga-ui/core';
|
|
6
|
+
import { TUI_MONTH_FORMATTER } from '@taiga-ui/kit/tokens';
|
|
7
|
+
import { LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER, TUI_MONTH_FORMATTER_PROVIDER } from '@taiga-ui/kit/providers';
|
|
8
|
+
import { Subject, combineLatest, Observable } from 'rxjs';
|
|
9
|
+
import { distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';
|
|
8
10
|
import { CommonModule } from '@angular/common';
|
|
9
11
|
import { TuiCalendarMonthModule } from '@taiga-ui/kit/components/calendar-month';
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
const TUI_INPUT_MONTH_RANGE_PROVIDERS = [
|
|
14
|
+
{
|
|
15
|
+
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
16
|
+
useExisting: forwardRef(() => TuiInputMonthRangeComponent),
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
provide: AbstractTuiControl,
|
|
20
|
+
useExisting: forwardRef(() => TuiInputMonthRangeComponent),
|
|
21
|
+
},
|
|
22
|
+
LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER,
|
|
23
|
+
TUI_MONTH_FORMATTER_PROVIDER,
|
|
24
|
+
TuiMonthPipe,
|
|
25
|
+
];
|
|
26
|
+
|
|
12
27
|
// @dynamic
|
|
13
|
-
let TuiInputMonthRangeComponent =
|
|
14
|
-
constructor(control, changeDetectorRef,
|
|
28
|
+
let TuiInputMonthRangeComponent = class TuiInputMonthRangeComponent extends AbstractTuiNullableControl {
|
|
29
|
+
constructor(control, changeDetectorRef, formatter, textfieldSize) {
|
|
15
30
|
super(control, changeDetectorRef);
|
|
16
|
-
this.
|
|
31
|
+
this.formatter = formatter;
|
|
17
32
|
this.textfieldSize = textfieldSize;
|
|
18
33
|
this.min = TUI_FIRST_DAY;
|
|
19
34
|
this.max = TUI_LAST_DAY;
|
|
@@ -31,18 +46,16 @@ let TuiInputMonthRangeComponent = TuiInputMonthRangeComponent_1 = class TuiInput
|
|
|
31
46
|
? 'tuiIconCalendarLarge'
|
|
32
47
|
: 'tuiIconCalendar';
|
|
33
48
|
}
|
|
34
|
-
computeValue(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
const formattedValueTo = !value.isSingleMonth || !focused ? this.formatMonth(value.to, months) : '';
|
|
39
|
-
return `${this.formatMonth(value.from, months)} — ${formattedValueTo}`;
|
|
49
|
+
computeValue(from, to) {
|
|
50
|
+
const formattedTo = from === to && this.focused ? '' : to;
|
|
51
|
+
return `${from} — ${formattedTo}`;
|
|
40
52
|
}
|
|
41
53
|
onValueChange(value) {
|
|
42
|
-
if (value
|
|
43
|
-
|
|
44
|
-
this.onOpenChange(true);
|
|
54
|
+
if (value) {
|
|
55
|
+
return;
|
|
45
56
|
}
|
|
57
|
+
this.updateValue(null);
|
|
58
|
+
this.onOpenChange(true);
|
|
46
59
|
}
|
|
47
60
|
onMonthClick(month) {
|
|
48
61
|
if (this.value === null || !this.value.isSingleMonth) {
|
|
@@ -71,9 +84,6 @@ let TuiInputMonthRangeComponent = TuiInputMonthRangeComponent_1 = class TuiInput
|
|
|
71
84
|
super.setDisabledState();
|
|
72
85
|
this.close();
|
|
73
86
|
}
|
|
74
|
-
formatMonth({ month, formattedYear }, months) {
|
|
75
|
-
return `${months[month]} ${formattedYear}`;
|
|
76
|
-
}
|
|
77
87
|
close() {
|
|
78
88
|
this.open = false;
|
|
79
89
|
}
|
|
@@ -81,7 +91,7 @@ let TuiInputMonthRangeComponent = TuiInputMonthRangeComponent_1 = class TuiInput
|
|
|
81
91
|
TuiInputMonthRangeComponent.ctorParameters = () => [
|
|
82
92
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
83
93
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
84
|
-
{ type:
|
|
94
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_MONTH_FORMATTER,] }] },
|
|
85
95
|
{ type: TuiTextfieldSizeDirective, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_SIZE,] }] }
|
|
86
96
|
];
|
|
87
97
|
__decorate([
|
|
@@ -99,21 +109,11 @@ __decorate([
|
|
|
99
109
|
Input(),
|
|
100
110
|
tuiDefaultProp()
|
|
101
111
|
], TuiInputMonthRangeComponent.prototype, "disabledItemHandler", void 0);
|
|
102
|
-
TuiInputMonthRangeComponent =
|
|
112
|
+
TuiInputMonthRangeComponent = __decorate([
|
|
103
113
|
Component({
|
|
104
114
|
selector: 'tui-input-month-range',
|
|
105
|
-
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n
|
|
106
|
-
providers:
|
|
107
|
-
{
|
|
108
|
-
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
109
|
-
useExisting: forwardRef(() => TuiInputMonthRangeComponent_1),
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
provide: AbstractTuiControl,
|
|
113
|
-
useExisting: forwardRef(() => TuiInputMonthRangeComponent_1),
|
|
114
|
-
},
|
|
115
|
-
LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER,
|
|
116
|
-
],
|
|
115
|
+
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n class=\"textfield\"\n [editable]=\"false\"\n [disabled]=\"computedDisabled\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [iconContent]=\"calendarIcon\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [invalid]=\"computedInvalid\"\n [value]=\"value ? computeValue(value.from | tuiMapper : formatter | async, value.to | tuiMapper : formatter | async) : ''\"\n (valueChange)=\"onValueChange($event)\"\n (hoveredChange)=\"onHovered($event)\"\n >\n <ng-content></ng-content>\n <ng-content select=\"input\" ngProjectAs=\"input\"></ng-content>\n </tui-primitive-textfield>\n\n <ng-template #dropdown>\n <tui-calendar-month\n tuiPreventDefault=\"mousedown\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"value\"\n (monthClick)=\"onMonthClick($event)\"\n ></tui-calendar-month>\n </ng-template>\n</tui-hosted-dropdown>\n",
|
|
116
|
+
providers: TUI_INPUT_MONTH_RANGE_PROVIDERS,
|
|
117
117
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
118
118
|
styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.hosted{display:block;border-radius:inherit}.textfield{border-radius:inherit;text-align:inherit}.icon{position:relative;cursor:pointer}"]
|
|
119
119
|
}),
|
|
@@ -121,24 +121,45 @@ TuiInputMonthRangeComponent = TuiInputMonthRangeComponent_1 = __decorate([
|
|
|
121
121
|
__param(0, Self()),
|
|
122
122
|
__param(0, Inject(NgControl)),
|
|
123
123
|
__param(1, Inject(ChangeDetectorRef)),
|
|
124
|
-
__param(2, Inject(
|
|
124
|
+
__param(2, Inject(TUI_MONTH_FORMATTER)),
|
|
125
125
|
__param(3, Inject(TUI_TEXTFIELD_SIZE))
|
|
126
126
|
], TuiInputMonthRangeComponent);
|
|
127
127
|
|
|
128
128
|
var TuiInputMonthRangeDirective_1;
|
|
129
129
|
let TuiInputMonthRangeDirective = TuiInputMonthRangeDirective_1 = class TuiInputMonthRangeDirective extends TuiAbstractTextfieldHost {
|
|
130
|
+
constructor(host, formatter, destroy$) {
|
|
131
|
+
super(host);
|
|
132
|
+
this.value$ = new Subject();
|
|
133
|
+
this.localizedValue = ['', ''];
|
|
134
|
+
this.value$
|
|
135
|
+
.pipe(distinctUntilChanged(), switchMap((value) => combineLatest([
|
|
136
|
+
formatter(value && value.from),
|
|
137
|
+
formatter(value && value.to),
|
|
138
|
+
])), takeUntil(destroy$))
|
|
139
|
+
.subscribe(localizedValue => {
|
|
140
|
+
this.localizedValue = localizedValue;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
130
143
|
get readOnly() {
|
|
131
144
|
return true;
|
|
132
145
|
}
|
|
133
|
-
// TODO: Fix change detection
|
|
134
146
|
get value() {
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
return this.localizedValue[0]
|
|
148
|
+
? this.host.computeValue(...this.localizedValue)
|
|
149
|
+
: '';
|
|
150
|
+
}
|
|
151
|
+
ngDoCheck() {
|
|
152
|
+
this.value$.next(this.host.value);
|
|
137
153
|
}
|
|
138
154
|
onValueChange(value) {
|
|
139
155
|
this.host.onValueChange(value);
|
|
140
156
|
}
|
|
141
157
|
};
|
|
158
|
+
TuiInputMonthRangeDirective.ctorParameters = () => [
|
|
159
|
+
{ type: TuiInputMonthRangeComponent, decorators: [{ type: Inject, args: [AbstractTuiControl,] }] },
|
|
160
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_MONTH_FORMATTER,] }] },
|
|
161
|
+
{ type: Observable, decorators: [{ type: Self }, { type: Inject, args: [TuiDestroyService,] }] }
|
|
162
|
+
];
|
|
142
163
|
TuiInputMonthRangeDirective = TuiInputMonthRangeDirective_1 = __decorate([
|
|
143
164
|
Directive({
|
|
144
165
|
selector: 'tui-input-month-range',
|
|
@@ -147,8 +168,12 @@ TuiInputMonthRangeDirective = TuiInputMonthRangeDirective_1 = __decorate([
|
|
|
147
168
|
provide: TUI_TEXTFIELD_HOST,
|
|
148
169
|
useExisting: forwardRef(() => TuiInputMonthRangeDirective_1),
|
|
149
170
|
},
|
|
171
|
+
TuiDestroyService,
|
|
150
172
|
],
|
|
151
|
-
})
|
|
173
|
+
}),
|
|
174
|
+
__param(0, Inject(AbstractTuiControl)),
|
|
175
|
+
__param(1, Inject(TUI_MONTH_FORMATTER)),
|
|
176
|
+
__param(2, Self()), __param(2, Inject(TuiDestroyService))
|
|
152
177
|
], TuiInputMonthRangeDirective);
|
|
153
178
|
|
|
154
179
|
let TuiInputMonthRangeModule = class TuiInputMonthRangeModule {
|
|
@@ -163,6 +188,7 @@ TuiInputMonthRangeModule = __decorate([
|
|
|
163
188
|
TuiSvgModule,
|
|
164
189
|
TuiPreventDefaultModule,
|
|
165
190
|
TuiActiveZoneModule,
|
|
191
|
+
TuiMapperPipeModule,
|
|
166
192
|
],
|
|
167
193
|
declarations: [TuiInputMonthRangeComponent, TuiInputMonthRangeDirective],
|
|
168
194
|
exports: [
|
|
@@ -177,5 +203,5 @@ TuiInputMonthRangeModule = __decorate([
|
|
|
177
203
|
* Generated bundle index. Do not edit.
|
|
178
204
|
*/
|
|
179
205
|
|
|
180
|
-
export { TuiInputMonthRangeComponent, TuiInputMonthRangeDirective, TuiInputMonthRangeModule };
|
|
206
|
+
export { TUI_INPUT_MONTH_RANGE_PROVIDERS, TuiInputMonthRangeComponent, TuiInputMonthRangeDirective, TuiInputMonthRangeModule };
|
|
181
207
|
//# sourceMappingURL=taiga-ui-kit-components-input-month-range.js.map
|