fixa-admin 0.0.52 → 0.0.54

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.
@@ -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 i3$1 from '@ag-grid-community/angular';
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 i2$2 from '@angular/common';
21
+ import * as i3$1 from '@angular/common';
22
22
  import { CommonModule } from '@angular/common';
23
- import * as i1$3 from '@angular/forms';
23
+ import * as i4 from '@angular/forms';
24
24
  import { NgControl, FormsModule } from '@angular/forms';
25
- import * as i1$6 from '@angular/router';
25
+ import * as i1$5 from '@angular/router';
26
26
  import { RouterModule } from '@angular/router';
27
- import * as i1$4 from '@ngx-translate/core';
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 i4 from 'ng-zorro-antd/icon';
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$1 from 'ng-zorro-antd/layout';
38
+ import * as i4$2 from 'ng-zorro-antd/layout';
39
39
  import { NzLayoutModule } from 'ng-zorro-antd/layout';
40
- import * as i5$1 from 'ng-zorro-antd/menu';
40
+ import * as i5$2 from 'ng-zorro-antd/menu';
41
41
  import { NzMenuModule } from 'ng-zorro-antd/menu';
42
- import * as i1$5 from 'ng-zorro-antd/spin';
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$3 from 'ng-zorro-antd/tooltip';
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$4 from 'ngx-image-cropper';
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';
@@ -117,15 +126,16 @@ class SharedService {
117
126
  responseType: 'arraybuffer'
118
127
  }).subscribe({
119
128
  next: (value) => {
129
+ let blobUrl = null;
120
130
  if (type == ContentType.IMAGE) {
121
131
  const blob = new Blob([value], { type: 'image/jpeg' });
122
- const url = URL.createObjectURL(blob);
132
+ blobUrl = URL.createObjectURL(blob);
123
133
  }
124
134
  else {
125
135
  const blob = new Blob([value], { type: 'video/mp4' });
126
- const url = URL.createObjectURL(blob);
136
+ blobUrl = URL.createObjectURL(blob);
127
137
  }
128
- resolve(url);
138
+ resolve(blobUrl);
129
139
  },
130
140
  });
131
141
  });
@@ -415,6 +425,9 @@ class DateFilter {
415
425
  this.params = params;
416
426
  }
417
427
  isFilterActive() {
428
+ if ((this.dateFrom == "" && this.dateTo == "") || (this.dateFrom == null && this.dateTo == null)) {
429
+ return false;
430
+ }
418
431
  return true;
419
432
  }
420
433
  doesFilterPass(params) {
@@ -429,6 +442,9 @@ class DateFilter {
429
442
  passed = false;
430
443
  }
431
444
  });
445
+ if (this.dateFrom == "" && this.dateTo == "") {
446
+ passed = false;
447
+ }
432
448
  return passed;
433
449
  }
