@pleione-lab/widgets 1.0.2 → 1.0.5

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.
@@ -1,10 +1,10 @@
1
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';
2
+ import { output, effect, ChangeDetectionStrategy, Component, input, inject, DestroyRef, signal, computed, TemplateRef, ElementRef, ViewChild, PLATFORM_ID, Injector } from '@angular/core';
3
3
  import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
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';
7
+ import { TuiTextfieldComponent, TuiIcon, TuiInput, TuiLabel, TuiButton, TuiError, TuiLoader, TuiFilterByInputPipe, TuiHint, tuiValidationErrorsProvider, TuiCalendar, TuiNotification, TuiDialogService } from '@taiga-ui/core';
8
8
  import * as i2 from '@taiga-ui/core/components/label';
9
9
  import * as i2$1 from '@taiga-ui/kit';
10
10
  import { TuiChevron, TuiTooltip, TuiDataListWrapper, TuiSelect, TuiDataListWrapperComponent, TuiComboBox, TuiInputNumber, TuiTextarea, TuiCopy, TuiInputPhone, TuiPassword, TuiInputDateTime, TuiInputDateRange, TuiCalendarRange } from '@taiga-ui/kit';
@@ -12,13 +12,12 @@ import * as i3$1 from '@taiga-ui/core/components/textfield';
12
12
  import * as i4 from '@taiga-ui/core/portals/dropdown';
13
13
  import { Subject, filter, debounceTime, tap, switchMap, catchError, of } from 'rxjs';
14
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
15
  import * as i6 from '@taiga-ui/core/components/calendar';
18
16
  import * as i6$1 from '@taiga-ui/kit/components/calendar-range';
19
17
  import { TuiTablePagination, tuiTablePaginationOptionsProvider } from '@taiga-ui/addon-table';
20
18
  import { isPlatformBrowser } from '@angular/common';
21
19
  import { TuiMonth, TuiDay } from '@taiga-ui/cdk';
