fixa-admin 0.0.53 → 0.0.55
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.
- package/esm2022/lib/components/grid/filter/date-filter.component.mjs +7 -1
- package/esm2022/lib/components/grid/filter/index.api.mjs +2 -1
- package/esm2022/lib/components/grid/filter/time-filter.component.mjs +104 -0
- package/esm2022/lib/components/grid/grid.component.mjs +615 -287
- package/esm2022/lib/components/map/map.component.mjs +5 -2
- package/esm2022/lib/components/uploader/uploader.component.mjs +1 -2
- package/esm2022/lib/db.mjs +12 -0
- package/esm2022/lib/directive/image.directive.mjs +1 -2
- package/esm2022/lib/layouts/master/master.layout.mjs +15 -3
- package/esm2022/lib/models/shared.model.mjs +1 -1
- package/esm2022/lib/shared.module.mjs +21 -6
- package/fesm2022/fixa-admin.mjs +774 -313
- package/fesm2022/fixa-admin.mjs.map +1 -1
- package/lib/components/grid/filter/index.api.d.ts +1 -0
- package/lib/components/grid/filter/time-filter.component.d.ts +22 -0
- package/lib/components/grid/grid.component.d.ts +28 -4
- package/lib/db.d.ts +7 -0
- package/lib/layouts/master/master.layout.d.ts +24 -0
- package/lib/models/shared.model.d.ts +36 -2
- package/lib/shared.module.d.ts +36 -31
- package/package.json +1 -1
- package/src/style.scss +35 -1
package/fesm2022/fixa-admin.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import * as i1 from 'ng-zorro-antd/modal';
|
|
|
6
6
|
import { NZ_MODAL_DATA, NzModalRef, NzModalModule } from 'ng-zorro-antd/modal';
|
|
7
7
|
import * as i1$1 from 'ng-zorro-antd/message';
|
|
8
8
|
import { NzMessageModule } from 'ng-zorro-antd/message';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i4$1 from '@ag-grid-community/angular';
|
|
10
10
|
import { AgGridModule } from '@ag-grid-community/angular';
|
|
11
11
|
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
12
12
|
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
@@ -18,42 +18,51 @@ import { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';
|
|
|
18
18
|
import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
|
|
19
19
|
import { SetFilterModule } from '@ag-grid-enterprise/set-filter';
|
|
20
20
|
import { CdkMenuModule } from '@angular/cdk/menu';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i3$1 from '@angular/common';
|
|
22
22
|
import { CommonModule } from '@angular/common';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i4 from '@angular/forms';
|
|
24
24
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
25
|
-
import * as i1$
|
|
25
|
+
import * as i1$5 from '@angular/router';
|
|
26
26
|
import { RouterModule } from '@angular/router';
|
|
27
|
-
import * as i1$
|
|
27
|
+
import * as i1$3 from '@ngx-translate/core';
|
|
28
28
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
29
29
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
30
30
|
import * as i1$2 from 'ng-zorro-antd/button';
|
|
31
31
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
32
32
|
import * as i7 from 'ng-zorro-antd/form';
|
|
33
33
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i5$1 from 'ng-zorro-antd/icon';
|
|
35
35
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
36
36
|
import * as i5 from 'ng-zorro-antd/input';
|
|
37
37
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
38
|
-
import * as i4$
|
|
38
|
+
import * as i4$2 from 'ng-zorro-antd/layout';
|
|
39
39
|
import { NzLayoutModule } from 'ng-zorro-antd/layout';
|
|
40
|
-
import * as i5$
|
|
40
|
+
import * as i5$2 from 'ng-zorro-antd/menu';
|
|
41
41
|
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
|
42
|
-
import * as i1$
|
|
42
|
+
import * as i1$4 from 'ng-zorro-antd/spin';
|
|
43
43
|
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
44
44
|
import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
45
|
-
import * as i2$
|
|
45
|
+
import * as i2$2 from 'ng-zorro-antd/tooltip';
|
|
46
46
|
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
47
47
|
import { NzTreeViewModule } from 'ng-zorro-antd/tree-view';
|
|
48
48
|
import * as i6$1 from 'ng-zorro-antd/upload';
|
|
49
49
|
import { NzUploadModule } from 'ng-zorro-antd/upload';
|
|
50
|
-
import * as i2$
|
|
50
|
+
import * as i2$3 from 'ngx-image-cropper';
|
|
51
51
|
import { ImageCropperComponent } from 'ngx-image-cropper';
|
|
52
52
|
import * as moment from 'jalali-moment';
|
|
53
53
|
import moment__default from 'jalali-moment';
|
|
54
54
|
import * as i2$1 from 'ng-zorro-antd/core/transition-patch';
|
|
55
55
|
import * as i3 from 'ng-zorro-antd/core/wave';
|
|
56
56
|
import * as i6 from 'ng-zorro-antd/grid';
|
|
57
|
+
import Dexie from 'dexie';
|
|
58
|
+
import * as i14 from 'ng-zorro-antd/select';
|
|
59
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
60
|
+
import * as i15 from 'ng-zorro-antd/tree-select';
|
|
61
|
+
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
|
|
62
|
+
import * as i16 from 'ng-zorro-antd/popover';
|
|
63
|
+
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
64
|
+
import * as i17 from '@qeydar/datepicker';
|
|
65
|
+
import { QeydarDatePickerModule } from '@qeydar/datepicker';
|
|
57
66
|
import { Subscription, Observable } from 'rxjs';
|
|
58
67
|
import Compressor from 'compressorjs';
|
|
59
68
|
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
@@ -416,6 +425,9 @@ class DateFilter {
|
|
|
416
425
|
this.params = params;
|
|
417
426
|
}
|
|
418
427
|
isFilterActive() {
|
|
428
|
+
if ((this.dateFrom == "" && this.dateTo == "") || (this.dateFrom == null && this.dateTo == null)) {
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
419
431
|
return true;
|
|
420
432
|
}
|
|
421
433
|
doesFilterPass(params) {
|
|
@@ -430,6 +442,9 @@ class DateFilter {
|
|
|
430
442
|
passed = false;
|
|
431
443
|
}
|
|
432
444
|
});
|
|
445
|
+
if (this.dateFrom == "" && this.dateTo == "") {
|
|
446
|
+
passed = false;
|
|
447
|
+
}
|
|
433
448
|
return passed;
|
|
434
449
|
}
|
|
435
450
|
getModel() {
|
|
@@ -486,7 +501,7 @@ class DateFilter {
|
|
|
486
501
|
<button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
|
|
487
502
|
</div>
|
|
488
503
|
</div>
|
|
489
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type:
|
|
504
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: MaskDirective, selector: "[appMask]", inputs: ["appMask"] }] }); }
|
|
490
505
|
}
|
|
491
506
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFilter, decorators: [{
|
|
492
507
|
type: Component,
|
|
@@ -518,6 +533,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
518
533
|
args: ['eFilterText']
|
|
519
534
|
}] } });
|
|
520
535
|
|
|
536
|
+
class TimeFilter {
|
|
537
|
+
constructor() {
|
|
538
|
+
this.time = "";
|
|
539
|
+
}
|
|
540
|
+
agInit(params) {
|
|
541
|
+
this.params = params;
|
|
542
|
+
}
|
|
543
|
+
isFilterActive() {
|
|
544
|
+
if (this.time == null) {
|
|
545
|
+
return false;
|
|
546
|
+
}
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
549
|
+
doesFilterPass(params) {
|
|
550
|
+
let passed = true;
|
|
551
|
+
const { node } = params;
|
|
552
|
+
this.time
|
|
553
|
+
.toLowerCase()
|
|
554
|
+
.split(' ')
|
|
555
|
+
.forEach((filterWord) => {
|
|
556
|
+
const value = this.params.getValue(node);
|
|
557
|
+
if (value.toString().toLowerCase().indexOf(filterWord) < 0) {
|
|
558
|
+
passed = false;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
if (this.time == null) {
|
|
562
|
+
passed = false;
|
|
563
|
+
}
|
|
564
|
+
return passed;
|
|
565
|
+
}
|
|
566
|
+
getModel() {
|
|
567
|
+
if (!this.isFilterActive()) {
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
let time = this.time;
|
|
571
|
+
return { time, filterType: 'custom-time' };
|
|
572
|
+
}
|
|
573
|
+
setModel(model) {
|
|
574
|
+
this.time = model == null || model.time == null ? null : model.time;
|
|
575
|
+
}
|
|
576
|
+
filter() {
|
|
577
|
+
this.params.filterChangedCallback();
|
|
578
|
+
}
|
|
579
|
+
clear() {
|
|
580
|
+
this.time = null;
|
|
581
|
+
this.filter();
|
|
582
|
+
}
|
|
583
|
+
afterGuiAttached(params) {
|
|
584
|
+
if (!params?.suppressFocus) {
|
|
585
|
+
// focus the input element for keyboard navigation
|
|
586
|
+
this.eFilterText.nativeElement.focus();
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFilter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
590
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TimeFilter, selector: "ng-component", viewQueries: [{ propertyName: "eFilterText", first: true, predicate: ["eFilterText"], descendants: true }], ngImport: i0, template: `
|
|
591
|
+
<div class="p-4">
|
|
592
|
+
<nz-form-item>
|
|
593
|
+
<nz-form-label>ساعت</nz-form-label>
|
|
594
|
+
<nz-form-control>
|
|
595
|
+
<input nz-input appMask="00:00:00" placeholder="12:00:00" autocomplete="off" class="w-[250px]" dir="ltr" [(ngModel)]="time" #eFilterText/>
|
|
596
|
+
</nz-form-control>
|
|
597
|
+
</nz-form-item>
|
|
598
|
+
<hr/>
|
|
599
|
+
<div class="flex gap-2">
|
|
600
|
+
<button nz-button nzType="primary" class="mt-4" (click)="filter()">فیلتر</button>
|
|
601
|
+
<button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
|
|
602
|
+
</div>
|
|
603
|
+
</div>
|
|
604
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: MaskDirective, selector: "[appMask]", inputs: ["appMask"] }] }); }
|
|
605
|
+
}
|
|
606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFilter, decorators: [{
|
|
607
|
+
type: Component,
|
|
608
|
+
args: [{
|
|
609
|
+
template: `
|
|
610
|
+
<div class="p-4">
|
|
611
|
+
<nz-form-item>
|
|
612
|
+
<nz-form-label>ساعت</nz-form-label>
|
|
613
|
+
<nz-form-control>
|
|
614
|
+
<input nz-input appMask="00:00:00" placeholder="12:00:00" autocomplete="off" class="w-[250px]" dir="ltr" [(ngModel)]="time" #eFilterText/>
|
|
615
|
+
</nz-form-control>
|
|
616
|
+
</nz-form-item>
|
|
617
|
+
<hr/>
|
|
618
|
+
<div class="flex gap-2">
|
|
619
|
+
<button nz-button nzType="primary" class="mt-4" (click)="filter()">فیلتر</button>
|
|
620
|
+
<button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
`,
|
|
624
|
+
}]
|
|
625
|
+
}], propDecorators: { eFilterText: [{
|
|
626
|
+
type: ViewChild,
|
|
627
|
+
args: ['eFilterText']
|
|
628
|
+
}] } });
|
|
629
|
+
|
|
521
630
|
class JDatePipe {
|
|
522
631
|
transform(value, time = false, format = 'YYYY/MM/DD') {
|
|
523
632
|
if (value != null) {
|
|
@@ -540,9 +649,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
540
649
|
args: [{ name: 'jdate' }]
|
|
541
650
|
}] });
|
|
542
651
|
|
|
652
|
+
// db.ts
|
|
653
|
+
class AppDB extends Dexie {
|
|
654
|
+
constructor() {
|
|
655
|
+
super('fixa-admin-grid');
|
|
656
|
+
this.version(3).stores({
|
|
657
|
+
gridFilterItems: 'id',
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
const db = new AppDB();
|
|
662
|
+
|
|
543
663
|
class GridComponent {
|
|
544
|
-
constructor(_translate) {
|
|
664
|
+
constructor(_translate, _cdr, _toast) {
|
|
545
665
|
this._translate = _translate;
|
|
666
|
+
this._cdr = _cdr;
|
|
667
|
+
this._toast = _toast;
|
|
546
668
|
this.getServerSideGroupKey = null;
|
|
547
669
|
this.groupDefaultExpanded = -1;
|
|
548
670
|
this._treeGroupColumn = null;
|
|
@@ -552,7 +674,16 @@ class GridComponent {
|
|
|
552
674
|
};
|
|
553
675
|
this.themeClass = "ag-theme-quartz";
|
|
554
676
|
this.columnDefs = [];
|
|
677
|
+
this.visibleFilterBox = false;
|
|
555
678
|
this._column = [];
|
|
679
|
+
this._filterBoxItems = [];
|
|
680
|
+
this.filterItemsValues = [];
|
|
681
|
+
this.filterTemplateItems = [];
|
|
682
|
+
this.visibleFilterTemplateBox = false;
|
|
683
|
+
this.isVisibleModal = false;
|
|
684
|
+
this.gridModel = null;
|
|
685
|
+
this.templateName = null;
|
|
686
|
+
this.gridId = null;
|
|
556
687
|
this._autoColumnSize = { type: 'fitGridWidth' };
|
|
557
688
|
this.autoGroupColumnDef = {
|
|
558
689
|
headerName: "",
|
|
@@ -579,6 +710,7 @@ class GridComponent {
|
|
|
579
710
|
this.rowSelectionChange = new EventEmitter();
|
|
580
711
|
this.actionWidth = 100;
|
|
581
712
|
this.label = null;
|
|
713
|
+
this.id = null;
|
|
582
714
|
this.rowModelType = 'serverSide';
|
|
583
715
|
this.serverSideSort = true;
|
|
584
716
|
this.serverSideFilter = true;
|
|
@@ -619,6 +751,12 @@ class GridComponent {
|
|
|
619
751
|
];
|
|
620
752
|
this.datasource = this.createServerSideDatasource();
|
|
621
753
|
}
|
|
754
|
+
getRowClass(params) {
|
|
755
|
+
if (params.node.rowIndex % 2 !== 0) {
|
|
756
|
+
return 'row-odd';
|
|
757
|
+
}
|
|
758
|
+
return '';
|
|
759
|
+
}
|
|
622
760
|
set isRowSelection(v) {
|
|
623
761
|
if (v) {
|
|
624
762
|
this._rowSelection = {
|
|
@@ -676,249 +814,424 @@ class GridComponent {
|
|
|
676
814
|
// this.autoGroupColumnDef.headerName = v;
|
|
677
815
|
}
|
|
678
816
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}
|
|
682
|
-
set column(v) {
|
|
683
|
-
this.columnDefs = [];
|
|
684
|
-
if (v != null) {
|
|
685
|
-
this._column = v;
|
|
817
|
+
set filterItems(v) {
|
|
818
|
+
if (v != null && v.length > 0) {
|
|
686
819
|
v.forEach((el) => {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
displayKey: 'false',
|
|
705
|
-
displayName: this._translate.instant('NO'),
|
|
706
|
-
predicate: () => true,
|
|
707
|
-
numberOfInputs: 0
|
|
820
|
+
if (!this._filterBoxItems.find((item) => item.field == el.field)) {
|
|
821
|
+
let items = [];
|
|
822
|
+
if ((el.type == 'enum' || el.type == 'select' || el.type == 'tree-select') && el.items != null) {
|
|
823
|
+
el.items?.().then((res) => {
|
|
824
|
+
let nodes = [];
|
|
825
|
+
if (el.type == 'tree-select') {
|
|
826
|
+
const convertToNzTreeNodes = (items) => {
|
|
827
|
+
return items.map(item => ({
|
|
828
|
+
title: item.label,
|
|
829
|
+
key: String(item.value),
|
|
830
|
+
isLeaf: item.children && item.children.length > 0 ? false : true,
|
|
831
|
+
children: item.children ? convertToNzTreeNodes(item.children) : [],
|
|
832
|
+
}));
|
|
833
|
+
};
|
|
834
|
+
nodes = convertToNzTreeNodes(res);
|
|
708
835
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
displayName: this._translate.instant(el.filterItems[property]),
|
|
718
|
-
predicate: true,
|
|
719
|
-
numberOfInputs: 0
|
|
836
|
+
this._filterBoxItems.push({
|
|
837
|
+
field: el.field,
|
|
838
|
+
label: el.label,
|
|
839
|
+
value: null,
|
|
840
|
+
items: res,
|
|
841
|
+
type: el.type,
|
|
842
|
+
position: el.position ? el.position : 'filter',
|
|
843
|
+
nodes
|
|
720
844
|
});
|
|
721
|
-
}
|
|
722
|
-
filterParams.filterOptions = [
|
|
723
|
-
"empty",
|
|
724
|
-
...items
|
|
725
|
-
];
|
|
726
|
-
break;
|
|
727
|
-
case 'number':
|
|
728
|
-
filter = 'agNumberColumnFilter';
|
|
729
|
-
break;
|
|
730
|
-
case 'select':
|
|
731
|
-
filter = 'agSetColumnFilter';
|
|
732
|
-
break;
|
|
733
|
-
case 'string':
|
|
734
|
-
filter = 'agTextColumnFilter';
|
|
735
|
-
break;
|
|
736
|
-
case 'date':
|
|
737
|
-
filter = 'agDateColumnFilter';
|
|
738
|
-
break;
|
|
739
|
-
default:
|
|
740
|
-
filter = 'agTextColumnFilter';
|
|
741
|
-
break;
|
|
742
|
-
}
|
|
743
|
-
if (el.filter != undefined && !el.filter) {
|
|
744
|
-
filter = false;
|
|
745
|
-
}
|
|
746
|
-
if (el.sortable != undefined && !el.sortable) {
|
|
747
|
-
sortable = false;
|
|
748
|
-
}
|
|
749
|
-
if (el.field != this._treeGroupColumn) {
|
|
750
|
-
if (el.type && el.type == 'boolean') {
|
|
751
|
-
this.columnDefs.push({
|
|
752
|
-
colId: el.id ? el.id : el.field,
|
|
753
|
-
field: el.field,
|
|
754
|
-
headerName: el.label,
|
|
755
|
-
filter: filter,
|
|
756
|
-
sortable,
|
|
757
|
-
editable: el.editable,
|
|
758
|
-
minWidth: el.minWidth ? el.minWidth : null,
|
|
759
|
-
filterParams,
|
|
760
|
-
pinned: el.pinned,
|
|
761
|
-
cellClass: 'ag-boolean-cell',
|
|
762
|
-
cellRenderer: params => {
|
|
763
|
-
if (params.value != null) {
|
|
764
|
-
return params.value ? '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke="green" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17L4 12"/></svg>' : '<svg xmlns="http://www.w3.org/2000/svg" stroke="red" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" /></svg>';
|
|
765
|
-
}
|
|
766
|
-
else {
|
|
767
|
-
return '';
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
845
|
});
|
|
771
846
|
}
|
|
772
|
-
else if (el.type
|
|
773
|
-
|
|
774
|
-
|
|
847
|
+
else if (el.type == 'boolean') {
|
|
848
|
+
items.push({
|
|
849
|
+
label: this._translate.instant("true"),
|
|
850
|
+
value: true
|
|
851
|
+
}, {
|
|
852
|
+
label: this._translate.instant("false"),
|
|
853
|
+
value: false
|
|
854
|
+
});
|
|
855
|
+
this._filterBoxItems.push({
|
|
775
856
|
field: el.field,
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
filterParams,
|
|
783
|
-
cellRenderer: params => {
|
|
784
|
-
if (params.value) {
|
|
785
|
-
return this._translate.instant(params.value);
|
|
786
|
-
}
|
|
787
|
-
else {
|
|
788
|
-
return '';
|
|
789
|
-
}
|
|
790
|
-
}
|
|
857
|
+
label: el.label,
|
|
858
|
+
value: null,
|
|
859
|
+
items,
|
|
860
|
+
type: el.type,
|
|
861
|
+
position: el.position ? el.position : 'filter',
|
|
862
|
+
nodes: []
|
|
791
863
|
});
|
|
792
864
|
}
|
|
793
|
-
else
|
|
794
|
-
this.
|
|
795
|
-
colId: el.id ? el.id : el.field,
|
|
865
|
+
else {
|
|
866
|
+
this._filterBoxItems.push({
|
|
796
867
|
field: el.field,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
pinned: el.pinned,
|
|
804
|
-
cellRenderer: params => {
|
|
805
|
-
if (params.value) {
|
|
806
|
-
return new JDatePipe().transform(params.value);
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
return '';
|
|
810
|
-
}
|
|
811
|
-
}
|
|
868
|
+
label: el.label,
|
|
869
|
+
value: null,
|
|
870
|
+
items,
|
|
871
|
+
type: el.type,
|
|
872
|
+
position: el.position ? el.position : 'filter',
|
|
873
|
+
nodes: []
|
|
812
874
|
});
|
|
813
875
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
get column() {
|
|
881
|
+
return this.column;
|
|
882
|
+
}
|
|
883
|
+
set column(v) {
|
|
884
|
+
setTimeout(() => {
|
|
885
|
+
this.columnDefs = [];
|
|
886
|
+
if (v != null) {
|
|
887
|
+
this._column = v;
|
|
888
|
+
v.forEach((el) => {
|
|
889
|
+
var filter = 'agTextColumnFilter';
|
|
890
|
+
var sortable = true;
|
|
891
|
+
var filterParams = {
|
|
892
|
+
maxNumConditions: 1
|
|
893
|
+
};
|
|
894
|
+
switch (el.type) {
|
|
895
|
+
case 'boolean':
|
|
896
|
+
filter = 'agNumberColumnFilter';
|
|
897
|
+
filterParams.filterOptions = [
|
|
898
|
+
"empty",
|
|
899
|
+
{
|
|
900
|
+
displayKey: 'true',
|
|
901
|
+
displayName: this._translate.instant('YES'),
|
|
902
|
+
predicate: () => true,
|
|
903
|
+
numberOfInputs: 0
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
displayKey: 'false',
|
|
907
|
+
displayName: this._translate.instant('NO'),
|
|
908
|
+
predicate: () => true,
|
|
909
|
+
numberOfInputs: 0
|
|
831
910
|
}
|
|
911
|
+
];
|
|
912
|
+
break;
|
|
913
|
+
case 'enum':
|
|
914
|
+
filter = 'agNumberColumnFilter';
|
|
915
|
+
const items = [];
|
|
916
|
+
for (const property in el.filterItems) {
|
|
917
|
+
items.push({
|
|
918
|
+
displayKey: el.filterItems[property],
|
|
919
|
+
displayName: this._translate.instant(el.filterItems[property]),
|
|
920
|
+
predicate: true,
|
|
921
|
+
numberOfInputs: 0
|
|
922
|
+
});
|
|
832
923
|
}
|
|
833
|
-
|
|
924
|
+
filterParams.filterOptions = [
|
|
925
|
+
"empty",
|
|
926
|
+
...items
|
|
927
|
+
];
|
|
928
|
+
break;
|
|
929
|
+
case 'number':
|
|
930
|
+
filter = 'agNumberColumnFilter';
|
|
931
|
+
break;
|
|
932
|
+
case 'select':
|
|
933
|
+
filter = 'agSetColumnFilter';
|
|
934
|
+
break;
|
|
935
|
+
case 'string':
|
|
936
|
+
filter = 'agTextColumnFilter';
|
|
937
|
+
break;
|
|
938
|
+
case 'date':
|
|
939
|
+
filter = 'agDateColumnFilter';
|
|
940
|
+
break;
|
|
941
|
+
default:
|
|
942
|
+
filter = 'agTextColumnFilter';
|
|
943
|
+
break;
|
|
834
944
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
945
|
+
if (this._filterBoxItems.find((item) => item.field == el.field || item.field == el.searchField)) {
|
|
946
|
+
filter = false;
|
|
947
|
+
}
|
|
948
|
+
if (el.filter != undefined && (el.filter == 'filter-box' || el.filter == 'none')) {
|
|
949
|
+
filter = false;
|
|
950
|
+
}
|
|
951
|
+
if (el.sortable != undefined && !el.sortable) {
|
|
952
|
+
sortable = false;
|
|
953
|
+
}
|
|
954
|
+
if (el.field != this._treeGroupColumn) {
|
|
955
|
+
if (el.type && el.type == 'boolean') {
|
|
956
|
+
this.columnDefs.push({
|
|
957
|
+
colId: el.id ? el.id : el.field,
|
|
958
|
+
field: el.field,
|
|
959
|
+
headerName: el.label,
|
|
960
|
+
filter: filter,
|
|
961
|
+
sortable,
|
|
962
|
+
editable: el.editable,
|
|
963
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
964
|
+
filterParams,
|
|
965
|
+
pinned: el.pinned,
|
|
966
|
+
cellClass: 'ag-boolean-cell',
|
|
967
|
+
cellRenderer: params => {
|
|
968
|
+
if (params.value != null) {
|
|
969
|
+
return params.value ? '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke="green" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17L4 12"/></svg>' : '<svg xmlns="http://www.w3.org/2000/svg" stroke="red" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" /></svg>';
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
return '';
|
|
973
|
+
}
|
|
849
974
|
}
|
|
850
|
-
|
|
851
|
-
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
else if (el.type && el.type == 'enum') {
|
|
978
|
+
this.columnDefs.push({
|
|
979
|
+
colId: el.id ? el.id : el.field,
|
|
980
|
+
field: el.field,
|
|
981
|
+
headerName: el.label,
|
|
982
|
+
filter: filter,
|
|
983
|
+
sortable,
|
|
984
|
+
editable: el.editable,
|
|
985
|
+
pinned: el.pinned,
|
|
986
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
987
|
+
filterParams,
|
|
988
|
+
cellRenderer: params => {
|
|
989
|
+
if (params.value) {
|
|
990
|
+
return this._translate.instant(params.value);
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
return '';
|
|
994
|
+
}
|
|
852
995
|
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
else if (el.type && el.type == 'date') {
|
|
999
|
+
this.columnDefs.push({
|
|
1000
|
+
colId: el.id ? el.id : el.field,
|
|
1001
|
+
field: el.field,
|
|
1002
|
+
headerName: el.label,
|
|
1003
|
+
filter: DateFilter,
|
|
1004
|
+
sortable,
|
|
1005
|
+
editable: el.editable,
|
|
1006
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
1007
|
+
filterParams,
|
|
1008
|
+
pinned: el.pinned,
|
|
1009
|
+
cellRenderer: params => {
|
|
1010
|
+
if (params.value) {
|
|
1011
|
+
return new JDatePipe().transform(params.value);
|
|
1012
|
+
}
|
|
1013
|
+
else {
|
|
1014
|
+
return '';
|
|
1015
|
+
}
|
|
871
1016
|
}
|
|
872
|
-
|
|
873
|
-
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
else if (el.type && el.type == 'time') {
|
|
1020
|
+
this.columnDefs.push({
|
|
1021
|
+
colId: el.id ? el.id : el.field,
|
|
1022
|
+
field: el.field,
|
|
1023
|
+
headerName: el.label,
|
|
1024
|
+
filter: TimeFilter,
|
|
1025
|
+
sortable,
|
|
1026
|
+
editable: el.editable,
|
|
1027
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
1028
|
+
filterParams,
|
|
1029
|
+
pinned: el.pinned,
|
|
1030
|
+
cellRenderer: params => {
|
|
1031
|
+
if (params.value) {
|
|
1032
|
+
return params.value;
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1035
|
+
return '';
|
|
1036
|
+
}
|
|
874
1037
|
}
|
|
875
|
-
}
|
|
876
|
-
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
else if (el.type && el.type == 'date-time') {
|
|
1041
|
+
this.columnDefs.push({
|
|
1042
|
+
colId: el.id ? el.id : el.field,
|
|
1043
|
+
field: el.field,
|
|
1044
|
+
headerName: el.label,
|
|
1045
|
+
filter: DateFilter,
|
|
1046
|
+
sortable,
|
|
1047
|
+
editable: el.editable,
|
|
1048
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
1049
|
+
filterParams,
|
|
1050
|
+
pinned: el.pinned,
|
|
1051
|
+
cellRenderer: params => {
|
|
1052
|
+
if (params.value) {
|
|
1053
|
+
return new JDatePipe().transform(params.value, true);
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
return '';
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
else if (el.type && el.type == 'price') {
|
|
1062
|
+
this.columnDefs.push({
|
|
1063
|
+
colId: el.id ? el.id : el.field,
|
|
1064
|
+
field: el.field,
|
|
1065
|
+
headerName: el.label,
|
|
1066
|
+
filter: filter,
|
|
1067
|
+
sortable,
|
|
1068
|
+
editable: el.editable,
|
|
1069
|
+
minWidth: el.minWidth ? el.minWidth : null,
|
|
1070
|
+
filterParams,
|
|
1071
|
+
pinned: el.pinned,
|
|
1072
|
+
cellRenderer: params => {
|
|
1073
|
+
if (params.value) {
|
|
1074
|
+
return params.value.toLocaleString();
|
|
1075
|
+
}
|
|
1076
|
+
else {
|
|
1077
|
+
return '';
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
else if (el.type && el.type == 'image') {
|
|
1083
|
+
this.columnDefs.push({
|
|
1084
|
+
colId: el.id ? el.id : el.field,
|
|
1085
|
+
field: el.field,
|
|
1086
|
+
headerName: el.label,
|
|
1087
|
+
minWidth: 80,
|
|
1088
|
+
width: 80,
|
|
1089
|
+
filter: 'none',
|
|
1090
|
+
sortable: false,
|
|
1091
|
+
editable: false,
|
|
1092
|
+
filterParams,
|
|
1093
|
+
pinned: el.pinned,
|
|
1094
|
+
cellRenderer: params => {
|
|
1095
|
+
if (params.value) {
|
|
1096
|
+
return `<img class="rounded-full mt-1" width="32" height="32" src="${params.value}"/>`;
|
|
1097
|
+
}
|
|
1098
|
+
else {
|
|
1099
|
+
return '';
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1105
|
+
this.columnDefs.push({
|
|
1106
|
+
colId: el.id ? el.id : el.field,
|
|
1107
|
+
field: el.field,
|
|
1108
|
+
headerName: el.label,
|
|
1109
|
+
filter,
|
|
1110
|
+
sortable,
|
|
1111
|
+
editable: el.editable,
|
|
1112
|
+
filterParams,
|
|
1113
|
+
pinned: el.pinned,
|
|
1114
|
+
minWidth: el.minWidth ? el.minWidth : null
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
877
1117
|
}
|
|
878
1118
|
else {
|
|
879
|
-
this.
|
|
880
|
-
colId: el.id ? el.id : el.field,
|
|
881
|
-
field: el.field,
|
|
882
|
-
headerName: el.label,
|
|
883
|
-
filter,
|
|
884
|
-
sortable,
|
|
885
|
-
editable: el.editable,
|
|
886
|
-
filterParams,
|
|
887
|
-
pinned: el.pinned,
|
|
888
|
-
minWidth: el.minWidth ? el.minWidth : null
|
|
889
|
-
});
|
|
1119
|
+
this.autoGroupColumnDef.field = el.field;
|
|
890
1120
|
}
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1121
|
+
});
|
|
1122
|
+
this._column.filter((el) => el.filter == 'filter-box').forEach((el) => {
|
|
1123
|
+
let items = [];
|
|
1124
|
+
if (el.filterItems != null) {
|
|
1125
|
+
switch (el.type) {
|
|
1126
|
+
case 'enum':
|
|
1127
|
+
Object.keys(el.filterItems).forEach((item) => {
|
|
1128
|
+
items.push({
|
|
1129
|
+
label: this._translate.instant(el.filterItems[item]),
|
|
1130
|
+
value: el.filterItems[item]
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
break;
|
|
1134
|
+
case 'boolean':
|
|
1135
|
+
Object.keys(el.filterItems).forEach((item) => {
|
|
1136
|
+
items.push({
|
|
1137
|
+
label: this._translate.instant("true"),
|
|
1138
|
+
value: true
|
|
1139
|
+
}, {
|
|
1140
|
+
label: this._translate.instant("false"),
|
|
1141
|
+
value: false
|
|
1142
|
+
});
|
|
1143
|
+
});
|
|
1144
|
+
break;
|
|
909
1145
|
}
|
|
910
1146
|
}
|
|
1147
|
+
this._filterBoxItems.push({
|
|
1148
|
+
label: el.label,
|
|
1149
|
+
value: null,
|
|
1150
|
+
items,
|
|
1151
|
+
type: el.type,
|
|
1152
|
+
field: el.field,
|
|
1153
|
+
position: 'filter',
|
|
1154
|
+
nodes: []
|
|
1155
|
+
});
|
|
911
1156
|
});
|
|
1157
|
+
if (this.actionItems.length > 0) {
|
|
1158
|
+
this.columnDefs.push({
|
|
1159
|
+
filter: false,
|
|
1160
|
+
headerName: '',
|
|
1161
|
+
minWidth: this.actionWidth,
|
|
1162
|
+
resizable: true,
|
|
1163
|
+
pinned: true,
|
|
1164
|
+
sortable: false,
|
|
1165
|
+
field: 'actions',
|
|
1166
|
+
cellRenderer: ActionsCellRenderer,
|
|
1167
|
+
cellRendererParams: {
|
|
1168
|
+
onClick: (params) => {
|
|
1169
|
+
this.onAction.emit(params);
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
912
1174
|
}
|
|
1175
|
+
}, 100);
|
|
1176
|
+
}
|
|
1177
|
+
changeDatePickerValue(e, item, index) {
|
|
1178
|
+
if (item.value != null) {
|
|
1179
|
+
item.value[index] = e;
|
|
1180
|
+
}
|
|
1181
|
+
else {
|
|
1182
|
+
item.value = [null, null];
|
|
1183
|
+
item.value[index] = e;
|
|
913
1184
|
}
|
|
914
1185
|
}
|
|
915
1186
|
cellDoubleClicked(e) {
|
|
916
|
-
console.log(e);
|
|
917
1187
|
this.onClicked.emit({ ...e.data, colId: e.column.getColId() });
|
|
918
1188
|
}
|
|
919
1189
|
handleClick(item) {
|
|
920
1190
|
this.onToolbar.emit(item);
|
|
921
1191
|
}
|
|
1192
|
+
saveFilterGrid() {
|
|
1193
|
+
if (this.id == null) {
|
|
1194
|
+
this._toast.show('شناسه ی جدول وارد نشده است', 'error');
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
if (this.gridId == null) {
|
|
1198
|
+
this.isVisibleModal = true;
|
|
1199
|
+
this._cdr.detectChanges();
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
db.gridFilterItems.get(this.gridId).then((res) => {
|
|
1203
|
+
db.gridFilterItems.put({
|
|
1204
|
+
...res,
|
|
1205
|
+
grid: this.gridModel,
|
|
1206
|
+
});
|
|
1207
|
+
this.fetchTemplate();
|
|
1208
|
+
this._toast.show('قالب با موفقیت بروزرسانی شد', 'success');
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
handleCancelModal() {
|
|
1213
|
+
this.isVisibleModal = false;
|
|
1214
|
+
this._cdr.detectChanges();
|
|
1215
|
+
}
|
|
1216
|
+
handleOkModal() {
|
|
1217
|
+
if (this.templateName == null) {
|
|
1218
|
+
this._toast.show('عنوان قالب وارد نشده است', 'error');
|
|
1219
|
+
return;
|
|
1220
|
+
}
|
|
1221
|
+
this.gridId = new Date().getTime().toString();
|
|
1222
|
+
db.gridFilterItems.add({
|
|
1223
|
+
id: this.gridId,
|
|
1224
|
+
grid: this.gridModel,
|
|
1225
|
+
tableId: this.id,
|
|
1226
|
+
title: this.templateName,
|
|
1227
|
+
userName: null
|
|
1228
|
+
});
|
|
1229
|
+
this._toast.show('قالب با موفقیت ذخیره شد', 'success');
|
|
1230
|
+
this.templateName = null;
|
|
1231
|
+
this.isVisibleModal = false;
|
|
1232
|
+
this._cdr.detectChanges();
|
|
1233
|
+
this.fetchTemplate();
|
|
1234
|
+
}
|
|
922
1235
|
refresh(purge = false) {
|
|
923
1236
|
if (this.rowModelType == 'serverSide') {
|
|
924
1237
|
this.gridApi.refreshServerSide({ purge });
|
|
@@ -971,7 +1284,13 @@ class GridComponent {
|
|
|
971
1284
|
});
|
|
972
1285
|
}
|
|
973
1286
|
clearFilter() {
|
|
1287
|
+
this.visibleFilterBox = false;
|
|
1288
|
+
this._filterBoxItems.forEach((el) => {
|
|
1289
|
+
el.value = null;
|
|
1290
|
+
});
|
|
974
1291
|
this.gridApi.setFilterModel(null);
|
|
1292
|
+
this.gridApi.onFilterChanged();
|
|
1293
|
+
this.filterItemsValues = [];
|
|
975
1294
|
this.refresh();
|
|
976
1295
|
}
|
|
977
1296
|
refreshParentNode(id) {
|
|
@@ -982,89 +1301,155 @@ class GridComponent {
|
|
|
982
1301
|
route: route
|
|
983
1302
|
});
|
|
984
1303
|
}
|
|
1304
|
+
filter() {
|
|
1305
|
+
this.handleFilterLabelValue();
|
|
1306
|
+
this.refresh();
|
|
1307
|
+
this.visibleFilterBox = false;
|
|
1308
|
+
}
|
|
1309
|
+
setTemplateFilter(item) {
|
|
1310
|
+
this.clearFilter();
|
|
1311
|
+
setTimeout(() => {
|
|
1312
|
+
item.grid.filter.filters.forEach((el) => {
|
|
1313
|
+
const findEl = this._column.find((item) => item.field == el.field || item.searchField == el.field);
|
|
1314
|
+
if (findEl && this.columnDefs.find((item) => item.field == findEl.field && item.filter)) {
|
|
1315
|
+
this.gridApi.setColumnFilterModel(findEl.field, {
|
|
1316
|
+
type: el.logic,
|
|
1317
|
+
filter: el.value
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
else {
|
|
1321
|
+
const index = this._filterBoxItems.findIndex((item) => item.field == el.field);
|
|
1322
|
+
this._filterBoxItems[index].value = el.value;
|
|
1323
|
+
this._cdr.detectChanges();
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1326
|
+
this.gridId = item.id;
|
|
1327
|
+
this.visibleFilterTemplateBox = false;
|
|
1328
|
+
this._cdr.detectChanges();
|
|
1329
|
+
this.handleFilterLabelValue();
|
|
1330
|
+
this.gridApi.onFilterChanged();
|
|
1331
|
+
this.refresh();
|
|
1332
|
+
}, 100);
|
|
1333
|
+
}
|
|
1334
|
+
handleFilterLabelValue() {
|
|
1335
|
+
this._filterBoxItems.forEach((el) => {
|
|
1336
|
+
const findEl = this.filterItemsValues.find((fi) => fi.field == el.field);
|
|
1337
|
+
if (!findEl) {
|
|
1338
|
+
if (el.value != null) {
|
|
1339
|
+
this.filterItemsValues.push({
|
|
1340
|
+
field: el.field,
|
|
1341
|
+
label: el.label,
|
|
1342
|
+
value: el.value
|
|
1343
|
+
});
|
|
1344
|
+
this._cdr.detectChanges();
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
else {
|
|
1348
|
+
if (el.value == null || el.value == "") {
|
|
1349
|
+
this.filterItemsValues = this.filterItemsValues.filter((fi) => fi.field != el.field);
|
|
1350
|
+
}
|
|
1351
|
+
else {
|
|
1352
|
+
findEl.value = el.value;
|
|
1353
|
+
}
|
|
1354
|
+
this._cdr.detectChanges();
|
|
1355
|
+
}
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
removeFilter(item) {
|
|
1359
|
+
const index = this._filterBoxItems.findIndex((el) => el.field == item.field);
|
|
1360
|
+
if (index >= 0) {
|
|
1361
|
+
this._filterBoxItems[index].value = null;
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
this.gridApi.setColumnFilterModel(item.field, null);
|
|
1365
|
+
this.gridApi.onFilterChanged();
|
|
1366
|
+
}
|
|
1367
|
+
this.filterItemsValues = this.filterItemsValues.filter((el) => el.field != item.field);
|
|
1368
|
+
this._cdr.detectChanges();
|
|
1369
|
+
this.refresh();
|
|
1370
|
+
}
|
|
985
1371
|
createServerSideDatasource() {
|
|
986
1372
|
return {
|
|
987
1373
|
getRows: (params) => {
|
|
988
1374
|
let filter = null;
|
|
1375
|
+
filter = {
|
|
1376
|
+
disable: false,
|
|
1377
|
+
field: null,
|
|
1378
|
+
logic: 'AND',
|
|
1379
|
+
filters: [],
|
|
1380
|
+
ignoreCase: null,
|
|
1381
|
+
operator: null,
|
|
1382
|
+
truncateDate: null,
|
|
1383
|
+
value: null,
|
|
1384
|
+
};
|
|
989
1385
|
if (Object.keys(params.request.filterModel).length > 0) {
|
|
990
|
-
filter = {
|
|
991
|
-
disable: false,
|
|
992
|
-
field: null,
|
|
993
|
-
logic: 'AND',
|
|
994
|
-
filters: [],
|
|
995
|
-
ignoreCase: null,
|
|
996
|
-
operator: null,
|
|
997
|
-
truncateDate: null,
|
|
998
|
-
value: null,
|
|
999
|
-
};
|
|
1000
1386
|
for (const key in params.request.filterModel) {
|
|
1387
|
+
let field = key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key;
|
|
1388
|
+
let value = null;
|
|
1389
|
+
let operator = FilterOperator.equals;
|
|
1390
|
+
let ignoreCase = false;
|
|
1391
|
+
const findEl = this._column.find((el) => el.field == key);
|
|
1392
|
+
if (key == 'ag-Grid-AutoColumn') {
|
|
1393
|
+
field = this._treeGroupColumn;
|
|
1394
|
+
}
|
|
1395
|
+
else {
|
|
1396
|
+
field = key;
|
|
1397
|
+
if (findEl.searchField != null) {
|
|
1398
|
+
field = findEl.searchField;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1001
1401
|
if (params.request.filterModel[key].filterType == 'custom-date') {
|
|
1002
1402
|
if (params.request.filterModel[key].dateFrom && params.request.filterModel[key].dateTo) {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
|
|
1006
|
-
logic: 'AND',
|
|
1007
|
-
filters: null,
|
|
1008
|
-
ignoreCase: false,
|
|
1009
|
-
operator: FilterOperator.between,
|
|
1010
|
-
truncateDate: true,
|
|
1011
|
-
value: [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo]
|
|
1012
|
-
});
|
|
1403
|
+
operator = FilterOperator.between;
|
|
1404
|
+
value = [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo];
|
|
1013
1405
|
}
|
|
1014
1406
|
else if (params.request.filterModel[key].dateFrom) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
|
|
1018
|
-
logic: 'AND',
|
|
1019
|
-
filters: null,
|
|
1020
|
-
ignoreCase: false,
|
|
1021
|
-
operator: FilterOperator.truncGreaterThanEqual,
|
|
1022
|
-
truncateDate: true,
|
|
1023
|
-
value: params.request.filterModel[key].dateFrom,
|
|
1024
|
-
});
|
|
1407
|
+
operator = FilterOperator.truncGreaterThanEqual;
|
|
1408
|
+
value = params.request.filterModel[key].dateFrom;
|
|
1025
1409
|
}
|
|
1026
1410
|
else if (params.request.filterModel[key].dateTo && params.request.filterModel[key].dateTo != "") {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
|
|
1030
|
-
logic: 'AND',
|
|
1031
|
-
filters: null,
|
|
1032
|
-
ignoreCase: false,
|
|
1033
|
-
operator: FilterOperator.truncLessThanOrEqual,
|
|
1034
|
-
truncateDate: true,
|
|
1035
|
-
value: params.request.filterModel[key].dateTo,
|
|
1036
|
-
});
|
|
1411
|
+
operator = FilterOperator.truncLessThanOrEqual;
|
|
1412
|
+
value = params.request.filterModel[key].dateTo;
|
|
1037
1413
|
}
|
|
1038
1414
|
}
|
|
1415
|
+
else if (params.request.filterModel[key].filterType == 'custom-time' && params.request.filterModel[key].time != null) {
|
|
1416
|
+
operator = FilterOperator.equals;
|
|
1417
|
+
value = `${params.request.filterModel[key].time.substr(0, 2)}:${params.request.filterModel[key].time.substr(2, 2)}:${params.request.filterModel[key].time.substr(4, 2)}`;
|
|
1418
|
+
}
|
|
1039
1419
|
else {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
const findEl = this._column.find((el) => el.field == key);
|
|
1043
|
-
let field = null;
|
|
1044
|
-
if (key == 'ag-Grid-AutoColumn') {
|
|
1045
|
-
field = this._treeGroupColumn;
|
|
1046
|
-
}
|
|
1047
|
-
else {
|
|
1048
|
-
field = key;
|
|
1049
|
-
if (findEl.searchField != null) {
|
|
1050
|
-
field = findEl.searchField;
|
|
1051
|
-
}
|
|
1420
|
+
if (FilterOperator[params.request.filterModel[key].type]) {
|
|
1421
|
+
operator = FilterOperator[params.request.filterModel[key].type];
|
|
1052
1422
|
}
|
|
1423
|
+
ignoreCase = true;
|
|
1424
|
+
value = params.request.filterModel[key].filter ? params.request.filterModel[key].filter : params.request.filterModel[key].type;
|
|
1053
1425
|
if (findEl && findEl.type == 'enum') {
|
|
1054
1426
|
ignoreCase = false;
|
|
1055
1427
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
truncateDate: true,
|
|
1064
|
-
value: params.request.filterModel[key].filter ? params.request.filterModel[key].filter : params.request.filterModel[key].type
|
|
1428
|
+
}
|
|
1429
|
+
const findFilterItemsEl = this.filterItemsValues.find((fi) => fi.field == findEl.field);
|
|
1430
|
+
if (!findFilterItemsEl) {
|
|
1431
|
+
this.filterItemsValues.push({
|
|
1432
|
+
field: findEl.field,
|
|
1433
|
+
label: findEl.label,
|
|
1434
|
+
value: value
|
|
1065
1435
|
});
|
|
1066
1436
|
}
|
|
1437
|
+
else {
|
|
1438
|
+
findFilterItemsEl.value = value;
|
|
1439
|
+
}
|
|
1440
|
+
filter.filters.push({
|
|
1441
|
+
disable: false,
|
|
1442
|
+
field,
|
|
1443
|
+
logic: 'AND',
|
|
1444
|
+
filters: null,
|
|
1445
|
+
ignoreCase,
|
|
1446
|
+
operator,
|
|
1447
|
+
truncateDate: true,
|
|
1448
|
+
value
|
|
1449
|
+
});
|
|
1067
1450
|
}
|
|
1451
|
+
this._cdr.detectChanges();
|
|
1452
|
+
// this.filterItemsValues = structuredClone(this.filterItemsValues);
|
|
1068
1453
|
}
|
|
1069
1454
|
let sorts = [];
|
|
1070
1455
|
if (params.request.sortModel.length) {
|
|
@@ -1084,7 +1469,7 @@ class GridComponent {
|
|
|
1084
1469
|
}
|
|
1085
1470
|
const gridFilter = {
|
|
1086
1471
|
take: params.api.paginationGetPageSize(),
|
|
1087
|
-
data:
|
|
1472
|
+
data: {},
|
|
1088
1473
|
filter,
|
|
1089
1474
|
skip: params.api.paginationGetCurrentPage() * params.api.paginationGetPageSize(),
|
|
1090
1475
|
sorts
|
|
@@ -1092,6 +1477,45 @@ class GridComponent {
|
|
|
1092
1477
|
const requestParams = {
|
|
1093
1478
|
parentNode: params.parentNode.data
|
|
1094
1479
|
};
|
|
1480
|
+
this._filterBoxItems.forEach((el) => {
|
|
1481
|
+
if (el.value != null) {
|
|
1482
|
+
if (el.position == 'filter') {
|
|
1483
|
+
let operator = null;
|
|
1484
|
+
switch (el.type) {
|
|
1485
|
+
case 'string':
|
|
1486
|
+
operator = FilterOperator.contains;
|
|
1487
|
+
break;
|
|
1488
|
+
case 'date':
|
|
1489
|
+
case 'date-time':
|
|
1490
|
+
operator = FilterOperator.between;
|
|
1491
|
+
if (el.value[0] == null) {
|
|
1492
|
+
el.value[0] = new Date('1997-01-01').toISOString();
|
|
1493
|
+
}
|
|
1494
|
+
else if (el.value[1] == null) {
|
|
1495
|
+
el.value[1] = new Date().toISOString();
|
|
1496
|
+
}
|
|
1497
|
+
break;
|
|
1498
|
+
default:
|
|
1499
|
+
operator = FilterOperator.equals;
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
gridFilter.filter.filters.push({
|
|
1503
|
+
disable: false,
|
|
1504
|
+
field: el.field,
|
|
1505
|
+
filters: null,
|
|
1506
|
+
ignoreCase: false,
|
|
1507
|
+
logic: 'AND',
|
|
1508
|
+
operator,
|
|
1509
|
+
truncateDate: false,
|
|
1510
|
+
value: el.value
|
|
1511
|
+
});
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
gridFilter.data[el.field] = el.value;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
});
|
|
1518
|
+
this.gridModel = gridFilter;
|
|
1095
1519
|
this.fetchData(gridFilter, requestParams).then(data => {
|
|
1096
1520
|
params.success({
|
|
1097
1521
|
rowData: data.items,
|
|
@@ -1106,14 +1530,23 @@ class GridComponent {
|
|
|
1106
1530
|
}
|
|
1107
1531
|
};
|
|
1108
1532
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: GridComponent, selector: "app-grid", inputs: { actionWidth: "actionWidth", label: "label", isRowSelection: "isRowSelection", rowModelType: "rowModelType", serverSideSort: "serverSideSort", serverSideFilter: "serverSideFilter", isToolbar: "isToolbar", rtl: "rtl", paginationPageSize: "paginationPageSize", paginationPageSizeSelector: "paginationPageSizeSelector", enableAdvancedFilter: "enableAdvancedFilter", treeModel: "treeModel", isLeaf: "isLeaf", rowData: "rowData", autoColumnSize: "autoColumnSize", showAdvancedButton: "showAdvancedButton", actionItems: "actionItems", toolbarItems: "toolbarItems", treeGroupColumn: "treeGroupColumn", fetchData: "fetchData", column: "column" }, outputs: { onAction: "onAction", onToolbar: "onToolbar", onClicked: "onClicked", rowSelectionChange: "rowSelectionChange" }, ngImport: i0, template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div\n class=\"flex justify-between items-center mb-4 pb-4 border-b border-b-slate-200\"\n *ngIf=\"isToolbar\"\n>\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button\n nz-button\n [nzLoading]=\"item.loading ? item.loading : false\"\n (click)=\"handleClick(item)\"\n [nzType]=\"item.type\"\n >\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <button nz-button (click)=\"clearFilter()\" nzType=\"default\">\n <span nz-icon nzType=\"clear\"></span>\n \u067E\u0627\u06A9\u0633\u0627\u0632\u06CC\n </button>\n\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<div>\n <ng-content></ng-content>\n</div>\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 48px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n #grid\n/>\n", dependencies: [{ kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] }); }
|
|
1533
|
+
fetchTemplate() {
|
|
1534
|
+
if (this.id != null) {
|
|
1535
|
+
db.gridFilterItems.filter((el) => el.tableId == this.id).toArray().then((res) => {
|
|
1536
|
+
this.filterTemplateItems = res;
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
ngOnInit() {
|
|
1541
|
+
this.fetchTemplate();
|
|
1542
|
+
}
|
|
1543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, deps: [{ token: i1$3.TranslateService }, { token: i0.ChangeDetectorRef }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1544
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: GridComponent, selector: "app-grid", inputs: { actionWidth: "actionWidth", label: "label", id: "id", isRowSelection: "isRowSelection", rowModelType: "rowModelType", serverSideSort: "serverSideSort", serverSideFilter: "serverSideFilter", isToolbar: "isToolbar", rtl: "rtl", paginationPageSize: "paginationPageSize", paginationPageSizeSelector: "paginationPageSizeSelector", enableAdvancedFilter: "enableAdvancedFilter", treeModel: "treeModel", isLeaf: "isLeaf", rowData: "rowData", autoColumnSize: "autoColumnSize", showAdvancedButton: "showAdvancedButton", actionItems: "actionItems", toolbarItems: "toolbarItems", treeGroupColumn: "treeGroupColumn", filterItems: "filterItems", fetchData: "fetchData", column: "column" }, outputs: { onAction: "onAction", onToolbar: "onToolbar", onClicked: "onClicked", rowSelectionChange: "rowSelectionChange" }, ngImport: i0, template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 pt-4\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch>\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 pt-4 mt-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2 max-h-[300px]\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 124px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n", dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i1.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i1.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: i14.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i14.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i15.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { kind: "directive", type: i16.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "component", type: i17.DatePickerComponent, selector: "qeydar-date-picker", inputs: ["rtl", "mode", "isRange", "customLabels", "calendarType", "lang", "cssClass", "footerDescription", "rangeInputLabels", "inputLabel", "placement", "disabled", "isInline", "showSidebar", "showToday", "valueFormat", "disableInputMask", "disabledDates", "disabledDatesFilter", "disabledTimesFilter", "allowEmpty", "readOnly", "readOnlyInput", "minDate", "maxDate", "format"], outputs: ["onFocus", "onBlur", "onChangeValue", "onOpenChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] }); }
|
|
1112
1545
|
}
|
|
1113
1546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, decorators: [{
|
|
1114
1547
|
type: Component,
|
|
1115
|
-
args: [{ selector: 'app-grid', template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div
|
|
1116
|
-
}], ctorParameters: () => [{ type: i1$
|
|
1548
|
+
args: [{ selector: 'app-grid', template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 pt-4\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch>\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 pt-4 mt-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2 max-h-[300px]\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 124px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n" }]
|
|
1549
|
+
}], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: i0.ChangeDetectorRef }, { type: ToastService }], propDecorators: { onAction: [{
|
|
1117
1550
|
type: Output
|
|
1118
1551
|
}], onToolbar: [{
|
|
1119
1552
|
type: Output
|
|
@@ -1125,6 +1558,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1125
1558
|
type: Input
|
|
1126
1559
|
}], label: [{
|
|
1127
1560
|
type: Input
|
|
1561
|
+
}], id: [{
|
|
1562
|
+
type: Input
|
|
1128
1563
|
}], isRowSelection: [{
|
|
1129
1564
|
type: Input
|
|
1130
1565
|
}], rowModelType: [{
|
|
@@ -1159,6 +1594,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1159
1594
|
type: Input
|
|
1160
1595
|
}], treeGroupColumn: [{
|
|
1161
1596
|
type: Input
|
|
1597
|
+
}], filterItems: [{
|
|
1598
|
+
type: Input
|
|
1162
1599
|
}], fetchData: [{
|
|
1163
1600
|
type: Input
|
|
1164
1601
|
}], column: [{
|
|
@@ -1181,7 +1618,7 @@ class ActionsCellRenderer {
|
|
|
1181
1618
|
this.params.onClick({ data: this.params.data, event: item.code, id: this.params.node.id });
|
|
1182
1619
|
}
|
|
1183
1620
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1184
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ActionsCellRenderer, selector: "app-button-renderer", ngImport: i0, template: "<div class=\"h-full flex gap-2 items-center\">\n <button mat-button class=\"min-w-[30px] min-h-[30px] h-[30px]\" *ngFor=\"let item of items\" nz-tooltip [nzTooltipTitle]=\"item.alt\" nzTooltipPlacement=\"bottom\" (click)=\"handleClick(item)\">\n <div class=\"flex justify-center items-center\">\n <i [class]=\"item.icon\"></i>\n </div>\n </button>\n \n</div>", dependencies: [{ kind: "directive", type:
|
|
1621
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ActionsCellRenderer, selector: "app-button-renderer", ngImport: i0, template: "<div class=\"h-full flex gap-2 items-center\">\n <button mat-button class=\"min-w-[30px] min-h-[30px] h-[30px]\" *ngFor=\"let item of items\" nz-tooltip [nzTooltipTitle]=\"item.alt\" nzTooltipPlacement=\"bottom\" (click)=\"handleClick(item)\">\n <div class=\"flex justify-center items-center\">\n <i [class]=\"item.icon\"></i>\n </div>\n </button>\n \n</div>", dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] }); }
|
|
1185
1622
|
}
|
|
1186
1623
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, decorators: [{
|
|
1187
1624
|
type: Component,
|
|
@@ -1226,7 +1663,7 @@ class CaptchaComponent {
|
|
|
1226
1663
|
this.generateCode();
|
|
1227
1664
|
}
|
|
1228
1665
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1229
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaptchaComponent, selector: "app-captcha", outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "captchaCanvas", first: true, predicate: ["canvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"rounded-xl border border-slate-200 relative\">\n <canvas #canvas class=\"w-full h-[80px]\"></canvas>\n <div class=\"absolute left-2 top-0 bottom-0 m-auto z-10 flex justify-center items-center\">\n <button nz-button nzShape=\"circle\" type=\"button\" (click)=\"generateCode()\">\n <span nz-icon nzType=\"undo\" nzTheme=\"outline\"></span>\n </button>\n </div>\n</div>", dependencies: [{ kind: "directive", type:
|
|
1666
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaptchaComponent, selector: "app-captcha", outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "captchaCanvas", first: true, predicate: ["canvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"rounded-xl border border-slate-200 relative\">\n <canvas #canvas class=\"w-full h-[80px]\"></canvas>\n <div class=\"absolute left-2 top-0 bottom-0 m-auto z-10 flex justify-center items-center\">\n <button nz-button nzShape=\"circle\" type=\"button\" (click)=\"generateCode()\">\n <span nz-icon nzType=\"undo\" nzTheme=\"outline\"></span>\n </button>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] }); }
|
|
1230
1667
|
}
|
|
1231
1668
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, decorators: [{
|
|
1232
1669
|
type: Component,
|
|
@@ -1262,6 +1699,9 @@ class MapComponent {
|
|
|
1262
1699
|
L.tileLayer('https://raster.snappmaps.ir/styles/snapp-style/{z}/{x}/{y}@2x.webp', {
|
|
1263
1700
|
maxZoom: 18,
|
|
1264
1701
|
}).addTo(this.map);
|
|
1702
|
+
L.Draw.Tooltip.prototype.updateContent = function () {
|
|
1703
|
+
return this;
|
|
1704
|
+
};
|
|
1265
1705
|
this.map.addLayer(this.drawnItems);
|
|
1266
1706
|
const drawControl = new L.Control.Draw({
|
|
1267
1707
|
edit: this.editable ? {
|
|
@@ -1319,7 +1759,7 @@ class MapComponent {
|
|
|
1319
1759
|
});
|
|
1320
1760
|
}
|
|
1321
1761
|
clearMap() {
|
|
1322
|
-
this.map
|
|
1762
|
+
this.map?.eachLayer((layer) => {
|
|
1323
1763
|
if (!(layer instanceof L.TileLayer)) {
|
|
1324
1764
|
this.map.removeLayer(layer);
|
|
1325
1765
|
}
|
|
@@ -1374,7 +1814,7 @@ class SpinnerComponent {
|
|
|
1374
1814
|
constructor() { }
|
|
1375
1815
|
ngOnInit() { }
|
|
1376
1816
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1377
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SpinnerComponent, selector: "app-spinner", ngImport: i0, template: "<div class=\"w-full h-full absolute top-0 left-0 flex justify-center items-center bg-white z-10\">\n <nz-spin nzSimple nzSize=\"large\" nzSimple></nz-spin>\n</div>", dependencies: [{ kind: "component", type: i1$
|
|
1817
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SpinnerComponent, selector: "app-spinner", ngImport: i0, template: "<div class=\"w-full h-full absolute top-0 left-0 flex justify-center items-center bg-white z-10\">\n <nz-spin nzSimple nzSize=\"large\" nzSimple></nz-spin>\n</div>", dependencies: [{ kind: "component", type: i1$4.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }] }); }
|
|
1378
1818
|
}
|
|
1379
1819
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
1380
1820
|
type: Component,
|
|
@@ -1431,7 +1871,7 @@ class ImageCropperPopover extends PopoverComponent {
|
|
|
1431
1871
|
ngOnInit() {
|
|
1432
1872
|
}
|
|
1433
1873
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageCropperPopover, deps: [{ token: ToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1434
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImageCropperPopover, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<image-cropper\n [imageFile]=\"data.file\"\n [maintainAspectRatio]=\"true\"\n [aspectRatio]=\"data.aspectRatio\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (loadImageFailed)=\"loadImageFailed()\"\n class=\"max-h-[400px]\"\n></image-cropper>", dependencies: [{ kind: "component", type: i2$
|
|
1874
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImageCropperPopover, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<image-cropper\n [imageFile]=\"data.file\"\n [maintainAspectRatio]=\"true\"\n [aspectRatio]=\"data.aspectRatio\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (loadImageFailed)=\"loadImageFailed()\"\n class=\"max-h-[400px]\"\n></image-cropper>", dependencies: [{ kind: "component", type: i2$3.ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }] }); }
|
|
1435
1875
|
}
|
|
1436
1876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageCropperPopover, decorators: [{
|
|
1437
1877
|
type: Component,
|
|
@@ -1564,7 +2004,6 @@ class UploaderComponent {
|
|
|
1564
2004
|
this.loading = true;
|
|
1565
2005
|
break;
|
|
1566
2006
|
case 'done':
|
|
1567
|
-
debugger;
|
|
1568
2007
|
this.getBase64(this._fileUploaded, (img) => {
|
|
1569
2008
|
this.loading = false;
|
|
1570
2009
|
this.avatarUrl = img;
|
|
@@ -1592,7 +2031,7 @@ class UploaderComponent {
|
|
|
1592
2031
|
}
|
|
1593
2032
|
ngOnInit() { }
|
|
1594
2033
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploaderComponent, deps: [{ token: 'environment' }, { token: ToastService }, { token: i2.HttpClient }, { token: SharedService }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1595
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploaderComponent, selector: "app-uploader", inputs: { maxWithSize: "maxWithSize", cropper: "cropper", aspectRatio: "aspectRatio", isCompress: "isCompress", avatar: "avatar" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "<nz-upload class=\"w-[128px] h-[128px] overflow-hidden\" nzAction=\"{{env.apiUrl}}/file\" nzName=\"file\"\n nzListType=\"picture-card\" [nzShowUploadList]=\"false\" [nzBeforeUpload]=\"beforeUpload\"\n (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n @if (!avatarUrl) {\n <span class=\"upload-icon\" nz-icon [nzType]=\"loading ? 'loading' : 'plus'\"></span>\n <div class=\"ant-upload-text\">Upload</div>\n } @else {\n <img [src]=\"avatarUrl\" class=\"max-w-full max-h-full\" />\n }\n</nz-upload>", dependencies: [{ kind: "directive", type:
|
|
2034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploaderComponent, selector: "app-uploader", inputs: { maxWithSize: "maxWithSize", cropper: "cropper", aspectRatio: "aspectRatio", isCompress: "isCompress", avatar: "avatar" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "<nz-upload class=\"w-[128px] h-[128px] overflow-hidden\" nzAction=\"{{env.apiUrl}}/file\" nzName=\"file\"\n nzListType=\"picture-card\" [nzShowUploadList]=\"false\" [nzBeforeUpload]=\"beforeUpload\"\n (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n @if (!avatarUrl) {\n <span class=\"upload-icon\" nz-icon [nzType]=\"loading ? 'loading' : 'plus'\"></span>\n <div class=\"ant-upload-text\">Upload</div>\n } @else {\n <img [src]=\"avatarUrl\" class=\"max-w-full max-h-full\" />\n }\n</nz-upload>", dependencies: [{ kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "component", type: i6$1.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }] }); }
|
|
1596
2035
|
}
|
|
1597
2036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploaderComponent, decorators: [{
|
|
1598
2037
|
type: Component,
|
|
@@ -1681,7 +2120,7 @@ class UploadFileComponent {
|
|
|
1681
2120
|
}
|
|
1682
2121
|
ngOnInit() { }
|
|
1683
2122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploadFileComponent, deps: [{ token: 'environment' }, { token: ToastService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploadFileComponent, selector: "app-upload-file", inputs: { acceptFileType: "acceptFileType", type: "type" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "@if(type == 'serverSide'){\n <nz-upload nzName=\"file\" nzType=\"drag\"\n [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n} @else {\n <nz-upload nzName=\"file\" nzType=\"drag\" [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChangeClientSide($event)\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n}", dependencies: [{ kind: "directive", type:
|
|
2123
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploadFileComponent, selector: "app-upload-file", inputs: { acceptFileType: "acceptFileType", type: "type" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "@if(type == 'serverSide'){\n <nz-upload nzName=\"file\" nzType=\"drag\"\n [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n} @else {\n <nz-upload nzName=\"file\" nzType=\"drag\" [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChangeClientSide($event)\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n}", dependencies: [{ kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "component", type: i6$1.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }] }); }
|
|
1685
2124
|
}
|
|
1686
2125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploadFileComponent, decorators: [{
|
|
1687
2126
|
type: Component,
|
|
@@ -1723,7 +2162,7 @@ class CharInputDirective {
|
|
|
1723
2162
|
this.renderer.setProperty(this.el.nativeElement, 'value', value);
|
|
1724
2163
|
return value;
|
|
1725
2164
|
}
|
|
1726
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, deps: [{ token: i0.ElementRef }, { token:
|
|
2165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, deps: [{ token: i0.ElementRef }, { token: i4.NgControl }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1727
2166
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: CharInputDirective, selector: "[charInput]", inputs: { allowPersianChar: "allowPersianChar", allowEnglishChar: "allowEnglishChar", allowLocalChar: "allowLocalChar" }, host: { listeners: { "input": "onEvent($event)" } }, ngImport: i0 }); }
|
|
1728
2167
|
}
|
|
1729
2168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, decorators: [{
|
|
@@ -1731,7 +2170,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1731
2170
|
args: [{
|
|
1732
2171
|
selector: '[charInput]',
|
|
1733
2172
|
}]
|
|
1734
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type:
|
|
2173
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i4.NgControl }, { type: i0.Renderer2 }], propDecorators: { allowPersianChar: [{
|
|
1735
2174
|
type: Input
|
|
1736
2175
|
}], allowEnglishChar: [{
|
|
1737
2176
|
type: Input
|
|
@@ -1767,7 +2206,7 @@ class EnglishNumberInputDirective {
|
|
|
1767
2206
|
this.renderer.setProperty(this.el.nativeElement, 'value', value);
|
|
1768
2207
|
return value;
|
|
1769
2208
|
}
|
|
1770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, deps: [{ token: i0.ElementRef }, { token:
|
|
2209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, deps: [{ token: i0.ElementRef }, { token: i4.NgControl }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1771
2210
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EnglishNumberInputDirective, selector: "[englishNumberInput]", host: { listeners: { "input": "onEvent($event)" } }, ngImport: i0 }); }
|
|
1772
2211
|
}
|
|
1773
2212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, decorators: [{
|
|
@@ -1775,7 +2214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1775
2214
|
args: [{
|
|
1776
2215
|
selector: '[englishNumberInput]',
|
|
1777
2216
|
}]
|
|
1778
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type:
|
|
2217
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i4.NgControl }, { type: i0.Renderer2 }], propDecorators: { onEvent: [{
|
|
1779
2218
|
type: HostListener,
|
|
1780
2219
|
args: ['input', ['$event']]
|
|
1781
2220
|
}] } });
|
|
@@ -1796,7 +2235,6 @@ class ImageLoaderDirective {
|
|
|
1796
2235
|
set imageSrc(v) {
|
|
1797
2236
|
if (v != null) {
|
|
1798
2237
|
this._http.getFile(v).then((res) => {
|
|
1799
|
-
debugger;
|
|
1800
2238
|
this.renderer.setAttribute(this.el.nativeElement, 'src', res);
|
|
1801
2239
|
});
|
|
1802
2240
|
}
|
|
@@ -1873,7 +2311,7 @@ class AuthGuard {
|
|
|
1873
2311
|
this._router.navigate(['/auth']);
|
|
1874
2312
|
return false;
|
|
1875
2313
|
}
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, deps: [{ token: i1$
|
|
2314
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, deps: [{ token: i1$5.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1877
2315
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
|
|
1878
2316
|
}
|
|
1879
2317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, decorators: [{
|
|
@@ -1881,7 +2319,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1881
2319
|
args: [{
|
|
1882
2320
|
providedIn: 'root'
|
|
1883
2321
|
}]
|
|
1884
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2322
|
+
}], ctorParameters: () => [{ type: i1$5.Router }] });
|
|
1885
2323
|
|
|
1886
2324
|
class MasterLayout {
|
|
1887
2325
|
constructor(_service, _confirm, componentFactoryResolver) {
|
|
@@ -1890,6 +2328,7 @@ class MasterLayout {
|
|
|
1890
2328
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1891
2329
|
this.isCollapsed = false;
|
|
1892
2330
|
this.menuItems = [];
|
|
2331
|
+
this.userName = null;
|
|
1893
2332
|
}
|
|
1894
2333
|
logout() {
|
|
1895
2334
|
this._confirm.confirm(() => {
|
|
@@ -1903,6 +2342,14 @@ class MasterLayout {
|
|
|
1903
2342
|
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
|
|
1904
2343
|
this.container.createComponent(componentFactory);
|
|
1905
2344
|
}
|
|
2345
|
+
tokenInfo(token) {
|
|
2346
|
+
var base64Url = token.split('.')[1];
|
|
2347
|
+
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
2348
|
+
var jsonPayload = decodeURIComponent(window.atob(base64).split('').map(function (c) {
|
|
2349
|
+
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
2350
|
+
}).join(''));
|
|
2351
|
+
return JSON.parse(jsonPayload);
|
|
2352
|
+
}
|
|
1906
2353
|
ngAfterViewInit() {
|
|
1907
2354
|
setTimeout(() => {
|
|
1908
2355
|
// this.loadComponent(this._ac.);
|
|
@@ -1910,13 +2357,16 @@ class MasterLayout {
|
|
|
1910
2357
|
}
|
|
1911
2358
|
ngOnInit() {
|
|
1912
2359
|
this.menuItems = this._service.menuItems;
|
|
2360
|
+
if (localStorage.getItem('userInfo')) {
|
|
2361
|
+
this.userName = this.tokenInfo(JSON.parse(localStorage.getItem('userInfo')).access_token).username;
|
|
2362
|
+
}
|
|
1913
2363
|
}
|
|
1914
2364
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MasterLayout, deps: [{ token: SharedService }, { token: ConfirmService }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1915
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MasterLayout, selector: "ng-component", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\"
|
|
2365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MasterLayout, selector: "ng-component", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\" [(nzCollapsed)]=\"isCollapsed\" [nzTrigger]=\"null\">\n <div class=\"py-2 px-4 border-b border-b-slate-200 h-16 flex items-center gap-4\">\n <div class=\"size-10 rounded-full bg-slate-200\"></div>\n <div>\n <h5 class=\"text-sm text-slate-800 font-semibold\">{{userName}}</h5>\n <span class=\"text-sm text-slate-600\">\u0628\u0647 \u067E\u0646\u0644 \u0645\u062F\u06CC\u0631\u06CC\u062A \u062E\u0648\u0634 \u0622\u0645\u062F\u06CC\u062F \uD83D\uDC4B</span>\n </div>\n <!-- <div class=\"flex justify-center items-center border-b !border-b-slate-200 pb-4\"></div> -->\n </div>\n <ul nz-menu nzMode=\"inline\" [nzInlineCollapsed]=\"isCollapsed\" class=\"h-[calc(100%-64px)] overflow-y-auto overflow-x-hidden\">\n @for (item of menuItems; track item.title) { @if(item.children){\n <li nz-submenu [nzTitle]=\"item.title\" [nzIcon]=\"item.icon\">\n <ul nz-menu-group>\n @for (subitem of item.children; track subitem.title) {\n <li nz-menu-item [routerLink]=\"subitem.path\">{{ subitem.title }}</li>\n }\n </ul>\n </li>\n } @else{\n <li nz-menu-item [routerLink]=\"item.path\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n <span>{{ item.title }}</span>\n </li>\n } }\n </ul>\n </nz-sider>\n <nz-layout>\n <nz-header>\n <div class=\"app-header p-4 flex justify-between items-center\">\n <div class=\"flex items-center gap-1\">\n <button nz-button nzType=\"text\" (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"text-2xl\" nz-icon nzType=\"menu\"></span>\n </button>\n <img width=\"100\" src=\"assets/images/logo.svg\" alt=\"\" />\n </div>\n <div class=\"flex gap-2\">\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"global\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"user\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"bell\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\" (click)=\"logout()\"><span nz-icon nzType=\"poweroff\"></span></button>\n </div>\n </div>\n </nz-header>\n <nz-content>\n <!-- <nz-tabset nzType=\"editable-card\">\n <nz-tab nzClosable nzTitle=\"\u062F\u0631\u062E\u062A \u0633\u0631\u0648\u06CC\u0633\">\n <div class=\"inner-content rounded-md overflow-auto\">\n <div #dynamicComponentContainer></div>\n </div>\n </nz-tab>\n </nz-tabset> -->\n <div class=\"inner-content rounded-xl overflow-auto p-0 border border-slate-200\">\n <router-outlet></router-outlet>\n </div>\n </nz-content>\n </nz-layout>\n</nz-layout>\n", styles: [":host{display:flex;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.app-layout{height:100vh}.menu-sidebar{position:relative;z-index:10;min-height:100vh;box-shadow:2px 0 6px #00152959}.header-trigger{height:64px;padding:20px 24px;font-size:20px;cursor:pointer;transition:all .3s,padding 0s}.trigger:hover{color:#1890ff}.sidebar-logo{position:relative;height:64px;padding-left:24px;overflow:hidden;line-height:64px;background:#001529;transition:all .3s}.sidebar-logo img{display:inline-block;height:32px;width:32px;vertical-align:middle}.sidebar-logo h1{display:inline-block;margin:0 0 0 20px;color:#fff;font-weight:600;font-size:14px;font-family:Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;vertical-align:middle}nz-header{padding:0;width:100%;z-index:2}.app-header{position:relative;height:64px;padding:0;background:#fff;box-shadow:0 1px 4px #00152914}nz-content{margin:24px}.inner-content{padding:24px;background:#fff;height:100%}\n"], dependencies: [{ kind: "directive", type: i1$5.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4$2.NzLayoutComponent, selector: "nz-layout", exportAs: ["nzLayout"] }, { kind: "component", type: i4$2.NzHeaderComponent, selector: "nz-header", exportAs: ["nzHeader"] }, { kind: "component", type: i4$2.NzContentComponent, selector: "nz-content", exportAs: ["nzContent"] }, { kind: "component", type: i4$2.NzSiderComponent, selector: "nz-sider", inputs: ["nzWidth", "nzTheme", "nzCollapsedWidth", "nzBreakpoint", "nzZeroTrigger", "nzTrigger", "nzReverseArrow", "nzCollapsible", "nzCollapsed"], outputs: ["nzCollapsedChange"], exportAs: ["nzSider"] }, { kind: "directive", type: i5$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i5$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i5$2.NzSubMenuComponent, selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "component", type: i5$2.NzMenuGroupComponent, selector: "[nz-menu-group]", inputs: ["nzTitle"], exportAs: ["nzMenuGroup"] }, { kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }] }); }
|
|
1916
2366
|
}
|
|
1917
2367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MasterLayout, decorators: [{
|
|
1918
2368
|
type: Component,
|
|
1919
|
-
args: [{ template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\"
|
|
2369
|
+
args: [{ template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\" [(nzCollapsed)]=\"isCollapsed\" [nzTrigger]=\"null\">\n <div class=\"py-2 px-4 border-b border-b-slate-200 h-16 flex items-center gap-4\">\n <div class=\"size-10 rounded-full bg-slate-200\"></div>\n <div>\n <h5 class=\"text-sm text-slate-800 font-semibold\">{{userName}}</h5>\n <span class=\"text-sm text-slate-600\">\u0628\u0647 \u067E\u0646\u0644 \u0645\u062F\u06CC\u0631\u06CC\u062A \u062E\u0648\u0634 \u0622\u0645\u062F\u06CC\u062F \uD83D\uDC4B</span>\n </div>\n <!-- <div class=\"flex justify-center items-center border-b !border-b-slate-200 pb-4\"></div> -->\n </div>\n <ul nz-menu nzMode=\"inline\" [nzInlineCollapsed]=\"isCollapsed\" class=\"h-[calc(100%-64px)] overflow-y-auto overflow-x-hidden\">\n @for (item of menuItems; track item.title) { @if(item.children){\n <li nz-submenu [nzTitle]=\"item.title\" [nzIcon]=\"item.icon\">\n <ul nz-menu-group>\n @for (subitem of item.children; track subitem.title) {\n <li nz-menu-item [routerLink]=\"subitem.path\">{{ subitem.title }}</li>\n }\n </ul>\n </li>\n } @else{\n <li nz-menu-item [routerLink]=\"item.path\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n <span>{{ item.title }}</span>\n </li>\n } }\n </ul>\n </nz-sider>\n <nz-layout>\n <nz-header>\n <div class=\"app-header p-4 flex justify-between items-center\">\n <div class=\"flex items-center gap-1\">\n <button nz-button nzType=\"text\" (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"text-2xl\" nz-icon nzType=\"menu\"></span>\n </button>\n <img width=\"100\" src=\"assets/images/logo.svg\" alt=\"\" />\n </div>\n <div class=\"flex gap-2\">\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"global\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"user\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon nzType=\"bell\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\" (click)=\"logout()\"><span nz-icon nzType=\"poweroff\"></span></button>\n </div>\n </div>\n </nz-header>\n <nz-content>\n <!-- <nz-tabset nzType=\"editable-card\">\n <nz-tab nzClosable nzTitle=\"\u062F\u0631\u062E\u062A \u0633\u0631\u0648\u06CC\u0633\">\n <div class=\"inner-content rounded-md overflow-auto\">\n <div #dynamicComponentContainer></div>\n </div>\n </nz-tab>\n </nz-tabset> -->\n <div class=\"inner-content rounded-xl overflow-auto p-0 border border-slate-200\">\n <router-outlet></router-outlet>\n </div>\n </nz-content>\n </nz-layout>\n</nz-layout>\n", styles: [":host{display:flex;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.app-layout{height:100vh}.menu-sidebar{position:relative;z-index:10;min-height:100vh;box-shadow:2px 0 6px #00152959}.header-trigger{height:64px;padding:20px 24px;font-size:20px;cursor:pointer;transition:all .3s,padding 0s}.trigger:hover{color:#1890ff}.sidebar-logo{position:relative;height:64px;padding-left:24px;overflow:hidden;line-height:64px;background:#001529;transition:all .3s}.sidebar-logo img{display:inline-block;height:32px;width:32px;vertical-align:middle}.sidebar-logo h1{display:inline-block;margin:0 0 0 20px;color:#fff;font-weight:600;font-size:14px;font-family:Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;vertical-align:middle}nz-header{padding:0;width:100%;z-index:2}.app-header{position:relative;height:64px;padding:0;background:#fff;box-shadow:0 1px 4px #00152914}nz-content{margin:24px}.inner-content{padding:24px;background:#fff;height:100%}\n"] }]
|
|
1920
2370
|
}], ctorParameters: () => [{ type: SharedService }, { type: ConfirmService }, { type: i0.ComponentFactoryResolver }], propDecorators: { container: [{
|
|
1921
2371
|
type: ViewChild,
|
|
1922
2372
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
@@ -1926,7 +2376,7 @@ class BlankLayout {
|
|
|
1926
2376
|
constructor() { }
|
|
1927
2377
|
ngOnInit() { }
|
|
1928
2378
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1929
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BlankLayout, selector: "ng-component", ngImport: i0, template: "<div class=\"w-full h-full\">\n <router-outlet></router-outlet>\n</div>", dependencies: [{ kind: "directive", type: i1$
|
|
2379
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BlankLayout, selector: "ng-component", ngImport: i0, template: "<div class=\"w-full h-full\">\n <router-outlet></router-outlet>\n</div>", dependencies: [{ kind: "directive", type: i1$5.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
1930
2380
|
}
|
|
1931
2381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, decorators: [{
|
|
1932
2382
|
type: Component,
|
|
@@ -2079,7 +2529,8 @@ const Components = [
|
|
|
2079
2529
|
SpinnerComponent,
|
|
2080
2530
|
UploaderComponent,
|
|
2081
2531
|
UploadFileComponent,
|
|
2082
|
-
DateFilter
|
|
2532
|
+
DateFilter,
|
|
2533
|
+
TimeFilter
|
|
2083
2534
|
];
|
|
2084
2535
|
const Popover = [
|
|
2085
2536
|
ImageCropperPopover
|
|
@@ -2122,9 +2573,13 @@ const Modules = [
|
|
|
2122
2573
|
FormsModule,
|
|
2123
2574
|
NzInputModule,
|
|
2124
2575
|
NzFormModule,
|
|
2576
|
+
NzSelectModule,
|
|
2125
2577
|
NzUploadModule,
|
|
2126
2578
|
NzCollapseModule,
|
|
2579
|
+
NzTreeSelectModule,
|
|
2127
2580
|
ImageCropperComponent,
|
|
2581
|
+
NzPopoverModule,
|
|
2582
|
+
QeydarDatePickerModule,
|
|
2128
2583
|
TranslateModule.forRoot({
|
|
2129
2584
|
defaultLanguage: 'fa',
|
|
2130
2585
|
useDefaultLang: true,
|
|
@@ -2145,7 +2600,8 @@ class SharedModule {
|
|
|
2145
2600
|
SpinnerComponent,
|
|
2146
2601
|
UploaderComponent,
|
|
2147
2602
|
UploadFileComponent,
|
|
2148
|
-
DateFilter,
|
|
2603
|
+
DateFilter,
|
|
2604
|
+
TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
|
|
2149
2605
|
CharInputDirective,
|
|
2150
2606
|
MaskDirective,
|
|
2151
2607
|
ImageLoaderDirective,
|
|
@@ -2167,9 +2623,13 @@ class SharedModule {
|
|
|
2167
2623
|
FormsModule,
|
|
2168
2624
|
NzInputModule,
|
|
2169
2625
|
NzFormModule,
|
|
2626
|
+
NzSelectModule,
|
|
2170
2627
|
NzUploadModule,
|
|
2171
2628
|
NzCollapseModule,
|
|
2172
|
-
|
|
2629
|
+
NzTreeSelectModule,
|
|
2630
|
+
ImageCropperComponent,
|
|
2631
|
+
NzPopoverModule,
|
|
2632
|
+
QeydarDatePickerModule, i1$3.TranslateModule], exports: [MasterLayout,
|
|
2173
2633
|
BlankLayout, GridComponent,
|
|
2174
2634
|
ActionsCellRenderer,
|
|
2175
2635
|
CaptchaComponent,
|
|
@@ -2177,7 +2637,8 @@ class SharedModule {
|
|
|
2177
2637
|
SpinnerComponent,
|
|
2178
2638
|
UploaderComponent,
|
|
2179
2639
|
UploadFileComponent,
|
|
2180
|
-
DateFilter,
|
|
2640
|
+
DateFilter,
|
|
2641
|
+
TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
|
|
2181
2642
|
CharInputDirective,
|
|
2182
2643
|
MaskDirective,
|
|
2183
2644
|
ImageLoaderDirective,
|
|
@@ -2258,5 +2719,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2258
2719
|
* Generated bundle index. Do not edit.
|
|
2259
2720
|
*/
|
|
2260
2721
|
|
|
2261
|
-
export { ActionsCellRenderer, AuthGuard, BlankLayout, CaptchaComponent, CharInputDirective, ConfirmService, ContentType, DateFilter, DialogService, EnglishNumberInputDirective, FilterOperator, FormService, GridComponent, HttpLoaderFactory, ImageCropperPopover, ImageLoaderDirective, JDatePipe, MapComponent, MaskDirective, MasterLayout, PieChart, PopoverComponent, SelectModel, SharedModule, SharedService, SpinnerComponent, TimerPipe, ToastService, UploadFileComponent, UploaderComponent, VideoLoaderDirective, initializeApp };
|
|
2722
|
+
export { ActionsCellRenderer, AuthGuard, BlankLayout, CaptchaComponent, CharInputDirective, ConfirmService, ContentType, DateFilter, DialogService, EnglishNumberInputDirective, FilterOperator, FormService, GridComponent, HttpLoaderFactory, ImageCropperPopover, ImageLoaderDirective, JDatePipe, MapComponent, MaskDirective, MasterLayout, PieChart, PopoverComponent, SelectModel, SharedModule, SharedService, SpinnerComponent, TimeFilter, TimerPipe, ToastService, UploadFileComponent, UploaderComponent, VideoLoaderDirective, initializeApp };
|
|
2262
2723
|
//# sourceMappingURL=fixa-admin.mjs.map
|