@taiga-ui/kit 2.29.0 → 2.33.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 +5 -4
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
- 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 +31 -8
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +4 -1
- 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 +5 -4
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +1 -1
- 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 +71 -40
- 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-input-copy.umd.js +47 -17
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +38 -9
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +83 -29
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +83 -37
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +79 -29
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.js +1 -8
- package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -15
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +52 -10
- 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 +1 -1
- 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 +48 -10
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +53 -13
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +45 -11
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +51 -23
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +61 -25
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +8 -5
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +8 -5
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +14 -14
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +33 -4
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +24 -18
- 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-rating.umd.js +368 -0
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-components-rating.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-components-rating.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-components-select.umd.js +75 -36
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +2 -2
- 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 +8 -6
- 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-tree.umd.js +23 -13
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components.umd.js +12 -4
- package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +8 -0
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.js +6 -5
- 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 +7 -0
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +19 -10
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +241 -6
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.min.js +15 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.min.js.map +1 -1
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/arrow/arrow-options.d.ts +16 -0
- package/components/arrow/arrow.component.d.ts +5 -3
- package/components/arrow/index.d.ts +1 -0
- package/components/arrow/taiga-ui-kit-components-arrow.metadata.json +1 -1
- package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -1
- package/components/combo-box/combo-box.component.d.ts +4 -4
- package/components/combo-box/combo-box.directive.d.ts +6 -0
- package/components/combo-box/combo-box.providers.d.ts +2 -0
- package/components/combo-box/index.d.ts +2 -0
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/input/index.d.ts +1 -0
- package/components/input/input.directive.d.ts +5 -0
- package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
- package/components/input-copy/index.d.ts +2 -0
- package/components/input-copy/input-copy.directive.d.ts +5 -0
- package/components/input-copy/input-copy.providers.d.ts +2 -0
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/index.d.ts +1 -0
- package/components/input-count/input-count.directive.d.ts +6 -0
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/index.d.ts +2 -0
- package/components/input-date/input-date.component.d.ts +3 -4
- package/components/input-date/input-date.directive.d.ts +7 -0
- package/components/input-date/input-date.providers.d.ts +4 -0
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/index.d.ts +2 -0
- package/components/input-date-range/input-date-range.component.d.ts +3 -4
- package/components/input-date-range/input-date-range.directive.d.ts +7 -0
- package/components/input-date-range/input-date-range.providers.d.ts +4 -0
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/index.d.ts +2 -0
- package/components/input-date-time/input-date-time.component.d.ts +3 -5
- package/components/input-date-time/input-date-time.directive.d.ts +7 -0
- package/components/input-date-time/input-date-time.providers.d.ts +4 -0
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-file/input-file.component.d.ts +0 -1
- package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
- package/components/input-inline/input-inline.component.d.ts +0 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-month/index.d.ts +1 -0
- package/components/input-month/input-month.component.d.ts +2 -3
- package/components/input-month/input-month.directive.d.ts +7 -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 +2 -3
- package/components/input-month-range/input-month-range.directive.d.ts +7 -0
- package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
- package/components/input-number/index.d.ts +1 -0
- package/components/input-number/input-number.component.d.ts +1 -1
- package/components/input-number/input-number.directive.d.ts +7 -0
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/index.d.ts +1 -0
- package/components/input-password/input-password.component.d.ts +0 -1
- package/components/input-password/input-password.directive.d.ts +8 -0
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/index.d.ts +1 -0
- package/components/input-phone/input-phone.component.d.ts +1 -1
- package/components/input-phone/input-phone.directive.d.ts +7 -0
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/const/countries.d.ts +15 -7
- package/components/input-phone-international/index.d.ts +2 -0
- package/components/input-phone-international/input-phone-international.component.d.ts +4 -3
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-phone-international/tokens/countries-masks.d.ts +3 -0
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -0
- package/components/input-range/input-range.component.d.ts +2 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +2 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/input-time-options.d.ts +3 -0
- package/components/input-time/input-time.component.d.ts +7 -8
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/multi-select/multi-select.component.d.ts +4 -2
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/rating/index.d.ts +3 -0
- package/components/rating/package.json +13 -0
- package/components/rating/rating-options.d.ts +9 -0
- package/components/rating/rating.component.d.ts +21 -0
- package/components/rating/rating.module.d.ts +2 -0
- package/components/rating/taiga-ui-kit-components-rating.d.ts +4 -0
- package/components/rating/taiga-ui-kit-components-rating.metadata.json +1 -0
- package/components/select/index.d.ts +2 -0
- package/components/select/select.component.d.ts +3 -3
- package/components/select/select.directive.d.ts +7 -0
- package/components/select/select.providers.d.ts +2 -0
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
- package/components/taiga-ui-kit-components.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/tree/components/tree/tree.component.d.ts +3 -1
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/max-time-values.d.ts +2 -0
- package/constants/taiga-ui-kit-constants.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +3 -1
- package/esm2015/components/accordion/accordion.component.js +3 -3
- package/esm2015/components/arrow/arrow-options.js +17 -0
- package/esm2015/components/arrow/arrow.component.js +12 -8
- package/esm2015/components/arrow/arrow.module.js +3 -2
- package/esm2015/components/arrow/index.js +2 -1
- package/esm2015/components/avatar/avatar.component.js +1 -1
- package/esm2015/components/calendar-month/calendar-month.component.js +5 -2
- package/esm2015/components/carousel/carousel-scroll.directive.js +5 -4
- package/esm2015/components/carousel/carousel.component.js +1 -1
- package/esm2015/components/checkbox/checkbox.component.js +2 -2
- package/esm2015/components/combo-box/combo-box.component.js +23 -43
- package/esm2015/components/combo-box/combo-box.directive.js +25 -0
- package/esm2015/components/combo-box/combo-box.module.js +5 -4
- package/esm2015/components/combo-box/combo-box.providers.js +28 -0
- package/esm2015/components/combo-box/index.js +3 -1
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/input/index.js +2 -1
- package/esm2015/components/input/input.component.js +3 -3
- package/esm2015/components/input/input.directive.js +22 -0
- package/esm2015/components/input/input.module.js +5 -4
- package/esm2015/components/input/input.providers.js +6 -2
- package/esm2015/components/input-copy/index.js +3 -1
- package/esm2015/components/input-copy/input-copy.component.js +8 -15
- package/esm2015/components/input-copy/input-copy.directive.js +22 -0
- package/esm2015/components/input-copy/input-copy.module.js +5 -4
- package/esm2015/components/input-copy/input-copy.providers.js +16 -0
- package/esm2015/components/input-count/index.js +2 -1
- package/esm2015/components/input-count/input-count.component.js +8 -8
- package/esm2015/components/input-count/input-count.directive.js +26 -0
- package/esm2015/components/input-count/input-count.module.js +5 -4
- package/esm2015/components/input-date/index.js +3 -1
- package/esm2015/components/input-date/input-date.component.js +21 -31
- package/esm2015/components/input-date/input-date.directive.js +28 -0
- package/esm2015/components/input-date/input-date.module.js +5 -4
- package/esm2015/components/input-date/input-date.providers.js +29 -0
- package/esm2015/components/input-date-range/index.js +3 -1
- package/esm2015/components/input-date-range/input-date-range.component.js +21 -31
- package/esm2015/components/input-date-range/input-date-range.directive.js +28 -0
- package/esm2015/components/input-date-range/input-date-range.module.js +9 -4
- package/esm2015/components/input-date-range/input-date-range.providers.js +29 -0
- package/esm2015/components/input-date-time/index.js +3 -1
- package/esm2015/components/input-date-time/input-date-time.component.js +20 -34
- package/esm2015/components/input-date-time/input-date-time.directive.js +28 -0
- package/esm2015/components/input-date-time/input-date-time.module.js +9 -4
- package/esm2015/components/input-date-time/input-date-time.providers.js +29 -0
- package/esm2015/components/input-file/input-file.component.js +2 -5
- package/esm2015/components/input-inline/input-inline.component.js +4 -13
- package/esm2015/components/input-month/index.js +2 -1
- package/esm2015/components/input-month/input-month.component.js +7 -6
- package/esm2015/components/input-month/input-month.directive.js +30 -0
- package/esm2015/components/input-month/input-month.module.js +5 -4
- package/esm2015/components/input-month-range/index.js +2 -1
- package/esm2015/components/input-month-range/input-month-range.component.js +7 -6
- package/esm2015/components/input-month-range/input-month-range.directive.js +30 -0
- package/esm2015/components/input-month-range/input-month-range.module.js +9 -4
- package/esm2015/components/input-number/index.js +2 -1
- package/esm2015/components/input-number/input-number.component.js +18 -14
- package/esm2015/components/input-number/input-number.directive.js +29 -0
- package/esm2015/components/input-number/input-number.module.js +5 -4
- package/esm2015/components/input-password/index.js +2 -1
- package/esm2015/components/input-password/input-password.component.js +7 -6
- package/esm2015/components/input-password/input-password.directive.js +30 -0
- package/esm2015/components/input-password/input-password.module.js +9 -4
- package/esm2015/components/input-phone/index.js +2 -1
- package/esm2015/components/input-phone/input-phone.component.js +16 -27
- package/esm2015/components/input-phone/input-phone.directive.js +29 -0
- package/esm2015/components/input-phone/input-phone.module.js +5 -4
- package/esm2015/components/input-phone/input-phone.providers.js +17 -3
- package/esm2015/components/input-phone-international/const/countries.js +14 -5
- package/esm2015/components/input-phone-international/index.js +3 -1
- package/esm2015/components/input-phone-international/input-phone-international.component.js +24 -22
- package/esm2015/components/input-phone-international/tokens/countries-masks.js +6 -0
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +9 -0
- package/esm2015/components/input-range/input-range.component.js +10 -7
- package/esm2015/components/input-slider/input-slider.component.js +10 -7
- package/esm2015/components/input-tag/input-tag.component.js +5 -5
- package/esm2015/components/input-time/input-time-options.js +4 -1
- package/esm2015/components/input-time/input-time.component.js +10 -8
- package/esm2015/components/multi-select/multi-select.component.js +17 -11
- package/esm2015/components/multi-select/multi-select.module.js +3 -1
- package/esm2015/components/rating/index.js +4 -0
- package/esm2015/components/rating/rating-options.js +11 -0
- package/esm2015/components/rating/rating.component.js +91 -0
- package/esm2015/components/rating/rating.module.js +23 -0
- package/esm2015/components/rating/taiga-ui-kit-components-rating.js +5 -0
- package/esm2015/components/select/index.js +3 -1
- package/esm2015/components/select/select.component.js +20 -39
- package/esm2015/components/select/select.directive.js +28 -0
- package/esm2015/components/select/select.module.js +5 -4
- package/esm2015/components/select/select.providers.js +28 -0
- package/esm2015/components/stepper/step/step.component.js +3 -3
- package/esm2015/components/tabs/tab/tab.providers.js +3 -3
- package/esm2015/components/tag/tag.component.js +4 -4
- package/esm2015/components/text-area/text-area.component.js +9 -6
- package/esm2015/components/text-area/text-area.module.js +2 -3
- package/esm2015/components/tree/components/tree/tree.component.js +11 -6
- package/esm2015/components/tree/tree.module.js +9 -2
- package/esm2015/constants/index.js +2 -1
- package/esm2015/constants/max-time-values.js +7 -0
- package/esm2015/providers/value-accessor.provider.js +3 -2
- package/esm2015/tokens/date-inputs-value-transformers.js +5 -0
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/types/index.js +1 -1
- package/esm2015/types/time-format-parts.js +1 -0
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-time-pipe.js +8 -7
- package/esm2015/utils/mask/create-time-mask.js +16 -8
- package/esm2015/utils/miscellaneous/get-precision.js +8 -0
- package/esm2015/utils/miscellaneous/index.js +2 -1
- package/esm2015/utils/miscellaneous/replay-control-value-changes-factory.js +10 -4
- package/esm5/abstract/input-slider.js +3 -1
- package/esm5/components/accordion/accordion.component.js +3 -3
- package/esm5/components/arrow/arrow-options.js +17 -0
- package/esm5/components/arrow/arrow.component.js +12 -8
- package/esm5/components/arrow/arrow.module.js +3 -2
- package/esm5/components/arrow/index.js +2 -1
- package/esm5/components/avatar/avatar.component.js +1 -1
- package/esm5/components/calendar-month/calendar-month.component.js +5 -2
- package/esm5/components/carousel/carousel-scroll.directive.js +5 -4
- package/esm5/components/carousel/carousel.component.js +1 -1
- package/esm5/components/checkbox/checkbox.component.js +2 -2
- package/esm5/components/combo-box/combo-box.component.js +22 -47
- package/esm5/components/combo-box/combo-box.directive.js +35 -0
- package/esm5/components/combo-box/combo-box.module.js +5 -4
- package/esm5/components/combo-box/combo-box.providers.js +28 -0
- package/esm5/components/combo-box/index.js +3 -1
- package/esm5/components/index.js +2 -1
- package/esm5/components/input/index.js +2 -1
- package/esm5/components/input/input.component.js +3 -3
- package/esm5/components/input/input.directive.js +28 -0
- package/esm5/components/input/input.module.js +5 -4
- package/esm5/components/input/input.providers.js +6 -2
- package/esm5/components/input-copy/index.js +3 -1
- package/esm5/components/input-copy/input-copy.component.js +7 -15
- package/esm5/components/input-copy/input-copy.directive.js +28 -0
- package/esm5/components/input-copy/input-copy.module.js +5 -4
- package/esm5/components/input-copy/input-copy.providers.js +16 -0
- package/esm5/components/input-count/index.js +2 -1
- package/esm5/components/input-count/input-count.component.js +8 -8
- package/esm5/components/input-count/input-count.directive.js +32 -0
- package/esm5/components/input-count/input-count.module.js +5 -4
- package/esm5/components/input-date/index.js +3 -1
- package/esm5/components/input-date/input-date.component.js +22 -31
- package/esm5/components/input-date/input-date.directive.js +38 -0
- package/esm5/components/input-date/input-date.module.js +5 -4
- package/esm5/components/input-date/input-date.providers.js +29 -0
- package/esm5/components/input-date-range/index.js +3 -1
- package/esm5/components/input-date-range/input-date-range.component.js +22 -31
- package/esm5/components/input-date-range/input-date-range.directive.js +38 -0
- package/esm5/components/input-date-range/input-date-range.module.js +9 -4
- package/esm5/components/input-date-range/input-date-range.providers.js +29 -0
- package/esm5/components/input-date-time/index.js +3 -1
- package/esm5/components/input-date-time/input-date-time.component.js +21 -38
- package/esm5/components/input-date-time/input-date-time.directive.js +38 -0
- package/esm5/components/input-date-time/input-date-time.module.js +9 -4
- package/esm5/components/input-date-time/input-date-time.providers.js +29 -0
- package/esm5/components/input-file/input-file.component.js +2 -9
- package/esm5/components/input-inline/input-inline.component.js +4 -17
- package/esm5/components/input-month/index.js +2 -1
- package/esm5/components/input-month/input-month.component.js +7 -10
- package/esm5/components/input-month/input-month.directive.js +44 -0
- package/esm5/components/input-month/input-month.module.js +5 -4
- package/esm5/components/input-month-range/index.js +2 -1
- package/esm5/components/input-month-range/input-month-range.component.js +7 -10
- package/esm5/components/input-month-range/input-month-range.directive.js +44 -0
- package/esm5/components/input-month-range/input-month-range.module.js +9 -4
- package/esm5/components/input-number/index.js +2 -1
- package/esm5/components/input-number/input-number.component.js +18 -14
- package/esm5/components/input-number/input-number.directive.js +39 -0
- package/esm5/components/input-number/input-number.module.js +5 -4
- package/esm5/components/input-password/index.js +2 -1
- package/esm5/components/input-password/input-password.component.js +7 -10
- package/esm5/components/input-password/input-password.directive.js +36 -0
- package/esm5/components/input-password/input-password.module.js +9 -4
- package/esm5/components/input-phone/index.js +2 -1
- package/esm5/components/input-phone/input-phone.component.js +15 -27
- package/esm5/components/input-phone/input-phone.directive.js +39 -0
- package/esm5/components/input-phone/input-phone.module.js +5 -4
- package/esm5/components/input-phone/input-phone.providers.js +17 -3
- package/esm5/components/input-phone-international/const/countries.js +14 -5
- package/esm5/components/input-phone-international/index.js +3 -1
- package/esm5/components/input-phone-international/input-phone-international.component.js +28 -22
- package/esm5/components/input-phone-international/tokens/countries-masks.js +6 -0
- package/esm5/components/input-phone-international/utils/extract-value-from-event.js +9 -0
- package/esm5/components/input-range/input-range.component.js +10 -7
- package/esm5/components/input-slider/input-slider.component.js +10 -7
- package/esm5/components/input-tag/input-tag.component.js +5 -5
- package/esm5/components/input-time/input-time-options.js +4 -1
- package/esm5/components/input-time/input-time.component.js +10 -12
- package/esm5/components/multi-select/multi-select.component.js +21 -15
- package/esm5/components/multi-select/multi-select.module.js +3 -1
- package/esm5/components/rating/index.js +4 -0
- package/esm5/components/rating/rating-options.js +11 -0
- package/esm5/components/rating/rating.component.js +111 -0
- package/esm5/components/rating/rating.module.js +26 -0
- package/esm5/components/rating/taiga-ui-kit-components-rating.js +5 -0
- package/esm5/components/select/index.js +3 -1
- package/esm5/components/select/select.component.js +19 -43
- package/esm5/components/select/select.directive.js +42 -0
- package/esm5/components/select/select.module.js +5 -4
- package/esm5/components/select/select.providers.js +28 -0
- package/esm5/components/stepper/step/step.component.js +3 -3
- package/esm5/components/tabs/tab/tab.providers.js +3 -3
- package/esm5/components/tag/tag.component.js +3 -3
- package/esm5/components/text-area/text-area.component.js +9 -6
- package/esm5/components/text-area/text-area.module.js +2 -3
- package/esm5/components/tree/components/tree/tree.component.js +15 -9
- package/esm5/components/tree/tree.module.js +9 -2
- package/esm5/constants/index.js +2 -1
- package/esm5/constants/max-time-values.js +7 -0
- package/esm5/providers/value-accessor.provider.js +3 -2
- package/esm5/tokens/date-inputs-value-transformers.js +5 -0
- package/esm5/tokens/index.js +2 -1
- package/esm5/types/index.js +1 -1
- package/esm5/types/time-format-parts.js +1 -0
- package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-time-pipe.js +9 -6
- package/esm5/utils/mask/create-time-mask.js +15 -7
- package/esm5/utils/miscellaneous/get-precision.js +9 -0
- package/esm5/utils/miscellaneous/index.js +2 -1
- package/esm5/utils/miscellaneous/replay-control-value-changes-factory.js +12 -4
- package/fesm2015/taiga-ui-kit-abstract.js +2 -0
- 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 +29 -11
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +4 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +5 -4
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +65 -41
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +41 -18
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +34 -12
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +74 -33
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +74 -37
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +70 -33
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +1 -4
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +3 -12
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +41 -10
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +37 -10
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +46 -17
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +41 -10
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +47 -26
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +55 -29
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +9 -6
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +9 -6
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +11 -6
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +29 -7
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +17 -10
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +123 -0
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -0
- package/fesm2015/taiga-ui-kit-components-select.js +65 -37
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +2 -2
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +2 -2
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +3 -3
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +9 -7
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +17 -8
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components.js +1 -0
- package/fesm2015/taiga-ui-kit-components.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +8 -1
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +2 -1
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +5 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +22 -14
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +17 -3
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +2 -0
- 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 +29 -11
- package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +4 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +5 -4
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +74 -45
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +46 -18
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +40 -12
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +85 -33
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +85 -41
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +81 -33
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +1 -8
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +3 -16
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +55 -14
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +51 -14
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +56 -17
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +47 -14
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +51 -26
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +64 -29
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +9 -6
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +9 -6
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +11 -10
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +36 -8
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +21 -14
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-rating.js +146 -0
- package/fesm5/taiga-ui-kit-components-rating.js.map +1 -0
- package/fesm5/taiga-ui-kit-components-select.js +78 -41
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +2 -2
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +2 -2
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +2 -2
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +9 -7
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +21 -11
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-components.js +1 -0
- package/fesm5/taiga-ui-kit-components.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +8 -1
- package/fesm5/taiga-ui-kit-constants.js.map +1 -1
- package/fesm5/taiga-ui-kit-providers.js +2 -1
- package/fesm5/taiga-ui-kit-providers.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +5 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js +21 -12
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js +20 -3
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/package.json +12 -12
- package/providers/taiga-ui-kit-providers.metadata.json +1 -1
- package/providers/value-accessor.provider.d.ts +1 -1
- package/tokens/date-inputs-value-transformers.d.ts +5 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/types/index.d.ts +1 -0
- package/types/taiga-ui-kit-types.metadata.json +1 -1
- package/types/time-format-parts.d.ts +1 -0
- package/utils/mask/create-auto-corrected-time-pipe.d.ts +3 -2
- package/utils/mask/create-time-mask.d.ts +2 -1
- package/utils/mask/taiga-ui-kit-utils-mask.metadata.json +1 -1
- package/utils/miscellaneous/get-precision.d.ts +4 -0
- package/utils/miscellaneous/index.d.ts +1 -0
- package/utils/miscellaneous/replay-control-value-changes-factory.d.ts +3 -2
- package/utils/miscellaneous/taiga-ui-kit-utils-miscellaneous.metadata.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __extends, __decorate, __param } from 'tslib';
|
|
2
|
-
import { EventEmitter, Optional, Self, Inject, ChangeDetectorRef, ContentChild, ViewChild, Input, Output, TemplateRef, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { forwardRef, EventEmitter, Optional, Self, Inject, ChangeDetectorRef, ContentChild, ViewChild, Input, Output, TemplateRef, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl } from '@angular/forms';
|
|
4
|
-
import { TUI_DEFAULT_STRINGIFY, TUI_STRICT_MATCHER, TUI_DEFAULT_IDENTITY_MATCHER, isNativeFocused, isPresent, setNativeFocused, tuiDefaultProp, tuiPure,
|
|
5
|
-
import { TUI_DATA_LIST_ACCESSOR, TuiHostedDropdownComponent, TuiPrimitiveTextfieldComponent, TuiDataListDirective,
|
|
6
|
-
import {
|
|
4
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl, TUI_DEFAULT_STRINGIFY, TUI_STRICT_MATCHER, TUI_DEFAULT_IDENTITY_MATCHER, isNativeFocused, isPresent, setNativeFocused, tuiDefaultProp, tuiPure, AbstractTuiNullableControl, TuiActiveZoneModule } from '@taiga-ui/cdk';
|
|
5
|
+
import { TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT, TUI_DATA_LIST_ACCESSOR, TuiHostedDropdownComponent, TuiPrimitiveTextfieldComponent, TuiDataListDirective, TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost, TuiPrimitiveTextfieldModule, TuiHostedDropdownModule, TuiTextfieldComponent } from '@taiga-ui/core';
|
|
6
|
+
import { TUI_ARROW_MODE, TuiArrowModule } from '@taiga-ui/kit/components/arrow';
|
|
7
7
|
import { TUI_SELECT_OPTION, TuiSelectOptionModule } from '@taiga-ui/kit/components/select-option';
|
|
8
8
|
import { FIXED_DROPDOWN_CONTROLLER_PROVIDER } from '@taiga-ui/kit/providers';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
@@ -11,10 +11,31 @@ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
|
11
11
|
|
|
12
12
|
// TODO: remove in ivy compilation
|
|
13
13
|
var COMBOBOX_OPTION = TUI_SELECT_OPTION;
|
|
14
|
+
var TUI_COMBO_BOX_PROVIDERS = [
|
|
15
|
+
{
|
|
16
|
+
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
17
|
+
useExisting: forwardRef(function () { return TuiComboBoxComponent; }),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
provide: TUI_DATA_LIST_HOST,
|
|
21
|
+
useExisting: forwardRef(function () { return TuiComboBoxComponent; }),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
provide: AbstractTuiControl,
|
|
25
|
+
useExisting: forwardRef(function () { return TuiComboBoxComponent; }),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
provide: TUI_OPTION_CONTENT,
|
|
29
|
+
useValue: COMBOBOX_OPTION,
|
|
30
|
+
},
|
|
31
|
+
FIXED_DROPDOWN_CONTROLLER_PROVIDER,
|
|
32
|
+
];
|
|
33
|
+
|
|
14
34
|
var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
15
35
|
__extends(TuiComboBoxComponent, _super);
|
|
16
|
-
function TuiComboBoxComponent(control, changeDetectorRef) {
|
|
36
|
+
function TuiComboBoxComponent(control, changeDetectorRef, arrowMode) {
|
|
17
37
|
var _this = _super.call(this, control, changeDetectorRef) || this;
|
|
38
|
+
_this.arrowMode = arrowMode;
|
|
18
39
|
_this.stringify = TUI_DEFAULT_STRINGIFY;
|
|
19
40
|
_this.strictMatcher = TUI_STRICT_MATCHER;
|
|
20
41
|
_this.identityMatcher = TUI_DEFAULT_IDENTITY_MATCHER;
|
|
@@ -26,10 +47,9 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
26
47
|
_this.open = false;
|
|
27
48
|
return _this;
|
|
28
49
|
}
|
|
29
|
-
TuiComboBoxComponent_1 = TuiComboBoxComponent;
|
|
30
50
|
Object.defineProperty(TuiComboBoxComponent.prototype, "arrow", {
|
|
31
51
|
get: function () {
|
|
32
|
-
return this.
|
|
52
|
+
return !this.interactive ? this.arrowMode.disabled : this.arrowMode.interactive;
|
|
33
53
|
},
|
|
34
54
|
enumerable: true,
|
|
35
55
|
configurable: true
|
|
@@ -66,13 +86,6 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
66
86
|
enumerable: true,
|
|
67
87
|
configurable: true
|
|
68
88
|
});
|
|
69
|
-
Object.defineProperty(TuiComboBoxComponent.prototype, "canOpen", {
|
|
70
|
-
get: function () {
|
|
71
|
-
return !this.computedDisabled && !this.readOnly;
|
|
72
|
-
},
|
|
73
|
-
enumerable: true,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
89
|
Object.defineProperty(TuiComboBoxComponent.prototype, "computedContent", {
|
|
77
90
|
get: function () {
|
|
78
91
|
return this.valueContent || this.nativeValue;
|
|
@@ -115,7 +128,7 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
115
128
|
this.updateSearch(null);
|
|
116
129
|
this.close();
|
|
117
130
|
};
|
|
118
|
-
TuiComboBoxComponent.prototype.
|
|
131
|
+
TuiComboBoxComponent.prototype.onValueChange = function (value) {
|
|
119
132
|
var _this = this;
|
|
120
133
|
var _a;
|
|
121
134
|
this.updateSearch(value);
|
|
@@ -133,17 +146,15 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
133
146
|
this.updateHovered(hovered);
|
|
134
147
|
};
|
|
135
148
|
TuiComboBoxComponent.prototype.toggle = function () {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
149
|
+
var _a;
|
|
150
|
+
(_a = this.hostedDropdown) === null || _a === void 0 ? void 0 : _a.updateOpen(!this.open);
|
|
139
151
|
};
|
|
140
152
|
TuiComboBoxComponent.prototype.isStrictMatch = function (item) {
|
|
141
153
|
return this.strictMatcher(item, this.search || '', this.stringify);
|
|
142
154
|
};
|
|
143
155
|
TuiComboBoxComponent.prototype.close = function () {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
156
|
+
var _a;
|
|
157
|
+
(_a = this.hostedDropdown) === null || _a === void 0 ? void 0 : _a.updateOpen(false);
|
|
147
158
|
};
|
|
148
159
|
TuiComboBoxComponent.prototype.updateSearch = function (search) {
|
|
149
160
|
if (this.search === search) {
|
|
@@ -163,10 +174,10 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
163
174
|
setNativeFocused(this.nativeFocusableElement, true, preventScroll);
|
|
164
175
|
}
|
|
165
176
|
};
|
|
166
|
-
var TuiComboBoxComponent_1;
|
|
167
177
|
TuiComboBoxComponent.ctorParameters = function () { return [
|
|
168
178
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
169
|
-
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
|
|
179
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
180
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ARROW_MODE,] }] }
|
|
170
181
|
]; };
|
|
171
182
|
__decorate([
|
|
172
183
|
ContentChild(TUI_DATA_LIST_ACCESSOR)
|
|
@@ -210,36 +221,54 @@ var TuiComboBoxComponent = /** @class */ (function (_super) {
|
|
|
210
221
|
__decorate([
|
|
211
222
|
tuiPure
|
|
212
223
|
], TuiComboBoxComponent.prototype, "computeContext", null);
|
|
213
|
-
TuiComboBoxComponent =
|
|
224
|
+
TuiComboBoxComponent = __decorate([
|
|
214
225
|
Component({
|
|
215
226
|
selector: 'tui-combo-box',
|
|
216
|
-
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"
|
|
227
|
+
template: "<tui-hosted-dropdown\n class=\"hosted\"\n [canOpen]=\"interactive\"\n [content]=\"datalist || ''\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-combo-box__textfield\"\n class=\"textfield\"\n [pseudoFocused]=\"computedFocused\"\n [pseudoHovered]=\"computedHovered\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [iconContent]=\"icon\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"computedFocusable\"\n [value]=\"nativeValue\"\n (valueChange)=\"onValueChange($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (click)=\"toggle()\"\n (keydown.enter)=\"onFieldKeyDownEnter($event)\"\n >\n <ng-content></ng-content>\n <ng-content select=\"input\" ngProjectAs=\"input\"></ng-content>\n <div\n *ngIf=\"showValueTemplate\"\n polymorpheus-outlet\n automation-id=\"tui-combo-box__template\"\n class=\"value\"\n [content]=\"computedContent\"\n [context]=\"computeContext(value, computedFocused)\"\n ></div>\n </tui-primitive-textfield>\n\n <ng-template #icon>\n <div polymorpheus-outlet class=\"t-icon\" [content]=\"arrow\"></div>\n </ng-template>\n</tui-hosted-dropdown>\n",
|
|
217
228
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
218
|
-
providers:
|
|
219
|
-
|
|
220
|
-
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
221
|
-
useExisting: forwardRef(function () { return TuiComboBoxComponent_1; }),
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
provide: TUI_DATA_LIST_HOST,
|
|
225
|
-
useExisting: forwardRef(function () { return TuiComboBoxComponent_1; }),
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
provide: TUI_OPTION_CONTENT,
|
|
229
|
-
useValue: COMBOBOX_OPTION,
|
|
230
|
-
},
|
|
231
|
-
FIXED_DROPDOWN_CONTROLLER_PROVIDER,
|
|
232
|
-
],
|
|
233
|
-
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}.value{display:flex;width:100%;align-items:center}"]
|
|
229
|
+
providers: TUI_COMBO_BOX_PROVIDERS,
|
|
230
|
+
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}.value{display:flex;width:100%;align-items:center}.t-icon{pointer-events:auto}"]
|
|
234
231
|
}),
|
|
235
232
|
__param(0, Optional()),
|
|
236
233
|
__param(0, Self()),
|
|
237
234
|
__param(0, Inject(NgControl)),
|
|
238
|
-
__param(1, Inject(ChangeDetectorRef))
|
|
235
|
+
__param(1, Inject(ChangeDetectorRef)),
|
|
236
|
+
__param(2, Inject(TUI_ARROW_MODE))
|
|
239
237
|
], TuiComboBoxComponent);
|
|
240
238
|
return TuiComboBoxComponent;
|
|
241
239
|
}(AbstractTuiNullableControl));
|
|
242
240
|
|
|
241
|
+
var TuiComboBoxDirective = /** @class */ (function (_super) {
|
|
242
|
+
__extends(TuiComboBoxDirective, _super);
|
|
243
|
+
function TuiComboBoxDirective() {
|
|
244
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
245
|
+
}
|
|
246
|
+
TuiComboBoxDirective_1 = TuiComboBoxDirective;
|
|
247
|
+
Object.defineProperty(TuiComboBoxDirective.prototype, "value", {
|
|
248
|
+
get: function () {
|
|
249
|
+
return this.host.nativeValue;
|
|
250
|
+
},
|
|
251
|
+
enumerable: true,
|
|
252
|
+
configurable: true
|
|
253
|
+
});
|
|
254
|
+
TuiComboBoxDirective.prototype.onValueChange = function (value) {
|
|
255
|
+
this.host.onValueChange(value);
|
|
256
|
+
};
|
|
257
|
+
var TuiComboBoxDirective_1;
|
|
258
|
+
TuiComboBoxDirective = TuiComboBoxDirective_1 = __decorate([
|
|
259
|
+
Directive({
|
|
260
|
+
selector: 'tui-combo-box',
|
|
261
|
+
providers: [
|
|
262
|
+
{
|
|
263
|
+
provide: TUI_TEXTFIELD_HOST,
|
|
264
|
+
useExisting: forwardRef(function () { return TuiComboBoxDirective_1; }),
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
})
|
|
268
|
+
], TuiComboBoxDirective);
|
|
269
|
+
return TuiComboBoxDirective;
|
|
270
|
+
}(TuiAbstractTextfieldHost));
|
|
271
|
+
|
|
243
272
|
var TuiComboBoxModule = /** @class */ (function () {
|
|
244
273
|
function TuiComboBoxModule() {
|
|
245
274
|
}
|
|
@@ -254,8 +283,8 @@ var TuiComboBoxModule = /** @class */ (function () {
|
|
|
254
283
|
TuiSelectOptionModule,
|
|
255
284
|
TuiArrowModule,
|
|
256
285
|
],
|
|
257
|
-
declarations: [TuiComboBoxComponent],
|
|
258
|
-
exports: [TuiComboBoxComponent],
|
|
286
|
+
declarations: [TuiComboBoxComponent, TuiComboBoxDirective],
|
|
287
|
+
exports: [TuiComboBoxComponent, TuiComboBoxDirective, TuiTextfieldComponent],
|
|
259
288
|
})
|
|
260
289
|
], TuiComboBoxModule);
|
|
261
290
|
return TuiComboBoxModule;
|
|
@@ -265,5 +294,5 @@ var TuiComboBoxModule = /** @class */ (function () {
|
|
|
265
294
|
* Generated bundle index. Do not edit.
|
|
266
295
|
*/
|
|
267
296
|
|
|
268
|
-
export { COMBOBOX_OPTION, TuiComboBoxComponent, TuiComboBoxModule };
|
|
297
|
+
export { COMBOBOX_OPTION, TUI_COMBO_BOX_PROVIDERS, TuiComboBoxComponent, TuiComboBoxDirective, TuiComboBoxModule };
|
|
269
298
|
//# sourceMappingURL=taiga-ui-kit-components-combo-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-combo-box.js","sources":["ng://@taiga-ui/kit/components/combo-box/combo-box.component.ts","ng://@taiga-ui/kit/components/combo-box/combo-box.module.ts","ng://@taiga-ui/kit/components/combo-box/taiga-ui-kit-components-combo-box.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n isNativeFocused,\n isPresent,\n setNativeFocused,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_STRICT_MATCHER,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiIdentityMatcher,\n tuiPure,\n TuiStringHandler,\n TuiStringMatcher,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DATA_LIST_ACCESSOR,\n TUI_DATA_LIST_HOST,\n TUI_OPTION_CONTENT,\n TuiDataListAccessor,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHostedDropdownComponent,\n TuiPrimitiveTextfieldComponent,\n TuiValueContentContext,\n} from '@taiga-ui/core';\nimport {TUI_ARROW} from '@taiga-ui/kit/components/arrow';\nimport {TUI_SELECT_OPTION} from '@taiga-ui/kit/components/select-option';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n// TODO: remove in ivy compilation\nexport const COMBOBOX_OPTION: any = TUI_SELECT_OPTION;\n\n@Component({\n selector: 'tui-combo-box',\n templateUrl: './combo-box.template.html',\n styleUrls: ['./combo-box.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiComboBoxComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiComboBoxComponent),\n },\n {\n provide: TUI_OPTION_CONTENT,\n useValue: COMBOBOX_OPTION,\n },\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiComboBoxComponent<T>\n extends AbstractTuiNullableControl<T | string>\n implements TuiFocusableElementAccessor, TuiDataListHost<T>\n{\n @ContentChild(TUI_DATA_LIST_ACCESSOR as any)\n private readonly accessor?: TuiDataListAccessor<T>;\n\n @ViewChild(TuiHostedDropdownComponent)\n private readonly hostedDropdown?: TuiHostedDropdownComponent;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n stringify: TuiStringHandler<T> = TUI_DEFAULT_STRINGIFY;\n\n @Input()\n @tuiDefaultProp()\n strictMatcher: TuiStringMatcher<T> = TUI_STRICT_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n valueContent: PolymorpheusContent<TuiValueContentContext<T>> = '';\n\n @Input()\n @tuiDefaultProp()\n strict = true;\n\n @Input()\n @tuiDefaultProp()\n search: string | null = '';\n\n @Output()\n readonly searchChange = new EventEmitter<string | null>();\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist: PolymorpheusContent = '';\n\n open = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(control, changeDetectorRef);\n }\n\n get arrow(): PolymorpheusContent {\n return this.disabled || this.readOnly ? '' : TUI_ARROW;\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.textfield ? this.textfield.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return (\n isNativeFocused(this.nativeFocusableElement) ||\n (!!this.hostedDropdown && this.hostedDropdown.focused)\n );\n }\n\n get nativeValue(): string {\n if (this.value === null) {\n return this.search || '';\n }\n\n return typeof this.value === 'string' ? this.value : this.stringify(this.value);\n }\n\n get showValueTemplate(): boolean {\n return isPresent(this.value) && !this.focused;\n }\n\n get canOpen(): boolean {\n return !this.computedDisabled && !this.readOnly;\n }\n\n get computedContent(): PolymorpheusContent<TuiValueContentContext<T>> {\n return this.valueContent || this.nativeValue;\n }\n\n @tuiPure\n computeContext(\n $implicit: T | null,\n active: boolean,\n ): TuiValueContentContext<T | null> {\n return {\n $implicit,\n active,\n };\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n checkOption(option: T) {\n if (!this.isStrictMatch(option)) {\n return;\n }\n\n this.updateValue(option);\n this.updateSearch(null);\n }\n\n handleOption(item: T) {\n this.setNativeValue(this.stringify(item));\n this.focusInput();\n this.close();\n this.updateSearch(null);\n this.updateValue(item);\n }\n\n onFieldKeyDownEnter(event: KeyboardEvent) {\n if (this.open) {\n event.preventDefault();\n }\n\n const options = this.accessor ? this.accessor.getOptions() : [];\n\n if (options.length !== 1) {\n return;\n }\n\n this.updateValue(options[0]);\n this.updateSearch(null);\n this.close();\n }\n\n onInput(value: string) {\n this.updateSearch(value);\n\n const match =\n this.accessor &&\n this.accessor.getOptions().find(item => this.isStrictMatch(item));\n\n if (match !== undefined) {\n this.updateValue(match);\n this.updateSearch(null);\n\n return;\n }\n\n this.updateValue(this.strict || this.search === '' ? null : this.search);\n this.hostedDropdown?.updateOpen(true);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n toggle() {\n if (this.hostedDropdown) {\n this.hostedDropdown.updateOpen(!this.open);\n }\n }\n\n private isStrictMatch(item: T): boolean {\n return this.strictMatcher(item, this.search || '', this.stringify);\n }\n\n private close() {\n if (this.hostedDropdown) {\n this.hostedDropdown.updateOpen(false);\n }\n }\n\n private updateSearch(search: string | null) {\n if (this.search === search) {\n return;\n }\n\n this.search = search;\n this.searchChange.emit(search);\n }\n\n private setNativeValue(value: string) {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = value;\n }\n }\n\n private focusInput(preventScroll: boolean = false) {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, preventScroll);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {TuiHostedDropdownModule, TuiPrimitiveTextfieldModule} from '@taiga-ui/core';\nimport {TuiArrowModule} from '@taiga-ui/kit/components/arrow';\nimport {TuiSelectOptionModule} from '@taiga-ui/kit/components/select-option';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiComboBoxComponent} from './combo-box.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiActiveZoneModule,\n TuiPrimitiveTextfieldModule,\n TuiHostedDropdownModule,\n TuiSelectOptionModule,\n TuiArrowModule,\n ],\n declarations: [TuiComboBoxComponent],\n exports: [TuiComboBoxComponent],\n})\nexport class TuiComboBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAgDA;IACa,eAAe,GAAQ,kBAAkB;;IAwB1C,wCAAsC;IA4C9C,8BAII,OAAyB,EACE,iBAAoC;QALnE,YAOI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAtCD,eAAS,GAAwB,qBAAqB,CAAC;QAIvD,mBAAa,GAAwB,kBAAkB,CAAC;QAIxD,qBAAe,GAA0B,4BAA4B,CAAC;QAItE,kBAAY,GAAmD,EAAE,CAAC;QAIlE,YAAM,GAAG,IAAI,CAAC;QAId,YAAM,GAAkB,EAAE,CAAC;QAGlB,kBAAY,GAAG,IAAI,YAAY,EAAiB,CAAC;QAGjD,cAAQ,GAAwB,EAAE,CAAC;QAE5C,UAAI,GAAG,KAAK,CAAC;;KAUZ;6BArDQ,oBAAoB;IAuD7B,sBAAI,uCAAK;aAAT;YACI,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,SAAS,CAAC;SAC1D;;;OAAA;IAED,sBAAI,wDAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC;SACxE;;;OAAA;IAED,sBAAI,yCAAO;aAAX;YACI,QACI,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC;iBAC3C,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EACxD;SACL;;;OAAA;IAED,sBAAI,6CAAW;aAAf;YACI,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE;gBACrB,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;aAC5B;YAED,OAAO,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAA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ng://@taiga-ui/kit/components/combo-box/combo-box.providers.ts","ng://@taiga-ui/kit/components/combo-box/combo-box.component.ts","ng://@taiga-ui/kit/components/combo-box/combo-box.directive.ts","ng://@taiga-ui/kit/components/combo-box/combo-box.module.ts","ng://@taiga-ui/kit/components/combo-box/taiga-ui-kit-components-combo-box.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core';\nimport {TUI_SELECT_OPTION} from '@taiga-ui/kit/components/select-option';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\n\nimport {TuiComboBoxComponent} from './combo-box.component';\n\n// TODO: remove in ivy compilation\nexport const COMBOBOX_OPTION: any = TUI_SELECT_OPTION;\n\nexport const TUI_COMBO_BOX_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiComboBoxComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiComboBoxComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiComboBoxComponent),\n },\n {\n provide: TUI_OPTION_CONTENT,\n useValue: COMBOBOX_OPTION,\n },\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n isNativeFocused,\n isPresent,\n setNativeFocused,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TUI_STRICT_MATCHER,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiIdentityMatcher,\n tuiPure,\n TuiStringHandler,\n TuiStringMatcher,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DATA_LIST_ACCESSOR,\n TuiDataListAccessor,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHostedDropdownComponent,\n TuiPrimitiveTextfieldComponent,\n TuiValueContentContext,\n} from '@taiga-ui/core';\nimport {TUI_ARROW_MODE, TuiArrowMode} from '@taiga-ui/kit/components/arrow';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_COMBO_BOX_PROVIDERS} from './combo-box.providers';\n\n@Component({\n selector: 'tui-combo-box',\n templateUrl: './combo-box.template.html',\n styleUrls: ['./combo-box.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_COMBO_BOX_PROVIDERS,\n})\nexport class TuiComboBoxComponent<T>\n extends AbstractTuiNullableControl<T | string>\n implements TuiFocusableElementAccessor, TuiDataListHost<T>\n{\n @ContentChild(TUI_DATA_LIST_ACCESSOR as any)\n private readonly accessor?: TuiDataListAccessor<T>;\n\n @ViewChild(TuiHostedDropdownComponent)\n private readonly hostedDropdown?: TuiHostedDropdownComponent;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n stringify: TuiStringHandler<T> = TUI_DEFAULT_STRINGIFY;\n\n @Input()\n @tuiDefaultProp()\n strictMatcher: TuiStringMatcher<T> = TUI_STRICT_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n identityMatcher: TuiIdentityMatcher<T> = TUI_DEFAULT_IDENTITY_MATCHER;\n\n @Input()\n @tuiDefaultProp()\n valueContent: PolymorpheusContent<TuiValueContentContext<T>> = '';\n\n @Input()\n @tuiDefaultProp()\n strict = true;\n\n @Input()\n @tuiDefaultProp()\n search: string | null = '';\n\n @Output()\n readonly searchChange = new EventEmitter<string | null>();\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist: PolymorpheusContent = '';\n\n open = false;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_ARROW_MODE)\n private readonly arrowMode: TuiArrowMode,\n ) {\n super(control, changeDetectorRef);\n }\n\n get arrow(): PolymorpheusContent {\n return !this.interactive ? this.arrowMode.disabled : this.arrowMode.interactive;\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.textfield ? this.textfield.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return (\n isNativeFocused(this.nativeFocusableElement) ||\n (!!this.hostedDropdown && this.hostedDropdown.focused)\n );\n }\n\n get nativeValue(): string {\n if (this.value === null) {\n return this.search || '';\n }\n\n return typeof this.value === 'string' ? this.value : this.stringify(this.value);\n }\n\n get showValueTemplate(): boolean {\n return isPresent(this.value) && !this.focused;\n }\n\n get computedContent(): PolymorpheusContent<TuiValueContentContext<T>> {\n return this.valueContent || this.nativeValue;\n }\n\n @tuiPure\n computeContext(\n $implicit: T | null,\n active: boolean,\n ): TuiValueContentContext<T | null> {\n return {\n $implicit,\n active,\n };\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n checkOption(option: T) {\n if (!this.isStrictMatch(option)) {\n return;\n }\n\n this.updateValue(option);\n this.updateSearch(null);\n }\n\n handleOption(item: T) {\n this.setNativeValue(this.stringify(item));\n this.focusInput();\n this.close();\n this.updateSearch(null);\n this.updateValue(item);\n }\n\n onFieldKeyDownEnter(event: KeyboardEvent) {\n if (this.open) {\n event.preventDefault();\n }\n\n const options = this.accessor ? this.accessor.getOptions() : [];\n\n if (options.length !== 1) {\n return;\n }\n\n this.updateValue(options[0]);\n this.updateSearch(null);\n this.close();\n }\n\n onValueChange(value: string) {\n this.updateSearch(value);\n\n const match =\n this.accessor &&\n this.accessor.getOptions().find(item => this.isStrictMatch(item));\n\n if (match !== undefined) {\n this.updateValue(match);\n this.updateSearch(null);\n\n return;\n }\n\n this.updateValue(this.strict || this.search === '' ? null : this.search);\n this.hostedDropdown?.updateOpen(true);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n toggle() {\n this.hostedDropdown?.updateOpen(!this.open);\n }\n\n private isStrictMatch(item: T): boolean {\n return this.strictMatcher(item, this.search || '', this.stringify);\n }\n\n private close() {\n this.hostedDropdown?.updateOpen(false);\n }\n\n private updateSearch(search: string | null) {\n if (this.search === search) {\n return;\n }\n\n this.search = search;\n this.searchChange.emit(search);\n }\n\n private setNativeValue(value: string) {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = value;\n }\n }\n\n private focusInput(preventScroll: boolean = false) {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, preventScroll);\n }\n }\n}\n","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiComboBoxComponent} from './combo-box.component';\n\n@Directive({\n selector: 'tui-combo-box',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiComboBoxDirective),\n },\n ],\n})\nexport class TuiComboBoxDirective extends TuiAbstractTextfieldHost<\n TuiComboBoxComponent<any>\n> {\n get value(): string {\n return this.host.nativeValue;\n }\n\n onValueChange(value: string) {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {\n TuiHostedDropdownModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n} from '@taiga-ui/core';\nimport {TuiArrowModule} from '@taiga-ui/kit/components/arrow';\nimport {TuiSelectOptionModule} from '@taiga-ui/kit/components/select-option';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiComboBoxComponent} from './combo-box.component';\nimport {TuiComboBoxDirective} from './combo-box.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiActiveZoneModule,\n TuiPrimitiveTextfieldModule,\n TuiHostedDropdownModule,\n TuiSelectOptionModule,\n TuiArrowModule,\n ],\n declarations: [TuiComboBoxComponent, TuiComboBoxDirective],\n exports: [TuiComboBoxComponent, TuiComboBoxDirective, TuiTextfieldComponent],\n})\nexport class TuiComboBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA;IACa,eAAe,GAAQ,kBAAkB;IAEzC,uBAAuB,GAAG;IACnC;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,EAAE,eAAe;KAC5B;IACD,kCAAkC;;;;ICwB1B,wCAAsC;IA4C9C,8BAII,OAAyB,EACE,iBAAoC,EAE9C,SAAuB;QAP5C,YASI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAHoB,eAAS,GAAT,SAAS,CAAc;QArC5C,eAAS,GAAwB,qBAAqB,CAAC;QAIvD,mBAAa,GAAwB,kBAAkB,CAAC;QAIxD,qBAAe,GAA0B,4BAA4B,CAAC;QAItE,kBAAY,GAAmD,EAAE,CAAC;QAIlE,YAAM,GAAG,IAAI,CAAC;QAId,YAAM,GAAkB,EAAE,CAAC;QAGlB,kBAAY,GAAG,IAAI,YAAY,EAAiB,CAAC;QAGjD,cAAQ,GAAwB,EAAE,CAAC;QAE5C,UAAI,GAAG,KAAK,CAAC;;KAYZ;IAED,sBAAI,uCAAK;aAAT;YACI,OAAO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AAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAClC;;IATQ,oBAAoB;QAThC,SAAS,CAAC;YACP,QAAQ,EAAE,eAAe;YACzB,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,kBAAkB;oBAC3B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAoB,GAAA,CAAC;iBACtD;aACJ;SACJ,CAAC;OACW,oBAAoB,CAUhC;IAAD,2BAAC;CAAA,CAVyC,wBAAwB;;;ICclE;KAAiC;IAApB,iBAAiB;QAb7B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,mBAAmB;gBACnB,2BAA2B;gBAC3B,uBAAuB;gBACvB,qBAAqB;gBACrB,cAAc;aACjB;YACD,YAAY,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;YAC1D,OAAO,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;SAC/E,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;AC5BA;;;;;;"}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { __extends, __decorate, __param } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
-
import { Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy,
|
|
3
|
+
import { forwardRef, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import { NgControl } from '@angular/forms';
|
|
5
|
-
import {
|
|
6
|
-
import { TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TuiPrimitiveTextfieldComponent, TuiSvgModule, TuiHintModule, TuiPrimitiveTextfieldModule, TuiNotificationsModule } from '@taiga-ui/core';
|
|
7
|
-
import { TUI_VALUE_ACCESSOR_PROVIDER } from '@taiga-ui/kit/providers';
|
|
5
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl, tuiDefaultProp, tuiPure } from '@taiga-ui/cdk';
|
|
6
|
+
import { TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TuiPrimitiveTextfieldComponent, TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost, TuiSvgModule, TuiHintModule, TuiPrimitiveTextfieldModule, TuiNotificationsModule, TuiTextfieldComponent } from '@taiga-ui/core';
|
|
8
7
|
import { TUI_COPY_TEXTS } from '@taiga-ui/kit/tokens';
|
|
9
8
|
import { Subject, merge, of, timer, Observable } from 'rxjs';
|
|
10
9
|
import { switchMap, mapTo, startWith } from 'rxjs/operators';
|
|
10
|
+
import { TUI_VALUE_ACCESSOR_PROVIDER } from '@taiga-ui/kit/providers';
|
|
11
11
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
12
12
|
|
|
13
|
+
var TUI_INPUT_COPY_PROVIDERS = [
|
|
14
|
+
TUI_VALUE_ACCESSOR_PROVIDER,
|
|
15
|
+
{
|
|
16
|
+
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
17
|
+
useExisting: forwardRef(function () { return TuiInputCopyComponent; }),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
provide: AbstractTuiControl,
|
|
21
|
+
useExisting: forwardRef(function () { return TuiInputCopyComponent; }),
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
13
25
|
// @dynamic
|
|
14
26
|
var TuiInputCopyComponent = /** @class */ (function (_super) {
|
|
15
27
|
__extends(TuiInputCopyComponent, _super);
|
|
@@ -24,7 +36,6 @@ var TuiInputCopyComponent = /** @class */ (function (_super) {
|
|
|
24
36
|
_this.messageMode = null;
|
|
25
37
|
return _this;
|
|
26
38
|
}
|
|
27
|
-
TuiInputCopyComponent_1 = TuiInputCopyComponent;
|
|
28
39
|
Object.defineProperty(TuiInputCopyComponent.prototype, "hasValue", {
|
|
29
40
|
get: function () {
|
|
30
41
|
return !!this.value;
|
|
@@ -90,7 +101,6 @@ var TuiInputCopyComponent = /** @class */ (function (_super) {
|
|
|
90
101
|
TuiInputCopyComponent.prototype.getFallbackValue = function () {
|
|
91
102
|
return '';
|
|
92
103
|
};
|
|
93
|
-
var TuiInputCopyComponent_1;
|
|
94
104
|
TuiInputCopyComponent.ctorParameters = function () { return [
|
|
95
105
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
|
|
96
106
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
@@ -119,18 +129,12 @@ var TuiInputCopyComponent = /** @class */ (function (_super) {
|
|
|
119
129
|
__decorate([
|
|
120
130
|
tuiPure
|
|
121
131
|
], TuiInputCopyComponent.prototype, "hintText$", null);
|
|
122
|
-
TuiInputCopyComponent =
|
|
132
|
+
TuiInputCopyComponent = __decorate([
|
|
123
133
|
Component({
|
|
124
134
|
selector: 'tui-input-copy',
|
|
125
|
-
template: "<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [disabled]=\"
|
|
135
|
+
template: "<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [iconContent]=\"!disabled ? iconContent : null\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n <ng-content select=\"input\" ngProjectAs=\"input\"></ng-content>\n</tui-primitive-textfield>\n\n<ng-template #iconContent>\n <tui-svg\n automation-id=\"tui-copy__icon\"\n tuiHintId=\"not_required\"\n class=\"icon\"\n [tuiHint]=\"hint\"\n [tuiHintDirection]=\"messageDirection\"\n [tuiHintMode]=\"messageMode\"\n [src]=\"icon\"\n (click)=\"copy()\"\n ></tui-svg>\n</ng-template>\n\n<ng-template #hint>\n <div polymorpheus-outlet [content]=\"hintText$ | async\"></div>\n</ng-template>\n",
|
|
126
136
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
127
|
-
providers:
|
|
128
|
-
TUI_VALUE_ACCESSOR_PROVIDER,
|
|
129
|
-
{
|
|
130
|
-
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
131
|
-
useExisting: forwardRef(function () { return TuiInputCopyComponent_1; }),
|
|
132
|
-
},
|
|
133
|
-
],
|
|
137
|
+
providers: TUI_INPUT_COPY_PROVIDERS,
|
|
134
138
|
styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.icon{position:relative;cursor:pointer;pointer-events:auto;color:var(--tui-base-06)}:host:not(._has-value) .icon{pointer-events:none;opacity:var(--tui-disabled-opacity)}.textfield{border-radius:inherit;text-align:inherit}"]
|
|
135
139
|
}),
|
|
136
140
|
__param(0, Optional()),
|
|
@@ -144,6 +148,30 @@ var TuiInputCopyComponent = /** @class */ (function (_super) {
|
|
|
144
148
|
return TuiInputCopyComponent;
|
|
145
149
|
}(AbstractTuiControl));
|
|
146
150
|
|
|
151
|
+
var TuiInputCopyDirective = /** @class */ (function (_super) {
|
|
152
|
+
__extends(TuiInputCopyDirective, _super);
|
|
153
|
+
function TuiInputCopyDirective() {
|
|
154
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
155
|
+
}
|
|
156
|
+
TuiInputCopyDirective_1 = TuiInputCopyDirective;
|
|
157
|
+
TuiInputCopyDirective.prototype.onValueChange = function (value) {
|
|
158
|
+
this.host.onValueChange(value);
|
|
159
|
+
};
|
|
160
|
+
var TuiInputCopyDirective_1;
|
|
161
|
+
TuiInputCopyDirective = TuiInputCopyDirective_1 = __decorate([
|
|
162
|
+
Directive({
|
|
163
|
+
selector: 'tui-input-copy',
|
|
164
|
+
providers: [
|
|
165
|
+
{
|
|
166
|
+
provide: TUI_TEXTFIELD_HOST,
|
|
167
|
+
useExisting: forwardRef(function () { return TuiInputCopyDirective_1; }),
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
})
|
|
171
|
+
], TuiInputCopyDirective);
|
|
172
|
+
return TuiInputCopyDirective;
|
|
173
|
+
}(TuiAbstractTextfieldHost));
|
|
174
|
+
|
|
147
175
|
var TuiInputCopyModule = /** @class */ (function () {
|
|
148
176
|
function TuiInputCopyModule() {
|
|
149
177
|
}
|
|
@@ -157,8 +185,8 @@ var TuiInputCopyModule = /** @class */ (function () {
|
|
|
157
185
|
TuiPrimitiveTextfieldModule,
|
|
158
186
|
TuiNotificationsModule,
|
|
159
187
|
],
|
|
160
|
-
declarations: [TuiInputCopyComponent],
|
|
161
|
-
exports: [TuiInputCopyComponent],
|
|
188
|
+
declarations: [TuiInputCopyComponent, TuiInputCopyDirective],
|
|
189
|
+
exports: [TuiInputCopyComponent, TuiInputCopyDirective, TuiTextfieldComponent],
|
|
162
190
|
})
|
|
163
191
|
], TuiInputCopyModule);
|
|
164
192
|
return TuiInputCopyModule;
|
|
@@ -168,5 +196,5 @@ var TuiInputCopyModule = /** @class */ (function () {
|
|
|
168
196
|
* Generated bundle index. Do not edit.
|
|
169
197
|
*/
|
|
170
198
|
|
|
171
|
-
export { TuiInputCopyComponent, TuiInputCopyModule };
|
|
199
|
+
export { TUI_INPUT_COPY_PROVIDERS, TuiInputCopyComponent, TuiInputCopyDirective, TuiInputCopyModule };
|
|
172
200
|
//# sourceMappingURL=taiga-ui-kit-components-input-copy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-copy.js","sources":["ng://@taiga-ui/kit/components/input-copy/input-copy.component.ts","ng://@taiga-ui/kit/components/input-copy/input-copy.module.ts","ng://@taiga-ui/kit/components/input-copy/taiga-ui-kit-components-input-copy.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\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 TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_TEXTFIELD_SIZE,\n TuiDirection,\n TuiHintModeT,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldSizeDirective,\n} from '@taiga-ui/core';\nimport {TUI_VALUE_ACCESSOR_PROVIDER} from '@taiga-ui/kit/providers';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {merge, Observable, of, Subject, timer} from 'rxjs';\nimport {mapTo, startWith, switchMap} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-input-copy',\n templateUrl: './input-copy.template.html',\n styleUrls: ['./input-copy.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TUI_VALUE_ACCESSOR_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputCopyComponent),\n },\n ],\n})\nexport class TuiInputCopyComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private readonly copy$ = new Subject<void>();\n\n @Input()\n @tuiDefaultProp()\n successMessage: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n messageDirection: TuiDirection = 'bottom-left';\n\n @Input()\n @tuiDefaultProp()\n messageMode: TuiHintModeT | null = null;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_COPY_TEXTS) private readonly copyTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return !!this.value;\n }\n\n @tuiPure\n get hintText$(): Observable<PolymorpheusContent> {\n return this.copyTexts$.pipe(\n switchMap(texts =>\n this.copy$.pipe(\n switchMap(() =>\n merge(\n of(this.successMessage || texts[1]),\n timer(3000).pipe(mapTo(texts[0])),\n ),\n ),\n startWith(texts[0]),\n ),\n ),\n );\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get icon(): string {\n return this.textfieldSize.size === 's' ? 'tuiIconCopy' : 'tuiIconCopyLarge';\n }\n\n onValueChange(value: string) {\n this.updateValue(value);\n }\n\n onFocused(focused: boolean) {\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 copy() {\n if (!this.textfield || !this.textfield.nativeFocusableElement) {\n return;\n }\n\n this.textfield.nativeFocusableElement.select();\n this.documentRef.execCommand('copy');\n this.copy$.next();\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiHintModule,\n TuiNotificationsModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputCopyComponent} from './input-copy.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiSvgModule,\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiNotificationsModule,\n ],\n declarations: [TuiInputCopyComponent],\n exports: [TuiInputCopyComponent],\n})\nexport class TuiInputCopyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAmCA;;IAeY,yCAA0B;IAoBlC,+BAII,OAAyB,EACE,iBAAoC,EAC5B,WAAqB,EAEvC,aAAwC,EAChB,UAAwC;QATrF,YAWI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QANsC,iBAAW,GAAX,WAAW,CAAU;QAEvC,mBAAa,GAAb,aAAa,CAA2B;QAChB,gBAAU,GAAV,UAAU,CAA8B;QAvBpE,WAAK,GAAG,IAAI,OAAO,EAAQ,CAAC;QAI7C,oBAAc,GAAwB,EAAE,CAAC;QAIzC,sBAAgB,GAAiB,aAAa,CAAC;QAI/C,iBAAW,GAAwB,IAAI,CAAC;;KAcvC;8BAjCQ,qBAAqB;IAoC9B,sBAAI,2CAAQ;aAAZ;YACI,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;SACvB;;;OAAA;IAGD,sBAAI,4CAAS;aAAb;YADA,iBAeC;YAbG,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CACvB,SAAS,CAAC,UAAA,KAAK;gBACX,OAAA,KAAI,CAAC,KAAK,CAAC,IAAI,CACX,SAAS,CAAC;oBACN,OAAA,KAAK,CACD,EAAE,CAAC,KAAI,CAAC,cAAc,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EACnC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CACpC;iBAAA,CACJ,EACD,SAAS,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AsB;aACzB;YACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACxBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-copy.js","sources":["ng://@taiga-ui/kit/components/input-copy/input-copy.providers.ts","ng://@taiga-ui/kit/components/input-copy/input-copy.component.ts","ng://@taiga-ui/kit/components/input-copy/input-copy.directive.ts","ng://@taiga-ui/kit/components/input-copy/input-copy.module.ts","ng://@taiga-ui/kit/components/input-copy/taiga-ui-kit-components-input-copy.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {TUI_VALUE_ACCESSOR_PROVIDER} from '@taiga-ui/kit/providers';\n\nimport {TuiInputCopyComponent} from './input-copy.component';\n\nexport const TUI_INPUT_COPY_PROVIDERS: Provider[] = [\n TUI_VALUE_ACCESSOR_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputCopyComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputCopyComponent),\n },\n];\n","import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\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 tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_TEXTFIELD_SIZE,\n TuiDirection,\n TuiHintModeT,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldSizeDirective,\n} from '@taiga-ui/core';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {merge, Observable, of, Subject, timer} from 'rxjs';\nimport {mapTo, startWith, switchMap} from 'rxjs/operators';\n\nimport {TUI_INPUT_COPY_PROVIDERS} from './input-copy.providers';\n\n// @dynamic\n@Component({\n selector: 'tui-input-copy',\n templateUrl: './input-copy.template.html',\n styleUrls: ['./input-copy.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_INPUT_COPY_PROVIDERS,\n})\nexport class TuiInputCopyComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private readonly copy$ = new Subject<void>();\n\n @Input()\n @tuiDefaultProp()\n successMessage: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n messageDirection: TuiDirection = 'bottom-left';\n\n @Input()\n @tuiDefaultProp()\n messageMode: TuiHintModeT | null = null;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_COPY_TEXTS) private readonly copyTexts$: Observable<[string, string]>,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return !!this.value;\n }\n\n @tuiPure\n get hintText$(): Observable<PolymorpheusContent> {\n return this.copyTexts$.pipe(\n switchMap(texts =>\n this.copy$.pipe(\n switchMap(() =>\n merge(\n of(this.successMessage || texts[1]),\n timer(3000).pipe(mapTo(texts[0])),\n ),\n ),\n startWith(texts[0]),\n ),\n ),\n );\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get icon(): string {\n return this.textfieldSize.size === 's' ? 'tuiIconCopy' : 'tuiIconCopyLarge';\n }\n\n onValueChange(value: string) {\n this.updateValue(value);\n }\n\n onFocused(focused: boolean) {\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 copy() {\n if (!this.textfield || !this.textfield.nativeFocusableElement) {\n return;\n }\n\n this.textfield.nativeFocusableElement.select();\n this.documentRef.execCommand('copy');\n this.copy$.next();\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n}\n","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputCopyComponent} from './input-copy.component';\n\n@Directive({\n selector: 'tui-input-copy',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputCopyDirective),\n },\n ],\n})\nexport class TuiInputCopyDirective extends TuiAbstractTextfieldHost<TuiInputCopyComponent> {\n onValueChange(value: string) {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiHintModule,\n TuiNotificationsModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputCopyComponent} from './input-copy.component';\nimport {TuiInputCopyDirective} from './input-copy.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiSvgModule,\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiNotificationsModule,\n ],\n declarations: [TuiInputCopyComponent, TuiInputCopyDirective],\n exports: [TuiInputCopyComponent, TuiInputCopyDirective, TuiTextfieldComponent],\n})\nexport class TuiInputCopyModule {}\n","/**\n * Generated bundle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BACvD;aACJ;SACJ,CAAC;OACW,qBAAqB,CAIjC;IAAD,4BAAC;CAAA,CAJ0C,wBAAwB;;;ICYnE;KAAkC;IAArB,kBAAkB;QAZ9B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,YAAY;gBACZ,aAAa;gBACb,2BAA2B;gBAC3B,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;YAC5D,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,CAAC;SACjF,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;AC1BA;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __extends, __decorate, __param } from 'tslib';
|
|
2
|
-
import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, HostBinding, Component, ChangeDetectionStrategy, forwardRef, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { NgControl } from '@angular/forms';
|
|
4
4
|
import { isNativeFocused, isPresent, setNativeFocused, clamp, TUI_IS_MOBILE, tuiDefaultProp, tuiPure, TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl } from '@taiga-ui/cdk';
|
|
5
|
-
import { tuiCreateNumberMask, formatNumber, TUI_TEXTFIELD_APPEARANCE, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TUI_NUMBER_FORMAT, TuiPrimitiveTextfieldComponent, TuiButtonModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule } from '@taiga-ui/core';
|
|
5
|
+
import { tuiCreateNumberMask, formatNumber, TUI_TEXTFIELD_APPEARANCE, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TUI_NUMBER_FORMAT, TuiPrimitiveTextfieldComponent, TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost, TuiButtonModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiTextfieldComponent } from '@taiga-ui/core';
|
|
6
6
|
import { TUI_PLUS_MINUS_TEXTS } from '@taiga-ui/kit/tokens';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
@@ -121,18 +121,14 @@ var TuiInputCountComponent = /** @class */ (function (_super) {
|
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(TuiInputCountComponent.prototype, "minusButtonDisabled", {
|
|
123
123
|
get: function () {
|
|
124
|
-
return (this.
|
|
125
|
-
this.readOnly ||
|
|
126
|
-
(isPresent(this.value) && this.value <= this.min));
|
|
124
|
+
return !this.interactive || (isPresent(this.value) && this.value <= this.min);
|
|
127
125
|
},
|
|
128
126
|
enumerable: true,
|
|
129
127
|
configurable: true
|
|
130
128
|
});
|
|
131
129
|
Object.defineProperty(TuiInputCountComponent.prototype, "plusButtonDisabled", {
|
|
132
130
|
get: function () {
|
|
133
|
-
return (this.
|
|
134
|
-
this.readOnly ||
|
|
135
|
-
(isPresent(this.value) && this.value >= this.max));
|
|
131
|
+
return !this.interactive || (isPresent(this.value) && this.value >= this.max);
|
|
136
132
|
},
|
|
137
133
|
enumerable: true,
|
|
138
134
|
configurable: true
|
|
@@ -292,13 +288,17 @@ var TuiInputCountComponent = /** @class */ (function (_super) {
|
|
|
292
288
|
TuiInputCountComponent = TuiInputCountComponent_1 = __decorate([
|
|
293
289
|
Component({
|
|
294
290
|
selector: 'tui-input-count',
|
|
295
|
-
template: "<tui-primitive-textfield\n tuiValueAccessor\n tuiTextfieldAutocomplete=\"off\"\n tuiTextfieldInputMode=\"numeric\"\n class=\"textfield\"\n [tuiTextfieldMaxLength]=\"18\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [disabled]=\"
|
|
291
|
+
template: "<tui-primitive-textfield\n tuiValueAccessor\n tuiTextfieldAutocomplete=\"off\"\n tuiTextfieldInputMode=\"numeric\"\n class=\"textfield\"\n [tuiTextfieldMaxLength]=\"18\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [textMask]=\"getMask(min < 0)\"\n [invalid]=\"computedInvalid\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange()\"\n (keydown)=\"onKeydown($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n <ng-content select=\"input\" ngProjectAs=\"input\"></ng-content>\n</tui-primitive-textfield>\n<ng-container *ngIf=\"!buttonsHidden && (minusTexts$ | async) as texts\">\n <section class=\"buttons\">\n <button\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-input-count__plus-button\"\n size=\"s\"\n class=\"button button_plus\"\n [icon]=\"iconUp\"\n [appearance]=\"options.appearance\"\n [title]=\"texts[0]\"\n [disabled]=\"plusButtonDisabled\"\n [focusable]=\"false\"\n (mousedown)=\"onButtonMouseDown($event, plusButtonDisabled)\"\n (click)=\"increaseValue()\"\n ></button>\n <button\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-input-count__minus-button\"\n size=\"s\"\n class=\"button button_minus\"\n [icon]=\"iconDown\"\n [appearance]=\"options.appearance\"\n [disabled]=\"minusButtonDisabled\"\n [focusable]=\"false\"\n [title]=\"texts[1]\"\n (mousedown)=\"onButtonMouseDown($event, minusButtonDisabled)\"\n (click)=\"decreaseValue()\"\n ></button>\n </section>\n</ng-container>\n",
|
|
296
292
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
297
293
|
providers: [
|
|
298
294
|
{
|
|
299
295
|
provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
300
296
|
useExisting: forwardRef(function () { return TuiInputCountComponent_1; }),
|
|
301
297
|
},
|
|
298
|
+
{
|
|
299
|
+
provide: AbstractTuiControl,
|
|
300
|
+
useExisting: forwardRef(function () { return TuiInputCountComponent_1; }),
|
|
301
|
+
},
|
|
302
302
|
],
|
|
303
303
|
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-tui-host-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-tui-host-size='l'] .buttons .button{width:calc(var(--tui-height-l) * .75)}"]
|
|
304
304
|
}),
|
|
@@ -316,6 +316,34 @@ var TuiInputCountComponent = /** @class */ (function (_super) {
|
|
|
316
316
|
return TuiInputCountComponent;
|
|
317
317
|
}(AbstractTuiControl));
|
|
318
318
|
|
|
319
|
+
var TuiInputCountDirective = /** @class */ (function (_super) {
|
|
320
|
+
__extends(TuiInputCountDirective, _super);
|
|
321
|
+
function TuiInputCountDirective() {
|
|
322
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
323
|
+
}
|
|
324
|
+
TuiInputCountDirective_1 = TuiInputCountDirective;
|
|
325
|
+
TuiInputCountDirective.prototype.onValueChange = function () {
|
|
326
|
+
this.host.onValueChange();
|
|
327
|
+
};
|
|
328
|
+
TuiInputCountDirective.prototype.process = function (input) {
|
|
329
|
+
input.autocomplete = 'off';
|
|
330
|
+
input.inputMode = 'numeric';
|
|
331
|
+
};
|
|
332
|
+
var TuiInputCountDirective_1;
|
|
333
|
+
TuiInputCountDirective = TuiInputCountDirective_1 = __decorate([
|
|
334
|
+
Directive({
|
|
335
|
+
selector: 'tui-input-count',
|
|
336
|
+
providers: [
|
|
337
|
+
{
|
|
338
|
+
provide: TUI_TEXTFIELD_HOST,
|
|
339
|
+
useExisting: forwardRef(function () { return TuiInputCountDirective_1; }),
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
})
|
|
343
|
+
], TuiInputCountDirective);
|
|
344
|
+
return TuiInputCountDirective;
|
|
345
|
+
}(TuiAbstractTextfieldHost));
|
|
346
|
+
|
|
319
347
|
var TuiInputCountModule = /** @class */ (function () {
|
|
320
348
|
function TuiInputCountModule() {
|
|
321
349
|
}
|
|
@@ -330,8 +358,8 @@ var TuiInputCountModule = /** @class */ (function () {
|
|
|
330
358
|
TuiValueAccessorModule,
|
|
331
359
|
PolymorpheusModule,
|
|
332
360
|
],
|
|
333
|
-
declarations: [TuiInputCountComponent],
|
|
334
|
-
exports: [TuiInputCountComponent],
|
|
361
|
+
declarations: [TuiInputCountComponent, TuiInputCountDirective],
|
|
362
|
+
exports: [TuiInputCountComponent, TuiInputCountDirective, TuiTextfieldComponent],
|
|
335
363
|
})
|
|
336
364
|
], TuiInputCountModule);
|
|
337
365
|
return TuiInputCountModule;
|
|
@@ -341,5 +369,5 @@ var TuiInputCountModule = /** @class */ (function () {
|
|
|
341
369
|
* Generated bundle index. Do not edit.
|
|
342
370
|
*/
|
|
343
371
|
|
|
344
|
-
export { PASSWORD_ICON_DOWN, PASSWORD_ICON_UP, TUI_INPUT_COUNT_DEFAULT_OPTIONS, TUI_INPUT_COUNT_OPTIONS, TuiInputCountComponent, TuiInputCountModule };
|
|
372
|
+
export { PASSWORD_ICON_DOWN, PASSWORD_ICON_UP, TUI_INPUT_COUNT_DEFAULT_OPTIONS, TUI_INPUT_COUNT_OPTIONS, TuiInputCountComponent, TuiInputCountDirective, TuiInputCountModule };
|
|
345
373
|
//# sourceMappingURL=taiga-ui-kit-components-input-count.js.map
|