@kris701/ez-ui 1.3.8 → 1.3.10
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.
|
@@ -16,11 +16,12 @@ 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
18
|
import * as i4$2 from '@taiga-ui/layout';
|
|
19
|
-
import { TuiHeader,
|
|
19
|
+
import { TuiHeader, TuiBlockStatus, TuiElasticContainer, TuiNavigation, TuiAsideGroupComponent } from '@taiga-ui/layout';
|
|
20
20
|
import { marked } from 'marked';
|
|
21
21
|
import Compressor from 'compressorjs';
|
|
22
22
|
import { TuiAutoFocus } from '@taiga-ui/cdk';
|
|
23
23
|
import * as i5 from '@taiga-ui/cdk/directives/item';
|
|
24
|
+
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
24
25
|
import * as i3$2 from '@taiga-ui/addon-table';
|
|
25
26
|
import { TuiTablePagination, TuiTable } from '@taiga-ui/addon-table';
|
|
26
27
|
import { v4 } from 'uuid';
|
|
@@ -475,6 +476,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
475
476
|
class EzUIFileInput {
|
|
476
477
|
files = signal([], /* @ts-ignore */
|
|
477
478
|
...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
479
|
+
disabled = false;
|
|
478
480
|
clear() {
|
|
479
481
|
this.files.set([]);
|
|
480
482
|
}
|
|
@@ -493,7 +495,7 @@ class EzUIFileInput {
|
|
|
493
495
|
}
|
|
494
496
|
}
|
|
495
497
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIFileInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
496
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIFileInput, isStandalone: true, selector: "ezui-fileinput", ngImport: i0, template: `
|
|
498
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIFileInput, isStandalone: true, selector: "ezui-fileinput", inputs: { disabled: "disabled" }, ngImport: i0, template: `
|
|
497
499
|
<label tuiInputFiles>
|
|
498
500
|
<input
|
|
499
501
|
#validator="tuiInputFilesValidator"
|
|
@@ -501,6 +503,7 @@ class EzUIFileInput {
|
|
|
501
503
|
tuiInputFiles
|
|
502
504
|
[ngModel]="files()"
|
|
503
505
|
(ngModelChange)="onChange($event)"
|
|
506
|
+
[disabled]="disabled"
|
|
504
507
|
/>
|
|
505
508
|
</label>
|
|
506
509
|
|
|
@@ -528,6 +531,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
528
531
|
tuiInputFiles
|
|
529
532
|
[ngModel]="files()"
|
|
530
533
|
(ngModelChange)="onChange($event)"
|
|
534
|
+
[disabled]="disabled"
|
|
531
535
|
/>
|
|
532
536
|
</label>
|
|
533
537
|
|
|
@@ -542,7 +546,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
542
546
|
</tui-files>
|
|
543
547
|
`
|
|
544
548
|
}]
|
|
545
|
-
}]
|
|
549
|
+
}], propDecorators: { disabled: [{
|
|
550
|
+
type: Input
|
|
551
|
+
}] } });
|
|
546
552
|
|
|
547
553
|
const lucideicons = [
|
|
548
554
|
'a-arrow-down',
|
|
@@ -3728,6 +3734,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
3728
3734
|
type: Input
|
|
3729
3735
|
}] } });
|
|
3730
3736
|
|
|
3737
|
+
class EzUIOrderList {
|
|
3738
|
+
itemTemplate;
|
|
3739
|
+
disabled = false;
|
|
3740
|
+
values = [];
|
|
3741
|
+
valuesChange = new EventEmitter();
|
|
3742
|
+
optionLabel = "";
|
|
3743
|
+
showButtons = false;
|
|
3744
|
+
getOptionLabel(item) {
|
|
3745
|
+
if (!item)
|
|
3746
|
+
return "";
|
|
3747
|
+
if (this.optionLabel == undefined || this.optionLabel == '')
|
|
3748
|
+
return item;
|
|
3749
|
+
return item[this.optionLabel];
|
|
3750
|
+
}
|
|
3751
|
+
moveUp(index) {
|
|
3752
|
+
moveItemInArray(this.values, this.clampIndex(index), this.clampIndex(index - 1));
|
|
3753
|
+
this.valuesChange.emit(this.values);
|
|
3754
|
+
}
|
|
3755
|
+
moveDown(index) {
|
|
3756
|
+
moveItemInArray(this.values, this.clampIndex(index), this.clampIndex(index + 1));
|
|
3757
|
+
this.valuesChange.emit(this.values);
|
|
3758
|
+
}
|
|
3759
|
+
drop(event) {
|
|
3760
|
+
moveItemInArray(this.values, event.previousIndex, event.currentIndex);
|
|
3761
|
+
this.valuesChange.emit(this.values);
|
|
3762
|
+
}
|
|
3763
|
+
clampIndex(index) {
|
|
3764
|
+
if (index < 0)
|
|
3765
|
+
index = 0;
|
|
3766
|
+
if (index >= this.values.length)
|
|
3767
|
+
index = this.values.length - 1;
|
|
3768
|
+
return index;
|
|
3769
|
+
}
|
|
3770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIOrderList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3771
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUIOrderList, isStandalone: true, selector: "ezui-orderlist", inputs: { disabled: "disabled", values: "values", optionLabel: "optionLabel", showButtons: "showButtons" }, outputs: { valuesChange: "valuesChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], ngImport: i0, template: `
|
|
3772
|
+
<div class="orderlist-container">
|
|
3773
|
+
@if(values.length == 0){
|
|
3774
|
+
<tui-block-status>
|
|
3775
|
+
<tui-icon tuiSlot="top" icon="list" />
|
|
3776
|
+
|
|
3777
|
+
<h3>No Data</h3>
|
|
3778
|
+
|
|
3779
|
+
No data to display.
|
|
3780
|
+
</tui-block-status>
|
|
3781
|
+
}
|
|
3782
|
+
@else {
|
|
3783
|
+
<div cdkDropList (cdkDropListDropped)="drop($event)">
|
|
3784
|
+
@for (value of values; track $index) {
|
|
3785
|
+
<div
|
|
3786
|
+
cdkDrag
|
|
3787
|
+
cdkDragBoundary=".orderlist-container"
|
|
3788
|
+
cdkDragLockAxis="y"
|
|
3789
|
+
class="tile"
|
|
3790
|
+
cdkDragPreviewContainer="parent"
|
|
3791
|
+
[cdkDragDisabled]="disabled"
|
|
3792
|
+
>
|
|
3793
|
+
<tui-icon
|
|
3794
|
+
cdkDragHandle
|
|
3795
|
+
class="handle"
|
|
3796
|
+
icon="@tui.grip-vertical"
|
|
3797
|
+
/>
|
|
3798
|
+
@if(showButtons){
|
|
3799
|
+
<div class="button-container">
|
|
3800
|
+
<button tuiButton appearance="flat" size="s" iconStart="chevron-up" (click)="moveUp($index)" [disabled]="$index == 0"></button>
|
|
3801
|
+
<button tuiButton appearance="flat" size="s" iconStart="chevron-down" (click)="moveDown($index)" [disabled]="$index == values.length - 1"></button>
|
|
3802
|
+
</div>
|
|
3803
|
+
}
|
|
3804
|
+
@if(itemTemplate){
|
|
3805
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: value }"></ng-container>
|
|
3806
|
+
}
|
|
3807
|
+
@else {
|
|
3808
|
+
<div class="content">{{ getOptionLabel(value) }}</div>
|
|
3809
|
+
}
|
|
3810
|
+
</div>
|
|
3811
|
+
}
|
|
3812
|
+
</div>
|
|
3813
|
+
}
|
|
3814
|
+
</div>
|
|
3815
|
+
`, isInline: true, styles: [".orderlist-container{background-color:var(--tui-background-base-alt);border:2px solid var(--tui-border-normal);border-radius:var(--tui-radius-l);padding:5px}.tile{background:var(--tui-background-base);border-radius:var(--tui-radius-l);border:1px solid var(--tui-border-normal);display:flex;flex-direction:row;gap:5px;padding:5px}.tile .handle{align-self:center;cursor:grab}.tile .content,.tile .button-container{align-self:center}.cdk-drag-disabled{opacity:.7;-webkit-user-select:none;user-select:none}.cdk-drag-disabled .handle{align-self:center;cursor:not-allowed}.cdk-drag-preview{display:flex;background:var(--tui-background-base);border-radius:var(--tui-radius-l);border:1px solid var(--tui-border-normal)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$2.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i4$2.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }] });
|
|
3816
|
+
}
|
|
3817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUIOrderList, decorators: [{
|
|
3818
|
+
type: Component,
|
|
3819
|
+
args: [{ selector: 'ezui-orderlist', imports: [
|
|
3820
|
+
FormsModule,
|
|
3821
|
+
CommonModule,
|
|
3822
|
+
TuiBlockStatus,
|
|
3823
|
+
TuiIcon,
|
|
3824
|
+
CdkDropList,
|
|
3825
|
+
CdkDrag,
|
|
3826
|
+
CdkDragHandle,
|
|
3827
|
+
TuiButton
|
|
3828
|
+
], template: `
|
|
3829
|
+
<div class="orderlist-container">
|
|
3830
|
+
@if(values.length == 0){
|
|
3831
|
+
<tui-block-status>
|
|
3832
|
+
<tui-icon tuiSlot="top" icon="list" />
|
|
3833
|
+
|
|
3834
|
+
<h3>No Data</h3>
|
|
3835
|
+
|
|
3836
|
+
No data to display.
|
|
3837
|
+
</tui-block-status>
|
|
3838
|
+
}
|
|
3839
|
+
@else {
|
|
3840
|
+
<div cdkDropList (cdkDropListDropped)="drop($event)">
|
|
3841
|
+
@for (value of values; track $index) {
|
|
3842
|
+
<div
|
|
3843
|
+
cdkDrag
|
|
3844
|
+
cdkDragBoundary=".orderlist-container"
|
|
3845
|
+
cdkDragLockAxis="y"
|
|
3846
|
+
class="tile"
|
|
3847
|
+
cdkDragPreviewContainer="parent"
|
|
3848
|
+
[cdkDragDisabled]="disabled"
|
|
3849
|
+
>
|
|
3850
|
+
<tui-icon
|
|
3851
|
+
cdkDragHandle
|
|
3852
|
+
class="handle"
|
|
3853
|
+
icon="@tui.grip-vertical"
|
|
3854
|
+
/>
|
|
3855
|
+
@if(showButtons){
|
|
3856
|
+
<div class="button-container">
|
|
3857
|
+
<button tuiButton appearance="flat" size="s" iconStart="chevron-up" (click)="moveUp($index)" [disabled]="$index == 0"></button>
|
|
3858
|
+
<button tuiButton appearance="flat" size="s" iconStart="chevron-down" (click)="moveDown($index)" [disabled]="$index == values.length - 1"></button>
|
|
3859
|
+
</div>
|
|
3860
|
+
}
|
|
3861
|
+
@if(itemTemplate){
|
|
3862
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: value }"></ng-container>
|
|
3863
|
+
}
|
|
3864
|
+
@else {
|
|
3865
|
+
<div class="content">{{ getOptionLabel(value) }}</div>
|
|
3866
|
+
}
|
|
3867
|
+
</div>
|
|
3868
|
+
}
|
|
3869
|
+
</div>
|
|
3870
|
+
}
|
|
3871
|
+
</div>
|
|
3872
|
+
`, styles: [".orderlist-container{background-color:var(--tui-background-base-alt);border:2px solid var(--tui-border-normal);border-radius:var(--tui-radius-l);padding:5px}.tile{background:var(--tui-background-base);border-radius:var(--tui-radius-l);border:1px solid var(--tui-border-normal);display:flex;flex-direction:row;gap:5px;padding:5px}.tile .handle{align-self:center;cursor:grab}.tile .content,.tile .button-container{align-self:center}.cdk-drag-disabled{opacity:.7;-webkit-user-select:none;user-select:none}.cdk-drag-disabled .handle{align-self:center;cursor:not-allowed}.cdk-drag-preview{display:flex;background:var(--tui-background-base);border-radius:var(--tui-radius-l);border:1px solid var(--tui-border-normal)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
3873
|
+
}], propDecorators: { itemTemplate: [{
|
|
3874
|
+
type: ContentChild,
|
|
3875
|
+
args: ['itemTemplate', { static: false }]
|
|
3876
|
+
}], disabled: [{
|
|
3877
|
+
type: Input
|
|
3878
|
+
}], values: [{
|
|
3879
|
+
type: Input
|
|
3880
|
+
}], valuesChange: [{
|
|
3881
|
+
type: Output
|
|
3882
|
+
}], optionLabel: [{
|
|
3883
|
+
type: Input
|
|
3884
|
+
}], showButtons: [{
|
|
3885
|
+
type: Input
|
|
3886
|
+
}] } });
|
|
3887
|
+
|
|
3731
3888
|
class EzUISelect {
|
|
3732
3889
|
selectedTemplate;
|
|
3733
3890
|
itemTemplate;
|
|
@@ -7041,5 +7198,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
7041
7198
|
* Generated bundle index. Do not edit.
|
|
7042
7199
|
*/
|
|
7043
7200
|
|
|
7044
|
-
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIDialog, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIPasswordInput, EzUIPopoutMenu, EzUIPopoutMenuSubDataList, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableDateTimeFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, EzUITreeMultiSelect, EzUITreeSelect, compressImage };
|
|
7201
|
+
export { BaseCRUDInterface, BaseListInterface, EzUIBooleanInput, EzUIDateInput, EzUIDateTimeInput, EzUIDialog, EzUIFileInput, EzUIFilterHelpers, EzUIIconSelector, EzUILayout, EzUILayoutService, EzUIMarkdownEditor, EzUIMenuBar, EzUIMenuBarSubDataList, EzUIMultiSelect, EzUINumberInput, EzUIOrderList, EzUIPasswordInput, EzUIPopoutMenu, EzUIPopoutMenuSubDataList, EzUISelect, EzUIShowMoreText, EzUITTableSortableColumn, EzUITable, EzUITableBooleanFilter, EzUITableDateFilter, EzUITableDateTimeFilter, EzUITableFilterService, EzUITableNumberFilter, EzUITableSelectFilter, EzUITableTextFilter, EzUITextInput, EzUITreeMultiSelect, EzUITreeSelect, compressImage };
|
|
7045
7202
|
//# sourceMappingURL=kris701-ez-ui.mjs.map
|