20
+ import { injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
22
21
 
23
22
  class LoginInputWidget {
24
23
  loginCtrl = new FormControl('', [
@@ -208,7 +207,7 @@ class SimpleButtonWidget {
208
207
  size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
209
208
  appearance = input('primary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
210
209
  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: `
210
+ 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" }, ngImport: i0, template: `
212
211
  <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
213
212
  <button
214
213
  tuiButton
@@ -250,9 +249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
250
249
  <tui-icon [icon]="iconRight() ?? ''" />
251
250
  }
252
251
  </button>
253
- `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
254
- '(window:keydown.enter)': 'action.emit()',
255
- } }]
252
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {} }]
256
253
  }], 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
254
 
258
255
  class EmailInputWidget {
@@ -1329,153 +1326,332 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1329
1326
  `, 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
1327
  }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
1331
1328
 
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="Компот"
1329
+ class SimpleDateInputWidget {
1330
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1331
+ sample = input('Введите...', ...(ngDevMode ? [{ debugName: "sample" }] : /* istanbul ignore next */ []));
1332
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1333
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1334
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1335
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
1336
+ iconRight = input('', ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
1337
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
1338
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1339
+ 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: `
1340
+ <tui-textfield
1341
+ [tuiTextfieldSize]="size()"
1342
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1343
+ >
1344
+ <label tuiLabel>{{ placeholder() }}</label>
1345
+ <input
1346
+ tuiInputDateTime
1347
+ [placeholder]="sample()"
1348
+ [formControl]="control()"
1349
+ [readOnly]="readonly()"
1361
1350
  />
1351
+ <tui-calendar *tuiDropdown />
1362
1352
 
1363
- <keit-simple-textarea
1364
- placeholder="Описание"
1365
- [limit]="1024"
1366
- [control]="description"
1367
- [size]="'m'"
1368
- sample="Введите тут описание"
1369
- />
1353
+ @if (iconRight()) {
1354
+ <tui-icon [icon]="iconRight()" />
1355
+ }
1370
1356
 
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: [{
1357
+ @if (hint()) {
1358
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1359
+ }
1360
+ </tui-textfield>
1361
+ `, 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 });
1362
+ }
1363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateInputWidget, decorators: [{
1381
1364
  type: Component,
1382
- args: [{ selector: 'keit-name-description-component', imports: [
1383
- FormsModule,
1365
+ args: [{ selector: 'keit-simple-date-input-widget', imports: [
1384
1366
  ReactiveFormsModule,
1367
+ FormsModule,
1385
1368
  TuiInput,
1386
- SimpleInputWidget$1,
1387
- SimpleTextareaWidget$1,
1388
- SimpleActionsWidget$1,
1389
- SimpleFlexLayout$1,
1369
+ TuiInputDateTime,
1370
+ TuiLabel,
1371
+ TuiIcon,
1372
+ TuiTooltip,
1373
+ TuiCalendar,
1374
+ TuiHint,
1390
1375
  ], template: `
1391
- <keit-simple-flex [gap]="8" direction="vertical">
1392
- <keit-simple-input-widget
1393
- [control]="name"
1394
- placeholder="Название"
1395
- sample="Компот"
1376
+ <tui-textfield
1377
+ [tuiTextfieldSize]="size()"
1378
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1379
+ >
1380
+ <label tuiLabel>{{ placeholder() }}</label>
1381
+ <input
1382
+ tuiInputDateTime
1383
+ [placeholder]="sample()"
1384
+ [formControl]="control()"
1385
+ [readOnly]="readonly()"
1396
1386
  />
1387
+ <tui-calendar *tuiDropdown />
1397
1388
 
1398
- <keit-simple-textarea
1399
- placeholder="Описание"
1400
- [limit]="1024"
1401
- [control]="description"
1402
- [size]="'m'"
1403
- sample="Введите тут описание"
1389
+ @if (iconRight()) {
1390
+ <tui-icon [icon]="iconRight()" />
1391
+ }
1392
+
1393
+ @if (hint()) {
1394
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1395
+ }
1396
+ </tui-textfield>
1397
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1398
+ }], 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 }] }] } });
1399
+
1400
+ class SimpleDateRangeInputWidget {
1401
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
1402
+ sample = input('Введите...', ...(ngDevMode ? [{ debugName: "sample" }] : /* istanbul ignore next */ []));
1403
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
1404
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1405
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
1406
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
1407
+ iconRight = input('', ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
1408
+ cleaner = input(...(ngDevMode ? [undefined, { debugName: "cleaner" }] : /* istanbul ignore next */ []));
1409
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateRangeInputWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1410
+ 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: `
1411
+ <tui-textfield
1412
+ [tuiTextfieldSize]="size()"
1413
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1414
+ >
1415
+ <label tuiLabel>{{ placeholder() }}</label>
1416
+ <input
1417
+ tuiInputDateRange
1418
+ [placeholder]="sample()"
1419
+ [formControl]="control()"
1420
+ [readOnly]="readonly()"
1404
1421
  />
1422
+ <tui-calendar-range *tuiDropdown />
1405
1423
 
1406
- <keit-simple-actions
1407
- [size]="'s'"
1408
- (cancelEvent)="cancel(); context.completeWith(null)"
1409
- (acceptEvent)="accept()"
1410
- [disabled]="name.invalid || description.invalid"
1424
+ @if (iconRight()) {
1425
+ <tui-icon [icon]="iconRight()" />
1426
+ }
1427
+
1428
+ @if (hint()) {
1429
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1430
+ }
1431
+ </tui-textfield>
1432
+ `, 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 });
1433
+ }
1434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleDateRangeInputWidget, decorators: [{
1435
+ type: Component,
1436
+ args: [{ selector: 'keit-simple-date-range-input-widget', imports: [
1437
+ ReactiveFormsModule,
1438
+ FormsModule,
1439
+ TuiInput,
1440
+ TuiInputDateRange,
1441
+ TuiLabel,
1442
+ TuiIcon,
1443
+ TuiTooltip,
1444
+ TuiCalendarRange,
1445
+ TuiHint,
1446
+ ], template: `
1447
+ <tui-textfield
1448
+ [tuiTextfieldSize]="size()"
1449
+ [tuiTextfieldCleaner]="cleaner() ?? false"
1450
+ >
1451
+ <label tuiLabel>{{ placeholder() }}</label>
1452
+ <input
1453
+ tuiInputDateRange
1454
+ [placeholder]="sample()"
1455
+ [formControl]="control()"
1456
+ [readOnly]="readonly()"
1411
1457
  />
1412
- </keit-simple-flex>
1413
- `, providers: [validatorsProvider$1], changeDetection: ChangeDetectionStrategy.OnPush }]
1414
- }] });
1458
+ <tui-calendar-range *tuiDropdown />
1415
1459
 
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'"
1460
+ @if (iconRight()) {
1461
+ <tui-icon [icon]="iconRight()" />
1462
+ }
1463
+
1464
+ @if (hint()) {
1465
+ <tui-icon [tuiTooltip]="hint()" tuiHintDirection="top-end" />
1466
+ }
1467
+ </tui-textfield>
1468
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1469
+ }], 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 }] }] } });
1470
+
1471
+ class SimplePaginationWidget {
1472
+ page = input.required(...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
1473
+ size = input.required(...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1474
+ total = input.required(...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
1475
+ paginationChange = output();
1476
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePaginationWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1477
+ 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: `
1478
+ <tui-table-pagination
1479
+ [page]="page()"
1446
1480
  [size]="size()"
1447
- [caption]="caption()"
1448
- [appearance]="appearance()"
1449
- [disabled]="disabled()"
1450
- (action)="openDialog()"
1481
+ [total]="total()"
1482
+ (paginationChange)="paginationChange.emit($event)"
1451
1483
  />
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 });
1484
+ `, 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 });
1453
1485
  }
1454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionDialog, decorators: [{
1486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimplePaginationWidget, decorators: [{
1455
1487
  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'"
1488
+ args: [{ selector: 'keit-simple-pagination', imports: [TuiTablePagination], template: `
1489
+ <tui-table-pagination
1490
+ [page]="page()"
1460
1491
  [size]="size()"
1461
- [caption]="caption()"
1462
- [appearance]="appearance()"
1463
- [disabled]="disabled()"
1464
- (action)="openDialog()"
1492
+ [total]="total()"
1493
+ (paginationChange)="paginationChange.emit($event)"
1465
1494
  />
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"] }] } });
1495
+ `, providers: [tuiTablePaginationOptionsProvider({ showPages: false })], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;padding:16px}\n"] }]
1496
+ }], 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"] }] } });
1468
1497
 
1469
- class NameDescriptionComponent {
1498
+ class NotificationWidget {
1499
+ platformId = inject(PLATFORM_ID);
1500
+ size = input('l', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1501
+ appearance = input('info', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1502
+ closable = input(true, ...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
1503
+ closeLabel = input('Close', ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
1504
+ closeEvent = output();
1505
+ hideable = input(false, ...(ngDevMode ? [{ debugName: "hideable" }] : /* istanbul ignore next */ []));
1506
+ hideButtonLabel = input('Больше не показывать', ...(ngDevMode ? [{ debugName: "hideButtonLabel" }] : /* istanbul ignore next */ []));
1507
+ hideButtonAppearance = input('flat', ...(ngDevMode ? [{ debugName: "hideButtonAppearance" }] : /* istanbul ignore next */ []));
1508
+ hideButtonSize = input('s', ...(ngDevMode ? [{ debugName: "hideButtonSize" }] : /* istanbul ignore next */ []));
1509
+ storageKey = input(...(ngDevMode ? [undefined, { debugName: "storageKey" }] : /* istanbul ignore next */ []));
1510
+ shouldShow = signal(true, ...(ngDevMode ? [{ debugName: "shouldShow" }] : /* istanbul ignore next */ []));
1511
+ constructor() {
1512
+ effect(() => {
1513
+ const key = this.storageKey();
1514
+ if (key && isPlatformBrowser(this.platformId)) {
1515
+ const hidden = localStorage.getItem(`notification-hide-${key}`);
1516
+ this.shouldShow.set(!hidden);
1517
+ }
1518
+ });
1519
+ }
1520
+ hideForever() {
1521
+ const key = this.storageKey();
1522
+ if (key && isPlatformBrowser(this.platformId)) {
1523
+ localStorage.setItem(`notification-hide-${key}`, 'true');
1524
+ this.shouldShow.set(false);
1525
+ }
1526
+ }
1527
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NotificationWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1528
+ 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: `
1529
+ @if (shouldShow()) {
1530
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1531
+ <div tuiNotification [size]="size()" [appearance]="appearance()">
1532
+ <p class="text"><ng-content></ng-content></p>
1533
+ @if (hideable()) {
1534
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1535
+ <keit-simple-button
1536
+ [appearance]="hideButtonAppearance()"
1537
+ [size]="hideButtonSize()"
1538
+ [caption]="hideButtonLabel()"
1539
+ (action)="hideForever()"
1540
+ />
1541
+ }
1542
+ @if (closable()) {
1543
+ <button
1544
+ iconStart="@tui.x"
1545
+ tuiIconButton
1546
+ type="button"
1547
+ (click)="shouldShow.set(false)"
1548
+ >
1549
+ {{ closeLabel() }}
1550
+ </button>
1551
+ }
1552
+ </div>
1553
+ }
1554
+ `, 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 });
1555
+ }
1556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NotificationWidget, decorators: [{
1557
+ type: Component,
1558
+ args: [{ selector: 'keit-notification-widget', imports: [TuiNotification, TuiButton, SimpleButtonWidget], template: `
1559
+ @if (shouldShow()) {
1560
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1561
+ <div tuiNotification [size]="size()" [appearance]="appearance()">
1562
+ <p class="text"><ng-content></ng-content></p>
1563
+ @if (hideable()) {
1564
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1565
+ <keit-simple-button
1566
+ [appearance]="hideButtonAppearance()"
1567
+ [size]="hideButtonSize()"
1568
+ [caption]="hideButtonLabel()"
1569
+ (action)="hideForever()"
1570
+ />
1571
+ }
1572
+ @if (closable()) {
1573
+ <button
1574
+ iconStart="@tui.x"
1575
+ tuiIconButton
1576
+ type="button"
1577
+ (click)="shouldShow.set(false)"
1578
+ >
1579
+ {{ closeLabel() }}
1580
+ </button>
1581
+ }
1582
+ </div>
1583
+ }
1584
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;margin-bottom:8px}.text{font-size:12px;padding:8px 8px 0}\n"] }]
1585
+ }], 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 }] }] } });
1586
+
1587
+ class SimpleCalendarWidget {
1588
+ markerConditionFn = input(null, ...(ngDevMode ? [{ debugName: "markerConditionFn" }] : /* istanbul ignore next */ []));
1589
+ initialMonth = input(null, ...(ngDevMode ? [{ debugName: "initialMonth" }] : /* istanbul ignore next */ []));
1590
+ initialDay = input(null, ...(ngDevMode ? [{ debugName: "initialDay" }] : /* istanbul ignore next */ []));
1591
+ selectDay = output();
1592
+ selectMonth = output();
1593
+ value = null;
1594
+ selectedMonth = TuiMonth.currentLocal();
1595
+ hoveredItem = null;
1596
+ ngOnInit() {
1597
+ const initialMonth = this.initialMonth();
1598
+ if (initialMonth) {
1599
+ this.selectedMonth = initialMonth;
1600
+ this.value = new TuiDay(this.selectedMonth.year, this.selectedMonth.month, 1);
1601
+ }
1602
+ const initialDay = this.initialDay();
1603
+ if (initialDay) {
1604
+ this.value = initialDay;
1605
+ }
1606
+ }
1607
+ onDayClick(day) {
1608
+ this.value = day;
1609
+ this.selectDay.emit(day);
1610
+ }
1611
+ onMonthChange(month) {
1612
+ this.selectedMonth = month;
1613
+ this.selectMonth.emit(month);
1614
+ this.value = new TuiDay(month.year, month.month, 1);
1615
+ this.selectDay.emit(this.value);
1616
+ }
1617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCalendarWidget, deps: [], target: i0.ɵɵFactoryTarget.Component });
1618
+ 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: `
1619
+ <tui-calendar
1620
+ [markerHandler]="this.markerConditionFn()"
1621
+ [month]="selectedMonth"
1622
+ [showAdjacent]="false"
1623
+ [value]="value"
1624
+ [(hoveredItem)]="hoveredItem"
1625
+ (dayClick)="onDayClick($event)"
1626
+ (monthChange)="onMonthChange($event)"
1627
+ />
1628
+ `, 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 });
1629
+ }
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SimpleCalendarWidget, decorators: [{
1631
+ type: Component,
1632
+ args: [{ selector: 'keit-simple-calendar-widget', imports: [ReactiveFormsModule, FormsModule, TuiCalendar], template: `
1633
+ <tui-calendar
1634
+ [markerHandler]="this.markerConditionFn()"
1635
+ [month]="selectedMonth"
1636
+ [showAdjacent]="false"
1637
+ [value]="value"
1638
+ [(hoveredItem)]="hoveredItem"
1639
+ (dayClick)="onDayClick($event)"
1640
+ (monthChange)="onMonthChange($event)"
1641
+ />
1642
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
1643
+ }], 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"] }] } });
1644
+
1645
+ let NameDescriptionComponent$1 = class NameDescriptionComponent {
1470
1646
  context = injectContext();
1471
- name = KeitControl$1.create('')
1647
+ name = KeitControl.create('')
1472
1648
  .required()
1473
- .maxLength(30)
1474
- .minLength(2);
1475
- description = KeitControl$1.create('')
1649
+ .minLength(3)
1650
+ .maxLength(255);
1651
+ description = KeitControl.create('')
1476
1652
  .required()
1477
- .maxLength(300)
1478
- .minLength(2);
1653
+ .minLength(3)
1654
+ .maxLength(1024);
1479
1655
  cancel() {
1480
1656
  this.name.reset();
1481
1657
  this.description.reset();
@@ -1489,21 +1665,20 @@ class NameDescriptionComponent {
1489
1665
  this.description.reset();
1490
1666
  }
1491
1667
  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: `
1668
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: NameDescriptionComponent, isStandalone: true, selector: "keit-name-description-component", providers: [validatorsProvider], ngImport: i0, template: `
1499
1669
  <keit-simple-flex [gap]="8" direction="vertical">
1500
- <keit-simple-input-widget [control]="name" placeholder="Название" />
1670
+ <keit-simple-input-widget
1671
+ [control]="name"
1672
+ placeholder="Название"
1673
+ sample="Компот"
1674
+ />
1501
1675
 
1502
1676
  <keit-simple-textarea
1503
1677
  placeholder="Описание"
1504
- [limit]="1200"
1678
+ [limit]="1024"
1505
1679
  [control]="description"
1506
1680
  [size]="'m'"
1681
+ sample="Введите тут описание"
1507
1682
  />
1508
1683
 
1509
1684
  <keit-simple-actions
@@ -1513,27 +1688,32 @@ class NameDescriptionComponent {
1513
1688
  [disabled]="name.invalid || description.invalid"
1514
1689
  />
1515
1690
  </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: [{
1691
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleInputWidget, selector: "keit-simple-input-widget", inputs: ["placeholder", "sample", "control", "size", "readonly", "hint", "iconRight", "cleaner", "hasEnter", "focused"], outputs: ["enter"] }, { kind: "component", type: SimpleTextareaWidget, selector: "keit-simple-textarea", inputs: ["placeholder", "sample", "control", "limit", "size", "cleaner"] }, { kind: "component", type: SimpleActionsWidget, selector: "keit-simple-actions", inputs: ["primaryIcon", "secondaryIcon", "disabled", "primaryCaption", "secondaryCaption", "hasSecondary", "size"], outputs: ["acceptEvent", "cancelEvent"] }, { kind: "component", type: SimpleFlexLayout, selector: "keit-simple-flex", inputs: ["gap", "direction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1692
+ };
1693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent$1, decorators: [{
1519
1694
  type: Component,
1520
- args: [{ selector: 'keit-name-component', imports: [
1695
+ args: [{ selector: 'keit-name-description-component', imports: [
1521
1696
  FormsModule,
1522
1697
  ReactiveFormsModule,
1523
1698
  TuiInput,
1524
- SimpleInputWidget$1,
1525
- SimpleTextareaWidget$1,
1526
- SimpleActionsWidget$1,
1527
- SimpleFlexLayout$1,
1699
+ SimpleInputWidget,
1700
+ SimpleTextareaWidget,
1701
+ SimpleActionsWidget,
1702
+ SimpleFlexLayout,
1528
1703
  ], template: `
1529
1704
  <keit-simple-flex [gap]="8" direction="vertical">
1530
- <keit-simple-input-widget [control]="name" placeholder="Название" />
1705
+ <keit-simple-input-widget
1706
+ [control]="name"
1707
+ placeholder="Название"
1708
+ sample="Компот"
1709
+ />
1531
1710
 
1532
1711
  <keit-simple-textarea
1533
1712
  placeholder="Описание"
1534
- [limit]="1200"
1713
+ [limit]="1024"
1535
1714
  [control]="description"
1536
1715
  [size]="'m'"
1716
+ sample="Введите тут описание"
1537
1717
  />
1538
1718
 
1539
1719
  <keit-simple-actions
@@ -1543,16 +1723,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1543
1723
  [disabled]="name.invalid || description.invalid"
1544
1724
  />
1545
1725
  </keit-simple-flex>
1546
- `, providers: [
1547
- tuiValidationErrorsProvider({
1548
- required: 'Требуется ввести',
1549
- maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
1550
- minlength: ({ requiredLength }) => of(`Минимальная длина — ${requiredLength}`),
1551
- }),
1552
- ], changeDetection: ChangeDetectionStrategy.OnPush }]
1726
+ `, providers: [validatorsProvider], changeDetection: ChangeDetectionStrategy.OnPush }]
1553
1727
  }] });
