@taiga-ui/kit 2.23.0 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/bundles/taiga-ui-kit-components-accordion.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +16 -12
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +51 -15
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +23 -14
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +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 +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +0 -2
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.min.js.map +1 -1
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/action/taiga-ui-kit-components-action.metadata.json +1 -1
- package/components/avatar/taiga-ui-kit-components-avatar.metadata.json +1 -1
- package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
- package/components/badged-content/taiga-ui-kit-components-badged-content.metadata.json +1 -1
- package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
- package/components/calendar-month/taiga-ui-kit-components-calendar-month.metadata.json +1 -1
- package/components/calendar-range/taiga-ui-kit-components-calendar-range.metadata.json +1 -1
- package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
- package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
- package/components/filter/taiga-ui-kit-components-filter.metadata.json +1 -1
- package/components/input-copy/taiga-ui-kit-components-input-copy.metadata.json +1 -1
- package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
- package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
- package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
- package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
- package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
- package/components/input-inline/taiga-ui-kit-components-input-inline.metadata.json +1 -1
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
- package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
- package/components/line-clamp/taiga-ui-kit-components-line-clamp.metadata.json +1 -1
- package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
- package/components/multi-select-option/multi-select-option.component.d.ts +1 -1
- package/components/multi-select-option/taiga-ui-kit-components-multi-select-option.metadata.json +1 -1
- package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
- package/components/progress/index.d.ts +2 -0
- package/components/progress/pipes/abstract-color-segments.d.ts +9 -0
- package/components/progress/pipes/progress-color-segments-async.pipe.d.ts +5 -0
- package/components/progress/pipes/progress-color-segments.pipe.d.ts +7 -6
- package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -1
- package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/select-option/select-option.component.d.ts +4 -2
- package/components/select-option/taiga-ui-kit-components-select-option.metadata.json +1 -1
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/stepper/taiga-ui-kit-components-stepper.metadata.json +1 -1
- package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
- package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/components/tree/taiga-ui-kit-components-tree.metadata.json +1 -1
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm2015/components/accordion/accordion.component.js +1 -1
- package/esm2015/components/action/action.component.js +1 -1
- package/esm2015/components/avatar/avatar.component.js +2 -2
- package/esm2015/components/badge/badge.component.js +2 -2
- package/esm2015/components/badged-content/badged-content.component.js +1 -1
- package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm2015/components/calendar-month/calendar-month.component.js +2 -2
- package/esm2015/components/calendar-range/calendar-range.component.js +2 -2
- package/esm2015/components/combo-box/combo-box.component.js +1 -1
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
- package/esm2015/components/filter/filter.component.js +1 -1
- package/esm2015/components/input-copy/input-copy.component.js +1 -1
- package/esm2015/components/input-count/input-count.component.js +1 -1
- package/esm2015/components/input-date/input-date.component.js +2 -2
- package/esm2015/components/input-date-range/input-date-range.component.js +1 -1
- package/esm2015/components/input-date-time/input-date-time.component.js +1 -1
- package/esm2015/components/input-file/file/file.component.js +2 -2
- package/esm2015/components/input-file/input-file.component.js +2 -2
- package/esm2015/components/input-inline/input-inline.component.js +1 -1
- package/esm2015/components/input-number/input-number.component.js +1 -1
- package/esm2015/components/input-password/input-password.component.js +2 -2
- package/esm2015/components/input-phone/input-phone.component.js +1 -1
- package/esm2015/components/input-phone-international/input-phone-international.component.js +2 -2
- package/esm2015/components/input-range/input-range.component.js +3 -3
- package/esm2015/components/input-slider/input-slider.component.js +2 -2
- package/esm2015/components/input-tag/input-tag.component.js +3 -3
- package/esm2015/components/input-time/input-time.component.js +2 -2
- package/esm2015/components/line-clamp/line-clamp.component.js +1 -1
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +2 -2
- package/esm2015/components/multi-select/multi-select.component.js +3 -3
- package/esm2015/components/multi-select-option/multi-select-option.component.js +8 -10
- package/esm2015/components/pagination/pagination.component.js +1 -1
- package/esm2015/components/progress/index.js +3 -1
- package/esm2015/components/progress/pipes/abstract-color-segments.js +32 -0
- package/esm2015/components/progress/pipes/progress-color-segments-async.pipe.js +15 -0
- package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +12 -28
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +1 -1
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +1 -1
- package/esm2015/components/progress/progress.module.js +4 -1
- package/esm2015/components/range/range.component.js +2 -2
- package/esm2015/components/select/select.component.js +1 -1
- package/esm2015/components/select-option/select-option.component.js +20 -12
- package/esm2015/components/slider/slider.component.js +2 -2
- package/esm2015/components/stepper/step/step.component.js +1 -1
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +2 -2
- package/esm2015/components/tag/tag.component.js +2 -2
- package/esm2015/components/text-area/text-area.component.js +3 -3
- package/esm2015/components/toggle/toggle.component.js +2 -2
- package/esm2015/components/tree/components/tree/tree.component.js +2 -2
- package/esm2015/components/tree/components/tree-item/tree-item.component.js +2 -2
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm2015/utils/format/string-hash-to-hsl.js +1 -3
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm5/components/accordion/accordion.component.js +1 -1
- package/esm5/components/action/action.component.js +1 -1
- package/esm5/components/avatar/avatar.component.js +2 -2
- package/esm5/components/badge/badge.component.js +2 -2
- package/esm5/components/badged-content/badged-content.component.js +1 -1
- package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +1 -1
- package/esm5/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm5/components/calendar-month/calendar-month.component.js +2 -2
- package/esm5/components/calendar-range/calendar-range.component.js +2 -2
- package/esm5/components/combo-box/combo-box.component.js +1 -1
- package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +2 -2
- package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +2 -2
- package/esm5/components/filter/filter.component.js +1 -1
- package/esm5/components/input-copy/input-copy.component.js +1 -1
- package/esm5/components/input-count/input-count.component.js +1 -1
- package/esm5/components/input-date/input-date.component.js +2 -2
- package/esm5/components/input-date-range/input-date-range.component.js +1 -1
- package/esm5/components/input-date-time/input-date-time.component.js +1 -1
- package/esm5/components/input-file/file/file.component.js +2 -2
- package/esm5/components/input-file/input-file.component.js +2 -2
- package/esm5/components/input-inline/input-inline.component.js +1 -1
- package/esm5/components/input-number/input-number.component.js +1 -1
- package/esm5/components/input-password/input-password.component.js +2 -2
- package/esm5/components/input-phone/input-phone.component.js +1 -1
- package/esm5/components/input-phone-international/input-phone-international.component.js +2 -2
- package/esm5/components/input-range/input-range.component.js +3 -3
- package/esm5/components/input-slider/input-slider.component.js +2 -2
- package/esm5/components/input-tag/input-tag.component.js +3 -3
- package/esm5/components/input-time/input-time.component.js +2 -2
- package/esm5/components/line-clamp/line-clamp.component.js +1 -1
- package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +2 -2
- package/esm5/components/multi-select/multi-select.component.js +3 -3
- package/esm5/components/multi-select-option/multi-select-option.component.js +14 -11
- package/esm5/components/pagination/pagination.component.js +1 -1
- package/esm5/components/progress/index.js +3 -1
- package/esm5/components/progress/pipes/abstract-color-segments.js +35 -0
- package/esm5/components/progress/pipes/progress-color-segments-async.pipe.js +21 -0
- package/esm5/components/progress/pipes/progress-color-segments.pipe.js +16 -30
- package/esm5/components/progress/progress-circle/progress-circle.component.js +1 -1
- package/esm5/components/progress/progress-segmented/progress-segmented.component.js +1 -1
- package/esm5/components/progress/progress.module.js +4 -1
- package/esm5/components/range/range.component.js +2 -2
- package/esm5/components/select/select.component.js +1 -1
- package/esm5/components/select-option/select-option.component.js +24 -14
- package/esm5/components/slider/slider.component.js +2 -2
- package/esm5/components/stepper/step/step.component.js +1 -1
- package/esm5/components/tabs/tabs-with-more/tabs-with-more.component.js +2 -2
- package/esm5/components/tag/tag.component.js +2 -2
- package/esm5/components/text-area/text-area.component.js +3 -3
- package/esm5/components/toggle/toggle.component.js +2 -2
- package/esm5/components/tree/components/tree/tree.component.js +2 -2
- package/esm5/components/tree/components/tree-item/tree-item.component.js +2 -2
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +2 -2
- package/esm5/utils/format/string-hash-to-hsl.js +1 -3
- package/fesm2015/taiga-ui-kit-components-accordion.js +2 -2
- package/fesm2015/taiga-ui-kit-components-action.js +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +2 -2
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-file.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +2 -2
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +7 -9
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +3 -3
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +36 -11
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +19 -11
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +2 -2
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +0 -2
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +2 -2
- package/fesm5/taiga-ui-kit-components-action.js +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js +1 -1
- package/fesm5/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badge.js +1 -1
- package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-badged-content.js +1 -1
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js +2 -2
- package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-combo-box.js +1 -1
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +2 -2
- package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-filter.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-copy.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-count.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-date-time.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-file.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-inline.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +2 -2
- package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-line-clamp.js +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select-option.js +13 -10
- package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-multi-select.js +3 -3
- package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-pagination.js +1 -1
- package/fesm5/taiga-ui-kit-components-progress.js +50 -14
- package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-range.js +1 -1
- package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select-option.js +23 -13
- package/fesm5/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-stepper.js +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js +1 -1
- package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js +1 -1
- package/fesm5/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-tree.js +2 -2
- package/fesm5/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-format.js +0 -2
- package/fesm5/taiga-ui-kit-utils-format.js.map +1 -1
- package/internal/primitive-calendar-range/taiga-ui-kit-internal-primitive-calendar-range.metadata.json +1 -1
- package/package.json +5 -5
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function d(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function g(e,t){return function(i,n){t(i,n,e)}}function m(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}var h=function(e){function s(i,n,o,r,a,l){var u=e.call(this,i,n)||this;return u.isMobile=o,u.inputFileTexts$=r,u.mode$=a,u.units$=l,u.link="",u.label="",u.accept="",u.multiple=!1,u.size="m",u.showSize=!0,u.maxFileSize=3e7,u.loadingFiles=[],u.rejectedFiles=[],u.rejectedFilesChange=new t.EventEmitter,u.dataTransfer=null,u}var p;return function(e,t){function i(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(s,e),p=s,Object.defineProperty(s.prototype,"nativeFocusableElement",{get:function(){return this.input?this.input.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"focused",{get:function(){return n.isNativeFocused(this.nativeFocusableElement)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"allowDelete",{get:function(){return!this.computedDisabled&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLink$",{get:function(){return this.computeLink$(this.fileDragged,this.multiple,this.link)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLabel$",{get:function(){return this.computeLabel$(this.isMobile,this.fileDragged,this.multiple,this.label)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fileDragged",{get:function(){return!!this.dataTransfer&&-1!==Array.prototype.indexOf.call(this.dataTransfer.types,"Files")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"acceptArray",{get:function(){return this.getAcceptArray(this.accept)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrayValue",{get:function(){return this.getValueArray(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"readyFiles",{get:function(){return this.getReadyFiles(this.arrayValue,this.loadingFiles)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLoading",{get:function(){return this.getLoadingFiles(this.arrayValue,this.loadingFiles)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasFiles",{get:function(){return!!this.rejectedFiles.length||!!this.arrayValue.length},enumerable:!0,configurable:!0}),s.prototype.onHovered=function(e){this.updateHovered(e)},s.prototype.onFocused=function(e){this.updateFocused(e)},s.prototype.onPressed=function(e){this.updatePressed(e)},s.prototype.onFilesSelected=function(e,t,i){this.processSelectedFiles(e.files,t,i),e.value=""},s.prototype.onDropped=function(e,t,i){this.processSelectedFiles(e.files,t,i)},s.prototype.onDragOver=function(e){this.dataTransfer=e},s.prototype.removeFile=function(e){this.updateValue(this.multiple?this.arrayValue.filter((function(t){return t!==e})):null)},s.prototype.removeRejectedFile=function(e){this.updateRejectedFiles(this.rejectedFiles.filter((function(t){return t!==e})))},s.prototype.getAppearance=function(e){return null===e?"":"outline"},s.prototype.computeLink$=function(e,t,i){return e?l.of(""):this.inputFileTexts$.pipe(u.map((function(e){return t&&""===i?e.defaultLinkMultiple:i||e.defaultLinkSingle})))},s.prototype.computeLabel$=function(e,t,i,n){return e?l.of(""):t?this.inputFileTexts$.pipe(u.map((function(e){return i?e.dropMultiple:e.drop}))):this.inputFileTexts$.pipe(u.map((function(e){return i&&""===n?e.defaultLabelMultiple:n||e.defaultLabelSingle})))},s.prototype.getValueArray=function(e){return e?e instanceof Array?e:[e]:n.EMPTY_ARRAY},s.prototype.getReadyFiles=function(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))},s.prototype.getLoadingFiles=function(e,t){return t.filter((function(t){return-1!==e.indexOf(t)}))},s.prototype.getAcceptArray=function(e){return e.toLowerCase().split(",").map((function(e){return e.trim()}))},s.prototype.processSelectedFiles=function(e,t,i){var n=this;if(null!==e&&0!==e.length){var o=this.multiple?Array.from(e):[e[0]],r=o.filter((function(e){return e.size>n.maxFileSize})),l=o.filter((function(e){return!n.isFormatAcceptable(e)&&-1===r.indexOf(e)})),u=o.filter((function(e){return-1===r.indexOf(e)&&-1===l.indexOf(e)}));this.updateRejectedFiles(y(r.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.maxSizeRejectionReason+a.formatSize(i,n.maxFileSize)}})),l.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.formatRejectionReason}})))),this.updateValue(this.multiple?y(this.arrayValue,u):u[0]||null)}},s.prototype.isFormatAcceptable=function(e){if(!this.accept)return!0;var t="."+(e.name.split(".").pop()||"").toLowerCase();return this.acceptArray.some((function(i){return i===t||i===e.type||"*"===i.split("/")[1]&&e.type.split("/")[0]===i.split("/")[0]}))},s.prototype.updateRejectedFiles=function(e){this.rejectedFiles=e,this.rejectedFilesChange.emit(e)},s.ctorParameters=function(){return[{type:i.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[i.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:Boolean,decorators:[{type:t.Inject,args:[n.TUI_IS_MOBILE]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_INPUT_FILE_TEXTS]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[o.TUI_MODE]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_DIGITAL_INFORMATION_UNITS]}]}]},d([t.Input(),n.tuiDefaultProp()],s.prototype,"link",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"label",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"accept",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"multiple",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"size",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"showSize",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"maxFileSize",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"loadingFiles",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"rejectedFiles",void 0),d([t.Output()],s.prototype,"rejectedFilesChange",void 0),d([t.ViewChild("input")],s.prototype,"input",void 0),d([n.tuiPure],s.prototype,"computeLink$",null),d([n.tuiPure],s.prototype,"computeLabel$",null),d([n.tuiPure],s.prototype,"getValueArray",null),d([n.tuiPure],s.prototype,"getReadyFiles",null),d([n.tuiPure],s.prototype,"getLoadingFiles",null),d([n.tuiPure],s.prototype,"getAcceptArray",null),s=p=d([t.Component({selector:"tui-input-file",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 <input\n *ngIf="!readOnly && !computedDisabled && (inputFileTexts$ | async) as texts"\n #input\n class="native"\n type="file"\n tuiPreventDefault="mousedown"\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 </label>\n</tui-wrapper>\n\n<section\n *tuiLet="mode$ | async as mode"\n tuiGroup\n class="files"\n orientation="vertical"\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]="allowDelete"\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]="allowDelete"\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]="allowDelete"\n [size]="size"\n [file]="file"\n (fileRemoved)="removeFile(file)"\n ></tui-file>\n</section>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[o.MODE_PROVIDER,{provide:n.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return p}))}],styles:[":host{display:block;font:var(--tui-font-text-m);word-wrap:break-word;color:var(--tui-text-02)}.native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.native::-webkit-file-upload-button{display:none}.inline{display:inline}.wrapper{display:flex;flex:1;justify-content:center;align-items:center;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);padding:1rem .5rem;box-sizing:border-box}.wrapper:after{border:1px dashed;color:var(--tui-link)}.wrapper_mobile:after{border-style:solid}.wrapper_has-files{margin-bottom:.5rem}.wrapper[data-state=hovered]{background:var(--tui-secondary)}.wrapper[data-state=hovered]:after{color:var(--tui-link-hover)}.wrapper[data-state=pressed]{background:var(--tui-secondary-hover)}.wrapper[data-state=readonly]{pointer-events:none}.wrapper[data-state=readonly]:after{color:var(--tui-text-03)}.wrapper[data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}.wrapper[data-state=disabled]:after{color:var(--tui-text-03)}.wrapper._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}.files{display:flex}"]}),g(0,t.Optional()),g(0,t.Self()),g(0,t.Inject(i.NgControl)),g(1,t.Inject(t.ChangeDetectorRef)),g(2,t.Inject(n.TUI_IS_MOBILE)),g(3,t.Inject(r.TUI_INPUT_FILE_TEXTS)),g(4,t.Inject(o.TUI_MODE)),g(5,t.Inject(r.TUI_DIGITAL_INFORMATION_UNITS))],s)}(n.AbstractTuiNullableControl),b=function(){function e(e,i,n,o){this.isMobile=e,this.sanitizer=i,this.fileTexts$=n,this.units$=o,this.file={name:""},this.state="normal",this.size="m",this.allowDelete=!0,this.showSize=!0,this.fileRemoved=new t.EventEmitter,this.focused=!1}return Object.defineProperty(e.prototype,"preview",{get:function(){return this.isBig?this.createPreview(this.file,this.sanitizer):""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBig",{get:function(){return"l"===this.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return"loading"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isError",{get:function(){return"error"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return"deleted"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){if("normal"===this.state&&this.isBig)return"tuiIconDefaultDocLarge";switch(this.state){case"deleted":return"tuiIconTrashLarge";case"error":return"tuiIconAlertCircleLarge";default:return"tuiIconCheckCircleLarge"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.file.src||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.file.name.split(".").slice(0,-1).join(".")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return"."+this.file.name.split(".").pop()||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"content$",{get:function(){return this.calculateContent$(this.state,this.file,this.fileTexts$)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileSize$",{get:function(){return this.calculateFileSize$(this.file,this.units$)},enumerable:!0,configurable:!0}),e.prototype.onRemoveClick=function(){this.fileRemoved.emit()},e.prototype.onFocusVisible=function(e){this.focused=e},e.prototype.calculateContent$=function(e,t,i){return"error"!==e||t.content?l.of(this.file.content||""):i.pipe(u.map((function(e){return e.loadingError})))},e.prototype.calculateFileSize$=function(e,t){return t.pipe(u.map((function(t){return a.formatSize(t,e.size)})))},e.prototype.createPreview=function(e,t){return e.src?e.src:e instanceof File&&e.type&&e.type.startsWith("image/")?t.bypassSecurityTrustUrl(URL.createObjectURL(e)):""},e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Inject,args:[n.TUI_IS_MOBILE]}]},{type:c.DomSanitizer,decorators:[{type:t.Inject,args:[c.DomSanitizer]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_FILE_TEXTS]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_DIGITAL_INFORMATION_UNITS]}]}]},d([t.Input(),n.tuiDefaultProp()],e.prototype,"file",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"state",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"size",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"allowDelete",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"showSize",void 0),d([t.Output()],e.prototype,"fileRemoved",void 0),d([t.HostBinding("class._focused")],e.prototype,"focused",void 0),d([t.HostBinding("class._link")],e.prototype,"src",null),d([n.tuiPure],e.prototype,"calculateContent$",null),d([n.tuiPure],e.prototype,"calculateFileSize$",null),d([n.tuiPure],e.prototype,"createPreview",null),e=d([t.Component({selector:"tui-file",changeDetection:t.ChangeDetectionStrategy.OnPush,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 class="link"\n rel="noreferrer noopener"\n target="_blank"\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 class="preview" [class.preview_big]="isBig">\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 class="icon"\n automation-id="tui-file__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 automation-id="tui-file__name" class="name">{{name}}</div>\n <div automation-id="tui-file__type" class="type">{{type}}</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 polymorpheus-outlet\n *ngIf="content$ | async as content"\n automation-id="tui-file__content"\n class="content"\n [content]="content"\n ></div>\n </div>\n <button\n *ngIf="allowDelete && (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-template>\n',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)}"]}),g(0,t.Inject(n.TUI_IS_MOBILE)),g(1,t.Inject(c.DomSanitizer)),g(2,t.Inject(r.TUI_FILE_TEXTS)),g(3,t.Inject(r.TUI_DIGITAL_INFORMATION_UNITS))],e)}(),v=function(){function e(){}return e=d([t.NgModule({imports:[s.CommonModule,p.PolymorpheusModule,n.TuiLetModule,n.TuiFocusedModule,n.TuiFocusVisibleModule,n.TuiPressedModule,n.TuiHoveredModule,n.TuiFocusableModule,n.TuiDroppableModule,o.TuiWrapperModule,o.TuiSvgModule,o.TuiLinkModule,o.TuiLoaderModule,o.TuiButtonModule,n.TuiPreventDefaultModule,o.TuiGroupModule],declarations:[b,h],exports:[h]})],e)}();e.TuiFileComponent=b,e.TuiInputFileComponent=h,e.TuiInputFileModule=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function d(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function g(e,t){return function(i,n){t(i,n,e)}}function m(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}var h=function(e){function s(i,n,o,r,a,l){var u=e.call(this,i,n)||this;return u.isMobile=o,u.inputFileTexts$=r,u.mode$=a,u.units$=l,u.link="",u.label="",u.accept="",u.multiple=!1,u.size="m",u.showSize=!0,u.maxFileSize=3e7,u.loadingFiles=[],u.rejectedFiles=[],u.rejectedFilesChange=new t.EventEmitter,u.dataTransfer=null,u}var p;return function(e,t){function i(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(s,e),p=s,Object.defineProperty(s.prototype,"nativeFocusableElement",{get:function(){return this.input?this.input.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"focused",{get:function(){return n.isNativeFocused(this.nativeFocusableElement)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"allowDelete",{get:function(){return!this.computedDisabled&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLink$",{get:function(){return this.computeLink$(this.fileDragged,this.multiple,this.link)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLabel$",{get:function(){return this.computeLabel$(this.isMobile,this.fileDragged,this.multiple,this.label)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fileDragged",{get:function(){return!!this.dataTransfer&&-1!==Array.prototype.indexOf.call(this.dataTransfer.types,"Files")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"acceptArray",{get:function(){return this.getAcceptArray(this.accept)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"arrayValue",{get:function(){return this.getValueArray(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"readyFiles",{get:function(){return this.getReadyFiles(this.arrayValue,this.loadingFiles)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"computedLoading",{get:function(){return this.getLoadingFiles(this.arrayValue,this.loadingFiles)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasFiles",{get:function(){return!!this.rejectedFiles.length||!!this.arrayValue.length},enumerable:!0,configurable:!0}),s.prototype.onHovered=function(e){this.updateHovered(e)},s.prototype.onFocused=function(e){this.updateFocused(e)},s.prototype.onPressed=function(e){this.updatePressed(e)},s.prototype.onFilesSelected=function(e,t,i){this.processSelectedFiles(e.files,t,i),e.value=""},s.prototype.onDropped=function(e,t,i){this.processSelectedFiles(e.files,t,i)},s.prototype.onDragOver=function(e){this.dataTransfer=e},s.prototype.removeFile=function(e){this.updateValue(this.multiple?this.arrayValue.filter((function(t){return t!==e})):null)},s.prototype.removeRejectedFile=function(e){this.updateRejectedFiles(this.rejectedFiles.filter((function(t){return t!==e})))},s.prototype.getAppearance=function(e){return null===e?"":"outline"},s.prototype.computeLink$=function(e,t,i){return e?l.of(""):this.inputFileTexts$.pipe(u.map((function(e){return t&&""===i?e.defaultLinkMultiple:i||e.defaultLinkSingle})))},s.prototype.computeLabel$=function(e,t,i,n){return e?l.of(""):t?this.inputFileTexts$.pipe(u.map((function(e){return i?e.dropMultiple:e.drop}))):this.inputFileTexts$.pipe(u.map((function(e){return i&&""===n?e.defaultLabelMultiple:n||e.defaultLabelSingle})))},s.prototype.getValueArray=function(e){return e?e instanceof Array?e:[e]:n.EMPTY_ARRAY},s.prototype.getReadyFiles=function(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))},s.prototype.getLoadingFiles=function(e,t){return t.filter((function(t){return-1!==e.indexOf(t)}))},s.prototype.getAcceptArray=function(e){return e.toLowerCase().split(",").map((function(e){return e.trim()}))},s.prototype.processSelectedFiles=function(e,t,i){var n=this;if(null!==e&&0!==e.length){var o=this.multiple?Array.from(e):[e[0]],r=o.filter((function(e){return e.size>n.maxFileSize})),l=o.filter((function(e){return!n.isFormatAcceptable(e)&&-1===r.indexOf(e)})),u=o.filter((function(e){return-1===r.indexOf(e)&&-1===l.indexOf(e)}));this.updateRejectedFiles(y(r.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.maxSizeRejectionReason+a.formatSize(i,n.maxFileSize)}})),l.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.formatRejectionReason}})))),this.updateValue(this.multiple?y(this.arrayValue,u):u[0]||null)}},s.prototype.isFormatAcceptable=function(e){if(!this.accept)return!0;var t="."+(e.name.split(".").pop()||"").toLowerCase();return this.acceptArray.some((function(i){return i===t||i===e.type||"*"===i.split("/")[1]&&e.type.split("/")[0]===i.split("/")[0]}))},s.prototype.updateRejectedFiles=function(e){this.rejectedFiles=e,this.rejectedFilesChange.emit(e)},s.ctorParameters=function(){return[{type:i.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[i.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:Boolean,decorators:[{type:t.Inject,args:[n.TUI_IS_MOBILE]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_INPUT_FILE_TEXTS]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[o.TUI_MODE]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_DIGITAL_INFORMATION_UNITS]}]}]},d([t.Input(),n.tuiDefaultProp()],s.prototype,"link",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"label",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"accept",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"multiple",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"size",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"showSize",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"maxFileSize",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"loadingFiles",void 0),d([t.Input(),n.tuiDefaultProp()],s.prototype,"rejectedFiles",void 0),d([t.Output()],s.prototype,"rejectedFilesChange",void 0),d([t.ViewChild("input")],s.prototype,"input",void 0),d([n.tuiPure],s.prototype,"computeLink$",null),d([n.tuiPure],s.prototype,"computeLabel$",null),d([n.tuiPure],s.prototype,"getValueArray",null),d([n.tuiPure],s.prototype,"getReadyFiles",null),d([n.tuiPure],s.prototype,"getLoadingFiles",null),d([n.tuiPure],s.prototype,"getAcceptArray",null),s=p=d([t.Component({selector:"tui-input-file",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 <input\n *ngIf="!readOnly && !computedDisabled && (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 </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]="allowDelete"\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]="allowDelete"\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]="allowDelete"\n [size]="size"\n [file]="file"\n (fileRemoved)="removeFile(file)"\n ></tui-file>\n</section>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[o.MODE_PROVIDER,{provide:n.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return p}))}],styles:[":host{display:block;font:var(--tui-font-text-m);word-wrap:break-word;color:var(--tui-text-02)}.native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.native::-webkit-file-upload-button{display:none}.inline{display:inline}.wrapper{display:flex;flex:1;justify-content:center;align-items:center;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);padding:1rem .5rem;box-sizing:border-box}.wrapper:after{border:1px dashed;color:var(--tui-link)}.wrapper_mobile:after{border-style:solid}.wrapper_has-files{margin-bottom:.5rem}.wrapper[data-state=hovered]{background:var(--tui-secondary)}.wrapper[data-state=hovered]:after{color:var(--tui-link-hover)}.wrapper[data-state=pressed]{background:var(--tui-secondary-hover)}.wrapper[data-state=readonly]{pointer-events:none}.wrapper[data-state=readonly]:after{color:var(--tui-text-03)}.wrapper[data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}.wrapper[data-state=disabled]:after{color:var(--tui-text-03)}.wrapper._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}.files{display:flex}"]}),g(0,t.Optional()),g(0,t.Self()),g(0,t.Inject(i.NgControl)),g(1,t.Inject(t.ChangeDetectorRef)),g(2,t.Inject(n.TUI_IS_MOBILE)),g(3,t.Inject(r.TUI_INPUT_FILE_TEXTS)),g(4,t.Inject(o.TUI_MODE)),g(5,t.Inject(r.TUI_DIGITAL_INFORMATION_UNITS))],s)}(n.AbstractTuiNullableControl),b=function(){function e(e,i,n,o){this.isMobile=e,this.sanitizer=i,this.fileTexts$=n,this.units$=o,this.file={name:""},this.state="normal",this.size="m",this.allowDelete=!0,this.showSize=!0,this.fileRemoved=new t.EventEmitter,this.focused=!1}return Object.defineProperty(e.prototype,"preview",{get:function(){return this.isBig?this.createPreview(this.file,this.sanitizer):""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBig",{get:function(){return"l"===this.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return"loading"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isError",{get:function(){return"error"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return"deleted"===this.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){if("normal"===this.state&&this.isBig)return"tuiIconDefaultDocLarge";switch(this.state){case"deleted":return"tuiIconTrashLarge";case"error":return"tuiIconAlertCircleLarge";default:return"tuiIconCheckCircleLarge"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.file.src||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.file.name.split(".").slice(0,-1).join(".")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return"."+this.file.name.split(".").pop()||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"content$",{get:function(){return this.calculateContent$(this.state,this.file,this.fileTexts$)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileSize$",{get:function(){return this.calculateFileSize$(this.file,this.units$)},enumerable:!0,configurable:!0}),e.prototype.onRemoveClick=function(){this.fileRemoved.emit()},e.prototype.onFocusVisible=function(e){this.focused=e},e.prototype.calculateContent$=function(e,t,i){return"error"!==e||t.content?l.of(this.file.content||""):i.pipe(u.map((function(e){return e.loadingError})))},e.prototype.calculateFileSize$=function(e,t){return t.pipe(u.map((function(t){return a.formatSize(t,e.size)})))},e.prototype.createPreview=function(e,t){return e.src?e.src:e instanceof File&&e.type&&e.type.startsWith("image/")?t.bypassSecurityTrustUrl(URL.createObjectURL(e)):""},e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Inject,args:[n.TUI_IS_MOBILE]}]},{type:c.DomSanitizer,decorators:[{type:t.Inject,args:[c.DomSanitizer]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_FILE_TEXTS]}]},{type:l.Observable,decorators:[{type:t.Inject,args:[r.TUI_DIGITAL_INFORMATION_UNITS]}]}]},d([t.Input(),n.tuiDefaultProp()],e.prototype,"file",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"state",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"size",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"allowDelete",void 0),d([t.Input(),n.tuiDefaultProp()],e.prototype,"showSize",void 0),d([t.Output()],e.prototype,"fileRemoved",void 0),d([t.HostBinding("class._focused")],e.prototype,"focused",void 0),d([t.HostBinding("class._link")],e.prototype,"src",null),d([n.tuiPure],e.prototype,"calculateContent$",null),d([n.tuiPure],e.prototype,"calculateFileSize$",null),d([n.tuiPure],e.prototype,"createPreview",null),e=d([t.Component({selector:"tui-file",changeDetection:t.ChangeDetectionStrategy.OnPush,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 class="preview" [class.preview_big]="isBig">\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 automation-id="tui-file__name" class="name">{{ name }}</div>\n <div automation-id="tui-file__type" class="type">{{ type }}</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 <button\n *ngIf="allowDelete && (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-template>\n',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)}"]}),g(0,t.Inject(n.TUI_IS_MOBILE)),g(1,t.Inject(c.DomSanitizer)),g(2,t.Inject(r.TUI_FILE_TEXTS)),g(3,t.Inject(r.TUI_DIGITAL_INFORMATION_UNITS))],e)}(),v=function(){function e(){}return e=d([t.NgModule({imports:[s.CommonModule,p.PolymorpheusModule,n.TuiLetModule,n.TuiFocusedModule,n.TuiFocusVisibleModule,n.TuiPressedModule,n.TuiHoveredModule,n.TuiFocusableModule,n.TuiDroppableModule,o.TuiWrapperModule,o.TuiSvgModule,o.TuiLinkModule,o.TuiLoaderModule,o.TuiButtonModule,n.TuiPreventDefaultModule,o.TuiGroupModule],declarations:[b,h],exports:[h]})],e)}();e.TuiFileComponent=b,e.TuiInputFileComponent=h,e.TuiInputFileModule=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=taiga-ui-kit-components-input-file.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-file/input-file.component.ts","ng://@taiga-ui/kit/components/input-file/file/file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","__read","o","n","m","Symbol","iterator","e","call","ar","next","done","push","value","error","__spread","concat","TuiInputFileComponent","control","changeDetectorRef","isMobile","inputFileTexts$","mode$","units$","_this","_super","this","link","label","accept","multiple","size","showSize","maxFileSize","loadingFiles","rejectedFiles","rejectedFilesChange","EventEmitter","dataTransfer","__","constructor","prototype","create","__extends","input","nativeElement","isNativeFocused","nativeFocusableElement","computedDisabled","readOnly","computeLink$","fileDragged","computeLabel$","indexOf","types","getAcceptArray","getValueArray","getReadyFiles","arrayValue","getLoadingFiles","onHovered","hovered","updateHovered","onFocused","focused","updateFocused","onPressed","pressed","updatePressed","onFilesSelected","texts","units","processSelectedFiles","files","onDropped","event","onDragOver","removeFile","removedFile","updateValue","filter","file","removeRejectedFile","updateRejectedFiles","getAppearance","mode","of","pipe","map","defaultLinkMultiple","defaultLinkSingle","dropMultiple","drop","defaultLabelMultiple","defaultLabelSingle","EMPTY_ARRAY","loading","toLowerCase","split","format","trim","newFiles","from","tooBigFiles","wrongFormatFiles","isFormatAcceptable","acceptedFiles","name","type","content","maxSizeRejectionReason","formatSize","formatRejectionReason","extension","pop","acceptArray","some","emit","NgControl","Optional","Self","Inject","args","ChangeDetectorRef","TUI_IS_MOBILE","Observable","TUI_INPUT_FILE_TEXTS","TUI_MODE","TUI_DIGITAL_INFORMATION_UNITS","Input","tuiDefaultProp","Output","ViewChild","tuiPure","TuiInputFileComponent_1","Component","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","providers","MODE_PROVIDER","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","AbstractTuiNullableControl","TuiFileComponent","sanitizer","fileTexts$","state","allowDelete","fileRemoved","isBig","createPreview","src","slice","join","calculateContent$","calculateFileSize$","onRemoveClick","onFocusVisible","focusVisible","loadingError","File","startsWith","bypassSecurityTrustUrl","URL","createObjectURL","DomSanitizer","TUI_FILE_TEXTS","HostBinding","TuiInputFileModule","NgModule","imports","CommonModule","PolymorpheusModule","TuiLetModule","TuiFocusedModule","TuiFocusVisibleModule","TuiPressedModule","TuiHoveredModule","TuiFocusableModule","TuiDroppableModule","TuiWrapperModule","TuiSvgModule","TuiLinkModule","TuiLoaderModule","TuiButtonModule","TuiPreventDefaultModule","TuiGroupModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAgCrB,SAASO,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HZ,EAAvHa,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAAkB,OAATE,EAAgBA,EAAOV,OAAOe,yBAAyBP,EAAQC,GAAOC,EACrH,GAAuB,iBAAZM,SAAoD,mBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAASV,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIQ,EAAIX,EAAWM,OAAS,EAAGK,GAAK,EAAGA,KAASpB,EAAIS,EAAWW,MAAIJ,GAAKH,EAAI,EAAIb,EAAEgB,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EAAAA,mBACAC,EAAAA,aACAC,EAAAA,iBACAC,EAAAA,sBACAC,EAAAA,iBACAC,EAAAA,iBACAC,EAAAA,mBACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,gBACAC,EAAAA,gBACAC,EAAAA,wBACAC,EAAAA,gBAEJC,aAAc,CAAC5C,EAAkBnI,GACjCgL,QAAS,CAAChL,MAED4J","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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 | ReadonlyArray<TuiFileLike>>\n implements TuiFocusableElementAccessor\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: ReadonlyArray<TuiFileLike> = [];\n\n @Input()\n @tuiDefaultProp()\n rejectedFiles: ReadonlyArray<TuiFileLike> = [];\n\n @Output()\n rejectedFilesChange = new EventEmitter<ReadonlyArray<TuiFileLike>>();\n\n @ViewChild('input')\n readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\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 allowDelete(): boolean {\n return !this.computedDisabled && !this.readOnly;\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: 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(): ReadonlyArray<TuiFileLike> {\n return this.getValueArray(this.value);\n }\n\n get readyFiles(): ReadonlyArray<TuiFileLike> {\n return this.getReadyFiles(this.arrayValue, this.loadingFiles);\n }\n\n get computedLoading(): ReadonlyArray<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) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean) {\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 ) {\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 ) {\n this.processSelectedFiles(event.files, texts, units);\n }\n\n onDragOver(dataTransfer: DataTransfer | null) {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike) {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n removeRejectedFile(removedFile: TuiFileLike) {\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 | ReadonlyArray<TuiFileLike> | null,\n ): ReadonlyArray<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: ReadonlyArray<TuiFileLike>,\n loading: ReadonlyArray<TuiFileLike>,\n ): ReadonlyArray<TuiFileLike> {\n return value.filter(file => loading.indexOf(file) === -1);\n }\n\n @tuiPure\n private getLoadingFiles(\n value: ReadonlyArray<TuiFileLike>,\n loading: ReadonlyArray<TuiFileLike>,\n ): ReadonlyArray<TuiFileLike> {\n return loading.filter(file => value.indexOf(file) !== -1);\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 ) {\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.indexOf(file) === -1,\n );\n const acceptedFiles = newFiles.filter(\n file =>\n tooBigFiles.indexOf(file) === -1 && wrongFormatFiles.indexOf(file) === -1,\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: ReadonlyArray<TuiFileLike>) {\n this.rejectedFiles = rejectedFiles;\n this.rejectedFilesChange.emit(rejectedFiles);\n }\n}\n","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} 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 TuiFileComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ''};\n\n @Input()\n @tuiDefaultProp()\n state: 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() {\n this.fileRemoved.emit();\n }\n\n onFocusVisible(focusVisible: boolean) {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: 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 {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';\nimport {TuiFileComponent} 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: [TuiFileComponent, TuiInputFileComponent],\n exports: [TuiInputFileComponent],\n})\nexport class TuiInputFileModule {}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-file/input-file.component.ts","ng://@taiga-ui/kit/components/input-file/file/file.component.ts","ng://@taiga-ui/kit/components/input-file/input-file.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","__read","o","n","m","Symbol","iterator","e","call","ar","next","done","push","value","error","__spread","concat","TuiInputFileComponent","control","changeDetectorRef","isMobile","inputFileTexts$","mode$","units$","_this","_super","this","link","label","accept","multiple","size","showSize","maxFileSize","loadingFiles","rejectedFiles","rejectedFilesChange","EventEmitter","dataTransfer","__","constructor","prototype","create","__extends","input","nativeElement","isNativeFocused","nativeFocusableElement","computedDisabled","readOnly","computeLink$","fileDragged","computeLabel$","indexOf","types","getAcceptArray","getValueArray","getReadyFiles","arrayValue","getLoadingFiles","onHovered","hovered","updateHovered","onFocused","focused","updateFocused","onPressed","pressed","updatePressed","onFilesSelected","texts","units","processSelectedFiles","files","onDropped","event","onDragOver","removeFile","removedFile","updateValue","filter","file","removeRejectedFile","updateRejectedFiles","getAppearance","mode","of","pipe","map","defaultLinkMultiple","defaultLinkSingle","dropMultiple","drop","defaultLabelMultiple","defaultLabelSingle","EMPTY_ARRAY","loading","toLowerCase","split","format","trim","newFiles","from","tooBigFiles","wrongFormatFiles","isFormatAcceptable","acceptedFiles","name","type","content","maxSizeRejectionReason","formatSize","formatRejectionReason","extension","pop","acceptArray","some","emit","NgControl","Optional","Self","Inject","args","ChangeDetectorRef","TUI_IS_MOBILE","Observable","TUI_INPUT_FILE_TEXTS","TUI_MODE","TUI_DIGITAL_INFORMATION_UNITS","Input","tuiDefaultProp","Output","ViewChild","tuiPure","TuiInputFileComponent_1","Component","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","providers","MODE_PROVIDER","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","AbstractTuiNullableControl","TuiFileComponent","sanitizer","fileTexts$","state","allowDelete","fileRemoved","isBig","createPreview","src","slice","join","calculateContent$","calculateFileSize$","onRemoveClick","onFocusVisible","focusVisible","loadingError","File","startsWith","bypassSecurityTrustUrl","URL","createObjectURL","DomSanitizer","TUI_FILE_TEXTS","HostBinding","TuiInputFileModule","NgModule","imports","CommonModule","PolymorpheusModule","TuiLetModule","TuiFocusedModule","TuiFocusVisibleModule","TuiPressedModule","TuiHoveredModule","TuiFocusableModule","TuiDroppableModule","TuiWrapperModule","TuiSvgModule","TuiLinkModule","TuiLoaderModule","TuiButtonModule","TuiPreventDefaultModule","TuiGroupModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAgCrB,SAASO,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HZ,EAAvHa,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAAkB,OAATE,EAAgBA,EAAOV,OAAOe,yBAAyBP,EAAQC,GAAOC,EACrH,GAAuB,iBAAZM,SAAoD,mBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAASV,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIQ,EAAIX,EAAWM,OAAS,EAAGK,GAAK,EAAGA,KAASpB,EAAIS,EAAWW,MAAIJ,GAAKH,EAAI,EAAIb,EAAEgB,GAAKH,EAAI,EAAIb,EAA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C,EAAAA,iBACAC,EAAAA,sBACAC,EAAAA,iBACAC,EAAAA,iBACAC,EAAAA,mBACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,gBACAC,EAAAA,gBACAC,EAAAA,wBACAC,EAAAA,gBAEJC,aAAc,CAAC5C,EAAkBnI,GACjCgL,QAAS,CAAChL,MAED4J","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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 | ReadonlyArray<TuiFileLike>>\n implements TuiFocusableElementAccessor\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: ReadonlyArray<TuiFileLike> = [];\n\n @Input()\n @tuiDefaultProp()\n rejectedFiles: ReadonlyArray<TuiFileLike> = [];\n\n @Output()\n rejectedFilesChange = new EventEmitter<ReadonlyArray<TuiFileLike>>();\n\n @ViewChild('input')\n readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\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 allowDelete(): boolean {\n return !this.computedDisabled && !this.readOnly;\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: 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(): ReadonlyArray<TuiFileLike> {\n return this.getValueArray(this.value);\n }\n\n get readyFiles(): ReadonlyArray<TuiFileLike> {\n return this.getReadyFiles(this.arrayValue, this.loadingFiles);\n }\n\n get computedLoading(): ReadonlyArray<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) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean) {\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 ) {\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 ) {\n this.processSelectedFiles(event.files, texts, units);\n }\n\n onDragOver(dataTransfer: DataTransfer | null) {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike) {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n removeRejectedFile(removedFile: TuiFileLike) {\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 | ReadonlyArray<TuiFileLike> | null,\n ): ReadonlyArray<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: ReadonlyArray<TuiFileLike>,\n loading: ReadonlyArray<TuiFileLike>,\n ): ReadonlyArray<TuiFileLike> {\n return value.filter(file => loading.indexOf(file) === -1);\n }\n\n @tuiPure\n private getLoadingFiles(\n value: ReadonlyArray<TuiFileLike>,\n loading: ReadonlyArray<TuiFileLike>,\n ): ReadonlyArray<TuiFileLike> {\n return loading.filter(file => value.indexOf(file) !== -1);\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 ) {\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.indexOf(file) === -1,\n );\n const acceptedFiles = newFiles.filter(\n file =>\n tooBigFiles.indexOf(file) === -1 && wrongFormatFiles.indexOf(file) === -1,\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: ReadonlyArray<TuiFileLike>) {\n this.rejectedFiles = rejectedFiles;\n this.rejectedFilesChange.emit(rejectedFiles);\n }\n}\n","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} 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 TuiFileComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ''};\n\n @Input()\n @tuiDefaultProp()\n state: 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() {\n this.fileRemoved.emit();\n }\n\n onFocusVisible(focusVisible: boolean) {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: 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 {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';\nimport {TuiFileComponent} 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: [TuiFileComponent, TuiInputFileComponent],\n exports: [TuiInputFileComponent],\n})\nexport class TuiInputFileModule {}\n"]}
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
TuiInputInlineComponent = TuiInputInlineComponent_1 = __decorate([
|
|
289
289
|
core.Component({
|
|
290
290
|
selector: 'tui-input-inline',
|
|
291
|
-
template: "<span *ngIf=\"!hasValue\" automation-id=\"tui-input-inline__placeholder\">\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id=\"tui-input-inline__native\"\n
|
|
291
|
+
template: "<span *ngIf=\"!hasValue\" automation-id=\"tui-input-inline__placeholder\">\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id=\"tui-input-inline__native\"\n type=\"text\"\n tuiMaskAccessor\n class=\"native\"\n [attr.maxLength]=\"maxLength\"\n [id]=\"id\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n/>\n",
|
|
292
292
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
293
293
|
providers: [
|
|
294
294
|
providers.TUI_VALUE_ACCESSOR_PROVIDER,
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function c(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,i){t(n,i,e)}}var s=function(e){function r(t,n){var i=e.call(this,t,n)||this;return i.maxLength=null,i}var a;return function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(r,e),a=r,Object.defineProperty(r.prototype,"nativeFocusableElement",{get:function(){return this.native?this.native.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return i.isNativeFocused(this.nativeFocusableElement)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hasValue",{get:function(){return""!==this.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maskedValue",{get:function(){return this.native&&this.value?this.native.nativeElement.value:String(this.value)},enumerable:!0,configurable:!0}),r.prototype.onValueChange=function(e){this.updateValue(e)},r.prototype.onFocused=function(e){this.updateFocused(e)},r.prototype.getFallbackValue=function(){return""},r.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[n.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]}]},c([t.Input(),i.tuiDefaultProp()],r.prototype,"maxLength",void 0),c([t.ViewChild("native")],r.prototype,"native",void 0),c([t.HostBinding("attr.data-value")],r.prototype,"maskedValue",null),r=a=c([t.Component({selector:"tui-input-inline",template:'<span *ngIf="!hasValue" automation-id="tui-input-inline__placeholder">\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id="tui-input-inline__native"\n
|
|
15
|
+
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function c(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,i){t(n,i,e)}}var s=function(e){function r(t,n){var i=e.call(this,t,n)||this;return i.maxLength=null,i}var a;return function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(r,e),a=r,Object.defineProperty(r.prototype,"nativeFocusableElement",{get:function(){return this.native?this.native.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return i.isNativeFocused(this.nativeFocusableElement)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hasValue",{get:function(){return""!==this.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maskedValue",{get:function(){return this.native&&this.value?this.native.nativeElement.value:String(this.value)},enumerable:!0,configurable:!0}),r.prototype.onValueChange=function(e){this.updateValue(e)},r.prototype.onFocused=function(e){this.updateFocused(e)},r.prototype.getFallbackValue=function(){return""},r.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[n.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]}]},c([t.Input(),i.tuiDefaultProp()],r.prototype,"maxLength",void 0),c([t.ViewChild("native")],r.prototype,"native",void 0),c([t.HostBinding("attr.data-value")],r.prototype,"maskedValue",null),r=a=c([t.Component({selector:"tui-input-inline",template:'<span *ngIf="!hasValue" automation-id="tui-input-inline__placeholder">\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id="tui-input-inline__native"\n type="text"\n tuiMaskAccessor\n class="native"\n [attr.maxLength]="maxLength"\n [id]="id"\n [disabled]="computedDisabled"\n [readOnly]="readOnly"\n [tuiFocusable]="focusable"\n [ngModel]="value"\n (ngModelChange)="onValueChange($event)"\n (tuiFocusedChange)="onFocused($event)"\n/>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[o.TUI_VALUE_ACCESSOR_PROVIDER,{provide:i.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return a}))}],styles:[":host{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;box-sizing:border-box}:host:before{content:attr(data-value);padding-right:.02em;visibility:hidden;white-space:pre}.native{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;color:inherit;box-sizing:border-box;width:100%;height:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:0}"]}),l(0,t.Optional()),l(0,t.Self()),l(0,t.Inject(n.NgControl)),l(1,t.Inject(t.ChangeDetectorRef))],r)}(i.AbstractTuiControl),p=function(){function e(){}return e=c([t.NgModule({imports:[r.CommonModule,n.FormsModule,i.TuiFocusableModule,i.TuiFocusedModule,a.TuiMaskAccessorModule],declarations:[s],exports:[s]})],e)}();e.TuiInputInlineComponent=s,e.TuiInputInlineModule=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=taiga-ui-kit-components-input-inline.umd.min.js.map
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
TuiInputNumberComponent = TuiInputNumberComponent_1 = __decorate([
|
|
485
485
|
core.Component({
|
|
486
486
|
selector: 'tui-input-number',
|
|
487
|
-
template: "<tui-primitive-textfield\n
|
|
487
|
+
template: "<tui-primitive-textfield\n tuiValueAccessor\n tuiTextfieldInputMode=\"decimal\"\n class=\"textfield\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoFocused]=\"computedFocused\"\n [invalid]=\"computedInvalid\"\n [tuiTextfieldMaxLength]=\"calculatedMaxLength\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"isNegativeAllowed | tuiMapper: mask:decimal:precision:nativeFocusableElement\"\n [value]=\"computedValue\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [focusable]=\"focusable\"\n (valueChange)=\"onValue($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (focusedChange)=\"onFocused($event)\"\n (pressedChange)=\"onPressed($event)\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n",
|
|
488
488
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
489
489
|
providers: [
|
|
490
490
|
{
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function l(e,t,i,n){var r,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(r=e[u])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function s(e,t){return function(i,n){t(i,n,e)}}var p=function(e){function a(t,i,n){var a=e.call(this,t,i)||this;return a.numberFormat=n,a.min=-1/0,a.max=1/0,a.decimal="not-zero",a.precision=2,a.prefix="",a.postfix="",a.mask=function(e,t,i,n){return{mask:r.tuiCreateNumberMask({allowNegative:e,allowDecimal:"never"!==t,decimalLimit:i,requireDecimal:"always"===t,autoCorrectDecimalSymbol:!1,decimalSymbol:a.numberFormat.decimalSeparator,thousandSymbol:a.numberFormat.thousandSeparator}),pipe:r.tuiCreateAutoCorrectedNumberPipe("always"===t?i:0,a.numberFormat.decimalSeparator,a.numberFormat.thousandSeparator,n||void 0),guide:!1}},a}var o;return function(e,t){function i(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(a,e),o=a,Object.defineProperty(a.prototype,"nativeFocusableElement",{get:function(){return!this.primitiveTextfield||this.computedDisabled?null:this.primitiveTextfield.nativeFocusableElement},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"focused",{get:function(){return!!this.primitiveTextfield&&this.primitiveTextfield.focused},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isNegativeAllowed",{get:function(){return this.min<0},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"inputMode",{get:function(){return"never"===this.decimal?"numeric":"decimal"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"calculatedMaxLength",{get:function(){return 18+("never"!==this.decimal&&this.nativeValue.includes(this.numberFormat.decimalSeparator)?this.precision+1:0)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"formattedValue",{get:function(){var e=this.value||0,t=Math.abs(e)%1>0,i="always"===this.decimal||t?this.precision:0,n=t?e.toString().split(".")[1].substr(0,this.precision):"";return this.focused&&"always"!==this.decimal&&(i=n.length),r.formatNumber(e,i,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator,this.numberFormat.zeroPadding)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"computedValue",{get:function(){return this.focused||!this.isNativeValueInLimit?this.nativeValue:null===this.value?r.maskedMoneyValueIsEmpty(this.nativeValue)?this.nativeValue:"":this.formattedValue},enumerable:!0,configurable:!0}),a.prototype.onValue=function(e){if(r.maskedMoneyValueIsEmpty(e))this.updateValue(null);else if(!this.isNativeValueNotFinished){var t=this.absoluteCapInputValue(e);null===t||isNaN(t)||(this.updateValue(t),t!==r.maskedNumberStringToNumber(e,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator)&&(this.nativeValue=this.formattedValue))}},a.prototype.onKeyDown=function(e){-1!==r.TUI_DECIMAL_SYMBOLS.indexOf(e.key)&&("never"!==this.decimal?this.nativeValue.includes(this.numberFormat.decimalSeparator)&&(e.preventDefault(),this.setCaretAfterComma()):e.preventDefault())},a.prototype.onFocused=function(e){if(this.updateFocused(e),!e){var t=this.nativeNumberValue;if(isNaN(t))this.clear();else{var i=Math.min(this.max,Math.max(this.min,t));this.updateValue(i),this.nativeValue=this.formattedValue}}},a.prototype.onHovered=function(e){this.updateHovered(e)},a.prototype.onPressed=function(e){this.updatePressed(e)},a.prototype.onZero=function(e){var t=this.nativeValue.split(this.numberFormat.decimalSeparator)[1]||"",i=this.nativeFocusableElement;t.length<this.precision||!i||!i.selectionStart||"0"!==this.nativeValue[i.selectionStart]||(e.preventDefault(),i.selectionStart++)},Object.defineProperty(a.prototype,"isNativeValueInLimit",{get:function(){if(""===this.nativeValue)return!0;var e=this.nativeNumberValue;return e>=this.min&&e<=this.max},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isNativeValueNotFinished",{get:function(){var e=this.nativeNumberValue;return e<0?e>this.max:e<this.min},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"nativeValue",{get:function(){return this.nativeFocusableElement?this.nativeFocusableElement.value:""},set:function(e){this.primitiveTextfield&&this.nativeFocusableElement&&(this.primitiveTextfield.value=e,this.nativeFocusableElement.value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"nativeNumberValue",{get:function(){return r.maskedNumberStringToNumber(this.nativeValue,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator)},enumerable:!0,configurable:!0}),a.prototype.clear=function(){this.nativeValue="",this.updateValue(null)},a.prototype.absoluteCapInputValue=function(e){var t=r.maskedNumberStringToNumber(e,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator),i=t<0?Math.max(this.min,t):Math.min(t,this.max);return isNaN(i)||i<this.min||i>this.max?null:i},a.prototype.setCaretAfterComma=function(){if(this.nativeFocusableElement){var e=this.nativeValue.length-this.precision;this.nativeFocusableElement.setSelectionRange(e,e)}},a.ctorParameters=function(){return[{type:i.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[i.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:void 0,decorators:[{type:t.Inject,args:[r.TUI_NUMBER_FORMAT]}]}]},l([t.Input(),n.tuiDefaultProp()],a.prototype,"min",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"max",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"decimal",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"precision",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"prefix",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"postfix",void 0),l([t.ViewChild(r.TuiPrimitiveTextfieldComponent)],a.prototype,"primitiveTextfield",void 0),l([t.HostListener("keydown.0",["$event"])],a.prototype,"onZero",null),a=o=l([t.Component({selector:"tui-input-number",template:'<tui-primitive-textfield\n
|
|
15
|
+
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function l(e,t,i,n){var r,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var u=e.length-1;u>=0;u--)(r=e[u])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function s(e,t){return function(i,n){t(i,n,e)}}var p=function(e){function a(t,i,n){var a=e.call(this,t,i)||this;return a.numberFormat=n,a.min=-1/0,a.max=1/0,a.decimal="not-zero",a.precision=2,a.prefix="",a.postfix="",a.mask=function(e,t,i,n){return{mask:r.tuiCreateNumberMask({allowNegative:e,allowDecimal:"never"!==t,decimalLimit:i,requireDecimal:"always"===t,autoCorrectDecimalSymbol:!1,decimalSymbol:a.numberFormat.decimalSeparator,thousandSymbol:a.numberFormat.thousandSeparator}),pipe:r.tuiCreateAutoCorrectedNumberPipe("always"===t?i:0,a.numberFormat.decimalSeparator,a.numberFormat.thousandSeparator,n||void 0),guide:!1}},a}var o;return function(e,t){function i(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(a,e),o=a,Object.defineProperty(a.prototype,"nativeFocusableElement",{get:function(){return!this.primitiveTextfield||this.computedDisabled?null:this.primitiveTextfield.nativeFocusableElement},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"focused",{get:function(){return!!this.primitiveTextfield&&this.primitiveTextfield.focused},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isNegativeAllowed",{get:function(){return this.min<0},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"inputMode",{get:function(){return"never"===this.decimal?"numeric":"decimal"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"calculatedMaxLength",{get:function(){return 18+("never"!==this.decimal&&this.nativeValue.includes(this.numberFormat.decimalSeparator)?this.precision+1:0)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"formattedValue",{get:function(){var e=this.value||0,t=Math.abs(e)%1>0,i="always"===this.decimal||t?this.precision:0,n=t?e.toString().split(".")[1].substr(0,this.precision):"";return this.focused&&"always"!==this.decimal&&(i=n.length),r.formatNumber(e,i,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator,this.numberFormat.zeroPadding)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"computedValue",{get:function(){return this.focused||!this.isNativeValueInLimit?this.nativeValue:null===this.value?r.maskedMoneyValueIsEmpty(this.nativeValue)?this.nativeValue:"":this.formattedValue},enumerable:!0,configurable:!0}),a.prototype.onValue=function(e){if(r.maskedMoneyValueIsEmpty(e))this.updateValue(null);else if(!this.isNativeValueNotFinished){var t=this.absoluteCapInputValue(e);null===t||isNaN(t)||(this.updateValue(t),t!==r.maskedNumberStringToNumber(e,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator)&&(this.nativeValue=this.formattedValue))}},a.prototype.onKeyDown=function(e){-1!==r.TUI_DECIMAL_SYMBOLS.indexOf(e.key)&&("never"!==this.decimal?this.nativeValue.includes(this.numberFormat.decimalSeparator)&&(e.preventDefault(),this.setCaretAfterComma()):e.preventDefault())},a.prototype.onFocused=function(e){if(this.updateFocused(e),!e){var t=this.nativeNumberValue;if(isNaN(t))this.clear();else{var i=Math.min(this.max,Math.max(this.min,t));this.updateValue(i),this.nativeValue=this.formattedValue}}},a.prototype.onHovered=function(e){this.updateHovered(e)},a.prototype.onPressed=function(e){this.updatePressed(e)},a.prototype.onZero=function(e){var t=this.nativeValue.split(this.numberFormat.decimalSeparator)[1]||"",i=this.nativeFocusableElement;t.length<this.precision||!i||!i.selectionStart||"0"!==this.nativeValue[i.selectionStart]||(e.preventDefault(),i.selectionStart++)},Object.defineProperty(a.prototype,"isNativeValueInLimit",{get:function(){if(""===this.nativeValue)return!0;var e=this.nativeNumberValue;return e>=this.min&&e<=this.max},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isNativeValueNotFinished",{get:function(){var e=this.nativeNumberValue;return e<0?e>this.max:e<this.min},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"nativeValue",{get:function(){return this.nativeFocusableElement?this.nativeFocusableElement.value:""},set:function(e){this.primitiveTextfield&&this.nativeFocusableElement&&(this.primitiveTextfield.value=e,this.nativeFocusableElement.value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"nativeNumberValue",{get:function(){return r.maskedNumberStringToNumber(this.nativeValue,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator)},enumerable:!0,configurable:!0}),a.prototype.clear=function(){this.nativeValue="",this.updateValue(null)},a.prototype.absoluteCapInputValue=function(e){var t=r.maskedNumberStringToNumber(e,this.numberFormat.decimalSeparator,this.numberFormat.thousandSeparator),i=t<0?Math.max(this.min,t):Math.min(t,this.max);return isNaN(i)||i<this.min||i>this.max?null:i},a.prototype.setCaretAfterComma=function(){if(this.nativeFocusableElement){var e=this.nativeValue.length-this.precision;this.nativeFocusableElement.setSelectionRange(e,e)}},a.ctorParameters=function(){return[{type:i.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[i.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:void 0,decorators:[{type:t.Inject,args:[r.TUI_NUMBER_FORMAT]}]}]},l([t.Input(),n.tuiDefaultProp()],a.prototype,"min",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"max",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"decimal",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"precision",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"prefix",void 0),l([t.Input(),n.tuiDefaultProp()],a.prototype,"postfix",void 0),l([t.ViewChild(r.TuiPrimitiveTextfieldComponent)],a.prototype,"primitiveTextfield",void 0),l([t.HostListener("keydown.0",["$event"])],a.prototype,"onZero",null),a=o=l([t.Component({selector:"tui-input-number",template:'<tui-primitive-textfield\n tuiValueAccessor\n tuiTextfieldInputMode="decimal"\n class="textfield"\n [pseudoHovered]="pseudoHovered"\n [pseudoFocused]="computedFocused"\n [invalid]="computedInvalid"\n [tuiTextfieldMaxLength]="calculatedMaxLength"\n [readOnly]="readOnly"\n [disabled]="computedDisabled"\n [textMask]="isNegativeAllowed | tuiMapper: mask:decimal:precision:nativeFocusableElement"\n [value]="computedValue"\n [prefix]="prefix"\n [postfix]="postfix"\n [focusable]="focusable"\n (valueChange)="onValue($event)"\n (hoveredChange)="onHovered($event)"\n (focusedChange)="onFocused($event)"\n (pressedChange)="onPressed($event)"\n (keydown)="onKeyDown($event)"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:n.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return o}))}],styles:[":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.textfield{border-radius:inherit;text-align:inherit}"]}),s(0,t.Optional()),s(0,t.Self()),s(0,t.Inject(i.NgControl)),s(1,t.Inject(t.ChangeDetectorRef)),s(2,t.Inject(r.TUI_NUMBER_FORMAT))],a)}(n.AbstractTuiNullableControl),c=function(){function e(){}return e=l([t.NgModule({imports:[o.TextMaskModule,n.TuiMapperPipeModule,r.TuiPrimitiveTextfieldModule,r.TuiTextfieldControllerModule,a.TuiValueAccessorModule],declarations:[p],exports:[p]})],e)}();e.TuiInputNumberComponent=p,e.TuiInputNumberModule=c,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=taiga-ui-kit-components-input-number.umd.min.js.map
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
TuiInputPasswordComponent = TuiInputPasswordComponent_1 = __decorate([
|
|
349
349
|
core.Component({
|
|
350
350
|
selector: 'tui-input-password',
|
|
351
|
-
template: "<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [iconContent]=\"hasEyeIcon ? iconContent : null\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n\n<ng-template #iconContent=\"polymorpheus\" polymorpheus>\n <span\n *tuiLet=\"passwordTexts$ | async as texts\"\n polymorpheus-outlet\n [content]=\"icon\"\n [context]=\"context\"\n >\n <ng-template let-icon>\n <tui-svg\n automation-id=\"tui-password__icon\"\n
|
|
351
|
+
template: "<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n [pseudoPressed]=\"pseudoPressed\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [iconContent]=\"hasEyeIcon ? iconContent : null\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n>\n <ng-content></ng-content>\n</tui-primitive-textfield>\n\n<ng-template #iconContent=\"polymorpheus\" polymorpheus>\n <span\n *tuiLet=\"passwordTexts$ | async as texts\"\n polymorpheus-outlet\n [content]=\"icon\"\n [context]=\"context\"\n >\n <ng-template let-icon>\n <tui-svg\n automation-id=\"tui-password__icon\"\n tuiHintId=\"not_required\"\n class=\"icon\"\n [tuiHint]=\"texts[0] && texts[1] && hintContent\"\n [tuiHintDirection]=\"hintController.direction\"\n [tuiHintMode]=\"computedMode$ | async\"\n [src]=\"icon\"\n (click)=\"togglePasswordVisibility()\"\n ></tui-svg>\n </ng-template>\n\n <ng-template #hintContent=\"polymorpheus\" polymorpheus>\n {{ isPasswordHidden ? texts[0] : texts[1] }}\n </ng-template>\n </span>\n</ng-template>\n",
|
|
352
352
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
353
353
|
providers: [
|
|
354
354
|
{
|