@taiga-ui/kit 2.20.0 → 2.24.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/README.md +7 -3
- package/bundles/taiga-ui-kit-components-accordion.umd.js +5 -6
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-action.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +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 +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 +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +13 -4
- 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 +2 -2
- 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-filter.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +2 -2
- 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 +7 -2
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +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 +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 +8 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +3 -2
- 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 +1 -1
- 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 +2 -2
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +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 +2 -2
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +2 -2
- 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 +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 +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +16 -12
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +18 -45
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +54 -18
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +23 -14
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +9 -3
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +19 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +1 -1
- 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 +653 -0
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-components-tree.umd.min.js +16 -0
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -0
- 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-internal-primitive-calendar-range.umd.js +1 -1
- 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-utils-format.umd.js +0 -2
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.min.js.map +1 -1
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/action/taiga-ui-kit-components-action.metadata.json +1 -1
- package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
- package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
- package/components/badged-content/taiga-ui-kit-components-badged-content.metadata.json +1 -1
- package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/calendar-range/taiga-ui-kit-components-calendar-range.metadata.json +1 -1
- package/components/combo-box/combo-box.component.d.ts +3 -3
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/input-count.component.d.ts +1 -0
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-month/taiga-ui-kit-components-input-month.metadata.json +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 +1 -0
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/multi-select/index.d.ts +0 -1
- package/components/multi-select/multi-select.component.d.ts +6 -5
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/multi-select-option/multi-select-option.component.d.ts +1 -1
- package/components/multi-select-option/taiga-ui-kit-components-multi-select-option.metadata.json +1 -1
- package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
- package/components/progress/index.d.ts +2 -0
- package/components/progress/pipes/abstract-color-segments.d.ts +9 -0
- package/components/progress/pipes/progress-color-segments-async.pipe.d.ts +5 -0
- package/components/progress/pipes/progress-color-segments.pipe.d.ts +7 -6
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
- package/components/radio-labeled/taiga-ui-kit-components-radio-labeled.metadata.json +1 -1
- package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
- package/components/select/select.component.d.ts +1 -1
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/select-option/select-option.component.d.ts +4 -2
- package/components/select-option/taiga-ui-kit-components-select-option.metadata.json +1 -1
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
- package/components/taiga-ui-kit-components.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/text-area/text-area.component.d.ts +2 -0
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/tree/components/tree/tree.component.d.ts +10 -0
- package/components/tree/components/tree-item/tree-item.component.d.ts +17 -0
- package/components/tree/components/tree-item/tree-item.providers.d.ts +3 -0
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +9 -0
- package/components/tree/directives/tree-children.directive.d.ts +5 -0
- package/components/tree/directives/tree-controller.directive.d.ts +13 -0
- package/components/tree/directives/tree-item-controller.directive.d.ts +8 -0
- package/components/tree/directives/tree-node.directive.d.ts +10 -0
- package/components/tree/index.d.ts +13 -0
- package/components/tree/misc/tree.constants.d.ts +5 -0
- package/components/tree/misc/tree.interfaces.d.ts +22 -0
- package/components/tree/misc/tree.service.d.ts +12 -0
- package/components/tree/misc/tree.tokens.d.ts +11 -0
- package/components/tree/package.json +13 -0
- package/components/tree/taiga-ui-kit-components-tree.d.ts +4 -0
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -0
- package/components/tree/tree.module.d.ts +2 -0
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -6
- package/esm2015/components/accordion/accordion.component.js +1 -1
- package/esm2015/components/action/action.component.js +2 -2
- package/esm2015/components/avatar/avatar.component.js +2 -2
- package/esm2015/components/badge/badge.component.js +3 -3
- package/esm2015/components/badged-content/badged-content.component.js +1 -1
- package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm2015/components/calendar-month/calendar-month.component.js +2 -2
- package/esm2015/components/calendar-range/calendar-range.component.js +2 -2
- package/esm2015/components/combo-box/combo-box.component.js +10 -5
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
- package/esm2015/components/filter/filter.component.js +1 -1
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/input/input.component.js +1 -1
- package/esm2015/components/input-copy/input-copy.component.js +2 -2
- package/esm2015/components/input-count/input-count.component.js +8 -3
- package/esm2015/components/input-date/input-date.component.js +3 -3
- package/esm2015/components/input-date-range/input-date-range.component.js +2 -2
- package/esm2015/components/input-date-time/input-date-time.component.js +2 -2
- package/esm2015/components/input-file/file/file.component.js +3 -3
- package/esm2015/components/input-file/input-file.component.js +3 -3
- package/esm2015/components/input-inline/input-inline.component.js +1 -1
- package/esm2015/components/input-month/input-month.component.js +1 -1
- package/esm2015/components/input-month-range/input-month-range.component.js +1 -1
- package/esm2015/components/input-number/input-number.component.js +9 -3
- package/esm2015/components/input-password/input-password.component.js +3 -3
- package/esm2015/components/input-password/input-password.module.js +3 -1
- package/esm2015/components/input-phone/input-phone.component.js +2 -2
- package/esm2015/components/input-phone-international/input-phone-international.component.js +2 -2
- package/esm2015/components/input-range/input-range.component.js +3 -3
- package/esm2015/components/input-slider/input-slider.component.js +3 -3
- package/esm2015/components/input-tag/input-tag.component.js +3 -3
- package/esm2015/components/input-time/input-time.component.js +3 -3
- package/esm2015/components/line-clamp/line-clamp.component.js +1 -1
- package/esm2015/components/multi-select/index.js +1 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +10 -4
- package/esm2015/components/multi-select/multi-select.component.js +12 -20
- package/esm2015/components/multi-select/multi-select.module.js +1 -3
- package/esm2015/components/multi-select-option/multi-select-option.component.js +8 -10
- package/esm2015/components/pagination/pagination.component.js +1 -1
- package/esm2015/components/progress/index.js +3 -1
- package/esm2015/components/progress/pipes/abstract-color-segments.js +32 -0
- package/esm2015/components/progress/pipes/progress-color-segments-async.pipe.js +15 -0
- package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +12 -28
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
- package/esm2015/components/progress/progress-label/progress-label.component.js +1 -1
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +2 -2
- package/esm2015/components/progress/progress.module.js +4 -1
- package/esm2015/components/radio-labeled/radio-labeled.component.js +1 -1
- package/esm2015/components/range/range.component.js +3 -3
- package/esm2015/components/select/select.component.js +6 -4
- package/esm2015/components/select-option/select-option.component.js +20 -12
- package/esm2015/components/slider/slider.component.js +3 -3
- package/esm2015/components/stepper/step/step.component.js +1 -1
- package/esm2015/components/tabs/tabs/tabs.component.js +1 -1
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +3 -3
- package/esm2015/components/tag/tag.component.js +3 -3
- package/esm2015/components/text-area/text-area.component.js +10 -4
- package/esm2015/components/text-area/text-area.module.js +5 -2
- package/esm2015/components/toggle/toggle.component.js +2 -2
- package/esm2015/components/tree/components/tree/tree.component.js +44 -0
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +58 -0
- package/esm2015/components/tree/components/tree-item/tree-item.providers.js +18 -0
- package/esm2015/components/tree/components/tree-item-content/tree-item-content.component.js +41 -0
- package/esm2015/components/tree/directives/tree-children.directive.js +23 -0
- package/esm2015/components/tree/directives/tree-controller.directive.js +62 -0
- package/esm2015/components/tree/directives/tree-item-controller.directive.js +36 -0
- package/esm2015/components/tree/directives/tree-node.directive.js +35 -0
- package/esm2015/components/tree/index.js +13 -0
- package/esm2015/components/tree/misc/tree.constants.js +9 -0
- package/esm2015/components/tree/misc/tree.interfaces.js +1 -0
- package/esm2015/components/tree/misc/tree.service.js +40 -0
- package/esm2015/components/tree/misc/tree.tokens.js +17 -0
- package/esm2015/components/tree/taiga-ui-kit-components-tree.js +5 -0
- package/esm2015/components/tree/tree.module.js +38 -0
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/types/status.js +1 -1
- package/esm2015/utils/format/string-hash-to-hsl.js +1 -3
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +5 -6
- package/esm5/components/accordion/accordion.component.js +1 -1
- package/esm5/components/action/action.component.js +2 -2
- package/esm5/components/avatar/avatar.component.js +2 -2
- package/esm5/components/badge/badge.component.js +3 -3
- package/esm5/components/badged-content/badged-content.component.js +1 -1
- package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm5/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm5/components/calendar-month/calendar-month.component.js +2 -2
- package/esm5/components/calendar-range/calendar-range.component.js +2 -2
- package/esm5/components/combo-box/combo-box.component.js +14 -5
- package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
- package/esm5/components/filter/filter.component.js +1 -1
- package/esm5/components/index.js +2 -1
- package/esm5/components/input/input.component.js +1 -1
- package/esm5/components/input-copy/input-copy.component.js +2 -2
- package/esm5/components/input-count/input-count.component.js +8 -3
- package/esm5/components/input-date/input-date.component.js +3 -3
- package/esm5/components/input-date-range/input-date-range.component.js +2 -2
- package/esm5/components/input-date-time/input-date-time.component.js +2 -2
- package/esm5/components/input-file/file/file.component.js +3 -3
- package/esm5/components/input-file/input-file.component.js +3 -3
- package/esm5/components/input-inline/input-inline.component.js +1 -1
- package/esm5/components/input-month/input-month.component.js +1 -1
- package/esm5/components/input-month-range/input-month-range.component.js +1 -1
- package/esm5/components/input-number/input-number.component.js +9 -3
- package/esm5/components/input-password/input-password.component.js +3 -3
- package/esm5/components/input-password/input-password.module.js +3 -1
- package/esm5/components/input-phone/input-phone.component.js +2 -2
- package/esm5/components/input-phone-international/input-phone-international.component.js +2 -2
- package/esm5/components/input-range/input-range.component.js +3 -3
- package/esm5/components/input-slider/input-slider.component.js +3 -3
- package/esm5/components/input-tag/input-tag.component.js +3 -3
- package/esm5/components/input-time/input-time.component.js +3 -3
- package/esm5/components/line-clamp/line-clamp.component.js +1 -1
- package/esm5/components/multi-select/index.js +1 -2
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +10 -4
- package/esm5/components/multi-select/multi-select.component.js +12 -24
- package/esm5/components/multi-select/multi-select.module.js +1 -3
- package/esm5/components/multi-select-option/multi-select-option.component.js +14 -11
- package/esm5/components/pagination/pagination.component.js +1 -1
- package/esm5/components/progress/index.js +3 -1
- package/esm5/components/progress/pipes/abstract-color-segments.js +35 -0
- package/esm5/components/progress/pipes/progress-color-segments-async.pipe.js +21 -0
- package/esm5/components/progress/pipes/progress-color-segments.pipe.js +16 -30
- package/esm5/components/progress/progress-circle/progress-circle.component.js +2 -2
- package/esm5/components/progress/progress-label/progress-label.component.js +1 -1
- package/esm5/components/progress/progress-segmented/progress-segmented.component.js +2 -2
- package/esm5/components/progress/progress.module.js +4 -1
- package/esm5/components/radio-labeled/radio-labeled.component.js +1 -1
- package/esm5/components/range/range.component.js +3 -3
- package/esm5/components/select/select.component.js +10 -4
- package/esm5/components/select-option/select-option.component.js +24 -14
- package/esm5/components/slider/slider.component.js +3 -3
- package/esm5/components/stepper/step/step.component.js +1 -1
- package/esm5/components/tabs/tabs/tabs.component.js +1 -1
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +3 -3
- package/esm5/components/tag/tag.component.js +3 -3
- package/esm5/components/text-area/text-area.component.js +18 -4
- package/esm5/components/text-area/text-area.module.js +5 -2
- package/esm5/components/toggle/toggle.component.js +2 -2
- package/esm5/components/tree/components/tree/tree.component.js +53 -0
- package/esm5/components/tree/components/tree-item/tree-item.component.js +68 -0
- package/esm5/components/tree/components/tree-item/tree-item.providers.js +18 -0
- package/esm5/components/tree/components/tree-item-content/tree-item-content.component.js +50 -0
- package/esm5/components/tree/directives/tree-children.directive.js +25 -0
- package/esm5/components/tree/directives/tree-controller.directive.js +64 -0
- package/esm5/components/tree/directives/tree-item-controller.directive.js +38 -0
- package/esm5/components/tree/directives/tree-node.directive.js +40 -0
- package/esm5/components/tree/index.js +13 -0
- package/esm5/components/tree/misc/tree.constants.js +9 -0
- package/esm5/components/tree/misc/tree.interfaces.js +1 -0
- package/esm5/components/tree/misc/tree.service.js +44 -0
- package/esm5/components/tree/misc/tree.tokens.js +17 -0
- package/esm5/components/tree/taiga-ui-kit-components-tree.js +5 -0
- package/esm5/components/tree/tree.module.js +41 -0
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm5/types/status.js +1 -1
- package/esm5/utils/format/string-hash-to-hsl.js +1 -3
- package/fesm2015/taiga-ui-kit-components-accordion.js +5 -6
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +2 -2
- package/fesm2015/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +2 -2
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +9 -4
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +2 -2
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-count.js +7 -2
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-date.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +8 -2
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +4 -3
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +7 -9
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +21 -40
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +39 -14
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +2 -2
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +19 -11
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +5 -3
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +2 -2
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +3 -3
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +2 -2
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +12 -3
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +371 -0
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -0
- package/fesm2015/taiga-ui-kit-components.js +1 -0
- package/fesm2015/taiga-ui-kit-components.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-utils-format.js +0 -2
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +5 -6
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-action.js +2 -2
- package/fesm5/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badge.js +2 -2
- package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badged-content.js +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +13 -4
- package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +2 -2
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-count.js +7 -2
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-date-time.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-date.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +8 -2
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +4 -3
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select-option.js +13 -10
- package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +21 -47
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +53 -17
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +2 -2
- package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select-option.js +23 -13
- package/fesm5/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +9 -3
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +2 -2
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +3 -3
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +2 -2
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +20 -3
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +417 -0
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -0
- package/fesm5/taiga-ui-kit-components.js +1 -0
- package/fesm5/taiga-ui-kit-components.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-format.js +0 -2
- package/fesm5/taiga-ui-kit-utils-format.js.map +1 -1
- package/internal/primitive-calendar-range/taiga-ui-kit-internal-primitive-calendar-range.metadata.json +1 -1
- package/package.json +5 -5
- package/types/status.d.ts +1 -1
- package/components/multi-select/multi-select-group/multi-select-group-reset.directive.d.ts +0 -3
- package/esm2015/components/multi-select/multi-select-group/multi-select-group-reset.directive.js +0 -20
- package/esm5/components/multi-select/multi-select-group/multi-select-group-reset.directive.js +0 -23
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/cdk'), require('@tinkoff/ng-polymorpheus'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@taiga-ui/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/tree', ['exports', '@taiga-ui/cdk', '@tinkoff/ng-polymorpheus', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/common', '@taiga-ui/core'], factory) :
|
|
4
|
+
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].kit = global['taiga-ui'].kit || {}, global['taiga-ui'].kit.components = global['taiga-ui'].kit.components || {}, global['taiga-ui'].kit.components.tree = {}), global.cdk, global.ngPolymorpheus, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common, global.core$1));
|
|
5
|
+
}(this, (function (exports, cdk, ngPolymorpheus, core, rxjs, operators, common, core$1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise */
|
|
22
|
+
|
|
23
|
+
var extendStatics = function(d, b) {
|
|
24
|
+
extendStatics = Object.setPrototypeOf ||
|
|
25
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
|
+
return extendStatics(d, b);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function __extends(d, b) {
|
|
31
|
+
extendStatics(d, b);
|
|
32
|
+
function __() { this.constructor = d; }
|
|
33
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var __assign = function() {
|
|
37
|
+
__assign = Object.assign || function __assign(t) {
|
|
38
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
+
s = arguments[i];
|
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
return __assign.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
function __rest(s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function __decorate(decorators, target, key, desc) {
|
|
60
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
62
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
63
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function __param(paramIndex, decorator) {
|
|
67
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function __metadata(metadataKey, metadataValue) {
|
|
71
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
76
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
77
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
78
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
79
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
80
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function __generator(thisArg, body) {
|
|
85
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
86
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
87
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
88
|
+
function step(op) {
|
|
89
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
90
|
+
while (_) try {
|
|
91
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
92
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
93
|
+
switch (op[0]) {
|
|
94
|
+
case 0: case 1: t = op; break;
|
|
95
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
96
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
97
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
98
|
+
default:
|
|
99
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
100
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
101
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
102
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
103
|
+
if (t[2]) _.ops.pop();
|
|
104
|
+
_.trys.pop(); continue;
|
|
105
|
+
}
|
|
106
|
+
op = body.call(thisArg, _);
|
|
107
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
108
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function __createBinding(o, m, k, k2) {
|
|
113
|
+
if (k2 === undefined) k2 = k;
|
|
114
|
+
o[k2] = m[k];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function __exportStar(m, exports) {
|
|
118
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function __values(o) {
|
|
122
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
123
|
+
if (m) return m.call(o);
|
|
124
|
+
if (o && typeof o.length === "number") return {
|
|
125
|
+
next: function () {
|
|
126
|
+
if (o && i >= o.length) o = void 0;
|
|
127
|
+
return { value: o && o[i++], done: !o };
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function __read(o, n) {
|
|
134
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
135
|
+
if (!m) return o;
|
|
136
|
+
var i = m.call(o), r, ar = [], e;
|
|
137
|
+
try {
|
|
138
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
139
|
+
}
|
|
140
|
+
catch (error) { e = { error: error }; }
|
|
141
|
+
finally {
|
|
142
|
+
try {
|
|
143
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
144
|
+
}
|
|
145
|
+
finally { if (e) throw e.error; }
|
|
146
|
+
}
|
|
147
|
+
return ar;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function __spread() {
|
|
151
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
152
|
+
ar = ar.concat(__read(arguments[i]));
|
|
153
|
+
return ar;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function __spreadArrays() {
|
|
157
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
158
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
159
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
160
|
+
r[k] = a[j];
|
|
161
|
+
return r;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
function __await(v) {
|
|
165
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
169
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
170
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
171
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
172
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
173
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
174
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
175
|
+
function fulfill(value) { resume("next", value); }
|
|
176
|
+
function reject(value) { resume("throw", value); }
|
|
177
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function __asyncDelegator(o) {
|
|
181
|
+
var i, p;
|
|
182
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
183
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function __asyncValues(o) {
|
|
187
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
188
|
+
var m = o[Symbol.asyncIterator], i;
|
|
189
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
190
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
191
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function __makeTemplateObject(cooked, raw) {
|
|
195
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
196
|
+
return cooked;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
function __importStar(mod) {
|
|
200
|
+
if (mod && mod.__esModule) return mod;
|
|
201
|
+
var result = {};
|
|
202
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
203
|
+
result.default = mod;
|
|
204
|
+
return result;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function __importDefault(mod) {
|
|
208
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
212
|
+
if (!privateMap.has(receiver)) {
|
|
213
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
214
|
+
}
|
|
215
|
+
return privateMap.get(receiver);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
219
|
+
if (!privateMap.has(receiver)) {
|
|
220
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
221
|
+
}
|
|
222
|
+
privateMap.set(receiver, value);
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var TUI_TREE_ACCESSOR = new core.InjectionToken('Controller for tracking value - TuiTreeItemComponent pairs');
|
|
227
|
+
var TUI_TREE_CONTROLLER = new core.InjectionToken('Controller for expanding the tree', {
|
|
228
|
+
factory: function () { return TUI_DEFAULT_TREE_CONTROLLER; },
|
|
229
|
+
});
|
|
230
|
+
var TUI_TREE_NODE = new core.InjectionToken('A node of a tree view');
|
|
231
|
+
var TUI_TREE_LOADING = new core.InjectionToken('A tree node placeholder for loading', { factory: function () { return ({}); } });
|
|
232
|
+
var TUI_TREE_START = new core.InjectionToken('A tree node starting point');
|
|
233
|
+
var TUI_TREE_LOADER = new core.InjectionToken('A service to load tree progressively');
|
|
234
|
+
var TUI_TREE_CONTENT = new core.InjectionToken('Content for a tree item', {
|
|
235
|
+
factory: function () { return TUI_TREE_ITEM_CONTENT; },
|
|
236
|
+
});
|
|
237
|
+
var TUI_TREE_LEVEL = new core.InjectionToken('Nesting level of current TreeView node', {
|
|
238
|
+
factory: function () { return -1; },
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
var TuiTreeItemContentComponent = /** @class */ (function () {
|
|
242
|
+
function TuiTreeItemContentComponent(context, controller) {
|
|
243
|
+
this.context = context;
|
|
244
|
+
this.controller = controller;
|
|
245
|
+
}
|
|
246
|
+
Object.defineProperty(TuiTreeItemContentComponent.prototype, "isExpanded", {
|
|
247
|
+
get: function () {
|
|
248
|
+
return this.context.$implicit.isExpanded;
|
|
249
|
+
},
|
|
250
|
+
enumerable: true,
|
|
251
|
+
configurable: true
|
|
252
|
+
});
|
|
253
|
+
Object.defineProperty(TuiTreeItemContentComponent.prototype, "isExpandable", {
|
|
254
|
+
get: function () {
|
|
255
|
+
return (this.context.$implicit.isExpandable &&
|
|
256
|
+
this.controller !== TUI_DEFAULT_TREE_CONTROLLER);
|
|
257
|
+
},
|
|
258
|
+
enumerable: true,
|
|
259
|
+
configurable: true
|
|
260
|
+
});
|
|
261
|
+
TuiTreeItemContentComponent.prototype.onClick = function () {
|
|
262
|
+
var _a;
|
|
263
|
+
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.toggle(this.context.$implicit);
|
|
264
|
+
};
|
|
265
|
+
TuiTreeItemContentComponent.ctorParameters = function () { return [
|
|
266
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ngPolymorpheus.POLYMORPHEUS_CONTEXT,] }] },
|
|
267
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_CONTROLLER,] }] }
|
|
268
|
+
]; };
|
|
269
|
+
__decorate([
|
|
270
|
+
core.HostBinding('class._expandable')
|
|
271
|
+
], TuiTreeItemContentComponent.prototype, "isExpandable", null);
|
|
272
|
+
TuiTreeItemContentComponent = __decorate([
|
|
273
|
+
core.Component({
|
|
274
|
+
selector: 'tui-tree-item-content',
|
|
275
|
+
template: "<button\n *ngIf=\"isExpandable\"\n tuiIconButton\n size=\"xs\"\n appearance=\"flat\"\n icon=\"tuiIconChevronRight\"\n shape=\"rounded\"\n class=\"t-button\"\n [class.t-button_expanded]=\"isExpanded\"\n (click)=\"onClick()\"\n></button>\n<ng-container *ngTemplateOutlet=\"context.template\"></ng-container>\n",
|
|
276
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
277
|
+
styles: [":host{display:flex;align-items:center}:host :host-context(tui-tree-item._expandable):not(._expandable){padding-left:2rem}.t-button{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;margin-right:.5rem}.t-button_expanded{transform:rotate(90deg)}"]
|
|
278
|
+
}),
|
|
279
|
+
__param(0, core.Inject(ngPolymorpheus.POLYMORPHEUS_CONTEXT)),
|
|
280
|
+
__param(1, core.Inject(TUI_TREE_CONTROLLER))
|
|
281
|
+
], TuiTreeItemContentComponent);
|
|
282
|
+
return TuiTreeItemContentComponent;
|
|
283
|
+
}());
|
|
284
|
+
|
|
285
|
+
var TUI_TREE_ITEM_CONTENT = new ngPolymorpheus.PolymorpheusComponent(TuiTreeItemContentComponent);
|
|
286
|
+
var TUI_DEFAULT_TREE_CONTROLLER = {
|
|
287
|
+
isExpanded: cdk.ALWAYS_TRUE_HANDLER,
|
|
288
|
+
toggle: cdk.EMPTY_FUNCTION,
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// @dynamic
|
|
292
|
+
var TuiTreeService = /** @class */ (function () {
|
|
293
|
+
function TuiTreeService(loading, start, loader) {
|
|
294
|
+
var _this = this;
|
|
295
|
+
this.loading = loading;
|
|
296
|
+
this.start = start;
|
|
297
|
+
this.loader = loader;
|
|
298
|
+
this.map = new Map([[this.loading, []]]);
|
|
299
|
+
this.load$ = new rxjs.Subject();
|
|
300
|
+
this.data$ = this.load$.pipe(operators.switchMap(function (item) {
|
|
301
|
+
return _this.loader.loadChildren(item).pipe(operators.tap(function (children) { return _this.map.set(item, children); }), operators.map(function (children) { return children.filter(function (item) { return !_this.loader.hasChildren(item); }); }), operators.tap(function (children) { return children.forEach(function (child) { return _this.map.set(child, []); }); }));
|
|
302
|
+
}), operators.startWith(null), operators.mapTo(this.start));
|
|
303
|
+
}
|
|
304
|
+
TuiTreeService.prototype.getChildren = function (item) {
|
|
305
|
+
var _a;
|
|
306
|
+
return (_a = this.map.get(item)) !== null && _a !== void 0 ? _a : [this.loading];
|
|
307
|
+
};
|
|
308
|
+
TuiTreeService.prototype.loadChildren = function (item) {
|
|
309
|
+
if (this.map.get(item)) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
this.map.set(item, [this.loading]);
|
|
313
|
+
this.load$.next(item);
|
|
314
|
+
};
|
|
315
|
+
TuiTreeService.ctorParameters = function () { return [
|
|
316
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_LOADING,] }] },
|
|
317
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_START,] }] },
|
|
318
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_LOADER,] }] }
|
|
319
|
+
]; };
|
|
320
|
+
TuiTreeService = __decorate([
|
|
321
|
+
core.Injectable(),
|
|
322
|
+
__param(0, core.Inject(TUI_TREE_LOADING)),
|
|
323
|
+
__param(1, core.Inject(TUI_TREE_START)),
|
|
324
|
+
__param(2, core.Inject(TUI_TREE_LOADER))
|
|
325
|
+
], TuiTreeService);
|
|
326
|
+
return TuiTreeService;
|
|
327
|
+
}());
|
|
328
|
+
|
|
329
|
+
var TuiTreeChildrenDirective = /** @class */ (function () {
|
|
330
|
+
function TuiTreeChildrenDirective() {
|
|
331
|
+
this.childrenHandler = TuiTreeChildrenDirective_1.defaultHandler;
|
|
332
|
+
}
|
|
333
|
+
TuiTreeChildrenDirective_1 = TuiTreeChildrenDirective;
|
|
334
|
+
TuiTreeChildrenDirective.defaultHandler = function (item) {
|
|
335
|
+
return Array.isArray(item) ? item : cdk.EMPTY_ARRAY;
|
|
336
|
+
};
|
|
337
|
+
var TuiTreeChildrenDirective_1;
|
|
338
|
+
__decorate([
|
|
339
|
+
core.Input(),
|
|
340
|
+
cdk.tuiDefaultProp()
|
|
341
|
+
], TuiTreeChildrenDirective.prototype, "childrenHandler", void 0);
|
|
342
|
+
TuiTreeChildrenDirective = TuiTreeChildrenDirective_1 = __decorate([
|
|
343
|
+
core.Directive({
|
|
344
|
+
selector: 'tui-tree[childrenHandler]',
|
|
345
|
+
})
|
|
346
|
+
], TuiTreeChildrenDirective);
|
|
347
|
+
return TuiTreeChildrenDirective;
|
|
348
|
+
}());
|
|
349
|
+
|
|
350
|
+
var TuiTreeComponent = /** @class */ (function () {
|
|
351
|
+
function TuiTreeComponent(directive) {
|
|
352
|
+
this.directive = directive;
|
|
353
|
+
this.content = function (_a) {
|
|
354
|
+
var $implicit = _a.$implicit;
|
|
355
|
+
return String($implicit);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
TuiTreeComponent_1 = TuiTreeComponent;
|
|
359
|
+
Object.defineProperty(TuiTreeComponent.prototype, "children", {
|
|
360
|
+
get: function () {
|
|
361
|
+
var _a, _b;
|
|
362
|
+
return ((_b = (_a = this.directive) === null || _a === void 0 ? void 0 : _a.childrenHandler(this.value)) !== null && _b !== void 0 ? _b : TuiTreeChildrenDirective.defaultHandler(this.value));
|
|
363
|
+
},
|
|
364
|
+
enumerable: true,
|
|
365
|
+
configurable: true
|
|
366
|
+
});
|
|
367
|
+
var TuiTreeComponent_1;
|
|
368
|
+
TuiTreeComponent.ctorParameters = function () { return [
|
|
369
|
+
{ type: TuiTreeChildrenDirective, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TuiTreeChildrenDirective,] }] }
|
|
370
|
+
]; };
|
|
371
|
+
__decorate([
|
|
372
|
+
core.Input()
|
|
373
|
+
], TuiTreeComponent.prototype, "value", void 0);
|
|
374
|
+
__decorate([
|
|
375
|
+
core.Input()
|
|
376
|
+
], TuiTreeComponent.prototype, "content", void 0);
|
|
377
|
+
TuiTreeComponent = TuiTreeComponent_1 = __decorate([
|
|
378
|
+
core.Component({
|
|
379
|
+
selector: 'tui-tree[value]',
|
|
380
|
+
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",
|
|
381
|
+
providers: [
|
|
382
|
+
{
|
|
383
|
+
provide: TUI_TREE_NODE,
|
|
384
|
+
useExisting: TuiTreeComponent_1,
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
host: {
|
|
388
|
+
role: 'tree',
|
|
389
|
+
},
|
|
390
|
+
styles: [":host{position:relative;display:block}"]
|
|
391
|
+
}),
|
|
392
|
+
__param(0, core.Optional()),
|
|
393
|
+
__param(0, core.Inject(TuiTreeChildrenDirective))
|
|
394
|
+
], TuiTreeComponent);
|
|
395
|
+
return TuiTreeComponent;
|
|
396
|
+
}());
|
|
397
|
+
|
|
398
|
+
var TUI_TREE_ITEM_PROVIDERS = [
|
|
399
|
+
{
|
|
400
|
+
provide: TUI_TREE_LEVEL,
|
|
401
|
+
deps: [[new core.SkipSelf(), TUI_TREE_LEVEL]],
|
|
402
|
+
useFactory: treeLevelFactory,
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
provide: TUI_TREE_NODE,
|
|
406
|
+
useExisting: core.forwardRef(function () { return TuiTreeItemComponent; }),
|
|
407
|
+
},
|
|
408
|
+
];
|
|
409
|
+
function treeLevelFactory(level) {
|
|
410
|
+
return ++level;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
var TuiTreeItemComponent = /** @class */ (function () {
|
|
414
|
+
function TuiTreeItemComponent(elementRef, controller, level, content) {
|
|
415
|
+
var _this = this;
|
|
416
|
+
this.elementRef = elementRef;
|
|
417
|
+
this.controller = controller;
|
|
418
|
+
this.level = level;
|
|
419
|
+
this.content = content;
|
|
420
|
+
this.change$ = new rxjs.Subject();
|
|
421
|
+
this.nested = cdk.EMPTY_QUERY;
|
|
422
|
+
this.expanded$ = this.change$.pipe(operators.startWith(null), operators.map(function () { return _this.isExpanded; }), operators.distinctUntilChanged());
|
|
423
|
+
this.attached$ = this.change$.pipe(operators.map(function () { return _this.elementRef.nativeElement.isConnected; }), operators.distinctUntilChanged());
|
|
424
|
+
}
|
|
425
|
+
Object.defineProperty(TuiTreeItemComponent.prototype, "isExpandable", {
|
|
426
|
+
get: function () {
|
|
427
|
+
return !!this.nested.length;
|
|
428
|
+
},
|
|
429
|
+
enumerable: true,
|
|
430
|
+
configurable: true
|
|
431
|
+
});
|
|
432
|
+
Object.defineProperty(TuiTreeItemComponent.prototype, "isExpanded", {
|
|
433
|
+
get: function () {
|
|
434
|
+
return this.controller.isExpanded(this);
|
|
435
|
+
},
|
|
436
|
+
enumerable: true,
|
|
437
|
+
configurable: true
|
|
438
|
+
});
|
|
439
|
+
TuiTreeItemComponent.prototype.ngDoCheck = function () {
|
|
440
|
+
this.change$.next();
|
|
441
|
+
};
|
|
442
|
+
TuiTreeItemComponent.ctorParameters = function () { return [
|
|
443
|
+
{ type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
|
|
444
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_CONTROLLER,] }] },
|
|
445
|
+
{ type: Number, decorators: [{ type: core.Inject, args: [TUI_TREE_LEVEL,] }] },
|
|
446
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_TREE_CONTENT,] }] }
|
|
447
|
+
]; };
|
|
448
|
+
__decorate([
|
|
449
|
+
core.ContentChildren(TUI_TREE_NODE)
|
|
450
|
+
], TuiTreeItemComponent.prototype, "nested", void 0);
|
|
451
|
+
__decorate([
|
|
452
|
+
core.HostBinding('class._expandable')
|
|
453
|
+
], TuiTreeItemComponent.prototype, "isExpandable", null);
|
|
454
|
+
TuiTreeItemComponent = __decorate([
|
|
455
|
+
core.Component({
|
|
456
|
+
selector: 'tui-tree-item',
|
|
457
|
+
template: "<ng-template #template><ng-content></ng-content></ng-template>\n<div\n polymorpheus-outlet\n class=\"t-content\"\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",
|
|
458
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
459
|
+
providers: TUI_TREE_ITEM_PROVIDERS,
|
|
460
|
+
host: {
|
|
461
|
+
role: 'treeitem',
|
|
462
|
+
},
|
|
463
|
+
styles: [":host{display:block}.t-children{position:relative;margin-left:var(--tui-tree-item-indent,1.5rem)}"]
|
|
464
|
+
}),
|
|
465
|
+
__param(0, core.Inject(core.ElementRef)),
|
|
466
|
+
__param(1, core.Inject(TUI_TREE_CONTROLLER)),
|
|
467
|
+
__param(2, core.Inject(TUI_TREE_LEVEL)),
|
|
468
|
+
__param(3, core.Inject(TUI_TREE_CONTENT))
|
|
469
|
+
], TuiTreeItemComponent);
|
|
470
|
+
return TuiTreeItemComponent;
|
|
471
|
+
}());
|
|
472
|
+
|
|
473
|
+
var TuiTreeControllerDirective = /** @class */ (function () {
|
|
474
|
+
function TuiTreeControllerDirective() {
|
|
475
|
+
this.fallback = true;
|
|
476
|
+
this.map = new Map();
|
|
477
|
+
this.toggled = new core.EventEmitter();
|
|
478
|
+
this.items = new Map();
|
|
479
|
+
}
|
|
480
|
+
TuiTreeControllerDirective_1 = TuiTreeControllerDirective;
|
|
481
|
+
TuiTreeControllerDirective.prototype.register = function (item, value) {
|
|
482
|
+
this.items.set(item, value);
|
|
483
|
+
};
|
|
484
|
+
TuiTreeControllerDirective.prototype.unregister = function (item) {
|
|
485
|
+
this.items.delete(item);
|
|
486
|
+
};
|
|
487
|
+
TuiTreeControllerDirective.prototype.isExpanded = function (item) {
|
|
488
|
+
var _a;
|
|
489
|
+
var value = this.items.get(item);
|
|
490
|
+
return (_a = (value && this.map.get(value))) !== null && _a !== void 0 ? _a : this.fallback;
|
|
491
|
+
};
|
|
492
|
+
TuiTreeControllerDirective.prototype.toggle = function (item) {
|
|
493
|
+
var value = this.items.get(item);
|
|
494
|
+
var expanded = this.isExpanded(item);
|
|
495
|
+
if (!cdk.isPresent(value)) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
this.toggled.emit(value);
|
|
499
|
+
this.map.set(value, !expanded);
|
|
500
|
+
};
|
|
501
|
+
var TuiTreeControllerDirective_1;
|
|
502
|
+
__decorate([
|
|
503
|
+
core.Input('tuiTreeController'),
|
|
504
|
+
cdk.tuiDefaultProp()
|
|
505
|
+
], TuiTreeControllerDirective.prototype, "fallback", void 0);
|
|
506
|
+
__decorate([
|
|
507
|
+
core.Input(),
|
|
508
|
+
cdk.tuiDefaultProp()
|
|
509
|
+
], TuiTreeControllerDirective.prototype, "map", void 0);
|
|
510
|
+
__decorate([
|
|
511
|
+
core.Output()
|
|
512
|
+
], TuiTreeControllerDirective.prototype, "toggled", void 0);
|
|
513
|
+
TuiTreeControllerDirective = TuiTreeControllerDirective_1 = __decorate([
|
|
514
|
+
core.Directive({
|
|
515
|
+
selector: '[tuiTreeController][map]',
|
|
516
|
+
exportAs: 'tuiTreeController',
|
|
517
|
+
providers: [
|
|
518
|
+
{
|
|
519
|
+
provide: TUI_TREE_ACCESSOR,
|
|
520
|
+
useExisting: TuiTreeControllerDirective_1,
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
provide: TUI_TREE_CONTROLLER,
|
|
524
|
+
useExisting: TuiTreeControllerDirective_1,
|
|
525
|
+
},
|
|
526
|
+
],
|
|
527
|
+
})
|
|
528
|
+
], TuiTreeControllerDirective);
|
|
529
|
+
return TuiTreeControllerDirective;
|
|
530
|
+
}());
|
|
531
|
+
|
|
532
|
+
var TuiTreeItemControllerDirective = /** @class */ (function () {
|
|
533
|
+
function TuiTreeItemControllerDirective() {
|
|
534
|
+
this.fallback = true;
|
|
535
|
+
this.map = new WeakMap();
|
|
536
|
+
}
|
|
537
|
+
TuiTreeItemControllerDirective_1 = TuiTreeItemControllerDirective;
|
|
538
|
+
TuiTreeItemControllerDirective.prototype.isExpanded = function (item) {
|
|
539
|
+
var _a;
|
|
540
|
+
return (_a = this.map.get(item)) !== null && _a !== void 0 ? _a : this.fallback;
|
|
541
|
+
};
|
|
542
|
+
TuiTreeItemControllerDirective.prototype.toggle = function (item) {
|
|
543
|
+
this.map.set(item, !this.isExpanded(item));
|
|
544
|
+
};
|
|
545
|
+
var TuiTreeItemControllerDirective_1;
|
|
546
|
+
__decorate([
|
|
547
|
+
core.Input('tuiTreeController'),
|
|
548
|
+
cdk.tuiDefaultProp()
|
|
549
|
+
], TuiTreeItemControllerDirective.prototype, "fallback", void 0);
|
|
550
|
+
TuiTreeItemControllerDirective = TuiTreeItemControllerDirective_1 = __decorate([
|
|
551
|
+
core.Directive({
|
|
552
|
+
selector: '[tuiTreeController]:not([map])',
|
|
553
|
+
exportAs: 'tuiTreeController',
|
|
554
|
+
providers: [
|
|
555
|
+
{
|
|
556
|
+
provide: TUI_TREE_CONTROLLER,
|
|
557
|
+
useExisting: TuiTreeItemControllerDirective_1,
|
|
558
|
+
},
|
|
559
|
+
],
|
|
560
|
+
})
|
|
561
|
+
], TuiTreeItemControllerDirective);
|
|
562
|
+
return TuiTreeItemControllerDirective;
|
|
563
|
+
}());
|
|
564
|
+
|
|
565
|
+
var TuiTreeNodeDirective = /** @class */ (function () {
|
|
566
|
+
function TuiTreeNodeDirective(directive, component) {
|
|
567
|
+
this.directive = directive;
|
|
568
|
+
this.component = component;
|
|
569
|
+
}
|
|
570
|
+
Object.defineProperty(TuiTreeNodeDirective.prototype, "value", {
|
|
571
|
+
set: function (value) {
|
|
572
|
+
var _a;
|
|
573
|
+
(_a = this.directive) === null || _a === void 0 ? void 0 : _a.register(this.component, value);
|
|
574
|
+
},
|
|
575
|
+
enumerable: true,
|
|
576
|
+
configurable: true
|
|
577
|
+
});
|
|
578
|
+
TuiTreeNodeDirective.prototype.ngOnDestroy = function () {
|
|
579
|
+
var _a;
|
|
580
|
+
(_a = this.directive) === null || _a === void 0 ? void 0 : _a.unregister(this.component);
|
|
581
|
+
};
|
|
582
|
+
TuiTreeNodeDirective.ctorParameters = function () { return [
|
|
583
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TUI_TREE_ACCESSOR,] }] },
|
|
584
|
+
{ type: TuiTreeItemComponent, decorators: [{ type: core.Inject, args: [TuiTreeItemComponent,] }] }
|
|
585
|
+
]; };
|
|
586
|
+
__decorate([
|
|
587
|
+
core.Input('tuiTreeNode')
|
|
588
|
+
], TuiTreeNodeDirective.prototype, "value", null);
|
|
589
|
+
TuiTreeNodeDirective = __decorate([
|
|
590
|
+
core.Directive({
|
|
591
|
+
selector: 'tui-tree-item[tuiTreeNode]',
|
|
592
|
+
}),
|
|
593
|
+
__param(0, core.Optional()),
|
|
594
|
+
__param(0, core.Inject(TUI_TREE_ACCESSOR)),
|
|
595
|
+
__param(1, core.Inject(TuiTreeItemComponent))
|
|
596
|
+
], TuiTreeNodeDirective);
|
|
597
|
+
return TuiTreeNodeDirective;
|
|
598
|
+
}());
|
|
599
|
+
|
|
600
|
+
var TuiTreeModule = /** @class */ (function () {
|
|
601
|
+
function TuiTreeModule() {
|
|
602
|
+
}
|
|
603
|
+
TuiTreeModule = __decorate([
|
|
604
|
+
core.NgModule({
|
|
605
|
+
imports: [common.CommonModule, ngPolymorpheus.PolymorpheusModule, core$1.TuiExpandModule, core$1.TuiButtonModule],
|
|
606
|
+
entryComponents: [TuiTreeItemContentComponent],
|
|
607
|
+
declarations: [
|
|
608
|
+
TuiTreeComponent,
|
|
609
|
+
TuiTreeItemComponent,
|
|
610
|
+
TuiTreeItemContentComponent,
|
|
611
|
+
TuiTreeChildrenDirective,
|
|
612
|
+
TuiTreeItemControllerDirective,
|
|
613
|
+
TuiTreeControllerDirective,
|
|
614
|
+
TuiTreeNodeDirective,
|
|
615
|
+
],
|
|
616
|
+
exports: [
|
|
617
|
+
TuiTreeComponent,
|
|
618
|
+
TuiTreeItemComponent,
|
|
619
|
+
TuiTreeChildrenDirective,
|
|
620
|
+
TuiTreeItemControllerDirective,
|
|
621
|
+
TuiTreeControllerDirective,
|
|
622
|
+
],
|
|
623
|
+
})
|
|
624
|
+
], TuiTreeModule);
|
|
625
|
+
return TuiTreeModule;
|
|
626
|
+
}());
|
|
627
|
+
|
|
628
|
+
exports.TUI_DEFAULT_TREE_CONTROLLER = TUI_DEFAULT_TREE_CONTROLLER;
|
|
629
|
+
exports.TUI_TREE_ACCESSOR = TUI_TREE_ACCESSOR;
|
|
630
|
+
exports.TUI_TREE_CONTENT = TUI_TREE_CONTENT;
|
|
631
|
+
exports.TUI_TREE_CONTROLLER = TUI_TREE_CONTROLLER;
|
|
632
|
+
exports.TUI_TREE_ITEM_CONTENT = TUI_TREE_ITEM_CONTENT;
|
|
633
|
+
exports.TUI_TREE_ITEM_PROVIDERS = TUI_TREE_ITEM_PROVIDERS;
|
|
634
|
+
exports.TUI_TREE_LEVEL = TUI_TREE_LEVEL;
|
|
635
|
+
exports.TUI_TREE_LOADER = TUI_TREE_LOADER;
|
|
636
|
+
exports.TUI_TREE_LOADING = TUI_TREE_LOADING;
|
|
637
|
+
exports.TUI_TREE_NODE = TUI_TREE_NODE;
|
|
638
|
+
exports.TUI_TREE_START = TUI_TREE_START;
|
|
639
|
+
exports.TuiTreeChildrenDirective = TuiTreeChildrenDirective;
|
|
640
|
+
exports.TuiTreeComponent = TuiTreeComponent;
|
|
641
|
+
exports.TuiTreeControllerDirective = TuiTreeControllerDirective;
|
|
642
|
+
exports.TuiTreeItemComponent = TuiTreeItemComponent;
|
|
643
|
+
exports.TuiTreeItemContentComponent = TuiTreeItemContentComponent;
|
|
644
|
+
exports.TuiTreeItemControllerDirective = TuiTreeItemControllerDirective;
|
|
645
|
+
exports.TuiTreeModule = TuiTreeModule;
|
|
646
|
+
exports.TuiTreeNodeDirective = TuiTreeNodeDirective;
|
|
647
|
+
exports.TuiTreeService = TuiTreeService;
|
|
648
|
+
exports.treeLevelFactory = treeLevelFactory;
|
|
649
|
+
|
|
650
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
651
|
+
|
|
652
|
+
})));
|
|
653
|
+
//# sourceMappingURL=taiga-ui-kit-components-tree.umd.js.map
|