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