@kris701/ez-ui 1.2.4 → 1.2.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,11 +1,11 @@
|
|
|
1
1
|
import * as i2$1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Output, Input, Component, signal,
|
|
4
|
+
import { EventEmitter, Output, Input, Component, signal, ContentChild, ViewChild, Directive, inject, viewChild } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i3$1 from '@taiga-ui/core';
|
|
8
|
-
import { TuiIcon, TuiInput, TuiButton, TuiDropdown, TuiOption, TuiGroup, TuiScrollbar, TuiSelectLike, TuiDataList, TuiTextfield, TuiLink, TuiHint,
|
|
8
|
+
import { TuiIcon, TuiInput, TuiButton, TuiTitle, TuiLoader, TuiDialog, TuiDropdown, TuiOption, TuiGroup, TuiScrollbar, TuiSelectLike, TuiDataList, TuiTextfield, TuiLink, TuiHint, TuiCheckbox, TUI_DARK_MODE, TuiRoot } from '@taiga-ui/core';
|
|
9
9
|
import * as i4$1 from '@taiga-ui/kit';
|
|
10
10
|
import { TuiBlock, TuiSwitch, TuiInputDate, TuiInputDateTime, TuiFiles, TuiChevron, TuiTextarea, TuiMultiSelect, TuiInputNumber, TuiInputChip, TuiPassword, TuiSelect, TuiBadge, TuiStatus, TuiDataListWrapper, TuiBadgeNotification, TuiBadgedContent, TuiButtonSelect, TuiStringifyContentPipe, TUI_CONFIRM } from '@taiga-ui/kit';
|
|
11
11
|
import * as i3$3 from '@taiga-ui/addon-mobile';
|
|
@@ -15,11 +15,11 @@ import * as i2 from '@taiga-ui/core/components/label';
|
|
|
15
15
|
import * as i3 from '@taiga-ui/core/components/textfield';
|
|
16
16
|
import * as i4 from '@taiga-ui/core/portals/dropdown';
|
|
17
17
|
import * as i6 from '@taiga-ui/core/components/calendar';
|
|
18
|
+
import * as i4$2 from '@taiga-ui/layout';
|
|
19
|
+
import { TuiHeader, TuiElasticContainer, TuiBlockStatus, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
|
|
18
20
|
import { marked } from 'marked';
|
|
19
21
|
import Compressor from 'compressorjs';
|
|
20
22
|
import * as i7 from '@taiga-ui/cdk/directives/item';
|
|
21
|
-
import * as i4$2 from '@taiga-ui/layout';
|
|
22
|
-
import { TuiElasticContainer, TuiBlockStatus, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
|
|
23
23
|
import * as i3$2 from '@taiga-ui/addon-table';
|
|
24
24
|
import { TuiTablePagination, TuiTable } from '@taiga-ui/addon-table';
|
|
25
25
|
import { v4 } from 'uuid';
|
|
@@ -368,6 +368,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
368
368
|
type: Output
|
|
369
369
|
}] } });
|
|
370
370
|
|
|
371
|
+
class EzUIDialog {
|
|
372
|
+
layoutService;
|
|
373
|
+
content;
|
|
374
|
+
size = 'm';
|
|
375
|
+
title = '';
|
|
376
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
378
|
+
showDialog = signal(false, /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "showDialog" }] : /* istanbul ignore next */ []));
|
|
380
|
+
showSave = false;
|
|
381
|
+
showDelete = false;
|
|
382
|
+
onSaveItem = new EventEmitter();
|
|
383
|
+
onDeleteItem = new EventEmitter();
|
|
384
|
+
constructor(layoutService) {
|
|
385
|
+
this.layoutService = layoutService;
|
|
386
|
+
}
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIDialog, deps: [{ token: EzUILayoutService }], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIDialog, isStandalone: true, selector: "ezui-dialog", inputs: { size: "size", title: "title", isLoading: "isLoading", showDialog: "showDialog", showSave: "showSave", showDelete: "showDelete" }, outputs: { onSaveItem: "onSaveItem", onDeleteItem: "onDeleteItem" }, queries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: `
|
|
389
|
+
<ng-template let-id="id" [tuiDialogOptions]="{size: size, appearance: layoutService.isDesktop() ? 'taiga compact' : 'fullscreen'}" [(tuiDialog)]="showDialog">
|
|
390
|
+
<header tuiHeader>
|
|
391
|
+
<hgroup tuiTitle>
|
|
392
|
+
<h2 [id]="id">{{title}}</h2>
|
|
393
|
+
</hgroup>
|
|
394
|
+
</header>
|
|
395
|
+
|
|
396
|
+
<tui-loader [overlay]="true" [loading]="isLoading()">
|
|
397
|
+
<ng-container [ngTemplateOutlet]="content"></ng-container>
|
|
398
|
+
</tui-loader>
|
|
399
|
+
|
|
400
|
+
@if(!isLoading() && (showSave || showDelete)){
|
|
401
|
+
<footer class="dialog-footer">
|
|
402
|
+
@if(showSave){
|
|
403
|
+
<button tuiButton iconStart="save" size="s" (click)="onSaveItem.emit()">Save</button>
|
|
404
|
+
}
|
|
405
|
+
@if(showDelete){
|
|
406
|
+
<button tuiButton iconStart="x" size="s" appearance="negative" (click)="onDeleteItem.emit()">Delete</button>
|
|
407
|
+
}
|
|
408
|
+
</footer>
|
|
409
|
+
}
|
|
410
|
+
</ng-template>
|
|
411
|
+
`, isInline: true, styles: [".dialog-footer{display:flex!important;flex-direction:row!important;gap:5px!important;margin-top:auto!important;margin-block-start:auto!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "directive", type: TuiDialog, selector: "ng-template[tuiDialog]", inputs: ["tuiDialogOptions"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }] });
|
|
412
|
+
}
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIDialog, decorators: [{
|
|
414
|
+
type: Component,
|
|
415
|
+
args: [{ selector: 'ezui-dialog', imports: [
|
|
416
|
+
FormsModule,
|
|
417
|
+
CommonModule,
|
|
418
|
+
TuiHeader,
|
|
419
|
+
TuiTitle,
|
|
420
|
+
TuiLoader,
|
|
421
|
+
TuiDialog,
|
|
422
|
+
TuiButton
|
|
423
|
+
], template: `
|
|
424
|
+
<ng-template let-id="id" [tuiDialogOptions]="{size: size, appearance: layoutService.isDesktop() ? 'taiga compact' : 'fullscreen'}" [(tuiDialog)]="showDialog">
|
|
425
|
+
<header tuiHeader>
|
|
426
|
+
<hgroup tuiTitle>
|
|
427
|
+
<h2 [id]="id">{{title}}</h2>
|
|
428
|
+
</hgroup>
|
|
429
|
+
</header>
|
|
430
|
+
|
|
431
|
+
<tui-loader [overlay]="true" [loading]="isLoading()">
|
|
432
|
+
<ng-container [ngTemplateOutlet]="content"></ng-container>
|
|
433
|
+
</tui-loader>
|
|
434
|
+
|
|
435
|
+
@if(!isLoading() && (showSave || showDelete)){
|
|
436
|
+
<footer class="dialog-footer">
|
|
437
|
+
@if(showSave){
|
|
438
|
+
<button tuiButton iconStart="save" size="s" (click)="onSaveItem.emit()">Save</button>
|
|
439
|
+
}
|
|
440
|
+
@if(showDelete){
|
|
441
|
+
<button tuiButton iconStart="x" size="s" appearance="negative" (click)="onDeleteItem.emit()">Delete</button>
|
|
442
|
+
}
|
|
443
|
+
</footer>
|
|
444
|
+
}
|
|
445
|
+
</ng-template>
|
|
446
|
+
`, styles: [".dialog-footer{display:flex!important;flex-direction:row!important;gap:5px!important;margin-top:auto!important;margin-block-start:auto!important}\n"] }]
|
|
447
|
+
}], ctorParameters: () => [{ type: EzUILayoutService }], propDecorators: { content: [{
|
|
448
|
+
type: ContentChild,
|
|
449
|
+
args: ['content', { static: false }]
|
|
450
|
+
}], size: [{
|
|
451
|
+
type: Input
|
|
452
|
+
}], title: [{
|
|
453
|
+
type: Input
|
|
454
|
+
}], isLoading: [{
|
|
455
|
+
type: Input
|
|
456
|
+
}], showDialog: [{
|
|
457
|
+
type: Input
|
|
458
|
+
}], showSave: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], showDelete: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], onSaveItem: [{
|
|
463
|
+
type: Output
|
|
464
|
+
}], onDeleteItem: [{
|
|
465
|
+
type: Output
|
|
466
|
+
}] } });
|
|
467
|
+
|
|
371
468
|
class EzUIFileInput {
|
|
372
469
|
files = signal([], /* @ts-ignore */
|
|
373
470
|
...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
@@ -5715,5 +5812,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
5715
5812
|
* Generated bundle index. Do not edit.
|
|
5716
5813
|
*/
|
|
5717
5814
|
|
|
5718
|
-
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
|
|
5815
|
+
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIDialog, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, compressImage };
|
|
5719
5816
|
//# sourceMappingURL=kris701-ez-ui.mjs.map
|