@taiga-ui/legacy 4.52.0-canary.38dfc57 → 4.52.0-canary.4d93c87

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.
Files changed (49) hide show
  1. package/components/index.d.ts +0 -3
  2. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +2 -3
  3. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +1 -1
  4. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +2 -2
  5. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
  6. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +6 -6
  7. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +3 -3
  9. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +2 -2
  11. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-legacy-components-input-time.mjs +2 -2
  13. package/fesm2022/taiga-ui-legacy-components-input-time.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-legacy-components-input.mjs +2 -3
  15. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +2 -2
  17. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +2 -2
  19. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-legacy-components-select.mjs +2 -3
  21. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +2 -2
  23. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-legacy-components.mjs +0 -3
  25. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  26. package/package.json +25 -37
  27. package/utils/icons-path-factory.d.ts +1 -1
  28. package/components/input-phone/index.d.ts +0 -4
  29. package/components/input-phone/input-phone.component.d.ts +0 -52
  30. package/components/input-phone/input-phone.directive.d.ts +0 -16
  31. package/components/input-phone/input-phone.module.d.ts +0 -15
  32. package/components/input-phone/input-phone.options.d.ts +0 -22
  33. package/components/input-phone/utils/complete-phone-insertion-preprocessor.d.ts +0 -9
  34. package/components/input-phone/utils/create-phone-mask-expression.d.ts +0 -7
  35. package/components/input-phone/utils/index.d.ts +0 -2
  36. package/components/input-phone-international/index.d.ts +0 -3
  37. package/components/input-phone-international/input-phone-international.component.d.ts +0 -43
  38. package/components/input-phone-international/input-phone-international.options.d.ts +0 -25
  39. package/components/input-phone-international/utils/extract-value-from-event.d.ts +0 -4
  40. package/components/input-year/index.d.ts +0 -3
  41. package/components/input-year/input-year.component.d.ts +0 -36
  42. package/components/input-year/input-year.directive.d.ts +0 -14
  43. package/components/input-year/input-year.module.d.ts +0 -18
  44. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs +0 -215
  45. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs.map +0 -1
  46. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs +0 -373
  47. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs.map +0 -1
  48. package/fesm2022/taiga-ui-legacy-components-input-year.mjs +0 -188
  49. package/fesm2022/taiga-ui-legacy-components-input-year.mjs.map +0 -1
