@taiga-ui/kit 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-kit-components-accordion.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +9 -2
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +246 -69
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +16 -2
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +17 -3
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +20 -2
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +6 -2
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-island.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +4 -2
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +3 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +20 -13
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tiles.umd.js +645 -0
- package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-components.umd.js +10 -4
- package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +3 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +3 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-stringify.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/components/accordion/accordion.component.d.ts +1 -1
- package/components/arrow/arrow-options.d.ts +2 -2
- package/components/avatar/avatar-options.d.ts +1 -1
- package/components/avatar/avatar.component.d.ts +5 -3
- package/components/badge/badge.component.d.ts +1 -1
- package/components/badged-content/badged-content.component.d.ts +1 -1
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +3 -3
- package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
- package/components/combo-box/combo-box.component.d.ts +1 -1
- package/components/data-list-wrapper/data-list-wrapper.d.ts +3 -3
- package/components/filter/filter.component.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/input-date-range/input-date-range.component.d.ts +1 -1
- package/components/input-files/index.d.ts +2 -0
- package/components/input-files/input-files.component.d.ts +20 -6
- package/components/input-files/input-files.directive.d.ts +20 -0
- package/components/input-files/input-files.module.d.ts +8 -7
- package/components/input-files/input-files.options.d.ts +17 -0
- package/components/input-inline/input-inline.component.d.ts +1 -1
- package/components/input-month/input-month.component.d.ts +4 -2
- package/components/input-month-range/input-month-range.component.d.ts +4 -2
- package/components/input-password/input-password-options.d.ts +2 -2
- package/components/input-password/input-password.component.d.ts +3 -3
- package/components/input-phone/input-phone.component.d.ts +1 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +1 -1
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -1
- package/components/input-range/input-range.component.d.ts +1 -1
- package/components/input-tag/input-tag-options.d.ts +1 -1
- package/components/input-tag/input-tag.component.d.ts +4 -4
- package/components/input-time/input-time-options.d.ts +2 -2
- package/components/island/island.component.d.ts +1 -1
- package/components/marker-icon/marker-icon.component.d.ts +1 -1
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select.component.d.ts +2 -2
- package/components/pdf-viewer/pdf-viewer.service.d.ts +1 -1
- package/components/push/push-alert.directive.d.ts +1 -1
- package/components/radio-block/radio-block.component.d.ts +1 -1
- package/components/range/range-change.directive.d.ts +2 -2
- package/components/range/range.component.d.ts +1 -1
- package/components/select/select.component.d.ts +1 -1
- package/components/slider/helpers/slider-readonly.directive.d.ts +2 -2
- package/components/stepper/step/step.component.d.ts +1 -1
- package/components/stepper/stepper.component.d.ts +3 -2
- package/components/tag/tag-options.d.ts +1 -1
- package/components/tag/tag.component.d.ts +2 -2
- package/components/tiles/index.d.ts +4 -0
- package/components/tiles/package.json +10 -0
- package/components/tiles/taiga-ui-kit-components-tiles.d.ts +5 -0
- package/components/tiles/tile-handle.directive.d.ts +13 -0
- package/components/tiles/tile.component.d.ts +30 -0
- package/components/tiles/tiles.component.d.ts +19 -0
- package/components/tiles/tiles.module.d.ts +10 -0
- package/directives/lazy-loading/lazy-loading.directive.d.ts +3 -2
- package/directives/lazy-loading/lazy-loading.service.d.ts +4 -3
- package/esm2015/components/accordion/accordion.component.js +5 -3
- package/esm2015/components/arrow/arrow-options.js +1 -1
- package/esm2015/components/avatar/avatar-options.js +1 -1
- package/esm2015/components/avatar/avatar.component.js +6 -3
- package/esm2015/components/badge/badge.component.js +1 -1
- package/esm2015/components/badged-content/badged-content.component.js +1 -1
- package/esm2015/components/calendar-month/calendar-month.component.js +1 -1
- package/esm2015/components/calendar-range/calendar-range.component.js +5 -3
- package/esm2015/components/checkbox-block/checkbox-block.component.js +1 -1
- package/esm2015/components/combo-box/combo-box.component.js +1 -1
- package/esm2015/components/data-list-wrapper/data-list-wrapper.js +1 -1
- package/esm2015/components/filter/filter.component.js +1 -1
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/input-date/input-date.component.js +5 -3
- package/esm2015/components/input-date-range/input-date-range.component.js +1 -1
- package/esm2015/components/input-date-time/input-date-time.component.js +5 -3
- package/esm2015/components/input-files/index.js +3 -1
- package/esm2015/components/input-files/input-files.component.js +75 -26
- package/esm2015/components/input-files/input-files.directive.js +77 -0
- package/esm2015/components/input-files/input-files.module.js +12 -3
- package/esm2015/components/input-files/input-files.options.js +16 -0
- package/esm2015/components/input-inline/input-inline.component.js +1 -1
- package/esm2015/components/input-month/input-month.component.js +15 -5
- package/esm2015/components/input-month-range/input-month-range.component.js +14 -4
- package/esm2015/components/input-password/input-password-options.js +1 -1
- package/esm2015/components/input-password/input-password.component.js +1 -1
- package/esm2015/components/input-phone/input-phone.component.js +7 -3
- package/esm2015/components/input-phone-international/input-phone-international.component.js +13 -2
- package/esm2015/components/input-phone-international/tokens/countries-masks.js +9 -2
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +1 -1
- package/esm2015/components/input-range/input-range.component.js +1 -1
- package/esm2015/components/input-tag/input-tag-options.js +1 -1
- package/esm2015/components/input-tag/input-tag.component.js +1 -1
- package/esm2015/components/input-time/input-time-options.js +1 -1
- package/esm2015/components/island/island.component.js +1 -1
- package/esm2015/components/marker-icon/marker-icon.component.js +1 -1
- package/esm2015/components/multi-select/hide-selected.pipe.js +1 -1
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +1 -1
- package/esm2015/components/multi-select/multi-select.component.js +1 -1
- package/esm2015/components/pdf-viewer/pdf-viewer.service.js +1 -1
- package/esm2015/components/push/push-alert.directive.js +5 -3
- package/esm2015/components/radio-block/radio-block.component.js +1 -1
- package/esm2015/components/range/range-change.directive.js +5 -3
- package/esm2015/components/range/range.component.js +2 -2
- package/esm2015/components/select/select.component.js +1 -1
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -3
- package/esm2015/components/stepper/step/step.component.js +2 -2
- package/esm2015/components/stepper/stepper.component.js +12 -9
- package/esm2015/components/tag/tag-options.js +1 -1
- package/esm2015/components/tag/tag.component.js +1 -1
- package/esm2015/components/tiles/index.js +5 -0
- package/esm2015/components/tiles/taiga-ui-kit-components-tiles.js +5 -0
- package/esm2015/components/tiles/tile-handle.directive.js +53 -0
- package/esm2015/components/tiles/tile.component.js +102 -0
- package/esm2015/components/tiles/tiles.component.js +99 -0
- package/esm2015/components/tiles/tiles.module.js +20 -0
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +1 -1
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +5 -3
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +5 -3
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input-with.pipe.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +1 -1
- package/esm2015/pipes/filter-by-input/filter-by-input.pipe.js +1 -1
- package/esm2015/pipes/stringify/stringify.pipe.js +1 -1
- package/esm2015/tokens/input-date-options.js +1 -1
- package/esm2015/tokens/validation-errors.js +1 -1
- package/esm2015/types/dropdown-position.js +1 -1
- package/esm2015/types/file-state.js +1 -1
- package/esm2015/types/marker-icon-mode.js +1 -1
- package/esm2015/types/status.js +1 -1
- package/esm2015/types/step-state.js +1 -1
- package/esm2015/types/time-format-parts.js +1 -1
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +1 -1
- package/esm2015/utils/mask/create-time-mask.js +1 -1
- package/esm2015/utils/miscellaneous/is-flat.js +1 -1
- package/esm2015/utils/miscellaneous/replay-control-value-changes-factory.js +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +3 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +5 -2
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +4 -2
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +4 -2
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +4 -2
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +167 -29
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +13 -3
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +14 -4
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +20 -2
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +6 -2
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-island.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-push.js +4 -2
- package/fesm2015/taiga-ui-kit-components-push.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +4 -2
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +3 -1
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +12 -9
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tiles.js +262 -0
- package/fesm2015/taiga-ui-kit-components-tiles.js.map +1 -0
- package/fesm2015/taiga-ui-kit-components.js +1 -0
- package/fesm2015/taiga-ui-kit-components.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +4 -2
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +4 -2
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/internal/primitive-calendar-range/primitive-calendar-range.component.d.ts +1 -1
- package/package.json +8 -8
- package/pipes/field-error/field-error-pipe.d.ts +1 -1
- package/pipes/filter-by-input/filter-by-input.base.d.ts +1 -1
- package/pipes/stringify/stringify.pipe.d.ts +1 -1
- package/tokens/input-date-options.d.ts +1 -1
- package/types/dropdown-position.d.ts +1 -1
- package/types/file-state.d.ts +1 -1
- package/types/marker-icon-mode.d.ts +1 -1
- package/types/status.d.ts +1 -1
- package/types/step-state.d.ts +1 -1
- package/types/time-format-parts.d.ts +1 -1
- package/utils/miscellaneous/is-flat.d.ts +1 -1
- package/utils/miscellaneous/replay-control-value-changes-factory.d.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { InjectionToken, ElementRef, Directive, Inject, HostBinding, Pipe, EventEmitter, ChangeDetectorRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Self, ViewChild, ContentChild, Input, Output, HostListener, NgModule } from '@angular/core';
|
|
4
4
|
import * as i6 from '@angular/forms';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
|
-
import * as
|
|
7
|
-
import { AbstractTuiNullableControl, tuiIsNativeFocused, EMPTY_ARRAY, TUI_IS_MOBILE, tuiAsFocusableItemAccessor, tuiDefaultProp, tuiPure, TuiLetModule, TuiFocusedModule, TuiFocusVisibleModule, TuiPressedModule, TuiHoveredModule, TuiFocusableModule, TuiDroppableModule, TuiItemDirective } from '@taiga-ui/cdk';
|
|
6
|
+
import * as i2 from '@taiga-ui/cdk';
|
|
7
|
+
import { TuiIdService, AbstractTuiNullableControl, tuiIsNativeFocused, EMPTY_ARRAY, TUI_IS_MOBILE, tuiAsFocusableItemAccessor, tuiDefaultProp, tuiPure, TuiLetModule, TuiFocusedModule, TuiFocusVisibleModule, TuiPressedModule, TuiHoveredModule, TuiFocusableModule, TuiDroppableModule, TuiItemDirective } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
9
|
import { MODE_PROVIDER, TuiWrapperModule, TuiSvgModule, TuiLinkModule, TuiLoaderModule, TuiButtonModule, TuiGroupModule } from '@taiga-ui/core';
|
|
10
10
|
import { TUI_INPUT_FILE_TEXTS, TUI_DIGITAL_INFORMATION_UNITS } from '@taiga-ui/kit/tokens';
|
|
@@ -12,13 +12,97 @@ import { tuiGetAcceptArray } from '@taiga-ui/kit/utils/files';
|
|
|
12
12
|
import * as i7 from 'rxjs';
|
|
13
13
|
import { combineLatest, of } from 'rxjs';
|
|
14
14
|
import { map } from 'rxjs/operators';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i3 from '@tinkoff/ng-polymorpheus';
|
|
16
16
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i4 from '@angular/common';
|
|
18
18
|
import { CommonModule } from '@angular/common';
|
|
19
19
|
import { tuiFormatSize } from '@taiga-ui/kit/utils';
|
|
20
20
|
import { TuiFilesModule, TuiFilesComponent, TuiFileComponent } from '@taiga-ui/kit/components/files';
|
|
21
21
|
|
|
22
|
+
const TUI_INPUT_FILES_DEFAULT_OPTIONS = {
|
|
23
|
+
capture: null,
|
|
24
|
+
accepts: ``,
|
|
25
|
+
multiple: false,
|
|
26
|
+
size: `m`,
|
|
27
|
+
maxFileSize: 30 * 1000 * 1000, // 30 MB
|
|
28
|
+
};
|
|
29
|
+
const TUI_INPUT_FILES_OPTIONS = new InjectionToken(`[TUI_INPUT_FILES_OPTIONS]: Default parameters for input files component`, {
|
|
30
|
+
factory: () => TUI_INPUT_FILES_DEFAULT_OPTIONS,
|
|
31
|
+
});
|
|
32
|
+
const tuiInputFilesOptionsProvider = (options) => ({
|
|
33
|
+
provide: TUI_INPUT_FILES_OPTIONS,
|
|
34
|
+
useValue: Object.assign(Object.assign({}, TUI_INPUT_FILES_DEFAULT_OPTIONS), options),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
class TuiInputFilesDirective {
|
|
38
|
+
constructor(host, elementRef, idService, options) {
|
|
39
|
+
this.host = host;
|
|
40
|
+
this.elementRef = elementRef;
|
|
41
|
+
this.idService = idService;
|
|
42
|
+
this.options = options;
|
|
43
|
+
}
|
|
44
|
+
get tabIndex() {
|
|
45
|
+
return this.host.focusable ? 0 : -1;
|
|
46
|
+
}
|
|
47
|
+
get id() {
|
|
48
|
+
return this.elementRef.nativeElement.id || this.idService.generate();
|
|
49
|
+
}
|
|
50
|
+
get accept() {
|
|
51
|
+
var _a;
|
|
52
|
+
return (_a = this.elementRef.nativeElement.accept) !== null && _a !== void 0 ? _a : this.options.accepts;
|
|
53
|
+
}
|
|
54
|
+
get multiple() {
|
|
55
|
+
var _a;
|
|
56
|
+
return (_a = this.elementRef.nativeElement.multiple) !== null && _a !== void 0 ? _a : this.options.multiple;
|
|
57
|
+
}
|
|
58
|
+
get capture() {
|
|
59
|
+
var _a;
|
|
60
|
+
return ((_a = this.elementRef.nativeElement.capture) !== null && _a !== void 0 ? _a : this.options.capture);
|
|
61
|
+
}
|
|
62
|
+
get input() {
|
|
63
|
+
return this.elementRef.nativeElement;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
TuiInputFilesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesDirective, deps: [{ token: TuiInputFilesComponent }, { token: ElementRef }, { token: TuiIdService }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0.ɵɵFactoryTarget.Directive });
|
|
67
|
+
TuiInputFilesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesDirective, selector: "input[tuiInputFiles]", host: { attributes: { "type": "file" }, properties: { "tabIndex": "this.tabIndex", "id": "this.id", "accept": "this.accept", "multiple": "this.multiple", "capture": "this.capture" }, classAttribute: "t-native" }, ngImport: i0 });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesDirective, decorators: [{
|
|
69
|
+
type: Directive,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: `input[tuiInputFiles]`,
|
|
72
|
+
host: {
|
|
73
|
+
type: `file`,
|
|
74
|
+
class: `t-native`,
|
|
75
|
+
},
|
|
76
|
+
}]
|
|
77
|
+
}], ctorParameters: function () { return [{ type: TuiInputFilesComponent, decorators: [{
|
|
78
|
+
type: Inject,
|
|
79
|
+
args: [TuiInputFilesComponent]
|
|
80
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
81
|
+
type: Inject,
|
|
82
|
+
args: [ElementRef]
|
|
83
|
+
}] }, { type: i2.TuiIdService, decorators: [{
|
|
84
|
+
type: Inject,
|
|
85
|
+
args: [TuiIdService]
|
|
86
|
+
}] }, { type: undefined, decorators: [{
|
|
87
|
+
type: Inject,
|
|
88
|
+
args: [TUI_INPUT_FILES_OPTIONS]
|
|
89
|
+
}] }]; }, propDecorators: { tabIndex: [{
|
|
90
|
+
type: HostBinding,
|
|
91
|
+
args: [`tabIndex`]
|
|
92
|
+
}], id: [{
|
|
93
|
+
type: HostBinding,
|
|
94
|
+
args: [`id`]
|
|
95
|
+
}], accept: [{
|
|
96
|
+
type: HostBinding,
|
|
97
|
+
args: [`accept`]
|
|
98
|
+
}], multiple: [{
|
|
99
|
+
type: HostBinding,
|
|
100
|
+
args: [`multiple`]
|
|
101
|
+
}], capture: [{
|
|
102
|
+
type: HostBinding,
|
|
103
|
+
args: [`capture`]
|
|
104
|
+
}] } });
|
|
105
|
+
|
|
22
106
|
class TuiMaxSizeRejectionErrorPipe {
|
|
23
107
|
constructor(inputFileTexts$, units$) {
|
|
24
108
|
this.inputFileTexts$ = inputFileTexts$;
|
|
@@ -41,21 +125,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
41
125
|
args: [TUI_DIGITAL_INFORMATION_UNITS]
|
|
42
126
|
}] }]; } });
|
|
43
127
|
|
|
44
|
-
const DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB
|
|
45
128
|
class TuiInputFilesComponent extends AbstractTuiNullableControl {
|
|
46
|
-
constructor(control, changeDetectorRef, isMobile, inputFileTexts
|
|
129
|
+
constructor(control, changeDetectorRef, isMobile, inputFileTexts$, options) {
|
|
47
130
|
super(control, changeDetectorRef);
|
|
48
131
|
this.isMobile = isMobile;
|
|
49
132
|
this.inputFileTexts$ = inputFileTexts$;
|
|
133
|
+
this.options = options;
|
|
50
134
|
this.dataTransfer = null;
|
|
51
135
|
this.link = ``;
|
|
52
136
|
this.label = ``;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated: use `<input tuiInputFiles accept="image/*" />`
|
|
139
|
+
*/
|
|
140
|
+
this.accept = this.options.accepts;
|
|
141
|
+
/**
|
|
142
|
+
* @deprecated: use `<input tuiInputFiles multiple />`
|
|
143
|
+
*/
|
|
144
|
+
this.multiple = this.options.multiple;
|
|
145
|
+
this.size = this.options.size;
|
|
146
|
+
this.maxFileSize = this.options.maxFileSize;
|
|
57
147
|
this.reject = new EventEmitter();
|
|
58
148
|
}
|
|
149
|
+
get computedMultiple() {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.multiple) !== null && _b !== void 0 ? _b : this.multiple;
|
|
152
|
+
}
|
|
153
|
+
get computedAccept() {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.accept) !== null && _b !== void 0 ? _b : this.accept;
|
|
156
|
+
}
|
|
59
157
|
get nativeFocusableElement() {
|
|
60
158
|
var _a;
|
|
61
159
|
return ((_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) || null;
|
|
@@ -68,10 +166,10 @@ class TuiInputFilesComponent extends AbstractTuiNullableControl {
|
|
|
68
166
|
return (_a = this.pseudoHover) !== null && _a !== void 0 ? _a : (this.fileDragged || null);
|
|
69
167
|
}
|
|
70
168
|
get computedLink$() {
|
|
71
|
-
return this.computeLink$(this.fileDragged, this.
|
|
169
|
+
return this.computeLink$(this.fileDragged, this.computedMultiple, this.link);
|
|
72
170
|
}
|
|
73
171
|
get computedLabel$() {
|
|
74
|
-
return this.computeLabel$(this.isMobile, this.fileDragged, this.
|
|
172
|
+
return this.computeLabel$(this.isMobile, this.fileDragged, this.computedMultiple, this.label);
|
|
75
173
|
}
|
|
76
174
|
get fileDragged() {
|
|
77
175
|
var _a;
|
|
@@ -83,18 +181,25 @@ class TuiInputFilesComponent extends AbstractTuiNullableControl {
|
|
|
83
181
|
onFocused(focused) {
|
|
84
182
|
this.updateFocused(focused);
|
|
85
183
|
}
|
|
86
|
-
onFilesSelected(
|
|
87
|
-
|
|
184
|
+
onFilesSelected() {
|
|
185
|
+
var _a, _b, _c;
|
|
186
|
+
const input = (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.input) !== null && _b !== void 0 ? _b : (_c = this.input) === null || _c === void 0 ? void 0 : _c.nativeElement;
|
|
187
|
+
if (!input) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.processSelectedFiles(input.files);
|
|
88
191
|
input.value = ``;
|
|
89
192
|
}
|
|
90
|
-
onDropped(event
|
|
91
|
-
this.processSelectedFiles(event.files
|
|
193
|
+
onDropped(event) {
|
|
194
|
+
this.processSelectedFiles(event.files);
|
|
92
195
|
}
|
|
93
196
|
onDragOver(dataTransfer) {
|
|
94
197
|
this.dataTransfer = dataTransfer;
|
|
95
198
|
}
|
|
96
199
|
removeFile(removedFile) {
|
|
97
|
-
this.updateValue(this.
|
|
200
|
+
this.updateValue(this.computedMultiple
|
|
201
|
+
? this.arrayValue.filter(file => file !== removedFile)
|
|
202
|
+
: null);
|
|
98
203
|
}
|
|
99
204
|
computeLink$(fileDragged, multiple, link) {
|
|
100
205
|
return fileDragged
|
|
@@ -120,12 +225,16 @@ class TuiInputFilesComponent extends AbstractTuiNullableControl {
|
|
|
120
225
|
}
|
|
121
226
|
return Array.isArray(value) ? value : [value];
|
|
122
227
|
}
|
|
123
|
-
processSelectedFiles(files
|
|
228
|
+
processSelectedFiles(files) {
|
|
124
229
|
// IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.
|
|
125
230
|
if (!(files === null || files === void 0 ? void 0 : files.length)) {
|
|
126
231
|
return;
|
|
127
232
|
}
|
|
128
|
-
const
|
|
233
|
+
const errors = {
|
|
234
|
+
formatRejection: this.formatRejection,
|
|
235
|
+
maxSizeRejection: this.maxSizeRejection,
|
|
236
|
+
};
|
|
237
|
+
const newFiles = this.computedMultiple ? Array.from(files) : [files[0]];
|
|
129
238
|
const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);
|
|
130
239
|
const wrongFormatFiles = newFiles.filter(file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file));
|
|
131
240
|
const acceptedFiles = newFiles.filter(file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file));
|
|
@@ -145,26 +254,26 @@ class TuiInputFilesComponent extends AbstractTuiNullableControl {
|
|
|
145
254
|
})),
|
|
146
255
|
]);
|
|
147
256
|
}
|
|
148
|
-
this.updateValue(this.
|
|
257
|
+
this.updateValue(this.computedMultiple
|
|
149
258
|
? [...this.arrayValue, ...acceptedFiles]
|
|
150
259
|
: acceptedFiles[0] || null);
|
|
151
260
|
}
|
|
152
261
|
isFormatAcceptable(file) {
|
|
153
|
-
if (!this.
|
|
262
|
+
if (!this.computedAccept) {
|
|
154
263
|
return true;
|
|
155
264
|
}
|
|
156
265
|
const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;
|
|
157
|
-
return tuiGetAcceptArray(this.
|
|
266
|
+
return tuiGetAcceptArray(this.computedAccept).some(format => format === extension ||
|
|
158
267
|
format === file.type ||
|
|
159
268
|
(format.split(`/`)[1] === `*` &&
|
|
160
269
|
file.type.split(`/`)[0] === format.split(`/`)[0]));
|
|
161
270
|
}
|
|
162
271
|
rejectFiles(rejectedFiles) {
|
|
163
|
-
this.reject.emit(this.
|
|
272
|
+
this.reject.emit(this.computedMultiple ? rejectedFiles : rejectedFiles[0]);
|
|
164
273
|
}
|
|
165
274
|
}
|
|
166
|
-
TuiInputFilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_IS_MOBILE }, { token: TUI_INPUT_FILE_TEXTS }], target: i0.ɵɵFactoryTarget.Component });
|
|
167
|
-
TuiInputFilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesComponent, selector: "tui-input-files", inputs: { link: "link", label: "label", accept: "accept", multiple: "multiple", size: "size", maxFileSize: "maxFileSize" }, outputs: { reject: "reject" }, providers: [MODE_PROVIDER, tuiAsFocusableItemAccessor(TuiInputFilesComponent)], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label
|
|
275
|
+
TuiInputFilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_IS_MOBILE }, { token: TUI_INPUT_FILE_TEXTS }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
+
TuiInputFilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesComponent, selector: "tui-input-files", inputs: { link: "link", label: "label", accept: "accept", multiple: "multiple", size: "size", maxFileSize: "maxFileSize" }, outputs: { reject: "reject" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)", "change": "onFilesSelected()" } }, providers: [MODE_PROVIDER, tuiAsFocusableItemAccessor(TuiInputFilesComponent)], queries: [{ propertyName: "nativeInput", first: true, predicate: TuiInputFilesDirective, descendants: true, read: TuiInputFilesDirective }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "formatRejection", first: true, predicate: ["formatRejection"], descendants: true }, { propertyName: "maxSizeRejection", first: true, predicate: ["maxSizeRejection"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n (tuiDroppableDropped)=\"onDropped($event)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n >\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <ng-container *polymorpheusOutlet=\"computedLabel$ | async as text\">\n {{ text }}\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <ng-content select=\"input\"></ng-content>\n <input\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n />\n </ng-container>\n </label>\n</div>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n", styles: ["tui-input-files{display:block}tui-input-files .t-native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}tui-input-files .t-native::-webkit-file-upload-button{display:none}tui-input-files .t-native+.t-native{display:none}[tuiWrapper][data-appearance=input-file]{display:flex;background:transparent;font:var(--tui-font-text-m);word-wrap:break-word;color:var(--tui-text-02);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}[tuiWrapper][data-appearance=input-file]:after{border:1px dashed;color:var(--tui-link)}[tuiWrapper][data-appearance=input-file]._mobile:after{border:1px solid}[tuiWrapper][data-appearance=input-file]:disabled:disabled,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}[tuiWrapper][data-appearance=input-file]:disabled:disabled:after,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]:after{color:var(--tui-text-03)}[tuiWrapper][data-appearance=input-file]:focus-visible:focus-visible:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file]._focused._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:focus-visible:focus-visible:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]._focused._focused:after{color:var(--tui-text-01-night)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]{background:var(--tui-clear-inverse-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]:after{color:var(--tui-text-03-night)}}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover{background:var(--tui-clear-inverse-active)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover:after{color:var(--tui-text-03-night)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]{color:var(--tui-text-01)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:after{color:var(--tui-text-01)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]{background:var(--tui-clear-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]:after{color:var(--tui-text-03)}}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover{background:var(--tui-clear-active)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover:after{color:var(--tui-text-03)}@media (hover: hover){[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-state=hover]{background:var(--tui-secondary)}[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-state=hover]:after{color:var(--tui-link-hover)}}[tuiWrapper][data-appearance=input-file]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-state=active],[tuiWrapper][data-appearance=input-file][data-state=active]:hover{background:var(--tui-secondary-hover)}.t-label{text-align:center}\n"], components: [{ type: i1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i1.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2.TuiDroppableDirective, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: ["tuiDroppableDropped", "tuiDroppableDragOverChange"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], pipes: { "async": i4.AsyncPipe, "tuiMaxSizeRejectionError": TuiMaxSizeRejectionErrorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
168
277
|
__decorate([
|
|
169
278
|
tuiDefaultProp()
|
|
170
279
|
], TuiInputFilesComponent.prototype, "link", void 0);
|
|
@@ -218,9 +327,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
218
327
|
}] }, { type: i7.Observable, decorators: [{
|
|
219
328
|
type: Inject,
|
|
220
329
|
args: [TUI_INPUT_FILE_TEXTS]
|
|
330
|
+
}] }, { type: undefined, decorators: [{
|
|
331
|
+
type: Inject,
|
|
332
|
+
args: [TUI_INPUT_FILES_OPTIONS]
|
|
221
333
|
}] }]; }, propDecorators: { input: [{
|
|
222
334
|
type: ViewChild,
|
|
223
335
|
args: [`input`]
|
|
336
|
+
}], nativeInput: [{
|
|
337
|
+
type: ContentChild,
|
|
338
|
+
args: [TuiInputFilesDirective, { read: TuiInputFilesDirective }]
|
|
339
|
+
}], formatRejection: [{
|
|
340
|
+
type: ViewChild,
|
|
341
|
+
args: [`formatRejection`]
|
|
342
|
+
}], maxSizeRejection: [{
|
|
343
|
+
type: ViewChild,
|
|
344
|
+
args: [`maxSizeRejection`]
|
|
224
345
|
}], link: [{
|
|
225
346
|
type: Input
|
|
226
347
|
}], label: [{
|
|
@@ -235,12 +356,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
235
356
|
type: Input
|
|
236
357
|
}], reject: [{
|
|
237
358
|
type: Output
|
|
359
|
+
}], onFocused: [{
|
|
360
|
+
type: HostListener,
|
|
361
|
+
args: [`focusin`, [`true`]]
|
|
362
|
+
}, {
|
|
363
|
+
type: HostListener,
|
|
364
|
+
args: [`focusout`, [`false`]]
|
|
365
|
+
}], onFilesSelected: [{
|
|
366
|
+
type: HostListener,
|
|
367
|
+
args: [`change`]
|
|
238
368
|
}], computeLink$: [], computeLabel$: [], getValueArray: [] } });
|
|
239
369
|
|
|
240
370
|
class TuiInputFilesModule {
|
|
241
371
|
}
|
|
242
372
|
TuiInputFilesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
243
|
-
TuiInputFilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent,
|
|
373
|
+
TuiInputFilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent,
|
|
374
|
+
TuiInputFilesDirective,
|
|
375
|
+
TuiMaxSizeRejectionErrorPipe], imports: [CommonModule,
|
|
244
376
|
PolymorpheusModule,
|
|
245
377
|
TuiLetModule,
|
|
246
378
|
TuiFocusedModule,
|
|
@@ -256,6 +388,7 @@ TuiInputFilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
256
388
|
TuiButtonModule,
|
|
257
389
|
TuiGroupModule,
|
|
258
390
|
TuiFilesModule], exports: [TuiInputFilesComponent,
|
|
391
|
+
TuiInputFilesDirective,
|
|
259
392
|
TuiFilesComponent,
|
|
260
393
|
TuiFileComponent,
|
|
261
394
|
TuiItemDirective] });
|
|
@@ -298,9 +431,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
298
431
|
TuiGroupModule,
|
|
299
432
|
TuiFilesModule,
|
|
300
433
|
],
|
|
301
|
-
declarations: [
|
|
434
|
+
declarations: [
|
|
435
|
+
TuiInputFilesComponent,
|
|
436
|
+
TuiInputFilesDirective,
|
|
437
|
+
TuiMaxSizeRejectionErrorPipe,
|
|
438
|
+
],
|
|
302
439
|
exports: [
|
|
303
440
|
TuiInputFilesComponent,
|
|
441
|
+
TuiInputFilesDirective,
|
|
304
442
|
TuiFilesComponent,
|
|
305
443
|
TuiFileComponent,
|
|
306
444
|
TuiItemDirective,
|
|
@@ -312,5 +450,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
312
450
|
* Generated bundle index. Do not edit.
|
|
313
451
|
*/
|
|
314
452
|
|
|
315
|
-
export { TuiInputFilesComponent, TuiInputFilesModule };
|
|
453
|
+
export { TUI_INPUT_FILES_DEFAULT_OPTIONS, TUI_INPUT_FILES_OPTIONS, TuiInputFilesComponent, TuiInputFilesDirective, TuiInputFilesModule, tuiInputFilesOptionsProvider };
|
|
316
454
|
//# sourceMappingURL=taiga-ui-kit-components-input-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-files.js","sources":["../../../projects/kit/components/input-files/max-size-rejection-error.pipe.ts","../../../projects/kit/components/input-files/input-files.component.ts","../../../projects/kit/components/input-files/input-files.template.html","../../../projects/kit/components/input-files/input-files.module.ts","../../../projects/kit/components/input-files/taiga-ui-kit-components-input-files.ts"],"sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiInjectionTokenType} from '@taiga-ui/cdk';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiFormatSize} from '@taiga-ui/kit/utils';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n@Pipe({name: `tuiMaxSizeRejectionError`})\nexport class TuiMaxSizeRejectionErrorPipe implements PipeTransform {\n constructor(\n @Inject(TUI_INPUT_FILE_TEXTS)\n private readonly inputFileTexts$: TuiInjectionTokenType<\n typeof TUI_INPUT_FILE_TEXTS\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: TuiInjectionTokenType<\n typeof TUI_DIGITAL_INFORMATION_UNITS\n >,\n ) {}\n\n transform(maxFileSize: number): Observable<string> {\n return combineLatest([this.inputFileTexts$, this.units$]).pipe(\n map(\n ([{maxSizeRejectionReason}, units]) =>\n maxSizeRejectionReason + tuiFormatSize(units, maxFileSize),\n ),\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n TUI_IS_MOBILE,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiGetAcceptArray} 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@Component({\n selector: `tui-input-files`,\n templateUrl: `./input-files.template.html`,\n styleUrls: [`./input-files.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [MODE_PROVIDER, tuiAsFocusableItemAccessor(TuiInputFilesComponent)],\n})\nexport class TuiInputFilesComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`input`)\n private readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n accept = ``;\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Output()\n reject = new EventEmitter<TuiFileLike | readonly TuiFileLike[]>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelSingle'\n | 'defaultLabelMultiple'\n | 'defaultLinkSingle'\n | 'defaultLinkMultiple'\n | 'maxSizeRejectionReason'\n | 'formatRejectionReason'\n | 'drop'\n | 'dropMultiple',\n string\n >\n >,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get computedPseudoHovered(): boolean | null {\n return this.pseudoHover ?? (this.fileDragged || null);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n get fileDragged(): boolean {\n return !!this.dataTransfer?.types.includes(`Files`);\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n onFilesSelected(\n input: HTMLInputElement,\n errors: Record<'maxSizeRejection' | 'formatRejection', PolymorpheusContent>,\n ): void {\n this.processSelectedFiles(input.files, errors);\n input.value = ``;\n }\n\n onDropped(\n event: DataTransfer,\n errors: Record<'maxSizeRejection' | 'formatRejection', PolymorpheusContent>,\n ): void {\n this.processSelectedFiles(event.files, errors);\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n return fileDragged\n ? of(``)\n : this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ``\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of(``);\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ``\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return Array.isArray(value) ? value : [value];\n }\n\n private processSelectedFiles(\n files: FileList | null,\n errors: Record<'maxSizeRejection' | 'formatRejection', PolymorpheusContent>,\n ): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (!files?.length) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n if (tooBigFiles.length || wrongFormatFiles.length) {\n this.rejectFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.maxSizeRejection,\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.formatRejection,\n })),\n ]);\n }\n\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;\n\n return tuiGetAcceptArray(this.accept).some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split(`/`)[1] === `*` &&\n file.type.split(`/`)[0] === format.split(`/`)[0]),\n );\n }\n\n private rejectFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);\n }\n}\n","<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label automation-id=\"tui-input-file__label\">\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <ng-container *polymorpheusOutlet=\"computedLabel$ | async as text\">\n {{ text }}\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <input\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n (change)=\"onFilesSelected(input, {formatRejection, maxSizeRejection})\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiDroppableDropped)=\"onDropped($event, {formatRejection, maxSizeRejection})\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n />\n </ng-container>\n </label>\n</div>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiItemDirective,\n TuiLetModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {\n TuiFileComponent,\n TuiFilesComponent,\n TuiFilesModule,\n} from '@taiga-ui/kit/components/files';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputFilesComponent} from './input-files.component';\nimport {TuiMaxSizeRejectionErrorPipe} from './max-size-rejection-error.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiGroupModule,\n TuiFilesModule,\n ],\n declarations: [TuiInputFilesComponent, TuiMaxSizeRejectionErrorPipe],\n exports: [\n TuiInputFilesComponent,\n TuiFilesComponent,\n TuiFileComponent,\n TuiItemDirective,\n ],\n})\nexport class TuiInputFilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.TuiMaxSizeRejectionErrorPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAQa,4BAA4B,CAAA;IACrC,WAEqB,CAAA,eAEhB,EAEgB,MAEhB,EAAA;QANgB,IAAe,CAAA,eAAA,GAAf,eAAe,CAE/B;QAEgB,IAAM,CAAA,MAAA,GAAN,MAAM,CAEtB;KACD;AAEJ,IAAA,SAAS,CAAC,WAAmB,EAAA;AACzB,QAAA,OAAO,aAAa,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAC1D,GAAG,CACC,CAAC,CAAC,EAAC,sBAAsB,EAAC,EAAE,KAAK,CAAC,KAC9B,sBAAsB,GAAG,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,CACjE,CACJ,CAAC;KACL;;0HAnBQ,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAEzB,oBAAoB,EAAA,EAAA,EAAA,KAAA,EAIpB,6BAA6B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;wHANhC,4BAA4B,EAAA,IAAA,EAAA,0BAAA,EAAA,CAAA,CAAA;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC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AAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EA1BnB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,YAAY;YACZ,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;YACf,cAAc;YACd,cAAc;AACjB,SAAA,CAAA,EAAA,CAAA,CAAA;4FASQ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA3B/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,YAAY;wBACZ,gBAAgB;wBAChB,qBAAqB;wBACrB,gBAAgB;wBAChB,gBAAgB;wBAChB,kBAAkB;wBAClB,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,eAAe;wBACf,cAAc;wBACd,cAAc;AACjB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;AACpE,oBAAA,OAAO,EAAE;wBACL,sBAAsB;wBACtB,iBAAiB;wBACjB,gBAAgB;wBAChB,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACxDD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-files.js","sources":["../../../projects/kit/components/input-files/input-files.options.ts","../../../projects/kit/components/input-files/input-files.directive.ts","../../../projects/kit/components/input-files/max-size-rejection-error.pipe.ts","../../../projects/kit/components/input-files/input-files.component.ts","../../../projects/kit/components/input-files/input-files.template.html","../../../projects/kit/components/input-files/input-files.module.ts","../../../projects/kit/components/input-files/taiga-ui-kit-components-input-files.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiSizeL} from '@taiga-ui/core';\n\nexport interface TuiInputFilesOptions {\n /**\n * @description:\n * user - The user-facing camera and/or microphone should be used.\n * environment - The outward-facing camera and/or microphone should be used\n */\n capture: 'environment' | 'user' | null;\n accepts: string;\n multiple: boolean;\n size: TuiSizeL;\n maxFileSize: number;\n}\n\nexport const TUI_INPUT_FILES_DEFAULT_OPTIONS: TuiInputFilesOptions = {\n capture: null,\n accepts: ``,\n multiple: false,\n size: `m`,\n maxFileSize: 30 * 1000 * 1000, // 30 MB\n};\n\nexport const TUI_INPUT_FILES_OPTIONS = new InjectionToken<TuiInputFilesOptions>(\n `[TUI_INPUT_FILES_OPTIONS]: Default parameters for input files component`,\n {\n factory: () => TUI_INPUT_FILES_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiInputFilesOptionsProvider: (\n options: Partial<TuiInputFilesOptions>,\n) => ValueProvider = (options: Partial<TuiInputFilesOptions>) => ({\n provide: TUI_INPUT_FILES_OPTIONS,\n useValue: {...TUI_INPUT_FILES_DEFAULT_OPTIONS, ...options},\n});\n","import {Directive, ElementRef, HostBinding, Inject} from '@angular/core';\nimport {TuiIdService} from '@taiga-ui/cdk';\n\n// eslint-disable-next-line import/no-cycle\nimport {TuiInputFilesComponent} from './input-files.component';\nimport {TUI_INPUT_FILES_OPTIONS, TuiInputFilesOptions} from './input-files.options';\n\n@Directive({\n selector: `input[tuiInputFiles]`,\n host: {\n type: `file`,\n class: `t-native`,\n },\n})\nexport class TuiInputFilesDirective {\n constructor(\n @Inject(TuiInputFilesComponent) readonly host: TuiInputFilesComponent,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLInputElement>,\n @Inject(TuiIdService) private readonly idService: TuiIdService,\n @Inject(TUI_INPUT_FILES_OPTIONS) private readonly options: TuiInputFilesOptions,\n ) {}\n\n @HostBinding(`tabIndex`)\n get tabIndex(): number {\n return this.host.focusable ? 0 : -1;\n }\n\n @HostBinding(`id`)\n get id(): string {\n return this.elementRef.nativeElement.id || this.idService.generate();\n }\n\n @HostBinding(`accept`)\n get accept(): TuiInputFilesOptions['accepts'] {\n return this.elementRef.nativeElement.accept ?? this.options.accepts;\n }\n\n @HostBinding(`multiple`)\n get multiple(): TuiInputFilesOptions['multiple'] {\n return this.elementRef.nativeElement.multiple ?? this.options.multiple;\n }\n\n @HostBinding(`capture`)\n get capture(): TuiInputFilesOptions['capture'] {\n return (\n (\n this.elementRef.nativeElement as HTMLInputElement & {\n capture: TuiInputFilesOptions['capture'];\n }\n ).capture ?? this.options.capture\n );\n }\n\n get input(): HTMLInputElement {\n return this.elementRef.nativeElement;\n }\n}\n","import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiInjectionTokenType} from '@taiga-ui/cdk';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiFormatSize} from '@taiga-ui/kit/utils';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n@Pipe({name: `tuiMaxSizeRejectionError`})\nexport class TuiMaxSizeRejectionErrorPipe implements PipeTransform {\n constructor(\n @Inject(TUI_INPUT_FILE_TEXTS)\n private readonly inputFileTexts$: TuiInjectionTokenType<\n typeof TUI_INPUT_FILE_TEXTS\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: TuiInjectionTokenType<\n typeof TUI_DIGITAL_INFORMATION_UNITS\n >,\n ) {}\n\n transform(maxFileSize: number): Observable<string> {\n return combineLatest([this.inputFileTexts$, this.units$]).pipe(\n map(\n ([{maxSizeRejectionReason}, units]) =>\n maxSizeRejectionReason + tuiFormatSize(units, maxFileSize),\n ),\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n TUI_IS_MOBILE,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiGetAcceptArray} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// eslint-disable-next-line import/no-cycle\nimport {TuiInputFilesDirective} from './input-files.directive';\nimport {TUI_INPUT_FILES_OPTIONS, TuiInputFilesOptions} from './input-files.options';\n\n@Component({\n selector: `tui-input-files`,\n templateUrl: `./input-files.template.html`,\n styleUrls: [`./input-files.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [MODE_PROVIDER, tuiAsFocusableItemAccessor(TuiInputFilesComponent)],\n})\nexport class TuiInputFilesComponent\n extends AbstractTuiNullableControl<TuiFileLike | readonly TuiFileLike[]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`input`)\n private readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\n\n @ContentChild(TuiInputFilesDirective, {read: TuiInputFilesDirective})\n readonly nativeInput?: TuiInputFilesDirective;\n\n @ViewChild(`formatRejection`)\n readonly formatRejection!: PolymorpheusContent;\n\n @ViewChild(`maxSizeRejection`)\n readonly maxSizeRejection!: PolymorpheusContent;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = ``;\n\n /**\n * @deprecated: use `<input tuiInputFiles accept=\"image/*\" />`\n */\n @Input()\n @tuiDefaultProp()\n accept = this.options.accepts;\n\n /**\n * @deprecated: use `<input tuiInputFiles multiple />`\n */\n @Input()\n @tuiDefaultProp()\n multiple = this.options.multiple;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = this.options.maxFileSize;\n\n @Output()\n reject = new EventEmitter<TuiFileLike | readonly TuiFileLike[]>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelMultiple'\n | 'defaultLabelSingle'\n | 'defaultLinkMultiple'\n | 'defaultLinkSingle'\n | 'drop'\n | 'dropMultiple'\n | 'formatRejectionReason'\n | 'maxSizeRejectionReason',\n string\n >\n >,\n @Inject(TUI_INPUT_FILES_OPTIONS)\n readonly options: TuiInputFilesOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get computedMultiple(): boolean {\n return this.nativeInput?.multiple ?? this.multiple;\n }\n\n get computedAccept(): string {\n return this.nativeInput?.accept ?? this.accept;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get computedPseudoHovered(): boolean | null {\n return this.pseudoHover ?? (this.fileDragged || null);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.computedMultiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.computedMultiple,\n this.label,\n );\n }\n\n get fileDragged(): boolean {\n return !!this.dataTransfer?.types.includes(`Files`);\n }\n\n get arrayValue(): readonly TuiFileLike[] {\n return this.getValueArray(this.value);\n }\n\n @HostListener(`focusin`, [`true`])\n @HostListener(`focusout`, [`false`])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n @HostListener(`change`)\n onFilesSelected(): void {\n const input = this.nativeInput?.input ?? this.input?.nativeElement;\n\n if (!input) {\n return;\n }\n\n this.processSelectedFiles(input.files);\n\n input.value = ``;\n }\n\n onDropped(event: DataTransfer): void {\n this.processSelectedFiles(event.files);\n }\n\n onDragOver(dataTransfer: DataTransfer | null): void {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike): void {\n this.updateValue(\n this.computedMultiple\n ? this.arrayValue.filter(file => file !== removedFile)\n : null,\n );\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n return fileDragged\n ? of(``)\n : this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ``\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of(``);\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ``\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | readonly TuiFileLike[] | null,\n ): readonly TuiFileLike[] {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return Array.isArray(value) ? value : [value];\n }\n\n private processSelectedFiles(files: FileList | null): void {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (!files?.length) {\n return;\n }\n\n const errors: Record<\n 'formatRejection' | 'maxSizeRejection',\n PolymorpheusContent\n > = {\n formatRejection: this.formatRejection,\n maxSizeRejection: this.maxSizeRejection,\n };\n\n const newFiles = this.computedMultiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n if (tooBigFiles.length || wrongFormatFiles.length) {\n this.rejectFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.maxSizeRejection,\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: errors.formatRejection,\n })),\n ]);\n }\n\n this.updateValue(\n this.computedMultiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.computedAccept) {\n return true;\n }\n\n const extension = `.${(file.name.split(`.`).pop() || ``).toLowerCase()}`;\n\n return tuiGetAcceptArray(this.computedAccept).some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split(`/`)[1] === `*` &&\n file.type.split(`/`)[0] === format.split(`/`)[0]),\n );\n }\n\n private rejectFiles(rejectedFiles: readonly TuiFileLike[]): void {\n this.reject.emit(this.computedMultiple ? rejectedFiles : rejectedFiles[0]);\n }\n}\n","<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n (tuiDroppableDropped)=\"onDropped($event)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n >\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <ng-container *polymorpheusOutlet=\"computedLabel$ | async as text\">\n {{ text }}\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <ng-content select=\"input\"></ng-content>\n <input\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n />\n </ng-container>\n </label>\n</div>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiItemDirective,\n TuiLetModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {\n TuiFileComponent,\n TuiFilesComponent,\n TuiFilesModule,\n} from '@taiga-ui/kit/components/files';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputFilesComponent} from './input-files.component';\nimport {TuiInputFilesDirective} from './input-files.directive';\nimport {TuiMaxSizeRejectionErrorPipe} from './max-size-rejection-error.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiGroupModule,\n TuiFilesModule,\n ],\n declarations: [\n TuiInputFilesComponent,\n TuiInputFilesDirective,\n TuiMaxSizeRejectionErrorPipe,\n ],\n exports: [\n TuiInputFilesComponent,\n TuiInputFilesDirective,\n TuiFilesComponent,\n TuiFileComponent,\n TuiItemDirective,\n ],\n})\nexport class TuiInputFilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.TuiMaxSizeRejectionErrorPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBa,MAAA,+BAA+B,GAAyB;AACjE,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,OAAO,EAAE,CAAE,CAAA;AACX,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,WAAW,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;EAC/B;MAEW,uBAAuB,GAAG,IAAI,cAAc,CACrD,yEAAyE,EACzE;AACI,IAAA,OAAO,EAAE,MAAM,+BAA+B;AACjD,CAAA,EACH;MAEW,4BAA4B,GAEpB,CAAC,OAAsC,MAAM;AAC9D,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,+BAA+B,CAAK,EAAA,OAAO,CAAC;AAC7D,CAAA;;MCtBY,sBAAsB,CAAA;AAC/B,IAAA,WAAA,CAC6C,IAA4B,EAChC,UAAwC,EACtC,SAAuB,EACZ,OAA6B,EAAA;QAHtC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAwB;QAChC,IAAU,CAAA,UAAA,GAAV,UAAU,CAA8B;QACtC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;QACZ,IAAO,CAAA,OAAA,GAAP,OAAO,CAAsB;KAC/E;AAEJ,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;KACvC;AAED,IAAA,IACI,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,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,YAAY;YACZ,gBAAgB;YAChB,qBAAqB;YACrB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;YACf,cAAc;YACd,cAAc;AACjB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAcQ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAhC/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,YAAY;wBACZ,gBAAgB;wBAChB,qBAAqB;wBACrB,gBAAgB;wBAChB,gBAAgB;wBAChB,kBAAkB;wBAClB,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,eAAe;wBACf,cAAc;wBACd,cAAc;AACjB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;AAC/B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,sBAAsB;wBACtB,sBAAsB;wBACtB,iBAAiB;wBACjB,gBAAgB;wBAChB,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;AC9DD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-inline.js","sources":["../../../projects/kit/components/input-inline/input-inline.component.ts","../../../projects/kit/components/input-inline/input-inline.template.html","../../../projects/kit/components/input-inline/input-inline.module.ts","../../../projects/kit/components/input-inline/taiga-ui-kit-components-input-inline.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TUI_VALUE_ACCESSOR_PROVIDER} from '@taiga-ui/kit/providers';\n\n@Component({\n selector: `tui-input-inline`,\n templateUrl: `./input-inline.template.html`,\n styleUrls: [`./input-inline.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TUI_VALUE_ACCESSOR_PROVIDER,\n tuiAsFocusableItemAccessor(TuiInputInlineComponent),\n ],\n})\nexport class TuiInputInlineComponent\n extends AbstractTuiControl<
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-inline.js","sources":["../../../projects/kit/components/input-inline/input-inline.component.ts","../../../projects/kit/components/input-inline/input-inline.template.html","../../../projects/kit/components/input-inline/input-inline.module.ts","../../../projects/kit/components/input-inline/taiga-ui-kit-components-input-inline.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiIsNativeFocused,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {TUI_VALUE_ACCESSOR_PROVIDER} from '@taiga-ui/kit/providers';\n\n@Component({\n selector: `tui-input-inline`,\n templateUrl: `./input-inline.template.html`,\n styleUrls: [`./input-inline.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TUI_VALUE_ACCESSOR_PROVIDER,\n tuiAsFocusableItemAccessor(TuiInputInlineComponent),\n ],\n})\nexport class TuiInputInlineComponent\n extends AbstractTuiControl<number | string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(`native`)\n private readonly native?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n maxLength: number | null = null;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.native ? null : this.native.nativeElement;\n }\n\n get focused(): boolean {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n\n get hasValue(): boolean {\n return this.value !== ``;\n }\n\n onValueChange(value: string): void {\n this.updateValue(value);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n}\n","<span class=\"t-before\">{{ value }}</span>\n\n<span\n *ngIf=\"!hasValue\"\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n>\n <ng-content></ng-content>\n</span>\n\n<input\n #native\n automation-id=\"tui-input-inline__native\"\n type=\"text\"\n tuiMaskAccessor\n class=\"t-native\"\n [attr.maxLength]=\"maxLength\"\n [id]=\"id\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiFocusable]=\"focusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n/>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiFocusedModule} from '@taiga-ui/cdk';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core';\n\nimport {TuiInputInlineComponent} from './input-inline.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiMaskAccessorModule,\n ],\n declarations: [TuiInputInlineComponent],\n exports: [TuiInputInlineComponent],\n})\nexport class TuiInputInlineModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgCM,MAAO,uBACT,SAAQ,kBAAmC,CAAA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AAA,CAAA;4FAIQ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;AACxB,qBAAA;oBACD,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACrC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -4,7 +4,7 @@ import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self,
|
|
|
4
4
|
import * as i5 from '@angular/forms';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
6
|
import * as i3 from '@taiga-ui/cdk';
|
|
7
|
-
import { AbstractTuiNullableControl, ALWAYS_FALSE_HANDLER, CHAR_EN_DASH, TuiMonthRange, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, AbstractTuiControl, TuiDestroyService, TuiPreventDefaultModule, TuiActiveZoneModule, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
7
|
+
import { AbstractTuiNullableControl, ALWAYS_FALSE_HANDLER, TuiDay, tuiDateClamp, CHAR_EN_DASH, TuiMonthRange, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, AbstractTuiControl, TuiDestroyService, TuiPreventDefaultModule, TuiActiveZoneModule, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
8
8
|
import * as i1 from '@taiga-ui/core';
|
|
9
9
|
import { TuiMonthPipe, TuiPrimitiveTextfieldComponent, AbstractTuiTextfieldHost, tuiAsTextfieldHost, TuiHostedDropdownModule, TuiPrimitiveTextfieldModule, TuiSvgModule, TuiTextfieldControllerModule, TuiTextfieldComponent } from '@taiga-ui/core';
|
|
10
10
|
import { TUI_MONTH_FORMATTER_PROVIDER } from '@taiga-ui/kit/providers';
|
|
@@ -25,11 +25,16 @@ class TuiInputMonthRangeComponent extends AbstractTuiNullableControl {
|
|
|
25
25
|
this.min = this.options.min;
|
|
26
26
|
this.max = this.options.max;
|
|
27
27
|
this.disabledItemHandler = ALWAYS_FALSE_HANDLER;
|
|
28
|
+
this.defaultActiveYear = TuiDay.currentLocal();
|
|
28
29
|
this.open = false;
|
|
29
30
|
}
|
|
30
31
|
get nativeFocusableElement() {
|
|
31
32
|
return this.textfield ? this.textfield.nativeFocusableElement : null;
|
|
32
33
|
}
|
|
34
|
+
get computedDefaultActiveYear() {
|
|
35
|
+
var _a;
|
|
36
|
+
return (((_a = this.value) === null || _a === void 0 ? void 0 : _a.from) || tuiDateClamp(this.defaultActiveYear, this.min, this.max));
|
|
37
|
+
}
|
|
33
38
|
get focused() {
|
|
34
39
|
return !!this.textfield && this.textfield.focused;
|
|
35
40
|
}
|
|
@@ -77,12 +82,12 @@ class TuiInputMonthRangeComponent extends AbstractTuiNullableControl {
|
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
84
|
TuiInputMonthRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputMonthRangeComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_MONTH_FORMATTER }, { token: TUI_INPUT_DATE_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
-
TuiInputMonthRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputMonthRangeComponent, selector: "tui-input-month-range", inputs: { min: "min", max: "max", disabledItemHandler: "disabledItemHandler" }, providers: [
|
|
85
|
+
TuiInputMonthRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputMonthRangeComponent, selector: "tui-input-month-range", inputs: { min: "min", max: "max", disabledItemHandler: "disabledItemHandler", defaultActiveYear: "defaultActiveYear" }, providers: [
|
|
81
86
|
tuiAsFocusableItemAccessor(TuiInputMonthRangeComponent),
|
|
82
87
|
tuiAsControl(TuiInputMonthRangeComponent),
|
|
83
88
|
TUI_MONTH_FORMATTER_PROVIDER,
|
|
84
89
|
TuiMonthPipe,
|
|
85
|
-
], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n class=\"t-textfield\"\n [editable]=\"false\"\n [disabled]=\"computedDisabled\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"calendarIcon\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [value]=\"\n value\n ? computeValue(value.from | tuiMapper: formatter | async, value.to | tuiMapper: formatter | async)\n : ''\n \"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n </tui-primitive-textfield>\n\n <ng-template #dropdown>\n <tui-calendar-month\n tuiPreventDefault=\"mousedown\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"value\"\n (monthClick)=\"onMonthClick($event)\"\n ></tui-calendar-month>\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2.TuiCalendarMonthComponent, selector: "tui-calendar-month", inputs: ["value", "year", "disabledItemHandler", "min", "max"], outputs: ["monthClick", "hoveredItemChange", "yearChange"] }], directives: [{ type: i3.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i3.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]" }], pipes: { "async": i4.AsyncPipe, "tuiMapper": i3.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
90
|
+
], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n class=\"t-textfield\"\n [editable]=\"false\"\n [disabled]=\"computedDisabled\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"calendarIcon\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [value]=\"\n value\n ? computeValue(value.from | tuiMapper: formatter | async, value.to | tuiMapper: formatter | async)\n : ''\n \"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n </tui-primitive-textfield>\n\n <ng-template #dropdown>\n <tui-calendar-month\n tuiPreventDefault=\"mousedown\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"value\"\n [year]=\"computedDefaultActiveYear\"\n (monthClick)=\"onMonthClick($event)\"\n ></tui-calendar-month>\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2.TuiCalendarMonthComponent, selector: "tui-calendar-month", inputs: ["value", "year", "disabledItemHandler", "min", "max"], outputs: ["monthClick", "hoveredItemChange", "yearChange"] }], directives: [{ type: i3.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i3.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]" }], pipes: { "async": i4.AsyncPipe, "tuiMapper": i3.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
91
|
__decorate([
|
|
87
92
|
tuiDefaultProp()
|
|
88
93
|
], TuiInputMonthRangeComponent.prototype, "min", void 0);
|
|
@@ -92,6 +97,9 @@ __decorate([
|
|
|
92
97
|
__decorate([
|
|
93
98
|
tuiDefaultProp()
|
|
94
99
|
], TuiInputMonthRangeComponent.prototype, "disabledItemHandler", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
tuiDefaultProp()
|
|
102
|
+
], TuiInputMonthRangeComponent.prototype, "defaultActiveYear", void 0);
|
|
95
103
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputMonthRangeComponent, decorators: [{
|
|
96
104
|
type: Component,
|
|
97
105
|
args: [{
|
|
@@ -131,6 +139,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
131
139
|
type: Input
|
|
132
140
|
}], disabledItemHandler: [{
|
|
133
141
|
type: Input
|
|
142
|
+
}], defaultActiveYear: [{
|
|
143
|
+
type: Input
|
|
134
144
|
}] } });
|
|
135
145
|
|
|
136
146
|
class TuiInputMonthRangeDirective extends AbstractTuiTextfieldHost {
|