@taiga-ui/kit 2.75.0 → 2.76.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 +2 -2
- package/abstract/slider/slider.d.ts +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +46 -1
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +59 -14
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +54 -9
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js +47 -2
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +59 -14
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +62 -19
- 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 +66 -21
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +54 -9
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +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 +48 -3
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +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 +50 -5
- 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-carousel.umd.js +69 -33
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +56 -10
- 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 +50 -5
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +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 +49 -4
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +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 +55 -10
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +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 +48 -3
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.js +51 -6
- package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +66 -21
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +49 -4
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +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 +56 -10
- 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 +62 -17
- 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 +60 -15
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +62 -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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +56 -11
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +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 +80 -35
- package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +61 -16
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +50 -5
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +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 +53 -8
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +51 -6
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +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 +72 -27
- 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 +52 -7
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +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 +59 -14
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +77 -32
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +62 -17
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +62 -15
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +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 +68 -23
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +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 +54 -9
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +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 +51 -6
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-island.umd.js +64 -19
- package/bundles/taiga-ui-kit-components-island.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-island.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +54 -9
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +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 +52 -7
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +51 -4
- 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.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +60 -15
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +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 +53 -8
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +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 +54 -9
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +69 -24
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.js +60 -15
- package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +57 -11
- 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 +47 -2
- 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 +51 -6
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +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 +51 -6
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +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 +52 -7
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +79 -34
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +50 -5
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +48 -3
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +50 -5
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +82 -37
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +72 -27
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +89 -42
- 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 +68 -23
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +63 -18
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +53 -8
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +63 -18
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +47 -2
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js +56 -11
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +52 -7
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +57 -12
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +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 +56 -11
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +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 +57 -12
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +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 +51 -6
- 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-directives-project-class.umd.js +48 -3
- package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-project-class.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-unfinished-validator.umd.js +50 -5
- package/bundles/taiga-ui-kit-directives-unfinished-validator.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-unfinished-validator.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-value-accessor.umd.js +47 -2
- package/bundles/taiga-ui-kit-directives-value-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-value-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +47 -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.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +46 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +46 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify-content.umd.js +46 -1
- package/bundles/taiga-ui-kit-pipes-stringify-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify-content.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.js +46 -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 +46 -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/bundles/taiga-ui-kit-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +1 -1
- 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/bundles/taiga-ui-kit-utils-mask.umd.js +46 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +46 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +46 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.min.js.map +1 -1
- package/components/arrow/arrow-options.d.ts +2 -2
- package/components/avatar/avatar.component.d.ts +3 -3
- package/components/badge/badge.component.d.ts +1 -1
- package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
- package/components/badged-content/badged-content.component.d.ts +1 -1
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +2 -2
- package/components/carousel/taiga-ui-kit-components-carousel.metadata.json +1 -1
- package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
- package/components/combo-box/combo-box.component.d.ts +1 -1
- package/components/data-list-wrapper/data-list-wrapper.d.ts +1 -1
- package/components/field-error/field-error.component.d.ts +1 -1
- package/components/filter/filter.component.d.ts +1 -1
- package/components/input-date/input-date.component.d.ts +1 -1
- 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 +2 -2
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-file/file/file.component.d.ts +1 -1
- package/components/input-file/input-file.component.d.ts +5 -5
- package/components/input-files/input-files.component.d.ts +2 -2
- package/components/input-inline/input-inline.component.d.ts +1 -1
- package/components/input-password/input-password-options.d.ts +4 -4
- package/components/input-password/input-password.component.d.ts +3 -3
- package/components/input-phone-international/input-phone-international.component.d.ts +1 -1
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -1
- package/components/input-range/input-range.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-options.d.ts +1 -1
- package/components/input-tag/input-tag.component.d.ts +2 -2
- package/components/input-time/input-time-options.d.ts +3 -3
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/island/island.component.d.ts +1 -1
- package/components/marker-icon/marker-icon.component.d.ts +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 +2 -2
- package/components/pdf-viewer/pdf-viewer.service.d.ts +1 -1
- package/components/push/taiga-ui-kit-components-push.metadata.json +1 -1
- package/components/radio-block/radio-block.component.d.ts +1 -1
- package/components/range/range-change.directive.d.ts +1 -1
- package/components/range/range.component.d.ts +1 -1
- package/components/select/select.component.d.ts +1 -1
- package/components/slider/helpers/slider-readonly.directive.d.ts +1 -1
- package/components/stepper/step/step.component.d.ts +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/tabs-options.d.ts +1 -0
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/tag-options.d.ts +1 -1
- package/components/tag/tag.component.d.ts +2 -2
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +1 -1
- package/directives/lazy-loading/lazy-loading.directive.d.ts +2 -2
- package/directives/lazy-loading/lazy-loading.service.d.ts +2 -2
- package/enums/dropdown-position.d.ts +1 -1
- package/enums/file-state.d.ts +1 -1
- package/enums/step-state.d.ts +1 -1
- package/esm2015/abstract/input-slider.js +1 -1
- package/esm2015/abstract/slider/slider.js +1 -1
- package/esm2015/components/accordion/accordion-item/accordion-item-content.directive.js +2 -2
- package/esm2015/components/accordion/accordion-item/accordion-item-eager-content.directive.js +2 -2
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +11 -11
- package/esm2015/components/accordion/accordion.component.js +2 -2
- package/esm2015/components/action/action.component.js +9 -9
- package/esm2015/components/arrow/arrow-options.js +1 -1
- package/esm2015/components/arrow/arrow.component.js +2 -2
- package/esm2015/components/avatar/avatar.component.js +14 -14
- package/esm2015/components/badge/badge.component.js +17 -19
- package/esm2015/components/badged-content/badged-content.component.js +21 -21
- package/esm2015/components/breadcrumbs/breadcrumb.directive.js +2 -2
- package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +5 -5
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +4 -4
- package/esm2015/components/calendar-month/calendar-month.component.js +3 -3
- package/esm2015/components/calendar-range/calendar-range.component.js +5 -5
- package/esm2015/components/carousel/carousel-autoscroll.directive.js +3 -3
- package/esm2015/components/carousel/carousel-buttons.directive.js +4 -4
- package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
- package/esm2015/components/carousel/carousel.component.js +11 -21
- package/esm2015/components/carousel/carousel.directive.js +3 -3
- package/esm2015/components/checkbox/checkbox.component.js +4 -4
- package/esm2015/components/checkbox-block/checkbox-block.component.js +11 -10
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +5 -5
- package/esm2015/components/combo-box/combo-box-strict.directive.js +3 -3
- package/esm2015/components/combo-box/combo-box.component.js +7 -7
- package/esm2015/components/combo-box/combo-box.directive.js +2 -2
- 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/data-list-wrapper/data-list-wrapper.js +1 -1
- package/esm2015/components/field-error/field-error.component.js +6 -6
- package/esm2015/components/files/file/file.component.js +20 -20
- package/esm2015/components/files/files.component.js +2 -2
- package/esm2015/components/filter/filter.component.js +4 -4
- package/esm2015/components/input/input.component.js +5 -5
- package/esm2015/components/input/input.directive.js +2 -2
- package/esm2015/components/input-copy/input-copy.component.js +10 -9
- package/esm2015/components/input-copy/input-copy.directive.js +2 -2
- package/esm2015/components/input-count/input-count.component.js +14 -14
- package/esm2015/components/input-count/input-count.directive.js +4 -4
- package/esm2015/components/input-date/input-date.component.js +9 -9
- package/esm2015/components/input-date/input-date.directive.js +3 -3
- package/esm2015/components/input-date-range/input-date-range.component.js +13 -13
- package/esm2015/components/input-date-range/input-date-range.directive.js +3 -3
- package/esm2015/components/input-date-time/input-date-time.component.js +15 -15
- package/esm2015/components/input-date-time/input-date-time.directive.js +3 -3
- package/esm2015/components/input-file/file/file.component.js +18 -18
- package/esm2015/components/input-file/input-file.component.js +18 -18
- package/esm2015/components/input-files/input-files.component.js +16 -16
- package/esm2015/components/input-inline/input-inline.component.js +5 -5
- package/esm2015/components/input-month/input-month.component.js +4 -4
- package/esm2015/components/input-month/input-month.directive.js +3 -3
- package/esm2015/components/input-month-range/input-month-range.component.js +5 -5
- package/esm2015/components/input-month-range/input-month-range.directive.js +4 -4
- package/esm2015/components/input-number/input-number.component.js +25 -25
- package/esm2015/components/input-number/input-number.directive.js +3 -3
- package/esm2015/components/input-password/input-password-options.js +1 -1
- package/esm2015/components/input-password/input-password.component.js +5 -5
- package/esm2015/components/input-password/input-password.directive.js +3 -3
- package/esm2015/components/input-phone/input-phone.component.js +30 -30
- package/esm2015/components/input-phone/input-phone.directive.js +3 -3
- package/esm2015/components/input-phone-international/input-phone-international.component.js +14 -14
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +1 -1
- package/esm2015/components/input-range/input-range.component.js +17 -17
- package/esm2015/components/input-slider/input-slider.component.js +17 -15
- package/esm2015/components/input-tag/input-tag-options.js +1 -1
- package/esm2015/components/input-tag/input-tag.component.js +23 -23
- package/esm2015/components/input-time/input-time-options.js +1 -1
- package/esm2015/components/input-time/input-time.component.js +9 -9
- package/esm2015/components/island/island.component.js +19 -19
- package/esm2015/components/line-clamp/line-clamp.component.js +9 -9
- package/esm2015/components/marker-icon/marker-icon.component.js +7 -7
- package/esm2015/components/multi-select/hide-selected.pipe.js +1 -1
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +2 -2
- package/esm2015/components/multi-select/multi-select.component.js +10 -10
- package/esm2015/components/multi-select-option/multi-select-option.component.js +3 -3
- package/esm2015/components/pagination/pagination.component.js +8 -8
- package/esm2015/components/pdf-viewer/pdf-viewer.component.js +6 -6
- package/esm2015/components/pdf-viewer/pdf-viewer.directive.js +4 -4
- package/esm2015/components/pdf-viewer/pdf-viewer.service.js +1 -1
- package/esm2015/components/progress/progress-bar/progress-bar.component.js +6 -6
- package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +5 -5
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +7 -7
- package/esm2015/components/progress/progress-label/progress-label.component.js +2 -2
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +8 -8
- package/esm2015/components/push/push-alert.component.js +7 -7
- package/esm2015/components/push/push-alert.directive.js +2 -2
- package/esm2015/components/push/push.component.js +5 -5
- package/esm2015/components/push/push.directive.js +4 -4
- package/esm2015/components/radio/radio.component.js +7 -7
- package/esm2015/components/radio-block/radio-block.component.js +12 -11
- package/esm2015/components/radio-group/radio-group.component.js +2 -2
- package/esm2015/components/radio-labeled/radio-labeled.component.js +6 -6
- package/esm2015/components/radio-list/radio-list.component.js +6 -6
- package/esm2015/components/range/range-change.directive.js +10 -10
- package/esm2015/components/range/range.component.js +23 -23
- package/esm2015/components/rating/rating.component.js +5 -5
- package/esm2015/components/select/select.component.js +4 -4
- package/esm2015/components/select/select.directive.js +2 -2
- package/esm2015/components/select-option/select-option.component.js +3 -3
- package/esm2015/components/slider/helpers/slider-key-steps.directive.js +10 -10
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +15 -15
- package/esm2015/components/slider/helpers/slider-thumb-label/slider-thumb-label.component.js +5 -5
- package/esm2015/components/slider/slider-old.component.js +2 -2
- package/esm2015/components/slider/slider.component.js +9 -9
- package/esm2015/components/stepper/step/step.component.js +12 -12
- package/esm2015/components/stepper/stepper.component.js +16 -16
- package/esm2015/components/tabs/tab/tab.component.js +10 -10
- package/esm2015/components/tabs/tab.directive.js +2 -2
- package/esm2015/components/tabs/tabs/tabs.component.js +13 -13
- package/esm2015/components/tabs/tabs-options.js +2 -1
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +9 -8
- package/esm2015/components/tabs/underline/underline.component.js +13 -13
- package/esm2015/components/tag/tag-options.js +1 -1
- package/esm2015/components/tag/tag.component.js +23 -23
- package/esm2015/components/text-area/text-area.component.js +17 -17
- package/esm2015/components/text-area/text-area.directive.js +2 -2
- package/esm2015/components/toggle/toggle.component.js +8 -8
- package/esm2015/components/tree/components/tree/tree.component.js +3 -3
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +5 -5
- package/esm2015/components/tree/components/tree-item-content/tree-item-content.component.js +3 -3
- package/esm2015/components/tree/directives/tree-children.directive.js +2 -2
- package/esm2015/components/tree/directives/tree-controller.directive.js +4 -4
- package/esm2015/components/tree/directives/tree-item-controller.directive.js +4 -4
- package/esm2015/components/tree/directives/tree-node.directive.js +3 -3
- package/esm2015/constants/max-day-range-length-mapper.js +2 -2
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +11 -11
- package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +5 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +12 -12
- package/esm2015/directives/highlight/highlight.directive.js +11 -11
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +12 -12
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm2015/directives/present/present.directive.js +6 -6
- package/esm2015/directives/project-class/project-class.directive.js +3 -3
- package/esm2015/directives/unfinished-validator/unfinished-validator.directive.js +5 -5
- package/esm2015/directives/value-accessor/value-accessor.directive.js +2 -2
- package/esm2015/enums/dropdown-position.js +1 -1
- package/esm2015/enums/file-state.js +1 -1
- package/esm2015/enums/step-state.js +1 -1
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input-with.pipe.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input.pipe.js +1 -1
- package/esm2015/pipes/stringify/stringify.pipe.js +1 -1
- package/esm2015/tokens/validation-errors.js +1 -1
- package/esm2015/types/marker-icon-mode.js +1 -1
- package/esm2015/types/status.js +1 -1
- package/esm2015/types/time-format-parts.js +1 -1
- package/esm2015/utils/dom/set-range-offset.js +1 -1
- package/esm2015/utils/format/string-hash-to-hsl.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +1 -1
- package/esm2015/utils/mask/create-time-mask.js +1 -1
- package/esm2015/utils/miscellaneous/is-flat.js +1 -1
- package/esm2015/utils/miscellaneous/replay-control-value-changes-factory.js +1 -1
- package/esm5/abstract/input-slider.js +1 -1
- package/esm5/abstract/slider/slider.js +1 -1
- package/esm5/components/accordion/accordion-item/accordion-item-content.directive.js +2 -2
- package/esm5/components/accordion/accordion-item/accordion-item-eager-content.directive.js +2 -2
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +11 -11
- package/esm5/components/accordion/accordion.component.js +2 -2
- package/esm5/components/action/action.component.js +9 -9
- package/esm5/components/arrow/arrow-options.js +1 -1
- package/esm5/components/arrow/arrow.component.js +2 -2
- package/esm5/components/avatar/avatar.component.js +14 -14
- package/esm5/components/badge/badge.component.js +17 -19
- package/esm5/components/badged-content/badged-content.component.js +21 -21
- package/esm5/components/breadcrumbs/breadcrumb.directive.js +2 -2
- package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +5 -5
- package/esm5/components/breadcrumbs/breadcrumbs.component.js +4 -4
- package/esm5/components/calendar-month/calendar-month.component.js +3 -3
- package/esm5/components/calendar-range/calendar-range.component.js +5 -5
- package/esm5/components/carousel/carousel-autoscroll.directive.js +3 -3
- package/esm5/components/carousel/carousel-buttons.directive.js +4 -4
- package/esm5/components/carousel/carousel-scroll.directive.js +3 -3
- package/esm5/components/carousel/carousel.component.js +11 -21
- package/esm5/components/carousel/carousel.directive.js +3 -3
- package/esm5/components/checkbox/checkbox.component.js +4 -4
- package/esm5/components/checkbox-block/checkbox-block.component.js +11 -10
- package/esm5/components/checkbox-labeled/checkbox-labeled.component.js +5 -5
- package/esm5/components/combo-box/combo-box-strict.directive.js +3 -3
- package/esm5/components/combo-box/combo-box.component.js +7 -7
- package/esm5/components/combo-box/combo-box.directive.js +2 -2
- 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/data-list-wrapper/data-list-wrapper.js +1 -1
- package/esm5/components/field-error/field-error.component.js +6 -6
- package/esm5/components/files/file/file.component.js +20 -20
- package/esm5/components/files/files.component.js +2 -2
- package/esm5/components/filter/filter.component.js +4 -4
- package/esm5/components/input/input.component.js +5 -5
- package/esm5/components/input/input.directive.js +2 -2
- package/esm5/components/input-copy/input-copy.component.js +10 -9
- package/esm5/components/input-copy/input-copy.directive.js +2 -2
- package/esm5/components/input-count/input-count.component.js +14 -14
- package/esm5/components/input-count/input-count.directive.js +4 -4
- package/esm5/components/input-date/input-date.component.js +9 -9
- package/esm5/components/input-date/input-date.directive.js +3 -3
- package/esm5/components/input-date-range/input-date-range.component.js +13 -13
- package/esm5/components/input-date-range/input-date-range.directive.js +3 -3
- package/esm5/components/input-date-time/input-date-time.component.js +15 -15
- package/esm5/components/input-date-time/input-date-time.directive.js +3 -3
- package/esm5/components/input-file/file/file.component.js +18 -18
- package/esm5/components/input-file/input-file.component.js +18 -18
- package/esm5/components/input-files/input-files.component.js +16 -16
- package/esm5/components/input-inline/input-inline.component.js +5 -5
- package/esm5/components/input-month/input-month.component.js +4 -4
- package/esm5/components/input-month/input-month.directive.js +3 -3
- package/esm5/components/input-month-range/input-month-range.component.js +5 -5
- package/esm5/components/input-month-range/input-month-range.directive.js +4 -4
- package/esm5/components/input-number/input-number.component.js +25 -25
- package/esm5/components/input-number/input-number.directive.js +3 -3
- package/esm5/components/input-password/input-password-options.js +1 -1
- package/esm5/components/input-password/input-password.component.js +5 -5
- package/esm5/components/input-password/input-password.directive.js +3 -3
- package/esm5/components/input-phone/input-phone.component.js +30 -30
- package/esm5/components/input-phone/input-phone.directive.js +3 -3
- package/esm5/components/input-phone-international/input-phone-international.component.js +14 -14
- package/esm5/components/input-phone-international/utils/extract-value-from-event.js +1 -1
- package/esm5/components/input-range/input-range.component.js +17 -17
- package/esm5/components/input-slider/input-slider.component.js +17 -15
- package/esm5/components/input-tag/input-tag-options.js +1 -1
- package/esm5/components/input-tag/input-tag.component.js +23 -23
- package/esm5/components/input-time/input-time-options.js +1 -1
- package/esm5/components/input-time/input-time.component.js +9 -9
- package/esm5/components/island/island.component.js +19 -19
- package/esm5/components/line-clamp/line-clamp.component.js +9 -9
- package/esm5/components/marker-icon/marker-icon.component.js +7 -7
- package/esm5/components/multi-select/hide-selected.pipe.js +1 -1
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +5 -5
- package/esm5/components/multi-select/multi-select-group/multi-select-group.directive.js +2 -2
- package/esm5/components/multi-select/multi-select.component.js +10 -10
- package/esm5/components/multi-select-option/multi-select-option.component.js +6 -4
- package/esm5/components/pagination/pagination.component.js +8 -8
- package/esm5/components/pdf-viewer/pdf-viewer.component.js +6 -6
- package/esm5/components/pdf-viewer/pdf-viewer.directive.js +4 -4
- package/esm5/components/pdf-viewer/pdf-viewer.service.js +1 -1
- package/esm5/components/progress/progress-bar/progress-bar.component.js +6 -6
- package/esm5/components/progress/progress-bar/progress-color-segments.directive.js +5 -5
- package/esm5/components/progress/progress-circle/progress-circle.component.js +7 -7
- package/esm5/components/progress/progress-label/progress-label.component.js +2 -2
- package/esm5/components/progress/progress-segmented/progress-segmented.component.js +8 -8
- package/esm5/components/push/push-alert.component.js +7 -7
- package/esm5/components/push/push-alert.directive.js +2 -2
- package/esm5/components/push/push.component.js +5 -5
- package/esm5/components/push/push.directive.js +4 -4
- package/esm5/components/radio/radio.component.js +7 -7
- package/esm5/components/radio-block/radio-block.component.js +12 -11
- package/esm5/components/radio-group/radio-group.component.js +2 -2
- package/esm5/components/radio-labeled/radio-labeled.component.js +6 -6
- package/esm5/components/radio-list/radio-list.component.js +6 -6
- package/esm5/components/range/range-change.directive.js +12 -12
- package/esm5/components/range/range.component.js +23 -23
- package/esm5/components/rating/rating.component.js +5 -5
- package/esm5/components/select/select.component.js +4 -4
- package/esm5/components/select/select.directive.js +2 -2
- package/esm5/components/select-option/select-option.component.js +3 -3
- package/esm5/components/slider/helpers/slider-key-steps.directive.js +10 -10
- package/esm5/components/slider/helpers/slider-readonly.directive.js +15 -15
- package/esm5/components/slider/helpers/slider-thumb-label/slider-thumb-label.component.js +5 -5
- package/esm5/components/slider/slider-old.component.js +2 -2
- package/esm5/components/slider/slider.component.js +9 -9
- package/esm5/components/stepper/step/step.component.js +12 -12
- package/esm5/components/stepper/stepper.component.js +16 -16
- package/esm5/components/tabs/tab/tab.component.js +10 -10
- package/esm5/components/tabs/tab.directive.js +2 -2
- package/esm5/components/tabs/tabs/tabs.component.js +13 -13
- package/esm5/components/tabs/tabs-options.js +2 -1
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +9 -8
- package/esm5/components/tabs/underline/underline.component.js +13 -13
- package/esm5/components/tag/tag-options.js +1 -1
- package/esm5/components/tag/tag.component.js +23 -23
- package/esm5/components/text-area/text-area.component.js +17 -17
- package/esm5/components/text-area/text-area.directive.js +2 -2
- package/esm5/components/toggle/toggle.component.js +8 -8
- package/esm5/components/tree/components/tree/tree.component.js +3 -3
- package/esm5/components/tree/components/tree-item/tree-item.component.js +5 -5
- package/esm5/components/tree/components/tree-item-content/tree-item-content.component.js +3 -3
- package/esm5/components/tree/directives/tree-children.directive.js +2 -2
- package/esm5/components/tree/directives/tree-controller.directive.js +4 -4
- package/esm5/components/tree/directives/tree-item-controller.directive.js +4 -4
- package/esm5/components/tree/directives/tree-node.directive.js +3 -3
- package/esm5/constants/max-day-range-length-mapper.js +2 -2
- package/esm5/directives/dropdown-context/dropdown-context.directive.js +11 -11
- package/esm5/directives/dropdown-hover/dropdown-hover.directive.js +7 -7
- package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +12 -12
- package/esm5/directives/highlight/highlight.directive.js +11 -11
- package/esm5/directives/lazy-loading/lazy-loading.directive.js +12 -12
- package/esm5/directives/lazy-loading/lazy-loading.service.js +1 -1
- package/esm5/directives/present/present.directive.js +6 -6
- package/esm5/directives/project-class/project-class.directive.js +3 -3
- package/esm5/directives/unfinished-validator/unfinished-validator.directive.js +5 -5
- package/esm5/directives/value-accessor/value-accessor.directive.js +2 -2
- package/esm5/enums/dropdown-position.js +1 -1
- package/esm5/enums/file-state.js +1 -1
- package/esm5/enums/step-state.js +1 -1
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm5/pipes/field-error/field-error-pipe.js +1 -1
- package/esm5/pipes/filter-by-input/filter-by-input-with.pipe.js +1 -1
- package/esm5/pipes/filter-by-input/filter-by-input.base.js +1 -1
- package/esm5/pipes/filter-by-input/filter-by-input.pipe.js +1 -1
- package/esm5/pipes/stringify/stringify.pipe.js +1 -1
- package/esm5/tokens/validation-errors.js +1 -1
- package/esm5/types/marker-icon-mode.js +1 -1
- package/esm5/types/status.js +1 -1
- package/esm5/types/time-format-parts.js +1 -1
- package/esm5/utils/dom/set-range-offset.js +1 -1
- package/esm5/utils/format/string-hash-to-hsl.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +1 -1
- package/esm5/utils/mask/create-time-mask.js +1 -1
- package/esm5/utils/miscellaneous/is-flat.js +1 -1
- package/esm5/utils/miscellaneous/replay-control-value-changes-factory.js +1 -1
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +13 -13
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +8 -8
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +13 -13
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +16 -18
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +20 -20
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +8 -8
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +2 -2
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +4 -4
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +20 -29
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +10 -9
- 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 +3 -3
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +9 -9
- 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-field-error.js +5 -5
- package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +20 -20
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +3 -3
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +10 -9
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +16 -16
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +14 -14
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +16 -16
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +10 -10
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +34 -34
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +15 -15
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -4
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +7 -7
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +5 -5
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +26 -26
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +6 -6
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +13 -13
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -31
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +16 -16
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +16 -14
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +22 -22
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +8 -8
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +5 -5
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-island.js +18 -18
- package/fesm2015/taiga-ui-kit-components-island.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 +6 -6
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +2 -2
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +14 -14
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +7 -7
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +8 -8
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +23 -23
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-push.js +14 -14
- package/fesm2015/taiga-ui-kit-components-push.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +11 -10
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-group.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +5 -5
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +5 -5
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +6 -6
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +31 -31
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +4 -4
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +2 -2
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +4 -4
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +36 -36
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +26 -26
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +43 -41
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +22 -22
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +17 -17
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +7 -7
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +17 -17
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +1 -1
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +10 -10
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +4 -4
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +11 -11
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js +10 -10
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +11 -11
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js +5 -5
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-project-class.js +2 -2
- package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-unfinished-validator.js +4 -4
- package/fesm2015/taiga-ui-kit-directives-unfinished-validator.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-value-accessor.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-value-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-kit-enums.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-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.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/fesm2015/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +13 -13
- package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-action.js +8 -8
- package/fesm5/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-arrow.js +1 -1
- package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js +13 -13
- package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badge.js +16 -18
- package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badged-content.js +20 -20
- package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +8 -8
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +2 -2
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js +4 -4
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +20 -29
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-block.js +10 -9
- 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 +3 -3
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +9 -9
- 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-field-error.js +5 -5
- package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-files.js +20 -20
- package/fesm5/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +3 -3
- package/fesm5/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +10 -9
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +16 -16
- package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +14 -14
- package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +16 -16
- package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +10 -10
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +34 -34
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-files.js +15 -15
- package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +4 -4
- package/fesm5/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month-range.js +7 -7
- package/fesm5/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-month.js +5 -5
- package/fesm5/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +26 -26
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +6 -6
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +13 -13
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +31 -31
- package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +16 -16
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +16 -14
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +22 -22
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +8 -8
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input.js +5 -5
- package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-island.js +18 -18
- package/fesm5/taiga-ui-kit-components-island.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 +6 -6
- package/fesm5/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select-option.js +5 -3
- package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +14 -14
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js +7 -7
- package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js +8 -8
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +23 -23
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-push.js +14 -14
- package/fesm5/taiga-ui-kit-components-push.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +11 -10
- package/fesm5/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-group.js +1 -1
- package/fesm5/taiga-ui-kit-components-radio-group.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-labeled.js +5 -5
- package/fesm5/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-list.js +5 -5
- package/fesm5/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +6 -6
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +33 -33
- package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-rating.js +4 -4
- package/fesm5/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select-option.js +2 -2
- package/fesm5/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +4 -4
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +36 -36
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +26 -26
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +43 -41
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +22 -22
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +17 -17
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +7 -7
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +17 -17
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +1 -1
- package/fesm5/taiga-ui-kit-constants.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js +10 -10
- package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-hover.js +6 -6
- package/fesm5/taiga-ui-kit-directives-dropdown-hover.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +11 -11
- package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-highlight.js +10 -10
- package/fesm5/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js +11 -11
- package/fesm5/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-present.js +5 -5
- package/fesm5/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-project-class.js +2 -2
- package/fesm5/taiga-ui-kit-directives-project-class.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-unfinished-validator.js +4 -4
- package/fesm5/taiga-ui-kit-directives-unfinished-validator.js.map +1 -1
- package/fesm5/taiga-ui-kit-directives-value-accessor.js +1 -1
- package/fesm5/taiga-ui-kit-directives-value-accessor.js.map +1 -1
- package/fesm5/taiga-ui-kit-enums.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-pipes-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-filter-by-input.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/fesm5/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-format.js +1 -1
- package/fesm5/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/package.json +4 -4
- package/pipes/field-error/field-error-pipe.d.ts +1 -1
- package/pipes/filter-by-input/filter-by-input.base.d.ts +1 -1
- package/pipes/stringify/stringify.pipe.d.ts +1 -1
- package/types/marker-icon-mode.d.ts +1 -1
- package/types/status.d.ts +1 -1
- package/types/time-format-parts.d.ts +1 -1
- package/utils/dom/set-range-offset.d.ts +1 -1
- package/utils/miscellaneous/is-flat.d.ts +1 -1
- package/utils/miscellaneous/replay-control-value-changes-factory.d.ts +1 -1
|
@@ -18,9 +18,9 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
18
18
|
this.sanitizer = sanitizer;
|
|
19
19
|
this.fileTexts$ = fileTexts$;
|
|
20
20
|
this.units$ = units$;
|
|
21
|
-
this.file = { name:
|
|
21
|
+
this.file = { name: '' };
|
|
22
22
|
this.state = "normal" /* Normal */;
|
|
23
|
-
this.size =
|
|
23
|
+
this.size = 'm';
|
|
24
24
|
this.allowDelete = true;
|
|
25
25
|
this.showSize = true;
|
|
26
26
|
this.fileRemoved = new EventEmitter();
|
|
@@ -28,14 +28,14 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
28
28
|
}
|
|
29
29
|
Object.defineProperty(TuiFileOldComponent.prototype, "preview", {
|
|
30
30
|
get: function () {
|
|
31
|
-
return this.isBig ? this.createPreview(this.file, this.sanitizer) :
|
|
31
|
+
return this.isBig ? this.createPreview(this.file, this.sanitizer) : '';
|
|
32
32
|
},
|
|
33
33
|
enumerable: true,
|
|
34
34
|
configurable: true
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(TuiFileOldComponent.prototype, "isBig", {
|
|
37
37
|
get: function () {
|
|
38
|
-
return this.size ===
|
|
38
|
+
return this.size === 'l';
|
|
39
39
|
},
|
|
40
40
|
enumerable: true,
|
|
41
41
|
configurable: true
|
|
@@ -64,15 +64,15 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
64
64
|
Object.defineProperty(TuiFileOldComponent.prototype, "icon", {
|
|
65
65
|
get: function () {
|
|
66
66
|
if (this.state === "normal" /* Normal */ && this.isBig) {
|
|
67
|
-
return
|
|
67
|
+
return 'tuiIconDefaultDocLarge';
|
|
68
68
|
}
|
|
69
69
|
switch (this.state) {
|
|
70
70
|
case "deleted" /* Deleted */:
|
|
71
|
-
return
|
|
71
|
+
return 'tuiIconTrashLarge';
|
|
72
72
|
case "error" /* Error */:
|
|
73
|
-
return
|
|
73
|
+
return 'tuiIconAlertCircleLarge';
|
|
74
74
|
default:
|
|
75
|
-
return
|
|
75
|
+
return 'tuiIconCheckCircleLarge';
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
enumerable: true,
|
|
@@ -80,21 +80,21 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(TuiFileOldComponent.prototype, "src", {
|
|
82
82
|
get: function () {
|
|
83
|
-
return this.file.src ||
|
|
83
|
+
return this.file.src || '';
|
|
84
84
|
},
|
|
85
85
|
enumerable: true,
|
|
86
86
|
configurable: true
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(TuiFileOldComponent.prototype, "name", {
|
|
89
89
|
get: function () {
|
|
90
|
-
return this.file.name.split(
|
|
90
|
+
return this.file.name.split('.').slice(0, -1).join('.');
|
|
91
91
|
},
|
|
92
92
|
enumerable: true,
|
|
93
93
|
configurable: true
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(TuiFileOldComponent.prototype, "type", {
|
|
96
96
|
get: function () {
|
|
97
|
-
return "." + this.file.name.split(
|
|
97
|
+
return "." + this.file.name.split('.').pop() || '';
|
|
98
98
|
},
|
|
99
99
|
enumerable: true,
|
|
100
100
|
configurable: true
|
|
@@ -122,7 +122,7 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
122
122
|
TuiFileOldComponent.prototype.calculateContent$ = function (state, file, fileTexts$) {
|
|
123
123
|
return state === "error" /* Error */ && !file.content
|
|
124
124
|
? fileTexts$.pipe(map(function (texts) { return texts.loadingError; }))
|
|
125
|
-
: of(this.file.content ||
|
|
125
|
+
: of(this.file.content || '');
|
|
126
126
|
};
|
|
127
127
|
TuiFileOldComponent.prototype.calculateFileSize$ = function (file, units$) {
|
|
128
128
|
return units$.pipe(map(function (units) { return formatSize(units, file.size); }));
|
|
@@ -132,10 +132,10 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
132
132
|
return file.src;
|
|
133
133
|
}
|
|
134
134
|
// TODO: iframe warning
|
|
135
|
-
if (file instanceof File && file.type && file.type.startsWith(
|
|
135
|
+
if (file instanceof File && file.type && file.type.startsWith('image/')) {
|
|
136
136
|
return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return '';
|
|
139
139
|
};
|
|
140
140
|
TuiFileOldComponent.ctorParameters = function () { return [
|
|
141
141
|
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
@@ -167,10 +167,10 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
167
167
|
Output()
|
|
168
168
|
], TuiFileOldComponent.prototype, "fileRemoved", void 0);
|
|
169
169
|
__decorate([
|
|
170
|
-
HostBinding(
|
|
170
|
+
HostBinding('class._focused')
|
|
171
171
|
], TuiFileOldComponent.prototype, "focused", void 0);
|
|
172
172
|
__decorate([
|
|
173
|
-
HostBinding(
|
|
173
|
+
HostBinding('class._link')
|
|
174
174
|
], TuiFileOldComponent.prototype, "src", null);
|
|
175
175
|
__decorate([
|
|
176
176
|
tuiPure
|
|
@@ -183,7 +183,7 @@ var TuiFileOldComponent = /** @class */ (function () {
|
|
|
183
183
|
], TuiFileOldComponent.prototype, "createPreview", null);
|
|
184
184
|
TuiFileOldComponent = __decorate([
|
|
185
185
|
Component({
|
|
186
|
-
selector:
|
|
186
|
+
selector: 'tui-file',
|
|
187
187
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
188
188
|
template: "<ng-container *ngIf=\"!src; else withLink\">\n <ng-container [ngTemplateOutlet]=\"fileInfoTemplate\"></ng-container>\n</ng-container>\n\n<ng-template #withLink>\n <a\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"t-link\"\n [href]=\"src\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"fileInfoTemplate\"></ng-container>\n </a>\n</ng-template>\n\n<ng-template #fileInfoTemplate>\n <div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n >\n <img\n *ngIf=\"preview && (fileTexts$ | async) as texts; else loader\"\n automation-id=\"tui-file__preview\"\n class=\"t-image\"\n [alt]=\"texts.preview\"\n [src]=\"preview\"\n />\n <ng-template #loader>\n <tui-loader\n *ngIf=\"isLoading; else svg\"\n automation-id=\"tui-file__loader\"\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n ></tui-loader>\n </ng-template>\n <ng-template #svg>\n <tui-svg\n automation-id=\"tui-file__icon\"\n class=\"t-icon\"\n [class.t-icon_deleted]=\"isDeleted\"\n [class.t-icon_error]=\"isError\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </div>\n <div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n automation-id=\"tui-file__name\"\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div\n automation-id=\"tui-file__type\"\n class=\"t-type\"\n >\n {{ type }}\n </div>\n <div\n *ngIf=\"showSize && (fileSize$ | async) as fileSize\"\n automation-id=\"tui-file__size\"\n class=\"t-size\"\n >\n {{ fileSize }}\n </div>\n </div>\n <div\n *ngIf=\"content$ | async as content\"\n polymorpheus-outlet\n automation-id=\"tui-file__content\"\n class=\"t-content\"\n [content]=\"content\"\n ></div>\n </div>\n <ng-container *ngIf=\"allowDelete\">\n <button\n *ngIf=\"fileTexts$ | async as texts\"\n automation-id=\"tui-file__remove\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconCloseLarge\"\n appearance=\"icon\"\n class=\"t-remove\"\n [title]=\"texts.remove\"\n [class.t-remove_mobile]=\"isMobile\"\n (click.prevent)=\"onRemoveClick()\"\n ></button>\n </ng-container>\n</ng-template>\n",
|
|
189
189
|
styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host:not(._link){padding:.5625rem 2.1875rem .5625rem .5625rem}:host:hover .t-remove{opacity:1}:host._focused{border-color:var(--tui-focus);box-shadow:0 0 0 1px inset var(--tui-focus)}.t-link{display:flex;flex:1;padding:.5625rem 2.1875rem .5625rem .5625rem;text-decoration:none;outline:0;cursor:pointer;color:var(--tui-text-01);max-width:calc(100% - 2.75rem)}.t-link:hover{background-color:var(--tui-base-02)}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;margin-right:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:rgba(0,0,0,.24)}.t-preview_big{width:4rem;height:4rem;margin-right:1rem}.t-preview_big:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';background:#333;opacity:.08}.t-image{max-width:100%;max-height:100%}.t-loader{position:absolute;top:0;left:0;width:100%;height:100%}.t-icon{position:absolute;top:0;left:0;width:100%;height:100%;color:var(--tui-success-fill)}.t-icon_error{color:var(--tui-error-fill)}.t-icon_deleted{color:var(--tui-base-06)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem;opacity:0}.t-remove:focus,.t-remove_mobile{opacity:1}.t-wrapper{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.t-text{display:flex}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-left:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-error-fill)}"]
|
|
@@ -207,11 +207,11 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
207
207
|
_this.mode$ = mode$;
|
|
208
208
|
_this.units$ = units$;
|
|
209
209
|
_this.dataTransfer = null;
|
|
210
|
-
_this.link =
|
|
211
|
-
_this.label =
|
|
212
|
-
_this.accept =
|
|
210
|
+
_this.link = '';
|
|
211
|
+
_this.label = '';
|
|
212
|
+
_this.accept = '';
|
|
213
213
|
_this.multiple = false;
|
|
214
|
-
_this.size =
|
|
214
|
+
_this.size = 'm';
|
|
215
215
|
_this.showSize = true;
|
|
216
216
|
_this.maxFileSize = DEFAULT_MAX_SIZE;
|
|
217
217
|
_this.loadingFiles = [];
|
|
@@ -252,7 +252,7 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
252
252
|
// @bad TODO: 3.0 refactor after IE is dropped
|
|
253
253
|
get: function () {
|
|
254
254
|
return (!!this.dataTransfer &&
|
|
255
|
-
Array.prototype.indexOf.call(this.dataTransfer.types,
|
|
255
|
+
Array.prototype.indexOf.call(this.dataTransfer.types, 'Files') !== -1);
|
|
256
256
|
},
|
|
257
257
|
enumerable: true,
|
|
258
258
|
configurable: true
|
|
@@ -304,7 +304,7 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
304
304
|
// TODO: refactor i18n messages
|
|
305
305
|
TuiInputFileComponent.prototype.onFilesSelected = function (input, texts, units) {
|
|
306
306
|
this.processSelectedFiles(input.files, texts, units);
|
|
307
|
-
input.value =
|
|
307
|
+
input.value = '';
|
|
308
308
|
};
|
|
309
309
|
TuiInputFileComponent.prototype.onDropped = function (event, texts, units) {
|
|
310
310
|
this.processSelectedFiles(event.files, texts, units);
|
|
@@ -319,27 +319,27 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
319
319
|
this.updateRejectedFiles(this.rejectedFiles.filter(function (file) { return file !== removedFile; }));
|
|
320
320
|
};
|
|
321
321
|
TuiInputFileComponent.prototype.getAppearance = function (mode) {
|
|
322
|
-
return mode === null ?
|
|
322
|
+
return mode === null ? '' : "outline" /* Outline */;
|
|
323
323
|
};
|
|
324
324
|
TuiInputFileComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
|
|
325
325
|
if (fileDragged) {
|
|
326
|
-
return of(
|
|
326
|
+
return of('');
|
|
327
327
|
}
|
|
328
328
|
return this.inputFileTexts$.pipe(map(function (texts) {
|
|
329
|
-
return multiple && link ===
|
|
329
|
+
return multiple && link === ''
|
|
330
330
|
? texts.defaultLinkMultiple
|
|
331
331
|
: link || texts.defaultLinkSingle;
|
|
332
332
|
}));
|
|
333
333
|
};
|
|
334
334
|
TuiInputFileComponent.prototype.computeLabel$ = function (isMobile, fileDragged, multiple, label) {
|
|
335
335
|
if (isMobile) {
|
|
336
|
-
return of(
|
|
336
|
+
return of('');
|
|
337
337
|
}
|
|
338
338
|
if (fileDragged) {
|
|
339
339
|
return this.inputFileTexts$.pipe(map(function (texts) { return (multiple ? texts.dropMultiple : texts.drop); }));
|
|
340
340
|
}
|
|
341
341
|
return this.inputFileTexts$.pipe(map(function (texts) {
|
|
342
|
-
return multiple && label ===
|
|
342
|
+
return multiple && label === ''
|
|
343
343
|
? texts.defaultLabelMultiple
|
|
344
344
|
: label || texts.defaultLabelSingle;
|
|
345
345
|
}));
|
|
@@ -359,7 +359,7 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
359
359
|
TuiInputFileComponent.prototype.getAcceptArray = function (accept) {
|
|
360
360
|
return accept
|
|
361
361
|
.toLowerCase()
|
|
362
|
-
.split(
|
|
362
|
+
.split(',')
|
|
363
363
|
.map(function (format) { return format.trim(); });
|
|
364
364
|
};
|
|
365
365
|
TuiInputFileComponent.prototype.processSelectedFiles = function (files, texts, units) {
|
|
@@ -390,12 +390,12 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
390
390
|
if (!this.accept) {
|
|
391
391
|
return true;
|
|
392
392
|
}
|
|
393
|
-
var extension = "." + (file.name.split(
|
|
393
|
+
var extension = "." + (file.name.split('.').pop() || '').toLowerCase();
|
|
394
394
|
return this.acceptArray.some(function (format) {
|
|
395
395
|
return format === extension ||
|
|
396
396
|
format === file.type ||
|
|
397
|
-
(format.split(
|
|
398
|
-
file.type.split(
|
|
397
|
+
(format.split('/')[1] === '*' &&
|
|
398
|
+
file.type.split('/')[0] === format.split('/')[0]);
|
|
399
399
|
});
|
|
400
400
|
};
|
|
401
401
|
TuiInputFileComponent.prototype.updateRejectedFiles = function (rejectedFiles) {
|
|
@@ -451,7 +451,7 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
451
451
|
Output()
|
|
452
452
|
], TuiInputFileComponent.prototype, "rejectedFilesChange", void 0);
|
|
453
453
|
__decorate([
|
|
454
|
-
ViewChild(
|
|
454
|
+
ViewChild('input')
|
|
455
455
|
], TuiInputFileComponent.prototype, "input", void 0);
|
|
456
456
|
__decorate([
|
|
457
457
|
tuiPure
|
|
@@ -473,7 +473,7 @@ var TuiInputFileComponent = /** @class */ (function (_super) {
|
|
|
473
473
|
], TuiInputFileComponent.prototype, "getAcceptArray", null);
|
|
474
474
|
TuiInputFileComponent = TuiInputFileComponent_1 = __decorate([
|
|
475
475
|
Component({
|
|
476
|
-
selector:
|
|
476
|
+
selector: 'tui-input-file',
|
|
477
477
|
template: "<tui-wrapper\n *ngIf=\"multiple || !value\"\n class=\"t-wrapper\"\n [class.t-wrapper_mobile]=\"isMobile\"\n [class.t-wrapper_has-files]=\"hasFiles\"\n [appearance]=\"getAppearance(mode$ | async)\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered || fileDragged\"\n [pressed]=\"computedPressed\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n>\n <label\n *ngIf=\"units$ | async as units\"\n automation-id=\"tui-input-file__label\"\n >\n <a tuiLink>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLink$ | async\"\n ></span>\n </a>\n <ng-container *ngIf=\"computedLabel$ | async as computedLabel\">\n <span> </span>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLabel\"\n ></span>\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <input\n *ngIf=\"inputFileTexts$ | async as texts\"\n #input\n type=\"file\"\n tuiPreventDefault=\"mousedown\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n (change)=\"onFilesSelected(input, texts, units)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiPressedChange)=\"onPressed($event)\"\n (tuiDroppableDropped)=\"onDropped($event, texts, units)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n />\n </ng-container>\n </label>\n</tui-wrapper>\n\n<section\n *tuiLet=\"mode$ | async as mode\"\n tuiGroup\n orientation=\"vertical\"\n class=\"t-files\"\n [collapsed]=\"true\"\n>\n <tui-file\n *ngFor=\"let file of rejectedFiles\"\n automation-id=\"tui-input-file__error\"\n state=\"error\"\n [attr.data-mode]=\"mode\"\n [showSize]=\"showSize\"\n [allowDelete]=\"interactive\"\n [size]=\"size\"\n [file]=\"file\"\n (fileRemoved)=\"removeRejectedFile(file)\"\n ></tui-file>\n <tui-file\n *ngFor=\"let file of computedLoading\"\n automation-id=\"tui-input-file__loading\"\n state=\"loading\"\n [attr.data-mode]=\"mode\"\n [showSize]=\"showSize\"\n [allowDelete]=\"interactive\"\n [size]=\"size\"\n [file]=\"file\"\n (fileRemoved)=\"removeFile(file)\"\n ></tui-file>\n <tui-file\n *ngFor=\"let file of readyFiles\"\n automation-id=\"tui-input-file__file\"\n [attr.data-mode]=\"mode\"\n [showSize]=\"showSize\"\n [allowDelete]=\"interactive\"\n [size]=\"size\"\n [file]=\"file\"\n (fileRemoved)=\"removeFile(file)\"\n ></tui-file>\n</section>\n",
|
|
478
478
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
479
479
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-file.js","sources":["ng://@taiga-ui/kit/components/input-file/file/file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.module.ts","ng://@taiga-ui/kit/components/input-file/taiga-ui-kit-components-input-file.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {DomSanitizer, SafeValue} from '@angular/platform-browser';\nimport {TUI_IS_MOBILE, tuiDefaultProp, tuiPure} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileState, TuiFileStateT} from '@taiga-ui/kit/enums';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: `tui-file`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./file.template.html`,\n styleUrls: [`./file.style.less`],\n})\nexport class TuiFileOldComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ``};\n\n @Input()\n @tuiDefaultProp()\n state: TuiFileStateT | TuiFileState = TuiFileState.Normal;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n allowDelete = true;\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Output()\n readonly fileRemoved = new EventEmitter<void>();\n\n @HostBinding(`class._focused`)\n focused = false;\n\n constructor(\n @Inject(TUI_IS_MOBILE) readonly isMobile: boolean,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_FILE_TEXTS)\n readonly fileTexts$: Observable<\n Record<'loadingError' | 'preview' | 'remove', string>\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: Observable<[string, string, string]>,\n ) {}\n\n get preview(): SafeValue {\n return this.isBig ? this.createPreview(this.file, this.sanitizer) : ``;\n }\n\n get isBig(): boolean {\n return this.size === `l`;\n }\n\n get isLoading(): boolean {\n return this.state === TuiFileState.Loading;\n }\n\n get isError(): boolean {\n return this.state === TuiFileState.Error;\n }\n\n get isDeleted(): boolean {\n return this.state === TuiFileState.Deleted;\n }\n\n get icon(): string {\n if (this.state === TuiFileState.Normal && this.isBig) {\n return `tuiIconDefaultDocLarge`;\n }\n\n switch (this.state) {\n case TuiFileState.Deleted:\n return `tuiIconTrashLarge`;\n case TuiFileState.Error:\n return `tuiIconAlertCircleLarge`;\n default:\n return `tuiIconCheckCircleLarge`;\n }\n }\n\n @HostBinding(`class._link`)\n get src(): string {\n return this.file.src || ``;\n }\n\n get name(): string {\n return this.file.name.split(`.`).slice(0, -1).join(`.`);\n }\n\n get type(): string {\n return `.${this.file.name.split(`.`).pop()}` || ``;\n }\n\n get content$(): Observable<PolymorpheusContent> {\n return this.calculateContent$(this.state, this.file, this.fileTexts$);\n }\n\n get fileSize$(): Observable<string | null> {\n return this.calculateFileSize$(this.file, this.units$);\n }\n\n onRemoveClick(): void {\n this.fileRemoved.emit();\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: keyof Record<TuiFileState, string> | string | TuiFileState,\n file: TuiFileLike,\n fileTexts$: Observable<Record<'loadingError' | 'preview' | 'remove', string>>,\n ): Observable<PolymorpheusContent> {\n return state === TuiFileState.Error && !file.content\n ? fileTexts$.pipe(map(texts => texts.loadingError))\n : of(this.file.content || ``);\n }\n\n @tuiPure\n private calculateFileSize$(\n file: TuiFileLike,\n units$: Observable<[string, string, string]>,\n ): Observable<string | null> {\n return units$.pipe(map(units => formatSize(units, file.size)));\n }\n\n @tuiPure\n private createPreview(file: TuiFileLike, sanitizer: DomSanitizer): SafeValue {\n if (file.src) {\n return file.src;\n }\n\n // TODO: iframe warning\n if (file instanceof File && file.type && file.type.startsWith(`image/`)) {\n return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));\n }\n\n return ``;\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_MODE,\n TuiAppearance,\n TuiBrightness,\n TuiSizeL,\n} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB\n\n// @dynamic\n@Component({\n selector: `tui-input-file`,\n templateUrl: `./input-file.template.html`,\n styleUrls: [`./input-file.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n MODE_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputFileComponent),\n },\n ],\n})\nexport class TuiInputFileComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n accept = ``;\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Input()\n @tuiDefaultProp()\n loadingFiles: readonly TuiFileLike[] = [];\n\n @Input()\n @tuiDefaultProp()\n rejectedFiles: readonly TuiFileLike[] = [];\n\n @Output()\n rejectedFilesChange = new EventEmitter<readonly TuiFileLike[]>();\n\n @ViewChild(`input`)\n readonly input?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelSingle'\n | 'defaultLabelMultiple'\n | 'defaultLinkSingle'\n | 'defaultLinkMultiple'\n | 'maxSizeRejectionReason'\n | 'formatRejectionReason'\n | 'drop'\n | 'dropMultiple',\n string\n >\n >,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n readonly units$: Observable<[string, string, string]>,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input ? this.input.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n // @bad TODO: 3.0 refactor after IE is dropped\n get fileDragged(): boolean {\n return (\n !!this.dataTransfer &&\n Array.prototype.indexOf.call(this.dataTransfer.types, `Files`) !== -1\n );\n }\n\n get acceptArray(): readonly string[] {\n return this.getAcceptArray(this.accept);\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n get readyFiles(): readonly TuiFileLike[] {\n return this.getReadyFiles(this.arrayValue, this.loadingFiles);\n }\n\n get computedLoading(): readonly TuiFileLike[] {\n return this.getLoadingFiles(this.arrayValue, this.loadingFiles);\n }\n\n get hasFiles(): boolean {\n return !!this.rejectedFiles.length || !!this.arrayValue.length;\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean): void {\n this.updatePressed(pressed);\n }\n\n // TODO: refactor i18n messages\n onFilesSelected(\n input: HTMLInputElement,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ): void {\n this.processSelectedFiles(input.files, texts, units);\n input.value = ``;\n }\n\n onDropped(\n event: DataTransfer,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ): void {\n this.processSelectedFiles(event.files, texts, units);\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n removeRejectedFile(removedFile: TuiFileLike): void {\n this.updateRejectedFiles(this.rejectedFiles.filter(file => file !== removedFile));\n }\n\n getAppearance(mode: null | unknown): string {\n return mode === null ? `` : TuiAppearance.Outline;\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (fileDragged) {\n return of(``);\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ``\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of(``);\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ``\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return value instanceof Array ? value : [value];\n }\n\n @tuiPure\n private getReadyFiles(\n value: readonly TuiFileLike[],\n loading: readonly TuiFileLike[],\n ): readonly TuiFileLike[] {\n return value.filter(file => !loading.includes(file));\n }\n\n @tuiPure\n private getLoadingFiles(\n value: readonly TuiFileLike[],\n loading: readonly TuiFileLike[],\n ): readonly TuiFileLike[] {\n return loading.filter(file => value.includes(file));\n }\n\n @tuiPure\n private getAcceptArray(accept: string): readonly string[] {\n return accept\n .toLowerCase()\n .split(`,`)\n .map(format => format.trim());\n }\n\n private processSelectedFiles(\n files: FileList | null,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (files === null || files.length === 0) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n this.updateRejectedFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content:\n texts.maxSizeRejectionReason + formatSize(units, this.maxFileSize),\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: texts.formatRejectionReason,\n })),\n ]);\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;\n\n return this.acceptArray.some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split(`/`)[1] === `*` &&\n file.type.split(`/`)[0] === format.split(`/`)[0]),\n );\n }\n\n private updateRejectedFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.rejectedFiles = rejectedFiles;\n this.rejectedFilesChange.emit(rejectedFiles);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiLetModule,\n TuiPressedModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiFileOldComponent} from './file/file.component';\nimport {TuiInputFileComponent} from './input-file.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiPreventDefaultModule,\n TuiGroupModule,\n ],\n declarations: [TuiFileOldComponent, TuiInputFileComponent],\n exports: [TuiInputFileComponent],\n})\nexport class TuiInputFileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBA;;IAkCI,6BACoC,QAAiB,EACV,SAAuB,EAErD,UAER,EAEgB,MAA4C;QAP7B,aAAQ,GAAR,QAAQ,CAAS;QACV,cAAS,GAAT,SAAS,CAAc;QAErD,eAAU,GAAV,UAAU,CAElB;QAEgB,WAAM,GAAN,MAAM,CAAsC;QAhCjE,SAAI,GAAgB,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC;QAI/B,UAAK,yBAAqD;QAI1D,SAAI,GAAa,GAAG,CAAC;QAIrB,gBAAW,GAAG,IAAI,CAAC;QAInB,aAAQ,GAAG,IAAI,CAAC;QAGP,gBAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;QAGhD,YAAO,GAAG,KAAK,CAAC;KAWZ;IAEJ,sBAAI,wCAAO;aAAX;YACI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;SAC1E;;;OAAA;IAED,sBAAI,sCAAK;aAAT;YACI,OAAO,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC;SAC5B;;;OA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;IAAD,yBAAC;CAAlC;;AC/CA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-file.js","sources":["ng://@taiga-ui/kit/components/input-file/file/file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.module.ts","ng://@taiga-ui/kit/components/input-file/taiga-ui-kit-components-input-file.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {DomSanitizer, SafeValue} from '@angular/platform-browser';\nimport {TUI_IS_MOBILE, tuiDefaultProp, tuiPure} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileState, TuiFileStateT} from '@taiga-ui/kit/enums';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// @dynamic\n@Component({\n selector: 'tui-file',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './file.template.html',\n styleUrls: ['./file.style.less'],\n})\nexport class TuiFileOldComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ''};\n\n @Input()\n @tuiDefaultProp()\n state: TuiFileState | TuiFileStateT = TuiFileState.Normal;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n allowDelete = true;\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Output()\n readonly fileRemoved = new EventEmitter<void>();\n\n @HostBinding('class._focused')\n focused = false;\n\n constructor(\n @Inject(TUI_IS_MOBILE) readonly isMobile: boolean,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_FILE_TEXTS)\n readonly fileTexts$: Observable<\n Record<'loadingError' | 'preview' | 'remove', string>\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: Observable<[string, string, string]>,\n ) {}\n\n get preview(): SafeValue {\n return this.isBig ? this.createPreview(this.file, this.sanitizer) : '';\n }\n\n get isBig(): boolean {\n return this.size === 'l';\n }\n\n get isLoading(): boolean {\n return this.state === TuiFileState.Loading;\n }\n\n get isError(): boolean {\n return this.state === TuiFileState.Error;\n }\n\n get isDeleted(): boolean {\n return this.state === TuiFileState.Deleted;\n }\n\n get icon(): string {\n if (this.state === TuiFileState.Normal && this.isBig) {\n return 'tuiIconDefaultDocLarge';\n }\n\n switch (this.state) {\n case TuiFileState.Deleted:\n return 'tuiIconTrashLarge';\n case TuiFileState.Error:\n return 'tuiIconAlertCircleLarge';\n default:\n return 'tuiIconCheckCircleLarge';\n }\n }\n\n @HostBinding('class._link')\n get src(): string {\n return this.file.src || '';\n }\n\n get name(): string {\n return this.file.name.split('.').slice(0, -1).join('.');\n }\n\n get type(): string {\n return `.${this.file.name.split('.').pop()}` || '';\n }\n\n get content$(): Observable<PolymorpheusContent> {\n return this.calculateContent$(this.state, this.file, this.fileTexts$);\n }\n\n get fileSize$(): Observable<string | null> {\n return this.calculateFileSize$(this.file, this.units$);\n }\n\n onRemoveClick(): void {\n this.fileRemoved.emit();\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: TuiFileState | string | keyof Record<TuiFileState, string>,\n file: TuiFileLike,\n fileTexts$: Observable<Record<'loadingError' | 'preview' | 'remove', string>>,\n ): Observable<PolymorpheusContent> {\n return state === TuiFileState.Error && !file.content\n ? fileTexts$.pipe(map(texts => texts.loadingError))\n : of(this.file.content || '');\n }\n\n @tuiPure\n private calculateFileSize$(\n file: TuiFileLike,\n units$: Observable<[string, string, string]>,\n ): Observable<string | null> {\n return units$.pipe(map(units => formatSize(units, file.size)));\n }\n\n @tuiPure\n private createPreview(file: TuiFileLike, sanitizer: DomSanitizer): SafeValue {\n if (file.src) {\n return file.src;\n }\n\n // TODO: iframe warning\n if (file instanceof File && file.type && file.type.startsWith('image/')) {\n return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));\n }\n\n return '';\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_MODE,\n TuiAppearance,\n TuiBrightness,\n TuiSizeL,\n} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB\n\n// @dynamic\n@Component({\n selector: 'tui-input-file',\n templateUrl: './input-file.template.html',\n styleUrls: ['./input-file.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n MODE_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputFileComponent),\n },\n ],\n})\nexport class TuiInputFileComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n accept = '';\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Input()\n @tuiDefaultProp()\n loadingFiles: readonly TuiFileLike[] = [];\n\n @Input()\n @tuiDefaultProp()\n rejectedFiles: readonly TuiFileLike[] = [];\n\n @Output()\n rejectedFilesChange = new EventEmitter<readonly TuiFileLike[]>();\n\n @ViewChild('input')\n readonly input?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelMultiple'\n | 'defaultLabelSingle'\n | 'defaultLinkMultiple'\n | 'defaultLinkSingle'\n | 'drop'\n | 'dropMultiple'\n | 'formatRejectionReason'\n | 'maxSizeRejectionReason',\n string\n >\n >,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n readonly units$: Observable<[string, string, string]>,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input ? this.input.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n // @bad TODO: 3.0 refactor after IE is dropped\n get fileDragged(): boolean {\n return (\n !!this.dataTransfer &&\n Array.prototype.indexOf.call(this.dataTransfer.types, 'Files') !== -1\n );\n }\n\n get acceptArray(): readonly string[] {\n return this.getAcceptArray(this.accept);\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n get readyFiles(): readonly TuiFileLike[] {\n return this.getReadyFiles(this.arrayValue, this.loadingFiles);\n }\n\n get computedLoading(): readonly TuiFileLike[] {\n return this.getLoadingFiles(this.arrayValue, this.loadingFiles);\n }\n\n get hasFiles(): boolean {\n return !!this.rejectedFiles.length || !!this.arrayValue.length;\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean): void {\n this.updatePressed(pressed);\n }\n\n // TODO: refactor i18n messages\n onFilesSelected(\n input: HTMLInputElement,\n texts: Record<'formatRejectionReason' | 'maxSizeRejectionReason', string>,\n units: [string, string, string],\n ): void {\n this.processSelectedFiles(input.files, texts, units);\n input.value = '';\n }\n\n onDropped(\n event: DataTransfer,\n texts: Record<'formatRejectionReason' | 'maxSizeRejectionReason', string>,\n units: [string, string, string],\n ): void {\n this.processSelectedFiles(event.files, texts, units);\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n removeRejectedFile(removedFile: TuiFileLike): void {\n this.updateRejectedFiles(this.rejectedFiles.filter(file => file !== removedFile));\n }\n\n getAppearance(mode: unknown | null): string {\n return mode === null ? '' : TuiAppearance.Outline;\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (fileDragged) {\n return of('');\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ''\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of('');\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ''\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return value instanceof Array ? value : [value];\n }\n\n @tuiPure\n private getReadyFiles(\n value: readonly TuiFileLike[],\n loading: readonly TuiFileLike[],\n ): readonly TuiFileLike[] {\n return value.filter(file => !loading.includes(file));\n }\n\n @tuiPure\n private getLoadingFiles(\n value: readonly TuiFileLike[],\n loading: readonly TuiFileLike[],\n ): readonly TuiFileLike[] {\n return loading.filter(file => value.includes(file));\n }\n\n @tuiPure\n private getAcceptArray(accept: string): readonly string[] {\n return accept\n .toLowerCase()\n .split(',')\n .map(format => format.trim());\n }\n\n private processSelectedFiles(\n files: FileList | null,\n texts: Record<'formatRejectionReason' | 'maxSizeRejectionReason', string>,\n units: [string, string, string],\n ): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (files === null || files.length === 0) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n this.updateRejectedFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content:\n texts.maxSizeRejectionReason + formatSize(units, this.maxFileSize),\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: texts.formatRejectionReason,\n })),\n ]);\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split('.').pop() || '').toLowerCase()}`;\n\n return this.acceptArray.some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split('/')[1] === '*' &&\n file.type.split('/')[0] === format.split('/')[0]),\n );\n }\n\n private updateRejectedFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.rejectedFiles = rejectedFiles;\n this.rejectedFilesChange.emit(rejectedFiles);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiLetModule,\n TuiPressedModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiFileOldComponent} from './file/file.component';\nimport {TuiInputFileComponent} from './input-file.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiPreventDefaultModule,\n TuiGroupModule,\n ],\n declarations: [TuiFileOldComponent, TuiInputFileComponent],\n exports: [TuiInputFileComponent],\n})\nexport class TuiInputFileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBA;;IAkCI,6BACoC,QAAiB,EACV,SAAuB,EAErD,UAER,EAEgB,MAA4C;QAP7B,aAAQ,GAAR,QAAQ,CAAS;QACV,cAAS,GAAT,SAAS,CAAc;QAErD,eAAU,GAAV,UAAU,CAElB;QAEgB,WAAM,GAAN,MAAM,CAAsC;QAhCjE,SAAI,GAAgB,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC;QAI/B,UAAK,yBAAqD;QAI1D,SAAI,GAAa,GAAG,CAAC;QAIrB,gBAAW,GAAG,IAAI,CAAC;QAInB,aAAQ,GAAG,IAAI,CAAC;QAGP,gBAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;QAGhD,YAAO,GAAG,KAAK,CAAC;KAWZ;IAEJ,sBAAI,wCAAO;aAAX;YACI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;SAC1E;;;OAAA;IAED,sBAAI,sCAAK;aAAT;YACI,OAAO,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC;SAC5B;;;OAAA;IAED,sBAAI,0CAAS;aAAb;YACI,OAAO,IAAI,CAAC,KAAK,6BAA0B;SAC9C;;;OAAA;IAED,sBAAI,wCAAO;aAAX;YACI,OAAO,IAAI,CAAC,KAAK,yBAAwB;SAC5C;;;OAAA;IAED,sBAAI,0CAAS;aAAb;YACI,OAAO,IAAI,CAAC,KAAK,6BAA0B;SAC9C;;;OAAA;IAED,sBAAI,qCAAI;aAAR;YACI,IAAI,IAAI,CAAC,KAAK,8BAA4B,IAAI,CAAC,KAAK,EAAE;gBAClD,OAAO,wBAAwB,CAAC;aACn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CAAC,cAAM,OAAA,uBAAqB,GAAA,CAAC;iBACvD;aACJ;;SACJ,CAAC;QAkDO,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,IAAI,EAAE,CAAA;QACN,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QAEjB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;QAErB,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;QAc5B,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChB,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;OAxEjC,qBAAqB,CA4TjC;IAAD,4BAAC;CAAA,CA3TW,0BAA0B;;;ICVtC;KAAkC;IAArB,kBAAkB;QAtB9B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,YAAY;gBACZ,gBAAgB;gBAChB,qBAAqB;gBACrB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,aAAa;gBACb,eAAe;gBACf,eAAe;gBACf,uBAAuB;gBACvB,cAAc;aACjB;YACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;YAC1D,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;AC/CA;;;;;;"}
|
|
@@ -21,11 +21,11 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
21
21
|
_this.isMobile = isMobile;
|
|
22
22
|
_this.inputFileTexts$ = inputFileTexts$;
|
|
23
23
|
_this.dataTransfer = null;
|
|
24
|
-
_this.link =
|
|
25
|
-
_this.label =
|
|
26
|
-
_this.accept =
|
|
24
|
+
_this.link = '';
|
|
25
|
+
_this.label = '';
|
|
26
|
+
_this.accept = '';
|
|
27
27
|
_this.multiple = false;
|
|
28
|
-
_this.size =
|
|
28
|
+
_this.size = 'm';
|
|
29
29
|
_this.maxFileSize = DEFAULT_MAX_SIZE;
|
|
30
30
|
_this.reject = new EventEmitter();
|
|
31
31
|
return _this;
|
|
@@ -71,7 +71,7 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
71
71
|
Object.defineProperty(TuiInputFilesComponent.prototype, "fileDragged", {
|
|
72
72
|
get: function () {
|
|
73
73
|
var _a;
|
|
74
|
-
return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes(
|
|
74
|
+
return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes('Files'));
|
|
75
75
|
},
|
|
76
76
|
enumerable: true,
|
|
77
77
|
configurable: true
|
|
@@ -94,7 +94,7 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
94
94
|
};
|
|
95
95
|
TuiInputFilesComponent.prototype.onFilesSelected = function (input, formatRejection, maxSizeRejection) {
|
|
96
96
|
this.processSelectedFiles(input.files, { formatRejection: formatRejection, maxSizeRejection: maxSizeRejection });
|
|
97
|
-
input.value =
|
|
97
|
+
input.value = '';
|
|
98
98
|
};
|
|
99
99
|
TuiInputFilesComponent.prototype.onDropped = function (event, formatRejection, maxSizeRejection) {
|
|
100
100
|
this.processSelectedFiles(event.files, { formatRejection: formatRejection, maxSizeRejection: maxSizeRejection });
|
|
@@ -107,22 +107,22 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
107
107
|
};
|
|
108
108
|
TuiInputFilesComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
|
|
109
109
|
return fileDragged
|
|
110
|
-
? of(
|
|
110
|
+
? of('')
|
|
111
111
|
: this.inputFileTexts$.pipe(map(function (texts) {
|
|
112
|
-
return multiple && link ===
|
|
112
|
+
return multiple && link === ''
|
|
113
113
|
? texts.defaultLinkMultiple
|
|
114
114
|
: link || texts.defaultLinkSingle;
|
|
115
115
|
}));
|
|
116
116
|
};
|
|
117
117
|
TuiInputFilesComponent.prototype.computeLabel$ = function (isMobile, fileDragged, multiple, label) {
|
|
118
118
|
if (isMobile) {
|
|
119
|
-
return of(
|
|
119
|
+
return of('');
|
|
120
120
|
}
|
|
121
121
|
if (fileDragged) {
|
|
122
122
|
return this.inputFileTexts$.pipe(map(function (texts) { return (multiple ? texts.dropMultiple : texts.drop); }));
|
|
123
123
|
}
|
|
124
124
|
return this.inputFileTexts$.pipe(map(function (texts) {
|
|
125
|
-
return multiple && label ===
|
|
125
|
+
return multiple && label === ''
|
|
126
126
|
? texts.defaultLabelMultiple
|
|
127
127
|
: label || texts.defaultLabelSingle;
|
|
128
128
|
}));
|
|
@@ -163,12 +163,12 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
163
163
|
if (!this.accept) {
|
|
164
164
|
return true;
|
|
165
165
|
}
|
|
166
|
-
var extension = "." + (file.name.split(
|
|
166
|
+
var extension = "." + (file.name.split('.').pop() || '').toLowerCase();
|
|
167
167
|
return getAcceptArray(this.accept).some(function (format) {
|
|
168
168
|
return format === extension ||
|
|
169
169
|
format === file.type ||
|
|
170
|
-
(format.split(
|
|
171
|
-
file.type.split(
|
|
170
|
+
(format.split('/')[1] === '*' &&
|
|
171
|
+
file.type.split('/')[0] === format.split('/')[0]);
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
174
|
TuiInputFilesComponent.prototype.rejectFiles = function (rejectedFiles) {
|
|
@@ -182,7 +182,7 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
182
182
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_INPUT_FILE_TEXTS,] }] }
|
|
183
183
|
]; };
|
|
184
184
|
__decorate([
|
|
185
|
-
ViewChild(
|
|
185
|
+
ViewChild('input')
|
|
186
186
|
], TuiInputFilesComponent.prototype, "input", void 0);
|
|
187
187
|
__decorate([
|
|
188
188
|
Input(),
|
|
@@ -222,7 +222,7 @@ var TuiInputFilesComponent = /** @class */ (function (_super) {
|
|
|
222
222
|
], TuiInputFilesComponent.prototype, "getValueArray", null);
|
|
223
223
|
TuiInputFilesComponent = TuiInputFilesComponent_1 = __decorate([
|
|
224
224
|
Component({
|
|
225
|
-
selector:
|
|
225
|
+
selector: 'tui-input-files',
|
|
226
226
|
template: "<tui-wrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered || fileDragged\"\n [pressed]=\"computedPressed\"\n [disabled]=\"computedDisabled\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n >\n <a tuiLink>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLink$ | async\"\n ></span>\n </a>\n <ng-container *ngIf=\"computedLabel$ | async as computedLabel\">\n <span> </span>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLabel\"\n ></span>\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <input\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n (change)=\"onFilesSelected(input, formatRejection, maxSizeRejection)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiPressedChange)=\"onPressed($event)\"\n (tuiDroppableDropped)=\"onDropped($event, formatRejection, maxSizeRejection)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n />\n </ng-container>\n </label>\n</tui-wrapper>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n",
|
|
227
227
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
228
228
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-files.js","sources":["ng://@taiga-ui/kit/components/input-files/input-files.component.ts","ng://@taiga-ui/kit/components/input-files/max-size-rejection-error.pipe.ts","ng://@taiga-ui/kit/components/input-files/input-files.module.ts","ng://@taiga-ui/kit/components/input-files/taiga-ui-kit-components-input-files.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {getAcceptArray} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB\n\n// @dynamic\n@Component({\n selector: `tui-input-files`,\n templateUrl: `./input-files.template.html`,\n styleUrls: [`./input-files.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MODE_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputFilesComponent),\n },\n ],\n})\nexport class TuiInputFilesComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`input`)\n private readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n accept = ``;\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Output()\n reject = new EventEmitter<TuiFileLike | readonly TuiFileLike[]>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelSingle'\n | 'defaultLabelMultiple'\n | 'defaultLinkSingle'\n | 'defaultLinkMultiple'\n | 'maxSizeRejectionReason'\n | 'formatRejectionReason'\n | 'drop'\n | 'dropMultiple',\n string\n >\n >,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get computedPseudoHovered(): boolean | null {\n return this.pseudoHovered ?? (this.fileDragged || null);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n get fileDragged(): boolean {\n return !!this.dataTransfer?.types.includes(`Files`);\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean): void {\n this.updatePressed(pressed);\n }\n\n onFilesSelected(\n input: HTMLInputElement,\n formatRejection: PolymorpheusContent,\n maxSizeRejection: PolymorpheusContent,\n ): void {\n this.processSelectedFiles(input.files, {formatRejection, maxSizeRejection});\n input.value = ``;\n }\n\n onDropped(\n event: DataTransfer,\n formatRejection: PolymorpheusContent,\n maxSizeRejection: PolymorpheusContent,\n ): void {\n this.processSelectedFiles(event.files, {formatRejection, maxSizeRejection});\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n return fileDragged\n ? of(``)\n : this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ``\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of(``);\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ``\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return Array.isArray(value) ? value : [value];\n }\n\n private processSelectedFiles(\n files: FileList | null,\n errors: Record<'maxSizeRejection' | 'formatRejection', PolymorpheusContent>,\n ): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (!files?.length) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n if (tooBigFiles.length || wrongFormatFiles.length) {\n this.rejectFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.maxSizeRejection,\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.formatRejection,\n })),\n ]);\n }\n\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;\n\n return getAcceptArray(this.accept).some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split(`/`)[1] === `*` &&\n file.type.split(`/`)[0] === format.split(`/`)[0]),\n );\n }\n\n private rejectFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);\n }\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiInjectionTokenType} from '@taiga-ui/cdk';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiFormatSize} from '@taiga-ui/kit/utils';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n@Pipe({name: `tuiMaxSizeRejectionError`})\nexport class TuiMaxSizeRejectionErrorPipe implements PipeTransform {\n constructor(\n @Inject(TUI_INPUT_FILE_TEXTS)\n private readonly inputFileTexts$: TuiInjectionTokenType<\n typeof TUI_INPUT_FILE_TEXTS\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: TuiInjectionTokenType<\n typeof TUI_DIGITAL_INFORMATION_UNITS\n >,\n ) {}\n\n transform(maxFileSize: number): Observable<string> {\n return combineLatest([this.inputFileTexts$, this.units$]).pipe(\n map(\n ([{maxSizeRejectionReason}, units]) =>\n maxSizeRejectionReason + tuiFormatSize(units, maxFileSize),\n ),\n );\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiItemDirective,\n TuiLetModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {\n TuiFileComponent,\n TuiFilesComponent,\n TuiFilesModule,\n} from '@taiga-ui/kit/components/files';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputFilesComponent} from './input-files.component';\nimport {TuiMaxSizeRejectionErrorPipe} from './max-size-rejection-error.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiGroupModule,\n TuiFilesModule,\n ],\n declarations: [TuiInputFilesComponent, TuiMaxSizeRejectionErrorPipe],\n exports: [\n TuiInputFilesComponent,\n TuiFilesComponent,\n TuiFileComponent,\n TuiItemDirective,\n ],\n})\nexport class TuiInputFilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiMaxSizeRejectionErrorPipe as ɵa} from './max-size-rej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,CACJ,CAAC;KACL;;gDAjBI,MAAM,SAAC,oBAAoB;gDAI3B,MAAM,SAAC,6BAA6B;;IANhC,4BAA4B;QADxC,IAAI,CAAC,EAAC,IAAI,EAAE,0BAA0B,EAAC,CAAC;QAGhC,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;QAI5B,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;OANjC,4BAA4B,CAoBxC;IAAD,mCAAC;CApBD;;;ICiDA;KAAmC;IAAtB,mBAAmB;QA3B/B,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,kBAAkB;gBAClB,YAAY;gBACZ,gBAAgB;gBAChB,qBAAqB;gBACrB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,aAAa;gBACb,eAAe;gBACf,eAAe;gBACf,cAAc;gBACd,cAAc;aACjB;YACD,YAAY,EAAE,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;YACpE,OAAO,EAAE;gBACL,sBAAsB;gBACtB,iBAAiB;gBACjB,gBAAgB;gBAChB,gBAAgB;aACnB;SACJ,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACzDA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-files.js","sources":["ng://@taiga-ui/kit/components/input-files/input-files.component.ts","ng://@taiga-ui/kit/components/input-files/max-size-rejection-error.pipe.ts","ng://@taiga-ui/kit/components/input-files/input-files.module.ts","ng://@taiga-ui/kit/components/input-files/taiga-ui-kit-components-input-files.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {getAcceptArray} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB\n\n// @dynamic\n@Component({\n selector: 'tui-input-files',\n templateUrl: './input-files.template.html',\n styleUrls: ['./input-files.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MODE_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputFilesComponent),\n },\n ],\n})\nexport class TuiInputFilesComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('input')\n private readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n accept = '';\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Output()\n reject = new EventEmitter<TuiFileLike | readonly TuiFileLike[]>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelMultiple'\n | 'defaultLabelSingle'\n | 'defaultLinkMultiple'\n | 'defaultLinkSingle'\n | 'drop'\n | 'dropMultiple'\n | 'formatRejectionReason'\n | 'maxSizeRejectionReason',\n string\n >\n >,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get computedPseudoHovered(): boolean | null {\n return this.pseudoHovered ?? (this.fileDragged || null);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n get fileDragged(): boolean {\n return !!this.dataTransfer?.types.includes('Files');\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean): void {\n this.updatePressed(pressed);\n }\n\n onFilesSelected(\n input: HTMLInputElement,\n formatRejection: PolymorpheusContent,\n maxSizeRejection: PolymorpheusContent,\n ): void {\n this.processSelectedFiles(input.files, {formatRejection, maxSizeRejection});\n input.value = '';\n }\n\n onDropped(\n event: DataTransfer,\n formatRejection: PolymorpheusContent,\n maxSizeRejection: PolymorpheusContent,\n ): void {\n this.processSelectedFiles(event.files, {formatRejection, maxSizeRejection});\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n return fileDragged\n ? of('')\n : this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ''\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of('');\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ''\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return Array.isArray(value) ? value : [value];\n }\n\n private processSelectedFiles(\n files: FileList | null,\n errors: Record<'formatRejection' | 'maxSizeRejection', PolymorpheusContent>,\n ): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (!files?.length) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n if (tooBigFiles.length || wrongFormatFiles.length) {\n this.rejectFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.maxSizeRejection,\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.formatRejection,\n })),\n ]);\n }\n\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split('.').pop() || '').toLowerCase()}`;\n\n return getAcceptArray(this.accept).some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split('/')[1] === '*' &&\n file.type.split('/')[0] === format.split('/')[0]),\n );\n }\n\n private rejectFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);\n }\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiInjectionTokenType} from '@taiga-ui/cdk';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiFormatSize} from '@taiga-ui/kit/utils';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n@Pipe({name: `tuiMaxSizeRejectionError`})\nexport class TuiMaxSizeRejectionErrorPipe implements PipeTransform {\n constructor(\n @Inject(TUI_INPUT_FILE_TEXTS)\n private readonly inputFileTexts$: TuiInjectionTokenType<\n typeof TUI_INPUT_FILE_TEXTS\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: TuiInjectionTokenType<\n typeof TUI_DIGITAL_INFORMATION_UNITS\n >,\n ) {}\n\n transform(maxFileSize: number): Observable<string> {\n return combineLatest([this.inputFileTexts$, this.units$]).pipe(\n map(\n ([{maxSizeRejectionReason}, units]) =>\n maxSizeRejectionReason + tuiFormatSize(units, maxFileSize),\n ),\n );\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiItemDirective,\n TuiLetModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {\n TuiFileComponent,\n TuiFilesComponent,\n TuiFilesModule,\n} from '@taiga-ui/kit/components/files';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputFilesComponent} from './input-files.component';\nimport {TuiMaxSizeRejectionErrorPipe} from './max-size-rejection-error.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiGroupModule,\n TuiFilesModule,\n ],\n declarations: [TuiInputFilesComponent, TuiMaxSizeRejectionErrorPipe],\n exports: [\n TuiInputFilesComponent,\n TuiFilesComponent,\n TuiFileComponent,\n TuiItemDirective,\n ],\n})\nexport class TuiInputFilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiMaxSizeRejectionErrorPipe as ɵa} from './max-size-rejection-error.pipe';"],"names":[],"mappings":";;;;;;;;;;;;;;AAmCA,IAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C;;IAgBY,0CAAgE;IAmCxE,gCAII,OAAyB,EAEzB,iBAAoC,EAE3B,QAAiB,EAEjB,eAYR;QAtBL,YAwBI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAjBY,cAAQ,GAAR,QAAQ,CAAS;QAEjB,qBAAe,GAAf,eAAe,CAYvB;QAnDG,kBAAY,GAAwB,IAAI,CAAC;QAIjD,UAAI,GAAwB,EAAE,CAAC;QAI/B,WAAK,GAAwB,EAAE,CAAC;QAIhC,YAAM,GAAG,EAAE,CAAC;QAIZ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BAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,aAAa;gBACb,eAAe;gBACf,eAAe;gBACf,cAAc;gBACd,cAAc;aACjB;YACD,YAAY,EAAE,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;YACpE,OAAO,EAAE;gBACL,sBAAsB;gBACtB,iBAAiB;gBACjB,gBAAgB;gBAChB,gBAAgB;aACnB;SACJ,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACzDA;;;;;;"}
|
|
@@ -30,7 +30,7 @@ var TuiInputInlineComponent = /** @class */ (function (_super) {
|
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(TuiInputInlineComponent.prototype, "hasValue", {
|
|
32
32
|
get: function () {
|
|
33
|
-
return this.value !==
|
|
33
|
+
return this.value !== '';
|
|
34
34
|
},
|
|
35
35
|
enumerable: true,
|
|
36
36
|
configurable: true
|
|
@@ -42,7 +42,7 @@ var TuiInputInlineComponent = /** @class */ (function (_super) {
|
|
|
42
42
|
this.updateFocused(focused);
|
|
43
43
|
};
|
|
44
44
|
TuiInputInlineComponent.prototype.getFallbackValue = function () {
|
|
45
|
-
return
|
|
45
|
+
return '';
|
|
46
46
|
};
|
|
47
47
|
var TuiInputInlineComponent_1;
|
|
48
48
|
TuiInputInlineComponent.ctorParameters = function () { return [
|
|
@@ -50,7 +50,7 @@ var TuiInputInlineComponent = /** @class */ (function (_super) {
|
|
|
50
50
|
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
|
|
51
51
|
]; };
|
|
52
52
|
__decorate([
|
|
53
|
-
ViewChild(
|
|
53
|
+
ViewChild('native')
|
|
54
54
|
], TuiInputInlineComponent.prototype, "native", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
Input(),
|
|
@@ -58,7 +58,7 @@ var TuiInputInlineComponent = /** @class */ (function (_super) {
|
|
|
58
58
|
], TuiInputInlineComponent.prototype, "maxLength", void 0);
|
|
59
59
|
TuiInputInlineComponent = TuiInputInlineComponent_1 = __decorate([
|
|
60
60
|
Component({
|
|
61
|
-
selector:
|
|
61
|
+
selector: 'tui-input-inline',
|
|
62
62
|
template: "<span class=\"t-before\">{{ value }}</span>\n\n<span\n *ngIf=\"!hasValue\"\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n>\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id=\"tui-input-inline__native\"\n type=\"text\"\n tuiMaskAccessor\n class=\"t-native\"\n [attr.maxLength]=\"maxLength\"\n [id]=\"id\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n/>\n",
|
|
63
63
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
64
64
|
providers: [
|