fixa-admin 0.0.53 → 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';
@@ -416,6 +425,9 @@ class DateFilter {
416
425
  this.params = params;
417
426
  }
418
427
  isFilterActive() {
428
+ if ((this.dateFrom == "" && this.dateTo == "") || (this.dateFrom == null && this.dateTo == null)) {
429
+ return false;
430
+ }
419
431
  return true;
420
432
  }
421
433
  doesFilterPass(params) {
@@ -430,6 +442,9 @@ class DateFilter {
430
442
  passed = false;
431
443
  }
432
444
  });
445
+ if (this.dateFrom == "" && this.dateTo == "") {
446
+ passed = false;
447
+ }
433
448
  return passed;
434
449
  }
435
450
  getModel() {
@@ -486,7 +501,7 @@ class DateFilter {
486
501
  <button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
487
502
  </div>
488
503
  </div>
489
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: 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"] }] }); }
490
505
  }
491
506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DateFilter, decorators: [{
492
507
  type: Component,
@@ -518,6 +533,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
518
533
  args: ['eFilterText']
519
534
  }] } });
520
535
 
536
+ class TimeFilter {
537
+ constructor() {
538
+ this.time = "";
539
+ }
540
+ agInit(params) {
541
+ this.params = params;
542
+ }
543
+ isFilterActive() {
544
+ if (this.time == null) {
545
+ return false;
546
+ }
547
+ return true;
548
+ }
549
+ doesFilterPass(params) {
550
+ let passed = true;
551
+ const { node } = params;
552
+ this.time
553
+ .toLowerCase()
554
+ .split(' ')
555
+ .forEach((filterWord) => {
556
+ const value = this.params.getValue(node);
557
+ if (value.toString().toLowerCase().indexOf(filterWord) < 0) {
558
+ passed = false;
559
+ }
560
+ });
561
+ if (this.time == null) {
562
+ passed = false;
563
+ }
564
+ return passed;
565
+ }
566
+ getModel() {
567
+ if (!this.isFilterActive()) {
568
+ return null;
569
+ }
570
+ let time = this.time;
571
+ return { time, filterType: 'custom-time' };
572
+ }
573
+ setModel(model) {
574
+ this.time = model == null || model.time == null ? null : model.time;
575
+ }
576
+ filter() {
577
+ this.params.filterChangedCallback();
578
+ }
579
+ clear() {
580
+ this.time = null;
581
+ this.filter();
582
+ }
583
+ afterGuiAttached(params) {
584
+ if (!params?.suppressFocus) {
585
+ // focus the input element for keyboard navigation
586
+ this.eFilterText.nativeElement.focus();
587
+ }
588
+ }
589
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFilter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
590
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TimeFilter, selector: "ng-component", viewQueries: [{ propertyName: "eFilterText", first: true, predicate: ["eFilterText"], descendants: true }], ngImport: i0, template: `
591
+ <div class="p-4">
592
+ <nz-form-item>
593
+ <nz-form-label>ساعت</nz-form-label>
594
+ <nz-form-control>
595
+ <input nz-input appMask="00:00:00" placeholder="12:00:00" autocomplete="off" class="w-[250px]" dir="ltr" [(ngModel)]="time" #eFilterText/>
596
+ </nz-form-control>
597
+ </nz-form-item>
598
+ <hr/>
599
+ <div class="flex gap-2">
600
+ <button nz-button nzType="primary" class="mt-4" (click)="filter()">فیلتر</button>
601
+ <button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
602
+ </div>
603
+ </div>
604
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: MaskDirective, selector: "[appMask]", inputs: ["appMask"] }] }); }
605
+ }
606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeFilter, decorators: [{
607
+ type: Component,
608
+ args: [{
609
+ template: `
610
+ <div class="p-4">
611
+ <nz-form-item>
612
+ <nz-form-label>ساعت</nz-form-label>
613
+ <nz-form-control>
614
+ <input nz-input appMask="00:00:00" placeholder="12:00:00" autocomplete="off" class="w-[250px]" dir="ltr" [(ngModel)]="time" #eFilterText/>
615
+ </nz-form-control>
616
+ </nz-form-item>
617
+ <hr/>
618
+ <div class="flex gap-2">
619
+ <button nz-button nzType="primary" class="mt-4" (click)="filter()">فیلتر</button>
620
+ <button nz-button nzType="default" class="mt-4" (click)="clear()">پاکسازی</button>
621
+ </div>
622
+ </div>
623
+ `,
624
+ }]
625
+ }], propDecorators: { eFilterText: [{
626
+ type: ViewChild,
627
+ args: ['eFilterText']
628
+ }] } });
629
+
521
630
  class JDatePipe {
522
631
  transform(value, time = false, format = 'YYYY/MM/DD') {
523
632
  if (value != null) {
@@ -540,9 +649,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
540
649
  args: [{ name: 'jdate' }]
541
650
  }] });
542
651
 
652
+ // db.ts
653
+ class AppDB extends Dexie {
654
+ constructor() {
655
+ super('fixa-admin-grid');
656
+ this.version(3).stores({
657
+ gridFilterItems: 'id',
658
+ });
659
+ }
660
+ }
661
+ const db = new AppDB();
662
+
543
663
  class GridComponent {
544
- constructor(_translate) {
664
+ constructor(_translate, _cdr, _toast) {
545
665
  this._translate = _translate;
666
+ this._cdr = _cdr;
667
+ this._toast = _toast;
546
668
  this.getServerSideGroupKey = null;
547
669
  this.groupDefaultExpanded = -1;
548
670
  this._treeGroupColumn = null;
@@ -552,7 +674,16 @@ class GridComponent {
552
674
  };
553
675
  this.themeClass = "ag-theme-quartz";
554
676
  this.columnDefs = [];
677
+ this.visibleFilterBox = false;
555
678
  this._column = [];
679
+ this._filterBoxItems = [];
680
+ this.filterItemsValues = [];
681
+ this.filterTemplateItems = [];
682
+ this.visibleFilterTemplateBox = false;
683
+ this.isVisibleModal = false;
684
+ this.gridModel = null;
685
+ this.templateName = null;
686
+ this.gridId = null;
556
687
  this._autoColumnSize = { type: 'fitGridWidth' };
557
688
  this.autoGroupColumnDef = {
558
689
  headerName: "",
@@ -579,6 +710,7 @@ class GridComponent {
579
710
  this.rowSelectionChange = new EventEmitter();
580
711
  this.actionWidth = 100;
581
712
  this.label = null;
713
+ this.id = null;
582
714
  this.rowModelType = 'serverSide';
583
715
  this.serverSideSort = true;
584
716
  this.serverSideFilter = true;
@@ -619,6 +751,12 @@ class GridComponent {
619
751
  ];
620
752
  this.datasource = this.createServerSideDatasource();
621
753
  }
754
+ getRowClass(params) {
755
+ if (params.node.rowIndex % 2 !== 0) {
756
+ return 'row-odd';
757
+ }
758
+ return '';
759
+ }
622
760
  set isRowSelection(v) {
623
761
  if (v) {
624
762
  this._rowSelection = {
@@ -676,249 +814,420 @@ class GridComponent {
676
814
  // this.autoGroupColumnDef.headerName = v;
677
815
  }
678
816
  }
679
- get column() {
680
- return this.column;
681
- }
682
- set column(v) {
683
- this.columnDefs = [];
684
- if (v != null) {
685
- this._column = v;
817
+ set filterItems(v) {
818
+ if (v != null && v.length > 0) {
686
819
  v.forEach((el) => {
687
- var filter = 'agTextColumnFilter';
688
- var sortable = true;
689
- var filterParams = {
690
- maxNumConditions: 1
691
- };
692
- switch (el.type) {
693
- case 'boolean':
694
- filter = 'agNumberColumnFilter';
695
- filterParams.filterOptions = [
696
- "empty",
697
- {
698
- displayKey: 'true',
699
- displayName: this._translate.instant('YES'),
700
- predicate: () => true,
701
- numberOfInputs: 0
702
- },
703
- {
704
- displayKey: 'false',
705
- displayName: this._translate.instant('NO'),
706
- predicate: () => true,
707
- numberOfInputs: 0
820
+ if (!this._filterBoxItems.find((item) => item.field == el.field)) {
821
+ let items = [];
822
+ if ((el.type == 'enum' || el.type == 'select' || el.type == 'tree-select') && el.items != null) {
823
+ el.items?.().then((res) => {
824
+ let nodes = [];
825
+ if (el.type == 'tree-select') {
826
+ const convertToNzTreeNodes = (items) => {
827
+ return items.map(item => ({
828
+ title: item.label,
829
+ key: String(item.value),
830
+ isLeaf: item.children && item.children.length > 0 ? false : true,
831
+ children: item.children ? convertToNzTreeNodes(item.children) : [],
832
+ }));
833
+ };
834
+ nodes = convertToNzTreeNodes(res);
708
835
  }
709
- ];
710
- break;
711
- case 'enum':
712
- filter = 'agNumberColumnFilter';
713
- const items = [];
714
- for (const property in el.filterItems) {
715
- items.push({
716
- displayKey: el.filterItems[property],
717
- displayName: this._translate.instant(el.filterItems[property]),
718
- predicate: true,
719
- numberOfInputs: 0
836
+ this._filterBoxItems.push({
837
+ field: el.field,
838
+ label: el.label,
839
+ value: null,
840
+ items: res,
841
+ type: el.type,
842
+ nodes
720
843
  });
721
- }
722
- filterParams.filterOptions = [
723
- "empty",
724
- ...items
725
- ];
726
- break;
727
- case 'number':
728
- filter = 'agNumberColumnFilter';
729
- break;
730
- case 'select':
731
- filter = 'agSetColumnFilter';
732
- break;
733
- case 'string':
734
- filter = 'agTextColumnFilter';
735
- break;
736
- case 'date':
737
- filter = 'agDateColumnFilter';
738
- break;
739
- default:
740
- filter = 'agTextColumnFilter';
741
- break;
742
- }
743
- if (el.filter != undefined && !el.filter) {
744
- filter = false;
745
- }
746
- if (el.sortable != undefined && !el.sortable) {
747
- sortable = false;
748
- }
749
- if (el.field != this._treeGroupColumn) {
750
- if (el.type && el.type == 'boolean') {
751
- this.columnDefs.push({
752
- colId: el.id ? el.id : el.field,
753
- field: el.field,
754
- headerName: el.label,
755
- filter: filter,
756
- sortable,
757
- editable: el.editable,
758
- minWidth: el.minWidth ? el.minWidth : null,
759
- filterParams,
760
- pinned: el.pinned,
761
- cellClass: 'ag-boolean-cell',
762
- cellRenderer: params => {
763
- if (params.value != null) {
764
- return params.value ? '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" stroke="green" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17L4 12"/></svg>' : '<svg xmlns="http://www.w3.org/2000/svg" stroke="red" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" /></svg>';
765
- }
766
- else {
767
- return '';
768
- }
769
- }
770
844
  });
771
845
  }
772
- else if (el.type && el.type == 'enum') {
773
- this.columnDefs.push({
774
- 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({
775
855
  field: el.field,
776
- headerName: el.label,
777
- filter: filter,
778
- sortable,
779
- editable: el.editable,
780
- pinned: el.pinned,
781
- minWidth: el.minWidth ? el.minWidth : null,
782
- filterParams,
783
- cellRenderer: params => {
784
- if (params.value) {
785
- return this._translate.instant(params.value);
786
- }
787
- else {
788
- return '';
789
- }
790
- }
856
+ label: el.label,
857
+ value: null,
858
+ items,
859
+ type: el.type,
860
+ nodes: []
791
861
  });
792
862
  }
793
- else if (el.type && el.type == 'date') {
794
- this.columnDefs.push({
795
- colId: el.id ? el.id : el.field,
863
+ else {
864
+ this._filterBoxItems.push({
796
865
  field: el.field,
797
- headerName: el.label,
798
- filter: DateFilter,
799
- sortable,
800
- editable: el.editable,
801
- minWidth: el.minWidth ? el.minWidth : null,
802
- filterParams,
803
- pinned: el.pinned,
804
- cellRenderer: params => {
805
- if (params.value) {
806
- return new JDatePipe().transform(params.value);
807
- }
808
- else {
809
- return '';
810
- }
811
- }
866
+ label: el.label,
867
+ value: null,
868
+ items,
869
+ type: el.type,
870
+ nodes: []
812
871
  });
813
872
  }
814
- else if (el.type && el.type == 'date-time') {
815
- this.columnDefs.push({
816
- colId: el.id ? el.id : el.field,
817
- field: el.field,
818
- headerName: el.label,
819
- filter: DateFilter,
820
- sortable,
821
- editable: el.editable,
822
- minWidth: el.minWidth ? el.minWidth : null,
823
- filterParams,
824
- pinned: el.pinned,
825
- cellRenderer: params => {
826
- if (params.value) {
827
- return new JDatePipe().transform(params.value, true);
828
- }
829
- else {
830
- 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
831
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
+ });
832
920
  }
833
- });
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;
834
941
  }
835
- else if (el.type && el.type == 'price') {
836
- this.columnDefs.push({
837
- colId: el.id ? el.id : el.field,
838
- field: el.field,
839
- headerName: el.label,
840
- filter: filter,
841
- sortable,
842
- editable: el.editable,
843
- minWidth: el.minWidth ? el.minWidth : null,
844
- filterParams,
845
- pinned: el.pinned,
846
- cellRenderer: params => {
847
- if (params.value) {
848
- 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
+ }
849
971
  }
850
- else {
851
- 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
+ }
852
992
  }
853
- }
854
- });
855
- }
856
- else if (el.type && el.type == 'image') {
857
- this.columnDefs.push({
858
- colId: el.id ? el.id : el.field,
859
- field: el.field,
860
- headerName: el.label,
861
- minWidth: 80,
862
- width: 80,
863
- filter: false,
864
- sortable: false,
865
- editable: false,
866
- filterParams,
867
- pinned: el.pinned,
868
- cellRenderer: params => {
869
- if (params.value) {
870
- 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
+ }
871
1013
  }
872
- else {
873
- 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
+ }
874
1034
  }
875
- }
876
- });
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
+ }
877
1114
  }
878
1115
  else {
879
- this.columnDefs.push({
880
- colId: el.id ? el.id : el.field,
881
- field: el.field,
882
- headerName: el.label,
883
- filter,
884
- sortable,
885
- editable: el.editable,
886
- filterParams,
887
- pinned: el.pinned,
888
- minWidth: el.minWidth ? el.minWidth : null
889
- });
1116
+ this.autoGroupColumnDef.field = el.field;
890
1117
  }
891
- }
892
- else {
893
- this.autoGroupColumnDef.field = el.field;
894
- }
895
- });
896
- if (this.actionItems.length > 0) {
897
- this.columnDefs.push({
898
- filter: false,
899
- headerName: '',
900
- minWidth: this.actionWidth,
901
- resizable: true,
902
- pinned: true,
903
- sortable: false,
904
- field: 'actions',
905
- cellRenderer: ActionsCellRenderer,
906
- cellRendererParams: {
907
- onClick: (params) => {
908
- 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;
909
1142
  }
910
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
+ });
911
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
+ }
912
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;
913
1180
  }
914
1181
  }
915
1182
  cellDoubleClicked(e) {
916
- console.log(e);
917
1183
  this.onClicked.emit({ ...e.data, colId: e.column.getColId() });
918
1184
  }
919
1185
  handleClick(item) {
920
1186
  this.onToolbar.emit(item);
921
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
+ }
922
1231
  refresh(purge = false) {
923
1232
  if (this.rowModelType == 'serverSide') {
924
1233
  this.gridApi.refreshServerSide({ purge });
@@ -971,7 +1280,13 @@ class GridComponent {
971
1280
  });
972
1281
  }
973
1282
  clearFilter() {
1283
+ this.visibleFilterBox = false;
1284
+ this._filterBoxItems.forEach((el) => {
1285
+ el.value = null;
1286
+ });
974
1287
  this.gridApi.setFilterModel(null);
1288
+ this.gridApi.onFilterChanged();
1289
+ this.filterItemsValues = [];
975
1290
  this.refresh();
976
1291
  }
977
1292
  refreshParentNode(id) {
@@ -982,89 +1297,154 @@ class GridComponent {
982
1297
  route: route
983
1298
  });
984
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
+ }
985
1366
  createServerSideDatasource() {
986
1367
  return {
987
1368
  getRows: (params) => {
988
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
+ };
989
1380
  if (Object.keys(params.request.filterModel).length > 0) {
990
- filter = {
991
- disable: false,
992
- field: null,
993
- logic: 'AND',
994
- filters: [],
995
- ignoreCase: null,
996
- operator: null,
997
- truncateDate: null,
998
- value: null,
999
- };
1000
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
+ }
1001
1396
  if (params.request.filterModel[key].filterType == 'custom-date') {
1002
1397
  if (params.request.filterModel[key].dateFrom && params.request.filterModel[key].dateTo) {
1003
- filter.filters.push({
1004
- disable: false,
1005
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1006
- logic: 'AND',
1007
- filters: null,
1008
- ignoreCase: false,
1009
- operator: FilterOperator.between,
1010
- truncateDate: true,
1011
- value: [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo]
1012
- });
1398
+ operator = FilterOperator.between;
1399
+ value = [params.request.filterModel[key].dateFrom, params.request.filterModel[key].dateTo];
1013
1400
  }
1014
1401
  else if (params.request.filterModel[key].dateFrom) {
1015
- filter.filters.push({
1016
- disable: false,
1017
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1018
- logic: 'AND',
1019
- filters: null,
1020
- ignoreCase: false,
1021
- operator: FilterOperator.truncGreaterThanEqual,
1022
- truncateDate: true,
1023
- value: params.request.filterModel[key].dateFrom,
1024
- });
1402
+ operator = FilterOperator.truncGreaterThanEqual;
1403
+ value = params.request.filterModel[key].dateFrom;
1025
1404
  }
1026
1405
  else if (params.request.filterModel[key].dateTo && params.request.filterModel[key].dateTo != "") {
1027
- filter.filters.push({
1028
- disable: false,
1029
- field: key == 'ag-Grid-AutoColumn' ? this._treeGroupColumn : key,
1030
- logic: 'AND',
1031
- filters: null,
1032
- ignoreCase: false,
1033
- operator: FilterOperator.truncLessThanOrEqual,
1034
- truncateDate: true,
1035
- value: params.request.filterModel[key].dateTo,
1036
- });
1406
+ operator = FilterOperator.truncLessThanOrEqual;
1407
+ value = params.request.filterModel[key].dateTo;
1037
1408
  }
1038
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
+ }
1039
1414
  else {
1040
- const operation = FilterOperator[params.request.filterModel[key].type];
1041
- let ignoreCase = true;
1042
- const findEl = this._column.find((el) => el.field == key);
1043
- let field = null;
1044
- if (key == 'ag-Grid-AutoColumn') {
1045
- field = this._treeGroupColumn;
1046
- }
1047
- else {
1048
- field = key;
1049
- if (findEl.searchField != null) {
1050
- field = findEl.searchField;
1051
- }
1415
+ if (FilterOperator[params.request.filterModel[key].type]) {
1416
+ operator = FilterOperator[params.request.filterModel[key].type];
1052
1417
  }
1418
+ ignoreCase = true;
1419
+ value = params.request.filterModel[key].filter ? params.request.filterModel[key].filter : params.request.filterModel[key].type;
1053
1420
  if (findEl && findEl.type == 'enum') {
1054
1421
  ignoreCase = false;
1055
1422
  }
1056
- filter.filters.push({
1057
- disable: false,
1058
- field,
1059
- logic: 'AND',
1060
- filters: null,
1061
- ignoreCase,
1062
- operator: operation ? operation : FilterOperator.equals,
1063
- truncateDate: true,
1064
- 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
1065
1430
  });
1066
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
+ });
1067
1445
  }
1446
+ this._cdr.detectChanges();
1447
+ // this.filterItemsValues = structuredClone(this.filterItemsValues);
1068
1448
  }
1069
1449
  let sorts = [];
1070
1450
  if (params.request.sortModel.length) {
@@ -1092,6 +1472,40 @@ class GridComponent {
1092
1472
  const requestParams = {
1093
1473
  parentNode: params.parentNode.data
1094
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;
1095
1509
  this.fetchData(gridFilter, requestParams).then(data => {
1096
1510
  params.success({
1097
1511
  rowData: data.items,
@@ -1106,14 +1520,23 @@ class GridComponent {
1106
1520
  }
1107
1521
  };
1108
1522
  }
1109
- ngOnInit() { }
1110
- 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 }); }
1111
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: GridComponent, selector: "app-grid", inputs: { actionWidth: "actionWidth", label: "label", isRowSelection: "isRowSelection", rowModelType: "rowModelType", serverSideSort: "serverSideSort", serverSideFilter: "serverSideFilter", isToolbar: "isToolbar", rtl: "rtl", paginationPageSize: "paginationPageSize", paginationPageSizeSelector: "paginationPageSizeSelector", enableAdvancedFilter: "enableAdvancedFilter", treeModel: "treeModel", isLeaf: "isLeaf", rowData: "rowData", autoColumnSize: "autoColumnSize", showAdvancedButton: "showAdvancedButton", actionItems: "actionItems", toolbarItems: "toolbarItems", treeGroupColumn: "treeGroupColumn", fetchData: "fetchData", column: "column" }, outputs: { onAction: "onAction", onToolbar: "onToolbar", onClicked: "onClicked", rowSelectionChange: "rowSelectionChange" }, ngImport: i0, template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div\n class=\"flex justify-between items-center mb-4 pb-4 border-b border-b-slate-200\"\n *ngIf=\"isToolbar\"\n>\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button\n nz-button\n [nzLoading]=\"item.loading ? item.loading : false\"\n (click)=\"handleClick(item)\"\n [nzType]=\"item.type\"\n >\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <button nz-button (click)=\"clearFilter()\" nzType=\"default\">\n <span nz-icon nzType=\"clear\"></span>\n \u067E\u0627\u06A9\u0633\u0627\u0632\u06CC\n </button>\n\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<div>\n <ng-content></ng-content>\n</div>\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 48px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n #grid\n/>\n", dependencies: [{ kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "directive", type: i4.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] }); }
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" }] }); }
1112
1535
  }
1113
1536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, decorators: [{
1114
1537
  type: Component,
1115
- 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" }]
1116
- }], 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: [{
1117
1540
  type: Output
1118
1541
  }], onToolbar: [{
1119
1542
  type: Output
@@ -1125,6 +1548,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1125
1548
  type: Input
1126
1549
  }], label: [{
1127
1550
  type: Input
1551
+ }], id: [{
1552
+ type: Input
1128
1553
  }], isRowSelection: [{
1129
1554
  type: Input
1130
1555
  }], rowModelType: [{
@@ -1159,6 +1584,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1159
1584
  type: Input
1160
1585
  }], treeGroupColumn: [{
1161
1586
  type: Input
1587
+ }], filterItems: [{
1588
+ type: Input
1162
1589
  }], fetchData: [{
1163
1590
  type: Input
1164
1591
  }], column: [{
@@ -1181,7 +1608,7 @@ class ActionsCellRenderer {
1181
1608
  this.params.onClick({ data: this.params.data, event: item.code, id: this.params.node.id });
1182
1609
  }
1183
1610
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1184
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ActionsCellRenderer, selector: "app-button-renderer", ngImport: i0, template: "<div class=\"h-full flex gap-2 items-center\">\n <button mat-button class=\"min-w-[30px] min-h-[30px] h-[30px]\" *ngFor=\"let item of items\" nz-tooltip [nzTooltipTitle]=\"item.alt\" nzTooltipPlacement=\"bottom\" (click)=\"handleClick(item)\">\n <div class=\"flex justify-center items-center\">\n <i [class]=\"item.icon\"></i>\n </div>\n </button>\n \n</div>", dependencies: [{ kind: "directive", type: 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"] }] }); }
1185
1612
  }
1186
1613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionsCellRenderer, decorators: [{
1187
1614
  type: Component,
@@ -1226,7 +1653,7 @@ class CaptchaComponent {
1226
1653
  this.generateCode();
1227
1654
  }
1228
1655
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1229
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaptchaComponent, selector: "app-captcha", outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "captchaCanvas", first: true, predicate: ["canvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"rounded-xl border border-slate-200 relative\">\n <canvas #canvas class=\"w-full h-[80px]\"></canvas>\n <div class=\"absolute left-2 top-0 bottom-0 m-auto z-10 flex justify-center items-center\">\n <button nz-button nzShape=\"circle\" type=\"button\" (click)=\"generateCode()\">\n <span nz-icon nzType=\"undo\" nzTheme=\"outline\"></span>\n </button>\n </div>\n</div>", dependencies: [{ kind: "directive", type: 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"] }] }); }
1230
1657
  }
1231
1658
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaptchaComponent, decorators: [{
1232
1659
  type: Component,
@@ -1262,6 +1689,9 @@ class MapComponent {
1262
1689
  L.tileLayer('https://raster.snappmaps.ir/styles/snapp-style/{z}/{x}/{y}@2x.webp', {
1263
1690
  maxZoom: 18,
1264
1691
  }).addTo(this.map);
1692
+ L.Draw.Tooltip.prototype.updateContent = function () {
1693
+ return this;
1694
+ };
1265
1695
  this.map.addLayer(this.drawnItems);
1266
1696
  const drawControl = new L.Control.Draw({
1267
1697
  edit: this.editable ? {
@@ -1319,7 +1749,7 @@ class MapComponent {
1319
1749
  });
1320
1750
  }
1321
1751
  clearMap() {
1322
- this.map.eachLayer((layer) => {
1752
+ this.map?.eachLayer((layer) => {
1323
1753
  if (!(layer instanceof L.TileLayer)) {
1324
1754
  this.map.removeLayer(layer);
1325
1755
  }
@@ -1374,7 +1804,7 @@ class SpinnerComponent {
1374
1804
  constructor() { }
1375
1805
  ngOnInit() { }
1376
1806
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1377
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SpinnerComponent, selector: "app-spinner", ngImport: i0, template: "<div class=\"w-full h-full absolute top-0 left-0 flex justify-center items-center bg-white z-10\">\n <nz-spin nzSimple nzSize=\"large\" nzSimple></nz-spin>\n</div>", dependencies: [{ kind: "component", type: i1$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"] }] }); }
1378
1808
  }
1379
1809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SpinnerComponent, decorators: [{
1380
1810
  type: Component,
@@ -1431,7 +1861,7 @@ class ImageCropperPopover extends PopoverComponent {
1431
1861
  ngOnInit() {
1432
1862
  }
1433
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 }); }
1434
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImageCropperPopover, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<image-cropper\n [imageFile]=\"data.file\"\n [maintainAspectRatio]=\"true\"\n [aspectRatio]=\"data.aspectRatio\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (loadImageFailed)=\"loadImageFailed()\"\n class=\"max-h-[400px]\"\n></image-cropper>", dependencies: [{ kind: "component", type: i2$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"] }] }); }
1435
1865
  }
1436
1866
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageCropperPopover, decorators: [{
1437
1867
  type: Component,
@@ -1564,7 +1994,6 @@ class UploaderComponent {
1564
1994
  this.loading = true;
1565
1995
  break;
1566
1996
  case 'done':
1567
- debugger;
1568
1997
  this.getBase64(this._fileUploaded, (img) => {
1569
1998
  this.loading = false;
1570
1999
  this.avatarUrl = img;
@@ -1592,7 +2021,7 @@ class UploaderComponent {
1592
2021
  }
1593
2022
  ngOnInit() { }
1594
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 }); }
1595
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploaderComponent, selector: "app-uploader", inputs: { maxWithSize: "maxWithSize", cropper: "cropper", aspectRatio: "aspectRatio", isCompress: "isCompress", avatar: "avatar" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "<nz-upload class=\"w-[128px] h-[128px] overflow-hidden\" nzAction=\"{{env.apiUrl}}/file\" nzName=\"file\"\n nzListType=\"picture-card\" [nzShowUploadList]=\"false\" [nzBeforeUpload]=\"beforeUpload\"\n (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n @if (!avatarUrl) {\n <span class=\"upload-icon\" nz-icon [nzType]=\"loading ? 'loading' : 'plus'\"></span>\n <div class=\"ant-upload-text\">Upload</div>\n } @else {\n <img [src]=\"avatarUrl\" class=\"max-w-full max-h-full\" />\n }\n</nz-upload>", dependencies: [{ kind: "directive", type: 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"] }] }); }
1596
2025
  }
1597
2026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploaderComponent, decorators: [{
1598
2027
  type: Component,
@@ -1681,7 +2110,7 @@ class UploadFileComponent {
1681
2110
  }
1682
2111
  ngOnInit() { }
1683
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 }); }
1684
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UploadFileComponent, selector: "app-upload-file", inputs: { acceptFileType: "acceptFileType", type: "type" }, outputs: { onUploaded: "onUploaded" }, ngImport: i0, template: "@if(type == 'serverSide'){\n <nz-upload nzName=\"file\" nzType=\"drag\"\n [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChange($event)\" [nzCustomRequest]=\"customRequest\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n} @else {\n <nz-upload nzName=\"file\" nzType=\"drag\" [nzBeforeUpload]=\"beforeUpload\" (nzChange)=\"handleChangeClientSide($event)\">\n <p class=\"ant-upload-drag-icon\">\n <span nz-icon nzType=\"inbox\"></span>\n </p>\n <p class=\"ant-upload-text\">\u0628\u0631\u0627\u06CC \u0622\u067E\u0644\u0648\u062F\u060C \u0631\u0648\u06CC \u0641\u0627\u06CC\u0644 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F \u06CC\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u06CC\u0646 \u0642\u0633\u0645\u062A \u0628\u06A9\u0634\u06CC\u062F</p>\n <p class=\"ant-upload-hint\">\n \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u0628\u0631\u0627\u06CC \u0627\u067E\u0644\u0648\u062F \u06F3 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC \u0628\u0627\u0634\u062F\n </p>\n </nz-upload>\n}", dependencies: [{ kind: "directive", type: 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"] }] }); }
1685
2114
  }
1686
2115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UploadFileComponent, decorators: [{
1687
2116
  type: Component,
@@ -1723,7 +2152,7 @@ class CharInputDirective {
1723
2152
  this.renderer.setProperty(this.el.nativeElement, 'value', value);
1724
2153
  return value;
1725
2154
  }
1726
- 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 }); }
1727
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 }); }
1728
2157
  }
1729
2158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CharInputDirective, decorators: [{
@@ -1731,7 +2160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1731
2160
  args: [{
1732
2161
  selector: '[charInput]',
1733
2162
  }]
1734
- }], 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: [{
1735
2164
  type: Input
1736
2165
  }], allowEnglishChar: [{
1737
2166
  type: Input
@@ -1767,7 +2196,7 @@ class EnglishNumberInputDirective {
1767
2196
  this.renderer.setProperty(this.el.nativeElement, 'value', value);
1768
2197
  return value;
1769
2198
  }
1770
- 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 }); }
1771
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 }); }
1772
2201
  }
1773
2202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EnglishNumberInputDirective, decorators: [{
@@ -1775,7 +2204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1775
2204
  args: [{
1776
2205
  selector: '[englishNumberInput]',
1777
2206
  }]
1778
- }], 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: [{
1779
2208
  type: HostListener,
1780
2209
  args: ['input', ['$event']]
1781
2210
  }] } });
@@ -1796,7 +2225,6 @@ class ImageLoaderDirective {
1796
2225
  set imageSrc(v) {
1797
2226
  if (v != null) {
1798
2227
  this._http.getFile(v).then((res) => {
1799
- debugger;
1800
2228
  this.renderer.setAttribute(this.el.nativeElement, 'src', res);
1801
2229
  });
1802
2230
  }
@@ -1873,7 +2301,7 @@ class AuthGuard {
1873
2301
  this._router.navigate(['/auth']);
1874
2302
  return false;
1875
2303
  }
1876
- 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 }); }
1877
2305
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
1878
2306
  }
1879
2307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthGuard, decorators: [{
@@ -1881,7 +2309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1881
2309
  args: [{
1882
2310
  providedIn: 'root'
1883
2311
  }]
1884
- }], ctorParameters: () => [{ type: i1$6.Router }] });
2312
+ }], ctorParameters: () => [{ type: i1$5.Router }] });
1885
2313
 
1886
2314
  class MasterLayout {
1887
2315
  constructor(_service, _confirm, componentFactoryResolver) {
@@ -1890,6 +2318,7 @@ class MasterLayout {
1890
2318
  this.componentFactoryResolver = componentFactoryResolver;
1891
2319
  this.isCollapsed = false;
1892
2320
  this.menuItems = [];
2321
+ this.userName = null;
1893
2322
  }
1894
2323
  logout() {
1895
2324
  this._confirm.confirm(() => {
@@ -1903,6 +2332,14 @@ class MasterLayout {
1903
2332
  const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
1904
2333
  this.container.createComponent(componentFactory);
1905
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
+ }
1906
2343
  ngAfterViewInit() {
1907
2344
  setTimeout(() => {
1908
2345
  // this.loadComponent(this._ac.);
@@ -1910,13 +2347,16 @@ class MasterLayout {
1910
2347
  }
1911
2348
  ngOnInit() {
1912
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
+ }
1913
2353
  }
1914
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 }); }
1915
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MasterLayout, selector: "ng-component", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<nz-layout class=\"app-layout\">\n <nz-sider class=\"menu-sidebar bg-white\" nzCollapsible nzWidth=\"256px\" nzBreakpoint=\"md\"\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"] }] }); }
1916
2356
  }
1917
2357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MasterLayout, decorators: [{
1918
2358
  type: Component,
1919
- 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"] }]
1920
2360
  }], ctorParameters: () => [{ type: SharedService }, { type: ConfirmService }, { type: i0.ComponentFactoryResolver }], propDecorators: { container: [{
1921
2361
  type: ViewChild,
1922
2362
  args: ['dynamicComponentContainer', { read: ViewContainerRef }]
@@ -1926,7 +2366,7 @@ class BlankLayout {
1926
2366
  constructor() { }
1927
2367
  ngOnInit() { }
1928
2368
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1929
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BlankLayout, selector: "ng-component", ngImport: i0, template: "<div class=\"w-full h-full\">\n <router-outlet></router-outlet>\n</div>", dependencies: [{ kind: "directive", type: i1$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"] }] }); }
1930
2370
  }
1931
2371
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BlankLayout, decorators: [{
1932
2372
  type: Component,
@@ -2079,7 +2519,8 @@ const Components = [
2079
2519
  SpinnerComponent,
2080
2520
  UploaderComponent,
2081
2521
  UploadFileComponent,
2082
- DateFilter
2522
+ DateFilter,
2523
+ TimeFilter
2083
2524
  ];
2084
2525
  const Popover = [
2085
2526
  ImageCropperPopover
@@ -2122,9 +2563,13 @@ const Modules = [
2122
2563
  FormsModule,
2123
2564
  NzInputModule,
2124
2565
  NzFormModule,
2566
+ NzSelectModule,
2125
2567
  NzUploadModule,
2126
2568
  NzCollapseModule,
2569
+ NzTreeSelectModule,
2127
2570
  ImageCropperComponent,
2571
+ NzPopoverModule,
2572
+ QeydarDatePickerModule,
2128
2573
  TranslateModule.forRoot({
2129
2574
  defaultLanguage: 'fa',
2130
2575
  useDefaultLang: true,
@@ -2145,7 +2590,8 @@ class SharedModule {
2145
2590
  SpinnerComponent,
2146
2591
  UploaderComponent,
2147
2592
  UploadFileComponent,
2148
- DateFilter, ImageCropperPopover, EnglishNumberInputDirective,
2593
+ DateFilter,
2594
+ TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
2149
2595
  CharInputDirective,
2150
2596
  MaskDirective,
2151
2597
  ImageLoaderDirective,
@@ -2167,9 +2613,13 @@ class SharedModule {
2167
2613
  FormsModule,
2168
2614
  NzInputModule,
2169
2615
  NzFormModule,
2616
+ NzSelectModule,
2170
2617
  NzUploadModule,
2171
2618
  NzCollapseModule,
2172
- ImageCropperComponent, i1$4.TranslateModule], exports: [MasterLayout,
2619
+ NzTreeSelectModule,
2620
+ ImageCropperComponent,
2621
+ NzPopoverModule,
2622
+ QeydarDatePickerModule, i1$3.TranslateModule], exports: [MasterLayout,
2173
2623
  BlankLayout, GridComponent,
2174
2624
  ActionsCellRenderer,
2175
2625
  CaptchaComponent,
@@ -2177,7 +2627,8 @@ class SharedModule {
2177
2627
  SpinnerComponent,
2178
2628
  UploaderComponent,
2179
2629
  UploadFileComponent,
2180
- DateFilter, ImageCropperPopover, EnglishNumberInputDirective,
2630
+ DateFilter,
2631
+ TimeFilter, ImageCropperPopover, EnglishNumberInputDirective,
2181
2632
  CharInputDirective,
2182
2633
  MaskDirective,
2183
2634
  ImageLoaderDirective,
@@ -2258,5 +2709,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2258
2709
  * Generated bundle index. Do not edit.
2259
2710
  */
2260
2711
 
2261
- export { ActionsCellRenderer, AuthGuard, BlankLayout, CaptchaComponent, CharInputDirective, ConfirmService, ContentType, DateFilter, DialogService, EnglishNumberInputDirective, FilterOperator, FormService, GridComponent, HttpLoaderFactory, ImageCropperPopover, ImageLoaderDirective, JDatePipe, MapComponent, MaskDirective, MasterLayout, PieChart, PopoverComponent, SelectModel, SharedModule, SharedService, SpinnerComponent, TimerPipe, ToastService, UploadFileComponent, UploaderComponent, VideoLoaderDirective, initializeApp };
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 };
2262
2713
  //# sourceMappingURL=fixa-admin.mjs.map