@taiga-ui/kit 2.25.0 → 2.28.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/input-slider.d.ts +5 -5
- package/abstract/slider/slider.d.ts +5 -5
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +9 -9
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +23 -7
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +527 -0
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +3 -3
- 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 +18 -19
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.js +20 -8
- package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +8 -8
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +3 -3
- 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 +16 -13
- 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 +1 -1
- 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 +20 -17
- 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 +1 -1
- 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 +17 -14
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js +1 -1
- 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 -1
- 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 +5 -4
- 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 +4 -3
- 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 +4 -3
- 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 +17 -31
- 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 +3 -3
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +22 -22
- 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 +6 -6
- 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-slider.umd.js +3 -3
- 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 +31 -31
- 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 +16 -16
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +18 -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 +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +13 -21
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +7 -7
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +9 -12
- 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 +18 -18
- 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 +22 -22
- 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-text-area.umd.js +4 -4
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +64 -53
- 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-directives-dropdown-context.umd.js +2 -4
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js +7 -2
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +7 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/components/accordion/accordion-item/accordion-item-eager-content.directive.d.ts +2 -0
- package/components/accordion/accordion-item/accordion-item.component.d.ts +4 -2
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/action/action.component.d.ts +1 -1
- package/components/action/taiga-ui-kit-components-action.metadata.json +1 -1
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +1 -1
- package/components/calendar-range/taiga-ui-kit-components-calendar-range.metadata.json +1 -1
- package/components/carousel/carousel-autoscroll.directive.d.ts +5 -0
- package/components/carousel/carousel-buttons.directive.d.ts +4 -0
- package/components/carousel/carousel-scroll.directive.d.ts +6 -0
- package/components/carousel/carousel.component.d.ts +29 -0
- package/components/carousel/carousel.directive.d.ts +11 -0
- package/components/carousel/carousel.module.d.ts +2 -0
- package/components/carousel/index.d.ts +6 -0
- package/components/carousel/package.json +13 -0
- package/components/carousel/taiga-ui-kit-components-carousel.d.ts +4 -0
- package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -0
- package/components/checkbox/checkbox.component.d.ts +1 -1
- package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
- package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
- package/components/checkbox-block/taiga-ui-kit-components-checkbox-block.metadata.json +1 -1
- package/components/checkbox-labeled/checkbox-labeled.component.d.ts +1 -1
- package/components/checkbox-labeled/taiga-ui-kit-components-checkbox-labeled.metadata.json +1 -1
- package/components/combo-box/combo-box.component.d.ts +5 -5
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +2 -2
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/field-error/field-error.component.d.ts +3 -2
- package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
- package/components/filter/filter.component.d.ts +2 -2
- package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/input/input.component.d.ts +3 -3
- package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
- package/components/input-copy/input-copy.component.d.ts +2 -2
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/input-count.component.d.ts +2 -2
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/input-date.component.d.ts +4 -4
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/input-date-range.component.d.ts +3 -3
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/input-date-time.component.d.ts +4 -4
- 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 +1 -1
- package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
- package/components/input-inline/input-inline.component.d.ts +1 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-month/input-month.component.d.ts +1 -1
- package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +1 -1
- package/components/input-month-range/input-month-range.component.d.ts +1 -1
- package/components/input-month-range/taiga-ui-kit-components-input-month-range.metadata.json +1 -1
- package/components/input-number/input-number.component.d.ts +3 -4
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/input-password.component.d.ts +2 -2
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/input-phone.component.d.ts +3 -3
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +6 -6
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +1 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/input-tag.component.d.ts +11 -11
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/input-time.component.d.ts +4 -4
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/line-clamp.component.d.ts +4 -4
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/marker-icon/marker-icon.component.d.ts +1 -1
- package/components/marker-icon/taiga-ui-kit-components-marker-icon.metadata.json +1 -1
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select.component.d.ts +7 -7
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/pagination/pagination.component.d.ts +1 -1
- package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
- package/components/pdf-viewer/pdf-viewer.component.d.ts +1 -4
- package/components/pdf-viewer/pdf-viewer.service.d.ts +7 -2
- package/components/pdf-viewer/taiga-ui-kit-components-pdf-viewer.metadata.json +1 -1
- package/components/progress/progress-circle/progress-circle.component.d.ts +1 -1
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
- package/components/radio/radio.component.d.ts +1 -1
- package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
- package/components/radio-block/radio-block.component.d.ts +1 -1
- package/components/radio-block/taiga-ui-kit-components-radio-block.metadata.json +1 -1
- package/components/radio-group/radio-group.component.d.ts +1 -1
- package/components/radio-group/taiga-ui-kit-components-radio-group.metadata.json +1 -1
- package/components/radio-labeled/radio-labeled.component.d.ts +1 -1
- package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
- package/components/radio-list/radio-list.component.d.ts +3 -3
- package/components/radio-list/taiga-ui-kit-components-radio-list.metadata.json +1 -1
- package/components/select/select.component.d.ts +3 -3
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/stepper/stepper.component.d.ts +3 -3
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/tabs/tabs.component.d.ts +2 -2
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -2
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tabs/underline/underline.component.d.ts +2 -2
- package/components/taiga-ui-kit-components.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/text-area/text-area.component.d.ts +1 -1
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/toggle/toggle.component.d.ts +1 -1
- package/components/tree/components/tree/tree.component.d.ts +7 -2
- package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
- package/components/tree/directives/tree-item-controller.directive.d.ts +1 -1
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/directives/dropdown-context/dropdown-context.directive.d.ts +1 -1
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.metadata.json +1 -1
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +3 -3
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.metadata.json +1 -1
- package/directives/highlight/highlight.directive.d.ts +2 -1
- package/directives/highlight/taiga-ui-kit-directives-highlight.metadata.json +1 -1
- package/directives/lazy-loading/lazy-loading.directive.d.ts +1 -1
- package/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.metadata.json +1 -1
- package/directives/present/present.directive.d.ts +1 -1
- package/directives/present/taiga-ui-kit-directives-present.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +2 -2
- package/esm2015/abstract/slider/slider.js +9 -9
- package/esm2015/components/accordion/accordion-item/accordion-item-content.directive.js +2 -3
- package/esm2015/components/accordion/accordion-item/accordion-item-eager-content.directive.js +11 -0
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +10 -6
- package/esm2015/components/accordion/accordion.module.js +4 -1
- package/esm2015/components/accordion/index.js +2 -1
- package/esm2015/components/action/action.component.js +4 -4
- package/esm2015/components/calendar-month/calendar-month.component.js +6 -6
- package/esm2015/components/calendar-range/calendar-range.component.js +1 -1
- package/esm2015/components/carousel/carousel-autoscroll.directive.js +21 -0
- package/esm2015/components/carousel/carousel-buttons.directive.js +24 -0
- package/esm2015/components/carousel/carousel-scroll.directive.js +26 -0
- package/esm2015/components/carousel/carousel.component.js +144 -0
- package/esm2015/components/carousel/carousel.directive.js +35 -0
- package/esm2015/components/carousel/carousel.module.js +38 -0
- package/esm2015/components/carousel/index.js +7 -0
- package/esm2015/components/carousel/taiga-ui-kit-components-carousel.js +5 -0
- package/esm2015/components/checkbox/checkbox.component.js +4 -4
- package/esm2015/components/checkbox-block/checkbox-block.component.js +4 -4
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +4 -4
- package/esm2015/components/combo-box/combo-box.component.js +19 -20
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +8 -8
- package/esm2015/components/field-error/field-error.component.js +15 -6
- package/esm2015/components/filter/filter.component.js +9 -9
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/input/input.component.js +8 -8
- package/esm2015/components/input-copy/input-copy.component.js +5 -5
- package/esm2015/components/input-count/input-count.component.js +4 -4
- package/esm2015/components/input-date/input-date.component.js +18 -15
- package/esm2015/components/input-date-range/input-date-range.component.js +17 -14
- package/esm2015/components/input-date-time/input-date-time.component.js +20 -17
- package/esm2015/components/input-file/input-file.component.js +2 -2
- package/esm2015/components/input-inline/input-inline.component.js +6 -5
- package/esm2015/components/input-month/input-month.component.js +5 -4
- package/esm2015/components/input-month-range/input-month-range.component.js +5 -4
- package/esm2015/components/input-number/input-number.component.js +17 -27
- package/esm2015/components/input-password/input-password.component.js +4 -4
- package/esm2015/components/input-phone/input-phone.component.js +7 -7
- package/esm2015/components/input-phone-international/input-phone-international.component.js +20 -20
- package/esm2015/components/input-slider/input-slider.component.js +4 -4
- package/esm2015/components/input-tag/input-tag.component.js +32 -32
- package/esm2015/components/input-time/input-time.component.js +17 -17
- package/esm2015/components/line-clamp/line-clamp.component.js +8 -8
- package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm2015/components/multi-select/multi-select.component.js +15 -15
- package/esm2015/components/pagination/pagination.component.js +5 -5
- package/esm2015/components/pdf-viewer/pdf-viewer.component.js +6 -20
- package/esm2015/components/pdf-viewer/pdf-viewer.service.js +4 -1
- package/esm2015/components/progress/pipes/abstract-color-segments.js +1 -1
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +4 -4
- package/esm2015/components/radio/radio.component.js +4 -4
- package/esm2015/components/radio-block/radio-block.component.js +4 -4
- package/esm2015/components/radio-group/radio-group.component.js +1 -1
- package/esm2015/components/radio-labeled/radio-labeled.component.js +4 -4
- package/esm2015/components/radio-list/radio-list.component.js +8 -8
- package/esm2015/components/select/select.component.js +10 -13
- package/esm2015/components/stepper/stepper.component.js +18 -18
- package/esm2015/components/tabs/tabs/tabs.component.js +16 -16
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +5 -5
- package/esm2015/components/tabs/underline/underline.component.js +3 -3
- package/esm2015/components/text-area/text-area.component.js +5 -5
- package/esm2015/components/toggle/toggle.component.js +4 -4
- package/esm2015/components/tree/components/tree/tree.component.js +15 -2
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +3 -3
- package/esm2015/components/tree/components/tree-item-content/tree-item-content.component.js +2 -3
- package/esm2015/components/tree/directives/tree-item-controller.directive.js +2 -2
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +3 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +2 -2
- package/esm2015/directives/highlight/highlight.directive.js +8 -3
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +4 -2
- package/esm2015/directives/present/present.directive.js +1 -1
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/pipes/stringify/stringify.pipe.js +1 -1
- package/esm2015/tokens/validation-errors.js +1 -1
- package/esm5/abstract/input-slider.js +2 -2
- package/esm5/abstract/slider/slider.js +9 -9
- package/esm5/components/accordion/accordion-item/accordion-item-content.directive.js +2 -3
- package/esm5/components/accordion/accordion-item/accordion-item-eager-content.directive.js +14 -0
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +10 -6
- package/esm5/components/accordion/accordion.module.js +4 -1
- package/esm5/components/accordion/index.js +2 -1
- package/esm5/components/action/action.component.js +4 -4
- package/esm5/components/calendar-month/calendar-month.component.js +8 -8
- package/esm5/components/calendar-range/calendar-range.component.js +1 -1
- package/esm5/components/carousel/carousel-autoscroll.directive.js +22 -0
- package/esm5/components/carousel/carousel-buttons.directive.js +27 -0
- package/esm5/components/carousel/carousel-scroll.directive.js +34 -0
- package/esm5/components/carousel/carousel.component.js +158 -0
- package/esm5/components/carousel/carousel.directive.js +45 -0
- package/esm5/components/carousel/carousel.module.js +41 -0
- package/esm5/components/carousel/index.js +7 -0
- package/esm5/components/carousel/taiga-ui-kit-components-carousel.js +5 -0
- package/esm5/components/checkbox/checkbox.component.js +4 -4
- package/esm5/components/checkbox-block/checkbox-block.component.js +4 -4
- package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +4 -4
- package/esm5/components/combo-box/combo-box.component.js +19 -20
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +8 -8
- package/esm5/components/field-error/field-error.component.js +19 -6
- package/esm5/components/filter/filter.component.js +9 -9
- package/esm5/components/index.js +2 -1
- package/esm5/components/input/input.component.js +8 -8
- package/esm5/components/input-copy/input-copy.component.js +5 -5
- package/esm5/components/input-count/input-count.component.js +4 -4
- package/esm5/components/input-date/input-date.component.js +18 -15
- package/esm5/components/input-date-range/input-date-range.component.js +17 -14
- package/esm5/components/input-date-time/input-date-time.component.js +21 -18
- package/esm5/components/input-file/input-file.component.js +2 -2
- package/esm5/components/input-inline/input-inline.component.js +6 -5
- package/esm5/components/input-month/input-month.component.js +5 -4
- package/esm5/components/input-month-range/input-month-range.component.js +5 -4
- package/esm5/components/input-number/input-number.component.js +18 -32
- package/esm5/components/input-password/input-password.component.js +4 -4
- package/esm5/components/input-phone/input-phone.component.js +7 -7
- package/esm5/components/input-phone-international/input-phone-international.component.js +23 -23
- package/esm5/components/input-slider/input-slider.component.js +4 -4
- package/esm5/components/input-tag/input-tag.component.js +32 -32
- package/esm5/components/input-time/input-time.component.js +17 -17
- package/esm5/components/line-clamp/line-clamp.component.js +8 -8
- package/esm5/components/marker-icon/marker-icon.component.js +2 -2
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm5/components/multi-select/multi-select.component.js +15 -15
- package/esm5/components/pagination/pagination.component.js +5 -5
- package/esm5/components/pdf-viewer/pdf-viewer.component.js +6 -20
- package/esm5/components/pdf-viewer/pdf-viewer.service.js +5 -1
- package/esm5/components/progress/pipes/abstract-color-segments.js +1 -1
- package/esm5/components/progress/progress-circle/progress-circle.component.js +4 -4
- package/esm5/components/radio/radio.component.js +4 -4
- package/esm5/components/radio-block/radio-block.component.js +4 -4
- package/esm5/components/radio-group/radio-group.component.js +1 -1
- package/esm5/components/radio-labeled/radio-labeled.component.js +4 -4
- package/esm5/components/radio-list/radio-list.component.js +8 -8
- package/esm5/components/select/select.component.js +10 -13
- package/esm5/components/stepper/stepper.component.js +19 -19
- package/esm5/components/tabs/tabs/tabs.component.js +17 -17
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +5 -5
- package/esm5/components/tabs/underline/underline.component.js +3 -3
- package/esm5/components/text-area/text-area.component.js +5 -5
- package/esm5/components/toggle/toggle.component.js +4 -4
- package/esm5/components/tree/components/tree/tree.component.js +15 -2
- package/esm5/components/tree/components/tree-item/tree-item.component.js +3 -3
- package/esm5/components/tree/components/tree-item-content/tree-item-content.component.js +2 -3
- package/esm5/components/tree/directives/tree-item-controller.directive.js +2 -2
- package/esm5/directives/dropdown-context/dropdown-context.directive.js +3 -5
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +2 -2
- package/esm5/directives/highlight/highlight.directive.js +8 -3
- package/esm5/directives/lazy-loading/lazy-loading.directive.js +8 -2
- package/esm5/directives/present/present.directive.js +1 -1
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +3 -3
- package/esm5/pipes/stringify/stringify.pipe.js +1 -1
- package/esm5/tokens/validation-errors.js +1 -1
- package/fesm2015/taiga-ui-kit-abstract.js +9 -9
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +21 -9
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +4 -4
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +5 -5
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +267 -0
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -0
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +4 -4
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +20 -21
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +9 -9
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-field-error.js +14 -5
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +9 -9
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +5 -5
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +18 -15
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +20 -17
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +18 -15
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +6 -5
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +5 -4
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +5 -4
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +17 -27
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +3 -3
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +20 -20
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +8 -8
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +34 -34
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +17 -17
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +9 -9
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +8 -8
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +20 -20
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +6 -6
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +9 -19
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +3 -3
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +9 -9
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +4 -4
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +11 -14
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +18 -18
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +22 -22
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +5 -5
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +4 -4
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +56 -45
- 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-directives-dropdown-context.js +2 -4
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js +7 -2
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +9 -9
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +24 -9
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-action.js +4 -4
- package/fesm5/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +7 -7
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +306 -0
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -0
- package/fesm5/taiga-ui-kit-components-checkbox-block.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +4 -4
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +20 -21
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +9 -9
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-field-error.js +18 -5
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +9 -9
- package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +5 -5
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +18 -15
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +21 -18
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +18 -15
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +6 -5
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +5 -4
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +5 -4
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +18 -32
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +3 -3
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +23 -23
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +8 -8
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +34 -34
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +17 -17
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +9 -9
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +8 -8
- package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +20 -20
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js +6 -6
- package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js +10 -19
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +3 -3
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-list.js +9 -9
- package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +4 -4
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +11 -14
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +19 -19
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +23 -23
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +5 -5
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +4 -4
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +65 -54
- 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-directives-dropdown-context.js +2 -4
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-highlight.js +7 -2
- package/fesm5/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js +7 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js +2 -2
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/internal/primitive-calendar-range/primitive-calendar-range.component.d.ts +1 -1
- package/internal/primitive-calendar-range/taiga-ui-kit-internal-primitive-calendar-range.metadata.json +1 -1
- package/package.json +6 -5
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/tokens/validation-errors.d.ts +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Input, Directive, Inject, forwardRef, HostBinding, Component, ChangeDetectionStrategy, InjectionToken,
|
|
2
|
+
import { Input, Directive, Inject, forwardRef, HostBinding, Component, ChangeDetectionStrategy, InjectionToken, SkipSelf, ElementRef, ContentChildren, Optional, ViewChild, EventEmitter, Output, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { EMPTY_ARRAY, tuiDefaultProp, ALWAYS_TRUE_HANDLER, EMPTY_FUNCTION, EMPTY_QUERY, isPresent } from '@taiga-ui/cdk';
|
|
4
4
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -39,8 +39,7 @@ let TuiTreeItemContentComponent = class TuiTreeItemContentComponent {
|
|
|
39
39
|
this.controller !== TUI_DEFAULT_TREE_CONTROLLER);
|
|
40
40
|
}
|
|
41
41
|
onClick() {
|
|
42
|
-
|
|
43
|
-
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.toggle(this.context.$implicit);
|
|
42
|
+
this.controller.toggle(this.context.$implicit);
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
45
|
TuiTreeItemContentComponent.ctorParameters = () => [
|
|
@@ -82,45 +81,6 @@ const TUI_TREE_LEVEL = new InjectionToken('Nesting level of current TreeView nod
|
|
|
82
81
|
factory: () => -1,
|
|
83
82
|
});
|
|
84
83
|
|
|
85
|
-
var TuiTreeComponent_1;
|
|
86
|
-
let TuiTreeComponent = TuiTreeComponent_1 = class TuiTreeComponent {
|
|
87
|
-
constructor(directive) {
|
|
88
|
-
this.directive = directive;
|
|
89
|
-
this.content = ({ $implicit }) => String($implicit);
|
|
90
|
-
}
|
|
91
|
-
get children() {
|
|
92
|
-
var _a, _b;
|
|
93
|
-
return ((_b = (_a = this.directive) === null || _a === void 0 ? void 0 : _a.childrenHandler(this.value)) !== null && _b !== void 0 ? _b : TuiTreeChildrenDirective.defaultHandler(this.value));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
TuiTreeComponent.ctorParameters = () => [
|
|
97
|
-
{ type: TuiTreeChildrenDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiTreeChildrenDirective,] }] }
|
|
98
|
-
];
|
|
99
|
-
__decorate([
|
|
100
|
-
Input()
|
|
101
|
-
], TuiTreeComponent.prototype, "value", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
Input()
|
|
104
|
-
], TuiTreeComponent.prototype, "content", void 0);
|
|
105
|
-
TuiTreeComponent = TuiTreeComponent_1 = __decorate([
|
|
106
|
-
Component({
|
|
107
|
-
selector: 'tui-tree[value]',
|
|
108
|
-
template: "<tui-tree-item #view [tuiTreeNode]=\"value\">\n <div\n *ngIf=\"value !== children\"\n polymorpheus-outlet\n [content]=\"content\"\n [context]=\"{$implicit: value, node: view}\"\n ></div>\n <tui-tree\n *ngFor=\"let child of children\"\n [value]=\"child\"\n [content]=\"content\"\n ></tui-tree>\n</tui-tree-item>\n",
|
|
109
|
-
providers: [
|
|
110
|
-
{
|
|
111
|
-
provide: TUI_TREE_NODE,
|
|
112
|
-
useExisting: TuiTreeComponent_1,
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
host: {
|
|
116
|
-
role: 'tree',
|
|
117
|
-
},
|
|
118
|
-
styles: [":host{position:relative;display:block}"]
|
|
119
|
-
}),
|
|
120
|
-
__param(0, Optional()),
|
|
121
|
-
__param(0, Inject(TuiTreeChildrenDirective))
|
|
122
|
-
], TuiTreeComponent);
|
|
123
|
-
|
|
124
84
|
const TUI_TREE_ITEM_PROVIDERS = [
|
|
125
85
|
{
|
|
126
86
|
provide: TUI_TREE_LEVEL,
|
|
@@ -142,8 +102,8 @@ let TuiTreeItemComponent = class TuiTreeItemComponent {
|
|
|
142
102
|
this.controller = controller;
|
|
143
103
|
this.level = level;
|
|
144
104
|
this.content = content;
|
|
145
|
-
this.change$ = new Subject();
|
|
146
105
|
this.nested = EMPTY_QUERY;
|
|
106
|
+
this.change$ = new Subject();
|
|
147
107
|
this.expanded$ = this.change$.pipe(startWith(null), map(() => this.isExpanded), distinctUntilChanged());
|
|
148
108
|
this.attached$ = this.change$.pipe(map(() => this.elementRef.nativeElement.isConnected), distinctUntilChanged());
|
|
149
109
|
}
|
|
@@ -172,7 +132,7 @@ __decorate([
|
|
|
172
132
|
TuiTreeItemComponent = __decorate([
|
|
173
133
|
Component({
|
|
174
134
|
selector: 'tui-tree-item',
|
|
175
|
-
template: "<ng-template #template><ng-content></ng-content></ng-template>\n<div\n polymorpheus-outlet\n
|
|
135
|
+
template: "<ng-template #template><ng-content></ng-content></ng-template>\n<div\n polymorpheus-outlet\n [content]=\"content\"\n [context]=\"{$implicit: this, template: template}\"\n></div>\n<tui-expand\n *ngIf=\"isExpandable\"\n role=\"group\"\n class=\"t-children\"\n [expanded]=\"expanded$ | async\"\n>\n <div>\n <ng-content select=\"tui-tree-item\"></ng-content>\n <ng-content select=\"tui-tree\"></ng-content>\n </div>\n</tui-expand>\n<ng-container *ngIf=\"attached$ | async\"></ng-container>\n",
|
|
176
136
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
177
137
|
providers: TUI_TREE_ITEM_PROVIDERS,
|
|
178
138
|
host: {
|
|
@@ -186,6 +146,57 @@ TuiTreeItemComponent = __decorate([
|
|
|
186
146
|
__param(3, Inject(forwardRef(() => TUI_TREE_CONTENT)))
|
|
187
147
|
], TuiTreeItemComponent);
|
|
188
148
|
|
|
149
|
+
var TuiTreeComponent_1;
|
|
150
|
+
let TuiTreeComponent = TuiTreeComponent_1 = class TuiTreeComponent {
|
|
151
|
+
constructor(directive) {
|
|
152
|
+
this.directive = directive;
|
|
153
|
+
this.content = ({ $implicit }) => String($implicit);
|
|
154
|
+
}
|
|
155
|
+
get children() {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
return ((_b = (_a = this.directive) === null || _a === void 0 ? void 0 : _a.childrenHandler(this.value)) !== null && _b !== void 0 ? _b : TuiTreeChildrenDirective.defaultHandler(this.value));
|
|
158
|
+
}
|
|
159
|
+
ngDoCheck() {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
(_a = this.item) === null || _a === void 0 ? void 0 : _a.ngDoCheck();
|
|
162
|
+
(_b = this.child) === null || _b === void 0 ? void 0 : _b.ngDoCheck();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
TuiTreeComponent.ctorParameters = () => [
|
|
166
|
+
{ type: TuiTreeChildrenDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiTreeChildrenDirective,] }] }
|
|
167
|
+
];
|
|
168
|
+
__decorate([
|
|
169
|
+
Input()
|
|
170
|
+
], TuiTreeComponent.prototype, "value", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
ViewChild(TuiTreeItemComponent)
|
|
173
|
+
], TuiTreeComponent.prototype, "item", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
ViewChild(TuiTreeComponent_1)
|
|
176
|
+
], TuiTreeComponent.prototype, "child", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
Input()
|
|
179
|
+
], TuiTreeComponent.prototype, "content", void 0);
|
|
180
|
+
TuiTreeComponent = TuiTreeComponent_1 = __decorate([
|
|
181
|
+
Component({
|
|
182
|
+
selector: 'tui-tree[value]',
|
|
183
|
+
template: "<tui-tree-item #view [tuiTreeNode]=\"value\">\n <div\n *ngIf=\"value !== children\"\n polymorpheus-outlet\n [content]=\"content\"\n [context]=\"{$implicit: value, node: view}\"\n ></div>\n <tui-tree\n *ngFor=\"let child of children\"\n [value]=\"child\"\n [content]=\"content\"\n ></tui-tree>\n</tui-tree-item>\n",
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
providers: [
|
|
186
|
+
{
|
|
187
|
+
provide: TUI_TREE_NODE,
|
|
188
|
+
useExisting: TuiTreeComponent_1,
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
host: {
|
|
192
|
+
role: 'tree',
|
|
193
|
+
},
|
|
194
|
+
styles: [":host{position:relative;display:block}"]
|
|
195
|
+
}),
|
|
196
|
+
__param(0, Optional()),
|
|
197
|
+
__param(0, Inject(TuiTreeChildrenDirective))
|
|
198
|
+
], TuiTreeComponent);
|
|
199
|
+
|
|
189
200
|
var TuiTreeControllerDirective_1;
|
|
190
201
|
let TuiTreeControllerDirective = TuiTreeControllerDirective_1 = class TuiTreeControllerDirective {
|
|
191
202
|
constructor() {
|
|
@@ -246,8 +257,8 @@ TuiTreeControllerDirective = TuiTreeControllerDirective_1 = __decorate([
|
|
|
246
257
|
var TuiTreeItemControllerDirective_1;
|
|
247
258
|
let TuiTreeItemControllerDirective = TuiTreeItemControllerDirective_1 = class TuiTreeItemControllerDirective {
|
|
248
259
|
constructor() {
|
|
249
|
-
this.fallback = true;
|
|
250
260
|
this.map = new WeakMap();
|
|
261
|
+
this.fallback = true;
|
|
251
262
|
}
|
|
252
263
|
isExpanded(item) {
|
|
253
264
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-tree.js","sources":["ng://@taiga-ui/kit/components/tree/directives/tree-children.directive.ts","ng://@taiga-ui/kit/components/tree/components/tree-item-content/tree-item-content.component.ts","ng://@taiga-ui/kit/components/tree/misc/tree.constants.ts","ng://@taiga-ui/kit/components/tree/misc/tree.tokens.ts","ng://@taiga-ui/kit/components/tree/components/tree/tree.component.ts","ng://@taiga-ui/kit/components/tree/components/tree-item/tree-item.providers.ts","ng://@taiga-ui/kit/components/tree/components/tree-item/tree-item.component.ts","ng://@taiga-ui/kit/components/tree/directives/tree-controller.directive.ts","ng://@taiga-ui/kit/components/tree/directives/tree-item-controller.directive.ts","ng://@taiga-ui/kit/components/tree/directives/tree-node.directive.ts","ng://@taiga-ui/kit/components/tree/misc/tree.service.ts","ng://@taiga-ui/kit/components/tree/tree.module.ts","ng://@taiga-ui/kit/components/tree/taiga-ui-kit-components-tree.ts"],"sourcesContent":["import {Directive, Input} from '@angular/core';\nimport {EMPTY_ARRAY, tuiDefaultProp, TuiHandler} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-tree[childrenHandler]',\n})\nexport class TuiTreeChildrenDirective<T> {\n @Input()\n @tuiDefaultProp()\n childrenHandler: TuiHandler<T, readonly T[]> =\n TuiTreeChildrenDirective.defaultHandler;\n\n static defaultHandler<G>(item: G): readonly G[] {\n return Array.isArray(item) ? item : EMPTY_ARRAY;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_DEFAULT_TREE_CONTROLLER} from '../../misc/tree.constants';\nimport {TuiTreeController, TuiTreeItemContext} from '../../misc/tree.interfaces';\nimport {TUI_TREE_CONTROLLER} from '../../misc/tree.tokens';\n\n@Component({\n selector: 'tui-tree-item-content',\n templateUrl: 'tree-item-content.template.html',\n styleUrls: ['tree-item-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTreeItemContentComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT) readonly context: TuiTreeItemContext,\n @Inject(forwardRef(() => TUI_TREE_CONTROLLER))\n private readonly controller: TuiTreeController,\n ) {}\n\n get isExpanded(): boolean {\n return this.context.$implicit.isExpanded;\n }\n\n @HostBinding('class._expandable')\n get isExpandable(): boolean {\n return (\n this.context.$implicit.isExpandable &&\n this.controller !== TUI_DEFAULT_TREE_CONTROLLER\n );\n }\n\n onClick() {\n this.controller?.toggle(this.context.$implicit);\n }\n}\n","import {ALWAYS_TRUE_HANDLER, EMPTY_FUNCTION} from '@taiga-ui/cdk';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeItemContentComponent} from '../components/tree-item-content/tree-item-content.component';\nimport {TuiTreeController} from './tree.interfaces';\n\nexport const TUI_TREE_ITEM_CONTENT = new PolymorpheusComponent(\n TuiTreeItemContentComponent,\n);\n\nexport const TUI_DEFAULT_TREE_CONTROLLER: TuiTreeController = {\n isExpanded: ALWAYS_TRUE_HANDLER,\n toggle: EMPTY_FUNCTION as () => void,\n};\n","import {InjectionToken} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_DEFAULT_TREE_CONTROLLER, TUI_TREE_ITEM_CONTENT} from './tree.constants';\nimport {\n TuiTreeAccessor,\n TuiTreeController,\n TuiTreeItemContext,\n TuiTreeLoader,\n} from './tree.interfaces';\n\nexport const TUI_TREE_ACCESSOR = new InjectionToken<TuiTreeAccessor<any>>(\n 'Controller for tracking value - TuiTreeItemComponent pairs',\n);\n\nexport const TUI_TREE_CONTROLLER = new InjectionToken<TuiTreeController>(\n 'Controller for expanding the tree',\n {\n factory: () => TUI_DEFAULT_TREE_CONTROLLER,\n },\n);\n\nexport const TUI_TREE_NODE = new InjectionToken('A node of a tree view');\n\nexport const TUI_TREE_LOADING = new InjectionToken(\n 'A tree node placeholder for loading',\n {factory: () => ({})},\n);\n\nexport const TUI_TREE_START = new InjectionToken('A tree node starting point');\n\nexport const TUI_TREE_LOADER = new InjectionToken<TuiTreeLoader<any>>(\n 'A service to load tree progressively',\n);\n\nexport const TUI_TREE_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiTreeItemContext>\n>('Content for a tree item', {\n factory: () => TUI_TREE_ITEM_CONTENT,\n});\n\nexport const TUI_TREE_LEVEL = new InjectionToken<number>(\n 'Nesting level of current TreeView node',\n {\n factory: () => -1,\n },\n);\n","import {Component, Inject, Input, Optional} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeChildrenDirective} from '../../directives/tree-children.directive';\nimport {TuiTreeContext} from '../../misc/tree.interfaces';\nimport {TUI_TREE_NODE} from '../../misc/tree.tokens';\n\n@Component({\n selector: 'tui-tree[value]',\n templateUrl: 'tree.template.html',\n styleUrls: ['tree.style.less'],\n providers: [\n {\n provide: TUI_TREE_NODE,\n useExisting: TuiTreeComponent,\n },\n ],\n host: {\n role: 'tree',\n },\n})\nexport class TuiTreeComponent<T> {\n @Input()\n value!: T;\n\n @Input()\n content: PolymorpheusContent<TuiTreeContext<T>> = ({$implicit}) => String($implicit);\n\n constructor(\n @Optional()\n @Inject(TuiTreeChildrenDirective)\n readonly directive: TuiTreeChildrenDirective<T> | null,\n ) {}\n\n get children(): readonly T[] {\n return (\n this.directive?.childrenHandler(this.value) ??\n TuiTreeChildrenDirective.defaultHandler(this.value)\n );\n }\n}\n","import {forwardRef, Provider, SkipSelf} from '@angular/core';\n\nimport {TUI_TREE_LEVEL, TUI_TREE_NODE} from '../../misc/tree.tokens';\nimport {TuiTreeItemComponent} from './tree-item.component';\n\nexport const TUI_TREE_ITEM_PROVIDERS: Provider[] = [\n {\n provide: TUI_TREE_LEVEL,\n deps: [[new SkipSelf(), TUI_TREE_LEVEL]],\n useFactory: treeLevelFactory,\n },\n {\n provide: TUI_TREE_NODE,\n useExisting: forwardRef(() => TuiTreeItemComponent),\n },\n];\n\nexport function treeLevelFactory(level: number): number {\n return ++level;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DoCheck,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Subject} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiTreeController, TuiTreeItemContext} from '../../misc/tree.interfaces';\nimport {\n TUI_TREE_CONTENT,\n TUI_TREE_CONTROLLER,\n TUI_TREE_LEVEL,\n TUI_TREE_NODE,\n} from '../../misc/tree.tokens';\nimport {TUI_TREE_ITEM_PROVIDERS} from './tree-item.providers';\n\n@Component({\n selector: 'tui-tree-item',\n templateUrl: './tree-item.template.html',\n styleUrls: ['./tree-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TREE_ITEM_PROVIDERS,\n host: {\n role: 'treeitem',\n },\n})\nexport class TuiTreeItemComponent implements DoCheck {\n private readonly change$ = new Subject<void>();\n\n @ContentChildren(TUI_TREE_NODE as any)\n private readonly nested: QueryList<unknown> = EMPTY_QUERY;\n\n readonly expanded$ = this.change$.pipe(\n startWith(null),\n map(() => this.isExpanded),\n distinctUntilChanged(),\n );\n\n readonly attached$ = this.change$.pipe(\n map(() => this.elementRef.nativeElement.isConnected),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(forwardRef(() => TUI_TREE_CONTROLLER))\n private readonly controller: TuiTreeController,\n @Inject(forwardRef(() => TUI_TREE_LEVEL))\n readonly level: number,\n @Inject(forwardRef(() => TUI_TREE_CONTENT))\n readonly content: PolymorpheusContent<TuiTreeItemContext>,\n ) {}\n\n @HostBinding('class._expandable')\n get isExpandable(): boolean {\n return !!this.nested.length;\n }\n\n get isExpanded(): boolean {\n return this.controller.isExpanded(this);\n }\n\n ngDoCheck() {\n this.change$.next();\n }\n}\n","import {Directive, EventEmitter, Input, Output} from '@angular/core';\nimport {isPresent, tuiDefaultProp} from '@taiga-ui/cdk';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeAccessor, TuiTreeController} from '../misc/tree.interfaces';\nimport {TUI_TREE_ACCESSOR, TUI_TREE_CONTROLLER} from '../misc/tree.tokens';\n\n@Directive({\n selector: '[tuiTreeController][map]',\n exportAs: 'tuiTreeController',\n providers: [\n {\n provide: TUI_TREE_ACCESSOR,\n useExisting: TuiTreeControllerDirective,\n },\n {\n provide: TUI_TREE_CONTROLLER,\n useExisting: TuiTreeControllerDirective,\n },\n ],\n})\nexport class TuiTreeControllerDirective<T>\n implements TuiTreeController, TuiTreeAccessor<T>\n{\n @Input('tuiTreeController')\n @tuiDefaultProp()\n fallback = true;\n\n @Input()\n @tuiDefaultProp()\n map: Map<T, boolean> = new Map();\n\n @Output()\n readonly toggled = new EventEmitter<T>();\n\n readonly items = new Map<TuiTreeItemComponent, T>();\n\n register(item: TuiTreeItemComponent, value: T) {\n this.items.set(item, value);\n }\n\n unregister(item: TuiTreeItemComponent) {\n this.items.delete(item);\n }\n\n isExpanded(item: TuiTreeItemComponent): boolean {\n const value = this.items.get(item);\n\n return (value && this.map.get(value)) ?? this.fallback;\n }\n\n toggle(item: TuiTreeItemComponent) {\n const value = this.items.get(item);\n const expanded = this.isExpanded(item);\n\n if (!isPresent(value)) {\n return;\n }\n\n this.toggled.emit(value);\n this.map.set(value, !expanded);\n }\n}\n","import {Directive, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeController} from '../misc/tree.interfaces';\nimport {TUI_TREE_CONTROLLER} from '../misc/tree.tokens';\n\n@Directive({\n selector: '[tuiTreeController]:not([map])',\n exportAs: 'tuiTreeController',\n providers: [\n {\n provide: TUI_TREE_CONTROLLER,\n useExisting: TuiTreeItemControllerDirective,\n },\n ],\n})\nexport class TuiTreeItemControllerDirective implements TuiTreeController {\n @Input('tuiTreeController')\n @tuiDefaultProp()\n fallback = true;\n\n private readonly map = new WeakMap<TuiTreeItemComponent, boolean>();\n\n isExpanded(item: TuiTreeItemComponent): boolean {\n return this.map.get(item) ?? this.fallback;\n }\n\n toggle(item: TuiTreeItemComponent) {\n this.map.set(item, !this.isExpanded(item));\n }\n}\n","import {Directive, Inject, Input, OnDestroy, Optional} from '@angular/core';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeAccessor} from '../misc/tree.interfaces';\nimport {TUI_TREE_ACCESSOR} from '../misc/tree.tokens';\n\n@Directive({\n selector: 'tui-tree-item[tuiTreeNode]',\n})\nexport class TuiTreeNodeDirective<T> implements OnDestroy {\n @Input('tuiTreeNode')\n set value(value: T) {\n this.directive?.register(this.component, value);\n }\n\n constructor(\n @Optional()\n @Inject(TUI_TREE_ACCESSOR)\n private readonly directive: TuiTreeAccessor<T>,\n @Inject(TuiTreeItemComponent)\n private readonly component: TuiTreeItemComponent,\n ) {}\n\n ngOnDestroy() {\n this.directive?.unregister(this.component);\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {map, mapTo, startWith, switchMap, tap} from 'rxjs/operators';\n\nimport {TuiTreeLoader} from './tree.interfaces';\nimport {TUI_TREE_LOADER, TUI_TREE_LOADING, TUI_TREE_START} from './tree.tokens';\n\n// @dynamic\n@Injectable()\nexport class TuiTreeService<T> {\n private readonly map = new Map<T, readonly T[]>([[this.loading, []]]);\n\n private readonly load$ = new Subject<T>();\n\n readonly data$ = this.load$.pipe(\n switchMap(item =>\n this.loader.loadChildren(item).pipe(\n tap(children => this.map.set(item, children)),\n map(children => children.filter(item => !this.loader.hasChildren(item))),\n tap(children => children.forEach(child => this.map.set(child, []))),\n ),\n ),\n startWith(null),\n mapTo(this.start),\n );\n\n constructor(\n @Inject(TUI_TREE_LOADING) private readonly loading: T,\n @Inject(TUI_TREE_START) private readonly start: T,\n @Inject(TUI_TREE_LOADER) private readonly loader: TuiTreeLoader<T>,\n ) {}\n\n getChildren(item: T): readonly T[] {\n return this.map.get(item) ?? [this.loading];\n }\n\n loadChildren(item: T) {\n if (this.map.get(item)) {\n return;\n }\n\n this.map.set(item, [this.loading]);\n this.load$.next(item);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiButtonModule, TuiExpandModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeComponent} from './components/tree/tree.component';\nimport {TuiTreeItemComponent} from './components/tree-item/tree-item.component';\nimport {TuiTreeItemContentComponent} from './components/tree-item-content/tree-item-content.component';\nimport {TuiTreeChildrenDirective} from './directives/tree-children.directive';\nimport {TuiTreeControllerDirective} from './directives/tree-controller.directive';\nimport {TuiTreeItemControllerDirective} from './directives/tree-item-controller.directive';\nimport {TuiTreeNodeDirective} from './directives/tree-node.directive';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiExpandModule, TuiButtonModule],\n entryComponents: [TuiTreeItemContentComponent],\n declarations: [\n TuiTreeComponent,\n TuiTreeItemComponent,\n TuiTreeItemContentComponent,\n TuiTreeChildrenDirective,\n TuiTreeItemControllerDirective,\n TuiTreeControllerDirective,\n TuiTreeNodeDirective,\n ],\n exports: [\n TuiTreeComponent,\n TuiTreeItemComponent,\n TuiTreeChildrenDirective,\n TuiTreeItemControllerDirective,\n TuiTreeControllerDirective,\n ],\n})\nexport class TuiTreeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAMa,wBAAwB,gCAArC,MAAa,wBAAwB;IAArC;QAGI,oBAAe,GACX,0BAAwB,CAAC,cAAc,CAAC;KAK/C;IAHG,OAAO,cAAc,CAAI,IAAO;QAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC;KACnD;EACJ;AANG;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;iEAE2B;AAJnC,wBAAwB;IAHpC,SAAS,CAAC;QACP,QAAQ,EAAE,2BAA2B;KACxC,CAAC;GACW,wBAAwB,CASpC;;ICIY,2BAA2B,GAAxC,MAAa,2BAA2B;IACpC,YAC2C,OAA2B,EAEjD,UAA6B;QAFP,YAAO,GAAP,OAAO,CAAoB;QAEjD,eAAU,GAAV,UAAU,CAAmB;KAC9C;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;KAC5C;IAGD,IAAI,YAAY;QACZ,QACI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY;YACnC,IAAI,CAAC,UAAU,KAAK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AAC;QAC7E,eAAe,EAAE,CAAC,2BAA2B,CAAC;QAC9C,YAAY,EAAE;YACV,gBAAgB;YAChB,oBAAoB;YACpB,2BAA2B;YAC3B,wBAAwB;YACxB,8BAA8B;YAC9B,0BAA0B;YAC1B,oBAAoB;SACvB;QACD,OAAO,EAAE;YACL,gBAAgB;YAChB,oBAAoB;YACpB,wBAAwB;YACxB,8BAA8B;YAC9B,0BAA0B;SAC7B;KACJ,CAAC;GACW,aAAa,CAAG;;ACjC7B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-tree.js","sources":["ng://@taiga-ui/kit/components/tree/directives/tree-children.directive.ts","ng://@taiga-ui/kit/components/tree/components/tree-item-content/tree-item-content.component.ts","ng://@taiga-ui/kit/components/tree/misc/tree.constants.ts","ng://@taiga-ui/kit/components/tree/misc/tree.tokens.ts","ng://@taiga-ui/kit/components/tree/components/tree-item/tree-item.providers.ts","ng://@taiga-ui/kit/components/tree/components/tree-item/tree-item.component.ts","ng://@taiga-ui/kit/components/tree/components/tree/tree.component.ts","ng://@taiga-ui/kit/components/tree/directives/tree-controller.directive.ts","ng://@taiga-ui/kit/components/tree/directives/tree-item-controller.directive.ts","ng://@taiga-ui/kit/components/tree/directives/tree-node.directive.ts","ng://@taiga-ui/kit/components/tree/misc/tree.service.ts","ng://@taiga-ui/kit/components/tree/tree.module.ts","ng://@taiga-ui/kit/components/tree/taiga-ui-kit-components-tree.ts"],"sourcesContent":["import {Directive, Input} from '@angular/core';\nimport {EMPTY_ARRAY, tuiDefaultProp, TuiHandler} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-tree[childrenHandler]',\n})\nexport class TuiTreeChildrenDirective<T> {\n @Input()\n @tuiDefaultProp()\n childrenHandler: TuiHandler<T, readonly T[]> =\n TuiTreeChildrenDirective.defaultHandler;\n\n static defaultHandler<G>(item: G): readonly G[] {\n return Array.isArray(item) ? item : EMPTY_ARRAY;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_DEFAULT_TREE_CONTROLLER} from '../../misc/tree.constants';\nimport {TuiTreeController, TuiTreeItemContext} from '../../misc/tree.interfaces';\nimport {TUI_TREE_CONTROLLER} from '../../misc/tree.tokens';\n\n@Component({\n selector: 'tui-tree-item-content',\n templateUrl: 'tree-item-content.template.html',\n styleUrls: ['tree-item-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTreeItemContentComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT) readonly context: TuiTreeItemContext,\n @Inject(forwardRef(() => TUI_TREE_CONTROLLER))\n private readonly controller: TuiTreeController,\n ) {}\n\n get isExpanded(): boolean {\n return this.context.$implicit.isExpanded;\n }\n\n @HostBinding('class._expandable')\n get isExpandable(): boolean {\n return (\n this.context.$implicit.isExpandable &&\n this.controller !== TUI_DEFAULT_TREE_CONTROLLER\n );\n }\n\n onClick() {\n this.controller.toggle(this.context.$implicit);\n }\n}\n","import {ALWAYS_TRUE_HANDLER, EMPTY_FUNCTION} from '@taiga-ui/cdk';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeItemContentComponent} from '../components/tree-item-content/tree-item-content.component';\nimport {TuiTreeController} from './tree.interfaces';\n\nexport const TUI_TREE_ITEM_CONTENT = new PolymorpheusComponent(\n TuiTreeItemContentComponent,\n);\n\nexport const TUI_DEFAULT_TREE_CONTROLLER: TuiTreeController = {\n isExpanded: ALWAYS_TRUE_HANDLER,\n toggle: EMPTY_FUNCTION as () => void,\n};\n","import {InjectionToken} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_DEFAULT_TREE_CONTROLLER, TUI_TREE_ITEM_CONTENT} from './tree.constants';\nimport {\n TuiTreeAccessor,\n TuiTreeController,\n TuiTreeItemContext,\n TuiTreeLoader,\n} from './tree.interfaces';\n\nexport const TUI_TREE_ACCESSOR = new InjectionToken<TuiTreeAccessor<any>>(\n 'Controller for tracking value - TuiTreeItemComponent pairs',\n);\n\nexport const TUI_TREE_CONTROLLER = new InjectionToken<TuiTreeController>(\n 'Controller for expanding the tree',\n {\n factory: () => TUI_DEFAULT_TREE_CONTROLLER,\n },\n);\n\nexport const TUI_TREE_NODE = new InjectionToken('A node of a tree view');\n\nexport const TUI_TREE_LOADING = new InjectionToken(\n 'A tree node placeholder for loading',\n {factory: () => ({})},\n);\n\nexport const TUI_TREE_START = new InjectionToken('A tree node starting point');\n\nexport const TUI_TREE_LOADER = new InjectionToken<TuiTreeLoader<any>>(\n 'A service to load tree progressively',\n);\n\nexport const TUI_TREE_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiTreeItemContext>\n>('Content for a tree item', {\n factory: () => TUI_TREE_ITEM_CONTENT,\n});\n\nexport const TUI_TREE_LEVEL = new InjectionToken<number>(\n 'Nesting level of current TreeView node',\n {\n factory: () => -1,\n },\n);\n","import {forwardRef, Provider, SkipSelf} from '@angular/core';\n\nimport {TUI_TREE_LEVEL, TUI_TREE_NODE} from '../../misc/tree.tokens';\nimport {TuiTreeItemComponent} from './tree-item.component';\n\nexport const TUI_TREE_ITEM_PROVIDERS: Provider[] = [\n {\n provide: TUI_TREE_LEVEL,\n deps: [[new SkipSelf(), TUI_TREE_LEVEL]],\n useFactory: treeLevelFactory,\n },\n {\n provide: TUI_TREE_NODE,\n useExisting: forwardRef(() => TuiTreeItemComponent),\n },\n];\n\nexport function treeLevelFactory(level: number): number {\n return ++level;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DoCheck,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Subject} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiTreeController, TuiTreeItemContext} from '../../misc/tree.interfaces';\nimport {\n TUI_TREE_CONTENT,\n TUI_TREE_CONTROLLER,\n TUI_TREE_LEVEL,\n TUI_TREE_NODE,\n} from '../../misc/tree.tokens';\nimport {TUI_TREE_ITEM_PROVIDERS} from './tree-item.providers';\n\n@Component({\n selector: 'tui-tree-item',\n templateUrl: './tree-item.template.html',\n styleUrls: ['./tree-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TREE_ITEM_PROVIDERS,\n host: {\n role: 'treeitem',\n },\n})\nexport class TuiTreeItemComponent implements DoCheck {\n @ContentChildren(TUI_TREE_NODE as any)\n private readonly nested: QueryList<unknown> = EMPTY_QUERY;\n\n private readonly change$ = new Subject<void>();\n\n readonly expanded$ = this.change$.pipe(\n startWith(null),\n map(() => this.isExpanded),\n distinctUntilChanged(),\n );\n\n readonly attached$ = this.change$.pipe(\n map(() => this.elementRef.nativeElement.isConnected),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(forwardRef(() => TUI_TREE_CONTROLLER))\n private readonly controller: TuiTreeController,\n @Inject(forwardRef(() => TUI_TREE_LEVEL))\n readonly level: number,\n @Inject(forwardRef(() => TUI_TREE_CONTENT))\n readonly content: PolymorpheusContent<TuiTreeItemContext>,\n ) {}\n\n @HostBinding('class._expandable')\n get isExpandable(): boolean {\n return !!this.nested.length;\n }\n\n get isExpanded(): boolean {\n return this.controller.isExpanded(this);\n }\n\n ngDoCheck() {\n this.change$.next();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n Inject,\n Input,\n Optional,\n ViewChild,\n} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeChildrenDirective} from '../../directives/tree-children.directive';\nimport {TuiTreeContext} from '../../misc/tree.interfaces';\nimport {TUI_TREE_NODE} from '../../misc/tree.tokens';\nimport {TuiTreeItemComponent} from '../tree-item/tree-item.component';\n\n@Component({\n selector: 'tui-tree[value]',\n templateUrl: 'tree.template.html',\n styleUrls: ['tree.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_TREE_NODE,\n useExisting: TuiTreeComponent,\n },\n ],\n host: {\n role: 'tree',\n },\n})\nexport class TuiTreeComponent<T> implements DoCheck {\n @Input()\n value!: T;\n\n @ViewChild(TuiTreeItemComponent)\n readonly item?: TuiTreeItemComponent;\n\n @ViewChild(TuiTreeComponent)\n readonly child?: TuiTreeComponent<T>;\n\n constructor(\n @Optional()\n @Inject(TuiTreeChildrenDirective)\n readonly directive: TuiTreeChildrenDirective<T> | null,\n ) {}\n\n @Input()\n content: PolymorpheusContent<TuiTreeContext<T>> = ({$implicit}) => String($implicit);\n\n get children(): readonly T[] {\n return (\n this.directive?.childrenHandler(this.value) ??\n TuiTreeChildrenDirective.defaultHandler(this.value)\n );\n }\n\n ngDoCheck() {\n this.item?.ngDoCheck();\n this.child?.ngDoCheck();\n }\n}\n","import {Directive, EventEmitter, Input, Output} from '@angular/core';\nimport {isPresent, tuiDefaultProp} from '@taiga-ui/cdk';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeAccessor, TuiTreeController} from '../misc/tree.interfaces';\nimport {TUI_TREE_ACCESSOR, TUI_TREE_CONTROLLER} from '../misc/tree.tokens';\n\n@Directive({\n selector: '[tuiTreeController][map]',\n exportAs: 'tuiTreeController',\n providers: [\n {\n provide: TUI_TREE_ACCESSOR,\n useExisting: TuiTreeControllerDirective,\n },\n {\n provide: TUI_TREE_CONTROLLER,\n useExisting: TuiTreeControllerDirective,\n },\n ],\n})\nexport class TuiTreeControllerDirective<T>\n implements TuiTreeController, TuiTreeAccessor<T>\n{\n @Input('tuiTreeController')\n @tuiDefaultProp()\n fallback = true;\n\n @Input()\n @tuiDefaultProp()\n map: Map<T, boolean> = new Map();\n\n @Output()\n readonly toggled = new EventEmitter<T>();\n\n readonly items = new Map<TuiTreeItemComponent, T>();\n\n register(item: TuiTreeItemComponent, value: T) {\n this.items.set(item, value);\n }\n\n unregister(item: TuiTreeItemComponent) {\n this.items.delete(item);\n }\n\n isExpanded(item: TuiTreeItemComponent): boolean {\n const value = this.items.get(item);\n\n return (value && this.map.get(value)) ?? this.fallback;\n }\n\n toggle(item: TuiTreeItemComponent) {\n const value = this.items.get(item);\n const expanded = this.isExpanded(item);\n\n if (!isPresent(value)) {\n return;\n }\n\n this.toggled.emit(value);\n this.map.set(value, !expanded);\n }\n}\n","import {Directive, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeController} from '../misc/tree.interfaces';\nimport {TUI_TREE_CONTROLLER} from '../misc/tree.tokens';\n\n@Directive({\n selector: '[tuiTreeController]:not([map])',\n exportAs: 'tuiTreeController',\n providers: [\n {\n provide: TUI_TREE_CONTROLLER,\n useExisting: TuiTreeItemControllerDirective,\n },\n ],\n})\nexport class TuiTreeItemControllerDirective implements TuiTreeController {\n private readonly map = new WeakMap<TuiTreeItemComponent, boolean>();\n\n @Input('tuiTreeController')\n @tuiDefaultProp()\n fallback = true;\n\n isExpanded(item: TuiTreeItemComponent): boolean {\n return this.map.get(item) ?? this.fallback;\n }\n\n toggle(item: TuiTreeItemComponent) {\n this.map.set(item, !this.isExpanded(item));\n }\n}\n","import {Directive, Inject, Input, OnDestroy, Optional} from '@angular/core';\n\nimport {TuiTreeItemComponent} from '../components/tree-item/tree-item.component';\nimport {TuiTreeAccessor} from '../misc/tree.interfaces';\nimport {TUI_TREE_ACCESSOR} from '../misc/tree.tokens';\n\n@Directive({\n selector: 'tui-tree-item[tuiTreeNode]',\n})\nexport class TuiTreeNodeDirective<T> implements OnDestroy {\n @Input('tuiTreeNode')\n set value(value: T) {\n this.directive?.register(this.component, value);\n }\n\n constructor(\n @Optional()\n @Inject(TUI_TREE_ACCESSOR)\n private readonly directive: TuiTreeAccessor<T>,\n @Inject(TuiTreeItemComponent)\n private readonly component: TuiTreeItemComponent,\n ) {}\n\n ngOnDestroy() {\n this.directive?.unregister(this.component);\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {map, mapTo, startWith, switchMap, tap} from 'rxjs/operators';\n\nimport {TuiTreeLoader} from './tree.interfaces';\nimport {TUI_TREE_LOADER, TUI_TREE_LOADING, TUI_TREE_START} from './tree.tokens';\n\n// @dynamic\n@Injectable()\nexport class TuiTreeService<T> {\n private readonly map = new Map<T, readonly T[]>([[this.loading, []]]);\n\n private readonly load$ = new Subject<T>();\n\n readonly data$ = this.load$.pipe(\n switchMap(item =>\n this.loader.loadChildren(item).pipe(\n tap(children => this.map.set(item, children)),\n map(children => children.filter(item => !this.loader.hasChildren(item))),\n tap(children => children.forEach(child => this.map.set(child, []))),\n ),\n ),\n startWith(null),\n mapTo(this.start),\n );\n\n constructor(\n @Inject(TUI_TREE_LOADING) private readonly loading: T,\n @Inject(TUI_TREE_START) private readonly start: T,\n @Inject(TUI_TREE_LOADER) private readonly loader: TuiTreeLoader<T>,\n ) {}\n\n getChildren(item: T): readonly T[] {\n return this.map.get(item) ?? [this.loading];\n }\n\n loadChildren(item: T) {\n if (this.map.get(item)) {\n return;\n }\n\n this.map.set(item, [this.loading]);\n this.load$.next(item);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiButtonModule, TuiExpandModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTreeComponent} from './components/tree/tree.component';\nimport {TuiTreeItemComponent} from './components/tree-item/tree-item.component';\nimport {TuiTreeItemContentComponent} from './components/tree-item-content/tree-item-content.component';\nimport {TuiTreeChildrenDirective} from './directives/tree-children.directive';\nimport {TuiTreeControllerDirective} from './directives/tree-controller.directive';\nimport {TuiTreeItemControllerDirective} from './directives/tree-item-controller.directive';\nimport {TuiTreeNodeDirective} from './directives/tree-node.directive';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiExpandModule, TuiButtonModule],\n entryComponents: [TuiTreeItemContentComponent],\n declarations: [\n TuiTreeComponent,\n TuiTreeItemComponent,\n TuiTreeItemContentComponent,\n TuiTreeChildrenDirective,\n TuiTreeItemControllerDirective,\n TuiTreeControllerDirective,\n TuiTreeNodeDirective,\n ],\n exports: [\n TuiTreeComponent,\n TuiTreeItemComponent,\n TuiTreeChildrenDirective,\n TuiTreeItemControllerDirective,\n TuiTreeControllerDirective,\n ],\n})\nexport class TuiTreeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAMa,wBAAwB,gCAArC,MAAa,wBAAwB;IAArC;QAGI,oBAAe,GACX,0BAAwB,CAAC,cAAc,CAAC;KAK/C;IAHG,OAAO,cAAc,CAAI,IAAO;QAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC;KACnD;EACJ;AANG;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;iEAE2B;AAJnC,wBAAwB;IAHpC,SAAS,CAAC;QACP,QAAQ,EAAE,2BAA2B;KACxC,CAAC;GACW,wBAAwB,CASpC;;ICIY,2BAA2B,GAAxC,MAAa,2BAA2B;IACpC,YAC2C,OAA2B,EAEjD,UAA6B;QAFP,YAAO,GAAP,OAAO,CAAoB;QAEjD,eAAU,GAAV,UAAU,CAAmB;KAC9C;IAEJ,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;KAC5C;IAGD,IAAI,YAAY;QACZ,QACI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY;YACnC,IAAI,CAAC,UAAU,KAAK,2BAA2B,EACjD;KACL;IAED,OAAO;QACH,IAAI,CAAC,UAAU,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MAAM,CAAC,eAAe,CAAC,CAAA;GApBnB,cAAc,CAmC1B;;ICXY,aAAa,GAA1B,MAAa,aAAa;EAAG;AAAhB,aAAa;IApBzB,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,CAAC;QAC7E,eAAe,EAAE,CAAC,2BAA2B,CAAC;QAC9C,YAAY,EAAE;YACV,gBAAgB;YAChB,oBAAoB;YACpB,2BAA2B;YAC3B,wBAAwB;YACxB,8BAA8B;YAC9B,0BAA0B;YAC1B,oBAAoB;SACvB;QACD,OAAO,EAAE;YACL,gBAAgB;YAChB,oBAAoB;YACpB,wBAAwB;YACxB,8BAA8B;YAC9B,0BAA0B;SAC7B;KACJ,CAAC;GACW,aAAa,CAAG;;ACjC7B;;;;;;"}
|
|
@@ -7,6 +7,7 @@ export * from '@taiga-ui/kit/components/badged-content';
|
|
|
7
7
|
export * from '@taiga-ui/kit/components/breadcrumbs';
|
|
8
8
|
export * from '@taiga-ui/kit/components/calendar-month';
|
|
9
9
|
export * from '@taiga-ui/kit/components/calendar-range';
|
|
10
|
+
export * from '@taiga-ui/kit/components/carousel';
|
|
10
11
|
export * from '@taiga-ui/kit/components/checkbox';
|
|
11
12
|
export * from '@taiga-ui/kit/components/checkbox-block';
|
|
12
13
|
export * from '@taiga-ui/kit/components/checkbox-labeled';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
|
|
@@ -14,12 +14,10 @@ let TuiDropdownContextDirective = TuiDropdownContextDirective_1 = class TuiDropd
|
|
|
14
14
|
this.elementRef = elementRef;
|
|
15
15
|
this.documentRef = documentRef;
|
|
16
16
|
this.activeZone = activeZone;
|
|
17
|
+
this.lastClickedClientRect = this.getClientRectFromDot(0, 0);
|
|
17
18
|
this.content = '';
|
|
18
19
|
this.refresh$ = EMPTY;
|
|
19
|
-
this.context = {
|
|
20
|
-
close: () => this.closeDropdownBox(),
|
|
21
|
-
};
|
|
22
|
-
this.lastClickedClientRect = this.getClientRectFromDot(0, 0);
|
|
20
|
+
this.context = { close: () => this.closeDropdownBox() };
|
|
23
21
|
activeZone.tuiActiveZoneChange
|
|
24
22
|
.pipe(filter(isActive => !isActive), takeUntil(destroy$))
|
|
25
23
|
.subscribe(() => this.closeDropdownBox());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-dropdown-context.js","sources":["ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.directive.ts","ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.module.ts","ng://@taiga-ui/kit/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n HostListener,\n Inject,\n Injector,\n Input,\n} from '@angular/core';\nimport {\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiPortalService,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiDropdown, TUI_DROPDOWN_DIRECTIVE, TuiDropdown} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownContext]',\n providers: [\n TuiDestroyService,\n TuiActiveZoneDirective,\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownContextDirective),\n },\n ],\n})\nexport class TuiDropdownContextDirective\n extends AbstractTuiDropdown\n implements TuiDropdown\n{\n @Input('tuiDropdownContext')\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n readonly refresh$ = EMPTY;\n readonly context = {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-dropdown-context.js","sources":["ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.directive.ts","ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.module.ts","ng://@taiga-ui/kit/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n HostListener,\n Inject,\n Injector,\n Input,\n} from '@angular/core';\nimport {\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiPortalService,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiDropdown, TUI_DROPDOWN_DIRECTIVE, TuiDropdown} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownContext]',\n providers: [\n TuiDestroyService,\n TuiActiveZoneDirective,\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownContextDirective),\n },\n ],\n})\nexport class TuiDropdownContextDirective\n extends AbstractTuiDropdown\n implements TuiDropdown\n{\n private lastClickedClientRect: ClientRect = this.getClientRectFromDot(0, 0);\n\n @Input('tuiDropdownContext')\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n readonly refresh$ = EMPTY;\n\n readonly context = {close: () => this.closeDropdownBox()};\n\n constructor(\n protected readonly elementRef: ElementRef,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n readonly activeZone: TuiActiveZoneDirective,\n ) {\n super(componentFactoryResolver, injector, portalService, elementRef, activeZone);\n\n activeZone.tuiActiveZoneChange\n .pipe(\n filter(isActive => !isActive),\n takeUntil(destroy$),\n )\n .subscribe(() => this.closeDropdownBox());\n }\n\n get clientRect(): ClientRect {\n return this.lastClickedClientRect;\n }\n\n get fixed(): boolean {\n return true;\n }\n\n private get dropdownContent(): HTMLElement | null {\n return this.dropdownBoxRef?.instance.contentElementRef?.nativeElement || null;\n }\n\n @HostListener('click')\n onHostClick() {\n this.closeDropdownBox();\n }\n\n @HostListener('contextmenu.prevent', ['$event.clientX', '$event.clientY'])\n onContextMenu(x: number, y: number) {\n this.closeDropdownBox();\n this.openDropdown(x, y);\n }\n\n @HostListener('document:contextmenu', ['$event.target'])\n onAnotherContextOpen(target: HTMLElement) {\n const isAnotherContextOpened = !this.elementRef.nativeElement.contains(target);\n\n if (isAnotherContextOpened) {\n this.closeDropdownBox();\n }\n }\n\n @HostListener('document:keydown.arrowDown', ['$event', 'true'])\n @HostListener('document:keydown.arrowUp', ['$event', 'false'])\n onArrow(event: KeyboardEvent, down: boolean) {\n const activeElement = getNativeFocused(this.documentRef);\n const focusInside = activeElement && this.activeZone.contains(activeElement);\n\n if (!this.dropdownContent || focusInside) {\n return;\n }\n\n event.preventDefault();\n\n const nextEl = this.dropdownContent.nextElementSibling;\n const initial =\n down || !this.checkIsFocusableElement(nextEl) ? this.dropdownContent : nextEl;\n const focusable = getClosestFocusable(initial, !down, this.dropdownContent);\n\n if (focusable === null) {\n return;\n }\n\n setNativeFocused(focusable);\n }\n\n @HostListener('document:keydown.esc', ['$event'])\n onKeyDownEsc(event: KeyboardEvent) {\n if (!this.dropdownContent) {\n return;\n }\n\n event.stopPropagation();\n this.closeDropdownBox();\n }\n\n private openDropdown(x: number, y: number): void {\n this.lastClickedClientRect = this.getClientRectFromDot(x, y);\n this.openDropdownBox();\n }\n\n private getClientRectFromDot(x: number, y: number): ClientRect {\n return {\n top: y,\n bottom: y,\n left: x,\n right: x,\n height: 0,\n width: 0,\n };\n }\n\n private checkIsFocusableElement(element: Element | null): element is HTMLElement {\n return !!element && 'focus' in element && 'blur' in element;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\n\nimport {TuiDropdownContextDirective} from './dropdown-context.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownContextDirective],\n exports: [TuiDropdownContextDirective],\n})\nexport class TuiDropdownContextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyBA;IAYa,2BAA2B,mCAAxC,MAAa,2BACT,SAAQ,mBAAmB;IAa3B,YACuB,UAAsB,EACN,WAAqB,EAC7B,QAA6B,EAExD,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAChD,UAAkC;QAE3C,KAAK,CAAC,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAT9D,eAAU,GAAV,UAAU,CAAY;QACN,gBAAW,GAAX,WAAW,CAAU;QAM/C,eAAU,GAAV,UAAU,CAAwB;QAlBvC,0BAAqB,GAAe,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAI5E,YAAO,GAAwB,EAAE,CAAC;QAEzB,aAAQ,GAAG,KAAK,CAAC;QAEjB,YAAO,GAAG,EAAC,KAAK,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAC,CAAC;QActD,UAAU,CAAC,mBAAmB;aACzB,IAAI,CACD,MAA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
|
|
19
19
|
this.viewContainerRef = viewContainerRef;
|
|
20
|
-
this.position = 'selection';
|
|
21
20
|
this.visibilityHandler = ALWAYS_TRUE_HANDLER;
|
|
21
|
+
this.position = 'selection';
|
|
22
22
|
this.documentRef = shadowRootRef || documentRef;
|
|
23
23
|
this.range = this.documentRef.createRange();
|
|
24
24
|
const { nativeElement } = this.elementRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy\n{\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n private range: Range;\n\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n\n private readonly documentRef: Document;\n\n private ghost?: HTMLElement;\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n // TODO: iframe warning\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained = nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler || this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(valid || this.inDropdown(range));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n switch (this.position) {\n case 'tag': {\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n }\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at leaset partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\n\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyCA;IAYa,6BAA6B,qCAA1C,MAAa,6BACT,SAAQ,mBAAmB;IA4B3B,YACsB,WAAqB,EAEvC,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAC7B,UAAmC,EAG/D,UAAyC,EAGzC,aAA8B,EAG9B,gBAAgD,EAEhD,QAA2B,EACe,QAAiC,EAC/B,iBAAoC,EAC/C,MAAc,EACX,QAAmB,EACZ,gBAAkC;QAE7E,KAAK,CACD,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,gBAAgB,IAAI,UAAU,EAC9B,UAAU,CACb,CAAC;QAZwC,aAAQ,GAAR,QAAQ,CAAyB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAC/C,WAAM,GAAN,MAAM,CAAQ;QACX,aAAQ,GAAR,QAAQ,CAAW;QACZ,qBAAgB,GAAhB,gBAAgB,CAAkB;QAhCjF,aAAQ,GAAiC,WAAW,CAAC;QAI7C,sBAAiB,GAA6B,mBAAmB,CAAC;QAqCtE,IAAI,CAAC,WAAW,GAAG,aAAa,IAAI,WAAW,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAA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EV,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;IAC/B,YAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,YAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;GAnDpB,6BAA6B,CAuPzC;;IClSY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IALtC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;QAC/B,YAAY,EAAE,CAAC,6BAA6B,CAAC;QAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,0BAA0B,CAAG;;ACV1C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy\n{\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n private readonly documentRef: Document;\n private ghost?: HTMLElement;\n private range: Range;\n\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n // TODO: iframe warning\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained = nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler || this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(valid || this.inDropdown(range));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n switch (this.position) {\n case 'tag': {\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n }\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at leaset partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\n\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyCA;IAYa,6BAA6B,qCAA1C,MAAa,6BACT,SAAQ,mBAAmB;IAyB3B,YACsB,WAAqB,EAEvC,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAC7B,UAAmC,EAG/D,UAAyC,EAGzC,aAA8B,EAG9B,gBAAgD,EAEhD,QAA2B,EACe,QAAiC,EAC/B,iBAAoC,EAC/C,MAAc,EACX,QAAmB,EACZ,gBAAkC;QAE7E,KAAK,CACD,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,gBAAgB,IAAI,UAAU,EAC9B,UAAU,CACb,CAAC;QAZwC,aAAQ,GAAR,QAAQ,CAAyB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAC/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EAAE,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAC1B,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;IAC9B,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;IACnC,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;IACvB,WAAA,QAAQ,EAAE,CAAA;IAEV,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;IAC/B,YAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,YAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;GAhDpB,6BAA6B,CAoPzC;;IC/RY,0BAA0B,GAAvC,MAAa,0BAA0B;EAAG;AAA7B,0BAA0B;IALtC,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;QAC/B,YAAY,EAAE,CAAC,6BAA6B,CAAC;QAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,0BAA0B,CAAG;;ACV1C;;;;;;"}
|
|
@@ -10,9 +10,10 @@ let TuiHighlightDirective = class TuiHighlightDirective {
|
|
|
10
10
|
this.documentRef = documentRef;
|
|
11
11
|
this.elementRef = elementRef;
|
|
12
12
|
this.renderer = renderer;
|
|
13
|
-
this.tuiHighlight = '';
|
|
14
13
|
this.highlight = this.setUpHighlight();
|
|
15
14
|
this.treeWalker = this.documentRef.createTreeWalker(this.elementRef.nativeElement, NodeFilter.SHOW_TEXT, svgNodeFilter, false);
|
|
15
|
+
this.tuiHighlight = '';
|
|
16
|
+
this.tuiHighlightColor = 'var(--tui-selection)';
|
|
16
17
|
resize$.subscribe(() => {
|
|
17
18
|
this.updateStyles();
|
|
18
19
|
});
|
|
@@ -40,6 +41,7 @@ let TuiHighlightDirective = class TuiHighlightDirective {
|
|
|
40
41
|
const hostRect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
41
42
|
const { left, top, width, height } = range.getBoundingClientRect();
|
|
42
43
|
const { style } = this.highlight;
|
|
44
|
+
style.background = this.tuiHighlightColor;
|
|
43
45
|
style.left = px(left - hostRect.left);
|
|
44
46
|
style.top = px(top - hostRect.top);
|
|
45
47
|
style.width = px(width);
|
|
@@ -56,7 +58,7 @@ let TuiHighlightDirective = class TuiHighlightDirective {
|
|
|
56
58
|
setUpHighlight() {
|
|
57
59
|
const highlight = this.renderer.createElement('div');
|
|
58
60
|
const { style } = highlight;
|
|
59
|
-
style.background =
|
|
61
|
+
style.background = this.tuiHighlightColor;
|
|
60
62
|
style.zIndex = '-1';
|
|
61
63
|
style.position = 'absolute';
|
|
62
64
|
this.renderer.appendChild(this.elementRef.nativeElement, highlight);
|
|
@@ -73,6 +75,9 @@ __decorate([
|
|
|
73
75
|
Input(),
|
|
74
76
|
tuiDefaultProp()
|
|
75
77
|
], TuiHighlightDirective.prototype, "tuiHighlight", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
Input()
|
|
80
|
+
], TuiHighlightDirective.prototype, "tuiHighlightColor", void 0);
|
|
76
81
|
TuiHighlightDirective = __decorate([
|
|
77
82
|
Directive({
|
|
78
83
|
selector: '[tuiHighlight]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-highlight.js","sources":["ng://@taiga-ui/kit/directives/highlight/highlight.directive.ts","ng://@taiga-ui/kit/directives/highlight/highlight.module.ts","ng://@taiga-ui/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, Inject, Input, OnChanges, Renderer2} from '@angular/core';\nimport {\n px,\n svgNodeFilter,\n tuiDefaultProp,\n TuiDestroyService,\n TuiResizeService,\n} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector: '[tuiHighlight]',\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n providers: [TuiDestroyService, TuiResizeService],\n})\nexport class TuiHighlightDirective implements OnChanges {\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-highlight.js","sources":["ng://@taiga-ui/kit/directives/highlight/highlight.directive.ts","ng://@taiga-ui/kit/directives/highlight/highlight.module.ts","ng://@taiga-ui/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, Inject, Input, OnChanges, Renderer2} from '@angular/core';\nimport {\n px,\n svgNodeFilter,\n tuiDefaultProp,\n TuiDestroyService,\n TuiResizeService,\n} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector: '[tuiHighlight]',\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n providers: [TuiDestroyService, TuiResizeService],\n})\nexport class TuiHighlightDirective implements OnChanges {\n private readonly highlight: HTMLElement = this.setUpHighlight();\n\n private readonly treeWalker = this.documentRef.createTreeWalker(\n this.elementRef.nativeElement,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n false,\n );\n\n @Input()\n @tuiDefaultProp()\n tuiHighlight = '';\n\n @Input()\n tuiHighlightColor = 'var(--tui-selection)';\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(TuiResizeService) resize$: Observable<unknown>,\n ) {\n resize$.subscribe(() => {\n this.updateStyles();\n });\n }\n\n get match(): boolean {\n return this.indexOf(this.elementRef.nativeElement.textContent) !== -1;\n }\n\n ngOnChanges() {\n this.updateStyles();\n }\n\n private updateStyles() {\n this.highlight.style.display = 'none';\n\n if (!this.match) {\n return;\n }\n\n this.treeWalker.currentNode = this.elementRef.nativeElement;\n\n do {\n const index = this.indexOf(this.treeWalker.currentNode.nodeValue);\n\n if (index === -1) {\n continue;\n }\n\n const range = this.documentRef.createRange();\n\n range.setStart(this.treeWalker.currentNode, index);\n range.setEnd(this.treeWalker.currentNode, index + this.tuiHighlight.length);\n\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n const {left, top, width, height} = range.getBoundingClientRect();\n const {style} = this.highlight;\n\n style.background = this.tuiHighlightColor;\n style.left = px(left - hostRect.left);\n style.top = px(top - hostRect.top);\n style.width = px(width);\n style.height = px(height);\n style.display = 'block';\n\n return;\n } while (this.treeWalker.nextNode());\n }\n\n private indexOf(source: string | null): number {\n return !source || !this.tuiHighlight\n ? -1\n : source.toLowerCase().indexOf(this.tuiHighlight.toLowerCase());\n }\n\n private setUpHighlight(): HTMLElement {\n const highlight = this.renderer.createElement('div');\n const {style} = highlight;\n\n style.background = this.tuiHighlightColor;\n style.zIndex = '-1';\n style.position = 'absolute';\n this.renderer.appendChild(this.elementRef.nativeElement, highlight);\n\n return highlight;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHighlightDirective} from './highlight.directive';\n\n@NgModule({\n declarations: [TuiHighlightDirective],\n exports: [TuiHighlightDirective],\n})\nexport class TuiHighlightModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAWA;IASa,qBAAqB,GAAlC,MAAa,qBAAqB;IAiB9B,YACuC,WAAqB,EACnB,UAAmC,EACpC,QAAmB,EAC7B,OAA4B;QAHnB,gBAAW,GAAX,WAAW,CAAU;QACnB,eAAU,GAAV,UAAU,CAAyB;QACpC,aAAQ,GAAR,QAAQ,CAAW;QAnB1C,cAAS,GAAgB,IAAI,CAAC,cAAc,EAAE,CAAC;QAE/C,eAAU,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAC3D,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,UAAU,CAAC,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AAS,uBAAtD,MAAM,SAAC,SAAS;YACkB,UAAU,uBAA5C,MAAM,SAAC,gBAAgB;;AAT5B;IAFC,KAAK,EAAE;IACP,cAAc,EAAE;2DACC;AAGlB;IADC,KAAK,EAAE;gEACmC;AAflC,qBAAqB;IARjC,SAAS,CAAC;QACP,QAAQ,EAAE,gBAAgB;QAC1B,IAAI,EAAE;YACF,kBAAkB,EAAE,YAAY;YAChC,gBAAgB,EAAE,GAAG;SACxB;QACD,SAAS,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;KACnD,CAAC;IAmBO,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;GArBpB,qBAAqB,CAyFjC;;ICrGY,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAJ9B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACRlC;;;;;;"}
|
|
@@ -35,7 +35,6 @@ let TuiLazyLoadingDirective = class TuiLazyLoadingDirective {
|
|
|
35
35
|
this.animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';
|
|
36
36
|
this.background = 'rgba(0, 0, 0, .16)';
|
|
37
37
|
this.src = null;
|
|
38
|
-
this.supported = 'loading' in this.elementRef.nativeElement;
|
|
39
38
|
if (!this.supported) {
|
|
40
39
|
this.src$.subscribe(src => {
|
|
41
40
|
this.src = src;
|
|
@@ -46,6 +45,9 @@ let TuiLazyLoadingDirective = class TuiLazyLoadingDirective {
|
|
|
46
45
|
this.src = this.supported ? src : null;
|
|
47
46
|
this.src$.next(src);
|
|
48
47
|
}
|
|
48
|
+
get supported() {
|
|
49
|
+
return 'loading' in this.elementRef.nativeElement;
|
|
50
|
+
}
|
|
49
51
|
onLoad() {
|
|
50
52
|
this.background = '';
|
|
51
53
|
this.animation = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.js","sources":["ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.service.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.directive.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.module.ts","ng://@taiga-ui/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, Inject, Injectable} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {Observable, of, Subject} from 'rxjs';\nimport {catchError, filter, mapTo, switchMap, take, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<string> {\n private src$ = new Subject<string>();\n\n constructor(\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(IntersectionObserverService)\n intersections$: Observable<IntersectionObserverEntry[]>,\n ) {\n super(subscriber =>\n this.src$\n .pipe(\n switchMap(src =>\n intersections$.pipe(\n filter(([{isIntersecting}]) => isIntersecting),\n mapTo(src),\n catchError(() => of(src)),\n watch(changeDetectorRef),\n take(1),\n ),\n ),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n next(src: string) {\n this.src$.next(src);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n@Directive({\n selector: 'img[loading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService, TuiDestroyService],\n})\nexport class TuiLazyLoadingDirective {\n @Input('src')\n set srcSetter(src: string) {\n this.src = this.supported ? src : null;\n this.src$.next(src);\n }\n\n @HostBinding('style.animation')\n animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';\n\n @HostBinding('style.background')\n background = 'rgba(0, 0, 0, .16)';\n\n @HostBinding('attr.src')\n src: string | null = null;\n\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.js","sources":["ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.service.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.directive.ts","ng://@taiga-ui/kit/directives/lazy-loading/lazy-loading.module.ts","ng://@taiga-ui/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, Inject, Injectable} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {Observable, of, Subject} from 'rxjs';\nimport {catchError, filter, mapTo, switchMap, take, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<string> {\n private src$ = new Subject<string>();\n\n constructor(\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(IntersectionObserverService)\n intersections$: Observable<IntersectionObserverEntry[]>,\n ) {\n super(subscriber =>\n this.src$\n .pipe(\n switchMap(src =>\n intersections$.pipe(\n filter(([{isIntersecting}]) => isIntersecting),\n mapTo(src),\n catchError(() => of(src)),\n watch(changeDetectorRef),\n take(1),\n ),\n ),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n next(src: string) {\n this.src$.next(src);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n@Directive({\n selector: 'img[loading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService, TuiDestroyService],\n})\nexport class TuiLazyLoadingDirective {\n @Input('src')\n set srcSetter(src: string) {\n this.src = this.supported ? src : null;\n this.src$.next(src);\n }\n\n @HostBinding('style.animation')\n animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';\n\n @HostBinding('style.background')\n background = 'rgba(0, 0, 0, .16)';\n\n @HostBinding('attr.src')\n src: string | null = null;\n\n constructor(\n @Inject(TuiLazyLoadingService)\n private readonly src$: TuiLazyLoadingService,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLImageElement>,\n ) {\n if (!this.supported) {\n this.src$.subscribe(src => {\n this.src = src;\n });\n }\n }\n\n private get supported() {\n return 'loading' in this.elementRef.nativeElement;\n }\n\n @HostListener('load')\n onLoad() {\n this.background = '';\n this.animation = '';\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiLazyLoadingDirective} from './lazy-loading.directive';\n\n@NgModule({\n declarations: [TuiLazyLoadingDirective],\n exports: [TuiLazyLoadingDirective],\n})\nexport class TuiLazyLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiLazyLoadingService as ɵa} from './lazy-loading.service';"],"names":[],"mappings":";;;;;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,UAAkB;IAGzD,YAC+B,iBAAoC,EACpC,QAA0B,EAErD,cAAuD;QAEvD,KAAK,CAAC,UAAU,IACZ,IAAI,CAAC,IAAI;aACJ,IAAI,CACD,SAAS,CAAC,GAAG,IACT,cAAc,CAAC,IAAI,CACf,MAAM,CAAC,CAAC,CAAC,EAAC,cAAc,EAAC,CAAC,KAAK,cAAc,CAAC,EAC9C,KAAK,CAAC,GAAG,CAAC,EACV,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EACz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IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;KACrD;IAGD,MAAM;QACF,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;KACvB;EACJ;;YApB8B,qBAAqB,uBAD3C,MAAM,SAAC,qBAAqB;YAGA,UAAU,uBADtC,MAAM,SAAC,UAAU;;AAjBtB;IADC,KAAK,CAAC,KAAK,CAAC;wDAIZ;AAGD;IADC,WAAW,CAAC,iBAAiB,CAAC;0DACiC;AAGhE;IADC,WAAW,CAAC,kBAAkB,CAAC;2DACE;AAGlC;IADC,WAAW,CAAC,UAAU,CAAC;oDACE;AAoB1B;IADC,YAAY,CAAC,MAAM,CAAC;qDAIpB;AArCQ,uBAAuB;IAJnC,SAAS,CAAC;QACP,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,EAAE,iBAAiB,CAAC;KACrF,CAAC;IAkBO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAE7B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GAnBd,uBAAuB,CAsCnC;;IC/CY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAJhC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACRpC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-present.js","sources":["ng://@taiga-ui/kit/directives/present/present.directive.ts","ng://@taiga-ui/kit/directives/present/present.module.ts","ng://@taiga-ui/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {isCurrentTarget, isFirefox, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged, skip, startWith} from 'rxjs/operators';\n\nconst STYLE = `\n@keyframes tuiPresent {\n from {\n content: '1';\n }\n\n to {\n content: '2';\n }\n}\n\n.tui-present {\n animation: tuiPresent 1000s infinite;\n}`;\n\n@Directive({\n selector: '[tuiPresentChange]',\n host: {\n class: 'tui-present',\n },\n})\nexport class TuiPresentDirective implements OnDestroy {\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-present.js","sources":["ng://@taiga-ui/kit/directives/present/present.directive.ts","ng://@taiga-ui/kit/directives/present/present.module.ts","ng://@taiga-ui/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {isCurrentTarget, isFirefox, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged, skip, startWith} from 'rxjs/operators';\n\nconst STYLE = `\n@keyframes tuiPresent {\n from {\n content: '1';\n }\n\n to {\n content: '2';\n }\n}\n\n.tui-present {\n animation: tuiPresent 1000s infinite;\n}`;\n\n@Directive({\n selector: '[tuiPresentChange]',\n host: {\n class: 'tui-present',\n },\n})\nexport class TuiPresentDirective implements OnDestroy {\n private readonly visibility$ = new Subject<boolean>();\n private readonly observer?: MutationObserver;\n\n @Output()\n readonly tuiPresentChange: Observable<boolean>;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(USER_AGENT) userAgent: string,\n ) {\n directiveStyles.addStyle(STYLE, 'TuiPresentDirective');\n\n this.tuiPresentChange = this.visibility$.pipe(\n startWith(false),\n distinctUntilChanged(),\n skip(1),\n );\n\n if (isFirefox(userAgent)) {\n return;\n }\n\n this.observer = new MutationObserver(() => {\n if (\n !nativeElement.offsetParent &&\n nativeElement.offsetWidth === 0 &&\n nativeElement.offsetHeight === 0\n ) {\n this.visibility$.next(false);\n }\n });\n\n this.observer.observe(nativeElement, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n\n /**\n * Someday animationcancel would work and mutation observer would not be needed:\n * https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel\n * It would also trigger on CSS like display: none on parent nodes which is awesome\n * but currently only works in Firefox\n */\n @HostListener('animationcancel', ['$event', 'false'])\n @HostListener('animationstart', ['$event', 'true'])\n onAnimation(event: Event, visibility: boolean) {\n if (isCurrentTarget(event)) {\n this.visibility$.next(visibility);\n }\n }\n\n ngOnDestroy() {\n this.visibility$.next(false);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiPresentDirective} from './present.directive';\n\n@NgModule({\n declarations: [TuiPresentDirective],\n exports: [TuiPresentDirective],\n})\nexport class TuiPresentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA,MAAM,KAAK,GAAG;;;;;;;;;;;;;EAaZ,CAAC;IAQU,mBAAmB,GAAhC,MAAa,mBAAmB;IAO5B,YACwB,EAAC,aAAa,EAA0B,EACzB,eAA0C,EACzD,SAAiB;QATxB,gBAAW,GAAG,IAAI,OAAO,EAAW,CAAC;QAWlD,eAAe,CAAC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;QAEvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACzC,SAAS,CAAC,KAAK,CAAC,EAChB,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,CACV,CAAC;QAEF,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE;YACtB,OAAO;SACV;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC;YACjC,IACI,CAAC,aAAa,CAAC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