@@ -1,43 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { type TuiContext } from '@taiga-ui/cdk/types';
3
- import { type TuiSizeL, type TuiSizeM, type TuiSizeS } from '@taiga-ui/core/types';
4
- import { type TuiCountryIsoCode } from '@taiga-ui/i18n/types';
5
- import { AbstractTuiControl } from '@taiga-ui/legacy/classes';
6
- import { type TuiFocusableElementAccessor } from '@taiga-ui/legacy/tokens';
7
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@taiga-ui/core/directives/dropdown";
10
- /**
11
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
12
- * https://taiga-ui.dev/components/input-phone-international
13
- */
14
- export declare class TuiInputPhoneInternationalComponent extends AbstractTuiControl<string> implements TuiFocusableElementAccessor {
15
- private readonly inputPhoneComponent?;
16
- private readonly primitiveTextfield?;
17
- private readonly options;
18
- private readonly extractCountryCodePipe;
19
- private readonly textfieldSize;
20
- protected open: boolean;
21
- protected readonly countriesNames$: import("rxjs").Observable<Record<TuiCountryIsoCode, string>>;
22
- protected readonly countriesMasks: Record<TuiCountryIsoCode, string>;
23
- protected readonly arrow: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;
24
- countries: readonly TuiCountryIsoCode[];
25
- readonly countryIsoCodeChange: EventEmitter<TuiCountryIsoCode>;
26
- countryIsoCode: TuiCountryIsoCode;
27
- set isoCode(code: TuiCountryIsoCode);
28
- get nativeFocusableElement(): HTMLElement | null;
29
- get focused(): boolean;
30
- get inputPhoneCountryCode(): string;
31
- get phoneMaskAfterCountryCode(): string;
32
- onPaste(event: ClipboardEvent | DragEvent): void;
33
- onItemClick(isoCode: TuiCountryIsoCode): void;
34
- setDisabledState(): void;
35
- protected get size(): TuiSizeL | TuiSizeS;
36
- protected onActiveZone(active: boolean): void;
37
- protected getFallbackValue(): string;
38
- private calculateMaskAfterCountryCode;
39
- private close;
40
- private updateCountryIsoCode;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputPhoneInternationalComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputPhoneInternationalComponent, "tui-input-phone-international", never, { "countries": { "alias": "countries"; "required": false; }; "isoCode": { "alias": "countryIsoCode"; "required": false; }; }, { "countryIsoCodeChange": "countryIsoCodeChange"; }, never, ["*"], true, [{ directive: typeof i1.TuiDropdownFixed; inputs: {}; outputs: {}; }]>;
43
- }
@@ -1,25 +0,0 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
- import { type TuiCountryIsoCode } from '@taiga-ui/i18n/types';
3
- /**
4
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
5
- * https://taiga-ui.dev/components/input-phone-international
6
- */
7
- export interface TuiInputPhoneInternationalOptions {
8
- readonly countries: readonly TuiCountryIsoCode[];
9
- readonly countryIsoCode: TuiCountryIsoCode;
10
- }
11
- /**
12
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
13
- * https://taiga-ui.dev/components/input-phone-international
14
- */
15
- export declare const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS: TuiInputPhoneInternationalOptions;
16
- /**
17
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
18
- * https://taiga-ui.dev/components/input-phone-international
19
- */
20
- export declare const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS: InjectionToken<TuiInputPhoneInternationalOptions>;
21
- /**
22
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
23
- * https://taiga-ui.dev/components/input-phone-international
24
- */
25
- export declare function tuiInputPhoneInternationalOptionsProvider(options: Partial<TuiInputPhoneInternationalOptions>): Provider;
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated: drop in v5.0
3
- */
4
- export declare function tuiExtractValueFromEvent(event: ClipboardEvent | DragEvent): string;
@@ -1,3 +0,0 @@
1
- export * from './input-year.component';
2
- export * from './input-year.directive';
3
- export * from './input-year.module';
@@ -1,36 +0,0 @@
1
- import { type MaskitoOptions } from '@maskito/core';
2
- import { type TuiBooleanHandler } from '@taiga-ui/cdk/types';
3
- import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
4
- import { type TuiInputDateOptions } from '@taiga-ui/kit/tokens';
5
- import { AbstractTuiNullableControl } from '@taiga-ui/legacy/classes';
6
- import { type TuiFocusableElementAccessor } from '@taiga-ui/legacy/tokens';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * TODO(v5): delete it
10
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-year TuiInputYear} (from @taiga-ui/kit) instead
11
- */
12
- export declare class TuiInputYearComponent extends AbstractTuiNullableControl<number> implements TuiFocusableElementAccessor {
13
- private readonly textfield?;
14
- private readonly options;
15
- private readonly textfieldSize;
16
- protected open: boolean;
17
- protected readonly initialItem: number;
18
- min: number | null;
19
- max: number | null;
20
- disabledItemHandler: TuiBooleanHandler<number>;
21
- nativeValue: string;
22
- get nativeFocusableElement(): HTMLInputElement | null;
23
- get focused(): boolean;
24
- onValueChange(value: string): void;
25
- writeValue(value: number | null): void;
26
- protected get size(): TuiSizeL | TuiSizeS;
27
- protected get calendarIcon(): TuiInputDateOptions['icon'];
28
- protected getMaskOptions(min: number | null, max: number | null): MaskitoOptions;
29
- protected onYearClick(year: number): void;
30
- protected onFocused(focused: boolean): void;
31
- protected onOpenChange(open: boolean): void;
32
- protected toggle(): void;
33
- private updateNativeValue;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputYearComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputYearComponent, "tui-input-year", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; }; }, {}, never, ["*", "input"], false, never>;
36
- }
@@ -1,14 +0,0 @@
1
- import { AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
2
- import { type TuiInputYearComponent } from './input-year.component';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * TODO(v5): delete it
6
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-year TuiInputYear} (from @taiga-ui/kit) instead
7
- */
8
- export declare class TuiInputYearDirective extends AbstractTuiTextfieldHost<TuiInputYearComponent> {
9
- get value(): string;
10
- onValueChange(value: string): void;
11
- process(input: HTMLInputElement): void;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputYearDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiInputYearDirective, "tui-input-year", never, {}, {}, never, never, false, never>;
14
- }
@@ -1,18 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./input-year.component";
3
- import * as i2 from "./input-year.directive";
4
- import * as i3 from "@maskito/angular";
5
- import * as i4 from "@taiga-ui/core/directives/dropdown";
6
- import * as i5 from "@taiga-ui/legacy/components/primitive-textfield";
7
- import * as i6 from "@taiga-ui/core/components/scrollbar";
8
- import * as i7 from "@taiga-ui/core/components/calendar";
9
- import * as i8 from "@taiga-ui/legacy/directives";
10
- /**
11
- * TODO(v5): delete it
12
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-year TuiInputYear} (from @taiga-ui/kit) instead
13
- */
14
- export declare class TuiInputYearModule {
15
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputYearModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<TuiInputYearModule, [typeof i1.TuiInputYearComponent, typeof i2.TuiInputYearDirective], [typeof i3.MaskitoDirective, typeof i4.TuiDropdownOpen, typeof i5.TuiPrimitiveTextfieldModule, typeof i6.TuiScrollbar, typeof i7.TuiCalendarYear, typeof i8.TuiTextfieldControllerModule, typeof i4.TuiDropdownOptionsDirective, typeof i4.TuiDropdownDriverDirective, typeof i4.TuiDropdownDirective, typeof i4.TuiDropdownComponent, typeof i4.TuiDropdownOpen, typeof i4.TuiDropdownOpenLegacy, typeof i4.TuiDropdownPortal, typeof i4.TuiDropdownManual, typeof i4.TuiDropdownHover, typeof i4.TuiDropdownContext, typeof i4.TuiDropdownPosition, typeof i4.TuiDropdownPositionSided, typeof i4.TuiDropdownSelection], [typeof i1.TuiInputYearComponent, typeof i2.TuiInputYearDirective, typeof i5.TuiTextfieldComponent, typeof i4.TuiDropdownOptionsDirective, typeof i4.TuiDropdownDriverDirective, typeof i4.TuiDropdownDirective, typeof i4.TuiDropdownComponent, typeof i4.TuiDropdownOpen, typeof i4.TuiDropdownOpenLegacy, typeof i4.TuiDropdownPortal, typeof i4.TuiDropdownManual, typeof i4.TuiDropdownHover, typeof i4.TuiDropdownContext, typeof i4.TuiDropdownPosition, typeof i4.TuiDropdownPositionSided, typeof i4.TuiDropdownSelection]>;
17
- static ɵinj: i0.ɵɵInjectorDeclaration<TuiInputYearModule>;
18
- }
@@ -1,215 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import * as i2 from '@angular/common';
3
- import { CommonModule } from '@angular/common';
4
- import * as i0 from '@angular/core';
5
- import { InjectionToken, inject, EventEmitter, Input, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
6
- import * as i3 from '@angular/forms';
7
- import { FormsModule } from '@angular/forms';
8
- import { TUI_NON_DIGITS_REGEXP, CHAR_PLUS } from '@taiga-ui/cdk/constants';
9
- import { tuiProvideOptions, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
10
- import * as i4 from '@taiga-ui/core/components/data-list';
11
- import { TuiDataList } from '@taiga-ui/core/components/data-list';
12
- import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
13
- import * as i1 from '@taiga-ui/core/directives/dropdown';
14
- import { TuiDropdownFixed, TuiDropdown } from '@taiga-ui/core/directives/dropdown';
15
- import { TuiGroup } from '@taiga-ui/core/directives/group';
16
- import * as i5 from '@taiga-ui/core/directives/hint';
17
- import { TuiHint } from '@taiga-ui/core/directives/hint';
18
- import { TuiFlagPipe } from '@taiga-ui/core/pipes/flag';
19
- import { TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
20
- import { AbstractTuiControl, tuiAsControl } from '@taiga-ui/legacy/classes';
21
- import { TUI_ARROW } from '@taiga-ui/legacy/components/arrow';
22
- import * as i6 from '@taiga-ui/legacy/components/input-phone';
23
- import { TuiInputPhoneModule, TuiInputPhoneComponent } from '@taiga-ui/legacy/components/input-phone';
24
- import * as i7 from '@taiga-ui/legacy/components/primitive-textfield';
25
- import { TuiPrimitiveTextfieldModule, TuiPrimitiveTextfieldComponent } from '@taiga-ui/legacy/components/primitive-textfield';
26
- import * as i8 from '@taiga-ui/legacy/directives';
27
- import { TUI_TEXTFIELD_SIZE, TuiLegacyDropdownOpenMonitorDirective, TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives';
28
- import { TuiToCountryCodePipe, TuiIsoToCountryCodePipe } from '@taiga-ui/legacy/pipes';
29
- import { TUI_COUNTRIES_MASKS, tuiAsFocusableItemAccessor } from '@taiga-ui/legacy/tokens';
30
- import { tuiIsoToCountryCode, tuiGetMaxAllowedPhoneLength } from '@taiga-ui/legacy/utils';
31
- import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
32
- import { tuiGetClipboardDataText } from '@taiga-ui/cdk/utils/dom';
33
-
34
- /**
35
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
36
- * https://taiga-ui.dev/components/input-phone-international
37
- */
38
- const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
39
- countries: [],
40
- countryIsoCode: 'RU',
41
- };
42
- /**
43
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
44
- * https://taiga-ui.dev/components/input-phone-international
45
- */
46
- const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS' : '', {
47
- factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,
48
- });
49
- /**
50
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
51
- * https://taiga-ui.dev/components/input-phone-international
52
- */
53
- function tuiInputPhoneInternationalOptionsProvider(options) {
54
- return tuiProvideOptions(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, options, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);
55
- }
56
-
57
- /**
58
- * @deprecated: drop in v5.0
59
- */
60
- function tuiExtractValueFromEvent(event) {
61
- return 'dataTransfer' in event
62
- ? event.dataTransfer?.getData('text/plain') || ''
63
- : tuiGetClipboardDataText(event);
64
- }
65
-
66
- const MASK_SYMBOLS = /[ \-_()]/g;
67
- /**
68
- * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}
69
- * https://taiga-ui.dev/components/input-phone-international
70
- */
71
- class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
72
- constructor() {
73
- super(...arguments);
74
- this.options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);
75
- this.extractCountryCodePipe = inject(TuiToCountryCodePipe);
76
- this.textfieldSize = inject(TUI_TEXTFIELD_SIZE);
77
- this.open = false;
78
- this.countriesNames$ = inject(TUI_COUNTRIES);
79
- this.countriesMasks = inject(TUI_COUNTRIES_MASKS);
80
- this.arrow = TUI_ARROW;
81
- this.countries = this.options.countries;
82
- this.countryIsoCodeChange = new EventEmitter();
83
- this.countryIsoCode = this.options.countryIsoCode;
84
- }
85
- set isoCode(code) {
86
- if (this.countryIsoCode === code) {
87
- return;
88
- }
89
- this.inputPhoneComponent?.writeValue(this.value);
90
- this.countryIsoCode = code;
91
- }
92
- get nativeFocusableElement() {
93
- return this.inputPhoneComponent && !this.computedDisabled
94
- ? this.inputPhoneComponent.nativeFocusableElement
95
- : null;
96
- }
97
- get focused() {
98
- return ((!!this.primitiveTextfield && this.primitiveTextfield.focused) ||
99
- (!!this.inputPhoneComponent && this.inputPhoneComponent.focused));
100
- }
101
- get inputPhoneCountryCode() {
102
- return tuiIsoToCountryCode(this.countriesMasks, this.countryIsoCode);
103
- }
104
- get phoneMaskAfterCountryCode() {
105
- const countryCode = this.inputPhoneCountryCode;
106
- return this.calculateMaskAfterCountryCode(this.countriesMasks[this.countryIsoCode], countryCode);
107
- }
108
- onPaste(event) {
109
- let value = tuiExtractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, '');
110
- const countryIsoCode = this.extractCountryCodePipe.transform(value, this.countries);
111
- if (!countryIsoCode) {
112
- this.value = `${this.inputPhoneCountryCode}${value}`
113
- .replaceAll(MASK_SYMBOLS, '')
114
- .slice(0, tuiGetMaxAllowedPhoneLength(this.countriesMasks, this.countryIsoCode));
115
- return;
116
- }
117
- if (countryIsoCode === 'RU') {
118
- value = value.replace(/^8/, '7');
119
- }
120
- this.updateCountryIsoCode(countryIsoCode);
121
- this.value = `${CHAR_PLUS}${value}`;
122
- }
123
- onItemClick(isoCode) {
124
- this.open = false;
125
- this.updateCountryIsoCode(isoCode);
126
- // recalculates mask inside inputPhone to prevent isoCode conflict
127
- this.cdr.detectChanges();
128
- const maxLength = tuiGetMaxAllowedPhoneLength(this.countriesMasks, isoCode);
129
- if (this.value.length > maxLength) {
130
- this.value = this.value.slice(0, maxLength);
131
- }
132
- if (this.nativeFocusableElement) {
133
- this.nativeFocusableElement.focus();
134
- }
135
- }
136
- setDisabledState() {
137
- super.setDisabledState();
138
- this.close();
139
- }
140
- get size() {
141
- return this.textfieldSize.size;
142
- }
143
- onActiveZone(active) {
144
- this.updateFocused(active);
145
- }
146
- getFallbackValue() {
147
- return '';
148
- }
149
- calculateMaskAfterCountryCode(mask, countryCode) {
150
- return mask.replace(countryCode, '').trim();
151
- }
152
- close() {
153
- this.open = false;
154
- }
155
- updateCountryIsoCode(code) {
156
- this.countryIsoCode = code;
157
- this.countryIsoCodeChange.emit(code);
158
- }
159
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternationalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputPhoneInternationalComponent, isStandalone: true, selector: "tui-input-phone-international", inputs: { countries: "countries", isoCode: ["countryIsoCode", "isoCode"] }, outputs: { countryIsoCodeChange: "countryIsoCodeChange" }, host: { listeners: { "paste.capture.prevent.stop": "onPaste($event)", "drop.capture.prevent.stop": "onPaste($event)" }, properties: { "attr.data-size": "size" } }, providers: [
161
- tuiAsFocusableItemAccessor(TuiInputPhoneInternationalComponent),
162
- tuiAsControl(TuiInputPhoneInternationalComponent),
163
- TuiToCountryCodePipe,
164
- ], viewQueries: [{ propertyName: "inputPhoneComponent", first: true, predicate: TuiInputPhoneComponent, descendants: true }, { propertyName: "primitiveTextfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiDropdownFixed }], ngImport: i0, template: "@if (countriesNames$ | async; as countriesNames) {\n <div\n tuiDropdownOpenMonitor\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"!readOnly\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n >\n <div tuiGroup>\n <tui-primitive-textfield\n tuiHintContent=\"\"\n tuiTextfieldPostfix=\"\"\n tuiTextfieldPrefix=\"\"\n class=\"t-country-select\"\n [disabled]=\"disabled\"\n [editable]=\"false\"\n [focusable]=\"focusable\"\n [pseudoFocus]=\"open || null\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldIcon]=\"icon\"\n [tuiTextfieldLabelOutside]=\"true\"\n />\n <tui-input-phone\n class=\"t-input-phone\"\n [countryCode]=\"inputPhoneCountryCode\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [ngModelOptions]=\"{standalone: true}\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoInvalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [(ngModel)]=\"value\"\n >\n <ng-content />\n <input\n autocomplete=\"new-password\"\n tuiTextfieldLegacy\n />\n </tui-input-phone>\n </div>\n <ng-template #dropdown>\n <tui-data-list>\n @for (item of countries; track item) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"item | tuiFlag\"\n />\n <span class=\"t-country-item-name\">\n {{ countriesNames[item] }}\n </span>\n <span class=\"t-country-item-code\">\n {{ item | tuiIsoToCountryCode }}\n </span>\n </button>\n }\n </tui-data-list>\n </ng-template>\n <ng-template #countryValueContent>\n <img\n class=\"t-flag t-flag_select\"\n [alt]=\"countriesNames[countryIsoCode]\"\n [src]=\"countryIsoCode | tuiFlag\"\n />\n </ng-template>\n <ng-template #icon>\n <div tuiAppearance=\"icon\">\n <ng-container *polymorpheusOutlet=\"arrow\" />\n </div>\n </ng-template>\n </div>\n}\n", styles: [":host{display:block}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-country-select{inline-size:5.625rem}.t-country-select:not(._readonly) ::ng-deep input:not(:disabled){cursor:pointer}.t-country-select._readonly ::ng-deep input{cursor:default}.t-country-select[data-size=m]{inline-size:5.5rem}.t-country-select[data-size=s]{inline-size:2rem}.t-country-select[data-size=s] .t-flag{margin-inline-start:-1rem}.t-input-phone{flex:1}.t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%}.t-flag_select{margin-inline-start:-.5rem}.t-country-item-name{margin-inline-start:.75rem;margin-inline-end:auto}.t-country-item-code{color:var(--tui-text-secondary);margin-inline-end:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i4.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { 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"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "directive", type: i5.TuiHintOptionsDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { kind: "ngmodule", type: TuiInputPhoneModule }, { kind: "component", type: i6.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["phoneMaskAfterCountryCode", "allowText", "search", "countryCode"], outputs: ["searchChange"] }, { kind: "directive", type: i6.TuiInputPhoneDirective, selector: "tui-input-phone" }, { kind: "component", type: i7.TuiTextfieldComponent, selector: "input[tuiTextfieldLegacy], textarea[tuiTextfieldLegacy]" }, { kind: "pipe", type: TuiIsoToCountryCodePipe, name: "tuiIsoToCountryCode" }, { kind: "directive", type: TuiLegacyDropdownOpenMonitorDirective, selector: "[tuiDropdownOpenMonitor]" }, { kind: "ngmodule", type: TuiPrimitiveTextfieldModule }, { kind: "component", type: i7.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "iconCleaner", "readOnly", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i7.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { kind: "directive", type: i8.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i8.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { kind: "directive", type: i8.TuiTextfieldPrefixDirective, selector: "[tuiTextfieldPrefix]", inputs: ["tuiTextfieldPrefix"] }, { kind: "directive", type: i8.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
165
- }
166
- __decorate([
167
- tuiPure
168
- ], TuiInputPhoneInternationalComponent.prototype, "calculateMaskAfterCountryCode", null);
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternationalComponent, decorators: [{
170
- type: Component,
171
- args: [{ selector: 'tui-input-phone-international', imports: [
172
- CommonModule,
173
- FormsModule,
174
- PolymorpheusOutlet,
175
- TuiAppearance,
176
- TuiDataList,
177
- TuiDropdown,
178
- TuiFlagPipe,
179
- TuiGroup,
180
- TuiHint,
181
- TuiInputPhoneModule,
182
- TuiIsoToCountryCodePipe,
183
- TuiLegacyDropdownOpenMonitorDirective,
184
- TuiPrimitiveTextfieldModule,
185
- TuiTextfieldControllerModule,
186
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
187
- tuiAsFocusableItemAccessor(TuiInputPhoneInternationalComponent),
188
- tuiAsControl(TuiInputPhoneInternationalComponent),
189
- TuiToCountryCodePipe,
190
- ], hostDirectives: [TuiDropdownFixed], host: {
191
- '[attr.data-size]': 'size',
192
- '(paste.capture.prevent.stop)': 'onPaste($event)',
193
- '(drop.capture.prevent.stop)': 'onPaste($event)',
194
- }, template: "@if (countriesNames$ | async; as countriesNames) {\n <div\n tuiDropdownOpenMonitor\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"!readOnly\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n >\n <div tuiGroup>\n <tui-primitive-textfield\n tuiHintContent=\"\"\n tuiTextfieldPostfix=\"\"\n tuiTextfieldPrefix=\"\"\n class=\"t-country-select\"\n [disabled]=\"disabled\"\n [editable]=\"false\"\n [focusable]=\"focusable\"\n [pseudoFocus]=\"open || null\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldIcon]=\"icon\"\n [tuiTextfieldLabelOutside]=\"true\"\n />\n <tui-input-phone\n class=\"t-input-phone\"\n [countryCode]=\"inputPhoneCountryCode\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [ngModelOptions]=\"{standalone: true}\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoInvalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [(ngModel)]=\"value\"\n >\n <ng-content />\n <input\n autocomplete=\"new-password\"\n tuiTextfieldLegacy\n />\n </tui-input-phone>\n </div>\n <ng-template #dropdown>\n <tui-data-list>\n @for (item of countries; track item) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"item | tuiFlag\"\n />\n <span class=\"t-country-item-name\">\n {{ countriesNames[item] }}\n </span>\n <span class=\"t-country-item-code\">\n {{ item | tuiIsoToCountryCode }}\n </span>\n </button>\n }\n </tui-data-list>\n </ng-template>\n <ng-template #countryValueContent>\n <img\n class=\"t-flag t-flag_select\"\n [alt]=\"countriesNames[countryIsoCode]\"\n [src]=\"countryIsoCode | tuiFlag\"\n />\n </ng-template>\n <ng-template #icon>\n <div tuiAppearance=\"icon\">\n <ng-container *polymorpheusOutlet=\"arrow\" />\n </div>\n </ng-template>\n </div>\n}\n", styles: [":host{display:block}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-country-select{inline-size:5.625rem}.t-country-select:not(._readonly) ::ng-deep input:not(:disabled){cursor:pointer}.t-country-select._readonly ::ng-deep input{cursor:default}.t-country-select[data-size=m]{inline-size:5.5rem}.t-country-select[data-size=s]{inline-size:2rem}.t-country-select[data-size=s] .t-flag{margin-inline-start:-1rem}.t-input-phone{flex:1}.t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%}.t-flag_select{margin-inline-start:-.5rem}.t-country-item-name{margin-inline-start:.75rem;margin-inline-end:auto}.t-country-item-code{color:var(--tui-text-secondary);margin-inline-end:.25rem}\n"] }]
195
- }], propDecorators: { inputPhoneComponent: [{
196
- type: ViewChild,
197
- args: [TuiInputPhoneComponent]
198
- }], primitiveTextfield: [{
199
- type: ViewChild,
200
- args: [TuiPrimitiveTextfieldComponent]
201
- }], countries: [{
202
- type: Input
203
- }], countryIsoCodeChange: [{
204
- type: Output
205
- }], isoCode: [{
206
- type: Input,
207
- args: ['countryIsoCode']
208
- }], calculateMaskAfterCountryCode: [] } });
209
-
210
- /**
211
- * Generated bundle index. Do not edit.
212
- */
213
-
214
- export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternationalComponent, tuiExtractValueFromEvent, tuiInputPhoneInternationalOptionsProvider };
215
- //# sourceMappingURL=taiga-ui-legacy-components-input-phone-international.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-components-input-phone-international.mjs","sources":["../../../projects/legacy/components/input-phone-international/input-phone-international.options.ts","../../../projects/legacy/components/input-phone-international/utils/extract-value-from-event.ts","../../../projects/legacy/components/input-phone-international/input-phone-international.component.ts","../../../projects/legacy/components/input-phone-international/input-phone-international.template.html","../../../projects/legacy/components/input-phone-international/taiga-ui-legacy-components-input-phone-international.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}\n * https://taiga-ui.dev/components/input-phone-international\n */\nexport interface TuiInputPhoneInternationalOptions {\n readonly countries: readonly TuiCountryIsoCode[];\n readonly countryIsoCode: TuiCountryIsoCode;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}\n * https://taiga-ui.dev/components/input-phone-international\n */\nexport const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS: TuiInputPhoneInternationalOptions =\n {\n countries: [],\n countryIsoCode: 'RU',\n };\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}\n * https://taiga-ui.dev/components/input-phone-international\n */\nexport const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS' : '',\n {\n factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,\n },\n);\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}\n * https://taiga-ui.dev/components/input-phone-international\n */\nexport function tuiInputPhoneInternationalOptionsProvider(\n options: Partial<TuiInputPhoneInternationalOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS,\n options,\n TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,\n );\n}\n","import {tuiGetClipboardDataText} from '@taiga-ui/cdk/utils/dom';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiExtractValueFromEvent(event: ClipboardEvent | DragEvent): string {\n return 'dataTransfer' in event\n ? event.dataTransfer?.getData('text/plain') || ''\n : tuiGetClipboardDataText(event);\n}\n","import {CommonModule} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {CHAR_PLUS, TUI_NON_DIGITS_REGEXP} from '@taiga-ui/cdk/constants';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDataList} from '@taiga-ui/core/components/data-list';\nimport {TuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {TuiDropdown, TuiDropdownFixed} from '@taiga-ui/core/directives/dropdown';\nimport {TuiGroup} from '@taiga-ui/core/directives/group';\nimport {TuiHint} from '@taiga-ui/core/directives/hint';\nimport {TuiFlagPipe} from '@taiga-ui/core/pipes/flag';\nimport {type TuiSizeL, type TuiSizeM, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_COUNTRIES} from '@taiga-ui/kit/tokens';\nimport {AbstractTuiControl, tuiAsControl} from '@taiga-ui/legacy/classes';\nimport {TUI_ARROW} from '@taiga-ui/legacy/components/arrow';\nimport {\n TuiInputPhoneComponent,\n TuiInputPhoneModule,\n} from '@taiga-ui/legacy/components/input-phone';\nimport {\n TuiPrimitiveTextfieldComponent,\n TuiPrimitiveTextfieldModule,\n} from '@taiga-ui/legacy/components/primitive-textfield';\nimport {\n TUI_TEXTFIELD_SIZE,\n TuiLegacyDropdownOpenMonitorDirective,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/legacy/directives';\nimport {TuiIsoToCountryCodePipe, TuiToCountryCodePipe} from '@taiga-ui/legacy/pipes';\nimport {\n TUI_COUNTRIES_MASKS,\n tuiAsFocusableItemAccessor,\n type TuiFocusableElementAccessor,\n} from '@taiga-ui/legacy/tokens';\nimport {tuiGetMaxAllowedPhoneLength, tuiIsoToCountryCode} from '@taiga-ui/legacy/utils';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS} from './input-phone-international.options';\nimport {tuiExtractValueFromEvent} from './utils/extract-value-from-event';\n\nconst MASK_SYMBOLS = /[ \\-_()]/g;\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiInputPhoneInternational}\n * https://taiga-ui.dev/components/input-phone-international\n */\n@Component({\n selector: 'tui-input-phone-international',\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusOutlet,\n TuiAppearance,\n TuiDataList,\n TuiDropdown,\n TuiFlagPipe,\n TuiGroup,\n TuiHint,\n TuiInputPhoneModule,\n TuiIsoToCountryCodePipe,\n TuiLegacyDropdownOpenMonitorDirective,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n ],\n templateUrl: './input-phone-international.template.html',\n styleUrls: ['./input-phone-international.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiInputPhoneInternationalComponent),\n tuiAsControl(TuiInputPhoneInternationalComponent),\n TuiToCountryCodePipe,\n ],\n hostDirectives: [TuiDropdownFixed],\n host: {\n '[attr.data-size]': 'size',\n '(paste.capture.prevent.stop)': 'onPaste($event)',\n '(drop.capture.prevent.stop)': 'onPaste($event)',\n },\n})\nexport class TuiInputPhoneInternationalComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiInputPhoneComponent)\n private readonly inputPhoneComponent?: TuiInputPhoneComponent;\n\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly primitiveTextfield?: TuiPrimitiveTextfieldComponent;\n\n private readonly options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);\n private readonly extractCountryCodePipe = inject(TuiToCountryCodePipe);\n private readonly textfieldSize = inject(TUI_TEXTFIELD_SIZE);\n\n protected open = false;\n protected readonly countriesNames$ = inject(TUI_COUNTRIES);\n protected readonly countriesMasks = inject(TUI_COUNTRIES_MASKS);\n protected readonly arrow: PolymorpheusContent<\n TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>\n > = TUI_ARROW;\n\n @Input()\n public countries = this.options.countries;\n\n @Output()\n public readonly countryIsoCodeChange = new EventEmitter<TuiCountryIsoCode>();\n\n public countryIsoCode = this.options.countryIsoCode;\n\n @Input('countryIsoCode')\n public set isoCode(code: TuiCountryIsoCode) {\n if (this.countryIsoCode === code) {\n return;\n }\n\n this.inputPhoneComponent?.writeValue(this.value);\n this.countryIsoCode = code;\n }\n\n public get nativeFocusableElement(): HTMLElement | null {\n return this.inputPhoneComponent && !this.computedDisabled\n ? this.inputPhoneComponent.nativeFocusableElement\n : null;\n }\n\n public get focused(): boolean {\n return (\n (!!this.primitiveTextfield && this.primitiveTextfield.focused) ||\n (!!this.inputPhoneComponent && this.inputPhoneComponent.focused)\n );\n }\n\n public get inputPhoneCountryCode(): string {\n return tuiIsoToCountryCode(this.countriesMasks, this.countryIsoCode);\n }\n\n public get phoneMaskAfterCountryCode(): string {\n const countryCode = this.inputPhoneCountryCode;\n\n return this.calculateMaskAfterCountryCode(\n this.countriesMasks[this.countryIsoCode],\n countryCode,\n );\n }\n\n public onPaste(event: ClipboardEvent | DragEvent): void {\n let value = tuiExtractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, '');\n const countryIsoCode = this.extractCountryCodePipe.transform(\n value,\n this.countries,\n );\n\n if (!countryIsoCode) {\n this.value = `${this.inputPhoneCountryCode}${value}`\n .replaceAll(MASK_SYMBOLS, '')\n .slice(\n 0,\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, this.countryIsoCode),\n );\n\n return;\n }\n\n if (countryIsoCode === 'RU') {\n value = value.replace(/^8/, '7');\n }\n\n this.updateCountryIsoCode(countryIsoCode);\n this.value = `${CHAR_PLUS}${value}`;\n }\n\n public onItemClick(isoCode: TuiCountryIsoCode): void {\n this.open = false;\n this.updateCountryIsoCode(isoCode);\n // recalculates mask inside inputPhone to prevent isoCode conflict\n this.cdr.detectChanges();\n\n const maxLength = tuiGetMaxAllowedPhoneLength(this.countriesMasks, isoCode);\n\n if (this.value.length > maxLength) {\n this.value = this.value.slice(0, maxLength);\n }\n\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.focus();\n }\n }\n\n public override setDisabledState(): void {\n super.setDisabledState();\n this.close();\n }\n\n protected get size(): TuiSizeL | TuiSizeS {\n return this.textfieldSize.size;\n }\n\n protected onActiveZone(active: boolean): void {\n this.updateFocused(active);\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n @tuiPure\n private calculateMaskAfterCountryCode(mask: string, countryCode: string): string {\n return mask.replace(countryCode, '').trim();\n }\n\n private close(): void {\n this.open = false;\n }\n\n private updateCountryIsoCode(code: TuiCountryIsoCode): void {\n this.countryIsoCode = code;\n this.countryIsoCodeChange.emit(code);\n }\n}\n","@if (countriesNames$ | async; as countriesNames) {\n <div\n tuiDropdownOpenMonitor\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"!readOnly\"\n [(tuiDropdownOpen)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n >\n <div tuiGroup>\n <tui-primitive-textfield\n tuiHintContent=\"\"\n tuiTextfieldPostfix=\"\"\n tuiTextfieldPrefix=\"\"\n class=\"t-country-select\"\n [disabled]=\"disabled\"\n [editable]=\"false\"\n [focusable]=\"focusable\"\n [pseudoFocus]=\"open || null\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldIcon]=\"icon\"\n [tuiTextfieldLabelOutside]=\"true\"\n />\n <tui-input-phone\n class=\"t-input-phone\"\n [countryCode]=\"inputPhoneCountryCode\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [ngModelOptions]=\"{standalone: true}\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoInvalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [style.flex]=\"'0 0 auto'\"\n [(ngModel)]=\"value\"\n >\n <ng-content />\n <input\n autocomplete=\"new-password\"\n tuiTextfieldLegacy\n />\n </tui-input-phone>\n </div>\n <ng-template #dropdown>\n <tui-data-list>\n @for (item of countries; track item) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"item | tuiFlag\"\n />\n <span class=\"t-country-item-name\">\n {{ countriesNames[item] }}\n </span>\n <span class=\"t-country-item-code\">\n {{ item | tuiIsoToCountryCode }}\n </span>\n </button>\n }\n </tui-data-list>\n </ng-template>\n <ng-template #countryValueContent>\n <img\n class=\"t-flag t-flag_select\"\n [alt]=\"countriesNames[countryIsoCode]\"\n [src]=\"countryIsoCode | tuiFlag\"\n />\n </ng-template>\n <ng-template #icon>\n <div tuiAppearance=\"icon\">\n <ng-container *polymorpheusOutlet=\"arrow\" />\n </div>\n </ng-template>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;AAGG;AACU,MAAA,6CAA6C,GACtD;AACI,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,cAAc,EAAE,IAAI;;AAG5B;;;AAGG;AACU,MAAA,qCAAqC,GAAG,IAAI,cAAc,CACnE,SAAS,GAAG,uCAAuC,GAAG,EAAE,EACxD;AACI,IAAA,OAAO,EAAE,MAAM,6CAA6C;AAC/D,CAAA;AAGL;;;AAGG;AACG,SAAU,yCAAyC,CACrD,OAAmD,EAAA;IAEnD,OAAO,iBAAiB,CACpB,qCAAqC,EACrC,OAAO,EACP,6CAA6C,CAChD;AACL;;AC5CA;;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