@pleione-lab/widgets 1.0.1

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.
@@ -0,0 +1,1972 @@
1
+ import * as i0 from '@angular/core';
2
+ import { output, effect, ChangeDetectionStrategy, Component, input, inject, DestroyRef, signal, computed, TemplateRef, ElementRef, ViewChild, Injector, PLATFORM_ID } from '@angular/core';
3
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
+ import * as i1 from '@angular/forms';
5
+ import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
+ import * as i3 from '@taiga-ui/core';
7
+ import { TuiTextfieldComponent, TuiIcon, TuiInput, TuiLabel, TuiButton, TuiError, TuiLoader, TuiFilterByInputPipe, TuiHint, tuiValidationErrorsProvider, TuiDialogService, TuiCalendar, TuiNotification } from '@taiga-ui/core';
8
+ import * as i2 from '@taiga-ui/core/components/label';
9
+ import * as i2$1 from '@taiga-ui/kit';
10
+ import { TuiChevron, TuiTooltip, TuiDataListWrapper, TuiSelect, TuiDataListWrapperComponent, TuiComboBox, TuiInputNumber, TuiTextarea, TuiCopy, TuiInputPhone, TuiPassword, TuiInputDateTime, TuiInputDateRange, TuiCalendarRange } from '@taiga-ui/kit';
11
+ import * as i3$1 from '@taiga-ui/core/components/textfield';
12
+ import * as i4 from '@taiga-ui/core/portals/dropdown';
13
+ import { Subject, filter, debounceTime, tap, switchMap, catchError, of } from 'rxjs';
14
+ import { WA_IS_IOS } from '@ng-web-apis/platform';
15
+ import { KeitControl as KeitControl$1, SimpleInputWidget as SimpleInputWidget$1, SimpleTextareaWidget as SimpleTextareaWidget$1, SimpleActionsWidget as SimpleActionsWidget$1, SimpleFlexLayout as SimpleFlexLayout$1, validatorsProvider as validatorsProvider$1, SimpleButtonWidget as SimpleButtonWidget$1 } from '@keit/widgets';
16
+ import { injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
17
+ import * as i6 from '@taiga-ui/core/components/calendar';
18
+ import * as i6$1 from '@taiga-ui/kit/components/calendar-range';
19
+ import { TuiTablePagination, tuiTablePaginationOptionsProvider } from '@taiga-ui/addon-table';
20
+ import { isPlatformBrowser } from '@angular/common';
21
+ import { TuiMonth, TuiDay } from '@taiga-ui/cdk';
22
+
23
+ class LoginInputWidget {
24
+ loginCtrl = new FormControl('', [
25
+ Validators.required,
26
+ Validators.minLength(3),
27
+ ]);
28
+ login$$ = toSignal(this.loginCtrl.valueChanges);
29
+ login = output();
30
+ loginNotReady = output();
31
+ constructor() {
32
+ effect(() => {
33
+ this.login.emit(this.login$$());
34
+ this.loginNotReady.emit(this.loginCtrl.invalid &&
35
+ this.loginCtrl.dirty &&
36
+ this.loginCtrl.touched);
37
+ });
38
+ }
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoginInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
40
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LoginInputWidget, isStandalone: true, selector: "keit-login-input", outputs: { login: "login", loginNotReady: "loginNotReady" }, ngImport: i0, template: `
41
+ <h3 class="tui-form__header tui-form__header_margin-top_none">Логин</h3>
42
+ <div class="tui-form__row">
43
+ <tui-textfield>
44
+ <label tuiLabel>Введите логин</label>
45
+ <input
46
+ placeholder="Введите логин"
47
+ tuiInput
48
+ [formControl]="loginCtrl"
49
+ autocomplete="off"
50
+ />
51
+ <tui-icon icon="@tui.user" />
52
+ </tui-textfield>
53
+
54
+ @if (loginCtrl.invalid && loginCtrl.dirty && loginCtrl.touched) {
55
+ <div class="alert">
56
+ @if (loginCtrl.hasError('required')) {
57
+ Требуется ввести логин.
58
+ }
59
+ @if (loginCtrl.hasError('minlength')) {
60
+ Должен быть хотя бы 3 символов
61
+ }
62
+ </div>
63
+ }
64
+ </div>
65
+ `, isInline: true, styles: [".alert{color:var(--tui-status-negative)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
66
+ }
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoginInputWidget, decorators: [{
68
+ type: Component,
69
+ args: [{ selector: 'keit-login-input', imports: [
70
+ FormsModule,
71
+ ReactiveFormsModule,
72
+ TuiTextfieldComponent,
73
+ TuiInput,
74
+ TuiLabel,
75
+ TuiIcon,
76
+ ], template: `
77
+ <h3 class="tui-form__header tui-form__header_margin-top_none">Логин</h3>
78
+ <div class="tui-form__row">
79
+ <tui-textfield>
80
+ <label tuiLabel>Введите логин</label>
81
+ <input
82
+ placeholder="Введите логин"
83
+ tuiInput
84
+ [formControl]="loginCtrl"
85
+ autocomplete="off"
86
+ />
87
+ <tui-icon icon="@tui.user" />
88
+ </tui-textfield>
89
+
90
+ @if (loginCtrl.invalid && loginCtrl.dirty && loginCtrl.touched) {
91
+ <div class="alert">
92
+ @if (loginCtrl.hasError('required')) {
93
+ Требуется ввести логин.
94
+ }
95
+ @if (loginCtrl.hasError('minlength')) {
96
+ Должен быть хотя бы 3 символов
97
+ }
98
+ </div>
99
+ }
100
+ </div>
101
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".alert{color:var(--tui-status-negative)}\n"] }]
102
+ }], ctorParameters: () => [], propDecorators: { login: [{ type: i0.Output, args: ["login"] }], loginNotReady: [{ type: i0.Output, args: ["loginNotReady"] }] } });
103
+
104
+ class PasswordInputWidget {
105
+ passwordCtrl = new FormControl('', [
106
+ Validators.required,
107
+ Validators.minLength(3),
108
+ ]);
109
+ password$$ = toSignal(this.passwordCtrl.valueChanges);
110
+ password = output();
111
+ passwordNotReady = output();
112
+ constructor() {
113
+ effect(() => {
114
+ this.password.emit(this.password$$());
115
+ this.passwordNotReady.emit(this.passwordCtrl.invalid &&
116
+ this.passwordCtrl.dirty &&
117
+ this.passwordCtrl.touched);
118
+ });
119
+ }
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PasswordInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
121
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PasswordInputWidget, isStandalone: true, selector: "keit-password-input", outputs: { password: "password", passwordNotReady: "passwordNotReady" }, ngImport: i0, template: `
122
+ <h3 class="tui-form__header tui-form__header_margin-top_none">
123
+ Пароль
124
+ </h3>
125
+ <div class="tui-form__row">
126
+ <tui-textfield>
127
+ <label tuiLabel>Введите пароль</label>
128
+ <input
129
+ placeholder="Введите пароль"
130
+ tuiInput
131
+ type="password"
132
+ [formControl]="passwordCtrl"
133
+ class="tui-space_top-2"
134
+ autocomplete="off"
135
+ />
136
+ <tui-icon tuiPassword />
137
+ </tui-textfield>
138
+
139
+ @if (
140
+ passwordCtrl.invalid &&
141
+ passwordCtrl.dirty &&
142
+ passwordCtrl.touched
143
+ ) {
144
+ <div class="alert">
145
+ @if (passwordCtrl.hasError('required')) {
146
+ Требуется ввести пароль
147
+ }
148
+ @if (passwordCtrl.hasError('minlength')) {
149
+ Должен быть хотя бы 3 символа
150
+ }
151
+ </div>
152
+ }
153
+ </div>
154
+ `, isInline: true, styles: [".alert{color:var(--tui-status-negative)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
155
+ }
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PasswordInputWidget, decorators: [{
157
+ type: Component,
158
+ args: [{ selector: 'keit-password-input', imports: [
159
+ FormsModule,
160
+ ReactiveFormsModule,
161
+ TuiTextfieldComponent,
162
+ TuiInput,
163
+ TuiLabel,
164
+ TuiIcon,
165
+ ], template: `
166
+ <h3 class="tui-form__header tui-form__header_margin-top_none">
167
+ Пароль
168
+ </h3>
169
+ <div class="tui-form__row">
170
+ <tui-textfield>
171
+ <label tuiLabel>Введите пароль</label>
172
+ <input
173
+ placeholder="Введите пароль"
174
+ tuiInput
175
+ type="password"
176
+ [formControl]="passwordCtrl"
177
+ class="tui-space_top-2"
178
+ autocomplete="off"
179
+ />
180
+ <tui-icon tuiPassword />
181
+ </tui-textfield>
182
+
183
+ @if (
184
+ passwordCtrl.invalid &&
185
+ passwordCtrl.dirty &&
186
+ passwordCtrl.touched
187
+ ) {
188
+ <div class="alert">
189
+ @if (passwordCtrl.hasError('required')) {
190
+ Требуется ввести пароль
191
+ }
192
+ @if (passwordCtrl.hasError('minlength')) {
193
+ Должен быть хотя бы 3 символа
194
+ }
195
+ </div>
196
+ }
197
+ </div>
198
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".alert{color:var(--tui-status-negative)}\n"] }]
199
+ }], ctorParameters: () => [], propDecorators: { password: [{ type: i0.Output, args: ["password"] }], passwordNotReady: [{ type: i0.Output, args: ["passwordNotReady"] }] } });
200
+
201
+ class SimpleButtonWidget {
202
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
203
+ iconRight = input(...(ngDevMode ? [undefined, { debugName: "iconRight" }] : /* istanbul ignore next */ []));
204
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
205
+ caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : /* istanbul ignore next */ []));
206
+ ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
207
+ action = output();
208
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
209
+ appearance = input('primary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleButtonWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleButtonWidget, isStandalone: true, selector: "keit-simple-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, host: { listeners: { "window:keydown.enter": "action.emit()" } }, ngImport: i0, template: `
212
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
213
+ <button
214
+ tuiButton
215
+ [appearance]="appearance()"
216
+ type="button"
217
+ [size]="size()"
218
+ (click)="action.emit()"
219
+ [disabled]="disabled()"
220
+ [attr.aria-label]="ariaLabel() || caption() || null"
221
+ >
222
+ @if (icon()) {
223
+ <tui-icon [icon]="icon() ?? ''" />
224
+ }
225
+ {{ caption() }}
226
+ @if (iconRight()) {
227
+ <tui-icon [icon]="iconRight() ?? ''" />
228
+ }
229
+ </button>
230
+ `, isInline: true, styles: [""], dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
231
+ }
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleButtonWidget, decorators: [{
233
+ type: Component,
234
+ args: [{ selector: 'keit-simple-button', imports: [TuiIcon, TuiButton], template: `
235
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
236
+ <button
237
+ tuiButton
238
+ [appearance]="appearance()"
239
+ type="button"
240
+ [size]="size()"
241
+ (click)="action.emit()"
242
+ [disabled]="disabled()"
243
+ [attr.aria-label]="ariaLabel() || caption() || null"
244
+ >
245
+ @if (icon()) {
246
+ <tui-icon [icon]="icon() ?? ''" />
247
+ }
248
+ {{ caption() }}
249
+ @if (iconRight()) {
250
+ <tui-icon [icon]="iconRight() ?? ''" />
251
+ }
252
+ </button>
253
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
254
+ '(window:keydown.enter)': 'action.emit()',
255
+ } }]
256
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], action: [{ type: i0.Output, args: ["action"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
257
+
258
+ class EmailInputWidget {
259
+ emailCtrl = new FormControl('', [
260
+ Validators.required,
261
+ Validators.minLength(3),
262
+ Validators.email,
263
+ ]);
264
+ email$$ = toSignal(this.emailCtrl.valueChanges);
265
+ email = output();
266
+ emailNotReady = output();
267
+ constructor() {
268
+ effect(() => {
269
+ this.email.emit(this.email$$());
270
+ this.emailNotReady.emit(this.emailCtrl.invalid &&
271
+ this.emailCtrl.dirty &&
272
+ this.emailCtrl.touched);
273
+ });
274
+ }
275
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
276
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailInputWidget, isStandalone: true, selector: "keit-email-input", outputs: { email: "email", emailNotReady: "emailNotReady" }, ngImport: i0, template: `
277
+ <h3 class="tui-form__header tui-form__header_margin-top_none">Email</h3>
278
+ <div class="tui-form__row">
279
+ <tui-textfield>
280
+ <label tuiLabel>Введите email</label>
281
+ <input
282
+ type="email"
283
+ placeholder="Введите email"
284
+ tuiInput
285
+ [formControl]="emailCtrl"
286
+ autocomplete="off"
287
+ />
288
+ </tui-textfield>
289
+
290
+ @if (emailCtrl.invalid && emailCtrl.dirty && emailCtrl.touched) {
291
+ <div class="alert">
292
+ @if (emailCtrl.hasError('required')) {
293
+ Требуется ввести email.
294
+ }
295
+ @if (emailCtrl.hasError('minlength')) {
296
+ Должен быть хотя бы 3 символов
297
+ }
298
+ @if (emailCtrl.hasError('email')) {
299
+ Формат почты задан неверно
300
+ }
301
+ </div>
302
+ }
303
+ </div>
304
+ `, isInline: true, styles: [".alert{color:var(--tui-status-negative)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
305
+ }
306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailInputWidget, decorators: [{
307
+ type: Component,
308
+ args: [{ selector: 'keit-email-input', imports: [
309
+ FormsModule,
310
+ ReactiveFormsModule,
311
+ TuiTextfieldComponent,
312
+ TuiInput,
313
+ TuiLabel,
314
+ ], template: `
315
+ <h3 class="tui-form__header tui-form__header_margin-top_none">Email</h3>
316
+ <div class="tui-form__row">
317
+ <tui-textfield>
318
+ <label tuiLabel>Введите email</label>
319
+ <input
320
+ type="email"
321
+ placeholder="Введите email"
322
+ tuiInput
323
+ [formControl]="emailCtrl"
324
+ autocomplete="off"
325
+ />
326
+ </tui-textfield>
327
+
328
+ @if (emailCtrl.invalid && emailCtrl.dirty && emailCtrl.touched) {
329
+ <div class="alert">
330
+ @if (emailCtrl.hasError('required')) {
331
+ Требуется ввести email.
332
+ }
333
+ @if (emailCtrl.hasError('minlength')) {
334
+ Должен быть хотя бы 3 символов
335
+ }
336
+ @if (emailCtrl.hasError('email')) {
337
+ Формат почты задан неверно
338
+ }
339
+ </div>
340
+ }
341
+ </div>
342
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".alert{color:var(--tui-status-negative)}\n"] }]
343
+ }], ctorParameters: () => [], propDecorators: { email: [{ type: i0.Output, args: ["email"] }], emailNotReady: [{ type: i0.Output, args: ["emailNotReady"] }] } });
344
+
345
+ class FieldValidation {
346
+ control = input(...(ngDevMode ? [undefined, { debugName: "control" }] : /* istanbul ignore next */ []));
347
+ field = input(...(ngDevMode ? [undefined, { debugName: "field" }] : /* istanbul ignore next */ []));
348
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldValidation, deps: [], target: i0.ɵɵFactoryTarget.Component });
349
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FieldValidation, isStandalone: true, selector: "keit-field-validation", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
350
+ @let controlValue = control();
351
+
352
+ @if (controlValue) {
353
+ <tui-error [formControl]="controlValue" />
354
+ }
355
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.TuiErrorComponent, selector: "tui-error", inputs: ["error"] }, { kind: "directive", type: i3.TuiErrorDirective, selector: "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]", inputs: ["order"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
356
+ }
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldValidation, decorators: [{
358
+ type: Component,
359
+ args: [{ selector: 'keit-field-validation', imports: [ReactiveFormsModule, TuiError], template: `
360
+ @let controlValue = control();
361
+
362
+ @if (controlValue) {
363
+ <tui-error [formControl]="controlValue" />
364
+ }
365
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
366
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: false }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }] } });
367
+
368
+ class SimpleSelectWidget {
369
+ placeholder = input.required(...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
370
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
371
+ items = input(...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
372
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
373
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
374
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
375
+ stringify = (item2) => {
376
+ return this.items()?.find((item) => item.id === item2.id)?.name ?? '';
377
+ };
378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleSelectWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
379
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleSelectWidget, isStandalone: true, selector: "keit-simple-select-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
380
+ <tui-textfield
381
+ tuiChevron
382
+ [stringify]="stringify"
383
+ [tuiTextfieldSize]="size()"
384
+ [tuiTextfieldCleaner]="cleaner() ?? false"
385
+ >
386
+ <input
387
+ tuiSelect
388
+ [formControl]="control()"
389
+ [placeholder]="placeholder()"
390
+ />
391
+
392
+ <tui-data-list-wrapper *tuiDropdown new [items]="items() ?? []" />
393
+
394
+ @if (hint()) {
395
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
396
+ }
397
+ </tui-textfield>
398
+
399
+ <keit-field-validation [control]="control()" />
400
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i2$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
401
+ }
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleSelectWidget, decorators: [{
403
+ type: Component,
404
+ args: [{ selector: 'keit-simple-select-widget', imports: [
405
+ ReactiveFormsModule,
406
+ TuiChevron,
407
+ TuiDataListWrapper,
408
+ TuiSelect,
409
+ TuiInput,
410
+ TuiDataListWrapperComponent,
411
+ FieldValidation,
412
+ TuiIcon,
413
+ TuiTooltip,
414
+ ], template: `
415
+ <tui-textfield
416
+ tuiChevron
417
+ [stringify]="stringify"
418
+ [tuiTextfieldSize]="size()"
419
+ [tuiTextfieldCleaner]="cleaner() ?? false"
420
+ >
421
+ <input
422
+ tuiSelect
423
+ [formControl]="control()"
424
+ [placeholder]="placeholder()"
425
+ />
426
+
427
+ <tui-data-list-wrapper *tuiDropdown new [items]="items() ?? []" />
428
+
429
+ @if (hint()) {
430
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
431
+ }
432
+ </tui-textfield>
433
+
434
+ <keit-field-validation [control]="control()" />
435
+ `, changeDetection: ChangeDetectionStrategy.OnPush }]
436
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }] } });
437
+
438
+ class SimpleComboWidget {
439
+ destroyRef = inject(DestroyRef);
440
+ search$ = new Subject();
441
+ placeholder = input.required(...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
442
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
443
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
444
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
445
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
446
+ loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
447
+ responseReady = signal(false, ...(ngDevMode ? [{ debugName: "responseReady" }] : /* istanbul ignore next */ []));
448
+ add = output();
449
+ // eslint-disable-next-line @angular-eslint/prefer-signals
450
+ emptyTemplate;
451
+ // eslint-disable-next-line @angular-eslint/prefer-signals
452
+ inputRef;
453
+ searchedItems = signal([], ...(ngDevMode ? [{ debugName: "searchedItems" }] : /* istanbul ignore next */ []));
454
+ items = computed(() => {
455
+ const value = this.control().value;
456
+ const searched = this.searchedItems();
457
+ if (!value) {
458
+ return searched;
459
+ }
460
+ // Проверяем, есть ли value уже в searched по id
461
+ const exists = searched.some((item) => item.id === value.id);
462
+ if (exists) {
463
+ return searched;
464
+ }
465
+ return [...searched, value];
466
+ }, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
467
+ backendRequest = input.required(...(ngDevMode ? [{ debugName: "backendRequest" }] : /* istanbul ignore next */ []));
468
+ stringify = (item2) => {
469
+ const items = this.items();
470
+ const found = items?.find((item) => item.id === item2.id);
471
+ return found?.name ?? '';
472
+ };
473
+ ngOnInit() {
474
+ this.search$
475
+ .pipe(filter((str) => str.length >= 2), debounceTime(500), tap(() => this.loading.set(true)), switchMap((str) => this.backendRequest()(str)), catchError((error) => {
476
+ this.loading.set(false);
477
+ this.responseReady.set(true);
478
+ return of([]);
479
+ }), tap(() => this.loading.set(false)), tap(() => this.responseReady.set(true)), takeUntilDestroyed(this.destroyRef))
480
+ .subscribe((value) => {
481
+ this.searchedItems.set(value);
482
+ });
483
+ }
484
+ onAdd() {
485
+ const value = this.inputRef?.nativeElement?.value?.trim() || '';
486
+ this.add.emit(value);
487
+ }
488
+ addItem(item) {
489
+ const current = this.searchedItems();
490
+ if (current) {
491
+ this.searchedItems.set([...current, item]);
492
+ }
493
+ else {
494
+ this.searchedItems.set([item]);
495
+ }
496
+ }
497
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleComboWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
498
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleComboWidget, isStandalone: true, selector: "keit-simple-combo-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null }, backendRequest: { classPropertyName: "backendRequest", publicName: "backendRequest", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { add: "add" }, viewQueries: [{ propertyName: "emptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true, read: TemplateRef }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, read: ElementRef }], ngImport: i0, template: `
499
+ <tui-textfield
500
+ tuiChevron
501
+ [stringify]="stringify"
502
+ [tuiTextfieldSize]="size()"
503
+ [tuiTextfieldCleaner]="cleaner() ?? false"
504
+ >
505
+ <input
506
+ #inputRef
507
+ tuiComboBox
508
+ [formControl]="control()"
509
+ [placeholder]="placeholder()"
510
+ (input)="
511
+ responseReady.set(false);
512
+ search$.next($any($event.target).value)
513
+ "
514
+ />
515
+
516
+ <ng-template #emptyTemplate>
517
+ <div class="empty-content">
518
+ <div class="no-found-icon">Ничего не нашел</div>
519
+ <keit-simple-button
520
+ icon="@tui.plus"
521
+ caption="Создать"
522
+ size="s"
523
+ (action)="onAdd()"
524
+ />
525
+ </div>
526
+ </ng-template>
527
+
528
+ <tui-data-list-wrapper
529
+ *tuiDropdown
530
+ new
531
+ [emptyContent]="
532
+ loading()
533
+ ? 'Загрузка...'
534
+ : inputRef.value.length < 2
535
+ ? 'Введите хотя бы 2 символа'
536
+ : responseReady()
537
+ ? emptyTemplate
538
+ : ''
539
+ "
540
+ [items]="
541
+ inputRef.value.length < 2
542
+ ? []
543
+ : (items() | tuiFilterByInput)
544
+ "
545
+ />
546
+
547
+ @if (hint()) {
548
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
549
+ }
550
+ @if (items()) {
551
+ <tui-loader [loading]="loading()" />
552
+ }
553
+
554
+ <keit-field-validation [control]="control()" />
555
+ </tui-textfield>
556
+ `, isInline: true, styles: [".empty-content{display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:auto!important}.no-found-icon{font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i2$1.TuiComboBoxDirective, selector: "input[tuiComboBox]", inputs: ["strict", "matcher"] }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "component", type: SimpleButtonWidget, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }, { kind: "pipe", type: TuiFilterByInputPipe, name: "tuiFilterByInput" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
557
+ }
558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleComboWidget, decorators: [{
559
+ type: Component,
560
+ args: [{ selector: 'keit-simple-combo-widget', imports: [
561
+ ReactiveFormsModule,
562
+ TuiChevron,
563
+ TuiDataListWrapper,
564
+ TuiComboBox,
565
+ TuiInput,
566
+ TuiDataListWrapperComponent,
567
+ TuiIcon,
568
+ TuiTooltip,
569
+ TuiFilterByInputPipe,
570
+ TuiLoader,
571
+ SimpleButtonWidget,
572
+ FieldValidation,
573
+ ], template: `
574
+ <tui-textfield
575
+ tuiChevron
576
+ [stringify]="stringify"
577
+ [tuiTextfieldSize]="size()"
578
+ [tuiTextfieldCleaner]="cleaner() ?? false"
579
+ >
580
+ <input
581
+ #inputRef
582
+ tuiComboBox
583
+ [formControl]="control()"
584
+ [placeholder]="placeholder()"
585
+ (input)="
586
+ responseReady.set(false);
587
+ search$.next($any($event.target).value)
588
+ "
589
+ />
590
+
591
+ <ng-template #emptyTemplate>
592
+ <div class="empty-content">
593
+ <div class="no-found-icon">Ничего не нашел</div>
594
+ <keit-simple-button
595
+ icon="@tui.plus"
596
+ caption="Создать"
597
+ size="s"
598
+ (action)="onAdd()"
599
+ />
600
+ </div>
601
+ </ng-template>
602
+
603
+ <tui-data-list-wrapper
604
+ *tuiDropdown
605
+ new
606
+ [emptyContent]="
607
+ loading()
608
+ ? 'Загрузка...'
609
+ : inputRef.value.length < 2
610
+ ? 'Введите хотя бы 2 символа'
611
+ : responseReady()
612
+ ? emptyTemplate
613
+ : ''
614
+ "
615
+ [items]="
616
+ inputRef.value.length < 2
617
+ ? []
618
+ : (items() | tuiFilterByInput)
619
+ "
620
+ />
621
+
622
+ @if (hint()) {
623
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
624
+ }
625
+ @if (items()) {
626
+ <tui-loader [loading]="loading()" />
627
+ }
628
+
629
+ <keit-field-validation [control]="control()" />
630
+ </tui-textfield>
631
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".empty-content{display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:auto!important}.no-found-icon{font-size:12px}\n"] }]
632
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }], add: [{ type: i0.Output, args: ["add"] }], emptyTemplate: [{
633
+ type: ViewChild,
634
+ args: ['emptyTemplate', { read: TemplateRef }]
635
+ }], inputRef: [{
636
+ type: ViewChild,
637
+ args: ['inputRef', { read: ElementRef }]
638
+ }], backendRequest: [{ type: i0.Input, args: [{ isSignal: true, alias: "backendRequest", required: true }] }] } });
639
+
640
+ class SimpleNumberInputWidget {
641
+ placeholder = input.required(...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
642
+ sample = input(...(ngDevMode ? [undefined, { debugName: "sample" }] : /* istanbul ignore next */ []));
643
+ hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
644
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
645
+ min = input.required(...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
646
+ max = input.required(...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
647
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
648
+ postfix = input(...(ngDevMode ? [undefined, { debugName: "postfix" }] : /* istanbul ignore next */ []));
649
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
650
+ step = input(...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
651
+ enter = output();
652
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleNumberInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
653
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleNumberInputWidget, isStandalone: true, selector: "keit-simple-number-input-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, sample: { classPropertyName: "sample", publicName: "sample", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, postfix: { classPropertyName: "postfix", publicName: "postfix", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enter: "enter" }, ngImport: i0, template: `
654
+ <tui-textfield
655
+ [tuiTextfieldSize]="size()"
656
+ [tuiTextfieldCleaner]="cleaner() ?? false"
657
+ >
658
+ <label tuiLabel>{{ placeholder() }}</label>
659
+
660
+ @if (step()) {
661
+ <input
662
+ tuiInputNumber
663
+ [placeholder]="sample()"
664
+ [formControl]="control()"
665
+ [min]="min()"
666
+ [max]="max()"
667
+ [step]="step() ?? 1"
668
+ [postfix]="postfix() ?? ''"
669
+ (keydown.enter)="enter.emit()"
670
+ />
671
+ } @else {
672
+ <input
673
+ tuiInputNumber
674
+ [placeholder]="sample()"
675
+ [formControl]="control()"
676
+ [min]="min()"
677
+ [max]="max()"
678
+ [postfix]="postfix() ?? ''"
679
+ (keydown.enter)="enter.emit()"
680
+ />
681
+ }
682
+
683
+ @if (hint()) {
684
+ <tui-icon
685
+ [tuiHintDirection]="'top-end'"
686
+ [tuiTooltip]="hint() ?? ''"
687
+ />
688
+ }
689
+ </tui-textfield>
690
+
691
+ <keit-field-validation [control]="control()" />
692
+ `, isInline: true, styles: [":host{display:block;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i2$1.TuiInputNumberDirective, selector: "input[tuiInputNumber]" }, { kind: "directive", type: i2$1.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
693
+ }
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleNumberInputWidget, decorators: [{
695
+ type: Component,
696
+ args: [{ selector: 'keit-simple-number-input-widget', imports: [
697
+ ReactiveFormsModule,
698
+ TuiInput,
699
+ TuiInputNumber,
700
+ TuiLabel,
701
+ FieldValidation,
702
+ TuiHint,
703
+ TuiTooltip,
704
+ TuiIcon,
705
+ ], template: `
706
+ <tui-textfield
707
+ [tuiTextfieldSize]="size()"
708
+ [tuiTextfieldCleaner]="cleaner() ?? false"
709
+ >
710
+ <label tuiLabel>{{ placeholder() }}</label>
711
+
712
+ @if (step()) {
713
+ <input
714
+ tuiInputNumber
715
+ [placeholder]="sample()"
716
+ [formControl]="control()"
717
+ [min]="min()"
718
+ [max]="max()"
719
+ [step]="step() ?? 1"
720
+ [postfix]="postfix() ?? ''"
721
+ (keydown.enter)="enter.emit()"
722
+ />
723
+ } @else {
724
+ <input
725
+ tuiInputNumber
726
+ [placeholder]="sample()"
727
+ [formControl]="control()"
728
+ [min]="min()"
729
+ [max]="max()"
730
+ [postfix]="postfix() ?? ''"
731
+ (keydown.enter)="enter.emit()"
732
+ />
733
+ }
734
+
735
+ @if (hint()) {
736
+ <tui-icon
737
+ [tuiHintDirection]="'top-end'"
738
+ [tuiTooltip]="hint() ?? ''"
739
+ />
740
+ }
741
+ </tui-textfield>
742
+
743
+ <keit-field-validation [control]="control()" />
744
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;flex-grow:1}\n"] }]
745
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], sample: [{ type: i0.Input, args: [{ isSignal: true, alias: "sample", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], postfix: [{ type: i0.Input, args: [{ isSignal: true, alias: "postfix", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], enter: [{ type: i0.Output, args: ["enter"] }] } });
746
+
747
+ class SimpleInputWidget {
748
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
749
+ sample = input('Введите...', ...(ngDevMode ? [{ debugName: "sample" }] : /* istanbul ignore next */ []));
750
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
751
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
752
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
753
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
754
+ iconRight = input('', ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
755
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
756
+ hasEnter = input(...(ngDevMode ? [undefined, { debugName: "hasEnter" }] : /* istanbul ignore next */ []));
757
+ focused = input(null, ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
758
+ enter = output();
759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
760
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleInputWidget, isStandalone: true, selector: "keit-simple-input-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, sample: { classPropertyName: "sample", publicName: "sample", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null }, hasEnter: { classPropertyName: "hasEnter", publicName: "hasEnter", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enter: "enter" }, ngImport: i0, template: `
761
+ <tui-textfield
762
+ [tuiTextfieldSize]="size()"
763
+ [tuiTextfieldCleaner]="cleaner() ?? false"
764
+ >
765
+ @if (placeholder()) {
766
+ <label tuiLabel>{{ placeholder() }}</label>
767
+ }
768
+ <input
769
+ tuiInput
770
+ [placeholder]="sample()"
771
+ [formControl]="control()"
772
+ [readOnly]="readonly()"
773
+ [attr.autofocus]="focused()"
774
+ [focused]="focused()"
775
+ autocomplete="off"
776
+ (keydown.enter)="enter.emit()"
777
+ />
778
+
779
+ @if (hasEnter()) {
780
+ <tui-icon
781
+ icon="@tui.corner-down-left"
782
+ (click)="enter.emit()"
783
+ class="icon"
784
+ />
785
+ }
786
+
787
+ @if (iconRight()) {
788
+ <tui-icon [icon]="iconRight()" />
789
+ }
790
+
791
+ @if (hint()) {
792
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
793
+ }
794
+
795
+ <keit-field-validation [control]="control()" />
796
+ </tui-textfield>
797
+ `, isInline: true, styles: [":host{display:block}.icon{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
798
+ }
799
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleInputWidget, decorators: [{
800
+ type: Component,
801
+ args: [{ selector: 'keit-simple-input-widget', imports: [
802
+ ReactiveFormsModule,
803
+ FormsModule,
804
+ TuiInput,
805
+ TuiLabel,
806
+ FieldValidation,
807
+ TuiIcon,
808
+ TuiTooltip,
809
+ ], template: `
810
+ <tui-textfield
811
+ [tuiTextfieldSize]="size()"
812
+ [tuiTextfieldCleaner]="cleaner() ?? false"
813
+ >
814
+ @if (placeholder()) {
815
+ <label tuiLabel>{{ placeholder() }}</label>
816
+ }
817
+ <input
818
+ tuiInput
819
+ [placeholder]="sample()"
820
+ [formControl]="control()"
821
+ [readOnly]="readonly()"
822
+ [attr.autofocus]="focused()"
823
+ [focused]="focused()"
824
+ autocomplete="off"
825
+ (keydown.enter)="enter.emit()"
826
+ />
827
+
828
+ @if (hasEnter()) {
829
+ <tui-icon
830
+ icon="@tui.corner-down-left"
831
+ (click)="enter.emit()"
832
+ class="icon"
833
+ />
834
+ }
835
+
836
+ @if (iconRight()) {
837
+ <tui-icon [icon]="iconRight()" />
838
+ }
839
+
840
+ @if (hint()) {
841
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
842
+ }
843
+
844
+ <keit-field-validation [control]="control()" />
845
+ </tui-textfield>
846
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.icon{cursor:pointer}\n"] }]
847
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], sample: [{ type: i0.Input, args: [{ isSignal: true, alias: "sample", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }], hasEnter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasEnter", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], enter: [{ type: i0.Output, args: ["enter"] }] } });
848
+
849
+ class SimpleTextareaWidget {
850
+ placeholder = input.required(...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
851
+ sample = input(...(ngDevMode ? [undefined, { debugName: "sample" }] : /* istanbul ignore next */ []));
852
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
853
+ limit = input(...(ngDevMode ? [undefined, { debugName: "limit" }] : /* istanbul ignore next */ []));
854
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
855
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
856
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleTextareaWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
857
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimpleTextareaWidget, isStandalone: true, selector: "keit-simple-textarea", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, sample: { classPropertyName: "sample", publicName: "sample", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
858
+ <tui-textfield
859
+ [tuiTextfieldSize]="size()"
860
+ [tuiTextfieldCleaner]="cleaner() ?? false"
861
+ >
862
+ <label tuiLabel>{{ placeholder() }}</label>
863
+ <textarea
864
+ [placeholder]="sample()"
865
+ [formControl]="control()"
866
+ [min]="3"
867
+ [max]="6"
868
+ [limit]="limit() ?? 1000"
869
+ tuiTextarea
870
+ ></textarea>
871
+ </tui-textfield>
872
+
873
+ <keit-field-validation [control]="control()" />
874
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.TuiTextareaComponent, selector: "textarea[tuiTextarea]", inputs: ["min", "max", "content"] }, { kind: "directive", type: i2$1.TuiTextareaDirective, selector: "[tuiTextarea][limit]", inputs: ["limit"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
875
+ }
876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleTextareaWidget, decorators: [{
877
+ type: Component,
878
+ args: [{ selector: 'keit-simple-textarea', imports: [
879
+ ReactiveFormsModule,
880
+ TuiTextarea,
881
+ TuiLabel,
882
+ TuiInput,
883
+ FieldValidation,
884
+ ], template: `
885
+ <tui-textfield
886
+ [tuiTextfieldSize]="size()"
887
+ [tuiTextfieldCleaner]="cleaner() ?? false"
888
+ >
889
+ <label tuiLabel>{{ placeholder() }}</label>
890
+ <textarea
891
+ [placeholder]="sample()"
892
+ [formControl]="control()"
893
+ [min]="3"
894
+ [max]="6"
895
+ [limit]="limit() ?? 1000"
896
+ tuiTextarea
897
+ ></textarea>
898
+ </tui-textfield>
899
+
900
+ <keit-field-validation [control]="control()" />
901
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
902
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], sample: [{ type: i0.Input, args: [{ isSignal: true, alias: "sample", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }] } });
903
+
904
+ class SimpleCopyInputWidget {
905
+ name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
906
+ placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
907
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
908
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
909
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCopyInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
910
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimpleCopyInputWidget, isStandalone: true, selector: "keit-simple-copy-input-widget", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
911
+ <tui-textfield
912
+ [tuiTextfieldCleaner]="false"
913
+ [tuiTextfieldSize]="size()"
914
+ >
915
+ <label tuiLabel>{{ name() }}</label>
916
+ <input
917
+ tuiInput
918
+ [placeholder]="placeholder()"
919
+ [formControl]="control()"
920
+ />
921
+ <tui-icon tuiCopy />
922
+ </tui-textfield>
923
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: i2$1.TuiCopyDirective, selector: "tui-icon[tuiCopy]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
924
+ }
925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCopyInputWidget, decorators: [{
926
+ type: Component,
927
+ args: [{ selector: 'keit-simple-copy-input-widget', imports: [
928
+ ReactiveFormsModule,
929
+ FormsModule,
930
+ TuiInput,
931
+ TuiLabel,
932
+ TuiIcon,
933
+ TuiCopy,
934
+ ], template: `
935
+ <tui-textfield
936
+ [tuiTextfieldCleaner]="false"
937
+ [tuiTextfieldSize]="size()"
938
+ >
939
+ <label tuiLabel>{{ name() }}</label>
940
+ <input
941
+ tuiInput
942
+ [placeholder]="placeholder()"
943
+ [formControl]="control()"
944
+ />
945
+ <tui-icon tuiCopy />
946
+ </tui-textfield>
947
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
948
+ }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
949
+
950
+ const PATTERN_ONLY_CHARS = /^[a-zA-Zа-яёА-ЯЁ]+$/;
951
+ const PATTERN_CHARS_WITH_SPACE = /^[a-zA-Zа-яёА-ЯЁ\s]+$/;
952
+ const PATTERN_ONLY_DIGITS = /^[0-9]+$/;
953
+ const PATTERN_ONLY_DIGITS_CHARS = /^[a-zA-Zа-яёА-ЯЁ0-9]+$/;
954
+ const PATTERN_ONLY_DIGITS_CHARS_TIRE = /^[a-zA-Zа-яёА-ЯЁ0-9\-\s]+$/;
955
+ const PATTERN_REF_CATEGORIES = /^[a-zA-Zа-яёА-ЯЁ0-9\-\'\" .]+$/;
956
+ const PATTERN_PHONE = /^\+7\d{10}$/;
957
+ const validatorsProvider = tuiValidationErrorsProvider({
958
+ required: 'Требуется ввести',
959
+ maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
960
+ minlength: ({ requiredLength }) => `Минимальная длина — ${requiredLength}`,
961
+ email: 'Введите корректный email',
962
+ pattern: ({ requiredPattern }) => {
963
+ // Remove leading and trailing slashes from the pattern
964
+ const pattern = requiredPattern.replace(/^\/|\/$/g, '');
965
+ // Helper to compare regex patterns by their source
966
+ const isPattern = (regex) => {
967
+ // Compare source without anchors for flexibility
968
+ const source = regex.source.replace(/^\^|\$$/g, '');
969
+ const patternWithoutAnchors = pattern.replace(/^\^|\$$/g, '');
970
+ // Normalize backslashes: reduce double backslashes to single
971
+ const normalize = (s) => s.replace(/\\\\/g, '\\');
972
+ return normalize(source) === normalize(patternWithoutAnchors);
973
+ };
974
+ if (isPattern(PATTERN_ONLY_CHARS)) {
975
+ return 'Должны быть только буквы';
976
+ }
977
+ if (isPattern(PATTERN_CHARS_WITH_SPACE)) {
978
+ return 'Должны быть только буквы и пробел';
979
+ }
980
+ if (isPattern(PATTERN_ONLY_DIGITS)) {
981
+ return 'Должны быть только цифры';
982
+ }
983
+ if (isPattern(PATTERN_ONLY_DIGITS_CHARS)) {
984
+ return 'Только цифры и буквы';
985
+ }
986
+ if (isPattern(PATTERN_ONLY_DIGITS_CHARS_TIRE)) {
987
+ return 'Только цифры, буквы, тире';
988
+ }
989
+ if (isPattern(PATTERN_REF_CATEGORIES)) {
990
+ return 'Недопустимый символ';
991
+ }
992
+ if (isPattern(PATTERN_PHONE)) {
993
+ return 'Введите корректный номер телефона';
994
+ }
995
+ return 'Некорректный формат';
996
+ },
997
+ });
998
+
999
+ class KeitControl extends FormControl {
1000
+ constructor(defaultValue, blurable) {
1001
+ super(defaultValue, { updateOn: blurable ? 'blur' : 'change' });
1002
+ }
1003
+ static create(defaultValue, blurable = false) {
1004
+ return new KeitControl(defaultValue, blurable);
1005
+ }
1006
+ required() {
1007
+ this.addValidators(Validators.required);
1008
+ return this;
1009
+ }
1010
+ min(m) {
1011
+ this.addValidators(Validators.min(m));
1012
+ return this;
1013
+ }
1014
+ max(m) {
1015
+ this.addValidators(Validators.max(m));
1016
+ return this;
1017
+ }
1018
+ minLength(m) {
1019
+ this.addValidators(Validators.minLength(m));
1020
+ return this;
1021
+ }
1022
+ maxLength(m) {
1023
+ this.addValidators(Validators.maxLength(m));
1024
+ return this;
1025
+ }
1026
+ email() {
1027
+ this.addValidators(Validators.email);
1028
+ return this;
1029
+ }
1030
+ pattern(p) {
1031
+ this.addValidators(Validators.pattern(p));
1032
+ return this;
1033
+ }
1034
+ patternOnlyChars() {
1035
+ this.addValidators(Validators.pattern(PATTERN_ONLY_CHARS));
1036
+ return this;
1037
+ }
1038
+ patternCharsWithSpace() {
1039
+ this.addValidators(Validators.pattern(PATTERN_CHARS_WITH_SPACE));
1040
+ return this;
1041
+ }
1042
+ patternOnlyDigits() {
1043
+ this.addValidators(Validators.pattern(PATTERN_ONLY_DIGITS));
1044
+ return this;
1045
+ }
1046
+ patternOnlyDigitsChars() {
1047
+ this.addValidators(Validators.pattern(PATTERN_ONLY_DIGITS_CHARS));
1048
+ return this;
1049
+ }
1050
+ patternOnlyDigitsCharsTire() {
1051
+ this.addValidators(Validators.pattern(PATTERN_ONLY_DIGITS_CHARS_TIRE));
1052
+ return this;
1053
+ }
1054
+ patternRefCategories() {
1055
+ this.addValidators(Validators.pattern(PATTERN_REF_CATEGORIES));
1056
+ return this;
1057
+ }
1058
+ phone() {
1059
+ this.addValidators(Validators.pattern(PATTERN_PHONE));
1060
+ return this;
1061
+ }
1062
+ }
1063
+
1064
+ class SimplePhoneInputWidget {
1065
+ isIos = inject(WA_IS_IOS);
1066
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1067
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1068
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1069
+ size = input('s', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1070
+ ngOnInit() {
1071
+ const control = this.control();
1072
+ if (control instanceof KeitControl) {
1073
+ control.phone();
1074
+ }
1075
+ }
1076
+ get pattern() {
1077
+ return this.isIos ? '+[0-9-]{1,20}' : null;
1078
+ }
1079
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePhoneInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1080
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimplePhoneInputWidget, isStandalone: true, selector: "keit-simple-phone-input-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1081
+ <tui-textfield [tuiTextfieldSize]="size()">
1082
+ <label tuiLabel>Телефон</label>
1083
+
1084
+ <input
1085
+ autocomplete="tel"
1086
+ mask="+7 ### ###-##-##"
1087
+ tuiInputPhone
1088
+ [attr.pattern]="pattern"
1089
+ [formControl]="control()"
1090
+ [readOnly]="readonly()"
1091
+ />
1092
+ </tui-textfield>
1093
+
1094
+ <keit-field-validation [control]="control()" />
1095
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i2$1.TuiInputPhoneDirective, selector: "input[tuiInputPhone]", inputs: ["allowText", "mask"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1096
+ }
1097
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePhoneInputWidget, decorators: [{
1098
+ type: Component,
1099
+ args: [{ selector: 'keit-simple-phone-input-widget', imports: [
1100
+ ReactiveFormsModule,
1101
+ FormsModule,
1102
+ TuiInput,
1103
+ TuiLabel,
1104
+ TuiInputPhone,
1105
+ FieldValidation,
1106
+ ], template: `
1107
+ <tui-textfield [tuiTextfieldSize]="size()">
1108
+ <label tuiLabel>Телефон</label>
1109
+
1110
+ <input
1111
+ autocomplete="tel"
1112
+ mask="+7 ### ###-##-##"
1113
+ tuiInputPhone
1114
+ [attr.pattern]="pattern"
1115
+ [formControl]="control()"
1116
+ [readOnly]="readonly()"
1117
+ />
1118
+ </tui-textfield>
1119
+
1120
+ <keit-field-validation [control]="control()" />
1121
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1122
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
1123
+
1124
+ class SimplePasswordInputWidget {
1125
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1126
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1127
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1128
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePasswordInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimplePasswordInputWidget, isStandalone: true, selector: "keit-simple-password-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1131
+ <tui-textfield [tuiTextfieldSize]="size()">
1132
+ <label tuiLabel>{{ placeholder() }}</label>
1133
+ <input
1134
+ type="password"
1135
+ autocomplete="off"
1136
+ tuiInput
1137
+ [placeholder]="placeholder()"
1138
+ [formControl]="control()"
1139
+ [readOnly]="readonly()"
1140
+ autocomplete="new-password"
1141
+ />
1142
+ <tui-icon tuiPassword />
1143
+ <keit-field-validation [control]="control()" />
1144
+ </tui-textfield>
1145
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i3.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: FieldValidation, selector: "keit-field-validation", inputs: ["control", "field"] }, { kind: "directive", type: TuiPassword, selector: "tui-icon[tuiPassword]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1146
+ }
1147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePasswordInputWidget, decorators: [{
1148
+ type: Component,
1149
+ args: [{ selector: 'keit-simple-password-input', imports: [
1150
+ FormsModule,
1151
+ ReactiveFormsModule,
1152
+ TuiTextfieldComponent,
1153
+ TuiInput,
1154
+ TuiLabel,
1155
+ TuiIcon,
1156
+ FieldValidation,
1157
+ TuiPassword,
1158
+ ], template: `
1159
+ <tui-textfield [tuiTextfieldSize]="size()">
1160
+ <label tuiLabel>{{ placeholder() }}</label>
1161
+ <input
1162
+ type="password"
1163
+ autocomplete="off"
1164
+ tuiInput
1165
+ [placeholder]="placeholder()"
1166
+ [formControl]="control()"
1167
+ [readOnly]="readonly()"
1168
+ autocomplete="new-password"
1169
+ />
1170
+ <tui-icon tuiPassword />
1171
+ <keit-field-validation [control]="control()" />
1172
+ </tui-textfield>
1173
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1174
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }] } });
1175
+
1176
+ class SimpleActionsWidget {
1177
+ primaryIcon = input(...(ngDevMode ? [undefined, { debugName: "primaryIcon" }] : /* istanbul ignore next */ []));
1178
+ secondaryIcon = input(...(ngDevMode ? [undefined, { debugName: "secondaryIcon" }] : /* istanbul ignore next */ []));
1179
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
1180
+ primaryCaption = input('Принять', ...(ngDevMode ? [{ debugName: "primaryCaption" }] : /* istanbul ignore next */ []));
1181
+ secondaryCaption = input('Отмена', ...(ngDevMode ? [{ debugName: "secondaryCaption" }] : /* istanbul ignore next */ []));
1182
+ hasSecondary = input(true, ...(ngDevMode ? [{ debugName: "hasSecondary" }] : /* istanbul ignore next */ []));
1183
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1184
+ acceptEvent = output();
1185
+ cancelEvent = output();
1186
+ onEnterKey() {
1187
+ if (!this.disabled()) {
1188
+ this.acceptEvent.emit();
1189
+ }
1190
+ }
1191
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleActionsWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1192
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleActionsWidget, isStandalone: true, selector: "keit-simple-actions", inputs: { primaryIcon: { classPropertyName: "primaryIcon", publicName: "primaryIcon", isSignal: true, isRequired: false, transformFunction: null }, secondaryIcon: { classPropertyName: "secondaryIcon", publicName: "secondaryIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, primaryCaption: { classPropertyName: "primaryCaption", publicName: "primaryCaption", isSignal: true, isRequired: false, transformFunction: null }, secondaryCaption: { classPropertyName: "secondaryCaption", publicName: "secondaryCaption", isSignal: true, isRequired: false, transformFunction: null }, hasSecondary: { classPropertyName: "hasSecondary", publicName: "hasSecondary", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { acceptEvent: "acceptEvent", cancelEvent: "cancelEvent" }, host: { listeners: { "window:keydown.enter": "onEnterKey()", "window:keydown.esc": "cancelEvent.emit()" } }, ngImport: i0, template: `
1193
+ <div class="actions">
1194
+ <button
1195
+ tuiButton
1196
+ appearance="primary"
1197
+ [disabled]="disabled()"
1198
+ [size]="size()"
1199
+ (click)="acceptEvent.emit()"
1200
+ >
1201
+ @if (primaryIcon()) {
1202
+ <tui-icon [icon]="primaryIcon() ?? ''" />
1203
+ }
1204
+
1205
+ {{ primaryCaption() }}
1206
+ </button>
1207
+
1208
+ @if (hasSecondary()) {
1209
+ <button
1210
+ tuiButton
1211
+ type="button"
1212
+ appearance="flat"
1213
+ [size]="size()"
1214
+ class="tui-form__button"
1215
+ (click)="cancelEvent.emit()"
1216
+ >
1217
+ @if (secondaryIcon()) {
1218
+ <tui-icon [icon]="secondaryIcon() ?? ''" />
1219
+ }
1220
+
1221
+ {{ secondaryCaption() }}
1222
+ </button>
1223
+ }
1224
+ </div>
1225
+ `, isInline: true, styles: [":host{display:flex;margin:12px 0;justify-content:end}.actions{display:flex;flex-direction:row-reverse;gap:4px;justify-content:end}\n"], dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1226
+ }
1227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleActionsWidget, decorators: [{
1228
+ type: Component,
1229
+ args: [{ selector: 'keit-simple-actions', imports: [TuiIcon, TuiButton], template: `
1230
+ <div class="actions">
1231
+ <button
1232
+ tuiButton
1233
+ appearance="primary"
1234
+ [disabled]="disabled()"
1235
+ [size]="size()"
1236
+ (click)="acceptEvent.emit()"
1237
+ >
1238
+ @if (primaryIcon()) {
1239
+ <tui-icon [icon]="primaryIcon() ?? ''" />
1240
+ }
1241
+
1242
+ {{ primaryCaption() }}
1243
+ </button>
1244
+
1245
+ @if (hasSecondary()) {
1246
+ <button
1247
+ tuiButton
1248
+ type="button"
1249
+ appearance="flat"
1250
+ [size]="size()"
1251
+ class="tui-form__button"
1252
+ (click)="cancelEvent.emit()"
1253
+ >
1254
+ @if (secondaryIcon()) {
1255
+ <tui-icon [icon]="secondaryIcon() ?? ''" />
1256
+ }
1257
+
1258
+ {{ secondaryCaption() }}
1259
+ </button>
1260
+ }
1261
+ </div>
1262
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
1263
+ '(window:keydown.enter)': 'onEnterKey()',
1264
+ '(window:keydown.esc)': 'cancelEvent.emit()',
1265
+ }, styles: [":host{display:flex;margin:12px 0;justify-content:end}.actions{display:flex;flex-direction:row-reverse;gap:4px;justify-content:end}\n"] }]
1266
+ }], propDecorators: { primaryIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryIcon", required: false }] }], secondaryIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryIcon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], primaryCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryCaption", required: false }] }], secondaryCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryCaption", required: false }] }], hasSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasSecondary", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], acceptEvent: [{ type: i0.Output, args: ["acceptEvent"] }], cancelEvent: [{ type: i0.Output, args: ["cancelEvent"] }] } });
1267
+
1268
+ class SimpleFlexLayout {
1269
+ gap = input(...(ngDevMode ? [undefined, { debugName: "gap" }] : /* istanbul ignore next */ []));
1270
+ direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : /* istanbul ignore next */ []));
1271
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleFlexLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
1272
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimpleFlexLayout, isStandalone: true, selector: "keit-simple-flex", inputs: { gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1273
+ <div
1274
+ class="base"
1275
+ [style.gap.px]="gap()"
1276
+ [style.flexDirection]="
1277
+ direction() === 'vertical' ? 'column' : 'row'
1278
+ "
1279
+ >
1280
+ <ng-content></ng-content>
1281
+ </div>
1282
+ `, isInline: true, styles: [":host{display:block}.base{display:flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1283
+ }
1284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleFlexLayout, decorators: [{
1285
+ type: Component,
1286
+ args: [{ selector: 'keit-simple-flex', imports: [], template: `
1287
+ <div
1288
+ class="base"
1289
+ [style.gap.px]="gap()"
1290
+ [style.flexDirection]="
1291
+ direction() === 'vertical' ? 'column' : 'row'
1292
+ "
1293
+ >
1294
+ <ng-content></ng-content>
1295
+ </div>
1296
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.base{display:flex}\n"] }]
1297
+ }], propDecorators: { gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }] } });
1298
+
1299
+ class SimpleGridLayout {
1300
+ columns = input(...(ngDevMode ? [undefined, { debugName: "columns" }] : /* istanbul ignore next */ []));
1301
+ gap = input(...(ngDevMode ? [undefined, { debugName: "gap" }] : /* istanbul ignore next */ []));
1302
+ getGridTemplate(count) {
1303
+ if (count === undefined) {
1304
+ return '';
1305
+ }
1306
+ return `repeat(${count}, 1fr)`;
1307
+ }
1308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleGridLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
1309
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimpleGridLayout, isStandalone: true, selector: "keit-simple-grid", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1310
+ <div
1311
+ class="base"
1312
+ [style.gridTemplateColumns]="getGridTemplate(columns())"
1313
+ [style.gap.px]="gap()"
1314
+ >
1315
+ <ng-content></ng-content>
1316
+ </div>
1317
+ `, isInline: true, styles: [":host{display:block}.base{display:grid;gap:20px;grid-auto-rows:auto}@media(max-width:480px){.base{grid-template-columns:1fr!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1318
+ }
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleGridLayout, decorators: [{
1320
+ type: Component,
1321
+ args: [{ selector: 'keit-simple-grid', imports: [], template: `
1322
+ <div
1323
+ class="base"
1324
+ [style.gridTemplateColumns]="getGridTemplate(columns())"
1325
+ [style.gap.px]="gap()"
1326
+ >
1327
+ <ng-content></ng-content>
1328
+ </div>
1329
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.base{display:grid;gap:20px;grid-auto-rows:auto}@media(max-width:480px){.base{grid-template-columns:1fr!important}}\n"] }]
1330
+ }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
1331
+
1332
+ let NameDescriptionComponent$1 = class NameDescriptionComponent {
1333
+ context = injectContext();
1334
+ name = KeitControl$1.create('')
1335
+ .required()
1336
+ .minLength(3)
1337
+ .maxLength(255);
1338
+ description = KeitControl$1.create('')
1339
+ .required()
1340
+ .minLength(3)
1341
+ .maxLength(1024);
1342
+ cancel() {
1343
+ this.name.reset();
1344
+ this.description.reset();
1345
+ }
1346
+ accept() {
1347
+ this.context.completeWith({
1348
+ name: this.name.value,
1349
+ description: this.description.value,
1350
+ });
1351
+ this.name.reset();
1352
+ this.description.reset();
1353
+ }
1354
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1355
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: NameDescriptionComponent, isStandalone: true, selector: "keit-name-description-component", providers: [validatorsProvider$1], ngImport: i0, template: `
1356
+ <keit-simple-flex [gap]="8" direction="vertical">
1357
+ <keit-simple-input-widget
1358
+ [control]="name"
1359
+ placeholder="Название"
1360
+ sample="Компот"
1361
+ />
1362
+
1363
+ <keit-simple-textarea
1364
+ placeholder="Описание"
1365
+ [limit]="1024"
1366
+ [control]="description"
1367
+ [size]="'m'"
1368
+ sample="Введите тут описание"
1369
+ />
1370
+
1371
+ <keit-simple-actions
1372
+ [size]="'s'"
1373
+ (cancelEvent)="cancel(); context.completeWith(null)"
1374
+ (acceptEvent)="accept()"
1375
+ [disabled]="name.invalid || description.invalid"
1376
+ />
1377
+ </keit-simple-flex>
1378
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleInputWidget$1, selector: "keit-simple-input-widget", inputs: ["placeholder", "sample", "control", "size", "readonly", "hint", "iconRight", "cleaner", "hasEnter", "focused"], outputs: ["enter"] }, { kind: "component", type: SimpleTextareaWidget$1, selector: "keit-simple-textarea", inputs: ["placeholder", "sample", "control", "limit", "size", "cleaner"] }, { kind: "component", type: SimpleActionsWidget$1, selector: "keit-simple-actions", inputs: ["primaryIcon", "secondaryIcon", "disabled", "primaryCaption", "secondaryCaption", "hasSecondary", "size"], outputs: ["acceptEvent", "cancelEvent"] }, { kind: "component", type: SimpleFlexLayout$1, selector: "keit-simple-flex", inputs: ["gap", "direction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1379
+ };
1380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent$1, decorators: [{
1381
+ type: Component,
1382
+ args: [{ selector: 'keit-name-description-component', imports: [
1383
+ FormsModule,
1384
+ ReactiveFormsModule,
1385
+ TuiInput,
1386
+ SimpleInputWidget$1,
1387
+ SimpleTextareaWidget$1,
1388
+ SimpleActionsWidget$1,
1389
+ SimpleFlexLayout$1,
1390
+ ], template: `
1391
+ <keit-simple-flex [gap]="8" direction="vertical">
1392
+ <keit-simple-input-widget
1393
+ [control]="name"
1394
+ placeholder="Название"
1395
+ sample="Компот"
1396
+ />
1397
+
1398
+ <keit-simple-textarea
1399
+ placeholder="Описание"
1400
+ [limit]="1024"
1401
+ [control]="description"
1402
+ [size]="'m'"
1403
+ sample="Введите тут описание"
1404
+ />
1405
+
1406
+ <keit-simple-actions
1407
+ [size]="'s'"
1408
+ (cancelEvent)="cancel(); context.completeWith(null)"
1409
+ (acceptEvent)="accept()"
1410
+ [disabled]="name.invalid || description.invalid"
1411
+ />
1412
+ </keit-simple-flex>
1413
+ `, providers: [validatorsProvider$1], changeDetection: ChangeDetectionStrategy.OnPush }]
1414
+ }] });
1415
+
1416
+ class NameDescriptionDialog {
1417
+ dialogs = inject(TuiDialogService);
1418
+ injector = inject(Injector);
1419
+ operation = input('create', ...(ngDevMode ? [{ debugName: "operation" }] : /* istanbul ignore next */ []));
1420
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
1421
+ caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : /* istanbul ignore next */ []));
1422
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1423
+ appearance = input('primary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1424
+ result = output();
1425
+ openDialog() {
1426
+ this.dialogs
1427
+ .open(new PolymorpheusComponent(NameDescriptionComponent$1, this.injector), {
1428
+ label: `${this.operation() === 'create' ? 'Добавить' : 'Редактировать'}`,
1429
+ size: 's',
1430
+ dismissible: false,
1431
+ })
1432
+ .subscribe((data) => {
1433
+ this.result.emit(data != null
1434
+ ? {
1435
+ name: data.name,
1436
+ description: data.description,
1437
+ }
1438
+ : null);
1439
+ });
1440
+ }
1441
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
1442
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: NameDescriptionDialog, isStandalone: true, selector: "keit-name-description-input-dialog", inputs: { operation: { classPropertyName: "operation", publicName: "operation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { result: "result" }, ngImport: i0, template: `
1443
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1444
+ <keit-simple-button
1445
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1446
+ [size]="size()"
1447
+ [caption]="caption()"
1448
+ [appearance]="appearance()"
1449
+ [disabled]="disabled()"
1450
+ (action)="openDialog()"
1451
+ />
1452
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleButtonWidget$1, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1453
+ }
1454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionDialog, decorators: [{
1455
+ type: Component,
1456
+ args: [{ selector: 'keit-name-description-input-dialog', imports: [FormsModule, ReactiveFormsModule, TuiInput, SimpleButtonWidget$1], template: `
1457
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1458
+ <keit-simple-button
1459
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1460
+ [size]="size()"
1461
+ [caption]="caption()"
1462
+ [appearance]="appearance()"
1463
+ [disabled]="disabled()"
1464
+ (action)="openDialog()"
1465
+ />
1466
+ `, changeDetection: ChangeDetectionStrategy.OnPush }]
1467
+ }], propDecorators: { operation: [{ type: i0.Input, args: [{ isSignal: true, alias: "operation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], result: [{ type: i0.Output, args: ["result"] }] } });
1468
+
1469
+ class NameDescriptionComponent {
1470
+ context = injectContext();
1471
+ name = KeitControl$1.create('')
1472
+ .required()
1473
+ .maxLength(30)
1474
+ .minLength(2);
1475
+ description = KeitControl$1.create('')
1476
+ .required()
1477
+ .maxLength(300)
1478
+ .minLength(2);
1479
+ cancel() {
1480
+ this.name.reset();
1481
+ this.description.reset();
1482
+ }
1483
+ accept() {
1484
+ this.context.completeWith({
1485
+ name: this.name.value,
1486
+ description: this.description.value,
1487
+ });
1488
+ this.name.reset();
1489
+ this.description.reset();
1490
+ }
1491
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1492
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: NameDescriptionComponent, isStandalone: true, selector: "keit-name-component", providers: [
1493
+ tuiValidationErrorsProvider({
1494
+ required: 'Требуется ввести',
1495
+ maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
1496
+ minlength: ({ requiredLength }) => of(`Минимальная длина — ${requiredLength}`),
1497
+ }),
1498
+ ], ngImport: i0, template: `
1499
+ <keit-simple-flex [gap]="8" direction="vertical">
1500
+ <keit-simple-input-widget [control]="name" placeholder="Название" />
1501
+
1502
+ <keit-simple-textarea
1503
+ placeholder="Описание"
1504
+ [limit]="1200"
1505
+ [control]="description"
1506
+ [size]="'m'"
1507
+ />
1508
+
1509
+ <keit-simple-actions
1510
+ [size]="'s'"
1511
+ (cancelEvent)="cancel(); context.completeWith(null)"
1512
+ (acceptEvent)="accept()"
1513
+ [disabled]="name.invalid || description.invalid"
1514
+ />
1515
+ </keit-simple-flex>
1516
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleInputWidget$1, selector: "keit-simple-input-widget", inputs: ["placeholder", "sample", "control", "size", "readonly", "hint", "iconRight", "cleaner", "hasEnter", "focused"], outputs: ["enter"] }, { kind: "component", type: SimpleTextareaWidget$1, selector: "keit-simple-textarea", inputs: ["placeholder", "sample", "control", "limit", "size", "cleaner"] }, { kind: "component", type: SimpleActionsWidget$1, selector: "keit-simple-actions", inputs: ["primaryIcon", "secondaryIcon", "disabled", "primaryCaption", "secondaryCaption", "hasSecondary", "size"], outputs: ["acceptEvent", "cancelEvent"] }, { kind: "component", type: SimpleFlexLayout$1, selector: "keit-simple-flex", inputs: ["gap", "direction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1517
+ }
1518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent, decorators: [{
1519
+ type: Component,
1520
+ args: [{ selector: 'keit-name-component', imports: [
1521
+ FormsModule,
1522
+ ReactiveFormsModule,
1523
+ TuiInput,
1524
+ SimpleInputWidget$1,
1525
+ SimpleTextareaWidget$1,
1526
+ SimpleActionsWidget$1,
1527
+ SimpleFlexLayout$1,
1528
+ ], template: `
1529
+ <keit-simple-flex [gap]="8" direction="vertical">
1530
+ <keit-simple-input-widget [control]="name" placeholder="Название" />
1531
+
1532
+ <keit-simple-textarea
1533
+ placeholder="Описание"
1534
+ [limit]="1200"
1535
+ [control]="description"
1536
+ [size]="'m'"
1537
+ />
1538
+
1539
+ <keit-simple-actions
1540
+ [size]="'s'"
1541
+ (cancelEvent)="cancel(); context.completeWith(null)"
1542
+ (acceptEvent)="accept()"
1543
+ [disabled]="name.invalid || description.invalid"
1544
+ />
1545
+ </keit-simple-flex>
1546
+ `, providers: [
1547
+ tuiValidationErrorsProvider({
1548
+ required: 'Требуется ввести',
1549
+ maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
1550
+ minlength: ({ requiredLength }) => of(`Минимальная длина — ${requiredLength}`),
1551
+ }),
1552
+ ], changeDetection: ChangeDetectionStrategy.OnPush }]
1553
+ }] });
1554
+
1555
+ class NameDialog {
1556
+ dialogs = inject(TuiDialogService);
1557
+ injector = inject(Injector);
1558
+ operation = input('create', ...(ngDevMode ? [{ debugName: "operation" }] : /* istanbul ignore next */ []));
1559
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
1560
+ caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : /* istanbul ignore next */ []));
1561
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1562
+ appearance = input('primary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1563
+ result = output();
1564
+ openDialog() {
1565
+ this.dialogs
1566
+ .open(new PolymorpheusComponent(NameDescriptionComponent, this.injector), {
1567
+ label: `${this.operation() === 'create' ? 'Добавить' : 'Редактировать'}`,
1568
+ size: 's',
1569
+ dismissible: false,
1570
+ })
1571
+ .subscribe((data) => {
1572
+ this.result.emit(data != null
1573
+ ? {
1574
+ name: data.name,
1575
+ description: data.description,
1576
+ }
1577
+ : null);
1578
+ });
1579
+ }
1580
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
1581
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: NameDialog, isStandalone: true, selector: "keit-name-input-dialog", inputs: { operation: { classPropertyName: "operation", publicName: "operation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { result: "result" }, ngImport: i0, template: `
1582
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1583
+ <keit-simple-button
1584
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1585
+ [size]="size()"
1586
+ [caption]="caption()"
1587
+ [appearance]="appearance()"
1588
+ [disabled]="disabled()"
1589
+ (action)="openDialog()"
1590
+ />
1591
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleButtonWidget$1, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1592
+ }
1593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDialog, decorators: [{
1594
+ type: Component,
1595
+ args: [{ selector: 'keit-name-input-dialog', imports: [FormsModule, ReactiveFormsModule, TuiInput, SimpleButtonWidget$1], template: `
1596
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1597
+ <keit-simple-button
1598
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1599
+ [size]="size()"
1600
+ [caption]="caption()"
1601
+ [appearance]="appearance()"
1602
+ [disabled]="disabled()"
1603
+ (action)="openDialog()"
1604
+ />
1605
+ `, changeDetection: ChangeDetectionStrategy.OnPush }]
1606
+ }], propDecorators: { operation: [{ type: i0.Input, args: [{ isSignal: true, alias: "operation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], result: [{ type: i0.Output, args: ["result"] }] } });
1607
+
1608
+ class SimpleDateInputWidget {
1609
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1610
+ sample = input('Введите...', ...(ngDevMode ? [{ debugName: "sample" }] : /* istanbul ignore next */ []));
1611
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1612
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1613
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1614
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
1615
+ iconRight = input('', ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
1616
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
1617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1618
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleDateInputWidget, isStandalone: true, selector: "keit-simple-date-input-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, sample: { classPropertyName: "sample", publicName: "sample", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1619
+ <tui-textfield
1620
+ [tuiTextfieldSize]="size()"
1621
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1622
+ >
1623
+ <label tuiLabel>{{ placeholder() }}</label>
1624
+ <input
1625
+ tuiInputDateTime
1626
+ [placeholder]="sample()"
1627
+ [formControl]="control()"
1628
+ [readOnly]="readonly()"
1629
+ />
1630
+ <tui-calendar *tuiDropdown />
1631
+
1632
+ @if (iconRight()) {
1633
+ <tui-icon [icon]="iconRight()" />
1634
+ }
1635
+
1636
+ @if (hint()) {
1637
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1638
+ }
1639
+ </tui-textfield>
1640
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i2$1.TuiInputDateTimeDirective, selector: "input[tuiInputDateTime]", inputs: ["timeMode", "min", "max"] }, { kind: "component", type: i6.TuiCalendar, selector: "tui-calendar", inputs: ["disabledItemHandler", "min", "max", "minViewedMonth", "maxViewedMonth", "showAdjacent", "markerHandler", "initialView", "month", "hoveredItem", "value"], outputs: ["monthChange", "hoveredItemChange", "valueChange", "dayClick"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1641
+ }
1642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateInputWidget, decorators: [{
1643
+ type: Component,
1644
+ args: [{ selector: 'keit-simple-date-input-widget', imports: [
1645
+ ReactiveFormsModule,
1646
+ FormsModule,
1647
+ TuiInput,
1648
+ TuiInputDateTime,
1649
+ TuiLabel,
1650
+ TuiIcon,
1651
+ TuiTooltip,
1652
+ TuiCalendar,
1653
+ TuiHint,
1654
+ ], template: `
1655
+ <tui-textfield
1656
+ [tuiTextfieldSize]="size()"
1657
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1658
+ >
1659
+ <label tuiLabel>{{ placeholder() }}</label>
1660
+ <input
1661
+ tuiInputDateTime
1662
+ [placeholder]="sample()"
1663
+ [formControl]="control()"
1664
+ [readOnly]="readonly()"
1665
+ />
1666
+ <tui-calendar *tuiDropdown />
1667
+
1668
+ @if (iconRight()) {
1669
+ <tui-icon [icon]="iconRight()" />
1670
+ }
1671
+
1672
+ @if (hint()) {
1673
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1674
+ }
1675
+ </tui-textfield>
1676
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1677
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], sample: [{ type: i0.Input, args: [{ isSignal: true, alias: "sample", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }] } });
1678
+
1679
+ class ReloadOverlayWidget {
1680
+ reload = output();
1681
+ overlayed = input(...(ngDevMode ? [undefined, { debugName: "overlayed" }] : /* istanbul ignore next */ []));
1682
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ReloadOverlayWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1683
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ReloadOverlayWidget, isStandalone: true, selector: "keit-reload-overlay", inputs: { overlayed: { classPropertyName: "overlayed", publicName: "overlayed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: `
1684
+ <div [class.overlay]="overlayed()">
1685
+ @if (overlayed()) {
1686
+ <keit-simple-button
1687
+ icon="@tui.refresh-ccw"
1688
+ appearance="accent"
1689
+ size="l"
1690
+ caption=""
1691
+ (action)="reload.emit()"
1692
+ />
1693
+ } @else {
1694
+ <ng-content />
1695
+ }
1696
+ </div>
1697
+ `, isInline: true, styles: [".overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;background-color:#0009;z-index:1000;pointer-events:auto}::ng-deep keit-simple-button{z-index:1001}\n"], dependencies: [{ kind: "component", type: SimpleButtonWidget$1, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1698
+ }
1699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ReloadOverlayWidget, decorators: [{
1700
+ type: Component,
1701
+ args: [{ selector: 'keit-reload-overlay', imports: [SimpleButtonWidget$1], template: `
1702
+ <div [class.overlay]="overlayed()">
1703
+ @if (overlayed()) {
1704
+ <keit-simple-button
1705
+ icon="@tui.refresh-ccw"
1706
+ appearance="accent"
1707
+ size="l"
1708
+ caption=""
1709
+ (action)="reload.emit()"
1710
+ />
1711
+ } @else {
1712
+ <ng-content />
1713
+ }
1714
+ </div>
1715
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;background-color:#0009;z-index:1000;pointer-events:auto}::ng-deep keit-simple-button{z-index:1001}\n"] }]
1716
+ }], propDecorators: { reload: [{ type: i0.Output, args: ["reload"] }], overlayed: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayed", required: false }] }] } });
1717
+
1718
+ class SimpleDateRangeInputWidget {
1719
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1720
+ sample = input('Введите...', ...(ngDevMode ? [{ debugName: "sample" }] : /* istanbul ignore next */ []));
1721
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1722
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1723
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1724
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
1725
+ iconRight = input('', ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
1726
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
1727
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateRangeInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1728
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SimpleDateRangeInputWidget, isStandalone: true, selector: "keit-simple-date-range-input-widget", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, sample: { classPropertyName: "sample", publicName: "sample", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1729
+ <tui-textfield
1730
+ [tuiTextfieldSize]="size()"
1731
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1732
+ >
1733
+ <label tuiLabel>{{ placeholder() }}</label>
1734
+ <input
1735
+ tuiInputDateRange
1736
+ [placeholder]="sample()"
1737
+ [formControl]="control()"
1738
+ [readOnly]="readonly()"
1739
+ />
1740
+ <tui-calendar-range *tuiDropdown />
1741
+
1742
+ @if (iconRight()) {
1743
+ <tui-icon [icon]="iconRight()" />
1744
+ }
1745
+
1746
+ @if (hint()) {
1747
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1748
+ }
1749
+ </tui-textfield>
1750
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3$1.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3$1.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i2$1.TuiInputDateRangeDirective, selector: "input[tuiInputDateRange]", inputs: ["max", "min", "minLength", "maxLength"] }, { kind: "component", type: i6$1.TuiCalendarRange, selector: "tui-calendar-range", inputs: ["min", "max", "minLength", "maxLength", "items", "listSize", "defaultViewedMonth", "markerHandler", "disabledItemHandler", "value", "item"], outputs: ["valueChange", "itemChange"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1751
+ }
1752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateRangeInputWidget, decorators: [{
1753
+ type: Component,
1754
+ args: [{ selector: 'keit-simple-date-range-input-widget', imports: [
1755
+ ReactiveFormsModule,
1756
+ FormsModule,
1757
+ TuiInput,
1758
+ TuiInputDateRange,
1759
+ TuiLabel,
1760
+ TuiIcon,
1761
+ TuiTooltip,
1762
+ TuiCalendarRange,
1763
+ TuiHint,
1764
+ ], template: `
1765
+ <tui-textfield
1766
+ [tuiTextfieldSize]="size()"
1767
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1768
+ >
1769
+ <label tuiLabel>{{ placeholder() }}</label>
1770
+ <input
1771
+ tuiInputDateRange
1772
+ [placeholder]="sample()"
1773
+ [formControl]="control()"
1774
+ [readOnly]="readonly()"
1775
+ />
1776
+ <tui-calendar-range *tuiDropdown />
1777
+
1778
+ @if (iconRight()) {
1779
+ <tui-icon [icon]="iconRight()" />
1780
+ }
1781
+
1782
+ @if (hint()) {
1783
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1784
+ }
1785
+ </tui-textfield>
1786
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1787
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], sample: [{ type: i0.Input, args: [{ isSignal: true, alias: "sample", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], cleaner: [{ type: i0.Input, args: [{ isSignal: true, alias: "cleaner", required: false }] }] } });
1788
+
1789
+ class SimplePaginationWidget {
1790
+ page = input.required(...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
1791
+ size = input.required(...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1792
+ total = input.required(...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
1793
+ paginationChange = output();
1794
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePaginationWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1795
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimplePaginationWidget, isStandalone: true, selector: "keit-simple-pagination", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { paginationChange: "paginationChange" }, providers: [tuiTablePaginationOptionsProvider({ showPages: false })], ngImport: i0, template: `
1796
+ <tui-table-pagination
1797
+ [page]="page()"
1798
+ [size]="size()"
1799
+ [total]="total()"
1800
+ (paginationChange)="paginationChange.emit($event)"
1801
+ />
1802
+ `, isInline: true, styles: [":host{display:block;padding:16px}\n"], dependencies: [{ kind: "component", type: TuiTablePagination, selector: "tui-table-pagination", inputs: ["items", "total", "page", "size"], outputs: ["pageChange", "sizeChange", "paginationChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1803
+ }
1804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePaginationWidget, decorators: [{
1805
+ type: Component,
1806
+ args: [{ selector: 'keit-simple-pagination', imports: [TuiTablePagination], template: `
1807
+ <tui-table-pagination
1808
+ [page]="page()"
1809
+ [size]="size()"
1810
+ [total]="total()"
1811
+ (paginationChange)="paginationChange.emit($event)"
1812
+ />
1813
+ `, providers: [tuiTablePaginationOptionsProvider({ showPages: false })], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;padding:16px}\n"] }]
1814
+ }], propDecorators: { page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], paginationChange: [{ type: i0.Output, args: ["paginationChange"] }] } });
1815
+
1816
+ class NotificationWidget {
1817
+ platformId = inject(PLATFORM_ID);
1818
+ size = input('l', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1819
+ appearance = input('info', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1820
+ closable = input(true, ...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
1821
+ closeLabel = input('Close', ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
1822
+ closeEvent = output();
1823
+ hideable = input(false, ...(ngDevMode ? [{ debugName: "hideable" }] : /* istanbul ignore next */ []));
1824
+ hideButtonLabel = input('Больше не показывать', ...(ngDevMode ? [{ debugName: "hideButtonLabel" }] : /* istanbul ignore next */ []));
1825
+ hideButtonAppearance = input('flat', ...(ngDevMode ? [{ debugName: "hideButtonAppearance" }] : /* istanbul ignore next */ []));
1826
+ hideButtonSize = input('s', ...(ngDevMode ? [{ debugName: "hideButtonSize" }] : /* istanbul ignore next */ []));
1827
+ storageKey = input(...(ngDevMode ? [undefined, { debugName: "storageKey" }] : /* istanbul ignore next */ []));
1828
+ shouldShow = signal(true, ...(ngDevMode ? [{ debugName: "shouldShow" }] : /* istanbul ignore next */ []));
1829
+ constructor() {
1830
+ effect(() => {
1831
+ const key = this.storageKey();
1832
+ if (key && isPlatformBrowser(this.platformId)) {
1833
+ const hidden = localStorage.getItem(`notification-hide-${key}`);
1834
+ this.shouldShow.set(!hidden);
1835
+ }
1836
+ });
1837
+ }
1838
+ hideForever() {
1839
+ const key = this.storageKey();
1840
+ if (key && isPlatformBrowser(this.platformId)) {
1841
+ localStorage.setItem(`notification-hide-${key}`, 'true');
1842
+ this.shouldShow.set(false);
1843
+ }
1844
+ }
1845
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NotificationWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1846
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NotificationWidget, isStandalone: true, selector: "keit-notification-widget", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, hideable: { classPropertyName: "hideable", publicName: "hideable", isSignal: true, isRequired: false, transformFunction: null }, hideButtonLabel: { classPropertyName: "hideButtonLabel", publicName: "hideButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, hideButtonAppearance: { classPropertyName: "hideButtonAppearance", publicName: "hideButtonAppearance", isSignal: true, isRequired: false, transformFunction: null }, hideButtonSize: { classPropertyName: "hideButtonSize", publicName: "hideButtonSize", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: `
1847
+ @if (shouldShow()) {
1848
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1849
+ <div tuiNotification [size]="size()" [appearance]="appearance()">
1850
+ <p class="text"><ng-content></ng-content></p>
1851
+ @if (hideable()) {
1852
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1853
+ <keit-simple-button
1854
+ [appearance]="hideButtonAppearance()"
1855
+ [size]="hideButtonSize()"
1856
+ [caption]="hideButtonLabel()"
1857
+ (action)="hideForever()"
1858
+ />
1859
+ }
1860
+ @if (closable()) {
1861
+ <button
1862
+ iconStart="@tui.x"
1863
+ tuiIconButton
1864
+ type="button"
1865
+ (click)="shouldShow.set(false)"
1866
+ >
1867
+ {{ closeLabel() }}
1868
+ </button>
1869
+ }
1870
+ </div>
1871
+ }
1872
+ `, isInline: true, styles: [":host{display:block;margin-bottom:8px}.text{font-size:12px;padding:8px 8px 0}\n"], dependencies: [{ kind: "directive", type: i3.TuiNotificationDirective, selector: "[tuiNotification]:not(ng-template)", inputs: ["appearance", "size", "icon"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: SimpleButtonWidget, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1873
+ }
1874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NotificationWidget, decorators: [{
1875
+ type: Component,
1876
+ args: [{ selector: 'keit-notification-widget', imports: [TuiNotification, TuiButton, SimpleButtonWidget], template: `
1877
+ @if (shouldShow()) {
1878
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1879
+ <div tuiNotification [size]="size()" [appearance]="appearance()">
1880
+ <p class="text"><ng-content></ng-content></p>
1881
+ @if (hideable()) {
1882
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1883
+ <keit-simple-button
1884
+ [appearance]="hideButtonAppearance()"
1885
+ [size]="hideButtonSize()"
1886
+ [caption]="hideButtonLabel()"
1887
+ (action)="hideForever()"
1888
+ />
1889
+ }
1890
+ @if (closable()) {
1891
+ <button
1892
+ iconStart="@tui.x"
1893
+ tuiIconButton
1894
+ type="button"
1895
+ (click)="shouldShow.set(false)"
1896
+ >
1897
+ {{ closeLabel() }}
1898
+ </button>
1899
+ }
1900
+ </div>
1901
+ }
1902
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;margin-bottom:8px}.text{font-size:12px;padding:8px 8px 0}\n"] }]
1903
+ }], ctorParameters: () => [], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], closeEvent: [{ type: i0.Output, args: ["closeEvent"] }], hideable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideable", required: false }] }], hideButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideButtonLabel", required: false }] }], hideButtonAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideButtonAppearance", required: false }] }], hideButtonSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideButtonSize", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }] } });
1904
+
1905
+ class SimpleCalendarWidget {
1906
+ markerConditionFn = input(null, ...(ngDevMode ? [{ debugName: "markerConditionFn" }] : /* istanbul ignore next */ []));
1907
+ initialMonth = input(null, ...(ngDevMode ? [{ debugName: "initialMonth" }] : /* istanbul ignore next */ []));
1908
+ initialDay = input(null, ...(ngDevMode ? [{ debugName: "initialDay" }] : /* istanbul ignore next */ []));
1909
+ selectDay = output();
1910
+ selectMonth = output();
1911
+ value = null;
1912
+ selectedMonth = TuiMonth.currentLocal();
1913
+ hoveredItem = null;
1914
+ ngOnInit() {
1915
+ const initialMonth = this.initialMonth();
1916
+ if (initialMonth) {
1917
+ this.selectedMonth = initialMonth;
1918
+ this.value = new TuiDay(this.selectedMonth.year, this.selectedMonth.month, 1);
1919
+ }
1920
+ const initialDay = this.initialDay();
1921
+ if (initialDay) {
1922
+ this.value = initialDay;
1923
+ }
1924
+ }
1925
+ onDayClick(day) {
1926
+ this.value = day;
1927
+ this.selectDay.emit(day);
1928
+ }
1929
+ onMonthChange(month) {
1930
+ this.selectedMonth = month;
1931
+ this.selectMonth.emit(month);
1932
+ this.value = new TuiDay(month.year, month.month, 1);
1933
+ this.selectDay.emit(this.value);
1934
+ }
1935
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCalendarWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1936
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SimpleCalendarWidget, isStandalone: true, selector: "keit-simple-calendar-widget", inputs: { markerConditionFn: { classPropertyName: "markerConditionFn", publicName: "markerConditionFn", isSignal: true, isRequired: false, transformFunction: null }, initialMonth: { classPropertyName: "initialMonth", publicName: "initialMonth", isSignal: true, isRequired: false, transformFunction: null }, initialDay: { classPropertyName: "initialDay", publicName: "initialDay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectDay: "selectDay", selectMonth: "selectMonth" }, ngImport: i0, template: `
1937
+ <tui-calendar
1938
+ [markerHandler]="this.markerConditionFn()"
1939
+ [month]="selectedMonth"
1940
+ [showAdjacent]="false"
1941
+ [value]="value"
1942
+ [(hoveredItem)]="hoveredItem"
1943
+ (dayClick)="onDayClick($event)"
1944
+ (monthChange)="onMonthChange($event)"
1945
+ />
1946
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TuiCalendar, selector: "tui-calendar", inputs: ["disabledItemHandler", "min", "max", "minViewedMonth", "maxViewedMonth", "showAdjacent", "markerHandler", "initialView", "month", "hoveredItem", "value"], outputs: ["monthChange", "hoveredItemChange", "valueChange", "dayClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1947
+ }
1948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCalendarWidget, decorators: [{
1949
+ type: Component,
1950
+ args: [{ selector: 'keit-simple-calendar-widget', imports: [ReactiveFormsModule, FormsModule, TuiCalendar], template: `
1951
+ <tui-calendar
1952
+ [markerHandler]="this.markerConditionFn()"
1953
+ [month]="selectedMonth"
1954
+ [showAdjacent]="false"
1955
+ [value]="value"
1956
+ [(hoveredItem)]="hoveredItem"
1957
+ (dayClick)="onDayClick($event)"
1958
+ (monthChange)="onMonthChange($event)"
1959
+ />
1960
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1961
+ }], propDecorators: { markerConditionFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "markerConditionFn", required: false }] }], initialMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialMonth", required: false }] }], initialDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialDay", required: false }] }], selectDay: [{ type: i0.Output, args: ["selectDay"] }], selectMonth: [{ type: i0.Output, args: ["selectMonth"] }] } });
1962
+
1963
+ /*
1964
+ * Public API Surface of widgets
1965
+ */
1966
+
1967
+ /**
1968
+ * Generated bundle index. Do not edit.
1969
+ */
1970
+
1971
+ export { EmailInputWidget, KeitControl, LoginInputWidget, NameDescriptionDialog, NameDialog, NotificationWidget, PATTERN_CHARS_WITH_SPACE, PATTERN_ONLY_CHARS, PATTERN_ONLY_DIGITS, PATTERN_ONLY_DIGITS_CHARS, PATTERN_ONLY_DIGITS_CHARS_TIRE, PATTERN_PHONE, PATTERN_REF_CATEGORIES, PasswordInputWidget, ReloadOverlayWidget, SimpleActionsWidget, SimpleButtonWidget, SimpleCalendarWidget, SimpleComboWidget, SimpleCopyInputWidget, SimpleDateInputWidget, SimpleDateRangeInputWidget, SimpleFlexLayout, SimpleGridLayout, SimpleInputWidget, SimpleNumberInputWidget, SimplePaginationWidget, SimplePasswordInputWidget, SimplePhoneInputWidget, SimpleSelectWidget, SimpleTextareaWidget, validatorsProvider };
1972
+ //# sourceMappingURL=pleione-lab-widgets.mjs.map