434
450
  getModel() {
@@ -485,7 +501,7 @@ class DateFilter {
485
501
  <button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
486
502
  </div>
487
503
  </div>
488
- `, 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: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.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"] }] }); }
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"] }] }); }
489
505
  }
490
506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFilter, decorators: [{
491
507
  type: Component,
@@ -517,6 +533,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
517
533
  args: ['eFilterText']
518
534
  }] } });
519
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
+
520
630
  class JDatePipe {
521
631
  transform(value, time = false, format = 'YYYY/MM/DD') {
522
632
  if (value != null) {
@@ -539,9 +649,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
539
649
  args: [{ name: 'jdate' }]
540
650
  }] });
541
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
+
542
663
  class GridComponent {
543
- constructor(_translate) {
664
+ constructor(_translate, _cdr, _toast) {
544
665
  this._translate = _translate;
666
+ this._cdr = _cdr;
667
+ this._toast = _toast;
545
668
  this.getServerSideGroupKey = null;
546
669
  this.groupDefaultExpanded = -1;
547
670
  this._treeGroupColumn = null;
@@ -551,7 +674,16 @@ class GridComponent {
551
674
  };
552
675
  this.themeClass = "ag-theme-quartz";
553
676
  this.columnDefs = [];
677
+ this.visibleFilterBox = false;
554
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;
555
687
  this._autoColumnSize = { type: 'fitGridWidth' };
556
688
  this.autoGroupColumnDef = {
557
689
  headerName: "",
@@ -578,6 +710,7 @@ class GridComponent {
578
710
  this.rowSelectionChange = new EventEmitter();
579
711
  this.actionWidth = 100;
580
712
  this.label = null;
713
+ this.id = null;
581
714
  this.rowModelType = 'serverSide';
582
715
  this.serverSideSort = true;
583
716
  this.serverSideFilter = true;
@@ -618,6 +751,12 @@ class GridComponent {
618
751
  ];
619
752
  this.datasource = this.createServerSideDatasource();
620
753
  }
754
+ getRowClass(params) {
755
+ if (params.node.rowIndex % 2 !== 0) {
756
+ return 'row-odd';
757
+ }
758
+ return '';
759
+ }
621
760
  set isRowSelection(v) {
622
761
  if (v) {
623
762
  this._rowSelection = {
@@ -675,249 +814,420 @@ class GridComponent {
675
814
  // this.autoGroupColumnDef.headerName = v;
676
815
  }
677
816
  }
678
- get column() {
679
- return this.column;
680
- }
681
- set column(v) {
682
- this.columnDefs = [];
683
- if (v != null) {
684
- this._column = v;
817
+ set filterItems(v) {
818
+ if (v != null && v.length > 0) {
685
819
  v.forEach((el) => {
686
- var filter = 'agTextColumnFilter';
687
- var sortable = true;
688
- var filterParams = {
689
- maxNumConditions: 1
690
- };
691
- switch (el.type) {
692
- case 'boolean':
693
- filter = 'agNumberColumnFilter';
694
- filterParams.filterOptions = [
695
- "empty",
696
- {
697
- displayKey: 'true',
698
- displayName: this._translate.instant('YES'),
699
- predicate: () => true,
700
- numberOfInputs: 0
701
- },
702
- {
703
- displayKey: 'false',
704
- displayName: this._translate.instant('NO'),
705
- predicate: () => true,
706
- 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);
707
835
  }
708
- ];
709
- break;
710
- case 'enum':
711
- filter = 'agNumberColumnFilter';
712
- const items = [];
713
- for (const property in el.filterItems) {
714
- items.push({
715
- displayKey: el.filterItems[property],
716
- displayName: this._translate.instant(el.filterItems[property]),
717
- predicate: true,
718
- 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
+ nodes
719
843
  });
720
- }
721
- filterParams.filterOptions = [
722
- "empty",
723
- ...items
724
- ];
725
- break;
726
- case 'number':
727
- filter = 'agNumberColumnFilter';
728
- break;
729
- case 'select':
730
- filter = 'agSetColumnFilter';
731
- break;
732
- case 'string':
733
- filter = 'agTextColumnFilter';
734
- break;
735
- case 'date':
736
- filter = 'agDateColumnFilter';
737
- break;
738
- default:
739
- filter = 'agTextColumnFilter';
740
- break;
741
- }
742
- if (el.filter != undefined && !el.filter) {
743
- filter = false;
744
- }
745
- if (el.sortable != undefined && !el.sortable) {
746
- sortable = false;
747
- }
748
- if (el.field != this._treeGroupColumn) {
749
- if (el.type && el.type == 'boolean') {
750
- this.columnDefs.push({
751
- colId: el.id ? el.id : el.field,
752
- field: el.field,
753
- headerName: el.label,
754
- filter: filter,
755
- sortable,
756
- editable: el.editable,
757
- minWidth: el.minWidth ? el.minWidth : null,
758
- filterParams,
759
- pinned: el.pinned,
760
- cellClass: 'ag-boolean-cell',
761
- cellRenderer: params => {
762
- if (params.value != null) {
763
- 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>';
764
- }
765
- else {
766
- return '';
767
- }
768
- }
769
844
  });
770
845
  }
771
- else if (el.type && el.type == 'enum') {
772
- this.columnDefs.push({
773
- colId: el.id ? el.id : el.field,
846
+ else if (el.type == 'boolean') {
847
+ items.push({
848
+ label: this._translate.instant("true"),
849
+ value: true
850
+ }, {
851
+ label: this._translate.instant("false"),
852
+ value: false
853
+ });
854
+ this._filterBoxItems.push({
774
855
  field: el.field,
775
- headerName: el.label,
776
- filter: filter,
777
- sortable,
778
- editable: el.editable,
779
- pinned: el.pinned,
780
- minWidth: el.minWidth ? el.minWidth : null,
781
- filterParams,
782
- cellRenderer: params => {
783
- if (params.value) {
784
- return this._translate.instant(params.value);
785
- }
786
- else {
787
- return '';
788
- }
789
- }
856
+ label: el.label,
857
+ value: null,
858
+ items,
859
+ type: el.type,
860
+ nodes: []
790
861
  });
791
862
  }
792
- else if (el.type && el.type == 'date') {
793
- this.columnDefs.push({
794
- colId: el.id ? el.id : el.field,
863
+ else {
864
+ this._filterBoxItems.push({
795
865
  field: el.field,
796
- headerName: el.label,
797
- filter: DateFilter,
798
- sortable,
799
- editable: el.editable,
800
- minWidth: el.minWidth ? el.minWidth : null,
801
- filterParams,
802
- pinned: el.pinned,
803
- cellRenderer: params => {
804
- if (params.value) {
805
- return new JDatePipe().transform(params.value);
806
- }
807
- else {
808
- return '';
809
- }
810
- }
866
+ label: el.label,
867
+ value: null,
868
+ items,
869
+ type: el.type,
870
+ nodes: []
811
871
  });
812
872
  }
813
- else if (el.type && el.type == 'date-time') {
814
- this.columnDefs.push({
815
- colId: el.id ? el.id : el.field,
816
- field: el.field,
817
- headerName: el.label,
818
- filter: DateFilter,
819
- sortable,
820
- editable: el.editable,
821
- minWidth: el.minWidth ? el.minWidth : null,
822
- filterParams,
823
- pinned: el.pinned,
824
- cellRenderer: params => {
825
- if (params.value) {
826
- return new JDatePipe().transform(params.value, true);
827
- }
828
- else {
829
- return '';
873
+ }
874
+ });
875
+ }
876
+ }
877
+ get column() {
878
+ return this.column;
879
+ }
880
+ set column(v) {
881
+ setTimeout(() => {
882
+ this.columnDefs = [];
883
+ if (v != null) {
884
+ this._column = v;
885
+ v.forEach((el) => {
886
+ var filter = 'agTextColumnFilter';
887
+ var sortable = true;
888
+ var filterParams = {
889
+ maxNumConditions: 1
890
+ };
891
+ switch (el.type) {
892
+ case 'boolean':
893
+ filter = 'agNumberColumnFilter';
894
+ filterParams.filterOptions = [
895
+ "empty",
896
+ {
897
+ displayKey: 'true',
898
+ displayName: this._translate.instant('YES'),
899
+ predicate: () => true,
900
+ numberOfInputs: 0
901
+ },
902
+ {
903
+ displayKey: 'false',
904
+ displayName: this._translate.instant('NO'),
905
+ predicate: () => true,
906
+ numberOfInputs: 0
830
907
  }
908
+ ];
909
+ break;
910
+ case 'enum':
911
+ filter = 'agNumberColumnFilter';
912
+ const items = [];
913
+ for (const property in el.filterItems) {
914
+ items.push({
915
+ displayKey: el.filterItems[property],
916
+ displayName: this._translate.instant(el.filterItems[property]),
917
+ predicate: true,
918
+ numberOfInputs: 0
919
+ });
831
920
  }
832
- });
921
+ filterParams.filterOptions = [
922
+ "empty",
923
+ ...items
924
+ ];
925
+ break;
926
+ case 'number':
927
+ filter = 'agNumberColumnFilter';
928
+ break;
929
+ case 'select':
930
+ filter = 'agSetColumnFilter';
931
+ break;
932
+ case 'string':
933
+ filter = 'agTextColumnFilter';
934
+ break;
935
+ case 'date':
936
+ filter = 'agDateColumnFilter';
937
+ break;
938
+ default:
939
+ filter = 'agTextColumnFilter';
940
+ break;
833
941
  }
834
- else if (el.type && el.type == 'price') {
835
- this.columnDefs.push({
836
- colId: el.id ? el.id : el.field,
837
- field: el.field,
838
- headerName: el.label,
839
- filter: filter,
840
- sortable,
841
- editable: el.editable,
842
- minWidth: el.minWidth ? el.minWidth : null,
843
- filterParams,
844
- pinned: el.pinned,
845
- cellRenderer: params => {
846
- if (params.value) {
847
- return params.value.toLocaleString();
942
+ if (this._filterBoxItems.find((item) => item.field == el.field || item.field == el.searchField)) {
943
+ filter = false;
944
+ }
945
+ if (el.filter != undefined && (el.filter == 'filter-box' || el.filter == 'none')) {
946
+ filter = false;
947
+ }
948
+ if (el.sortable != undefined && !el.sortable) {
949
+ sortable = false;
950
+ }
951
+ if (el.field != this._treeGroupColumn) {
952
+ if (el.type && el.type == 'boolean') {
953
+ this.columnDefs.push({
954
+ colId: el.id ? el.id : el.field,
955
+ field: el.field,
956
+ headerName: el.label,
957
+ filter: filter,
958
+ sortable,
959
+ editable: el.editable,
960
+ minWidth: el.minWidth ? el.minWidth : null,
961
+ filterParams,
962
+ pinned: el.pinned,
963
+ cellClass: 'ag-boolean-cell',
964
+ cellRenderer: params => {
965
+ if (params.value != null) {
966
+ 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>';
967
+ }
968
+ else {
969
+ return '';
970
+ }
848
971
  }
849
- else {
850
- return '';
972
+ });
973
+ }
974
+ else if (el.type && el.type == 'enum') {
975
+ this.columnDefs.push({
976
+ colId: el.id ? el.id : el.field,
977
+ field: el.field,
978
+ headerName: el.label,
979
+ filter: filter,
980
+ sortable,
981
+ editable: el.editable,
982
+ pinned: el.pinned,
983
+ minWidth: el.minWidth ? el.minWidth : null,
984
+ filterParams,
985
+ cellRenderer: params => {
986
+ if (params.value) {
987
+ return this._translate.instant(params.value);
988
+ }
989
+ else {
990
+ return '';
991
+ }
851
992
  }
852
- }
853
- });
854
- }
855
- else if (el.type && el.type == 'image') {
856
- this.columnDefs.push({
857
- colId: el.id ? el.id : el.field,
858
- field: el.field,
859
- headerName: el.label,
860
- minWidth: 80,
861
- width: 80,
862
- filter: false,
863
- sortable: false,
864
- editable: false,
865
- filterParams,
866
- pinned: el.pinned,
867
- cellRenderer: params => {
868
- if (params.value) {
869
- return `<img class="rounded-full mt-1" width="32" height="32" src="${params.value}"/>`;
993
+ });
994
+ }
995
+ else if (el.type && el.type == 'date') {
996
+ this.columnDefs.push({
997
+ colId: el.id ? el.id : el.field,
998
+ field: el.field,
999
+ headerName: el.label,
1000
+ filter: DateFilter,
1001
+ sortable,
1002
+ editable: el.editable,
1003
+ minWidth: el.minWidth ? el.minWidth : null,
1004
+ filterParams,
1005
+ pinned: el.pinned,
1006
+ cellRenderer: params => {
1007
+ if (params.value) {
1008
+ return new JDatePipe().transform(params.value);
1009
+ }
1010
+ else {
1011
+ return '';
1012
+ }
870
1013
  }
871
- else {
872
- return '';
1014
+ });
1015
+ }
1016
+ else if (el.type && el.type == 'time') {
1017
+ this.columnDefs.push({
1018
+ colId: el.id ? el.id : el.field,
1019
+ field: el.field,
1020
+ headerName: el.label,
1021
+ filter: TimeFilter,
1022
+ sortable,
1023
+ editable: el.editable,
1024
+ minWidth: el.minWidth ? el.minWidth : null,
1025
+ filterParams,
1026
+ pinned: el.pinned,
1027
+ cellRenderer: params => {
1028
+ if (params.value) {
1029
+ return params.value;
1030
+ }
1031
+ else {
1032
+ return '';
1033
+ }
873
1034
  }
874
- }
875
- });
1035
+ });
1036
+ }
1037
+ else if (el.type && el.type == 'date-time') {
1038
+ this.columnDefs.push({
1039
+ colId: el.id ? el.id : el.field,
1040
+ field: el.field,
1041
+ headerName: el.label,
1042
+ filter: DateFilter,
1043
+ sortable,
1044
+ editable: el.editable,
1045
+ minWidth: el.minWidth ? el.minWidth : null,
1046
+ filterParams,
1047
+ pinned: el.pinned,
1048
+ cellRenderer: params => {
1049
+ if (params.value) {
1050
+ return new JDatePipe().transform(params.value, true);
1051
+ }
1052
+ else {
1053
+ return '';
1054
+ }
1055
+ }
1056
+ });
1057
+ }
1058
+ else if (el.type && el.type == 'price') {
1059
+ this.columnDefs.push({
1060
+ colId: el.id ? el.id : el.field,
1061
+ field: el.field,
1062
+ headerName: el.label,
1063
+ filter: filter,
1064
+ sortable,
1065
+ editable: el.editable,
1066
+ minWidth: el.minWidth ? el.minWidth : null,
1067
+ filterParams,
1068
+ pinned: el.pinned,
1069
+ cellRenderer: params => {
1070
+ if (params.value) {
1071
+ return params.value.toLocaleString();
1072
+ }
1073
+ else {
1074
+ return '';
1075
+ }
1076
+ }
1077
+ });
1078
+ }
1079
+ else if (el.type && el.type == 'image') {
1080
+ this.columnDefs.push({
1081
+ colId: el.id ? el.id : el.field,
1082
+ field: el.field,
1083
+ headerName: el.label,
1084
+ minWidth: 80,
1085
+ width: 80,
1086
+ filter: 'none',
1087
+ sortable: false,
1088
+ editable: false,
1089
+ filterParams,
1090
+ pinned: el.pinned,
1091
+ cellRenderer: params => {
1092
+ if (params.value) {
1093
+ return `<img class="rounded-full mt-1" width="32" height="32" src="${params.value}"/>`;
1094
+ }
1095
+ else {
1096
+ return '';
1097
+ }
1098
+ }
1099
+ });
1100
+ }
1101
+ else {
1102
+ this.columnDefs.push({
1103
+ colId: el.id ? el.id : el.field,
1104
+ field: el.field,
1105
+ headerName: el.label,
1106
+ filter,
1107
+ sortable,
1108
+ editable: el.editable,
1109
+ filterParams,
1110
+ pinned: el.pinned,
1111
+ minWidth: el.minWidth ? el.minWidth : null
1112
+ });
1113
+ }
876
1114
  }
877
1115
  else {
878
- this.columnDefs.push({
879
- colId: el.id ? el.id : el.field,
880
- field: el.field,
881
- headerName: el.label,
882
- filter,
883
- sortable,
884
- editable: el.editable,
885
- filterParams,
886
- pinned: el.pinned,
887
- minWidth: el.minWidth ? el.minWidth : null
888
- });
1116
+ this.autoGroupColumnDef.field = el.field;
889
1117
  }
890
- }
891
- else {
892
- this.autoGroupColumnDef.field = el.field;
893
- }
894
- });
895
- if (this.actionItems.length > 0) {
896
- this.columnDefs.push({
897
- filter: false,
898
- headerName: '',
899
- minWidth: this.actionWidth,
900
- resizable: true,
901
- pinned: true,
902
- sortable: false,
903
- field: 'actions',
904
- cellRenderer: ActionsCellRenderer,
905
- cellRendererParams: {
906
- onClick: (params) => {
907
- this.onAction.emit(params);
1118
+ });
1119
+ this._column.filter((el) => el.filter == 'filter-box').forEach((el) => {
1120
+ let items = [];
1121
+ if (el.filterItems != null) {
1122
+ switch (el.type) {
1123
+ case 'enum':
1124
+ Object.keys(el.filterItems).forEach((item) => {
1125
+ items.push({
1126
+ label: this._translate.instant(el.filterItems[item]),
1127
+ value: el.filterItems[item]
1128
+ });
1129
+ });
1130
+ break;
1131
+ case 'boolean':
1132
+ Object.keys(el.filterItems).forEach((item) => {
1133
+ items.push({
1134
+ label: this._translate.instant("true"),
1135
+ value: true
1136
+ }, {
1137
+ label: this._translate.instant("false"),
1138
+ value: false
1139
+ });
1140
+ });
1141
+ break;
908
1142
  }
909
1143
  }
1144
+ this._filterBoxItems.push({
1145
+ label: el.label,
1146
+ value: null,
1147
+ items,
1148
+ type: el.type,
1149
+ field: el.field,
1150
+ nodes: []
1151
+ });
910
1152
  });
1153
+ if (this.actionItems.length > 0) {
1154
+ this.columnDefs.push({
1155
+ filter: false,
1156
+ headerName: '',
1157
+ minWidth: this.actionWidth,
1158
+ resizable: true,
1159
+ pinned: true,
1160
+ sortable: false,
1161
+ field: 'actions',
1162
+ cellRenderer: ActionsCellRenderer,
1163
+ cellRendererParams: {
1164
+ onClick: (params) => {
1165
+ this.onAction.emit(params);
1166
+ }
1167
+ }
1168
+ });
1169
+ }
911
1170
  }
1171
+ }, 100);
1172
+ }
1173
+ changeDatePickerValue(e, item, index) {
1174
+ if (item.value != null) {
1175
+ item.value[index] = e;
1176
+ }
1177
+ else {
1178
+ item.value = [null, null];
1179
+ item.value[index] = e;
912
1180
  }
913
1181
  }
914
1182
  cellDoubleClicked(e) {
915
- console.log(e);
916
1183
  this.onClicked.emit({ ...e.data, colId: e.column.getColId() });
917
1184
  }
918
1185
  handleClick(item) {
919
1186
  this.onToolbar.emit(item);
920
1187
  }
1188
+ saveFilterGrid() {
1189
+ if (this.id == null) {
1190
+ this._toast.show('شناسه ی جدول وارد نشده است', 'error');
1191
+ return;
1192
+ }
1193
+ if (this.gridId == null) {
1194
+ this.isVisibleModal = true;
1195
+ this._cdr.detectChanges();
1196
+ }
1197
+ else {
1198
+ db.gridFilterItems.get(this.gridId).then((res) => {
1199
+ db.gridFilterItems.put({
1200
+ ...res,
1201
+ grid: this.gridModel,
1202
+ });
1203
+ this.fetchTemplate();
1204
+ this._toast.show('قالب با موفقیت بروزرسانی شد', 'success');
1205
+ });
1206
+ }
1207
+ }
1208
+ handleCancelModal() {
1209
+ this.isVisibleModal = false;
1210
+ this._cdr.detectChanges();
1211
+ }
1212
+ handleOkModal() {
1213
+ if (this.templateName == null) {
1214
+ this._toast.show('عنوان قالب وارد نشده است', 'error');
1215
+ return;
1216
+ }
1217
+ this.gridId = new Date().getTime().toString();
1218
+ db.gridFilterItems.add({
1219
+ id: this.gridId,
1220
+ grid: this.gridModel,
1221
+ tableId: this.id,
1222
+ title: this.templateName,
1223
+ userName: null
1224
+ });
1225
+ this._toast.show('قالب با موفقیت ذخیره شد', 'success');
1226
+ this.templateName = null;
1227
+ this.isVisibleModal = false;
1228
+ this._cdr.detectChanges();
1229
+ this.fetchTemplate();
1230
+ }
921
1231
  refresh(purge = false) {
922
1232
  if (this.rowModelType == 'serverSide') {
923
1233
  this.gridApi.refreshServerSide({ purge });
@@ -970,7 +1280,13 @@ class GridComponent {
970
1280
  });
971
1281
  }
972
1282
  clearFilter() {
1283
+ this.visibleFilterBox = false;
1284
+ this._filterBoxItems.forEach((el) => {
1285
+ el.value = null;
1286
+ });
973
1287
  this.gridApi.setFilterModel(null);
1288
+ this.gridApi.onFilterChanged();
1289
+ this.filterItemsValues = [];
974
1290
  this.refresh();
975
1291
  }
976
1292
  refreshParentNode(id) {
@@ -981,89 +1297,154 @@ class GridComponent {
981
1297
  route: route
982
1298
  });
983
1299
  }
1300
+ filter() {
1301
+ this.handleFilterLabelValue();
1302
+ this.refresh();
1303
+ this.visibleFilterBox = false;
1304
+ }
1305
+ setTemplateFilter(item) {
1306
+ this.clearFilter();
1307
+ setTimeout(() => {
1308
+ item.grid.filter.filters.forEach((el) => {
1309
+ const findEl = this._column.find((item) => item.field == el.field || item.searchField == el.field);
1310
+ if (findEl && this.columnDefs.find((item) => item.field == findEl.field && item.filter)) {
1311
+ this.gridApi.setColumnFilterModel(findEl.field, {
1312
+ type: el.logic,
1313
+ filter: el.value
1314
+ });
1315
+ }
1316
+ else {
1317
+ const index = this._filterBoxItems.findIndex((item) => item.field == el.field);
1318
+ this._filterBoxItems[index].value = el.value;
1319
+ this._cdr.detectChanges();
1320
+ }
1321
+ });
1322
+ this.gridId = item.id;
1323
+ this.visibleFilterTemplateBox = false;
1324
+ this._cdr.detectChanges();
1325
+ this.handleFilterLabelValue();
1326
+ this.gridApi.onFilterChanged();
1327
+ this.refresh();
1328
+ }, 100);
1329
+ }
1330
+ handleFilterLabelValue() {
1331
+ this._filterBoxItems.forEach((el) => {
1332
+ const findEl = this.filterItemsValues.find((fi) => fi.field == el.field);
1333
+ if (!findEl) {
1334
+ if (el.value != null && el.value != "") {
1335
+ this.filterItemsValues.push({
1336
+ field: el.field,
1337
+ label: el.label,
1338
+ value: el.value
1339
+ });
1340
+ }
1341
+ }
1342
+ else {
1343
+ if (el.value == null || el.value == "") {
1344
+ this.filterItemsValues = this.filterItemsValues.filter((fi) => fi.field != el.field);
1345
+ }
1346
+ else {
1347
+ findEl.value = el.value;
1348
+ }
1349
+ this._cdr.detectChanges();
1350
+ }
1351
+ });
1352
+ }
1353
+ removeFilter(item) {
1354
+ const index = this._filterBoxItems.findIndex((el) => el.field == item.field);
1355
+ if (index >= 0) {
1356
+ this._filterBoxItems[index].value = null;
1357
+ }
1358
+ else {
1359
+ this.gridApi.setColumnFilterModel(item.field, null);
1360
+ this.gridApi.onFilterChanged();
1361
+ }
1362
+ this.filterItemsValues = this.filterItemsValues.filter((el) => el.field != item.field);
1363
+ this._cdr.detectChanges();
1364
+ this.refresh();
1365
+ }
984
1366
  createServerSideDatasource() {
985
1367
  return {
986
1368
  getRows: (params) => {
987
1369
  let filter = null;
1370
+ filter = {
1371
+ disable: false,
1372
+ field: null,
1373
+ logic: 'AND',
1374
+ filters: [],
1375
+ ignoreCase: null,
1376
+ operator: null,
1377
+ truncateDate: null,
1378
+ value: null,
1379
+ };
988
1380
  if (Object.keys(params.request.filterModel).length > 0) {
989
- filter = {
990
- disable: false,
991
- field: null,
992
- logic: 'AND',
993
- filters: [],
994
- ignoreCase: null,
995
- operator: null,
996
- truncateDate: null,
997
- value: null,
998
- };
999
1381
  for (const key in params.request.filterModel) {
1382
+ let field = key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key;
1383
+ let value = null;
1384
+ let operator = FilterOperator.equals;
1385
+ let ignoreCase = false;
1386
+ const findEl = this._column.find((el) => el.field == key);
1387
+ if (key == 'ag-Grid-AutoColumn') {
1388
+ field = this._treeGroupColumn;
1389
+ }
1390
+ else {
1391
+ field = key;
1392
+ if (findEl.searchField != null) {
1393
+ field = findEl.searchField;
1394
+ }
1395
+ }
1000
1396
  if (params.request.filterModel[key].filterType == 'custom-date') {
1001
1397
  if (params.request.filterModel[key].dateFrom && params.request.filterModel[key].dateTo) {
1002
- filter.filters.push({
1003
- disable: false,
1004
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1005
- logic: 'AND',
1006
- filters: null,
1007
- ignoreCase: false,
1008
- operator: FilterOperator.between,
1009
- truncateDate: true,
1010
- value: [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo]
1011
- });
1398
+ operator = FilterOperator.between;
1399
+ value = [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo];
1012
1400
  }
1013
1401
  else if (params.request.filterModel[key].dateFrom) {
1014
- filter.filters.push({
1015
- disable: false,
1016
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1017
- logic: 'AND',
1018
- filters: null,
1019
- ignoreCase: false,
1020
- operator: FilterOperator.truncGreaterThanEqual,
1021
- truncateDate: true,
1022
- value: params.request.filterModel[key].dateFrom,
1023
- });
1402
+ operator = FilterOperator.truncGreaterThanEqual;
1403
+ value = params.request.filterModel[key].dateFrom;
1024
1404
  }
1025
1405
  else if (params.request.filterModel[key].dateTo && params.request.filterModel[key].dateTo != "") {
1026
- filter.filters.push({
1027
- disable: false,
1028
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1029
- logic: 'AND',
1030
- filters: null,
1031
- ignoreCase: false,
1032
- operator: FilterOperator.truncLessThanOrEqual,
1033
- truncateDate: true,
1034
- value: params.request.filterModel[key].dateTo,
1035
- });
1406
+ operator = FilterOperator.truncLessThanOrEqual;
1407
+ value = params.request.filterModel[key].dateTo;
1036
1408
  }
1037
1409
  }
1410
+ else if (params.request.filterModel[key].filterType == 'custom-time' && params.request.filterModel[key].time != null) {
1411
+ operator = FilterOperator.equals;
1412
+ 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)}`;
1413
+ }
1038
1414
  else {
1039
- const operation = FilterOperator[params.request.filterModel[key].type];
1040
- let ignoreCase = true;
1041
- const findEl = this._column.find((el) => el.field == key);
1042
- let field = null;
1043
- if (key == 'ag-Grid-AutoColumn') {
1044
- field = this._treeGroupColumn;
1045
- }
1046
- else {
1047
- field = key;
1048
- if (findEl.searchField != null) {
1049
- field = findEl.searchField;
1050
- }
1415
+ if (FilterOperator[params.request.filterModel[key].type]) {
1416
+ operator = FilterOperator[params.request.filterModel[key].type];
1051
1417
  }
1418
+ ignoreCase = true;
1419
+ value = params.request.filterModel[key].filter ? params.request.filterModel[key].filter : params.request.filterModel[key].type;
1052
1420
  if (findEl && findEl.type == 'enum') {
1053
1421
  ignoreCase = false;
1054
1422
  }
1055
- filter.filters.push({
1056
- disable: false,
1057
- field,
1058
- logic: 'AND',
1059
- filters: null,
1060
- ignoreCase,
1061
- operator: operation ? operation : FilterOperator.equals,
1062
- truncateDate: true,
1063
- value: params.request.filterModel[key].filter ? params.request.filterModel[key].filter : params.request.filterModel[key].type
1423
+ }
1424
+ const findFilterItemsEl = this.filterItemsValues.find((fi) => fi.field == findEl.field);
1425
+ if (!findFilterItemsEl) {
1426
+ this.filterItemsValues.push({
1427
+ field: findEl.field,
1428
+ label: findEl.label,
1429
+ value: value
1064
1430
  });
1065
1431
  }
1432
+ else {
1433
+ findFilterItemsEl.value = value;
1434
+ }
1435
+ filter.filters.push({
1436
+ disable: false,
1437
+ field,
1438
+ logic: 'AND',
1439
+ filters: null,
1440
+ ignoreCase,
1441
+ operator,
1442
+ truncateDate: true,
1443
+ value
1444
+ });
1066
1445
  }
1446
+ this._cdr.detectChanges();
1447
+ // this.filterItemsValues = structuredClone(this.filterItemsValues);
1067
1448
  }
1068
1449
  let sorts = [];
1069
1450
  if (params.request.sortModel.length) {
@@ -1091,6 +1472,40 @@ class GridComponent {
1091
1472
  const requestParams = {
1092
1473
  parentNode: params.parentNode.data
1093
1474
  };
1475
+ this._filterBoxItems.forEach((el) => {
1476
+ if (el.value != null && el.value != "") {
1477
+ let operator = null;
1478
+ switch (el.type) {
1479
+ case 'string':
1480
+ operator = FilterOperator.contains;
1481
+ break;
1482
+ case 'date':
1483
+ case 'date-time':
1484
+ operator = FilterOperator.between;
1485
+ if (el.value[0] == null) {
1486
+ el.value[0] = new Date('1997-01-01').toISOString();
1487
+ }
1488
+ else if (el.value[1] == null) {
1489
+ el.value[1] = new Date().toISOString();
1490
+ }
1491
+ break;
1492
+ default:
1493
+ operator = FilterOperator.equals;
1494
+ break;
1495
+ }
1496
+ gridFilter.filter.filters.push({
1497
+ disable: false,
1498
+ field: el.field,
1499
+ filters: null,
1500
+ ignoreCase: false,
1501
+ logic: 'AND',
1502
+ operator,
1503
+ truncateDate: false,
1504
+ value: el.value
1505
+ });
1506
+ }
1507
+ });
1508
+ this.gridModel = gridFilter;
1094
1509
  this.fetchData(gridFilter, requestParams).then(data => {
1095
1510
  params.success({
1096
1511
  rowData: data.items,
@@ -1105,14 +1520,23 @@ class GridComponent {
1105
1520
  }
1106
1521
  };
1107
1522
  }
1108
- ngOnInit() { }
1109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, deps: [{ token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1110
- 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"] }] }); }
1523
+ fetchTemplate() {
1524
+ if (this.id != null) {
1525
+ db.gridFilterItems.filter((el) => el.tableId == this.id).toArray().then((res) => {
1526
+ this.filterTemplateItems = res;
1527
+ });
1528
+ }
1529
+ }
1530
+ ngOnInit() {
1531
+ this.fetchTemplate();
1532
+ }
1533
+ 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 }); }
1534
+ 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" }] }); }
1111
1535
  }
1112
1536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, decorators: [{
1113
1537
  type: Component,
1114
- args: [{ selector: 'app-grid', 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" }]
1115
- }], ctorParameters: () => [{ type: i1$4.TranslateService }], propDecorators: { onAction: [{
1538
+ 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" }]
1539
+ }], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: i0.ChangeDetectorRef }, { type: ToastService }], propDecorators: { onAction: [{
1116
1540
  type: Output
1117
1541
  }], onToolbar: [{
1118
1542
  type: Output
@@ -1124,6 +1548,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1124
1548
  type: Input
1125
1549
  }], label: [{
1126
1550
  type: Input
1551
+ }], id: [{
1552
+ type: Input
1127
1553
  }], isRowSelection: [{
1128
1554
  type: Input
1129
1555
  }], rowModelType: [{
@@ -1158,6 +1584,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1158
1584
  type: Input
1159
1585
  }], treeGroupColumn: [{
1160
1586
  type: Input
1587
+ }], filterItems: [{
1588
+ type: Input
1161
1589
  }], fetchData: [{
1162
1590
  type: Input
1163
1591
  }], column: [{
@@ -1180,7 +1608,7 @@ class ActionsCellRenderer {
1180
1608
  this.params.onClick({ data: this.params.data, event: item.code, id: this.params.node.id });
1181
1609
  }
1182
1610
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1183
- 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: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$3.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] }); }
1611
+ 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"] }] }); }
1184
1612
  }
1185
1613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, decorators: [{
1186
1614
  type: Component,
@@ -1225,7 +1653,7 @@ class CaptchaComponent {
1225
1653
  this.generateCode();
1226
1654
  }
1227
1655
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1228
- 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: 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"] }] }); }
1656
+ 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"] }] }); }
1229
1657
  }
1230
1658
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, decorators: [{
1231
1659
  type: Component,
@@ -1261,6 +1689,9 @@ class MapComponent {
1261
1689
  L.tileLayer('https://raster.snappmaps.ir/styles/snapp-style/{z}/{x}/{y}@2x.webp', {
1262
1690
  maxZoom: 18,
1263
1691
  }).addTo(this.map);
1692
+ L.Draw.Tooltip.prototype.updateContent = function () {
1693
+ return this;
1694
+ };
1264
1695
  this.map.addLayer(this.drawnItems);
1265
1696
  const drawControl = new L.Control.Draw({
1266
1697
  edit: this.editable ? {
@@ -1318,7 +1749,7 @@ class MapComponent {
1318
1749
  });
1319
1750
  }
1320
1751
  clearMap() {
1321
- this.map.eachLayer((layer) => {
1752
+ this.map?.eachLayer((layer) => {
1322
1753
  if (!(layer instanceof L.TileLayer)) {
1323
1754
  this.map.removeLayer(layer);
1324
1755
  }
@@ -1373,7 +1804,7 @@ class SpinnerComponent {
1373
1804
  constructor() { }
1374
1805
  ngOnInit() { }
1375
1806
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1376
- 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$5.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }] }); }
1807
+ 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"] }] }); }
1377
1808
  }
1378
1809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, decorators: [{
1379
1810
  type: Component,
@@ -1430,7 +1861,7 @@ class ImageCropperPopover extends PopoverComponent {
1430
1861
  ngOnInit() {
1431
1862
  }
1432
1863
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageCropperPopover, deps: [{ token: ToastService }], target: i0.ɵɵFactoryTarget.Component }); }
1433
- 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$4.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"] }] }); }
1864
+ 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"] }] }); }
1434
1865
  }
1435
1866
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageCropperPopover, decorators: [{
1436
1867
  type: Component,
@@ -1563,7 +1994,6 @@ class UploaderComponent {
1563
1994
  this.loading = true;
1564
1995
  break;
1565
1996
  case 'done':
1566
- debugger;
1567
1997
  this.getBase64(this._fileUploaded, (img) => {
1568
1998
  this.loading = false;
1569
1999
  this.avatarUrl = img;
@@ -1591,7 +2021,7 @@ class UploaderComponent {
1591
2021
  }
1592
2022
  ngOnInit() { }
1593
2023
  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 }); }
1594
- 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: i4.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"] }] }); }
2024
+ 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"] }] }); }
1595
2025
  }
1596
2026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploaderComponent, decorators: [{
1597
2027
  type: Component,
@@ -1680,7 +2110,7 @@ class UploadFileComponent {
1680
2110
  }
1681
2111
  ngOnInit() { }
1682
2112
  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 }); }
1683
- 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: i4.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"] }] }); }
2113
+ 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"] }] }); }
1684
2114
  }
1685
2115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploadFileComponent, decorators: [{
1686
2116
  type: Component,
@@ -1722,7 +2152,7 @@ class CharInputDirective {
1722
2152
  this.renderer.setProperty(this.el.nativeElement, 'value', value);
1723
2153
  return value;
1724
2154
  }
1725
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, deps: [{ token: i0.ElementRef }, { token: i1$3.NgControl }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2155
+ 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 }); }
1726
2156
  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 }); }
1727
2157
  }
1728
2158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, decorators: [{
@@ -1730,7 +2160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1730
2160
  args: [{
1731
2161
  selector: '[charInput]',
1732
2162
  }]
1733
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$3.NgControl }, { type: i0.Renderer2 }], propDecorators: { allowPersianChar: [{
2163
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i4.NgControl }, { type: i0.Renderer2 }], propDecorators: { allowPersianChar: [{
1734
2164
  type: Input
1735
2165
  }], allowEnglishChar: [{
1736
2166
  type: Input
@@ -1766,7 +2196,7 @@ class EnglishNumberInputDirective {
1766
2196
  this.renderer.setProperty(this.el.nativeElement, 'value', value);
1767
2197
  return value;
1768
2198
  }
1769
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, deps: [{ token: i0.ElementRef }, { token: i1$3.NgControl }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2199
+ 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 }); }
1770
2200
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EnglishNumberInputDirective, selector: "[englishNumberInput]", host: { listeners: { "input": "onEvent($event)" } }, ngImport: i0 }); }
1771
2201
  }