1554
1728
 
1555
- class NameDialog {
1729
+ class NameDescriptionDialog {
1556
1730
  dialogs = inject(TuiDialogService);
1557
1731
  injector = inject(Injector);
1558
1732
  operation = input('create', ...(ngDevMode ? [{ debugName: "operation" }] : /* istanbul ignore next */ []));
@@ -1563,7 +1737,7 @@ class NameDialog {
1563
1737
  result = output();
1564
1738
  openDialog() {
1565
1739
  this.dialogs
1566
- .open(new PolymorpheusComponent(NameDescriptionComponent, this.injector), {
1740
+ .open(new PolymorpheusComponent(NameDescriptionComponent$1, this.injector), {
1567
1741
  label: `${this.operation() === 'create' ? 'Добавить' : 'Редактировать'}`,
1568
1742
  size: 's',
1569
1743
  dismissible: false,
@@ -1577,8 +1751,8 @@ class NameDialog {
1577
1751
  : null);
1578
1752
  });
1579
1753
  }
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: `
1754
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
1755
+ 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: `
1582
1756
  <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1583
1757
  <keit-simple-button
1584
1758
  [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
@@ -1588,11 +1762,11 @@ class NameDialog {
1588
1762
  [disabled]="disabled()"
1589
1763
  (action)="openDialog()"
1590
1764
  />
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 });
1765
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleButtonWidget, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1592
1766
  }
1593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDialog, decorators: [{
1767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionDialog, decorators: [{
1594
1768
  type: Component,
1595
- args: [{ selector: 'keit-name-input-dialog', imports: [FormsModule, ReactiveFormsModule, TuiInput, SimpleButtonWidget$1], template: `
1769
+ args: [{ selector: 'keit-name-description-input-dialog', imports: [FormsModule, ReactiveFormsModule, TuiInput, SimpleButtonWidget], template: `
1596
1770
  <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1597
1771
  <keit-simple-button
1598
1772
  [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
@@ -1605,76 +1779,144 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1605
1779
  `, changeDetection: ChangeDetectionStrategy.OnPush }]
1606
1780
  }], 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
1781
 
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()"
1782
+ class NameDescriptionComponent {
1783
+ context = injectContext();
1784
+ name = KeitControl.create('')
1785
+ .required()
1786
+ .maxLength(30)
1787
+ .minLength(2);
1788
+ description = KeitControl.create('')
1789
+ .required()
1790
+ .maxLength(300)
1791
+ .minLength(2);
1792
+ cancel() {
1793
+ this.name.reset();
1794
+ this.description.reset();
1795
+ }
1796
+ accept() {
1797
+ this.context.completeWith({
1798
+ name: this.name.value,
1799
+ description: this.description.value,
1800
+ });
1801
+ this.name.reset();
1802
+ this.description.reset();
1803
+ }
1804
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1805
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: NameDescriptionComponent, isStandalone: true, selector: "keit-name-component", providers: [
1806
+ tuiValidationErrorsProvider({
1807
+ required: 'Требуется ввести',
1808
+ maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
1809
+ minlength: ({ requiredLength }) => of(`Минимальная длина — ${requiredLength}`),
1810
+ }),
1811
+ ], ngImport: i0, template: `
1812
+ <keit-simple-flex [gap]="8" direction="vertical">
1813
+ <keit-simple-input-widget [control]="name" placeholder="Название" />
1814
+
1815
+ <keit-simple-textarea
1816
+ placeholder="Описание"
1817
+ [limit]="1200"
1818
+ [control]="description"
1819
+ [size]="'m'"
1665
1820
  />
1666
- <tui-calendar *tuiDropdown />
1667
1821
 
1668
- @if (iconRight()) {
1669
- <tui-icon [icon]="iconRight()" />
1670
- }
1822
+ <keit-simple-actions
1823
+ [size]="'s'"
1824
+ (cancelEvent)="cancel(); context.completeWith(null)"
1825
+ (acceptEvent)="accept()"
1826
+ [disabled]="name.invalid || description.invalid"
1827
+ />
1828
+ </keit-simple-flex>
1829
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleInputWidget, selector: "keit-simple-input-widget", inputs: ["placeholder", "sample", "control", "size", "readonly", "hint", "iconRight", "cleaner", "hasEnter", "focused"], outputs: ["enter"] }, { kind: "component", type: SimpleTextareaWidget, selector: "keit-simple-textarea", inputs: ["placeholder", "sample", "control", "limit", "size", "cleaner"] }, { kind: "component", type: SimpleActionsWidget, selector: "keit-simple-actions", inputs: ["primaryIcon", "secondaryIcon", "disabled", "primaryCaption", "secondaryCaption", "hasSecondary", "size"], outputs: ["acceptEvent", "cancelEvent"] }, { kind: "component", type: SimpleFlexLayout, selector: "keit-simple-flex", inputs: ["gap", "direction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1830
+ }
1831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDescriptionComponent, decorators: [{
1832
+ type: Component,
1833
+ args: [{ selector: 'keit-name-component', imports: [
1834
+ FormsModule,
1835
+ ReactiveFormsModule,
1836
+ TuiInput,
1837
+ SimpleInputWidget,
1838
+ SimpleTextareaWidget,
1839
+ SimpleActionsWidget,
1840
+ SimpleFlexLayout,
1841
+ ], template: `
1842
+ <keit-simple-flex [gap]="8" direction="vertical">
1843
+ <keit-simple-input-widget [control]="name" placeholder="Название" />
1671
1844
 
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 }] }] } });
1845
+ <keit-simple-textarea
1846
+ placeholder="Описание"
1847
+ [limit]="1200"
1848
+ [control]="description"
1849
+ [size]="'m'"
1850
+ />
1851
+
1852
+ <keit-simple-actions
1853
+ [size]="'s'"
1854
+ (cancelEvent)="cancel(); context.completeWith(null)"
1855
+ (acceptEvent)="accept()"
1856
+ [disabled]="name.invalid || description.invalid"
1857
+ />
1858
+ </keit-simple-flex>
1859
+ `, providers: [
1860
+ tuiValidationErrorsProvider({
1861
+ required: 'Требуется ввести',
1862
+ maxlength: ({ requiredLength }) => `Максимальная длина — ${requiredLength}`,
1863
+ minlength: ({ requiredLength }) => of(`Минимальная длина — ${requiredLength}`),
1864
+ }),
1865
+ ], changeDetection: ChangeDetectionStrategy.OnPush }]
1866
+ }] });
1867
+
1868
+ class NameDialog {
1869
+ dialogs = inject(TuiDialogService);
1870
+ injector = inject(Injector);
1871
+ operation = input('create', ...(ngDevMode ? [{ debugName: "operation" }] : /* istanbul ignore next */ []));
1872
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
1873
+ caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : /* istanbul ignore next */ []));
1874
+ size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1875
+ appearance = input('primary', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
1876
+ result = output();
1877
+ openDialog() {
1878
+ this.dialogs
1879
+ .open(new PolymorpheusComponent(NameDescriptionComponent, this.injector), {
1880
+ label: `${this.operation() === 'create' ? 'Добавить' : 'Редактировать'}`,
1881
+ size: 's',
1882
+ dismissible: false,
1883
+ })
1884
+ .subscribe((data) => {
1885
+ this.result.emit(data != null
1886
+ ? {
1887
+ name: data.name,
1888
+ description: data.description,
1889
+ }
1890
+ : null);
1891
+ });
1892
+ }
1893
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
1894
+ 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: `
1895
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1896
+ <keit-simple-button
1897
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1898
+ [size]="size()"
1899
+ [caption]="caption()"
1900
+ [appearance]="appearance()"
1901
+ [disabled]="disabled()"
1902
+ (action)="openDialog()"
1903
+ />
1904
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: SimpleButtonWidget, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1905
+ }
1906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NameDialog, decorators: [{
1907
+ type: Component,
1908
+ args: [{ selector: 'keit-name-input-dialog', imports: [FormsModule, ReactiveFormsModule, TuiInput, SimpleButtonWidget], template: `
1909
+ <!-- TODO: (Taiga UI migration) [appearance] binding uses a dynamic expression. If it can produce "error"/"success"/"glass", replace with "negative"/"positive"/"secondary-grayscale" -->
1910
+ <keit-simple-button
1911
+ [icon]="operation() === 'create' ? '@tui.plus' : '@tui.edit'"
1912
+ [size]="size()"
1913
+ [caption]="caption()"
1914
+ [appearance]="appearance()"
1915
+ [disabled]="disabled()"
1916
+ (action)="openDialog()"
1917
+ />
1918
+ `, changeDetection: ChangeDetectionStrategy.OnPush }]
1919
+ }], 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"] }] } });
1678
1920
 
1679
1921
  class ReloadOverlayWidget {
1680
1922
  reload = output();
@@ -1694,11 +1936,11 @@ class ReloadOverlayWidget {
1694
1936
  <ng-content />
1695
1937
  }
1696
1938
  </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 });
1939
+ `, 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, selector: "keit-simple-button", inputs: ["icon", "iconRight", "disabled", "caption", "ariaLabel", "size", "appearance"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1698
1940
  }
1699
1941
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ReloadOverlayWidget, decorators: [{
1700
1942
  type: Component,
1701
- args: [{ selector: 'keit-reload-overlay', imports: [SimpleButtonWidget$1], template: `
1943
+ args: [{ selector: 'keit-reload-overlay', imports: [SimpleButtonWidget], template: `
1702
1944
  <div [class.overlay]="overlayed()">
1703
1945
  @if (overlayed()) {
1704
1946
  <keit-simple-button
@@ -1715,251 +1957,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1715
1957
  `, 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
1958
  }], propDecorators: { reload: [{ type: i0.Output, args: ["reload"] }], overlayed: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayed", required: false }] }] } });
1717
1959
 
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
1960
  /*
1964
1961
  * Public API Surface of widgets
1965
1962
  */