@taiga-ui/legacy 4.52.0-canary.24b31eb → 4.52.0-canary.2fa3dd5
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 +1 -1
- package/classes/abstract-textfield-host.d.ts +1 -1
- package/components/arrow/arrow.options.d.ts +1 -3
- package/components/arrow/arrow.providers.d.ts +1 -6
- package/components/dialog/dialog.component.d.ts +5 -6
- package/components/dialog/dialog.directive.d.ts +4 -3
- package/components/dialog/dialog.interfaces.d.ts +3 -4
- package/components/dialog/dialog.service.d.ts +5 -2
- package/components/dialog/dialog.tokens.d.ts +1 -3
- package/components/index.d.ts +2 -1
- package/components/input/input.module.d.ts +4 -4
- package/components/input-date-range/input-date-range.component.d.ts +1 -2
- package/components/input-date-range/input-date-range.module.d.ts +8 -9
- package/components/input-date-time/input-date-time.component.d.ts +5 -5
- package/components/input-date-time/input-date-time.module.d.ts +6 -6
- package/components/input-month-range/input-month-range.module.d.ts +3 -3
- package/components/input-number/input-number.component.d.ts +1 -2
- package/components/input-number/input-number.module.d.ts +5 -5
- package/components/input-number/input-number.options.d.ts +1 -7
- package/components/input-range/input-range.component.d.ts +1 -1
- package/components/input-range/input-range.module.d.ts +4 -4
- package/components/input-tag/input-tag.module.d.ts +8 -8
- package/components/input-tag/input-tag.options.d.ts +1 -7
- package/components/mobile-dialog/index.d.ts +3 -0
- package/components/mobile-dialog/mobile-dialog.component.d.ts +10 -0
- package/components/mobile-dialog/mobile-dialog.options.d.ts +10 -0
- package/components/mobile-dialog/mobile-dialog.service.d.ts +14 -0
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select.module.d.ts +11 -12
- package/components/multi-select/multi-select.options.d.ts +1 -3
- package/components/pdf-viewer/index.d.ts +4 -0
- package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
- package/components/pdf-viewer/pdf-viewer.directive.d.ts +8 -0
- package/components/pdf-viewer/pdf-viewer.options.d.ts +11 -0
- package/components/pdf-viewer/pdf-viewer.service.d.ts +17 -0
- package/components/primitive-textfield/primitive-textfield-options.d.ts +2 -2
- package/components/primitive-textfield/primitive-textfield.module.d.ts +5 -5
- package/components/select/select.module.d.ts +8 -8
- package/components/select/select.options.d.ts +1 -7
- package/components/select-option/select-option.module.d.ts +3 -3
- package/components/tag/tag.module.d.ts +4 -4
- package/components/tag/tag.options.d.ts +1 -7
- package/components/textarea/textarea.module.d.ts +7 -7
- package/directives/textfield-controller/textfield.options.d.ts +1 -3
- package/fesm2022/taiga-ui-legacy-classes.mjs +1 -3
- package/fesm2022/taiga-ui-legacy-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs +4 -17
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs +32 -26
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +33 -43
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +30 -36
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +10 -10
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs +26 -41
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs +12 -12
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +27 -35
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input.mjs +7 -6
- package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +62 -0
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -0
- package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +33 -41
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +88 -0
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -0
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +16 -16
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs +6 -6
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select.mjs +29 -37
- package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-tag.mjs +13 -22
- package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-textarea.mjs +24 -24
- package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components.mjs +2 -1
- package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -1
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +3 -7
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +1 -3
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-utils.mjs +1 -7
- package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy.mjs +0 -1
- package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +13 -22
- package/utils/icons-path-factory.d.ts +1 -1
- package/utils/index.d.ts +0 -1
- package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
- package/components/combo-box/combo-box.component.d.ts +0 -52
- package/components/combo-box/combo-box.directive.d.ts +0 -13
- package/components/combo-box/combo-box.module.d.ts +0 -20
- package/components/combo-box/index.d.ts +0 -4
- package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -299
- package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs +0 -59
- package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -50
- package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs +0 -80
- package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-pipes.mjs +0 -8
- package/fesm2022/taiga-ui-legacy-pipes.mjs.map +0 -1
- package/pipes/format-phone/format-phone.pipe.d.ts +0 -37
- package/pipes/format-phone/index.d.ts +0 -1
- package/pipes/index.d.ts +0 -3
- package/pipes/iso-to-country-code/index.d.ts +0 -1
- package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +0 -30
- package/pipes/to-country-code/index.d.ts +0 -1
- package/pipes/to-country-code/to-country-code.pipe.d.ts +0 -38
- package/utils/is-apple.d.ts +0 -5
|
@@ -5,9 +5,9 @@ import { TuiDataListDirective, tuiAsDataListHost } from '@taiga-ui/core/componen
|
|
|
5
5
|
import * as i1 from '@taiga-ui/core/directives/dropdown';
|
|
6
6
|
import { TuiDropdownOpen, TuiDropdownFixed, TuiDropdown } from '@taiga-ui/core/directives/dropdown';
|
|
7
7
|
import { AbstractTuiControl, tuiAsControl, AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i3 from '@taiga-ui/legacy/components/primitive-textfield';
|
|
9
9
|
import { TuiPrimitiveTextfieldComponent, TuiTextfieldComponent, TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i2 from '@taiga-ui/legacy/directives';
|
|
11
11
|
import { TUI_TEXTFIELD_SIZE, TUI_VALUE_ACCESSOR_PROVIDER, TuiLegacyDropdownOpenMonitorDirective } from '@taiga-ui/legacy/directives';
|
|
12
12
|
import { tuiAsFocusableItemAccessor, tuiAsTextfieldHost } from '@taiga-ui/legacy/tokens';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
@@ -72,7 +72,7 @@ class TuiInputComponent extends AbstractTuiControl {
|
|
|
72
72
|
tuiAsFocusableItemAccessor(TuiInputComponent),
|
|
73
73
|
tuiAsDataListHost(TuiInputComponent),
|
|
74
74
|
tuiAsControl(TuiInputComponent),
|
|
75
|
-
], queries: [{ propertyName: "datalist", first: true, predicate: TuiDataListDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: TuiDropdownOpen, descendants: true }, { propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiDropdownFixed }], ngImport: i0, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"datalist || ''\"\n [tuiDropdownEnabled]=\"canOpen\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input__textfield\"\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"computedFocusable\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n </tui-primitive-textfield>\n</div>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:start}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], dependencies: [{ kind: "
|
|
75
|
+
], queries: [{ propertyName: "datalist", first: true, predicate: TuiDataListDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: TuiDropdownOpen, descendants: true }, { propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiDropdownFixed }], ngImport: i0, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"datalist || ''\"\n [tuiDropdownEnabled]=\"canOpen\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input__textfield\"\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"computedFocusable\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n </tui-primitive-textfield>\n</div>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:start}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], dependencies: [{ kind: "directive", type: i2.TuiLegacyDropdownOpenMonitorDirective, selector: "[tuiDropdownOpenMonitor]" }, { kind: "component", type: i3.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "iconCleaner", "readOnly", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i3.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { kind: "directive", type: i1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
76
76
|
}
|
|
77
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputComponent, decorators: [{
|
|
78
78
|
type: Component,
|
|
@@ -122,9 +122,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
122
122
|
class TuiInputModule {
|
|
123
123
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
124
124
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiInputModule, declarations: [TuiInputComponent, TuiInputDirective], imports: [CommonModule,
|
|
125
|
-
|
|
125
|
+
TuiLegacyDropdownOpenMonitorDirective,
|
|
126
|
+
TuiPrimitiveTextfieldModule, i1.TuiDropdownOptionsDirective, i1.TuiDropdownDriverDirective, i1.TuiDropdownDirective, i1.TuiDropdownComponent, i1.TuiDropdownOpen, i1.TuiDropdownOpenLegacy, i1.TuiDropdownManual, i1.TuiDropdownHover, i1.TuiDropdownContent, i1.TuiDropdownContext, i1.TuiDropdownPosition, i1.TuiDropdownPositionSided, i1.TuiDropdownSelection], exports: [TuiInputComponent,
|
|
126
127
|
TuiInputDirective,
|
|
127
|
-
TuiTextfieldComponent, i1.TuiDropdownOptionsDirective, i1.TuiDropdownDriverDirective, i1.TuiDropdownDirective, i1.TuiDropdownComponent, i1.TuiDropdownOpen, i1.TuiDropdownOpenLegacy, i1.
|
|
128
|
+
TuiTextfieldComponent, i1.TuiDropdownOptionsDirective, i1.TuiDropdownDriverDirective, i1.TuiDropdownDirective, i1.TuiDropdownComponent, i1.TuiDropdownOpen, i1.TuiDropdownOpenLegacy, i1.TuiDropdownManual, i1.TuiDropdownHover, i1.TuiDropdownContent, i1.TuiDropdownContext, i1.TuiDropdownPosition, i1.TuiDropdownPositionSided, i1.TuiDropdownSelection] }); }
|
|
128
129
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputModule, imports: [CommonModule,
|
|
129
130
|
TuiPrimitiveTextfieldModule, i1.TuiDropdownComponent] }); }
|
|
130
131
|
}
|
|
@@ -133,9 +134,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
133
134
|
args: [{
|
|
134
135
|
imports: [
|
|
135
136
|
CommonModule,
|
|
137
|
+
TuiLegacyDropdownOpenMonitorDirective,
|
|
136
138
|
TuiPrimitiveTextfieldModule,
|
|
137
139
|
...TuiDropdown,
|
|
138
|
-
TuiLegacyDropdownOpenMonitorDirective,
|
|
139
140
|
],
|
|
140
141
|
declarations: [TuiInputComponent, TuiInputDirective],
|
|
141
142
|
exports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-components-input.mjs","sources":["../../../projects/legacy/components/input/input.component.ts","../../../projects/legacy/components/input/input.template.html","../../../projects/legacy/components/input/input.directive.ts","../../../projects/legacy/components/input/input.module.ts","../../../projects/legacy/components/input/taiga-ui-legacy-components-input.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {type TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {\n tuiAsDataListHost,\n TuiDataListDirective,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiDropdownFixed, TuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {AbstractTuiControl, tuiAsControl} from '@taiga-ui/legacy/classes';\nimport {TuiPrimitiveTextfieldComponent} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {\n TUI_TEXTFIELD_SIZE,\n TUI_VALUE_ACCESSOR_PROVIDER,\n} from '@taiga-ui/legacy/directives';\nimport {\n tuiAsFocusableItemAccessor,\n type TuiFocusableElementAccessor,\n} from '@taiga-ui/legacy/tokens';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@Component({\n standalone: false,\n selector: 'tui-input',\n templateUrl: './input.template.html',\n styleUrls: ['./input.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TUI_VALUE_ACCESSOR_PROVIDER,\n tuiAsFocusableItemAccessor(TuiInputComponent),\n tuiAsDataListHost(TuiInputComponent),\n tuiAsControl(TuiInputComponent),\n ],\n hostDirectives: [TuiDropdownFixed],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiInputComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string>\n{\n @ViewChild(TuiDropdownOpen)\n private readonly dropdown?: TuiDropdownOpen;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private readonly textfieldSize = inject(TUI_TEXTFIELD_SIZE);\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n protected readonly datalist: PolymorpheusContent<TuiContext<TuiActiveZone>>;\n\n public open = false;\n\n public get size(): TuiSizeL | TuiSizeS {\n return this.textfieldSize.size;\n }\n\n public get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n public get focused(): boolean {\n return (\n tuiIsFocused(this.nativeFocusableElement) || !!this.dropdown?.tuiDropdownOpen\n );\n }\n\n public handleOption(item: unknown): void {\n this.setNativeValue(String(item));\n this.focusInput();\n this.value = String(item);\n this.open = false;\n }\n\n public onValueChange(value: string): void {\n this.value = value;\n this.open = this.canOpen;\n setTimeout(() => {\n this.open = this.canOpen;\n this.cdr.detectChanges();\n });\n }\n\n protected get canOpen(): boolean {\n return this.interactive && !!this.datalist;\n }\n\n protected onActiveZone(active: boolean): void {\n this.updateFocused(active);\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private focusInput(preventScroll = false): void {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.focus({preventScroll});\n }\n }\n\n private setNativeValue(value: string): void {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = value;\n }\n }\n}\n","<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"datalist || ''\"\n [tuiDropdownEnabled]=\"canOpen\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input__textfield\"\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"computedFocusable\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n </tui-primitive-textfield>\n</div>\n","import {Directive} from '@angular/core';\nimport {AbstractTuiTextfieldHost} from '@taiga-ui/legacy/classes';\nimport {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';\n\nimport {type TuiInputComponent} from './input.component';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@Directive({\n standalone: false,\n selector: 'tui-input',\n providers: [tuiAsTextfieldHost(TuiInputDirective)],\n})\nexport class TuiInputDirective extends AbstractTuiTextfieldHost<TuiInputComponent> {\n public onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/directives/dropdown';\nimport {\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {TuiLegacyDropdownOpenMonitorDirective} from '@taiga-ui/legacy/directives';\n\nimport {TuiInputComponent} from './input.component';\nimport {TuiInputDirective} from './input.directive';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@NgModule({\n imports: [\n CommonModule,\n TuiPrimitiveTextfieldModule,\n ...TuiDropdown,\n TuiLegacyDropdownOpenMonitorDirective,\n ],\n declarations: [TuiInputComponent, TuiInputDirective],\n exports: [\n TuiInputComponent,\n TuiInputDirective,\n TuiTextfieldComponent,\n ...TuiDropdown,\n ],\n})\nexport class TuiInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA8BA;;;AAGG;AAkBG,MAAO,iBACT,SAAQ,kBAA0B,C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CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA;;4FAYtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,2BAA2B;AAC3B,wBAAA,GAAG,WAAW;wBACd,qCAAqC;AACxC,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE;wBACL,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;AACrB,wBAAA,GAAG,WAAW;AACjB,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-components-input.mjs","sources":["../../../projects/legacy/components/input/input.component.ts","../../../projects/legacy/components/input/input.template.html","../../../projects/legacy/components/input/input.directive.ts","../../../projects/legacy/components/input/input.module.ts","../../../projects/legacy/components/input/taiga-ui-legacy-components-input.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {type TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiIsFocused} from '@taiga-ui/cdk/utils/focus';\nimport {\n tuiAsDataListHost,\n TuiDataListDirective,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiDropdownFixed, TuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {AbstractTuiControl, tuiAsControl} from '@taiga-ui/legacy/classes';\nimport {TuiPrimitiveTextfieldComponent} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {\n TUI_TEXTFIELD_SIZE,\n TUI_VALUE_ACCESSOR_PROVIDER,\n} from '@taiga-ui/legacy/directives';\nimport {\n tuiAsFocusableItemAccessor,\n type TuiFocusableElementAccessor,\n} from '@taiga-ui/legacy/tokens';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@Component({\n standalone: false,\n selector: 'tui-input',\n templateUrl: './input.template.html',\n styleUrl: './input.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TUI_VALUE_ACCESSOR_PROVIDER,\n tuiAsFocusableItemAccessor(TuiInputComponent),\n tuiAsDataListHost(TuiInputComponent),\n tuiAsControl(TuiInputComponent),\n ],\n hostDirectives: [TuiDropdownFixed],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiInputComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string>\n{\n @ViewChild(TuiDropdownOpen)\n private readonly dropdown?: TuiDropdownOpen;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n private readonly textfieldSize = inject(TUI_TEXTFIELD_SIZE);\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n protected readonly datalist: PolymorpheusContent<TuiContext<TuiActiveZone>>;\n\n public open = false;\n\n public get size(): TuiSizeL | TuiSizeS {\n return this.textfieldSize.size;\n }\n\n public get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n public get focused(): boolean {\n return (\n tuiIsFocused(this.nativeFocusableElement) || !!this.dropdown?.tuiDropdownOpen\n );\n }\n\n public handleOption(item: unknown): void {\n this.setNativeValue(String(item));\n this.focusInput();\n this.value = String(item);\n this.open = false;\n }\n\n public onValueChange(value: string): void {\n this.value = value;\n this.open = this.canOpen;\n setTimeout(() => {\n this.open = this.canOpen;\n this.cdr.detectChanges();\n });\n }\n\n protected get canOpen(): boolean {\n return this.interactive && !!this.datalist;\n }\n\n protected onActiveZone(active: boolean): void {\n this.updateFocused(active);\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private focusInput(preventScroll = false): void {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.focus({preventScroll});\n }\n }\n\n private setNativeValue(value: string): void {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = value;\n }\n }\n}\n","<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"datalist || ''\"\n [tuiDropdownEnabled]=\"canOpen\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input__textfield\"\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"computedFocusable\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n </tui-primitive-textfield>\n</div>\n","import {Directive} from '@angular/core';\nimport {AbstractTuiTextfieldHost} from '@taiga-ui/legacy/classes';\nimport {tuiAsTextfieldHost} from '@taiga-ui/legacy/tokens';\n\nimport {type TuiInputComponent} from './input.component';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@Directive({\n standalone: false,\n selector: 'tui-input',\n providers: [tuiAsTextfieldHost(TuiInputDirective)],\n})\nexport class TuiInputDirective extends AbstractTuiTextfieldHost<TuiInputComponent> {\n public onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/directives/dropdown';\nimport {\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {TuiLegacyDropdownOpenMonitorDirective} from '@taiga-ui/legacy/directives';\n\nimport {TuiInputComponent} from './input.component';\nimport {TuiInputDirective} from './input.directive';\n\n/**\n * TODO(v5): delete it\n * @deprecated use new version of {@link https://taiga-ui.dev/components/textfield TuiTextfield} (from @taiga-ui/core) instead\n */\n@NgModule({\n imports: [\n CommonModule,\n TuiLegacyDropdownOpenMonitorDirective,\n TuiPrimitiveTextfieldModule,\n ...TuiDropdown,\n ],\n declarations: [TuiInputComponent, TuiInputDirective],\n exports: [\n TuiInputComponent,\n TuiInputDirective,\n TuiTextfieldComponent,\n ...TuiDropdown,\n ],\n})\nexport class TuiInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA8BA;;;AAGG;AAkBG,MAAO,iBACT,SAAQ,kBAA0B,CAAA;AAlBtC,IAAA,WAAA,GAAA;;AA2BqB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAKpD,IAAI,CAAA,IAAA,GAAG,KAAK;AAyDtB;AAvDG,IAAA,IAAW,IAAI,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI;;AAGlC,IAAA,IAAW,sBAAsB,GAAA;AAC7B,QAAA,OAAO,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC;AAClC,cAAE;AACF,cAAE,IAAI,CAAC,SAAS,CAAC,sBAAsB;;AAG/C,IAAA,IAAW,OAAO,GAAA;AACd,QAAA,QACI,YAAY,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe;;AAI9E,IAAA,YAAY,CAAC,IAAa,EAAA;QAC7B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,UAAU,EAAE;AACjB,QAAA,IAAI,CAA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,EAAA,CAAA,CAAA;AAIhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAbnB,YAAY;YAEZ,2BAA2B,EAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA;;4FAWtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,qCAAqC;wBACrC,2BAA2B;AAC3B,wBAAA,GAAG,WAAW;AACjB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE;wBACL,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;AACrB,wBAAA,GAAG,WAAW;AACjB,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
|
|
3
|
+
import { TuiRipple } from '@taiga-ui/addon-mobile/directives';
|
|
4
|
+
import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
|
|
5
|
+
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
6
|
+
import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
7
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
8
|
+
import { TuiModalService } from '@taiga-ui/core/components/modal';
|
|
9
|
+
|
|
10
|
+
class TuiMobileDialog {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.isIOS = inject(TUI_IS_IOS);
|
|
13
|
+
this.context = injectContext();
|
|
14
|
+
}
|
|
15
|
+
onAction(index) {
|
|
16
|
+
this.context.completeWith(index);
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiMobileDialog, isStandalone: true, selector: "tui-mobile-dialog", host: { properties: { "class._ios": "isIOS" } }, ngImport: i0, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'tui-mobile-dialog', imports: [PolymorpheusOutlet, TuiButton, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
24
|
+
'[class._ios]': 'isIOS',
|
|
25
|
+
}, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\n"] }]
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS = {
|
|
29
|
+
label: '',
|
|
30
|
+
actions: ['OK'],
|
|
31
|
+
data: undefined,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Default parameters for mobile dialog component
|
|
35
|
+
*/
|
|
36
|
+
const [TUI_MOBILE_DIALOG_OPTIONS, tuiMobileDialogOptionsProvider] = tuiCreateOptions(TUI_MOBILE_DIALOG_DEFAULT_OPTIONS);
|
|
37
|
+
|
|
38
|
+
class TuiMobileDialogService extends TuiModalService {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.options = inject(TUI_MOBILE_DIALOG_OPTIONS);
|
|
42
|
+
this.content = TuiMobileDialog;
|
|
43
|
+
}
|
|
44
|
+
open(content, options = {}) {
|
|
45
|
+
return super.open(content, options);
|
|
46
|
+
}
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, providedIn: 'root' }); }
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{
|
|
53
|
+
providedIn: 'root',
|
|
54
|
+
}]
|
|
55
|
+
}] });
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Generated bundle index. Do not edit.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
export { TUI_MOBILE_DIALOG_DEFAULT_OPTIONS, TUI_MOBILE_DIALOG_OPTIONS, TuiMobileDialog, TuiMobileDialogService, tuiMobileDialogOptionsProvider };
|
|
62
|
+
//# sourceMappingURL=taiga-ui-legacy-components-mobile-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-components-mobile-dialog.mjs","sources":["../../../projects/legacy/components/mobile-dialog/mobile-dialog.component.ts","../../../projects/legacy/components/mobile-dialog/mobile-dialog.template.html","../../../projects/legacy/components/mobile-dialog/mobile-dialog.options.ts","../../../projects/legacy/components/mobile-dialog/mobile-dialog.service.ts","../../../projects/legacy/components/mobile-dialog/taiga-ui-legacy-components-mobile-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {type TuiMobileDialogOptions} from './mobile-dialog.options';\n\n@Component({\n selector: 'tui-mobile-dialog',\n imports: [PolymorpheusOutlet, TuiButton, TuiRipple],\n templateUrl: './mobile-dialog.template.html',\n styleUrl: './mobile-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiMobileDialog<I> {\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly context =\n injectContext<TuiPortalContext<TuiMobileDialogOptions<I>, number>>();\n\n protected onAction(index: number): void {\n this.context.completeWith(index);\n }\n}\n","@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiMobileDialogOptions<I = undefined> {\n readonly actions: readonly string[];\n readonly data: I;\n readonly label: string;\n}\n\nexport const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS: TuiMobileDialogOptions = {\n label: '',\n actions: ['OK'],\n data: undefined,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const [TUI_MOBILE_DIALOG_OPTIONS, tuiMobileDialogOptionsProvider] =\n tuiCreateOptions(TUI_MOBILE_DIALOG_DEFAULT_OPTIONS);\n","import {inject, Injectable} from '@angular/core';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {TuiModalService} from '@taiga-ui/core/components/modal';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {TuiMobileDialog} from './mobile-dialog.component';\nimport {\n TUI_MOBILE_DIALOG_OPTIONS,\n type TuiMobileDialogOptions,\n} from './mobile-dialog.options';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiMobileDialogService extends TuiModalService<\n TuiMobileDialogOptions<any>,\n number\n> {\n protected readonly options = inject(TUI_MOBILE_DIALOG_OPTIONS);\n protected readonly content = TuiMobileDialog;\n\n public override open(\n content: PolymorpheusContent<\n TuiPortalContext<TuiMobileDialogOptions<any>, number>\n >,\n options: Partial<TuiMobileDialogOptions<any>> = {},\n ): Observable<number> {\n return super.open(content, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAmBa,eAAe,CAAA;AAV5B,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAC1B,IAAO,CAAA,OAAA,GACtB,aAAa,EAAuD;AAK3E;AAHa,IAAA,QAAQ,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC;;+GAN3B,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,8HCnB5B,srBA4BA,EAAA,MAAA,EAAA,CAAA,2gCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDjBc,kBAAkB,EAAE,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,SAAS,oIAAE,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAQzC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EACpB,OAAA,EAAA,CAAC,kBAAkB,EAAE,SAAS,EAAE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../../../projects/legacy/components/multi-select-option/multi-select-option.component.ts","../../../projects/legacy/components/multi-select-option/multi-select-option.template.html","../../../projects/legacy/components/multi-select-option/multi-select-option.module.ts","../../../projects/legacy/components/multi-select-option/taiga-ui-legacy-components-multi-select-option.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {TuiSelectOptionComponent} from '@taiga-ui/legacy/components/select-option';\n\n@Component({\n standalone: false,\n selector: 'tui-multi-select-option',\n templateUrl: './multi-select-option.template.html',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-components-multi-select-option.mjs","sources":["../../../projects/legacy/components/multi-select-option/multi-select-option.component.ts","../../../projects/legacy/components/multi-select-option/multi-select-option.template.html","../../../projects/legacy/components/multi-select-option/multi-select-option.module.ts","../../../projects/legacy/components/multi-select-option/taiga-ui-legacy-components-multi-select-option.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {TuiSelectOptionComponent} from '@taiga-ui/legacy/components/select-option';\n\n@Component({\n standalone: false,\n selector: 'tui-multi-select-option',\n templateUrl: './multi-select-option.template.html',\n styleUrl: './multi-select-option.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMultiSelectOptionComponent<\n T extends any[],\n> extends TuiSelectOptionComponent<T> {\n protected get size(): TuiSizeS {\n return this.dataList?.size === 'l' ? 'm' : 's';\n }\n\n protected override get selected(): boolean {\n const {value} = this.option;\n\n return (\n tuiIsPresent(value) &&\n tuiIsPresent(this.value) &&\n this.value.some((item) => this.matcher(item, value))\n );\n }\n}\n","<input\n tuiCheckbox\n type=\"checkbox\"\n [checked]=\"selected$ | async\"\n [size]=\"size\"\n/>\n<ng-container [ngTemplateOutlet]=\"context.$implicit\" />\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiCheckbox} from '@taiga-ui/kit/components/checkbox';\n\nimport {TuiMultiSelectOptionComponent} from './multi-select-option.component';\n\n@NgModule({\n imports: [CommonModule, TuiCheckbox],\n declarations: [TuiMultiSelectOptionComponent],\n exports: [TuiMultiSelectOptionComponent],\n})\nexport class TuiMultiSelectOptionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYM,MAAO,6BAEX,SAAQ,wBAA2B,CAAA;AACjC,IAAA,IAAc,IAAI,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,QAAQ,EAAE,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG;;AAGlD,IAAA,IAAuB,QAAQ,GAAA;AAC3B,QAAA,MAAM,EAAC,KAAK,EAAC,GAAG,IAAI,CAAC,MAAM;AAE3B,QAAA,QACI,YAAY,CAAC,KAAK,CAAC;AACnB,YAAA,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;;+GAbnD,6BAA6B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,6BAA6B,2GCZ1C,2KAOA,EAAA,MAAA,EAAA,CAAA,wKAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA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AE,CAAC,6BAA6B,CAAC;AAC3C,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Directive, inject, EventEmitter, TemplateRef, Output, Input, ContentChild, ViewChild, ChangeDetectionStrategy, Component, Pipe, ContentChildren, NgModule } from '@angular/core';
|
|
4
|
+
import { tuiIsString, tuiArrayToggle, tuiPure, tuiIsPresent, tuiGetOriginalArrayFromQueryList, tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
5
|
import { tuiIsFlat } from '@taiga-ui/kit/utils';
|
|
6
6
|
import { TUI_TRUE_HANDLER, EMPTY_ARRAY, EMPTY_QUERY, TUI_DEFAULT_IDENTITY_MATCHER, EMPTY_FUNCTION } from '@taiga-ui/cdk/constants';
|
|
7
7
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
8
8
|
import { tuiGetClipboardDataText } from '@taiga-ui/cdk/utils/dom';
|
|
9
9
|
import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i1$2 from '@taiga-ui/core/components/data-list';
|
|
11
11
|
import { TUI_DATA_LIST_ACCESSOR, TuiDataListDirective, tuiAsDataListHost, TUI_DATA_LIST_HOST, TuiOption, tuiAsOptionContent, tuiAsDataList, TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i3 from '@taiga-ui/core/directives/dropdown';
|
|
13
13
|
import { TuiDropdownOpen, TuiDropdownFixed, TuiDropdown } from '@taiga-ui/core/directives/dropdown';
|
|
14
14
|
import { TUI_ITEMS_HANDLERS, TUI_MULTI_SELECT_TEXTS } from '@taiga-ui/kit/tokens';
|
|
15
15
|
import { AbstractTuiNativeSelect, AbstractTuiMultipleControl, TuiStringifiableItem, tuiAsControl, AbstractTuiTextfieldHost, AbstractTuiControl } from '@taiga-ui/legacy/classes';
|
|
16
16
|
import { TUI_ARROW_MODE, TuiArrowComponent } from '@taiga-ui/legacy/components/arrow';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i5 from '@taiga-ui/legacy/components/input-tag';
|
|
18
18
|
import { TUI_INPUT_TAG_OPTIONS, TuiInputTagComponent, TuiInputTagModule } from '@taiga-ui/legacy/components/input-tag';
|
|
19
|
-
import * as
|
|
20
|
-
import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER,
|
|
19
|
+
import * as i6 from '@taiga-ui/legacy/directives';
|
|
20
|
+
import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER, TuiLegacyDropdownOpenMonitorDirective, TuiTextfieldControllerModule, TuiWrapperModule } from '@taiga-ui/legacy/directives';
|
|
21
21
|
import { tuiAsFocusableItemAccessor, tuiAsTextfieldHost } from '@taiga-ui/legacy/tokens';
|
|
22
|
-
import
|
|
22
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
23
|
+
import * as i2 from '@angular/common';
|
|
23
24
|
import { CommonModule } from '@angular/common';
|
|
24
25
|
import * as i1 from '@angular/forms';
|
|
25
26
|
import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
@@ -27,11 +28,9 @@ import * as i4 from '@taiga-ui/polymorpheus';
|
|
|
27
28
|
import { PolymorpheusComponent, PolymorpheusOutlet, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
|
|
28
29
|
import * as i6$1 from '@taiga-ui/cdk/pipes/mapper';
|
|
29
30
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
30
|
-
import * as i1$
|
|
31
|
-
import { TuiLet } from '@taiga-ui/cdk/directives/let';
|
|
32
|
-
import * as i2 from '@taiga-ui/core/components/link';
|
|
31
|
+
import * as i1$1 from '@taiga-ui/core/components/link';
|
|
33
32
|
import { TuiLink } from '@taiga-ui/core/components/link';
|
|
34
|
-
import * as
|
|
33
|
+
import * as i2$1 from '@taiga-ui/kit/components/data-list-wrapper';
|
|
35
34
|
import { TuiDataListWrapper } from '@taiga-ui/kit/components/data-list-wrapper';
|
|
36
35
|
import * as i7 from '@taiga-ui/kit/pipes/stringify-content';
|
|
37
36
|
import { TuiStringifyContentPipe } from '@taiga-ui/kit/pipes/stringify-content';
|
|
@@ -47,12 +46,7 @@ const TUI_MULTI_SELECT_DEFAULT_OPTIONS = {
|
|
|
47
46
|
* @deprecated: drop in v5.0
|
|
48
47
|
* Default parameters for MultiSelect component
|
|
49
48
|
*/
|
|
50
|
-
const TUI_MULTI_SELECT_OPTIONS =
|
|
51
|
-
factory: () => TUI_MULTI_SELECT_DEFAULT_OPTIONS,
|
|
52
|
-
});
|
|
53
|
-
function tuiMultiSelectOptionsProvider(options) {
|
|
54
|
-
return tuiProvideOptions(TUI_MULTI_SELECT_OPTIONS, options, TUI_MULTI_SELECT_DEFAULT_OPTIONS);
|
|
55
|
-
}
|
|
49
|
+
const [TUI_MULTI_SELECT_OPTIONS, tuiMultiSelectOptionsProvider] = tuiCreateOptions(TUI_MULTI_SELECT_DEFAULT_OPTIONS);
|
|
56
50
|
|
|
57
51
|
class AbstractTuiNativeMultiSelect extends AbstractTuiNativeSelect {
|
|
58
52
|
constructor() {
|
|
@@ -220,7 +214,7 @@ class TuiMultiSelectComponent extends AbstractTuiMultipleControl {
|
|
|
220
214
|
tuiAsControl(TuiMultiSelectComponent),
|
|
221
215
|
tuiAsDataListHost(TuiMultiSelectComponent),
|
|
222
216
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
223
|
-
], queries: [{ propertyName: "accessor", first: true, predicate: TUI_DATA_LIST_ACCESSOR, descendants: true }, { propertyName: "nativeSelect", first: true, predicate: AbstractTuiNativeMultiSelect, descendants: true, static: true }, { propertyName: "datalist", first: true, predicate: TuiDataListDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: TuiDropdownOpen, descendants: true }, { propertyName: "input", first: true, predicate: TuiInputTagComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive:
|
|
217
|
+
], queries: [{ propertyName: "accessor", first: true, predicate: TUI_DATA_LIST_ACCESSOR, descendants: true }, { propertyName: "nativeSelect", first: true, predicate: AbstractTuiNativeMultiSelect, descendants: true, static: true }, { propertyName: "datalist", first: true, predicate: TuiDataListDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: TuiDropdownOpen, descendants: true }, { propertyName: "input", first: true, predicate: TuiInputTagComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i3.TuiDropdownFixed }], ngImport: i0, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"datalist || ''\"\n [tuiDropdownEnabled]=\"interactive && !nativeDropdownMode\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-input-tag\n #inputTag\n automation-id=\"tui-multi-select__input\"\n class=\"t-input\"\n [autoColor]=\"autoColor\"\n [disabled]=\"disabled\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerWrapper\"\n [editable]=\"false\"\n [inputHidden]=\"!editable\"\n [nativeId]=\"nativeId\"\n [ngModel]=\"computedValue | tuiMapper: valueMapper : stringify\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"placeholder\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoOpen]=\"open\"\n [readOnly]=\"readOnly\"\n [removable]=\"!nativeDropdownMode\"\n [rows]=\"rows\"\n [search]=\"searchOrSpace\"\n [tagValidator]=\"tagValidator | tuiMapper: disabledItemHandlerWrapper\"\n [tuiTextfieldIcon]=\"arrow ? icon : ''\"\n (click.prevent)=\"onClick(inputTag)\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.space)=\"onSpace($event)\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n (paste.capture.stop.prevent)=\"onPaste($event)\"\n (searchChange)=\"onSearch($event)\"\n >\n <ng-content />\n <ng-template #select>\n @if (isMobile) {\n <ng-content select=\"select\" />\n }\n </ng-template>\n\n <ng-container\n *ngTemplateOutlet=\"select\"\n ngProjectAs=\"select\"\n />\n\n @if (computedGroup) {\n <div\n ngProjectAs=\"tuiContent\"\n class=\"t-content\"\n [class.t-content_fullsize]=\"inputTag.labelOutside\"\n >\n <span\n *polymorpheusOutlet=\"valueContent as text; context: {$implicit: value}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </span>\n </div>\n }\n </tui-input-tag>\n\n <ng-template #icon>\n <div\n appearance=\"icon\"\n automation-id=\"tui-multi-select__arrow\"\n tuiWrapper\n class=\"t-arrow\"\n [class.t-arrow_native-dropdown]=\"nativeDropdownMode\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n <ng-container *polymorpheusOutlet=\"arrow as text\">\n {{ text }}\n </ng-container>\n </div>\n </ng-template>\n</div>\n", styles: [":host{position:relative;display:block;border-radius:var(--tui-radius-m)}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-input{border-radius:inherit}:host:not(._editable):not(._readonly) .t-input{cursor:pointer}.t-content{display:flex;align-items:center;pointer-events:none;box-sizing:border-box;margin:.0625rem 0}.t-primitive{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-arrow{pointer-events:auto;cursor:pointer}.t-arrow_native-dropdown{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i5.TuiInputTagComponent, selector: "tui-input-tag", inputs: ["separator", "search", "editable", "tagValidator", "rows", "inputHidden", "uniqueTags", "autoColor", "maxLength", "placeholder", "removable", "disabledItemHandler", "pseudoFocused", "pseudoOpen"], outputs: ["searchChange"] }, { kind: "directive", type: i3.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i3.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "directive", type: i6.TuiLegacyDropdownOpenMonitorDirective, selector: "[tuiDropdownOpenMonitor]" }, { kind: "directive", type: i6.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { kind: "directive", type: i6.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { kind: "pipe", type: i6$1.TuiMapperPipe, name: "tuiMapper" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
224
218
|
}
|
|
225
219
|
__decorate([
|
|
226
220
|
tuiPure
|
|
@@ -345,7 +339,7 @@ class TuiMultiSelectGroupComponent {
|
|
|
345
339
|
this.options = EMPTY_QUERY;
|
|
346
340
|
this.host = inject(TUI_DATA_LIST_HOST);
|
|
347
341
|
this.control = inject(NgControl);
|
|
348
|
-
this.multiSelectTexts
|
|
342
|
+
this.multiSelectTexts = inject(TUI_MULTI_SELECT_TEXTS);
|
|
349
343
|
this.label = '';
|
|
350
344
|
}
|
|
351
345
|
get empty$() {
|
|
@@ -392,7 +386,7 @@ class TuiMultiSelectGroupComponent {
|
|
|
392
386
|
return items.map(({ value }) => value).filter(tuiIsPresent);
|
|
393
387
|
}
|
|
394
388
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMultiSelectGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
395
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiMultiSelectGroupComponent, isStandalone: false, selector: "tui-opt-group[tuiMultiSelectGroup]", inputs: { label: "label" }, host: { properties: { "class._label": "label" } }, queries: [{ propertyName: "options", predicate: TuiOption }], ngImport: i0, template: "
|
|
389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiMultiSelectGroupComponent, isStandalone: false, selector: "tui-opt-group[tuiMultiSelectGroup]", inputs: { label: "label" }, host: { properties: { "class._label": "label" } }, queries: [{ propertyName: "options", predicate: TuiOption }], ngImport: i0, template: "@let value = value$ | async;\n<span class=\"t-wrapper\">\n <span class=\"t-label\">{{ label }}</span>\n @if (label && !(empty$ | async)) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [disabled]=\"!!(disabled$ | async)\"\n (click)=\"onClick(value)\"\n >\n {{ multiSelectTexts()[value ? 'none' : 'all'] }}\n </button>\n }\n</span>\n<ng-content />\n", styles: [":host._label:before{display:none}:host:not(:first-of-type) .t-label:not(:empty){padding-block-start:1.25rem}:host:not(:first-of-type) .t-button{margin-block-start:1.25rem}.t-wrapper{display:flex;align-items:flex-start}.t-label:not(:empty){flex:1;padding:.75rem 1rem .25rem .625rem}.t-button{margin:.75rem 1rem 0 auto;font-weight:400}\n"], dependencies: [{ kind: "directive", type: i1$1.TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
396
390
|
}
|
|
397
391
|
__decorate([
|
|
398
392
|
tuiPure
|
|
@@ -416,7 +410,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
416
410
|
type: Component,
|
|
417
411
|
args: [{ standalone: false, selector: 'tui-opt-group[tuiMultiSelectGroup]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
418
412
|
'[class._label]': 'label',
|
|
419
|
-
}, template: "
|
|
413
|
+
}, template: "@let value = value$ | async;\n<span class=\"t-wrapper\">\n <span class=\"t-label\">{{ label }}</span>\n @if (label && !(empty$ | async)) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [disabled]=\"!!(disabled$ | async)\"\n (click)=\"onClick(value)\"\n >\n {{ multiSelectTexts()[value ? 'none' : 'all'] }}\n </button>\n }\n</span>\n<ng-content />\n", styles: [":host._label:before{display:none}:host:not(:first-of-type) .t-label:not(:empty){padding-block-start:1.25rem}:host:not(:first-of-type) .t-button{margin-block-start:1.25rem}.t-wrapper{display:flex;align-items:flex-start}.t-label:not(:empty){flex:1;padding:.75rem 1rem .25rem .625rem}.t-button{margin:.75rem 1rem 0 auto;font-weight:400}\n"] }]
|
|
420
414
|
}], propDecorators: { options: [{
|
|
421
415
|
type: ContentChildren,
|
|
422
416
|
args: [TuiOption]
|
|
@@ -525,7 +519,7 @@ class TuiNativeMultiSelectComponent extends AbstractTuiNativeMultiSelect {
|
|
|
525
519
|
deps: [TuiNativeMultiSelectComponent],
|
|
526
520
|
useFactory: ({ datalist }) => datalist,
|
|
527
521
|
},
|
|
528
|
-
], usesInheritance: true, ngImport: i0, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n/>\n@for (option of items; track option) {\n <option\n [disabled]=\"disabledItemHandler ? disabledItemHandler(option) : host.disableItemHandler(option)\"\n [selected]=\"option | tuiMapper: selectedMapper : control.value\"\n [value]=\"stringify(option)\"\n >\n {{ stringify(option) }}\n </option>\n}\n", styles: [":host{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type:
|
|
522
|
+
], usesInheritance: true, ngImport: i0, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n/>\n@for (option of items; track option) {\n <option\n [disabled]=\"disabledItemHandler ? disabledItemHandler(option) : host.disableItemHandler(option)\"\n [selected]=\"option | tuiMapper: selectedMapper : control.value\"\n [value]=\"stringify(option)\"\n >\n {{ stringify(option) }}\n </option>\n}\n", styles: [":host{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: TuiMultiSelectGroupDirective, selector: "[tuiMultiSelectGroup]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TuiMapperPipe, name: "tuiMapper" }, { kind: "pipe", type: i7.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
529
523
|
}
|
|
530
524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeMultiSelectComponent, decorators: [{
|
|
531
525
|
type: Component,
|
|
@@ -570,7 +564,7 @@ class TuiNativeMultiSelectGroupComponent extends AbstractTuiNativeMultiSelect {
|
|
|
570
564
|
deps: [TuiNativeMultiSelectGroupComponent],
|
|
571
565
|
useFactory: ({ datalist }) => datalist,
|
|
572
566
|
},
|
|
573
|
-
], usesInheritance: true, ngImport: i0, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n [labels]=\"labels\"\n/>\n@for (group of items; track group
|
|
567
|
+
], usesInheritance: true, ngImport: i0, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n [labels]=\"labels\"\n/>\n@for (group of items; track group) {\n <optgroup [label]=\"labels[$index]\">\n @for (option of group; track option) {\n <option\n [disabled]=\"disabledItemHandler ? disabledItemHandler(option) : host.disableItemHandler(option)\"\n [selected]=\"option | tuiMapper: selectedMapper : control.value\"\n [value]=\"stringify(option)\"\n >\n {{ stringify(option) }}\n </option>\n }\n </optgroup>\n}\n", styles: [":host{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i2$1.TuiDataListGroupWrapperComponent, selector: "tui-data-list-wrapper[labels]", inputs: ["labels"] }, { kind: "directive", type: TuiMultiSelectGroupDirective, selector: "[tuiMultiSelectGroup]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TuiMapperPipe, name: "tuiMapper" }, { kind: "pipe", type: i7.TuiStringifyContentPipe, name: "tuiStringifyContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
574
568
|
}
|
|
575
569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeMultiSelectGroupComponent, decorators: [{
|
|
576
570
|
type: Component,
|
|
@@ -589,7 +583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
589
583
|
'(change)': 'onValueChange($event.target.selectedOptions)',
|
|
590
584
|
'(click.stop.zoneless)': '0',
|
|
591
585
|
'(mousedown.stop.zoneless)': '0',
|
|
592
|
-
}, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n [labels]=\"labels\"\n/>\n@for (group of items; track group
|
|
586
|
+
}, template: "@if (control.control?.valueChanges | async) {}\n\n<tui-data-list-wrapper\n *tuiDataList\n tuiMultiSelectGroup\n [disabledItemHandler]=\"disabledItemHandler || host.disableItemHandler\"\n [itemContent]=\"stringify | tuiStringifyContent\"\n [items]=\"items\"\n [labels]=\"labels\"\n/>\n@for (group of items; track group) {\n <optgroup [label]=\"labels[$index]\">\n @for (option of group; track option) {\n <option\n [disabled]=\"disabledItemHandler ? disabledItemHandler(option) : host.disableItemHandler(option)\"\n [selected]=\"option | tuiMapper: selectedMapper : control.value\"\n [value]=\"stringify(option)\"\n >\n {{ stringify(option) }}\n </option>\n }\n </optgroup>\n}\n", styles: [":host{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0}\n"] }]
|
|
593
587
|
}], propDecorators: { items: [{
|
|
594
588
|
type: Input
|
|
595
589
|
}], labels: [{
|
|
@@ -612,29 +606,28 @@ class TuiMultiSelectModule {
|
|
|
612
606
|
FormsModule,
|
|
613
607
|
PolymorpheusOutlet,
|
|
614
608
|
PolymorpheusTemplate,
|
|
615
|
-
TuiWrapperModule,
|
|
616
609
|
TuiArrowComponent,
|
|
617
|
-
TuiLet,
|
|
618
610
|
TuiInputTagModule,
|
|
619
|
-
|
|
620
|
-
TuiMapperPipe,
|
|
611
|
+
TuiLegacyDropdownOpenMonitorDirective,
|
|
621
612
|
TuiLink,
|
|
622
|
-
|
|
613
|
+
TuiMapperPipe,
|
|
614
|
+
TuiMultiSelectOptionModule,
|
|
623
615
|
TuiStringifyContentPipe,
|
|
624
|
-
|
|
616
|
+
TuiTextfieldControllerModule,
|
|
617
|
+
TuiWrapperModule, i1$2.TuiDataListComponent, i1$2.TuiDataListDirective, i1$2.TuiOption, i1$2.TuiOptionNew, i1$2.TuiOptionWithValue, i1$2.TuiOptGroup, i2$1.TuiDataListWrapperComponent, i2$1.TuiDataListGroupWrapperComponent, i1$2.TuiDataListDirective, i3.TuiDropdownOptionsDirective, i3.TuiDropdownDriverDirective, i3.TuiDropdownDirective, i3.TuiDropdownComponent, i3.TuiDropdownOpen, i3.TuiDropdownOpenLegacy, i3.TuiDropdownManual, i3.TuiDropdownHover, i3.TuiDropdownContent, i3.TuiDropdownContext, i3.TuiDropdownPosition, i3.TuiDropdownPositionSided, i3.TuiDropdownSelection], exports: [TuiMultiSelectComponent,
|
|
625
618
|
TuiMultiSelectGroupComponent,
|
|
626
619
|
TuiMultiSelectGroupDirective,
|
|
627
620
|
TuiHideSelectedPipe,
|
|
628
621
|
TuiMultiSelectDirective,
|
|
629
622
|
TuiNativeMultiSelectComponent,
|
|
630
|
-
TuiNativeMultiSelectGroupComponent,
|
|
623
|
+
TuiNativeMultiSelectGroupComponent, i3.TuiDropdownOptionsDirective, i3.TuiDropdownDriverDirective, i3.TuiDropdownDirective, i3.TuiDropdownComponent, i3.TuiDropdownOpen, i3.TuiDropdownOpenLegacy, i3.TuiDropdownManual, i3.TuiDropdownHover, i3.TuiDropdownContent, i3.TuiDropdownContext, i3.TuiDropdownPosition, i3.TuiDropdownPositionSided, i3.TuiDropdownSelection, i1$2.TuiDataListComponent, i1$2.TuiDataListDirective, i1$2.TuiOption, i1$2.TuiOptionNew, i1$2.TuiOptionWithValue, i1$2.TuiOptGroup, i2$1.TuiDataListWrapperComponent, i2$1.TuiDataListGroupWrapperComponent, i1$2.TuiDataListDirective] }); }
|
|
631
624
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMultiSelectModule, imports: [CommonModule,
|
|
632
625
|
FormsModule,
|
|
633
|
-
TuiWrapperModule,
|
|
634
626
|
TuiArrowComponent,
|
|
635
627
|
TuiInputTagModule,
|
|
636
628
|
TuiMultiSelectOptionModule,
|
|
637
|
-
TuiTextfieldControllerModule,
|
|
629
|
+
TuiTextfieldControllerModule,
|
|
630
|
+
TuiWrapperModule, i1$2.TuiDataListComponent, i1$2.TuiOption, i2$1.TuiDataListWrapperComponent, i2$1.TuiDataListGroupWrapperComponent, i3.TuiDropdownComponent] }); }
|
|
638
631
|
}
|
|
639
632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMultiSelectModule, decorators: [{
|
|
640
633
|
type: NgModule,
|
|
@@ -644,19 +637,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
644
637
|
FormsModule,
|
|
645
638
|
PolymorpheusOutlet,
|
|
646
639
|
PolymorpheusTemplate,
|
|
647
|
-
TuiWrapperModule,
|
|
648
640
|
TuiArrowComponent,
|
|
649
|
-
TuiLet,
|
|
650
641
|
TuiInputTagModule,
|
|
651
|
-
|
|
652
|
-
TuiMapperPipe,
|
|
642
|
+
TuiLegacyDropdownOpenMonitorDirective,
|
|
653
643
|
TuiLink,
|
|
654
|
-
|
|
644
|
+
TuiMapperPipe,
|
|
645
|
+
TuiMultiSelectOptionModule,
|
|
655
646
|
TuiStringifyContentPipe,
|
|
656
|
-
|
|
657
|
-
|
|
647
|
+
TuiTextfieldControllerModule,
|
|
648
|
+
TuiWrapperModule,
|
|
658
649
|
...TuiDataList,
|
|
659
650
|
...TuiDataListWrapper,
|
|
651
|
+
...TuiDropdown,
|
|
660
652
|
],
|
|
661
653
|
declarations: [
|
|
662
654
|
TuiMultiSelectComponent,
|