1772
2202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, decorators: [{
@@ -1774,7 +2204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1774
2204
  args: [{
1775
2205
  selector: '[englishNumberInput]',
1776
2206
  }]
1777
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$3.NgControl }, { type: i0.Renderer2 }], propDecorators: { onEvent: [{
2207
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i4.NgControl }, { type: i0.Renderer2 }], propDecorators: { onEvent: [{
1778
2208
  type: HostListener,
1779
2209
  args: ['input', ['$event']]
1780
2210
  }] } });
@@ -1871,7 +2301,7 @@ class AuthGuard {
1871
2301
  this._router.navigate(['/auth']);
1872
2302
  return false;
1873
2303
  }
1874
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, deps: [{ token: i1$6.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
2304
+ 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 }); }
1875
2305
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
1876
2306
  }
1877
2307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, decorators: [{
@@ -1879,7 +2309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1879
2309
  args: [{
1880
2310
  providedIn: 'root'
1881
2311
  }]
1882
- }], ctorParameters: () => [{ type: i1$6.Router }] });
2312
+ }], ctorParameters: () => [{ type: i1$5.Router }] });
1883
2313
 
1884
2314
  class MasterLayout {
1885
2315
  constructor(_service, _confirm, componentFactoryResolver) {
@@ -1888,6 +2318,7 @@ class MasterLayout {
1888
2318
  this.componentFactoryResolver = componentFactoryResolver;
1889
2319
  this.isCollapsed = false;
1890
2320
  this.menuItems = [];
2321
+ this.userName = null;
1891
2322
  }
1892
2323
  logout() {
1893
2324
  this._confirm.confirm(() => {
@@ -1901,6 +2332,14 @@ class MasterLayout {
1901
2332
  const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
1902
2333
  this.container.createComponent(componentFactory);
1903
2334
  }
2335
+ tokenInfo(token) {
2336
+ var base64Url = token.split('.')[1];
2337
+ var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
2338
+ var jsonPayload = decodeURIComponent(window.atob(base64).split('').map(function (c) {
2339
+ return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
2340
+ }).join(''));
2341
+ return JSON.parse(jsonPayload);
2342
+ }
1904
2343
  ngAfterViewInit() {
1905
2344
  setTimeout(() => {
1906
2345
  // this.loadComponent(this._ac.);
@@ -1908,13 +2347,16 @@ class MasterLayout {
1908
2347
  }
1909
2348
  ngOnInit() {
1910
2349
  this.menuItems = this._service.menuItems;
2350
+ if (localStorage.getItem('userInfo')) {
2351
+ this.userName = this.tokenInfo(JSON.parse(localStorage.getItem('userInfo')).access_token).username;
2352
+ }
1911
2353
  }
1912
2354
  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 }); }
1913
- 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\"\n [(nzCollapsed)]=\"isCollapsed\" [nzTrigger]=\"null\">\n <div class=\"p-4\">\n <div class=\"flex justify-center items-center border-b !border-b-slate-200 pb-4\">\n <img width=\"100\" src=\"assets/images/logo.svg\" alt=\"\">\n </div>\n </div>\n <ul nz-menu nzMode=\"inline\" [nzInlineCollapsed]=\"isCollapsed\">\n @for (item of menuItems; track item.title) {\n @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 }\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>\n <button nz-button nzType=\"text\" (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"text-2xl\" nz-icon nzType=\"menu\"></span>\n </button>\n </div>\n <div class=\"flex gap-2\">\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"global\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"user\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"bell\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\" (click)=\"logout()\"><span nz-icon\n 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-md overflow-auto\">\n <router-outlet></router-outlet>\n </div>\n </nz-content>\n </nz-layout>\n</nz-layout>", 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$6.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4$1.NzLayoutComponent, selector: "nz-layout", exportAs: ["nzLayout"] }, { kind: "component", type: i4$1.NzHeaderComponent, selector: "nz-header", exportAs: ["nzHeader"] }, { kind: "component", type: i4$1.NzContentComponent, selector: "nz-content", exportAs: ["nzContent"] }, { kind: "component", type: i4$1.NzSiderComponent, selector: "nz-sider", inputs: ["nzWidth", "nzTheme", "nzCollapsedWidth", "nzBreakpoint", "nzZeroTrigger", "nzTrigger", "nzReverseArrow", "nzCollapsible", "nzCollapsed"], outputs: ["nzCollapsedChange"], exportAs: ["nzSider"] }, { kind: "directive", type: i5$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i5$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i5$1.NzSubMenuComponent, selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "component", type: i5$1.NzMenuGroupComponent, selector: "[nz-menu-group]", inputs: ["nzTitle"], exportAs: ["nzMenuGroup"] }, { 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"] }] }); }
2355
+ 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"] }] }); }
1914
2356
  }
1915
2357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MasterLayout, decorators: [{
1916
2358
  type: Component,
1917
- args: [{ template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\"\n [(nzCollapsed)]=\"isCollapsed\" [nzTrigger]=\"null\">\n <div class=\"p-4\">\n <div class=\"flex justify-center items-center border-b !border-b-slate-200 pb-4\">\n <img width=\"100\" src=\"assets/images/logo.svg\" alt=\"\">\n </div>\n </div>\n <ul nz-menu nzMode=\"inline\" [nzInlineCollapsed]=\"isCollapsed\">\n @for (item of menuItems; track item.title) {\n @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 }\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>\n <button nz-button nzType=\"text\" (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"text-2xl\" nz-icon nzType=\"menu\"></span>\n </button>\n </div>\n <div class=\"flex gap-2\">\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"global\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"user\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\"><span nz-icon\n nzType=\"bell\"></span></button>\n <button nz-button nzType=\"text\" nzSize=\"large\" nzShape=\"circle\" (click)=\"logout()\"><span nz-icon\n 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-md overflow-auto\">\n <router-outlet></router-outlet>\n </div>\n </nz-content>\n </nz-layout>\n</nz-layout>", 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"] }]
2359
+ 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"] }]
1918
2360
  }], ctorParameters: () => [{ type: SharedService }, { type: ConfirmService }, { type: i0.ComponentFactoryResolver }], propDecorators: { container: [{
1919
2361
  type: ViewChild,
1920
2362
  args: ['dynamicComponentContainer', { read: ViewContainerRef }]
@@ -1924,7 +2366,7 @@ class BlankLayout {
1924
2366
  constructor() { }
1925
2367
  ngOnInit() { }
1926
2368
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1927
- 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$6.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
2369
+ 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"] }] }); }
1928
2370
  }
1929
2371
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, decorators: [{
1930
2372
  type: Component,
@@ -2077,7 +2519,8 @@ const Components = [
2077
2519
  SpinnerComponent,
2078
2520
  UploaderComponent,
2079
2521
  UploadFileComponent,
2080
- DateFilter
2522
+ DateFilter,
2523
+ TimeFilter
2081
2524
  ];
2082
2525
  const Popover = [
2083
2526
  ImageCropperPopover
@@ -2120,9 +2563,13 @@ const Modules = [
2120
2563
  FormsModule,
2121
2564
  NzInputModule,
2122
2565
  NzFormModule,
2566
+ NzSelectModule,
2123
2567
  NzUploadModule,
2124
2568
  NzCollapseModule,
2569
+ NzTreeSelectModule,
2125
2570
  ImageCropperComponent,
2571
+ NzPopoverModule,
2572
+ QeydarDatePickerModule,
2126
2573
  TranslateModule.forRoot({
2127
2574
  defaultLanguage: 'fa',
2128
2575
  useDefaultLang: true,
@@ -2143,7 +2590,8 @@ class SharedModule {
2143
2590
  SpinnerComponent,
2144
2591
  UploaderComponent,
2145
2592
  UploadFileComponent,
2146
- DateFilter, ImageCropperPopover, EnglishNumberInputDirective,
2593
+ DateFilter,
2594
+ TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
2147
2595
  CharInputDirective,
2148
2596
  MaskDirective,
2149
2597
  ImageLoaderDirective,
@@ -2165,9 +2613,13 @@ class SharedModule {
2165
2613
  FormsModule,
2166
2614
  NzInputModule,
2167
2615
  NzFormModule,
2616
+ NzSelectModule,
2168
2617
  NzUploadModule,
2169
2618
  NzCollapseModule,
2170
- ImageCropperComponent, i1$4.TranslateModule], exports: [MasterLayout,
2619
+ NzTreeSelectModule,
2620
+ ImageCropperComponent,
2621
+ NzPopoverModule,
2622
+ QeydarDatePickerModule, i1$3.TranslateModule], exports: [MasterLayout,
2171
2623
  BlankLayout, GridComponent,
2172
2624
  ActionsCellRenderer,
2173
2625
  CaptchaComponent,
@@ -2175,7 +2627,8 @@ class SharedModule {
2175
2627
  SpinnerComponent,
2176
2628
  UploaderComponent,
2177
2629
  UploadFileComponent,
2178
- DateFilter, ImageCropperPopover, EnglishNumberInputDirective,
2630
+ DateFilter,
2631
+ TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
2179
2632
  CharInputDirective,
2180
2633
  MaskDirective,
2181
2634
  ImageLoaderDirective,
@@ -2256,5 +2709,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2256
2709
  * Generated bundle index. Do not edit.
2257
2710
  */
2258
2711
 
2259
- 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 };
2712
+ 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 };
2260
2713
  //# sourceMappingURL=fixa-admin.mjs.map