@taiga-ui/kit 2.55.0 → 2.56.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/bundles/taiga-ui-kit-abstract.umd.js +22 -22
- 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 +13 -13
- 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 +8 -8
- 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 +5 -5
- 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 +13 -13
- 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 +14 -14
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +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 +21 -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 +7 -7
- 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 +2 -2
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +18 -18
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +8 -8
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +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 +4 -4
- 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 +3 -3
- 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 +9 -9
- 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 +4 -4
- 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 +5 -5
- 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 +20 -20
- 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 +3 -3
- 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 +8 -8
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +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 +19 -19
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +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 +14 -14
- 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 +16 -16
- 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 +10 -10
- 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 +34 -34
- 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 +15 -15
- 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 +4 -4
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +7 -7
- 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 +5 -5
- 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 +22 -22
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +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 +9 -9
- 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 +230 -230
- 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 +36 -36
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +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 +16 -16
- 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 +37 -25
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +24 -24
- 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 +13 -13
- 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 +5 -5
- 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 +18 -18
- 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 +9 -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 +6 -6
- 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 +2 -2
- 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 +17 -17
- 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 +7 -7
- 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 +10 -10
- 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 +26 -26
- 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-radio-block.umd.js +9 -9
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +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 +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -5
- 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 +5 -5
- 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 +8 -8
- 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 +33 -33
- 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 +7 -7
- 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 +2 -2
- 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 +6 -6
- 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 +39 -39
- 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 +25 -25
- 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 +41 -41
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +24 -24
- 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 +17 -17
- 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 +11 -11
- 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 +24 -24
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +18 -18
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js +10 -10
- 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 +6 -6
- 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 +12 -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 +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 +10 -10
- 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 +11 -11
- 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 +5 -5
- 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 +2 -2
- 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 +4 -4
- 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 +1 -1
- 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 +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +8 -8
- 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 +4 -4
- 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 +1 -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 +2 -2
- 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-providers.umd.js +3 -3
- package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +38 -38
- 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 +4 -4
- 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-files.umd.js +2 -2
- package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +2 -2
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +12 -12
- 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 +2 -2
- 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 +7 -7
- 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/bundles/taiga-ui-kit-validators.umd.js +1 -1
- package/bundles/taiga-ui-kit-validators.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-validators.umd.min.js.map +1 -1
- package/components/input-slider/input-slider.component.d.ts +4 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +12 -12
- package/esm2015/abstract/slider/slider.js +12 -12
- 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 +5 -5
- package/esm2015/components/arrow/arrow.component.js +2 -2
- package/esm2015/components/avatar/avatar-options.js +3 -3
- package/esm2015/components/avatar/avatar.component.js +12 -12
- package/esm2015/components/badge/badge.component.js +15 -15
- package/esm2015/components/badged-content/badged-content.component.js +22 -22
- 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 +4 -4
- 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 +10 -10
- 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 +9 -9
- 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 +3 -3
- 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 +8 -8
- package/esm2015/components/input-copy/input-copy.directive.js +2 -2
- package/esm2015/components/input-count/input-count-options.js +6 -6
- package/esm2015/components/input-count/input-count.component.js +12 -12
- 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 +21 -21
- package/esm2015/components/input-number/input-number.directive.js +3 -3
- package/esm2015/components/input-password/input-password-options.js +4 -4
- 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/input-phone.options.js +4 -4
- package/esm2015/components/input-phone/input-phone.providers.js +3 -3
- package/esm2015/components/input-phone-international/const/countries.js +215 -215
- package/esm2015/components/input-phone-international/country-iso-code.js +1 -1
- package/esm2015/components/input-phone-international/input-phone-international.component.js +14 -14
- package/esm2015/components/input-phone-international/input-phone-international.options.js +2 -2
- package/esm2015/components/input-phone-international/tokens/countries-masks.js +2 -2
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +2 -2
- package/esm2015/components/input-range/input-range.component.js +17 -17
- package/esm2015/components/input-slider/input-slider.component.js +31 -22
- package/esm2015/components/input-tag/input-tag-options.js +3 -3
- package/esm2015/components/input-tag/input-tag.component.js +23 -23
- package/esm2015/components/input-time/input-time-options.js +6 -6
- 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-options.js +2 -2
- 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 +2 -2
- 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-options.js +3 -3
- 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 +3 -3
- 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/progress/utils/calculate-color-segments.js +2 -2
- package/esm2015/components/progress/utils/progress-color-segments-async.pipe.js +2 -2
- package/esm2015/components/progress/utils/progress-color-segments.pipe.js +2 -2
- package/esm2015/components/radio/radio-options.js +3 -3
- package/esm2015/components/radio/radio.component.js +7 -7
- package/esm2015/components/radio-block/radio-block.component.js +10 -10
- 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-options.js +4 -4
- package/esm2015/components/rating/rating.component.js +5 -5
- package/esm2015/components/select/select-options.js +3 -3
- 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 +11 -11
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +15 -15
- package/esm2015/components/slider/helpers/slider-thumb-label/slider-thumb-label.component.js +4 -4
- package/esm2015/components/slider/slider-old.component.js +2 -2
- package/esm2015/components/slider/slider-options.js +4 -4
- 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 +15 -15
- package/esm2015/components/tabs/tab/tab.component.js +8 -8
- package/esm2015/components/tabs/tab/tab.providers.js +4 -4
- package/esm2015/components/tabs/tabs/tabs.component.js +13 -13
- package/esm2015/components/tabs/tabs-options.js +2 -2
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +6 -6
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +2 -2
- package/esm2015/components/tabs/underline/underline.component.js +13 -13
- package/esm2015/components/tag/tag-options.js +4 -4
- package/esm2015/components/tag/tag.component.js +22 -22
- 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-options.js +5 -5
- 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 +4 -4
- 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/components/tree/misc/tree.tokens.js +9 -9
- package/esm2015/constants/date-time-separator.js +2 -2
- package/esm2015/constants/group-class-names.js +10 -10
- package/esm2015/constants/icon-blank.js +2 -2
- package/esm2015/constants/masks.js +7 -7
- package/esm2015/constants/router-link-options.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 +13 -13
- package/esm2015/directives/highlight/highlight.directive.js +11 -11
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +12 -12
- 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/borders.js +1 -1
- package/esm2015/enums/dropdown-position.js +1 -1
- package/esm2015/enums/file-state.js +1 -1
- package/esm2015/enums/marker-icon-mode.js +1 -1
- package/esm2015/enums/status.js +1 -1
- package/esm2015/enums/step-state.js +1 -1
- package/esm2015/enums/text-align.js +1 -1
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/pipes/field-error/field-error-content-pipe.js +4 -4
- package/esm2015/pipes/field-error/field-error-pipe.js +6 -6
- package/esm2015/pipes/filter-by-input/filter-by-input-with.pipe.js +2 -2
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +3 -3
- package/esm2015/pipes/filter-by-input/filter-by-input.pipe.js +2 -2
- package/esm2015/pipes/stringify/stringify.pipe.js +3 -3
- package/esm2015/pipes/stringify-content/stringify-content.pipe.js +2 -2
- package/esm2015/providers/month-formatter.provider.js +2 -2
- package/esm2015/providers/specific-dropdown-controllers.js +3 -3
- package/esm2015/tokens/calendar-data-stream.js +2 -2
- package/esm2015/tokens/date-inputs-value-transformers.js +4 -4
- package/esm2015/tokens/i18n.js +28 -28
- package/esm2015/tokens/items-handlers.js +2 -2
- package/esm2015/tokens/mobile-aware.js +2 -2
- package/esm2015/tokens/mobile-calendar.js +2 -2
- package/esm2015/tokens/month-formatter.js +2 -2
- package/esm2015/tokens/tab-margin.js +2 -2
- package/esm2015/tokens/tag-status.js +2 -2
- package/esm2015/tokens/validation-errors.js +2 -2
- package/esm2015/utils/dom/get-word-range.js +5 -5
- package/esm2015/utils/files/format-size.js +2 -2
- package/esm2015/utils/files/get-accept-array.js +2 -2
- package/esm2015/utils/format/string-hash-to-hsl.js +3 -3
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-time-pipe.js +6 -6
- package/esm2015/utils/mask/create-date-mask.js +5 -5
- package/esm2015/utils/mask/create-date-range-mask.js +2 -2
- package/esm2015/utils/mask/create-time-mask.js +4 -4
- package/esm2015/utils/math/horizontal-direction-to-number.js +3 -3
- package/esm2015/utils/miscellaneous/create-default-day-range-periods.js +7 -7
- package/esm2015/utils/miscellaneous/get-precision.js +2 -2
- package/esm2015/validators/unfinished.validator.js +2 -2
- package/esm5/abstract/input-slider.js +12 -12
- package/esm5/abstract/slider/slider.js +12 -12
- 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 +5 -5
- package/esm5/components/arrow/arrow.component.js +2 -2
- package/esm5/components/avatar/avatar-options.js +3 -3
- package/esm5/components/avatar/avatar.component.js +12 -12
- package/esm5/components/badge/badge.component.js +15 -15
- package/esm5/components/badged-content/badged-content.component.js +22 -22
- 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 +4 -4
- 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 +10 -10
- 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 +9 -9
- 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 +3 -3
- 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 +8 -8
- package/esm5/components/input-copy/input-copy.directive.js +2 -2
- package/esm5/components/input-count/input-count-options.js +6 -6
- package/esm5/components/input-count/input-count.component.js +12 -12
- 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 +21 -21
- package/esm5/components/input-number/input-number.directive.js +3 -3
- package/esm5/components/input-password/input-password-options.js +4 -4
- 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/input-phone.options.js +4 -4
- package/esm5/components/input-phone/input-phone.providers.js +3 -3
- package/esm5/components/input-phone-international/const/countries.js +215 -215
- package/esm5/components/input-phone-international/country-iso-code.js +1 -1
- package/esm5/components/input-phone-international/input-phone-international.component.js +14 -14
- package/esm5/components/input-phone-international/input-phone-international.options.js +2 -2
- package/esm5/components/input-phone-international/tokens/countries-masks.js +2 -2
- package/esm5/components/input-phone-international/utils/extract-value-from-event.js +2 -2
- package/esm5/components/input-range/input-range.component.js +17 -17
- package/esm5/components/input-slider/input-slider.component.js +35 -22
- package/esm5/components/input-tag/input-tag-options.js +3 -3
- package/esm5/components/input-tag/input-tag.component.js +23 -23
- package/esm5/components/input-time/input-time-options.js +6 -6
- 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-options.js +2 -2
- 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 +2 -2
- 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-options.js +3 -3
- package/esm5/components/multi-select/multi-select.component.js +10 -10
- package/esm5/components/multi-select-option/multi-select-option.component.js +3 -3
- 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 +3 -3
- 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/progress/utils/calculate-color-segments.js +2 -2
- package/esm5/components/progress/utils/progress-color-segments-async.pipe.js +2 -2
- package/esm5/components/progress/utils/progress-color-segments.pipe.js +2 -2
- package/esm5/components/radio/radio-options.js +3 -3
- package/esm5/components/radio/radio.component.js +7 -7
- package/esm5/components/radio-block/radio-block.component.js +10 -10
- 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-options.js +4 -4
- package/esm5/components/rating/rating.component.js +5 -5
- package/esm5/components/select/select-options.js +3 -3
- 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 +11 -11
- package/esm5/components/slider/helpers/slider-readonly.directive.js +15 -15
- package/esm5/components/slider/helpers/slider-thumb-label/slider-thumb-label.component.js +4 -4
- package/esm5/components/slider/slider-old.component.js +2 -2
- package/esm5/components/slider/slider-options.js +4 -4
- 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 +15 -15
- package/esm5/components/tabs/tab/tab.component.js +8 -8
- package/esm5/components/tabs/tab/tab.providers.js +4 -4
- package/esm5/components/tabs/tabs/tabs.component.js +13 -13
- package/esm5/components/tabs/tabs-options.js +2 -2
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +6 -6
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.providers.js +2 -2
- package/esm5/components/tabs/underline/underline.component.js +13 -13
- package/esm5/components/tag/tag-options.js +4 -4
- package/esm5/components/tag/tag.component.js +22 -22
- 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-options.js +5 -5
- 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 +4 -4
- 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/components/tree/misc/tree.tokens.js +9 -9
- package/esm5/constants/date-time-separator.js +2 -2
- package/esm5/constants/group-class-names.js +10 -10
- package/esm5/constants/icon-blank.js +2 -2
- package/esm5/constants/masks.js +7 -7
- package/esm5/constants/router-link-options.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 +13 -13
- package/esm5/directives/highlight/highlight.directive.js +11 -11
- package/esm5/directives/lazy-loading/lazy-loading.directive.js +12 -12
- 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/borders.js +1 -1
- package/esm5/enums/dropdown-position.js +1 -1
- package/esm5/enums/file-state.js +1 -1
- package/esm5/enums/marker-icon-mode.js +1 -1
- package/esm5/enums/status.js +1 -1
- package/esm5/enums/step-state.js +1 -1
- package/esm5/enums/text-align.js +1 -1
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm5/pipes/field-error/field-error-content-pipe.js +4 -4
- package/esm5/pipes/field-error/field-error-pipe.js +6 -6
- package/esm5/pipes/filter-by-input/filter-by-input-with.pipe.js +2 -2
- package/esm5/pipes/filter-by-input/filter-by-input.base.js +3 -3
- package/esm5/pipes/filter-by-input/filter-by-input.pipe.js +2 -2
- package/esm5/pipes/stringify/stringify.pipe.js +3 -3
- package/esm5/pipes/stringify-content/stringify-content.pipe.js +2 -2
- package/esm5/providers/month-formatter.provider.js +2 -2
- package/esm5/providers/specific-dropdown-controllers.js +3 -3
- package/esm5/tokens/calendar-data-stream.js +2 -2
- package/esm5/tokens/date-inputs-value-transformers.js +4 -4
- package/esm5/tokens/i18n.js +28 -28
- package/esm5/tokens/items-handlers.js +2 -2
- package/esm5/tokens/mobile-aware.js +2 -2
- package/esm5/tokens/mobile-calendar.js +2 -2
- package/esm5/tokens/month-formatter.js +2 -2
- package/esm5/tokens/tab-margin.js +2 -2
- package/esm5/tokens/tag-status.js +2 -2
- package/esm5/tokens/validation-errors.js +2 -2
- package/esm5/utils/dom/get-word-range.js +5 -5
- package/esm5/utils/files/format-size.js +2 -2
- package/esm5/utils/files/get-accept-array.js +2 -2
- package/esm5/utils/format/string-hash-to-hsl.js +3 -3
- package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +2 -2
- package/esm5/utils/mask/create-auto-corrected-time-pipe.js +6 -6
- package/esm5/utils/mask/create-date-mask.js +5 -5
- package/esm5/utils/mask/create-date-range-mask.js +2 -2
- package/esm5/utils/mask/create-time-mask.js +2 -2
- package/esm5/utils/math/horizontal-direction-to-number.js +3 -3
- package/esm5/utils/miscellaneous/create-default-day-range-periods.js +7 -7
- package/esm5/utils/miscellaneous/get-precision.js +2 -2
- package/esm5/validators/unfinished.validator.js +2 -2
- package/fesm2015/taiga-ui-kit-abstract.js +22 -22
- 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 +5 -5
- 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 +14 -14
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +21 -21
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +7 -7
- 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 +3 -3
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +18 -18
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +8 -8
- 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 +4 -4
- 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 +8 -8
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +19 -19
- 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 +22 -22
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +9 -9
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +230 -230
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +36 -36
- 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 +30 -22
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +24 -24
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +13 -13
- 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 +9 -9
- 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 +17 -17
- 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 +10 -10
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +26 -26
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -9
- 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 +8 -8
- 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 +7 -7
- 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 +6 -6
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +39 -39
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +25 -25
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +41 -41
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +24 -24
- 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 +11 -11
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +24 -24
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +18 -18
- 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 +12 -12
- 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 +8 -8
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify-content.js +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify.js +2 -2
- package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +3 -3
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +38 -38
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-dom.js +4 -4
- package/fesm2015/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-files.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +14 -14
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +7 -7
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-kit-validators.js +1 -1
- package/fesm2015/taiga-ui-kit-validators.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +22 -22
- 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 +5 -5
- 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 +14 -14
- package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badged-content.js +21 -21
- package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +7 -7
- 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 +3 -3
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-carousel.js +18 -18
- package/fesm5/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox-block.js +8 -8
- 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 +4 -4
- 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 +8 -8
- package/fesm5/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +19 -19
- 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 +22 -22
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +9 -9
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +230 -230
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +36 -36
- 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 +34 -22
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +24 -24
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +13 -13
- 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 +9 -9
- 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 +2 -2
- package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +17 -17
- 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 +10 -10
- package/fesm5/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +26 -26
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-radio-block.js +9 -9
- 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 +8 -8
- 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 +7 -7
- 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 +6 -6
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +39 -39
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +25 -25
- package/fesm5/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +41 -41
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +24 -24
- 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 +11 -11
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +24 -24
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +18 -18
- 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 +12 -12
- 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 +8 -8
- package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-filter-by-input.js +4 -4
- package/fesm5/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-stringify-content.js +1 -1
- package/fesm5/taiga-ui-kit-pipes-stringify-content.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-stringify.js +2 -2
- package/fesm5/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm5/taiga-ui-kit-providers.js +3 -3
- package/fesm5/taiga-ui-kit-providers.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +38 -38
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-dom.js +4 -4
- package/fesm5/taiga-ui-kit-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-files.js +2 -2
- package/fesm5/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-format.js +2 -2
- package/fesm5/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-mask.js +12 -12
- package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-math.js +2 -2
- package/fesm5/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js +7 -7
- package/fesm5/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-kit-validators.js +1 -1
- package/fesm5/taiga-ui-kit-validators.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-date.js","sources":["ng://@taiga-ui/kit/components/input-date/input-date.providers.ts","ng://@taiga-ui/kit/components/input-date/input-date.component.ts","ng://@taiga-ui/kit/components/input-date/input-date.directive.ts","ng://@taiga-ui/kit/components/input-date/input-date.module.ts","ng://@taiga-ui/kit/components/input-date/taiga-ui-kit-components-input-date.ts"],"sourcesContent":["import {forwardRef, Optional, Self} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiControlValueTransformer,\n TuiDay,\n} from '@taiga-ui/cdk';\nimport {LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {TUI_CALENDAR_DATA_STREAM, TUI_DATE_VALUE_TRANSFORMER} from '@taiga-ui/kit/tokens';\nimport {TuiReplayControlValueChangesFactory} from '@taiga-ui/kit/utils/miscellaneous';\nimport {Observable} from 'rxjs';\n\nimport {TuiInputDateComponent} from './input-date.component';\n\n// TODO: 3.0 remove in ivy compilation\nexport const DATE_STREAM_FACTORY = <T extends TuiDay>(\n control: NgControl | null,\n valueTransformer: TuiControlValueTransformer<T>,\n): Observable<T | null> | null =>\n TuiReplayControlValueChangesFactory<T>(control, valueTransformer);\n\nexport const TUI_INPUT_DATE_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputDateComponent),\n },\n {\n provide: TUI_CALENDAR_DATA_STREAM,\n deps: [\n [new Optional(), new Self(), NgControl],\n [new Optional(), TUI_DATE_VALUE_TRANSFORMER],\n ],\n useFactory: DATE_STREAM_FACTORY,\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputDateComponent),\n },\n LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostListener,\n Inject,\n Injector,\n Input,\n Optional,\n Self,\n Type,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n ALWAYS_FALSE_HANDLER,\n changeDateSeparator,\n DATE_FILLER_LENGTH,\n nullableSame,\n TUI_DATE_FORMAT,\n TUI_DATE_SEPARATOR,\n TUI_FIRST_DAY,\n TUI_IS_MOBILE,\n TUI_LAST_DAY,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n TuiControlValueTransformer,\n TuiDateMode,\n TuiDay,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiMonth,\n} from '@taiga-ui/cdk';\nimport {\n sizeBigger,\n TUI_DEFAULT_MARKER_HANDLER,\n TUI_TEXTFIELD_SIZE,\n TuiDialogService,\n TuiMarkerHandler,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldSizeDirective,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TuiNamedDay} from '@taiga-ui/kit/classes';\nimport {EMPTY_MASK} from '@taiga-ui/kit/constants';\nimport {\n TUI_DATE_TEXTS,\n TUI_DATE_VALUE_TRANSFORMER,\n TUI_MOBILE_CALENDAR,\n} from '@taiga-ui/kit/tokens';\nimport {\n tuiCreateAutoCorrectedDatePipe,\n tuiCreateDateMask,\n} from '@taiga-ui/kit/utils/mask';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskConfig} from 'angular2-text-mask';\nimport {Observable} from 'rxjs';\nimport {map, takeUntil} from 'rxjs/operators';\n\nimport {TUI_INPUT_DATE_PROVIDERS} from './input-date.providers';\n\n// @dynamic\n@Component({\n selector: 'tui-input-date',\n templateUrl: './input-date.template.html',\n styleUrls: ['./input-date.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_INPUT_DATE_PROVIDERS,\n})\nexport class TuiInputDateComponent\n extends AbstractTuiNullableControl<TuiDay>\n implements TuiWithOptionalMinMax<TuiDay>, TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private month: TuiMonth | null = null;\n\n private readonly textMaskOptions: TuiTextMaskOptions = {\n mask: tuiCreateDateMask(this.dateFormat, this.dateSeparator),\n pipe: tuiCreateAutoCorrectedDatePipe(this),\n guide: false,\n };\n\n @Input()\n @tuiDefaultProp()\n min = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n max = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n items: readonly TuiNamedDay[] = [];\n\n @Input()\n @tuiDefaultProp()\n defaultActiveYearMonth = TuiMonth.currentLocal();\n\n open = false;\n\n readonly type!: TuiContextWithImplicit<TuiActiveZoneDirective>;\n\n readonly filler$: Observable<string> = this.dateTexts$.pipe(\n map(dateTexts =>\n changeDateSeparator(dateTexts[this.dateFormat], this.dateSeparator),\n ),\n );\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(Injector) private readonly injector: Injector,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TuiDialogService) private readonly dialogService: TuiDialogService,\n @Optional()\n @Inject(TUI_MOBILE_CALENDAR)\n private readonly mobileCalendar: Type<object> | null,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_DATE_FORMAT) readonly dateFormat: TuiDateMode,\n @Inject(TUI_DATE_SEPARATOR) readonly dateSeparator: string,\n @Inject(TUI_DATE_TEXTS)\n readonly dateTexts$: Observable<Record<TuiDateMode, string>>,\n @Optional()\n @Inject(TUI_DATE_VALUE_TRANSFORMER)\n readonly valueTransformer: TuiControlValueTransformer<TuiDay | null> | null,\n ) {\n super(control, changeDetectorRef, valueTransformer);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.textfield ? this.textfield.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get computedMobile(): boolean {\n return this.isMobile && !!this.mobileCalendar;\n }\n\n get calendarIcon(): string {\n return sizeBigger(this.textfieldSize.size)\n ? 'tuiIconCalendarLarge'\n : 'tuiIconCalendar';\n }\n\n get computedValue(): string {\n const {value, nativeValue, activeItem} = this;\n\n if (activeItem) {\n return String(activeItem);\n }\n\n return value ? value.toString(this.dateFormat, this.dateSeparator) : nativeValue;\n }\n\n get computedActiveYearMonth(): TuiMonth {\n if (this.items[0] && this.value && this.value.daySame(this.items[0].day)) {\n return this.items[0].displayDay;\n }\n\n return this.month || this.value || this.defaultActiveYearMonth;\n }\n\n get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : '';\n }\n\n set nativeValue(value: string) {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n this.nativeFocusableElement.value = value;\n }\n\n get canOpen(): boolean {\n return this.interactive && !this.computedMobile;\n }\n\n get computedMask(): TextMaskConfig {\n return (this.activeItem\n ? EMPTY_MASK\n : this.textMaskOptions) as TuiTextMaskOptions as unknown as TextMaskConfig;\n }\n\n get activeItem(): TuiNamedDay | null {\n const {value} = this;\n\n return (value && this.items.find(item => item.day.daySame(value))) || null;\n }\n\n @HostListener('click')\n onClick(): void {\n if (!this.isMobile) {\n this.open = !this.open;\n }\n }\n\n getComputedFiller(filler: string): string {\n return this.activeItem ? '' : filler;\n }\n\n onMobileClick(): void {\n if (!this.mobileCalendar) {\n this.open = !this.open;\n\n return;\n }\n\n this.dialogService\n .open<TuiDay>(new PolymorpheusComponent(this.mobileCalendar, this.injector), {\n size: 'fullscreen',\n closeable: false,\n data: {\n single: true,\n min: this.min,\n max: this.max,\n disabledItemHandler: this.disabledItemHandler,\n },\n })\n .pipe(takeUntil(this.destroy$))\n .subscribe(value => {\n this.updateValue(value);\n });\n }\n\n onValueChange(value: string): void {\n if (this.control) {\n this.control.updateValueAndValidity({emitEvent: false});\n }\n\n if (!value) {\n this.onOpenChange(true);\n }\n\n this.updateValue(\n value.length !== DATE_FILLER_LENGTH\n ? null\n : TuiDay.normalizeParse(value, this.dateFormat),\n );\n }\n\n onDayClick(value: TuiDay): void {\n this.updateValue(value);\n this.open = false;\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onMonthChange(month: TuiMonth): void {\n this.month = month;\n }\n\n onOpenChange(open: boolean): void {\n this.open = open;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n setDisabledState(): void {\n super.setDisabledState();\n this.open = false;\n }\n\n writeValue(value: TuiDay | null): void {\n super.writeValue(value);\n this.nativeValue = value ? this.computedValue : '';\n }\n\n protected valueIdenticalComparator(\n oldValue: TuiDay | null,\n newValue: TuiDay | null,\n ): boolean {\n return nullableSame(oldValue, newValue, (a, b) => a.daySame(b));\n }\n}\n","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputDateComponent} from './input-date.component';\n\n@Directive({\n selector: 'tui-input-date',\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputDateDirective),\n },\n ],\n})\nexport class TuiInputDateDirective extends TuiAbstractTextfieldHost<TuiInputDateComponent> {\n get value(): string {\n return this.host.computedValue;\n }\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n input.inputMode = 'numeric';\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {\n TuiCalendarModule,\n TuiHostedDropdownModule,\n TuiLinkModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputDateComponent} from './input-date.component';\nimport {TuiInputDateDirective} from './input-date.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n PolymorpheusModule,\n TuiPreventDefaultModule,\n TuiCalendarModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiHostedDropdownModule,\n TuiPrimitiveTextfieldModule,\n TuiValueAccessorModule,\n TuiLetModule,\n TuiTextfieldControllerModule,\n ],\n declarations: [TuiInputDateComponent, TuiInputDateDirective],\n exports: [TuiInputDateComponent, TuiInputDateDirective, TuiTextfieldComponent],\n})\nexport class TuiInputDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeA;MACa,mBAAmB,GAAG,CAC/B,OAAyB,EACzB,gBAA+C,KAE/C,mCAAmC,CAAI,OAAO,EAAE,gBAAgB,EAAE;MAEzD,wBAAwB,GAAG;IACpC;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;KACvD;IACD;QACI,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE;YACF,CAAC,IAAI,QAAQ,EAAE,EAAE,IAAI,IAAI,EAAE,EAAE,SAAS,CAAC;YACvC,CAAC,IAAI,QAAQ,EAAE,EAAE,0BAA0B,CAAC;SAC/C;QACD,UAAU,EAAE,mBAAmB;KAClC;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;KACvD;IACD,yCAAyC;;;ACyB7C;IAQa,qBAAqB,GAAlC,MAAa,qBACT,SAAQ,0BAAkC;IAgD1C,YAII,OAAyB,EACE,iBAAoC,EAC5B,QAAkB,EACb,QAAiB,EACd,aAA+B,EAGzD,cAAmC,EAEnC,aAAwC,EACvB,UAAuB,EACpB,aAAq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C;KACjF,CAAC;GACW,kBAAkB,CAAG;;ACrClC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-date.js","sources":["ng://@taiga-ui/kit/components/input-date/input-date.providers.ts","ng://@taiga-ui/kit/components/input-date/input-date.component.ts","ng://@taiga-ui/kit/components/input-date/input-date.directive.ts","ng://@taiga-ui/kit/components/input-date/input-date.module.ts","ng://@taiga-ui/kit/components/input-date/taiga-ui-kit-components-input-date.ts"],"sourcesContent":["import {forwardRef, Optional, Self} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiControlValueTransformer,\n TuiDay,\n} from '@taiga-ui/cdk';\nimport {LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {TUI_CALENDAR_DATA_STREAM, TUI_DATE_VALUE_TRANSFORMER} from '@taiga-ui/kit/tokens';\nimport {TuiReplayControlValueChangesFactory} from '@taiga-ui/kit/utils/miscellaneous';\nimport {Observable} from 'rxjs';\n\nimport {TuiInputDateComponent} from './input-date.component';\n\n// TODO: 3.0 remove in ivy compilation\nexport const DATE_STREAM_FACTORY = <T extends TuiDay>(\n control: NgControl | null,\n valueTransformer: TuiControlValueTransformer<T>,\n): Observable<T | null> | null =>\n TuiReplayControlValueChangesFactory<T>(control, valueTransformer);\n\nexport const TUI_INPUT_DATE_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputDateComponent),\n },\n {\n provide: TUI_CALENDAR_DATA_STREAM,\n deps: [\n [new Optional(), new Self(), NgControl],\n [new Optional(), TUI_DATE_VALUE_TRANSFORMER],\n ],\n useFactory: DATE_STREAM_FACTORY,\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputDateComponent),\n },\n LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostListener,\n Inject,\n Injector,\n Input,\n Optional,\n Self,\n Type,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n ALWAYS_FALSE_HANDLER,\n changeDateSeparator,\n DATE_FILLER_LENGTH,\n nullableSame,\n TUI_DATE_FORMAT,\n TUI_DATE_SEPARATOR,\n TUI_FIRST_DAY,\n TUI_IS_MOBILE,\n TUI_LAST_DAY,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n TuiControlValueTransformer,\n TuiDateMode,\n TuiDay,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiMonth,\n} from '@taiga-ui/cdk';\nimport {\n sizeBigger,\n TUI_DEFAULT_MARKER_HANDLER,\n TUI_TEXTFIELD_SIZE,\n TuiDialogService,\n TuiMarkerHandler,\n TuiPrimitiveTextfieldComponent,\n TuiTextfieldSizeDirective,\n TuiTextMaskOptions,\n TuiWithOptionalMinMax,\n} from '@taiga-ui/core';\nimport {TuiNamedDay} from '@taiga-ui/kit/classes';\nimport {EMPTY_MASK} from '@taiga-ui/kit/constants';\nimport {\n TUI_DATE_TEXTS,\n TUI_DATE_VALUE_TRANSFORMER,\n TUI_MOBILE_CALENDAR,\n} from '@taiga-ui/kit/tokens';\nimport {\n tuiCreateAutoCorrectedDatePipe,\n tuiCreateDateMask,\n} from '@taiga-ui/kit/utils/mask';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskConfig} from 'angular2-text-mask';\nimport {Observable} from 'rxjs';\nimport {map, takeUntil} from 'rxjs/operators';\n\nimport {TUI_INPUT_DATE_PROVIDERS} from './input-date.providers';\n\n// @dynamic\n@Component({\n selector: `tui-input-date`,\n templateUrl: `./input-date.template.html`,\n styleUrls: [`./input-date.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_INPUT_DATE_PROVIDERS,\n})\nexport class TuiInputDateComponent\n extends AbstractTuiNullableControl<TuiDay>\n implements TuiWithOptionalMinMax<TuiDay>, TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private month: TuiMonth | null = null;\n\n private readonly textMaskOptions: TuiTextMaskOptions = {\n mask: tuiCreateDateMask(this.dateFormat, this.dateSeparator),\n pipe: tuiCreateAutoCorrectedDatePipe(this),\n guide: false,\n };\n\n @Input()\n @tuiDefaultProp()\n min = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n max = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n items: readonly TuiNamedDay[] = [];\n\n @Input()\n @tuiDefaultProp()\n defaultActiveYearMonth = TuiMonth.currentLocal();\n\n open = false;\n\n readonly type!: TuiContextWithImplicit<TuiActiveZoneDirective>;\n\n readonly filler$: Observable<string> = this.dateTexts$.pipe(\n map(dateTexts =>\n changeDateSeparator(dateTexts[this.dateFormat], this.dateSeparator),\n ),\n );\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(Injector) private readonly injector: Injector,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TuiDialogService) private readonly dialogService: TuiDialogService,\n @Optional()\n @Inject(TUI_MOBILE_CALENDAR)\n private readonly mobileCalendar: Type<object> | null,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_DATE_FORMAT) readonly dateFormat: TuiDateMode,\n @Inject(TUI_DATE_SEPARATOR) readonly dateSeparator: string,\n @Inject(TUI_DATE_TEXTS)\n readonly dateTexts$: Observable<Record<TuiDateMode, string>>,\n @Optional()\n @Inject(TUI_DATE_VALUE_TRANSFORMER)\n readonly valueTransformer: TuiControlValueTransformer<TuiDay | null> | null,\n ) {\n super(control, changeDetectorRef, valueTransformer);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.textfield ? this.textfield.nativeFocusableElement : null;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get computedMobile(): boolean {\n return this.isMobile && !!this.mobileCalendar;\n }\n\n get calendarIcon(): string {\n return sizeBigger(this.textfieldSize.size)\n ? `tuiIconCalendarLarge`\n : `tuiIconCalendar`;\n }\n\n get computedValue(): string {\n const {value, nativeValue, activeItem} = this;\n\n if (activeItem) {\n return String(activeItem);\n }\n\n return value ? value.toString(this.dateFormat, this.dateSeparator) : nativeValue;\n }\n\n get computedActiveYearMonth(): TuiMonth {\n if (this.items[0] && this.value && this.value.daySame(this.items[0].day)) {\n return this.items[0].displayDay;\n }\n\n return this.month || this.value || this.defaultActiveYearMonth;\n }\n\n get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : ``;\n }\n\n set nativeValue(value: string) {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n this.nativeFocusableElement.value = value;\n }\n\n get canOpen(): boolean {\n return this.interactive && !this.computedMobile;\n }\n\n get computedMask(): TextMaskConfig {\n return (this.activeItem\n ? EMPTY_MASK\n : this.textMaskOptions) as TuiTextMaskOptions as unknown as TextMaskConfig;\n }\n\n get activeItem(): TuiNamedDay | null {\n const {value} = this;\n\n return (value && this.items.find(item => item.day.daySame(value))) || null;\n }\n\n @HostListener(`click`)\n onClick(): void {\n if (!this.isMobile) {\n this.open = !this.open;\n }\n }\n\n getComputedFiller(filler: string): string {\n return this.activeItem ? `` : filler;\n }\n\n onMobileClick(): void {\n if (!this.mobileCalendar) {\n this.open = !this.open;\n\n return;\n }\n\n this.dialogService\n .open<TuiDay>(new PolymorpheusComponent(this.mobileCalendar, this.injector), {\n size: `fullscreen`,\n closeable: false,\n data: {\n single: true,\n min: this.min,\n max: this.max,\n disabledItemHandler: this.disabledItemHandler,\n },\n })\n .pipe(takeUntil(this.destroy$))\n .subscribe(value => {\n this.updateValue(value);\n });\n }\n\n onValueChange(value: string): void {\n if (this.control) {\n this.control.updateValueAndValidity({emitEvent: false});\n }\n\n if (!value) {\n this.onOpenChange(true);\n }\n\n this.updateValue(\n value.length !== DATE_FILLER_LENGTH\n ? null\n : TuiDay.normalizeParse(value, this.dateFormat),\n );\n }\n\n onDayClick(value: TuiDay): void {\n this.updateValue(value);\n this.open = false;\n }\n\n onHovered(hovered: boolean): void {\n this.updateHovered(hovered);\n }\n\n onMonthChange(month: TuiMonth): void {\n this.month = month;\n }\n\n onOpenChange(open: boolean): void {\n this.open = open;\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n setDisabledState(): void {\n super.setDisabledState();\n this.open = false;\n }\n\n writeValue(value: TuiDay | null): void {\n super.writeValue(value);\n this.nativeValue = value ? this.computedValue : ``;\n }\n\n protected valueIdenticalComparator(\n oldValue: TuiDay | null,\n newValue: TuiDay | null,\n ): boolean {\n return nullableSame(oldValue, newValue, (a, b) => a.daySame(b));\n }\n}\n","import {Directive, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputDateComponent} from './input-date.component';\n\n@Directive({\n selector: `tui-input-date`,\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputDateDirective),\n },\n ],\n})\nexport class TuiInputDateDirective extends TuiAbstractTextfieldHost<TuiInputDateComponent> {\n get value(): string {\n return this.host.computedValue;\n }\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n input.inputMode = `numeric`;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLetModule, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {\n TuiCalendarModule,\n TuiHostedDropdownModule,\n TuiLinkModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputDateComponent} from './input-date.component';\nimport {TuiInputDateDirective} from './input-date.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n PolymorpheusModule,\n TuiPreventDefaultModule,\n TuiCalendarModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiHostedDropdownModule,\n TuiPrimitiveTextfieldModule,\n TuiValueAccessorModule,\n TuiLetModule,\n TuiTextfieldControllerModule,\n ],\n declarations: [TuiInputDateComponent, TuiInputDateDirective],\n exports: [TuiInputDateComponent, TuiInputDateDirective, TuiTextfieldComponent],\n})\nexport class TuiInputDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeA;MACa,mBAAmB,GAAG,CAC/B,OAAyB,EACzB,gBAA+C,KAE/C,mCAAmC,CAAI,OAAO,EAAE,gBAAgB,EAAE;MAEzD,wBAAwB,GAAG;IACpC;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;KACvD;IACD;QACI,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE;YACF,CAAC,IAAI,QAAQ,EAAE,EAAE,IAAI,IAAI,EAAE,EAAE,SAAS,CAAC;YACvC,CAAC,IAAI,QAAQ,EAAE,EAAE,0BAA0B,CAAC;SAC/C;QACD,UAAU,EAAE,mBAAmB;KAClC;IACD;QACI,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,UAAU,CAA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iBAAiB;YACjB,YAAY;YACZ,aAAa;YACb,uBAAuB;YACvB,2BAA2B;YAC3B,sBAAsB;YACtB,YAAY;YACZ,4BAA4B;SAC/B;QACD,YAAY,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;QAC5D,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,CAAC;KACjF,CAAC;GACW,kBAAkB,CAAG;;ACrClC;;;;;;"}
|
|
@@ -18,19 +18,19 @@ let TuiFileOldComponent = class TuiFileOldComponent {
|
|
|
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();
|
|
27
27
|
this.focused = false;
|
|
28
28
|
}
|
|
29
29
|
get preview() {
|
|
30
|
-
return this.isBig ? this.createPreview(this.file, this.sanitizer) :
|
|
30
|
+
return this.isBig ? this.createPreview(this.file, this.sanitizer) : ``;
|
|
31
31
|
}
|
|
32
32
|
get isBig() {
|
|
33
|
-
return this.size ===
|
|
33
|
+
return this.size === `l`;
|
|
34
34
|
}
|
|
35
35
|
get isLoading() {
|
|
36
36
|
return this.state === "loading" /* Loading */;
|
|
@@ -43,25 +43,25 @@ let TuiFileOldComponent = class TuiFileOldComponent {
|
|
|
43
43
|
}
|
|
44
44
|
get icon() {
|
|
45
45
|
if (this.state === "normal" /* Normal */ && this.isBig) {
|
|
46
|
-
return
|
|
46
|
+
return `tuiIconDefaultDocLarge`;
|
|
47
47
|
}
|
|
48
48
|
switch (this.state) {
|
|
49
49
|
case "deleted" /* Deleted */:
|
|
50
|
-
return
|
|
50
|
+
return `tuiIconTrashLarge`;
|
|
51
51
|
case "error" /* Error */:
|
|
52
|
-
return
|
|
52
|
+
return `tuiIconAlertCircleLarge`;
|
|
53
53
|
default:
|
|
54
|
-
return
|
|
54
|
+
return `tuiIconCheckCircleLarge`;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
get src() {
|
|
58
|
-
return this.file.src ||
|
|
58
|
+
return this.file.src || ``;
|
|
59
59
|
}
|
|
60
60
|
get name() {
|
|
61
|
-
return this.file.name.split(
|
|
61
|
+
return this.file.name.split(`.`).slice(0, -1).join(`.`);
|
|
62
62
|
}
|
|
63
63
|
get type() {
|
|
64
|
-
return `.${this.file.name.split(
|
|
64
|
+
return `.${this.file.name.split(`.`).pop()}` || ``;
|
|
65
65
|
}
|
|
66
66
|
get content$() {
|
|
67
67
|
return this.calculateContent$(this.state, this.file, this.fileTexts$);
|
|
@@ -78,7 +78,7 @@ let TuiFileOldComponent = class TuiFileOldComponent {
|
|
|
78
78
|
calculateContent$(state, file, fileTexts$) {
|
|
79
79
|
return state === "error" /* Error */ && !file.content
|
|
80
80
|
? fileTexts$.pipe(map(texts => texts.loadingError))
|
|
81
|
-
: of(this.file.content ||
|
|
81
|
+
: of(this.file.content || ``);
|
|
82
82
|
}
|
|
83
83
|
calculateFileSize$(file, units$) {
|
|
84
84
|
return units$.pipe(map(units => formatSize(units, file.size)));
|
|
@@ -88,10 +88,10 @@ let TuiFileOldComponent = class TuiFileOldComponent {
|
|
|
88
88
|
return file.src;
|
|
89
89
|
}
|
|
90
90
|
// TODO: iframe warning
|
|
91
|
-
if (file instanceof File && file.type && file.type.startsWith(
|
|
91
|
+
if (file instanceof File && file.type && file.type.startsWith(`image/`)) {
|
|
92
92
|
return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return ``;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
TuiFileOldComponent.ctorParameters = () => [
|
|
@@ -124,10 +124,10 @@ __decorate([
|
|
|
124
124
|
Output()
|
|
125
125
|
], TuiFileOldComponent.prototype, "fileRemoved", void 0);
|
|
126
126
|
__decorate([
|
|
127
|
-
HostBinding(
|
|
127
|
+
HostBinding(`class._focused`)
|
|
128
128
|
], TuiFileOldComponent.prototype, "focused", void 0);
|
|
129
129
|
__decorate([
|
|
130
|
-
HostBinding(
|
|
130
|
+
HostBinding(`class._link`)
|
|
131
131
|
], TuiFileOldComponent.prototype, "src", null);
|
|
132
132
|
__decorate([
|
|
133
133
|
tuiPure
|
|
@@ -140,7 +140,7 @@ __decorate([
|
|
|
140
140
|
], TuiFileOldComponent.prototype, "createPreview", null);
|
|
141
141
|
TuiFileOldComponent = __decorate([
|
|
142
142
|
Component({
|
|
143
|
-
selector:
|
|
143
|
+
selector: `tui-file`,
|
|
144
144
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
145
145
|
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=\"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=\"preview\"\n [class.preview_big]=\"isBig\"\n >\n <img\n *ngIf=\"preview && (fileTexts$ | async) as texts; else loader\"\n automation-id=\"tui-file__preview\"\n class=\"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=\"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=\"icon\"\n [class.icon_deleted]=\"isDeleted\"\n [class.icon_error]=\"isError\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </div>\n <div class=\"wrapper\">\n <div class=\"text\">\n <div\n automation-id=\"tui-file__name\"\n class=\"name\"\n >\n {{ name }}\n </div>\n <div\n automation-id=\"tui-file__type\"\n class=\"type\"\n >\n {{ type }}\n </div>\n <div\n *ngIf=\"showSize && (fileSize$ | async) as fileSize\"\n automation-id=\"tui-file__size\"\n class=\"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=\"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=\"remove\"\n [title]=\"texts.remove\"\n [class.remove_mobile]=\"isMobile\"\n (click.prevent)=\"onRemoveClick()\"\n ></button>\n </ng-container>\n</ng-template>\n",
|
|
146
146
|
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 .remove{opacity:1}:host._focused{border-color:var(--tui-focus);box-shadow:0 0 0 1px inset var(--tui-focus)}.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)}.link:hover{background-color:var(--tui-base-02)}.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)}.preview_big{width:4rem;height:4rem;margin-right:1rem}.preview_big:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';background:#333;opacity:.08}.image{max-width:100%;max-height:100%}.loader{position:absolute;top:0;left:0;width:100%;height:100%}.icon{position:absolute;top:0;left:0;width:100%;height:100%;color:var(--tui-success-fill)}.icon_error{color:var(--tui-error-fill)}.icon_deleted{color:var(--tui-base-06)}.remove{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem;opacity:0}.remove:focus,.remove_mobile{opacity:1}.wrapper{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.text{display:flex}.size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-left:.5rem}.type{flex-shrink:0}.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content{font:var(--tui-font-text-s);color:var(--tui-error-fill)}"]
|
|
@@ -162,11 +162,11 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
162
162
|
this.mode$ = mode$;
|
|
163
163
|
this.units$ = units$;
|
|
164
164
|
this.dataTransfer = null;
|
|
165
|
-
this.link =
|
|
166
|
-
this.label =
|
|
167
|
-
this.accept =
|
|
165
|
+
this.link = ``;
|
|
166
|
+
this.label = ``;
|
|
167
|
+
this.accept = ``;
|
|
168
168
|
this.multiple = false;
|
|
169
|
-
this.size =
|
|
169
|
+
this.size = `m`;
|
|
170
170
|
this.showSize = true;
|
|
171
171
|
this.maxFileSize = DEFAULT_MAX_SIZE;
|
|
172
172
|
this.loadingFiles = [];
|
|
@@ -188,7 +188,7 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
188
188
|
// @bad TODO: 3.0 refactor after IE is dropped
|
|
189
189
|
get fileDragged() {
|
|
190
190
|
return (!!this.dataTransfer &&
|
|
191
|
-
Array.prototype.indexOf.call(this.dataTransfer.types,
|
|
191
|
+
Array.prototype.indexOf.call(this.dataTransfer.types, `Files`) !== -1);
|
|
192
192
|
}
|
|
193
193
|
get acceptArray() {
|
|
194
194
|
return this.getAcceptArray(this.accept);
|
|
@@ -217,7 +217,7 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
217
217
|
// TODO: refactor i18n messages
|
|
218
218
|
onFilesSelected(input, texts, units) {
|
|
219
219
|
this.processSelectedFiles(input.files, texts, units);
|
|
220
|
-
input.value =
|
|
220
|
+
input.value = ``;
|
|
221
221
|
}
|
|
222
222
|
onDropped(event, texts, units) {
|
|
223
223
|
this.processSelectedFiles(event.files, texts, units);
|
|
@@ -232,24 +232,24 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
232
232
|
this.updateRejectedFiles(this.rejectedFiles.filter(file => file !== removedFile));
|
|
233
233
|
}
|
|
234
234
|
getAppearance(mode) {
|
|
235
|
-
return mode === null ?
|
|
235
|
+
return mode === null ? `` : "outline" /* Outline */;
|
|
236
236
|
}
|
|
237
237
|
computeLink$(fileDragged, multiple, link) {
|
|
238
238
|
if (fileDragged) {
|
|
239
|
-
return of(
|
|
239
|
+
return of(``);
|
|
240
240
|
}
|
|
241
|
-
return this.inputFileTexts$.pipe(map(texts => multiple && link ===
|
|
241
|
+
return this.inputFileTexts$.pipe(map(texts => multiple && link === ``
|
|
242
242
|
? texts.defaultLinkMultiple
|
|
243
243
|
: link || texts.defaultLinkSingle));
|
|
244
244
|
}
|
|
245
245
|
computeLabel$(isMobile, fileDragged, multiple, label) {
|
|
246
246
|
if (isMobile) {
|
|
247
|
-
return of(
|
|
247
|
+
return of(``);
|
|
248
248
|
}
|
|
249
249
|
if (fileDragged) {
|
|
250
250
|
return this.inputFileTexts$.pipe(map(texts => (multiple ? texts.dropMultiple : texts.drop)));
|
|
251
251
|
}
|
|
252
|
-
return this.inputFileTexts$.pipe(map(texts => multiple && label ===
|
|
252
|
+
return this.inputFileTexts$.pipe(map(texts => multiple && label === ``
|
|
253
253
|
? texts.defaultLabelMultiple
|
|
254
254
|
: label || texts.defaultLabelSingle));
|
|
255
255
|
}
|
|
@@ -268,7 +268,7 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
268
268
|
getAcceptArray(accept) {
|
|
269
269
|
return accept
|
|
270
270
|
.toLowerCase()
|
|
271
|
-
.split(
|
|
271
|
+
.split(`,`)
|
|
272
272
|
.map(format => format.trim());
|
|
273
273
|
}
|
|
274
274
|
processSelectedFiles(files, texts, units) {
|
|
@@ -302,11 +302,11 @@ let TuiInputFileComponent = TuiInputFileComponent_1 = class TuiInputFileComponen
|
|
|
302
302
|
if (!this.accept) {
|
|
303
303
|
return true;
|
|
304
304
|
}
|
|
305
|
-
const extension = `.${(file.name.split(
|
|
305
|
+
const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;
|
|
306
306
|
return this.acceptArray.some(format => format === extension ||
|
|
307
307
|
format === file.type ||
|
|
308
|
-
(format.split(
|
|
309
|
-
file.type.split(
|
|
308
|
+
(format.split(`/`)[1] === `*` &&
|
|
309
|
+
file.type.split(`/`)[0] === format.split(`/`)[0]));
|
|
310
310
|
}
|
|
311
311
|
updateRejectedFiles(rejectedFiles) {
|
|
312
312
|
this.rejectedFiles = rejectedFiles;
|
|
@@ -361,7 +361,7 @@ __decorate([
|
|
|
361
361
|
Output()
|
|
362
362
|
], TuiInputFileComponent.prototype, "rejectedFilesChange", void 0);
|
|
363
363
|
__decorate([
|
|
364
|
-
ViewChild(
|
|
364
|
+
ViewChild(`input`)
|
|
365
365
|
], TuiInputFileComponent.prototype, "input", void 0);
|
|
366
366
|
__decorate([
|
|
367
367
|
tuiPure
|
|
@@ -383,7 +383,7 @@ __decorate([
|
|
|
383
383
|
], TuiInputFileComponent.prototype, "getAcceptArray", null);
|
|
384
384
|
TuiInputFileComponent = TuiInputFileComponent_1 = __decorate([
|
|
385
385
|
Component({
|
|
386
|
-
selector:
|
|
386
|
+
selector: `tui-input-file`,
|
|
387
387
|
template: "<tui-wrapper\n *ngIf=\"multiple || !value\"\n class=\"wrapper\"\n [class.wrapper_mobile]=\"isMobile\"\n [class.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=\"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=\"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=\"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=\"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",
|
|
388
388
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
389
389
|
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;IAOa,mBAAmB,GAAhC,MAAa,mBAAmB;IA2B5B,YACoC,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,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;KAC1E;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC;KAC5B;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,KAAK,6BAA0B;KAC9C;IAED,IAAI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G;AAArB,kBAAkB;IAtB9B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,YAAY;YACZ,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;YACf,uBAAuB;YACvB,cAAc;SACjB;QACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;QAC1D,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;AC/ClC;;;;;;"}
|
|
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;IAOa,mBAAmB,GAAhC,MAAa,mBAAmB;IA2B5B,YACoC,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,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;KAC1E;I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AM,CAAC,QAAQ,CAAC,CAAA;IAChB,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;GAxEjC,qBAAqB,CA4TjC;;ICrUY,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAtB9B,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,YAAY;YACZ,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;YACf,uBAAuB;YACvB,cAAc;SACjB;QACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;QAC1D,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;AC/ClC;;;;;;"}
|
|
@@ -21,11 +21,11 @@ let TuiInputFilesComponent = TuiInputFilesComponent_1 = class TuiInputFilesCompo
|
|
|
21
21
|
this.inputFileTexts$ = inputFileTexts$;
|
|
22
22
|
this.units$ = units$;
|
|
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
|
}
|
|
@@ -48,7 +48,7 @@ let TuiInputFilesComponent = TuiInputFilesComponent_1 = class TuiInputFilesCompo
|
|
|
48
48
|
}
|
|
49
49
|
get fileDragged() {
|
|
50
50
|
var _a;
|
|
51
|
-
return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes(
|
|
51
|
+
return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes(`Files`));
|
|
52
52
|
}
|
|
53
53
|
get arrayValue() {
|
|
54
54
|
return this.getValueArray(this.value);
|
|
@@ -64,7 +64,7 @@ let TuiInputFilesComponent = TuiInputFilesComponent_1 = class TuiInputFilesCompo
|
|
|
64
64
|
}
|
|
65
65
|
onFilesSelected(input, texts, units) {
|
|
66
66
|
this.processSelectedFiles(input.files, texts, units);
|
|
67
|
-
input.value =
|
|
67
|
+
input.value = ``;
|
|
68
68
|
}
|
|
69
69
|
onDropped(event, texts, units) {
|
|
70
70
|
this.processSelectedFiles(event.files, texts, units);
|
|
@@ -77,19 +77,19 @@ let TuiInputFilesComponent = TuiInputFilesComponent_1 = class TuiInputFilesCompo
|
|
|
77
77
|
}
|
|
78
78
|
computeLink$(fileDragged, multiple, link) {
|
|
79
79
|
return fileDragged
|
|
80
|
-
? of(
|
|
81
|
-
: this.inputFileTexts$.pipe(map(texts => multiple && link ===
|
|
80
|
+
? of(``)
|
|
81
|
+
: this.inputFileTexts$.pipe(map(texts => multiple && link === ``
|
|
82
82
|
? texts.defaultLinkMultiple
|
|
83
83
|
: link || texts.defaultLinkSingle));
|
|
84
84
|
}
|
|
85
85
|
computeLabel$(isMobile, fileDragged, multiple, label) {
|
|
86
86
|
if (isMobile) {
|
|
87
|
-
return of(
|
|
87
|
+
return of(``);
|
|
88
88
|
}
|
|
89
89
|
if (fileDragged) {
|
|
90
90
|
return this.inputFileTexts$.pipe(map(texts => (multiple ? texts.dropMultiple : texts.drop)));
|
|
91
91
|
}
|
|
92
|
-
return this.inputFileTexts$.pipe(map(texts => multiple && label ===
|
|
92
|
+
return this.inputFileTexts$.pipe(map(texts => multiple && label === ``
|
|
93
93
|
? texts.defaultLabelMultiple
|
|
94
94
|
: label || texts.defaultLabelSingle));
|
|
95
95
|
}
|
|
@@ -133,11 +133,11 @@ let TuiInputFilesComponent = TuiInputFilesComponent_1 = class TuiInputFilesCompo
|
|
|
133
133
|
if (!this.accept) {
|
|
134
134
|
return true;
|
|
135
135
|
}
|
|
136
|
-
const extension = `.${(file.name.split(
|
|
136
|
+
const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;
|
|
137
137
|
return getAcceptArray(this.accept).some(format => format === extension ||
|
|
138
138
|
format === file.type ||
|
|
139
|
-
(format.split(
|
|
140
|
-
file.type.split(
|
|
139
|
+
(format.split(`/`)[1] === `*` &&
|
|
140
|
+
file.type.split(`/`)[0] === format.split(`/`)[0]));
|
|
141
141
|
}
|
|
142
142
|
rejectFiles(rejectedFiles) {
|
|
143
143
|
this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);
|
|
@@ -151,7 +151,7 @@ TuiInputFilesComponent.ctorParameters = () => [
|
|
|
151
151
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_DIGITAL_INFORMATION_UNITS,] }] }
|
|
152
152
|
];
|
|
153
153
|
__decorate([
|
|
154
|
-
ViewChild(
|
|
154
|
+
ViewChild(`input`)
|
|
155
155
|
], TuiInputFilesComponent.prototype, "input", void 0);
|
|
156
156
|
__decorate([
|
|
157
157
|
Input(),
|
|
@@ -191,7 +191,7 @@ __decorate([
|
|
|
191
191
|
], TuiInputFilesComponent.prototype, "getValueArray", null);
|
|
192
192
|
TuiInputFilesComponent = TuiInputFilesComponent_1 = __decorate([
|
|
193
193
|
Component({
|
|
194
|
-
selector:
|
|
194
|
+
selector: `tui-input-files`,
|
|
195
195
|
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 *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 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 (mousedown.prevent.silent)=\"(0)\"\n />\n </ng-container>\n </label>\n</tui-wrapper>\n",
|
|
196
196
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
197
197
|
encapsulation: ViewEncapsulation.None,
|