@unipin/angular-applet 17.3.1 → 18.0.0

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.
Files changed (64) hide show
  1. package/esm2022/lib/components/approval/detail/approval-detail.component.mjs +3 -3
  2. package/esm2022/lib/components/approval/form/approval-form.component.mjs +3 -3
  3. package/esm2022/lib/components/approval/list/approval-list.component.mjs +3 -3
  4. package/esm2022/lib/components/approval/services/approval.service.mjs +3 -3
  5. package/esm2022/lib/components/audit/detail/audit-detail.component.mjs +3 -3
  6. package/esm2022/lib/components/audit/list/audit-list.component.mjs +3 -3
  7. package/esm2022/lib/components/audit/service/audit.service.mjs +3 -3
  8. package/esm2022/lib/components/buttons/group/btn-group.component.mjs +5 -5
  9. package/esm2022/lib/components/buttons/loading/btn-loading.component.mjs +3 -3
  10. package/esm2022/lib/components/containers/applet-container/applet-container.component.mjs +21 -8
  11. package/esm2022/lib/components/containers/colum-header-container/column-header-container.component.mjs +5 -5
  12. package/esm2022/lib/components/containers/column-container/column-container.component.mjs +25 -9
  13. package/esm2022/lib/components/containers/column-container/directives/lazy-route.directive.mjs +3 -3
  14. package/esm2022/lib/components/containers/list-container/interfaces/list-container-config.interface.mjs +1 -1
  15. package/esm2022/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.mjs +8 -7
  16. package/esm2022/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.mjs +8 -7
  17. package/esm2022/lib/components/containers/modal-container/modal-container.component.mjs +9 -8
  18. package/esm2022/lib/components/filter/filter.component.mjs +5 -5
  19. package/esm2022/lib/components/forms/currency-input/form-currency-input.component.mjs +153 -0
  20. package/esm2022/lib/components/forms/date/form-date.component.mjs +6 -6
  21. package/esm2022/lib/components/forms/image-picker/directives/drag-n-drop.directive.mjs +3 -3
  22. package/esm2022/lib/components/forms/image-picker/form-image-picker.component.mjs +3 -3
  23. package/esm2022/lib/components/forms/index.mjs +2 -1
  24. package/esm2022/lib/components/forms/input/form-input.component.mjs +3 -3
  25. package/esm2022/lib/components/forms/number/form-number.component.mjs +3 -3
  26. package/esm2022/lib/components/forms/number/pipes/locale-number.pipe.mjs +3 -3
  27. package/esm2022/lib/components/forms/password/form-password.component.mjs +3 -3
  28. package/esm2022/lib/components/forms/searchable-select/form-searchable-select.component.mjs +3 -3
  29. package/esm2022/lib/components/forms/select/form-select.component.mjs +3 -3
  30. package/esm2022/lib/components/forms/textarea/form-textarea.component.mjs +3 -3
  31. package/esm2022/lib/components/grids/grid-pagination/grid-pagination.component.mjs +3 -3
  32. package/esm2022/lib/components/grids/grid-snapshot/grid-snapshot.component.mjs +3 -3
  33. package/esm2022/lib/components/grids/services/grid.service.mjs +9 -5
  34. package/esm2022/lib/components/index.mjs +2 -2
  35. package/esm2022/lib/components/tabs/tab-content/tab-content.component.mjs +3 -3
  36. package/esm2022/lib/components/tabs/tab-group/tab-group.component.mjs +3 -3
  37. package/esm2022/lib/components/tabs/tabs.component.module.mjs +4 -4
  38. package/esm2022/lib/interceptors/header/header.interceptor.mjs +3 -3
  39. package/esm2022/lib/interceptors/refresh-token/refresh-token.interceptor.mjs +3 -3
  40. package/esm2022/lib/modules/permission/directive/permission.directive.mjs +3 -3
  41. package/esm2022/lib/modules/permission/pages/401/unauthorized.page.mjs +3 -3
  42. package/esm2022/lib/modules/permission/pages/loading/loading.page.mjs +3 -3
  43. package/esm2022/lib/modules/permission/permission.module.mjs +4 -4
  44. package/esm2022/lib/modules/permission/services/permission.service.mjs +3 -3
  45. package/esm2022/lib/resolvers/auth/auth.resolver.mjs +3 -3
  46. package/esm2022/lib/services/auth/auth.service.mjs +11 -9
  47. package/esm2022/lib/services/country/country.service.mjs +3 -3
  48. package/esm2022/lib/services/currency/currency.service.mjs +9 -13
  49. package/esm2022/lib/services/profile/profile.service.mjs +3 -3
  50. package/esm2022/public-api.mjs +2 -2
  51. package/fesm2022/unipin-angular-applet.mjs +1509 -1334
  52. package/fesm2022/unipin-angular-applet.mjs.map +1 -1
  53. package/lib/components/containers/applet-container/applet-container.component.d.ts +6 -2
  54. package/lib/components/containers/column-container/column-container.component.d.ts +2 -0
  55. package/lib/components/containers/list-container/interfaces/list-container-config.interface.d.ts +2 -3
  56. package/lib/components/containers/modal-container/modal-container.component.d.ts +2 -1
  57. package/lib/components/forms/currency-input/form-currency-input.component.d.ts +55 -0
  58. package/lib/components/forms/index.d.ts +1 -0
  59. package/lib/components/grids/services/grid.service.d.ts +1 -1
  60. package/lib/components/index.d.ts +1 -1
  61. package/lib/services/currency/currency.service.d.ts +1 -1
  62. package/package.json +4 -4
  63. package/public-api.d.ts +1 -1
  64. package/src/assets/scss/grid.scss +9 -0
@@ -6,15 +6,15 @@ import * as i1 from '@ionic/angular';
6
6
  import { IonButton, IonicModule, NavController } from '@ionic/angular';
7
7
  import * as i1$2 from '@angular/router';
8
8
  import { Router, RouterModule, NavigationEnd } from '@angular/router';
9
+ import { Subject, fromEvent, distinctUntilChanged, debounceTime, tap, switchMap, map, catchError, of, concat, filter, throwError } from 'rxjs';
9
10
  import { platformBrowser } from '@angular/platform-browser';
10
- import { Subject, distinctUntilChanged, debounceTime, tap, switchMap, map, catchError, of, concat, filter, throwError } from 'rxjs';
11
11
  import * as i1$1 from 'apollo-angular';
12
12
  import { gql } from 'apollo-angular';
13
13
  import * as i3 from 'angular-split';
14
14
  import { AngularSplitModule } from 'angular-split';
15
- import * as i1$3 from '@angular/forms';
15
+ import * as i3$1 from '@angular/forms';
16
16
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
17
- import * as i3$1 from '@ng-select/ng-select';
17
+ import * as i3$2 from '@ng-select/ng-select';
18
18
  import { NgSelectModule } from '@ng-select/ng-select';
19
19
  import { ModuleRegistry } from '@ag-grid-community/core';
20
20
  export { GridApi } from '@ag-grid-community/core';
@@ -42,10 +42,10 @@ class ButtonLoadingComponent {
42
42
  this.btn.disabled = !this.btn.disabled;
43
43
  this.ch.markForCheck();
44
44
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ButtonLoadingComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ButtonLoadingComponent, isStandalone: true, selector: "up-btn-loading", inputs: { disabled: "disabled", form: "form", type: "type", fill: "fill", color: "color" }, outputs: { onClick: "onClick" }, viewQueries: [{ propertyName: "btn", first: true, predicate: IonButton, descendants: true }], ngImport: i0, template: "<ion-button type=\"{{ type }}\" fill=\"{{ fill }}\" color=\"{{ color }}\" expand=\"block\" mode=\"md\" [disabled]=\"disabled\" [form]=\"form\" (click)=\"clickBtn()\">\n <ion-spinner *ngIf=\"isLoading;else showIcon\" />\n \n <ng-template #showIcon>\n <ng-content select=\"ion-icon\" />\n </ng-template>\n\n <ng-content />\n</ion-button>\n", styles: ["ion-spinner{width:14px;height:14px;margin-right:8px}circle{stroke-width:8}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonLoadingComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ButtonLoadingComponent, isStandalone: true, selector: "up-btn-loading", inputs: { disabled: "disabled", form: "form", type: "type", fill: "fill", color: "color" }, outputs: { onClick: "onClick" }, viewQueries: [{ propertyName: "btn", first: true, predicate: IonButton, descendants: true }], ngImport: i0, template: "<ion-button type=\"{{ type }}\" fill=\"{{ fill }}\" color=\"{{ color }}\" expand=\"block\" mode=\"md\" [disabled]=\"disabled\" [form]=\"form\" (click)=\"clickBtn()\">\n <ion-spinner *ngIf=\"isLoading;else showIcon\" />\n \n <ng-template #showIcon>\n <ng-content select=\"ion-icon\" />\n </ng-template>\n\n <ng-content />\n</ion-button>\n", styles: ["ion-spinner{width:14px;height:14px;margin-right:8px}circle{stroke-width:8}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ButtonLoadingComponent, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonLoadingComponent, decorators: [{
49
49
  type: Component,
50
50
  args: [{ standalone: true, selector: 'up-btn-loading', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
51
51
  IonicModule,
@@ -88,16 +88,16 @@ class ButtonGroupComponent {
88
88
  this.activeIndex = i;
89
89
  this.popoverCtrl.dismiss();
90
90
  }
91
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ButtonGroupComponent, deps: [{ token: 'id', attribute: true }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
92
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ButtonGroupComponent, isStandalone: true, selector: "up-btn-group", inputs: { config: "config" }, host: { properties: { "class.d-none": "this.isHidden" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"config.length > 0\">\n <up-btn-loading class=\"flex-grow-1\" [type]=\"config[activeIndex].type\" [disabled]=\"config[activeIndex].disabled\" [form]=\"config[activeIndex].form\" [color]=\"config[activeIndex].color\" (onClick)=\"clickBtn($event);\">\n <ion-icon class=\"me-2\" name=\"{{ config[activeIndex].icon }}\" *ngIf=\"config[activeIndex].icon\" />\n {{ config[activeIndex].label }}\n </up-btn-loading>\n\n <ion-button class=\"flex-shrink-0\" id=\"btn-{{ id }}\" [color]=\"config[activeIndex].color\" [disabled]=\"config.length < 2\">\n <ion-icon name=\"caret-down-outline\" />\n </ion-button>\n\n <ion-popover trigger=\"btn-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"item px-2 py-3 cursor-pointer border-bottom d-flex gap-2\" *ngFor=\"let c of config; let i = index\" (click)=\"change(i);\">\n <div class=\"icon flex-shrink-0\">\n <ion-icon name=\"checkmark\" *ngIf=\"i === activeIndex\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"fw-medium\">{{ c.label }}</div>\n <div class=\"f12 pt-1\" *ngIf=\"c.description\">\n {{ c.description }}\n </div>\n </div>\n </div>\n </ng-template>\n </ion-popover>\n</ng-container>\n", styles: [":host{display:flex}up-btn-loading ::ng-deep ion-button{--border-radius: 4px 0 0 4px}ion-button::part(native){border-radius:0 4px 4px 0;border-left:1px solid rgba(255,255,255,.3)}.item:hover{color:#ed6b26;background:#fef3ee}.item ion-icon{--ionicon-stroke-width: 64px}.item .icon{width:14px}.item .f12{color:#616161}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonPopover, selector: "ion-popover" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonLoadingComponent, selector: "up-btn-loading", inputs: ["disabled", "form", "type", "fill", "color"], outputs: ["onClick"] }] }); }
91
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonGroupComponent, deps: [{ token: 'id', attribute: true }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
92
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ButtonGroupComponent, isStandalone: true, selector: "up-btn-group", inputs: { config: "config" }, host: { properties: { "class.d-none": "this.isHidden" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"config.length > 0\">\n <up-btn-loading class=\"flex-grow-1\" [class.multi]=\"config.length > 1\" [type]=\"config[activeIndex].type\" [disabled]=\"config[activeIndex].disabled\" [form]=\"config[activeIndex].form\" [color]=\"config[activeIndex].color\" (onClick)=\"clickBtn($event);\">\n <ion-icon class=\"me-2\" name=\"{{ config[activeIndex].icon }}\" *ngIf=\"config[activeIndex].icon\" />\n {{ config[activeIndex].label }}\n </up-btn-loading>\n\n <ng-container *ngIf=\"config.length > 1\" >\n <ion-button class=\"flex-shrink-0\" id=\"btn-{{ id }}\" [color]=\"config[activeIndex].color\">\n <ion-icon name=\"caret-down-outline\" />\n </ion-button>\n \n <ion-popover trigger=\"btn-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"item px-2 py-3 cursor-pointer border-bottom d-flex gap-2\" *ngFor=\"let c of config; let i = index\" (click)=\"change(i);\">\n <div class=\"icon flex-shrink-0\">\n <ion-icon name=\"checkmark\" *ngIf=\"i === activeIndex\" />\n </div>\n \n <div class=\"flex-grow-1\">\n <div class=\"fw-medium\">{{ c.label }}</div>\n <div class=\"f12 pt-1\" *ngIf=\"c.description\">\n {{ c.description }}\n </div>\n </div>\n </div>\n </ng-template>\n </ion-popover>\n </ng-container>\n</ng-container>\n", styles: [":host{display:flex}up-btn-loading.multi ::ng-deep ion-button{--border-radius: 4px 0 0 4px}ion-button::part(native){border-radius:0 4px 4px 0;border-left:1px solid rgba(255,255,255,.3)}.item:hover{color:#ed6b26;background:#fef3ee}.item ion-icon{--ionicon-stroke-width: 64px}.item .icon{width:14px}.item .f12{color:#616161}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonPopover, selector: "ion-popover" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonLoadingComponent, selector: "up-btn-loading", inputs: ["disabled", "form", "type", "fill", "color"], outputs: ["onClick"] }] }); }
93
93
  }
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ButtonGroupComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ButtonGroupComponent, decorators: [{
95
95
  type: Component,
96
96
  args: [{ standalone: true, selector: 'up-btn-group', imports: [
97
97
  IonicModule,
98
98
  CommonModule,
99
99
  ButtonLoadingComponent
100
- ], template: "<ng-container *ngIf=\"config.length > 0\">\n <up-btn-loading class=\"flex-grow-1\" [type]=\"config[activeIndex].type\" [disabled]=\"config[activeIndex].disabled\" [form]=\"config[activeIndex].form\" [color]=\"config[activeIndex].color\" (onClick)=\"clickBtn($event);\">\n <ion-icon class=\"me-2\" name=\"{{ config[activeIndex].icon }}\" *ngIf=\"config[activeIndex].icon\" />\n {{ config[activeIndex].label }}\n </up-btn-loading>\n\n <ion-button class=\"flex-shrink-0\" id=\"btn-{{ id }}\" [color]=\"config[activeIndex].color\" [disabled]=\"config.length < 2\">\n <ion-icon name=\"caret-down-outline\" />\n </ion-button>\n\n <ion-popover trigger=\"btn-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"item px-2 py-3 cursor-pointer border-bottom d-flex gap-2\" *ngFor=\"let c of config; let i = index\" (click)=\"change(i);\">\n <div class=\"icon flex-shrink-0\">\n <ion-icon name=\"checkmark\" *ngIf=\"i === activeIndex\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"fw-medium\">{{ c.label }}</div>\n <div class=\"f12 pt-1\" *ngIf=\"c.description\">\n {{ c.description }}\n </div>\n </div>\n </div>\n </ng-template>\n </ion-popover>\n</ng-container>\n", styles: [":host{display:flex}up-btn-loading ::ng-deep ion-button{--border-radius: 4px 0 0 4px}ion-button::part(native){border-radius:0 4px 4px 0;border-left:1px solid rgba(255,255,255,.3)}.item:hover{color:#ed6b26;background:#fef3ee}.item ion-icon{--ionicon-stroke-width: 64px}.item .icon{width:14px}.item .f12{color:#616161}\n"] }]
100
+ ], template: "<ng-container *ngIf=\"config.length > 0\">\n <up-btn-loading class=\"flex-grow-1\" [class.multi]=\"config.length > 1\" [type]=\"config[activeIndex].type\" [disabled]=\"config[activeIndex].disabled\" [form]=\"config[activeIndex].form\" [color]=\"config[activeIndex].color\" (onClick)=\"clickBtn($event);\">\n <ion-icon class=\"me-2\" name=\"{{ config[activeIndex].icon }}\" *ngIf=\"config[activeIndex].icon\" />\n {{ config[activeIndex].label }}\n </up-btn-loading>\n\n <ng-container *ngIf=\"config.length > 1\" >\n <ion-button class=\"flex-shrink-0\" id=\"btn-{{ id }}\" [color]=\"config[activeIndex].color\">\n <ion-icon name=\"caret-down-outline\" />\n </ion-button>\n \n <ion-popover trigger=\"btn-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"item px-2 py-3 cursor-pointer border-bottom d-flex gap-2\" *ngFor=\"let c of config; let i = index\" (click)=\"change(i);\">\n <div class=\"icon flex-shrink-0\">\n <ion-icon name=\"checkmark\" *ngIf=\"i === activeIndex\" />\n </div>\n \n <div class=\"flex-grow-1\">\n <div class=\"fw-medium\">{{ c.label }}</div>\n <div class=\"f12 pt-1\" *ngIf=\"c.description\">\n {{ c.description }}\n </div>\n </div>\n </div>\n </ng-template>\n </ion-popover>\n </ng-container>\n</ng-container>\n", styles: [":host{display:flex}up-btn-loading.multi ::ng-deep ion-button{--border-radius: 4px 0 0 4px}ion-button::part(native){border-radius:0 4px 4px 0;border-left:1px solid rgba(255,255,255,.3)}.item:hover{color:#ed6b26;background:#fef3ee}.item ion-icon{--ionicon-stroke-width: 64px}.item .icon{width:14px}.item .f12{color:#616161}\n"] }]
101
101
  }], ctorParameters: () => [{ type: undefined, decorators: [{
102
102
  type: Attribute,
103
103
  args: ['id']
@@ -258,10 +258,10 @@ class PermissionService {
258
258
  `
259
259
  });
260
260
  }
261
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
262
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
263
263
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionService, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionService, decorators: [{
265
265
  type: Injectable,
266
266
  args: [{
267
267
  providedIn: 'root'
@@ -294,10 +294,10 @@ class LoadingPage {
294
294
  });
295
295
  }
296
296
  ngOnDestroy() { this.sub.unsubscribe(); }
297
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LoadingPage, deps: [{ token: 'LOADING_CONFIG' }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
298
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: LoadingPage, isStandalone: true, selector: "up-loading", host: { classAttribute: "d-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto" }, ngImport: i0, template: "<ion-spinner class=\"mb-4\" />\n<h3 class=\"text-center\">Please wait, we're preparing the applet. Drink water or coffee while waiting.</h3>\n", styles: ["ion-spinner{height:50px;width:50px}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }] }); }
297
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoadingPage, deps: [{ token: 'LOADING_CONFIG' }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
298
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: LoadingPage, isStandalone: true, selector: "up-loading", host: { classAttribute: "d-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto" }, ngImport: i0, template: "<ion-spinner class=\"mb-4\" />\n<h3 class=\"text-center\">Please wait, we're preparing the applet. Drink water or coffee while waiting.</h3>\n", styles: ["ion-spinner{height:50px;width:50px}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }] }); }
299
299
  }
300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LoadingPage, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LoadingPage, decorators: [{
301
301
  type: Component,
302
302
  args: [{ standalone: true, selector: 'up-loading', host: {
303
303
  class: 'd-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto'
@@ -328,10 +328,10 @@ class PermissionDirective {
328
328
  this.permissionService = permissionService;
329
329
  this.scope = 'GLOBAL';
330
330
  }
331
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Directive }); }
332
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: PermissionDirective, selector: "[hasPermission]", inputs: { hasPermission: "hasPermission", hasPermissionScope: "hasPermissionScope", hasPermissionType: "hasPermissionType" }, ngImport: i0 }); }
331
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Directive }); }
332
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: PermissionDirective, selector: "[hasPermission]", inputs: { hasPermission: "hasPermission", hasPermissionScope: "hasPermissionScope", hasPermissionType: "hasPermissionType" }, ngImport: i0 }); }
333
333
  }
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionDirective, decorators: [{
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionDirective, decorators: [{
335
335
  type: Directive,
336
336
  args: [{
337
337
  selector: '[hasPermission]'
@@ -363,11 +363,11 @@ const PermissionGuard = (route) => {
363
363
  };
364
364
 
365
365
  class PermissionModule {
366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
367
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: PermissionModule, declarations: [PermissionDirective], exports: [PermissionDirective] }); }
368
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionModule }); }
366
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
367
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: PermissionModule, declarations: [PermissionDirective], exports: [PermissionDirective] }); }
368
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionModule }); }
369
369
  }
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: PermissionModule, decorators: [{
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: PermissionModule, decorators: [{
371
371
  type: NgModule,
372
372
  args: [{
373
373
  declarations: [
@@ -380,10 +380,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
380
380
  }] });
381
381
 
382
382
  class UnauthorizedPage {
383
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: UnauthorizedPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
384
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: UnauthorizedPage, isStandalone: true, selector: "up-unauthorized", host: { classAttribute: "d-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto" }, ngImport: i0, template: "<ion-icon name=\"lock-closed\" class=\"mb-4\" />\n<h3 class=\"text-center\">Oops! You're not authorized to access this page.</h3>\n<p class=\"text-center\">Please log in or re-check your permissions.</p>\n", styles: ["ion-icon{font-size:5rem}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }] }); }
383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: UnauthorizedPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: UnauthorizedPage, isStandalone: true, selector: "up-unauthorized", host: { classAttribute: "d-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto" }, ngImport: i0, template: "<ion-icon name=\"lock-closed\" class=\"mb-4\" />\n<h3 class=\"text-center\">Oops! You're not authorized to access this page.</h3>\n<p class=\"text-center\">Please log in or re-check your permissions.</p>\n", styles: ["ion-icon{font-size:5rem}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }] }); }
385
385
  }
386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: UnauthorizedPage, decorators: [{
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: UnauthorizedPage, decorators: [{
387
387
  type: Component,
388
388
  args: [{ standalone: true, selector: 'up-unauthorized', host: {
389
389
  class: 'd-flex flex-column align-items-center justify-content-center h-100 w-75 mx-auto'
@@ -391,23 +391,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
391
391
  }] });
392
392
 
393
393
  class AppletContainerComponent {
394
- constructor(config, permissionService) {
394
+ constructor(config, ch, permissionService) {
395
395
  this.config = config;
396
+ this.ch = ch;
396
397
  this.permissionService = permissionService;
397
398
  this.isCollapsed = false;
398
399
  this.isHidden = Array(this.config.containers.length).fill(true);
400
+ this.isMenuActive = false;
399
401
  }
400
402
  ngOnInit() {
401
403
  this.sub = this.permissionService.permModules.subscribe((permModules) => {
402
404
  this.isHidden = this.config.containers.map(({ permModule }) => !permModules.includes(permModule));
403
405
  });
406
+ this.subEvent = fromEvent(window, 'menuEvent').subscribe((event) => {
407
+ this.isMenuActive = event.detail.isActive;
408
+ this.ch.markForCheck();
409
+ });
410
+ }
411
+ ngOnDestroy() {
412
+ this.sub.unsubscribe();
413
+ this.subEvent.unsubscribe();
404
414
  }
405
- ngOnDestroy() { this.sub.unsubscribe(); }
406
415
  toggleSidenav() { this.isCollapsed = !this.isCollapsed; }
407
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AppletContainerComponent, deps: [{ token: 'APPLET_CONFIG' }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: AppletContainerComponent, isStandalone: true, selector: "up-applet-container", host: { classAttribute: "d-flex h-100 w-100" }, ngImport: i0, template: "<div class=\"sidenav flex-shrink-0 h-100 py-4 d-flex flex-column\" [class.collapsed]=\"isCollapsed\">\n <div class=\"logo-container px-3 pb-3 border-bottom flex-shrink-0 position-relative d-flex align-items-center gap-3\">\n <img alt=\"Applet Icon\" width=\"44px\" height=\"44px\" class=\"rounded\" [src]=\"config.icon\" />\n\n <div class=\"info w-75 pe-2\">\n <div class=\"name fw-medium text-truncate\">{{ config.name }}</div>\n <div class=\"tenant pt-1 fw-medium\">v{{ config.version }}</div>\n </div>\n\n <button class=\"btn-close cursor-pointer position-absolute border-0 rounded-circle\" (click)=\"toggleSidenav()\">\n <ion-icon name=\"chevron-forward\" class=\"mt-1\" />\n </button>\n </div>\n\n <div class=\"flex-grow-1 px-3 pt-3 overflow-y-auto\">\n <a class=\"nav align-items-center text-decoration-none gap-2 rounded mb-1 {{ isHidden[i]? 'd-none' : 'd-flex' }}\" title=\"{{ c.label }}\" [routerLink]=\"c.path\" routerLinkActive=\"fw-medium\" *ngFor=\"let c of config.containers; let i = index\">\n <ion-icon name=\"{{ c.icon }}\" />\n <div class=\"text-truncate\">{{ c.label }}</div>\n </a>\n </div>\n\n <div class=\"flex-shrink-0 px-3 pt-3 border-top\" *ngIf=\"config.enabledSetting\">\n <a class=\"nav d-flex align-items-center text-decoration-none gap-2 rounded\" title=\"Setting\" routerLink=\"setting\" routerLinkActive=\"fw-medium\">\n <ion-icon name=\"settings\" />\n <div class=\"text-truncate\">Setting</div>\n </a>\n </div>\n</div>\n\n<div class=\"flex-grow-1 overflow-y-auto\">\n <ng-content />\n</div>\n", styles: [".info{display:none}.name{font-size:16px}.tenant{color:#757575}.sidenav{width:73px;background:#f8f9fb;transition:all .2s ease;border-right:1px solid #D1D1D1}.sidenav.collapsed{width:250px}.sidenav.collapsed .btn-close{transform:rotate(180deg)}.sidenav.collapsed .nav div,.sidenav.collapsed .info{display:block}.btn-close{width:35px;height:35px;bottom:23px;right:-17px;z-index:999;transition:all .3s ease;background-color:#f8f9fb;box-shadow:0 0 .15rem #616161}.btn-close ion-icon{color:#616161;font-size:16px}@media (max-width: 768px){.btn-close{right:-18px}.btn-close ion-icon{position:absolute;right:9px;bottom:10px}}.nav{padding:12px;color:#616161;transition:all .3s ease}.nav.fw-medium,.nav:hover{background-color:#fef3ee;color:#ed6b26!important}.nav ion-icon{font-size:20px}.nav div{display:none;font-size:16px}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkWithHrefDelegate, selector: "a[routerLink],area[routerLink]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
416
+ selectMenu() {
417
+ dispatchEvent(new CustomEvent('menuEvent', { detail: { isActive: false } }));
418
+ }
419
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AppletContainerComponent, deps: [{ token: 'APPLET_CONFIG' }, { token: i0.ChangeDetectorRef }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
420
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AppletContainerComponent, isStandalone: true, selector: "up-applet-container", host: { classAttribute: "d-flex h-100 w-100" }, ngImport: i0, template: "<div class=\"sidenav flex-shrink-0 h-100 py-4 d-flex flex-column\" [class.collapsed]=\"isCollapsed\" [class.show]=\"isMenuActive\">\n <div class=\"logo-container px-3 pb-3 border-bottom flex-shrink-0 position-relative d-flex align-items-center gap-3 d-none d-md-flex\">\n <img alt=\"Applet Icon\" width=\"44px\" height=\"44px\" class=\"rounded\" [src]=\"config.icon\" />\n\n <div class=\"info w-75 pe-2\">\n <div class=\"name fw-medium text-truncate\">{{ config.name }}</div>\n <div class=\"tenant pt-1 fw-medium\">v{{ config.version }}</div>\n </div>\n\n <button class=\"btn-close cursor-pointer position-absolute border-0 rounded-circle d-none d-md-block\" (click)=\"toggleSidenav()\">\n <ion-icon name=\"chevron-forward\" class=\"mt-1\" />\n </button>\n </div>\n\n <div class=\"flex-grow-1 px-3 pt-3 overflow-y-auto d-none d-md-block\" (click)=\"selectMenu()\">\n <a class=\"nav align-items-center text-decoration-none gap-2 rounded mb-1 {{ isHidden[i]? 'd-none' : 'd-flex' }}\" title=\"{{ c.label }}\" [routerLink]=\"c.path\" routerLinkActive=\"fw-medium\" *ngFor=\"let c of config.containers; let i = index\">\n <ion-icon name=\"{{ c.icon }}\" />\n <div class=\"text-truncate\">{{ c.label }}</div>\n </a>\n </div>\n\n <div class=\"flex-shrink-0 px-3 pt-3 border-top d-none d-md-block\" *ngIf=\"config.enabledSetting\" (click)=\"selectMenu()\">\n <a class=\"nav d-flex align-items-center text-decoration-none gap-2 rounded\" title=\"Setting\" routerLink=\"setting\" routerLinkActive=\"fw-medium\">\n <ion-icon name=\"settings\" />\n <div class=\"text-truncate\">Setting</div>\n </a>\n </div>\n</div>\n\n<div class=\"flex-grow-1 overflow-y-auto\">\n <ng-content />\n</div>\n", styles: [".info{display:none}.name{font-size:16px}.tenant{color:#757575}.sidenav{width:73px;background:#f8f9fb;transition:all .2s ease;border-right:1px solid #D1D1D1}.sidenav.collapsed{width:250px}.sidenav.collapsed .btn-close{transform:rotate(180deg)}.sidenav.collapsed .nav div,.sidenav.collapsed .info{display:block}.sidenav.show{width:250px}.sidenav.show .logo-container{display:flex!important}.sidenav.show div:not(.logo-container),.sidenav.show img,.sidenav.show .info{display:block!important}.btn-close{width:35px;height:35px;bottom:23px;right:-17px;z-index:999;transition:all .3s ease;background-color:#f8f9fb;box-shadow:0 0 .15rem #616161}.btn-close ion-icon{color:#616161;font-size:16px}@media (max-width: 768px){.btn-close{right:-18px}.btn-close ion-icon{position:absolute;right:9px;bottom:10px}}.nav{padding:12px;color:#616161;transition:all .3s ease}.nav.fw-medium,.nav:hover{background-color:#fef3ee;color:#ed6b26!important}.nav ion-icon{font-size:20px}.nav div{display:none;font-size:16px}@media (max-width: 767px){.sidenav{width:0;z-index:2;position:absolute!important}}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkWithHrefDelegate, selector: "a[routerLink],area[routerLink]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
409
421
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AppletContainerComponent, decorators: [{
422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AppletContainerComponent, decorators: [{
411
423
  type: Component,
412
424
  args: [{ standalone: true, selector: 'up-applet-container', changeDetection: ChangeDetectionStrategy.OnPush, host: {
413
425
  class: 'd-flex h-100 w-100'
@@ -415,11 +427,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
415
427
  IonicModule,
416
428
  RouterModule,
417
429
  CommonModule
418
- ], template: "<div class=\"sidenav flex-shrink-0 h-100 py-4 d-flex flex-column\" [class.collapsed]=\"isCollapsed\">\n <div class=\"logo-container px-3 pb-3 border-bottom flex-shrink-0 position-relative d-flex align-items-center gap-3\">\n <img alt=\"Applet Icon\" width=\"44px\" height=\"44px\" class=\"rounded\" [src]=\"config.icon\" />\n\n <div class=\"info w-75 pe-2\">\n <div class=\"name fw-medium text-truncate\">{{ config.name }}</div>\n <div class=\"tenant pt-1 fw-medium\">v{{ config.version }}</div>\n </div>\n\n <button class=\"btn-close cursor-pointer position-absolute border-0 rounded-circle\" (click)=\"toggleSidenav()\">\n <ion-icon name=\"chevron-forward\" class=\"mt-1\" />\n </button>\n </div>\n\n <div class=\"flex-grow-1 px-3 pt-3 overflow-y-auto\">\n <a class=\"nav align-items-center text-decoration-none gap-2 rounded mb-1 {{ isHidden[i]? 'd-none' : 'd-flex' }}\" title=\"{{ c.label }}\" [routerLink]=\"c.path\" routerLinkActive=\"fw-medium\" *ngFor=\"let c of config.containers; let i = index\">\n <ion-icon name=\"{{ c.icon }}\" />\n <div class=\"text-truncate\">{{ c.label }}</div>\n </a>\n </div>\n\n <div class=\"flex-shrink-0 px-3 pt-3 border-top\" *ngIf=\"config.enabledSetting\">\n <a class=\"nav d-flex align-items-center text-decoration-none gap-2 rounded\" title=\"Setting\" routerLink=\"setting\" routerLinkActive=\"fw-medium\">\n <ion-icon name=\"settings\" />\n <div class=\"text-truncate\">Setting</div>\n </a>\n </div>\n</div>\n\n<div class=\"flex-grow-1 overflow-y-auto\">\n <ng-content />\n</div>\n", styles: [".info{display:none}.name{font-size:16px}.tenant{color:#757575}.sidenav{width:73px;background:#f8f9fb;transition:all .2s ease;border-right:1px solid #D1D1D1}.sidenav.collapsed{width:250px}.sidenav.collapsed .btn-close{transform:rotate(180deg)}.sidenav.collapsed .nav div,.sidenav.collapsed .info{display:block}.btn-close{width:35px;height:35px;bottom:23px;right:-17px;z-index:999;transition:all .3s ease;background-color:#f8f9fb;box-shadow:0 0 .15rem #616161}.btn-close ion-icon{color:#616161;font-size:16px}@media (max-width: 768px){.btn-close{right:-18px}.btn-close ion-icon{position:absolute;right:9px;bottom:10px}}.nav{padding:12px;color:#616161;transition:all .3s ease}.nav.fw-medium,.nav:hover{background-color:#fef3ee;color:#ed6b26!important}.nav ion-icon{font-size:20px}.nav div{display:none;font-size:16px}\n"] }]
430
+ ], template: "<div class=\"sidenav flex-shrink-0 h-100 py-4 d-flex flex-column\" [class.collapsed]=\"isCollapsed\" [class.show]=\"isMenuActive\">\n <div class=\"logo-container px-3 pb-3 border-bottom flex-shrink-0 position-relative d-flex align-items-center gap-3 d-none d-md-flex\">\n <img alt=\"Applet Icon\" width=\"44px\" height=\"44px\" class=\"rounded\" [src]=\"config.icon\" />\n\n <div class=\"info w-75 pe-2\">\n <div class=\"name fw-medium text-truncate\">{{ config.name }}</div>\n <div class=\"tenant pt-1 fw-medium\">v{{ config.version }}</div>\n </div>\n\n <button class=\"btn-close cursor-pointer position-absolute border-0 rounded-circle d-none d-md-block\" (click)=\"toggleSidenav()\">\n <ion-icon name=\"chevron-forward\" class=\"mt-1\" />\n </button>\n </div>\n\n <div class=\"flex-grow-1 px-3 pt-3 overflow-y-auto d-none d-md-block\" (click)=\"selectMenu()\">\n <a class=\"nav align-items-center text-decoration-none gap-2 rounded mb-1 {{ isHidden[i]? 'd-none' : 'd-flex' }}\" title=\"{{ c.label }}\" [routerLink]=\"c.path\" routerLinkActive=\"fw-medium\" *ngFor=\"let c of config.containers; let i = index\">\n <ion-icon name=\"{{ c.icon }}\" />\n <div class=\"text-truncate\">{{ c.label }}</div>\n </a>\n </div>\n\n <div class=\"flex-shrink-0 px-3 pt-3 border-top d-none d-md-block\" *ngIf=\"config.enabledSetting\" (click)=\"selectMenu()\">\n <a class=\"nav d-flex align-items-center text-decoration-none gap-2 rounded\" title=\"Setting\" routerLink=\"setting\" routerLinkActive=\"fw-medium\">\n <ion-icon name=\"settings\" />\n <div class=\"text-truncate\">Setting</div>\n </a>\n </div>\n</div>\n\n<div class=\"flex-grow-1 overflow-y-auto\">\n <ng-content />\n</div>\n", styles: [".info{display:none}.name{font-size:16px}.tenant{color:#757575}.sidenav{width:73px;background:#f8f9fb;transition:all .2s ease;border-right:1px solid #D1D1D1}.sidenav.collapsed{width:250px}.sidenav.collapsed .btn-close{transform:rotate(180deg)}.sidenav.collapsed .nav div,.sidenav.collapsed .info{display:block}.sidenav.show{width:250px}.sidenav.show .logo-container{display:flex!important}.sidenav.show div:not(.logo-container),.sidenav.show img,.sidenav.show .info{display:block!important}.btn-close{width:35px;height:35px;bottom:23px;right:-17px;z-index:999;transition:all .3s ease;background-color:#f8f9fb;box-shadow:0 0 .15rem #616161}.btn-close ion-icon{color:#616161;font-size:16px}@media (max-width: 768px){.btn-close{right:-18px}.btn-close ion-icon{position:absolute;right:9px;bottom:10px}}.nav{padding:12px;color:#616161;transition:all .3s ease}.nav.fw-medium,.nav:hover{background-color:#fef3ee;color:#ed6b26!important}.nav ion-icon{font-size:20px}.nav div{display:none;font-size:16px}@media (max-width: 767px){.sidenav{width:0;z-index:2;position:absolute!important}}\n"] }]
419
431
  }], ctorParameters: () => [{ type: undefined, decorators: [{
420
432
  type: Inject,
421
433
  args: ['APPLET_CONFIG']
422
- }] }, { type: PermissionService }] });
434
+ }] }, { type: i0.ChangeDetectorRef }, { type: PermissionService }] });
423
435
 
424
436
  class LazyRouteDirective {
425
437
  constructor(vcr) {
@@ -428,10 +440,10 @@ class LazyRouteDirective {
428
440
  ngOnInit() {
429
441
  this.loadRoute.loadComponent().then((m) => this.vcr.createComponent(m));
430
442
  }
431
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LazyRouteDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
432
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: LazyRouteDirective, isStandalone: true, selector: "[loadRoute]", inputs: { loadRoute: "loadRoute" }, ngImport: i0 }); }
443
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LazyRouteDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
444
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: LazyRouteDirective, isStandalone: true, selector: "[loadRoute]", inputs: { loadRoute: "loadRoute" }, ngImport: i0 }); }
433
445
  }
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LazyRouteDirective, decorators: [{
446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LazyRouteDirective, decorators: [{
435
447
  type: Directive,
436
448
  args: [{
437
449
  standalone: true,
@@ -447,9 +459,11 @@ class ColumnContainerComponent {
447
459
  this.router = router;
448
460
  this.activeRoute = activeRoute;
449
461
  this.areas = [];
462
+ this.colSize = 50;
450
463
  this.openedArea = {};
451
464
  }
452
465
  ngOnInit() {
466
+ this.checkScreen();
453
467
  this.sub = this.router.events.subscribe((e) => {
454
468
  if (e instanceof NavigationEnd)
455
469
  this.navigate();
@@ -471,13 +485,21 @@ class ColumnContainerComponent {
471
485
  this.next(route);
472
486
  }
473
487
  next(route) {
488
+ if (this.colSize === 100 && this.areas.length >= 1) {
489
+ this.areas[this.areas.length - 1].visible = false;
490
+ }
491
+ else if (this.areas.length >= 2) {
492
+ this.areas[this.areas.length - 2].visible = false;
493
+ }
474
494
  this.areas.push({ visible: true, route });
475
495
  this.openedArea[`r-${route.path}`] = this.areas.length;
476
- if (this.areas.length > 2)
477
- this.areas[this.areas.length - 3].visible = false;
478
496
  }
479
497
  previous(pos) {
480
498
  this.areas.splice(pos);
499
+ if (this.colSize === 100) {
500
+ this.areas[this.areas.length - 1].visible = true;
501
+ return;
502
+ }
481
503
  if (this.areas.length === 1)
482
504
  this.areas[0].visible = true;
483
505
  else {
@@ -485,10 +507,13 @@ class ColumnContainerComponent {
485
507
  this.areas[pos - 2].visible = true;
486
508
  }
487
509
  }
488
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnContainerComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
489
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ColumnContainerComponent, isStandalone: true, selector: "up-column-container", host: { classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<as-split [disabled]=\"true\" [useTransition]=\"true\" [gutterSize]=\"0\">\n <as-split-area [size]=\"50\" [hidden]=\"!a.visible\" [visible]=\"a.visible\" [order]=\"i\" *ngFor=\"let a of areas; let i = index\" class=\"border-start\">\n <ng-container [loadRoute]=\"a.route\" />\n </as-split-area>\n</as-split>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i3.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i3.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: LazyRouteDirective, selector: "[loadRoute]", inputs: ["loadRoute"] }] }); }
510
+ checkScreen() {
511
+ this.colSize = window.innerWidth <= 768 ? 100 : 50;
512
+ }
513
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ColumnContainerComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
514
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ColumnContainerComponent, isStandalone: true, selector: "up-column-container", host: { listeners: { "window:resize": "checkScreen($event)" }, classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<as-split [disabled]=\"true\" [useTransition]=\"true\" [gutterSize]=\"0\">\n <as-split-area [size]=\"colSize\" [hidden]=\"!a.visible\" [visible]=\"a.visible\" [order]=\"i\" *ngFor=\"let a of areas; let i = index\" class=\"border-start\">\n <ng-container [loadRoute]=\"a.route\" />\n </as-split-area>\n</as-split>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i3.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i3.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: LazyRouteDirective, selector: "[loadRoute]", inputs: ["loadRoute"] }] }); }
490
515
  }
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnContainerComponent, decorators: [{
516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ColumnContainerComponent, decorators: [{
492
517
  type: Component,
493
518
  args: [{ standalone: true, selector: 'up-column-container', host: {
494
519
  class: 'd-block h-100 w-100'
@@ -497,21 +522,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
497
522
  CommonModule,
498
523
  AngularSplitModule,
499
524
  LazyRouteDirective
500
- ], template: "<as-split [disabled]=\"true\" [useTransition]=\"true\" [gutterSize]=\"0\">\n <as-split-area [size]=\"50\" [hidden]=\"!a.visible\" [visible]=\"a.visible\" [order]=\"i\" *ngFor=\"let a of areas; let i = index\" class=\"border-start\">\n <ng-container [loadRoute]=\"a.route\" />\n </as-split-area>\n</as-split>\n" }]
501
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }] });
525
+ ], template: "<as-split [disabled]=\"true\" [useTransition]=\"true\" [gutterSize]=\"0\">\n <as-split-area [size]=\"colSize\" [hidden]=\"!a.visible\" [visible]=\"a.visible\" [order]=\"i\" *ngFor=\"let a of areas; let i = index\" class=\"border-start\">\n <ng-container [loadRoute]=\"a.route\" />\n </as-split-area>\n</as-split>\n" }]
526
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { checkScreen: [{
527
+ type: HostListener,
528
+ args: ['window:resize', ['$event']]
529
+ }] } });
502
530
 
503
531
  class ColumnHeaderContainerComponent {
504
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnHeaderContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ColumnHeaderContainerComponent, isStandalone: true, selector: "up-column-header-container", inputs: { header: "header", prevUrl: "prevUrl" }, host: { classAttribute: "d-flex flex-column h-100" }, ngImport: i0, template: "<div class=\"d-flex justify-content-between align-items-center border-bottom py-1 ps-1 pe-4 flex-shrink-0\">\n\t<div class=\"flex-grow-1 d-flex align-items-center pe-3\">\n\t\t<ion-buttons>\n\t\t\t<ion-button routerLink=\"{{ prevUrl }}\">\n\t\t\t\t<ion-icon slot=\"icon-only\" name=\"close\" />\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\n\t\t<div class=\"f20 fw-medium\">{{ header }}</div>\n\t</div>\n\n\t<ng-content select=\"[button]\" />\n</div>\n\n<div class=\"p-1 flex-grow-1 overflow-auto\">\n\t<ng-content/>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkDelegate, selector: ":not(a):not(area)[routerLink]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
532
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ColumnHeaderContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
533
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ColumnHeaderContainerComponent, isStandalone: true, selector: "up-column-header-container", inputs: { header: "header", prevUrl: "prevUrl" }, host: { classAttribute: "d-flex flex-column h-100" }, ngImport: i0, template: "<div class=\"d-flex justify-content-between align-items-center border-bottom py-1 ps-1 pe-4 flex-shrink-0\">\n\t<div class=\"flex-grow-1 d-flex align-items-center pe-3\">\n\t\t<ion-buttons class=\"flex-shrink-0\">\n\t\t\t<ion-button routerLink=\"{{ prevUrl }}\">\n\t\t\t\t<ion-icon slot=\"icon-only\" name=\"close\" />\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\n\t\t<div class=\"f20 fw-medium flex-grow-1 text-truncate\">{{ header }}</div>\n\t</div>\n\n\t<ng-content select=\"[button]\" />\n</div>\n\n<div class=\"p-1 flex-grow-1 overflow-auto\">\n\t<ng-content/>\n</div>\n", styles: ["ion-buttons{z-index:0}.flex-grow-1{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkDelegate, selector: ":not(a):not(area)[routerLink]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
506
534
  }
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnHeaderContainerComponent, decorators: [{
535
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ColumnHeaderContainerComponent, decorators: [{
508
536
  type: Component,
509
537
  args: [{ standalone: true, selector: 'up-column-header-container', changeDetection: ChangeDetectionStrategy.OnPush, host: {
510
538
  class: 'd-flex flex-column h-100'
511
539
  }, imports: [
512
540
  IonicModule,
513
541
  RouterModule
514
- ], template: "<div class=\"d-flex justify-content-between align-items-center border-bottom py-1 ps-1 pe-4 flex-shrink-0\">\n\t<div class=\"flex-grow-1 d-flex align-items-center pe-3\">\n\t\t<ion-buttons>\n\t\t\t<ion-button routerLink=\"{{ prevUrl }}\">\n\t\t\t\t<ion-icon slot=\"icon-only\" name=\"close\" />\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\n\t\t<div class=\"f20 fw-medium\">{{ header }}</div>\n\t</div>\n\n\t<ng-content select=\"[button]\" />\n</div>\n\n<div class=\"p-1 flex-grow-1 overflow-auto\">\n\t<ng-content/>\n</div>\n" }]
542
+ ], template: "<div class=\"d-flex justify-content-between align-items-center border-bottom py-1 ps-1 pe-4 flex-shrink-0\">\n\t<div class=\"flex-grow-1 d-flex align-items-center pe-3\">\n\t\t<ion-buttons class=\"flex-shrink-0\">\n\t\t\t<ion-button routerLink=\"{{ prevUrl }}\">\n\t\t\t\t<ion-icon slot=\"icon-only\" name=\"close\" />\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\n\t\t<div class=\"f20 fw-medium flex-grow-1 text-truncate\">{{ header }}</div>\n\t</div>\n\n\t<ng-content select=\"[button]\" />\n</div>\n\n<div class=\"p-1 flex-grow-1 overflow-auto\">\n\t<ng-content/>\n</div>\n", styles: ["ion-buttons{z-index:0}.flex-grow-1{min-width:0}\n"] }]
515
543
  }], propDecorators: { header: [{
516
544
  type: Input
517
545
  }], prevUrl: [{
@@ -521,6 +549,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
521
549
  class ModalContainerComponent {
522
550
  constructor(modalCtrl) {
523
551
  this.modalCtrl = modalCtrl;
552
+ this.disabled = false;
524
553
  }
525
554
  ngOnInit() {
526
555
  this.key = this.header.replace(/ /g, '-');
@@ -534,20 +563,20 @@ class ModalContainerComponent {
534
563
  if (!ev.state[this.key])
535
564
  this.modalCtrl.dismiss();
536
565
  }
537
- close() {
538
- this.modalCtrl.dismiss();
539
- }
540
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ModalContainerComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component }); }
541
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ModalContainerComponent, isStandalone: true, selector: "up-modal-container", inputs: { header: "header" }, host: { listeners: { "window:popstate": "popState($event)" } }, ngImport: i0, template: "<ion-header class=\"ion-no-border\">\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-button (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n\n <ion-title class=\"p-0 fs-5\">{{ header }}</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<div class=\"p-4\">\n <ng-content />\n</div>\n", styles: ["ion-toolbar{color:#616161}ion-header{border-bottom:1px solid #e0e0e0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
566
+ close() { this.modalCtrl.dismiss(); }
567
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ModalContainerComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component }); }
568
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ModalContainerComponent, isStandalone: true, selector: "up-modal-container", inputs: { header: "header", disabled: "disabled" }, host: { listeners: { "window:popstate": "popState($event)" } }, ngImport: i0, template: "<ion-header class=\"ion-no-border\">\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-button [disabled]=\"disabled\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n\n <ion-title class=\"p-0 fs-5\">{{ header }}</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<div class=\"p-4\">\n <ng-content />\n</div>\n", styles: ["ion-toolbar{color:#616161}ion-header{border-bottom:1px solid #e0e0e0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
542
569
  }
543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ModalContainerComponent, decorators: [{
570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ModalContainerComponent, decorators: [{
544
571
  type: Component,
545
572
  args: [{ standalone: true, selector: 'up-modal-container', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
546
573
  IonicModule
547
- ], template: "<ion-header class=\"ion-no-border\">\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-button (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n\n <ion-title class=\"p-0 fs-5\">{{ header }}</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<div class=\"p-4\">\n <ng-content />\n</div>\n", styles: ["ion-toolbar{color:#616161}ion-header{border-bottom:1px solid #e0e0e0}\n"] }]
574
+ ], template: "<ion-header class=\"ion-no-border\">\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-button [disabled]=\"disabled\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n\n <ion-title class=\"p-0 fs-5\">{{ header }}</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<div class=\"p-4\">\n <ng-content />\n</div>\n", styles: ["ion-toolbar{color:#616161}ion-header{border-bottom:1px solid #e0e0e0}\n"] }]
548
575
  }], ctorParameters: () => [{ type: i1.ModalController }], propDecorators: { header: [{
549
576
  type: Input,
550
577
  args: [{ required: true }]
578
+ }], disabled: [{
579
+ type: Input
551
580
  }], popState: [{
552
581
  type: HostListener,
553
582
  args: ['window:popstate', ['$event']]
@@ -622,8 +651,8 @@ class FormDateComponent {
622
651
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
623
652
  }
624
653
  }
625
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormDateComponent, deps: [{ token: 'name', attribute: true }, { token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
626
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormDateComponent, isStandalone: true, selector: "up-date", inputs: { label: "label", required: "required", disabled: "disabled", presentation: "presentation" }, host: { classAttribute: "d-block position-relative" }, providers: [
654
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormDateComponent, deps: [{ token: 'name', attribute: true }, { token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
655
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormDateComponent, isStandalone: true, selector: "up-date", inputs: { label: "label", required: "required", disabled: "disabled", presentation: "presentation" }, host: { classAttribute: "d-block position-relative" }, providers: [
627
656
  {
628
657
  multi: true,
629
658
  provide: NG_VALUE_ACCESSOR,
@@ -634,9 +663,9 @@ class FormDateComponent {
634
663
  provide: NG_VALIDATORS,
635
664
  useExisting: FormDateComponent
636
665
  }
637
- ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input readonly type=\"text\" id=\"{{ name }}-date\" placeholder=\"{{ placeholder }}\" class=\"form-control cursor-pointer\" [disabled]=\"disabled\" [required]=\"required\" [value]=\"value | date:dateFormat \">\n<ion-icon name=\"calendar\" class=\"position-absolute fs-4 cursor-pointer\" />\n\n<ion-modal trigger=\"{{ name }}-date\">\n <ng-template>\n <ion-datetime mode=\"md\" [presentation]=\"presentation\" value=\"{{ localValue }}\" [showDefaultButtons]=\"true\" (ionChange)=\"changeDate($event)\" />\n </ng-template>\n</ion-modal>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ion-datetime{--background: white}ion-modal{--width: 290px;--height: auto}ion-icon{top:32px;right:16px;color:#616161}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonDatetime, selector: "ion-datetime", inputs: ["cancelText", "clearText", "color", "dayValues", "disabled", "doneText", "firstDayOfWeek", "formatOptions", "highlightedDates", "hourCycle", "hourValues", "isDateEnabled", "locale", "max", "min", "minuteValues", "mode", "monthValues", "multiple", "name", "preferWheel", "presentation", "readonly", "showClearButton", "showDefaultButtons", "showDefaultTimeLabel", "showDefaultTitle", "size", "titleSelectedDatesFormatter", "value", "yearValues"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonModal, selector: "ion-modal" }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
666
+ ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input readonly type=\"text\" id=\"{{ name }}-date\" placeholder=\"{{ placeholder }}\" class=\"form-control cursor-pointer\" [disabled]=\"disabled\" [required]=\"required\" [value]=\"value | date:dateFormat \">\n<ion-icon name=\"calendar\" class=\"position-absolute fs-4 cursor-pointer\" />\n\n<ion-modal trigger=\"{{ name }}-date\">\n <ng-template>\n <ion-datetime mode=\"md\" hourCycle=\"h23\" [presentation]=\"presentation\" value=\"{{ localValue }}\" [showDefaultButtons]=\"true\" (ionChange)=\"changeDate($event)\" />\n </ng-template>\n</ion-modal>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ion-datetime{--background: white}ion-modal{--width: 290px;--height: auto}ion-icon{top:32px;right:16px;color:#616161}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonDatetime, selector: "ion-datetime", inputs: ["cancelText", "clearText", "color", "dayValues", "disabled", "doneText", "firstDayOfWeek", "formatOptions", "highlightedDates", "hourCycle", "hourValues", "isDateEnabled", "locale", "max", "min", "minuteValues", "mode", "monthValues", "multiple", "name", "preferWheel", "presentation", "readonly", "showClearButton", "showDefaultButtons", "showDefaultTimeLabel", "showDefaultTitle", "size", "titleSelectedDatesFormatter", "value", "yearValues"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonModal, selector: "ion-modal" }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
638
667
  }
639
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormDateComponent, decorators: [{
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormDateComponent, decorators: [{
640
669
  type: Component,
641
670
  args: [{ standalone: true, selector: 'up-date', changeDetection: ChangeDetectionStrategy.OnPush, host: {
642
671
  class: 'd-block position-relative'
@@ -654,7 +683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
654
683
  provide: NG_VALIDATORS,
655
684
  useExisting: FormDateComponent
656
685
  }
657
- ], template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input readonly type=\"text\" id=\"{{ name }}-date\" placeholder=\"{{ placeholder }}\" class=\"form-control cursor-pointer\" [disabled]=\"disabled\" [required]=\"required\" [value]=\"value | date:dateFormat \">\n<ion-icon name=\"calendar\" class=\"position-absolute fs-4 cursor-pointer\" />\n\n<ion-modal trigger=\"{{ name }}-date\">\n <ng-template>\n <ion-datetime mode=\"md\" [presentation]=\"presentation\" value=\"{{ localValue }}\" [showDefaultButtons]=\"true\" (ionChange)=\"changeDate($event)\" />\n </ng-template>\n</ion-modal>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ion-datetime{--background: white}ion-modal{--width: 290px;--height: auto}ion-icon{top:32px;right:16px;color:#616161}\n"] }]
686
+ ], template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input readonly type=\"text\" id=\"{{ name }}-date\" placeholder=\"{{ placeholder }}\" class=\"form-control cursor-pointer\" [disabled]=\"disabled\" [required]=\"required\" [value]=\"value | date:dateFormat \">\n<ion-icon name=\"calendar\" class=\"position-absolute fs-4 cursor-pointer\" />\n\n<ion-modal trigger=\"{{ name }}-date\">\n <ng-template>\n <ion-datetime mode=\"md\" hourCycle=\"h23\" [presentation]=\"presentation\" value=\"{{ localValue }}\" [showDefaultButtons]=\"true\" (ionChange)=\"changeDate($event)\" />\n </ng-template>\n</ion-modal>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ion-datetime{--background: white}ion-modal{--width: 290px;--height: auto}ion-icon{top:32px;right:16px;color:#616161}\n"] }]
658
687
  }], ctorParameters: () => [{ type: undefined, decorators: [{
659
688
  type: Attribute,
660
689
  args: ['name']
@@ -710,8 +739,8 @@ class FormInputComponent {
710
739
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
711
740
  }
712
741
  }
713
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormInputComponent, deps: [{ token: 'placeholder', attribute: true }, { token: 'type', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
714
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormInputComponent, isStandalone: true, selector: "up-input", inputs: { label: "label", value: "value", required: "required", disabled: "disabled" }, outputs: { onInput: "onInput" }, host: { classAttribute: "d-block" }, providers: [
742
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormInputComponent, deps: [{ token: 'placeholder', attribute: true }, { token: 'type', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
743
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormInputComponent, isStandalone: true, selector: "up-input", inputs: { label: "label", value: "value", required: "required", disabled: "disabled" }, outputs: { onInput: "onInput" }, host: { classAttribute: "d-block" }, providers: [
715
744
  {
716
745
  multi: true,
717
746
  provide: NG_VALUE_ACCESSOR,
@@ -724,7 +753,7 @@ class FormInputComponent {
724
753
  }
725
754
  ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<input type=\"{{ type }}\" autocomplete=\"{{ autocomplete }}\" placeholder=\"{{ placeholder }}\" class=\"form-control\" [required]=\"required\" [disabled]=\"disabled\" [value]=\"value\" (change)=\"change($event.target)\" (input)=\"input($event)\" />\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
726
755
  }
727
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormInputComponent, decorators: [{
756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormInputComponent, decorators: [{
728
757
  type: Component,
729
758
  args: [{ standalone: true, selector: 'up-input', changeDetection: ChangeDetectionStrategy.OnPush, host: {
730
759
  class: 'd-block'
@@ -785,10 +814,10 @@ class LocaleNumberPipe {
785
814
  }
786
815
  return seperators;
787
816
  }
788
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LocaleNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
789
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: LocaleNumberPipe, isStandalone: true, name: "localeNumber" }); }
817
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LocaleNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
818
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: LocaleNumberPipe, isStandalone: true, name: "localeNumber" }); }
790
819
  }
791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LocaleNumberPipe, decorators: [{
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: LocaleNumberPipe, decorators: [{
792
821
  type: Pipe,
793
822
  args: [{
794
823
  standalone: true,
@@ -841,8 +870,8 @@ class FormNumberComponent {
841
870
  if (!/^\d$/.test(key))
842
871
  ev.preventDefault();
843
872
  }
844
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormNumberComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
845
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormNumberComponent, isStandalone: true, selector: "up-number", inputs: { label: "label", value: "value", required: "required", disabled: "disabled", locale: "locale" }, host: { classAttribute: "d-block" }, providers: [
873
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormNumberComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
874
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormNumberComponent, isStandalone: true, selector: "up-number", inputs: { label: "label", value: "value", required: "required", disabled: "disabled", locale: "locale" }, host: { classAttribute: "d-block" }, providers: [
846
875
  {
847
876
  multi: true,
848
877
  provide: NG_VALUE_ACCESSOR,
@@ -855,7 +884,7 @@ class FormNumberComponent {
855
884
  }
856
885
  ], ngImport: i0, template: "<label class=\"form-label\">{{ label }}</label>\n<input type=\"text\" placeholder=\"{{ placeholder }}\" class=\"form-control\" [required]=\"required\" [disabled]=\"disabled\" [value]=\"value | localeNumber:locale\" (keydown)=\"onKeyDown($event)\" (change)=\"change($event.target)\" />\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: LocaleNumberPipe, name: "localeNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
857
886
  }
858
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormNumberComponent, decorators: [{
887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormNumberComponent, decorators: [{
859
888
  type: Component,
860
889
  args: [{ standalone: true, selector: 'up-number', changeDetection: ChangeDetectionStrategy.OnPush, host: {
861
890
  class: 'd-block'
@@ -929,8 +958,8 @@ class FormPasswordComponent {
929
958
  }
930
959
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
931
960
  }
932
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormPasswordComponent, deps: [{ token: 'label', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
933
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormPasswordComponent, isStandalone: true, selector: "up-password", inputs: { required: "required", mustSame: "mustSame" }, host: { classAttribute: "d-block position-relative" }, providers: [
961
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormPasswordComponent, deps: [{ token: 'label', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
962
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormPasswordComponent, isStandalone: true, selector: "up-password", inputs: { required: "required", mustSame: "mustSame" }, host: { classAttribute: "d-block position-relative" }, providers: [
934
963
  {
935
964
  multi: true,
936
965
  provide: NG_VALUE_ACCESSOR,
@@ -943,7 +972,7 @@ class FormPasswordComponent {
943
972
  }
944
973
  ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\"/>\n <span>{{ label }}</span>\n</label>\n\n<input [type]=\"type\" autocomplete=\"{{ autocomplete }}\" [required]=\"required\" class=\"form-control pe-5\" [value]=\"value\" (change)=\"change($event.target)\" />\n<ion-icon name=\"{{ type === 'password'? 'eye' : 'eye-off' }}\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"changeType()\"></ion-icon>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ion-icon{top:33px;right:16px;color:#616161}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
945
974
  }
946
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormPasswordComponent, decorators: [{
975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormPasswordComponent, decorators: [{
947
976
  type: Component,
948
977
  args: [{ standalone: true, selector: 'up-password', changeDetection: ChangeDetectionStrategy.OnPush, host: {
949
978
  class: 'd-block position-relative'
@@ -1032,8 +1061,8 @@ class FormSearchableSelectComponent {
1032
1061
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1033
1062
  }
1034
1063
  }
1035
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSearchableSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1036
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormSearchableSelectComponent, isStandalone: true, selector: "up-searchable-select", inputs: { queryFunc: "queryFunc", clearable: "clearable", label: "label", initialItems: "initialItems", required: "required", addTag: "addTag", disabled: "disabled", multiple: "multiple", bindLabel: "bindLabel", bindValue: "bindValue" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
1064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormSearchableSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1065
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormSearchableSelectComponent, isStandalone: true, selector: "up-searchable-select", inputs: { queryFunc: "queryFunc", clearable: "clearable", label: "label", initialItems: "initialItems", required: "required", addTag: "addTag", disabled: "disabled", multiple: "multiple", bindLabel: "bindLabel", bindValue: "bindValue" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
1037
1066
  {
1038
1067
  multi: true,
1039
1068
  provide: NG_VALUE_ACCESSOR,
@@ -1044,9 +1073,9 @@ class FormSearchableSelectComponent {
1044
1073
  provide: NG_VALIDATORS,
1045
1074
  useExisting: FormSearchableSelectComponent
1046
1075
  }
1047
- ], usesOnChanges: true, ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\" [class.required]=\"required\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<ng-select \n appendTo=\"body\"\n typeToSearchText=\"Please enter 3 or more characters\"\n bindLabel=\"{{ bindLabel }}\"\n bindValue=\"{{ bindValue }}\"\n placeholder=\"{{ placeholder }}\" \n [minTermLength]=\"3\"\n [virtualScroll]=\"true\"\n [editableSearchTerm]=\"true\"\n [ngModel]=\"value\" \n [addTag]=\"addTag\"\n [multiple]=\"multiple\"\n [readonly]=\"disabled\" \n [loading]=\"isLoading\"\n [clearable]=\"clearable\"\n [typeahead]=\"typeahead\"\n [items]=\"items$ | async\"\n (change)=\"change($event);\"\n/>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1076
+ ], usesOnChanges: true, ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\" [class.required]=\"required\">\n <ng-content select=\"[icon]\" />\n <span>{{ label }}</span>\n</label>\n\n<ng-select \n appendTo=\"body\"\n typeToSearchText=\"Please enter 3 or more characters\"\n bindLabel=\"{{ bindLabel }}\"\n bindValue=\"{{ bindValue }}\"\n placeholder=\"{{ placeholder }}\" \n [minTermLength]=\"3\"\n [virtualScroll]=\"true\"\n [editableSearchTerm]=\"true\"\n [ngModel]=\"value\" \n [addTag]=\"addTag\"\n [multiple]=\"multiple\"\n [readonly]=\"disabled\" \n [loading]=\"isLoading\"\n [clearable]=\"clearable\"\n [typeahead]=\"typeahead\"\n [items]=\"items$ | async\"\n (change)=\"change($event);\"\n/>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1048
1077
  }
1049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSearchableSelectComponent, decorators: [{
1078
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormSearchableSelectComponent, decorators: [{
1050
1079
  type: Component,
1051
1080
  args: [{ standalone: true, selector: 'up-searchable-select', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1052
1081
  class: 'd-block'
@@ -1141,8 +1170,8 @@ class FormSelectComponent {
1141
1170
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1142
1171
  }
1143
1172
  }
1144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormSelectComponent, isStandalone: true, selector: "up-select", inputs: { items: "items", clearable: "clearable", label: "label", multiple: "multiple", required: "required", addTag: "addTag", disabled: "disabled", searchable: "searchable", bindLabel: "bindLabel", bindValue: "bindValue" }, host: { classAttribute: "d-block" }, providers: [
1173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1174
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormSelectComponent, isStandalone: true, selector: "up-select", inputs: { items: "items", clearable: "clearable", label: "label", multiple: "multiple", required: "required", addTag: "addTag", disabled: "disabled", searchable: "searchable", bindLabel: "bindLabel", bindValue: "bindValue" }, host: { classAttribute: "d-block" }, providers: [
1146
1175
  {
1147
1176
  multi: true,
1148
1177
  provide: NG_VALUE_ACCESSOR,
@@ -1153,9 +1182,9 @@ class FormSelectComponent {
1153
1182
  provide: NG_VALIDATORS,
1154
1183
  useExisting: FormSelectComponent
1155
1184
  }
1156
- ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\" [class.required]=\"required\">\n <ng-content select=\"[icon]\"/>\n <span>{{ label }}</span>\n</label>\n\n<ng-select\n appendTo=\"body\"\n bindLabel=\"{{ bindLabel }}\"\n bindValue=\"{{ bindValue }}\"\n placeholder=\"{{ placeholder }}\"\n [virtualScroll]=\"true\"\n [items]=\"items\"\n [ngModel]=\"value\"\n [addTag]=\"addTag\"\n [multiple]=\"multiple\"\n [readonly]=\"disabled\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n (change)=\"change($event);\"\n/>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [".ng-select.ng-select-opened>.ng-select-container{background:#fff}.ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}.ng-select.ng-select-opened>.ng-select-container .ng-arrow{top:-2px;border-color:transparent transparent #616161;border-width:0 5px 5px}.ng-select.ng-select-disabled>.ng-select-container{background-color:#e9ecef}.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{color:#424242;background-color:#fff;border-radius:4px;border:2px solid #e0e0e0;min-height:36px;align-items:center}.ng-select .ng-select-container:hover{box-shadow:0 1px #0000000f}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px}.ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#a8a8a8}.ng-select.ng-select-single .ng-select-container{height:36px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input input{color:#424242}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#e9ecef;border:1px solid #fafafa}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-top:5px;padding-left:7px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{font-size:.9em;margin-bottom:5px;color:#ed6b26;background-color:#fef3ee;border-radius:2px;margin-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#e9ecef}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label,.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:1px 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#fde2d6}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #fbd1be}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #fbd1be}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding:0 0 3px 3px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input>input{color:#424242}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:5px;padding-left:3px}.ng-select .ng-clear-wrapper{color:#adadad}.ng-select .ng-clear-wrapper:hover .ng-clear{color:#ff3b30}.ng-select .ng-spinner-zone{padding:5px 5px 0 0}.ng-select .ng-arrow-wrapper{width:25px;padding-right:5px}.ng-select .ng-arrow-wrapper .ng-arrow{border-color:#616161 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}.ng-dropdown-panel{background-color:#fff;border:2px solid #e0e0e0;box-shadow:0 1px #0000000f;left:0;z-index:20100!important;border-radius:4px}.ng-dropdown-panel.ng-select-top{bottom:100%;margin-bottom:2px}.ng-dropdown-panel.ng-select-bottom{top:100%;margin-top:2px}.ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #e0e0e0;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #e0e0e0;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-webkit-user-select:none;user-select:none;padding:8px 10px;font-weight:500;color:#0000008a;cursor:pointer}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#fef3ee}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected.ng-option-marked{color:#0000008a;background-color:#fef3ee;font-weight:600}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:#000000de;padding:8px 10px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{color:#ed6b26;background-color:#fef3ee}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked .ng-option-label{font-weight:600}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#fef3ee;color:#424242}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#888}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$1.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1185
+ ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\" [class.required]=\"required\">\n <ng-content select=\"[icon]\"/>\n <span>{{ label }}</span>\n</label>\n\n<ng-select\n appendTo=\"body\"\n bindLabel=\"{{ bindLabel }}\"\n bindValue=\"{{ bindValue }}\"\n placeholder=\"{{ placeholder }}\"\n [virtualScroll]=\"true\"\n [items]=\"items\"\n [ngModel]=\"value\"\n [addTag]=\"addTag\"\n [multiple]=\"multiple\"\n [readonly]=\"disabled\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n (change)=\"change($event);\"\n/>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [".ng-select.ng-select-opened>.ng-select-container{background:#fff}.ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}.ng-select.ng-select-opened>.ng-select-container .ng-arrow{top:-2px;border-color:transparent transparent #616161;border-width:0 5px 5px}.ng-select.ng-select-disabled>.ng-select-container{background-color:#e9ecef}.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{color:#424242;background-color:#fff;border-radius:4px;border:2px solid #e0e0e0;min-height:36px;align-items:center}.ng-select .ng-select-container:hover{box-shadow:0 1px #0000000f}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px}.ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#a8a8a8}.ng-select.ng-select-single .ng-select-container{height:36px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input input{color:#424242}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#e9ecef;border:1px solid #fafafa}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-top:5px;padding-left:7px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{font-size:.9em;margin-bottom:5px;color:#ed6b26;background-color:#fef3ee;border-radius:2px;margin-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#e9ecef}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label,.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:1px 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#fde2d6}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #fbd1be}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #fbd1be}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding:0 0 3px 3px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input>input{color:#424242}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:5px;padding-left:3px}.ng-select .ng-clear-wrapper{color:#adadad}.ng-select .ng-clear-wrapper:hover .ng-clear{color:#ff3b30}.ng-select .ng-spinner-zone{padding:5px 5px 0 0}.ng-select .ng-arrow-wrapper{width:25px;padding-right:5px}.ng-select .ng-arrow-wrapper .ng-arrow{border-color:#616161 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}.ng-dropdown-panel{background-color:#fff;border:2px solid #e0e0e0;box-shadow:0 1px #0000000f;left:0;z-index:20100!important;border-radius:4px}.ng-dropdown-panel.ng-select-top{bottom:100%;margin-bottom:2px}.ng-dropdown-panel.ng-select-bottom{top:100%;margin-top:2px}.ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #e0e0e0;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #e0e0e0;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-webkit-user-select:none;user-select:none;padding:8px 10px;font-weight:500;color:#0000008a;cursor:pointer}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#fef3ee}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected.ng-option-marked{color:#0000008a;background-color:#fef3ee;font-weight:600}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:#000000de;padding:8px 10px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{color:#ed6b26;background-color:#fef3ee}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked .ng-option-label{font-weight:600}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#fef3ee;color:#424242}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#888}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1157
1186
  }
1158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSelectComponent, decorators: [{
1187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormSelectComponent, decorators: [{
1159
1188
  type: Component,
1160
1189
  args: [{ standalone: true, selector: 'up-select', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1161
1190
  class: 'd-block'
@@ -1238,8 +1267,8 @@ class FormTextareaComponent {
1238
1267
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1239
1268
  }
1240
1269
  }
1241
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormTextareaComponent, deps: [{ token: 'label', attribute: true }, { token: 'placeholder', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1242
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormTextareaComponent, isStandalone: true, selector: "up-textarea", inputs: { value: "value", required: "required", disabled: "disabled" }, host: { classAttribute: "d-block" }, providers: [
1270
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormTextareaComponent, deps: [{ token: 'label', attribute: true }, { token: 'placeholder', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormTextareaComponent, isStandalone: true, selector: "up-textarea", inputs: { value: "value", required: "required", disabled: "disabled" }, host: { classAttribute: "d-block" }, providers: [
1243
1272
  {
1244
1273
  multi: true,
1245
1274
  provide: NG_VALUE_ACCESSOR,
@@ -1252,7 +1281,7 @@ class FormTextareaComponent {
1252
1281
  }
1253
1282
  ], ngImport: i0, template: "<label class=\"form-label d-flex align-items-center\">\n <ng-content select=\"[icon]\"/>\n <span>{{ label }}</span>\n</label>\n<textarea autocomplete=\"{{ autocomplete }}\" placeholder=\"{{ placeholder }}\" rows=\"3\" class=\"form-control\" [required]=\"required\" [disabled]=\"disabled\" [value]=\"value\" (change)=\"change($event.target)\"></textarea>\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1254
1283
  }
1255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormTextareaComponent, decorators: [{
1284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormTextareaComponent, decorators: [{
1256
1285
  type: Component,
1257
1286
  args: [{ standalone: true, selector: 'up-textarea', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1258
1287
  class: 'd-block'
@@ -1310,10 +1339,10 @@ class DragNDropDirective {
1310
1339
  if (files.length > 0)
1311
1340
  this.fileDropped.emit(files);
1312
1341
  }
1313
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DragNDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1314
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: DragNDropDirective, isStandalone: true, selector: "[upDragNDrop]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0 }); }
1342
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DragNDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1343
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: DragNDropDirective, isStandalone: true, selector: "[upDragNDrop]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0 }); }
1315
1344
  }
1316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DragNDropDirective, decorators: [{
1345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: DragNDropDirective, decorators: [{
1317
1346
  type: Directive,
1318
1347
  args: [{
1319
1348
  standalone: true,
@@ -1359,8 +1388,8 @@ class FormImagePickerComponent {
1359
1388
  this.onChange.emit(files[0]);
1360
1389
  }
1361
1390
  }
1362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormImagePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1363
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FormImagePickerComponent, isStandalone: true, selector: "up-image-picker", inputs: { ratio: "ratio", label: "label", required: "required" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
1391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormImagePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1392
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormImagePickerComponent, isStandalone: true, selector: "up-image-picker", inputs: { ratio: "ratio", label: "label", required: "required" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
1364
1393
  {
1365
1394
  multi: true,
1366
1395
  provide: NG_VALUE_ACCESSOR,
@@ -1368,7 +1397,7 @@ class FormImagePickerComponent {
1368
1397
  },
1369
1398
  ], ngImport: i0, template: "<div class=\"flex-shrink-0 mb-4\">\n <label class=\"mb-2 d-flex align-items-center form-label\">\n <span class=\"text-danger me-2\" *ngIf=\"required\">&ast;</span>\n \n <ng-content select=\"[icon]\"/>\n <span>{{ label }}</span>\n </label>\n \n <div class=\"img-container position-relative border rounded\" [ngStyle]=\"{ 'aspect-ratio': ratio }\" upDragNDrop (fileDropped)=\"selectPhoto($event)\"> \n <img *ngIf=\"imgSrc\" alt=\"{{ label }}\" class=\"rounded\" width=\"100%\" height=\"100%\" src=\"{{ imgSrc }}\" />\n \n <div class=\"upload-icon rounded position-absolute text-white align-items-center justify-content-center px-3 py-2 w-100\" [ngStyle]=\"{ 'aspect-ratio': ratio }\" (click)=\"file.click();\">\n <ion-icon class=\"upload-icon\" name=\"cloud-upload\" title=\"Drop file or click to browse\" *ngIf=\"!imgSrc; else deleteIcon\" />\n \n <ng-template #deleteIcon>\n <div class=\"position-absolute display-flex justify-content-center rounded p-1 d-btn\">\n <ion-icon name=\"trash\" class=\"text-red-600\" title=\"Clear Image\" (click)=\"clear($event)\" />\n </div>\n </ng-template>\n </div>\n \n <input type=\"file\" hidden accept=\"image/png, image/jpeg, image/jpg\" multiple=\"false\" (change)=\"selectPhoto($event)\" #file />\n </div>\n</div>\n", styles: ["ion-icon{font-size:24px}.img-container{width:250px;border-style:dashed!important}.img-container:hover .upload-icon{display:flex}.img-container:not(:has(img)):before{content:\"Choose file or Drag here.\";top:50%;left:50%;font-size:12px;position:absolute;color:gray;text-align:center;transform:translate(-50%,-50%)}.upload-icon:not(ion-icon){background:#00000050}.upload-icon{top:0;left:0;display:none;cursor:pointer}.d-btn{right:10px;bottom:10px;width:32px;height:32px;background-color:#fee2e2}.d-btn ion-icon{color:#dc2626}.dragging{border:2px dashed #ED6B26!important}.dragging:not(:has(img)):before{content:\"Drop\";font-size:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: DragNDropDirective, selector: "[upDragNDrop]", outputs: ["fileDropped"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1370
1399
  }
1371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormImagePickerComponent, decorators: [{
1400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormImagePickerComponent, decorators: [{
1372
1401
  type: Component,
1373
1402
  args: [{ standalone: true, selector: 'up-image-picker', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1374
1403
  class: 'd-block'
@@ -1393,765 +1422,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
1393
1422
  type: Output
1394
1423
  }] } });
1395
1424
 
1396
- class FilterComponent {
1397
- constructor(placeholder, ch, popoverCtrl) {
1398
- this.placeholder = placeholder;
1399
- this.ch = ch;
1400
- this.popoverCtrl = popoverCtrl;
1401
- this.onSearch = new EventEmitter();
1402
- this.form = new FormGroup({});
1403
- this.activeFilter = [];
1404
- }
1405
- ngOnInit() {
1406
- this.config.fields.forEach(({ key, initialValue }) => {
1407
- if (typeof key === 'string')
1408
- this.createFormControl(key, initialValue);
1409
- else {
1410
- key.forEach((k, i) => this.createFormControl(k, initialValue?.at(i)));
1411
- }
1412
- });
1413
- }
1414
- close() { this.popoverCtrl.dismiss(); }
1415
- clear() {
1416
- this.resetValue();
1417
- this.form.reset();
1418
- this.onSearch.emit({ mode: this.config.mode, data: null });
1419
- }
1420
- removeFilter(i) {
1421
- this.form.controls[this.activeFilter[i].key].setValue('');
1422
- this.activeFilter.splice(i, 1);
1423
- this.emitValue();
1424
- }
1425
- search() {
1426
- this.resetValue();
1427
- this.emitValue((k, v) => this.activeFilter.push({ key: k, value: v, label: `${k}:${k.includes('date') ? formatDate(v, 'dd MMM yyyy', 'en-US') : v}` }));
1428
- this.close();
1429
- }
1430
- add() {
1431
- const { key, value } = this.getValue(this.searchBox.nativeElement.value);
1432
- if (this.config.fields.findIndex(({ key: k }) => k === key) === -1) {
1433
- this.searchBox.nativeElement.value = '';
1434
- return;
1435
- }
1436
- const i = this.activeFilter.findIndex(({ key: k }) => k === key);
1437
- if (i === -1)
1438
- this.activeFilter.push({ label: `${key}:${value}`, key, value });
1439
- else {
1440
- this.activeFilter[i].key = key;
1441
- this.activeFilter[i].value = value;
1442
- this.activeFilter[i].label = `${key}:${value}`;
1443
- }
1444
- this.form.patchValue({ [key]: value });
1445
- this.searchBox.nativeElement.value = '';
1446
- this.emitValue();
1447
- }
1448
- resetValue() {
1449
- this.activeFilter.length = 0;
1450
- this.searchBox.nativeElement.value = '';
1451
- }
1452
- getValue(value) {
1453
- const values = value.split(':');
1454
- if (values.length === 1)
1455
- return { key: this.config.fields[0].key, value: values[0] };
1456
- return { key: values[0], value: values[1] };
1457
- }
1458
- emitValue(extraAction) {
1459
- let flag = false;
1460
- const f = this.form.getRawValue();
1461
- const data = {};
1462
- Object.keys(f).forEach((k) => {
1463
- if (!f[k])
1464
- return;
1465
- flag = true;
1466
- data[k] = f[k];
1467
- extraAction?.(k, f[k]);
1468
- });
1469
- this.onSearch.emit({ mode: this.config.mode, data: flag ? data : null });
1470
- }
1471
- createFormControl(key, val) {
1472
- this.form.addControl(key, new FormControl(''));
1473
- if (val) {
1474
- this.form.controls[key].setValue(val);
1475
- this.activeFilter.push({ label: `${key}:${val}`, key, value: val });
1476
- }
1477
- }
1478
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FilterComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
1479
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: FilterComponent, isStandalone: true, selector: "up-filter", inputs: { id: "id", config: "config" }, outputs: { onSearch: "onSearch" }, host: { classAttribute: "d-block position-relative" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], ngImport: i0, template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n <div *ngIf=\"activeFilter.length > 0\" class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\" *ngFor=\"let item of activeFilter; index as i\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n </div>\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n<ng-container *ngIf=\"config.mode === 'advanced'\">\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n\n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n <ng-container *ngFor=\"let c of config.fields\">\n <ng-container [ngSwitch]=\"c.type\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchCase=\"'number'\" />\n \n <div class=\"my-4\" *ngSwitchCase=\"'checkbox'\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n \n <div class=\"d-flex gap-3 my-4\" *ngSwitchCase=\"'date-range'\">\n <up-date class=\"flex-grow-1\" name=\"filter-from\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" />\n <up-date class=\"flex-grow-1\" name=\"filter-to\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" />\n </div>\n \n <up-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [items]=\"c.options!\" *ngSwitchCase=\"'select'\" />\n <up-searchable-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [queryFunc]=\"c.getOptions!\" [initialItems]=\"c.options!\" *ngSwitchCase=\"'searchable-select'\" />\n \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchDefault />\n </ng-container>\n </ng-container>\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n</ng-container>\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:47%}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["alignment", "checked", "color", "disabled", "indeterminate", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonPopover, selector: "ion-popover" }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormDateComponent, selector: "up-date", inputs: ["label", "required", "disabled", "presentation"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormSelectComponent, selector: "up-select", inputs: ["items", "clearable", "label", "multiple", "required", "addTag", "disabled", "searchable", "bindLabel", "bindValue"] }, { kind: "component", type: FormSearchableSelectComponent, selector: "up-searchable-select", inputs: ["queryFunc", "clearable", "label", "initialItems", "required", "addTag", "disabled", "multiple", "bindLabel", "bindValue"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1480
- }
1481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FilterComponent, decorators: [{
1482
- type: Component,
1483
- args: [{ standalone: true, selector: 'up-filter', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1484
- class: 'd-block position-relative'
1485
- }, imports: [
1486
- IonicModule,
1487
- CommonModule,
1488
- FormDateComponent,
1489
- FormInputComponent,
1490
- ReactiveFormsModule,
1491
- FormSelectComponent,
1492
- FormSearchableSelectComponent
1493
- ], template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n <div *ngIf=\"activeFilter.length > 0\" class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\" *ngFor=\"let item of activeFilter; index as i\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n </div>\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n<ng-container *ngIf=\"config.mode === 'advanced'\">\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n\n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n <ng-container *ngFor=\"let c of config.fields\">\n <ng-container [ngSwitch]=\"c.type\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchCase=\"'number'\" />\n \n <div class=\"my-4\" *ngSwitchCase=\"'checkbox'\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n \n <div class=\"d-flex gap-3 my-4\" *ngSwitchCase=\"'date-range'\">\n <up-date class=\"flex-grow-1\" name=\"filter-from\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" />\n <up-date class=\"flex-grow-1\" name=\"filter-to\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" />\n </div>\n \n <up-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [items]=\"c.options!\" *ngSwitchCase=\"'select'\" />\n <up-searchable-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [queryFunc]=\"c.getOptions!\" [initialItems]=\"c.options!\" *ngSwitchCase=\"'searchable-select'\" />\n \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchDefault />\n </ng-container>\n </ng-container>\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n</ng-container>\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:47%}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}\n"] }]
1494
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1495
- type: Attribute,
1496
- args: ['placeholder']
1497
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.PopoverController }], propDecorators: { id: [{
1498
- type: Input,
1499
- args: [{ required: true }]
1500
- }], config: [{
1501
- type: Input,
1502
- args: [{ required: true }]
1503
- }], onSearch: [{
1504
- type: Output
1505
- }], searchBox: [{
1506
- type: ViewChild,
1507
- args: ['searchBox']
1508
- }] } });
1509
-
1510
- class GridService {
1511
- constructor() {
1512
- this.apis = {};
1513
- }
1514
- getApi(id) { return this.apis[id]; }
1515
- setApi(id, api) { this.apis[id] = api; }
1516
- refreshGridCache(id) {
1517
- this.apis[id].refreshInfiniteCache();
1518
- }
1519
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1520
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, providedIn: 'root' }); }
1521
- }
1522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, decorators: [{
1523
- type: Injectable,
1524
- args: [{
1525
- providedIn: 'root'
1526
- }]
1527
- }] });
1528
-
1529
- class GridSnapshotComponent {
1530
- constructor(service) {
1531
- this.service = service;
1532
- this.id = 'grid-s';
1533
- this.rowSelection = 'single';
1534
- this.onRowClick = new EventEmitter();
1535
- this.onGridReady = new EventEmitter();
1536
- this.onSelectionChanged = new EventEmitter();
1537
- this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
1538
- this.sort = { order: '', orderBy: '' };
1539
- ModuleRegistry.register(InfiniteRowModelModule);
1540
- }
1541
- ngOnInit() {
1542
- if (!this.config.rowPerPage)
1543
- this.config.rowPerPage = 50;
1544
- this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
1545
- }
1546
- ngOnDestroy() { this.subs?.unsubscribe(); }
1547
- clickRow(data) { this.onRowClick.emit(data.node); }
1548
- dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
1549
- changeSelected(data) { this.onSelectionChanged.emit(data); }
1550
- changePagination(ev) {
1551
- if (ev.newPageSize)
1552
- this.config.rowPerPage = this.gridApi.paginationGetPageSize();
1553
- }
1554
- setDatasource(ev) {
1555
- this.gridApi = ev.api;
1556
- this.onGridReady.emit(ev);
1557
- this.service.setApi(this.id, this.gridApi);
1558
- const state = JSON.parse(localStorage.getItem(this.id));
1559
- if (state)
1560
- ev.api.applyColumnState({ state, applyOrder: true });
1561
- this.reset();
1562
- }
1563
- reset() {
1564
- const datasource = {
1565
- getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
1566
- this.gridApi.showLoadingOverlay();
1567
- if (colId !== this.sort.orderBy || sort !== this.sort.order) {
1568
- this.sort.order = sort;
1569
- this.sort.orderBy = colId;
1570
- this.gridApi.paginationGoToFirstPage();
1571
- }
1572
- const page = this.gridApi.paginationGetCurrentPage();
1573
- if (page === 0)
1574
- this.after = null;
1575
- this.subs = this.config.getDataSnapshot(this.config.rowPerPage, colId, sort, this.after).subscribe({
1576
- next: ({ data, totalRecord }) => {
1577
- this.gridApi.hideOverlay();
1578
- const { edges, pageInfo } = data;
1579
- if (edges.length > 0)
1580
- this.after = pageInfo.endCursor;
1581
- if (page === 0) {
1582
- if (edges.length === 0)
1583
- this.gridApi.showNoRowsOverlay();
1584
- this.count = totalRecord;
1585
- }
1586
- if (!this.config.useTotalRecord && !pageInfo.hasNextPage) {
1587
- this.count = (page * this.config.rowPerPage) + edges.length;
1588
- }
1589
- successCallback(edges, this.count);
1590
- },
1591
- error: () => {
1592
- this.gridApi.hideOverlay();
1593
- this.gridApi.showNoRowsOverlay();
1594
- failCallback();
1595
- }
1596
- });
1597
- }
1598
- };
1599
- this.gridApi.setGridOption('datasource', datasource);
1600
- }
1601
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridSnapshotComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
1602
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: GridSnapshotComponent, isStandalone: true, selector: "up-snapshot-grid", inputs: { id: "id", config: "config", rowSelection: "rowSelection" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSelectionChanged: "onSelectionChanged" }, host: { classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n rowModelType=\"infinite\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AgGridModule }, { kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "suppressAggAtRootLevel", "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", "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", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1603
- }
1604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridSnapshotComponent, decorators: [{
1605
- type: Component,
1606
- args: [{ standalone: true, selector: 'up-snapshot-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1607
- class: 'd-block h-100 w-100'
1608
- }, imports: [
1609
- AgGridModule
1610
- ], template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n rowModelType=\"infinite\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n" }]
1611
- }], ctorParameters: () => [{ type: GridService }], propDecorators: { id: [{
1612
- type: Input
1613
- }], config: [{
1614
- type: Input,
1615
- args: [{ required: true }]
1616
- }], rowSelection: [{
1617
- type: Input
1618
- }], onRowClick: [{
1619
- type: Output
1620
- }], onGridReady: [{
1621
- type: Output
1622
- }], onSelectionChanged: [{
1623
- type: Output
1624
- }] } });
1625
-
1626
- class GridPaginationComponent {
1627
- constructor(service) {
1628
- this.service = service;
1629
- this.rowData = [];
1630
- this.id = 'grid-p';
1631
- this.rowModelType = 'infinite';
1632
- this.rowSelection = 'single';
1633
- this.onRowClick = new EventEmitter();
1634
- this.onGridReady = new EventEmitter();
1635
- this.onSelectionChanged = new EventEmitter();
1636
- this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
1637
- }
1638
- ngOnInit() {
1639
- ModuleRegistry.register(this.rowModelType === 'infinite' ? InfiniteRowModelModule : ClientSideRowModelModule);
1640
- if (!this.config.rowPerPage)
1641
- this.config.rowPerPage = 50;
1642
- this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
1643
- }
1644
- ngOnDestroy() { this.subs?.unsubscribe(); }
1645
- clickRow(data) { this.onRowClick.emit(data); }
1646
- dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
1647
- changeSelected(data) { this.onSelectionChanged.emit(data); }
1648
- changePagination(ev) {
1649
- if (ev.newPageSize)
1650
- this.config.rowPerPage = this.gridApi.paginationGetPageSize();
1651
- }
1652
- setDatasource(ev) {
1653
- this.gridApi = ev.api;
1654
- this.onGridReady.emit(ev);
1655
- this.service.setApi(this.id, this.gridApi);
1656
- const state = JSON.parse(localStorage.getItem(this.id));
1657
- if (state)
1658
- ev.api.applyColumnState({ state, applyOrder: true });
1659
- if (this.rowModelType === 'clientSide')
1660
- this.gridApi.setGridOption('rowData', this.rowData);
1661
- if (this.rowModelType !== 'infinite')
1662
- return;
1663
- this.reset();
1664
- }
1665
- reset() {
1666
- if (!this.gridApi)
1667
- return;
1668
- const datasource = {
1669
- getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
1670
- this.gridApi.showLoadingOverlay();
1671
- const offset = this.gridApi.paginationGetCurrentPage();
1672
- this.subs = this.config.getData(offset, this.config.rowPerPage, colId, sort).subscribe({
1673
- next: ({ data, totalRecord }) => {
1674
- this.gridApi.hideOverlay();
1675
- if (offset === 0) {
1676
- if (data.length === 0)
1677
- this.gridApi.showNoRowsOverlay();
1678
- this.count = totalRecord;
1679
- }
1680
- if (!this.config.useTotalRecord && data.length < this.config.rowPerPage) {
1681
- this.count = (offset * this.config.rowPerPage) + data.length;
1682
- }
1683
- successCallback(data, this.count);
1684
- },
1685
- error: () => {
1686
- this.gridApi.hideOverlay();
1687
- this.gridApi.showNoRowsOverlay();
1688
- failCallback();
1689
- }
1690
- });
1691
- }
1692
- };
1693
- this.gridApi?.setGridOption('datasource', datasource);
1694
- }
1695
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridPaginationComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
1696
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: GridPaginationComponent, isStandalone: true, selector: "up-pagination-grid", inputs: { config: "config", rowData: "rowData", id: "id", rowModelType: "rowModelType", rowSelection: "rowSelection" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSelectionChanged: "onSelectionChanged" }, host: { classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowModelType]=\"rowModelType\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AgGridModule }, { kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "suppressAggAtRootLevel", "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", "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", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1697
- }
1698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridPaginationComponent, decorators: [{
1699
- type: Component,
1700
- args: [{ standalone: true, selector: 'up-pagination-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1701
- class: 'd-block h-100 w-100'
1702
- }, imports: [
1703
- AgGridModule
1704
- ], template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowModelType]=\"rowModelType\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n" }]
1705
- }], ctorParameters: () => [{ type: GridService }], propDecorators: { config: [{
1706
- type: Input,
1707
- args: [{ required: true }]
1708
- }], rowData: [{
1709
- type: Input
1710
- }], id: [{
1711
- type: Input
1712
- }], rowModelType: [{
1713
- type: Input
1714
- }], rowSelection: [{
1715
- type: Input
1716
- }], onRowClick: [{
1717
- type: Output
1718
- }], onGridReady: [{
1719
- type: Output
1720
- }], onSelectionChanged: [{
1721
- type: Output
1722
- }] } });
1723
-
1724
- class ListPaginationContainerComponent {
1725
- constructor(id, router) {
1726
- this.id = id;
1727
- this.router = router;
1728
- this.onRowClick = new EventEmitter();
1729
- this.onGridReady = new EventEmitter();
1730
- this.onSearch = new EventEmitter();
1731
- this.gridId = `grid-${this.id ?? 'p'}`;
1732
- }
1733
- openDetail(data) {
1734
- this.onRowClick.emit(data);
1735
- this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
1736
- }
1737
- setGridApi(ev) {
1738
- this.gridApi = ev.api;
1739
- this.onGridReady.emit(ev);
1740
- }
1741
- search(k) {
1742
- this.onSearch.emit(k);
1743
- this.gridApi.refreshInfiniteCache();
1744
- }
1745
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListPaginationContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1746
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ListPaginationContainerComponent, isStandalone: true, selector: "up-list-pagination-container", inputs: { header: "header", config: "config" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSearch: "onSearch" }, host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">{{ header }}</h3>\n\n <ion-button routerLink=\"{{ config.baseUrl }}create\" *ngIf=\"config.permissions.canCreate\">\n <ion-icon name=\"add\" slot=\"start\" />\n Create\n </ion-button>\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["up-filter{min-width:300px}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkDelegate, selector: ":not(a):not(area)[routerLink]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
1747
- }
1748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListPaginationContainerComponent, decorators: [{
1749
- type: Component,
1750
- args: [{ standalone: true, selector: 'up-list-pagination-container', host: {
1751
- class: 'd-flex flex-column h-100 w-100'
1752
- }, imports: [
1753
- IonicModule,
1754
- CommonModule,
1755
- RouterModule,
1756
- FilterComponent,
1757
- GridPaginationComponent
1758
- ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">{{ header }}</h3>\n\n <ion-button routerLink=\"{{ config.baseUrl }}create\" *ngIf=\"config.permissions.canCreate\">\n <ion-icon name=\"add\" slot=\"start\" />\n Create\n </ion-button>\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["up-filter{min-width:300px}\n"] }]
1759
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1760
- type: Attribute,
1761
- args: ['id']
1762
- }] }, { type: i1$2.Router }], propDecorators: { header: [{
1763
- type: Input,
1764
- args: [{ required: true }]
1765
- }], config: [{
1766
- type: Input,
1767
- args: [{ required: true }]
1768
- }], onRowClick: [{
1769
- type: Output
1770
- }], onGridReady: [{
1771
- type: Output
1772
- }], onSearch: [{
1773
- type: Output
1774
- }] } });
1775
-
1776
- class ListSnapshotContainerComponent {
1777
- constructor(id, router) {
1778
- this.id = id;
1779
- this.router = router;
1780
- this.onRowClick = new EventEmitter();
1781
- this.onGridReady = new EventEmitter();
1782
- this.onSearch = new EventEmitter();
1783
- this.gridId = `grid-${this.id ?? 'p'}`;
1784
- }
1785
- openDetail(data) {
1786
- this.onRowClick.emit(data);
1787
- this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
1788
- }
1789
- setGridApi(ev) {
1790
- this.gridApi = ev.api;
1791
- this.onGridReady.emit(ev);
1792
- }
1793
- search(k) {
1794
- this.onSearch.emit(k);
1795
- this.gridApi.paginationGoToFirstPage();
1796
- this.gridApi.purgeInfiniteCache();
1797
- }
1798
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListSnapshotContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1799
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ListSnapshotContainerComponent, isStandalone: true, selector: "up-list-snapshot-container", inputs: { header: "header", config: "config" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSearch: "onSearch" }, host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">{{ header }}</h3>\n\n <ion-button routerLink=\"{{ config.baseUrl }}create\" *ngIf=\"config.permissions.canCreate\">\n <ion-icon name=\"add\" slot=\"start\" />\n Create\n </ion-button>\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-snapshot-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["up-filter{min-width:300px}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i1.RouterLinkDelegate, selector: ":not(a):not(area)[routerLink]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: GridSnapshotComponent, selector: "up-snapshot-grid", inputs: ["id", "config", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
1800
- }
1801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListSnapshotContainerComponent, decorators: [{
1802
- type: Component,
1803
- args: [{ standalone: true, selector: 'up-list-snapshot-container', host: {
1804
- class: 'd-flex flex-column h-100 w-100'
1805
- }, imports: [
1806
- IonicModule,
1807
- CommonModule,
1808
- RouterModule,
1809
- FilterComponent,
1810
- GridSnapshotComponent
1811
- ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">{{ header }}</h3>\n\n <ion-button routerLink=\"{{ config.baseUrl }}create\" *ngIf=\"config.permissions.canCreate\">\n <ion-icon name=\"add\" slot=\"start\" />\n Create\n </ion-button>\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-snapshot-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["up-filter{min-width:300px}\n"] }]
1812
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1813
- type: Attribute,
1814
- args: ['id']
1815
- }] }, { type: i1$2.Router }], propDecorators: { header: [{
1816
- type: Input,
1817
- args: [{ required: true }]
1818
- }], config: [{
1819
- type: Input,
1820
- args: [{ required: true }]
1821
- }], onRowClick: [{
1822
- type: Output
1823
- }], onGridReady: [{
1824
- type: Output
1825
- }], onSearch: [{
1826
- type: Output
1827
- }] } });
1828
-
1829
- class TabContentComponent {
1830
- constructor(fragment, ch) {
1831
- this.fragment = fragment;
1832
- this.ch = ch;
1833
- this.isActive = false;
1834
- }
1835
- toggleVisibility(s = true) {
1836
- this.isActive = s;
1837
- this.ch.markForCheck();
1838
- }
1839
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabContentComponent, deps: [{ token: 'fragment', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1840
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TabContentComponent, selector: "up-tab-content", inputs: { header: "header" }, host: { properties: { "class.flex-grow-1": "this.isActive" }, classAttribute: "overflow-auto" }, ngImport: i0, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1841
- }
1842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabContentComponent, decorators: [{
1843
- type: Component,
1844
- args: [{ selector: 'up-tab-content', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1845
- class: 'overflow-auto'
1846
- }, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n" }]
1847
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1848
- type: Attribute,
1849
- args: ['fragment']
1850
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { isActive: [{
1851
- type: HostBinding,
1852
- args: ['class.flex-grow-1']
1853
- }], header: [{
1854
- type: Input,
1855
- args: [{ required: true }]
1856
- }] } });
1857
-
1858
- class TabGroupComponent {
1859
- constructor(router, activeRoute) {
1860
- this.router = router;
1861
- this.activeRoute = activeRoute;
1862
- this.onChange = new EventEmitter();
1863
- this.tabs = [];
1864
- }
1865
- ngAfterContentInit() {
1866
- this.content.forEach(({ header, fragment }) => this.tabs.push({ fragment, label: header }));
1867
- this.changeTab(this.activeRoute.snapshot.fragment);
1868
- }
1869
- changeTab(f) {
1870
- this.onChange.emit(f);
1871
- this.router.navigate([], { relativeTo: this.activeRoute, fragment: f || undefined, replaceUrl: true });
1872
- let found = false;
1873
- this.content.forEach((tab) => {
1874
- if (tab.fragment !== f)
1875
- tab.toggleVisibility(false);
1876
- else {
1877
- found = true;
1878
- this.activeFragment = f;
1879
- tab.toggleVisibility(true);
1880
- }
1881
- });
1882
- if (!found) {
1883
- this.content.get(0).toggleVisibility(true);
1884
- this.activeFragment = this.content.get(0).fragment;
1885
- }
1886
- }
1887
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabGroupComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
1888
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TabGroupComponent, selector: "up-tab-group", outputs: { onChange: "onChange" }, host: { classAttribute: "d-flex flex-column" }, queries: [{ propertyName: "content", predicate: TabContentComponent, descendants: true }], ngImport: i0, template: "<ion-segment [scrollable]=\"true\" [value]=\"activeFragment\" class=\"d-flex pb-4 flex-shrink-0\">\n <ion-segment-button *ngFor=\"let t of tabs\" class=\"rounded\" [value]=\"t.fragment\" (click)=\"changeTab(t.fragment)\">\n {{ t.label }}\n </ion-segment-button>\n</ion-segment>\n\n<ng-content />\n", styles: ["ion-segment::-webkit-scrollbar{height:0}ion-segment-button{--color: #9E9E9E;--color-checked: #424242;--indicator-color: #ED6B26;border:none;height:34px;font-weight:400;min-width:100px;min-height:34px;width:fit-content;text-transform:none;letter-spacing:normal}ion-segment-button.segment-button-checked{font-weight:500}ion-segment-button::part(native){border-radius:4px}ion-segment-button::part(indicator-background){margin:auto;max-width:25%;border-radius:8px}\n"], dependencies: [{ kind: "component", type: i1.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: i1.IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1889
- }
1890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabGroupComponent, decorators: [{
1891
- type: Component,
1892
- args: [{ selector: 'up-tab-group', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1893
- class: 'd-flex flex-column'
1894
- }, template: "<ion-segment [scrollable]=\"true\" [value]=\"activeFragment\" class=\"d-flex pb-4 flex-shrink-0\">\n <ion-segment-button *ngFor=\"let t of tabs\" class=\"rounded\" [value]=\"t.fragment\" (click)=\"changeTab(t.fragment)\">\n {{ t.label }}\n </ion-segment-button>\n</ion-segment>\n\n<ng-content />\n", styles: ["ion-segment::-webkit-scrollbar{height:0}ion-segment-button{--color: #9E9E9E;--color-checked: #424242;--indicator-color: #ED6B26;border:none;height:34px;font-weight:400;min-width:100px;min-height:34px;width:fit-content;text-transform:none;letter-spacing:normal}ion-segment-button.segment-button-checked{font-weight:500}ion-segment-button::part(native){border-radius:4px}ion-segment-button::part(indicator-background){margin:auto;max-width:25%;border-radius:8px}\n"] }]
1895
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { onChange: [{
1896
- type: Output
1897
- }], content: [{
1898
- type: ContentChildren,
1899
- args: [TabContentComponent, { descendants: true }]
1900
- }] } });
1901
-
1902
- class TabsComponentModule {
1903
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1904
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, declarations: [TabGroupComponent,
1905
- TabContentComponent], imports: [IonicModule,
1906
- CommonModule], exports: [TabGroupComponent,
1907
- TabContentComponent] }); }
1908
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, imports: [IonicModule,
1909
- CommonModule] }); }
1910
- }
1911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, decorators: [{
1912
- type: NgModule,
1913
- args: [{
1914
- imports: [
1915
- IonicModule,
1916
- CommonModule,
1917
- ],
1918
- declarations: [
1919
- TabGroupComponent,
1920
- TabContentComponent
1921
- ],
1922
- exports: [
1923
- TabGroupComponent,
1924
- TabContentComponent
1925
- ]
1926
- }]
1927
- }] });
1928
-
1929
- class AuditService {
1930
- constructor(apollo) {
1931
- this.apollo = apollo;
1932
- this.baseAttr = `
1933
- action
1934
- createdAt
1935
- description
1936
- function
1937
- guid
1938
- msSource
1939
- sourceIp
1940
- user {
1941
- name
1942
- sourcePlatform
1943
- status
1944
- appLoginPrincipal {
1945
- principalType
1946
- principalId
1947
- }
1948
- }
1949
- `;
1950
- }
1951
- query(input, extraAttr = '') {
1952
- return this.apollo.query({
1953
- variables: { input },
1954
- query: gql `
1955
- query QueryAudit($input: AuditTrailCriteria!) {
1956
- auditMsAuditTrail(input: $input) {
1957
- ${this.baseAttr}
1958
- ${extraAttr}
1959
- }
1960
- }
1961
- `
1962
- });
1963
- }
1964
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
1965
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditService, providedIn: 'root' }); }
1966
- }
1967
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditService, decorators: [{
1968
- type: Injectable,
1969
- args: [{
1970
- providedIn: 'root'
1971
- }]
1972
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1973
-
1974
- class AuditListComponent {
1975
- constructor(id, url, router, service) {
1976
- this.id = id;
1977
- this.url = url;
1978
- this.router = router;
1979
- this.service = service;
1980
- this.filterConfig = { mode: 'simple', fields: [{ key: 'description', label: '', type: 'text' }] };
1981
- this.gridConfig = {
1982
- useTotalRecord: false,
1983
- noRowText: 'Audit not found',
1984
- colDefs: [
1985
- { headerName: 'User', field: 'user.name', sortable: false },
1986
- { headerName: 'Description', field: 'description', minWidth: 350, sortable: false },
1987
- { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
1988
- ],
1989
- getData: (page, pageSize, sortBy, dir) => {
1990
- if (!this.criteria.tagValues)
1991
- return of({ data: [] });
1992
- this.criteria.page = page;
1993
- this.criteria.sortBy = sortBy;
1994
- this.criteria.pageSize = pageSize;
1995
- this.criteria.sortDirection = dir;
1996
- return this.service.query(this.criteria).pipe(map(({ data: { auditMsAuditTrail: data } }) => ({ data })));
1997
- },
1998
- };
1999
- this.criteria = { sortBy: 'createdAt', sortDirection: 'desc', page: 0, pageSize: 50 };
2000
- }
2001
- ngOnChanges(e) {
2002
- if (e['tagKeys'])
2003
- this.criteria.tagKeys = this.tagKeys;
2004
- if (e['relatedEntities'])
2005
- this.criteria.relatedEntities = this.relatedEntities;
2006
- }
2007
- setGridApi({ api }) { this.gridApi = api; }
2008
- rowClicked({ guid }) {
2009
- this.router.navigate([`${this.url}/${this.criteria.tagValues[0]}/audit/${guid}`], { preserveFragment: true });
2010
- }
2011
- search({ data }) {
2012
- this.criteria.description = data?.description;
2013
- this.gridComponent.reset();
2014
- }
2015
- setGuid(guid) {
2016
- this.criteria.description = null;
2017
- this.criteria.tagValues = [guid];
2018
- this.gridComponent.reset();
2019
- }
2020
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditListComponent, deps: [{ token: 'id', attribute: true }, { token: 'mainUrl', attribute: true }, { token: i1$2.Router }, { token: AuditService }], target: i0.ɵɵFactoryTarget.Component }); }
2021
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: AuditListComponent, isStandalone: true, selector: "up-audit-list", inputs: { relatedEntities: "relatedEntities", tagKeys: "tagKeys" }, host: { classAttribute: "d-flex flex-column h-100" }, viewQueries: [{ propertyName: "gridComponent", first: true, predicate: GridPaginationComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex justify-content-end px-4 pb-4 flex-shrink-0\">\n <up-filter class=\"w-100\" id=\"audit-filter\" placeholder=\"Type to search\" [config]=\"filterConfig\" (onSearch)=\"search($event);\" />\n</div>\n \n<up-pagination-grid id=\"grid-audit\" class=\"flex-grow-1\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"rowClicked($event)\" />\n", styles: [""], dependencies: [{ kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2022
- }
2023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditListComponent, decorators: [{
2024
- type: Component,
2025
- args: [{ standalone: true, selector: 'up-audit-list', host: {
2026
- class: 'd-flex flex-column h-100'
2027
- }, imports: [
2028
- FilterComponent,
2029
- GridPaginationComponent
2030
- ], template: "<div class=\"d-flex justify-content-end px-4 pb-4 flex-shrink-0\">\n <up-filter class=\"w-100\" id=\"audit-filter\" placeholder=\"Type to search\" [config]=\"filterConfig\" (onSearch)=\"search($event);\" />\n</div>\n \n<up-pagination-grid id=\"grid-audit\" class=\"flex-grow-1\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"rowClicked($event)\" />\n" }]
2031
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2032
- type: Attribute,
2033
- args: ['id']
2034
- }] }, { type: undefined, decorators: [{
2035
- type: Attribute,
2036
- args: ['mainUrl']
2037
- }] }, { type: i1$2.Router }, { type: AuditService }], propDecorators: { relatedEntities: [{
2038
- type: Input,
2039
- args: [{ required: true }]
2040
- }], tagKeys: [{
2041
- type: Input
2042
- }], gridComponent: [{
2043
- type: ViewChild,
2044
- args: [GridPaginationComponent]
2045
- }] } });
2046
-
2047
- class AuditDetailComponent {
2048
- constructor(fb, service, route, navCtrl) {
2049
- this.fb = fb;
2050
- this.service = service;
2051
- this.route = route;
2052
- this.navCtrl = navCtrl;
2053
- this.gridConfig = {
2054
- useTotalRecord: false,
2055
- colDefs: [
2056
- { headerName: 'Attribute Name', field: 'attribute', sort: 'asc' },
2057
- { headerName: 'Old Value', field: 'oldData' },
2058
- { headerName: 'New Value', field: 'newData' }
2059
- ]
2060
- };
2061
- this.form = this.fb.group({
2062
- guid: new FormControl({ value: null, disabled: true }),
2063
- action: new FormControl({ value: null, disabled: true }),
2064
- description: new FormControl({ value: null, disabled: true }),
2065
- userName: new FormControl({ value: null, disabled: true }),
2066
- sourceIp: new FormControl({ value: null, disabled: true }),
2067
- createdAt: new FormControl({ value: null, disabled: true }),
2068
- msSource: new FormControl({ value: null, disabled: true }),
2069
- sourcePlatform: new FormControl({ value: null, disabled: true }),
2070
- function: new FormControl({ value: null, disabled: true }),
2071
- });
2072
- this.isLoading = true;
2073
- this.guid = '';
2074
- }
2075
- ngOnDestroy() { this.sub?.unsubscribe(); }
2076
- setGridApi({ api }) {
2077
- this.gridApi = api;
2078
- this.getData();
2079
- }
2080
- isIsoDateString(str) {
2081
- const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$/;
2082
- return regex.test(str);
2083
- }
2084
- formatData(value) {
2085
- if (value === null)
2086
- return value;
2087
- if (typeof value === 'object')
2088
- return JSON.stringify(value);
2089
- if (this.isIsoDateString(value))
2090
- return formatDate(value, 'dd MMM yyyy HH:mm', 'en-US');
2091
- return value;
2092
- }
2093
- getData() {
2094
- const newGuid = this.route.children[0].snapshot.params['audit'];
2095
- if (!newGuid || this.guid === newGuid)
2096
- return;
2097
- this.sub?.unsubscribe();
2098
- this.gridApi?.showLoadingOverlay();
2099
- this.guid = newGuid;
2100
- this.isLoading = true;
2101
- this.sub = this.service.query({ guid: this.guid }, 'data tags { tagKey tagValue }').subscribe({
2102
- next: ({ data: { auditMsAuditTrail: data } }) => {
2103
- this.gridApi?.hideOverlay();
2104
- if (data.length !== 1) {
2105
- this.navCtrl.back();
2106
- return;
2107
- }
2108
- const { guid, action, description, function: func, msSource, sourceIp, createdAt } = data[0];
2109
- this.form.patchValue({
2110
- guid,
2111
- function: func,
2112
- msSource, sourceIp,
2113
- action, description,
2114
- userName: data[0].user?.name,
2115
- sourcePlatform: data[0].user?.sourcePlatform,
2116
- createdAt: formatDate(createdAt, 'dd MMM yyyy HH:mm', 'en-US'),
2117
- });
2118
- this.isLoading = false;
2119
- this.getChangedData(data[0].data);
2120
- },
2121
- error: () => this.navCtrl.back()
2122
- });
2123
- }
2124
- getChangedData({ oldData, newData }) {
2125
- if (!newData || Array.isArray(JSON.parse(newData))) {
2126
- this.gridApi.setGridOption('rowData', []);
2127
- return;
2128
- }
2129
- const objNewData = JSON.parse(newData);
2130
- const changedData = Object.entries(oldData ? JSON.parse(oldData) : JSON.parse(newData))
2131
- .filter(([key, oldVal]) => JSON.stringify(oldData ? oldVal : null) !== JSON.stringify(objNewData[key]) && !key.match(/update|created/))
2132
- .map(([key, oldVal]) => ({
2133
- attribute: key,
2134
- oldData: oldData ? this.formatData(oldVal) : null,
2135
- newData: this.formatData(objNewData[key])
2136
- }));
2137
- this.gridApi.setGridOption('rowData', changedData);
2138
- }
2139
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditDetailComponent, deps: [{ token: i1$3.FormBuilder }, { token: AuditService }, { token: i1$2.ActivatedRoute }, { token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
2140
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: AuditDetailComponent, isStandalone: true, selector: "up-audit-detail", ngImport: i0, template: "<up-tab-group class=\"h-100\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <form [formGroup]=\"form\" class=\"px-4 pb-4\" *ngIf=\"!isLoading; else loading\">\n <div class=\"d-flex align-items-center gap-2 pb-3\">\n <ion-icon name=\"information-circle\" />\n <h5 class=\"m-0\">Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-lg-4\" label=\"Action\" formControlName=\"action\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Source IP\" formControlName=\"sourceIp\" />\n </div>\n </div>\n \n <up-input class=\"mb-4\" label=\"User Name\" formControlName=\"userName\" />\n <up-textarea class=\"mb-4\" label=\"Description\" formControlName=\"description\" />\n\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"laptop\" />\n <h5 class=\"m-0\">System Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Action Date\" formControlName=\"createdAt\" />\n <up-input class=\"mb-lg-4\" label=\"Source Platform\" formControlName=\"sourcePlatform\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"MS Source\" formControlName=\"msSource\" />\n <up-input class=\"mb-4\" label=\"Function\" formControlName=\"function\" />\n </div>\n </div>\n </form>\n\n <ng-template #loading>\n <ion-skeleton-text class=\"sk-input mx-4 mb-4\" *ngFor=\"let i of [0,1,2,3,4,5,6]\" />\n </ng-template> \n </up-tab-content>\n\n <up-tab-content header=\"Attributes\" fragment=\"attributes\">\n <up-pagination-grid id=\"grid-audit-detail\" rowModelType=\"clientSide\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" />\n </up-tab-content>\n</up-tab-group>\n", styles: ["ion-icon{font-size:24px;margin-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
2141
- }
2142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditDetailComponent, decorators: [{
2143
- type: Component,
2144
- args: [{ standalone: true, selector: 'up-audit-detail', imports: [
2145
- CommonModule,
2146
- IonicModule,
2147
- GridPaginationComponent,
2148
- TabsComponentModule,
2149
- FormInputComponent,
2150
- FormTextareaComponent,
2151
- ReactiveFormsModule
2152
- ], template: "<up-tab-group class=\"h-100\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <form [formGroup]=\"form\" class=\"px-4 pb-4\" *ngIf=\"!isLoading; else loading\">\n <div class=\"d-flex align-items-center gap-2 pb-3\">\n <ion-icon name=\"information-circle\" />\n <h5 class=\"m-0\">Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-lg-4\" label=\"Action\" formControlName=\"action\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Source IP\" formControlName=\"sourceIp\" />\n </div>\n </div>\n \n <up-input class=\"mb-4\" label=\"User Name\" formControlName=\"userName\" />\n <up-textarea class=\"mb-4\" label=\"Description\" formControlName=\"description\" />\n\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"laptop\" />\n <h5 class=\"m-0\">System Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Action Date\" formControlName=\"createdAt\" />\n <up-input class=\"mb-lg-4\" label=\"Source Platform\" formControlName=\"sourcePlatform\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"MS Source\" formControlName=\"msSource\" />\n <up-input class=\"mb-4\" label=\"Function\" formControlName=\"function\" />\n </div>\n </div>\n </form>\n\n <ng-template #loading>\n <ion-skeleton-text class=\"sk-input mx-4 mb-4\" *ngFor=\"let i of [0,1,2,3,4,5,6]\" />\n </ng-template> \n </up-tab-content>\n\n <up-tab-content header=\"Attributes\" fragment=\"attributes\">\n <up-pagination-grid id=\"grid-audit-detail\" rowModelType=\"clientSide\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" />\n </up-tab-content>\n</up-tab-group>\n", styles: ["ion-icon{font-size:24px;margin-right:5px}\n"] }]
2153
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: AuditService }, { type: i1$2.ActivatedRoute }, { type: i1.NavController }] });
2154
-
2155
1425
  var AlertTypeEnum;
2156
1426
  (function (AlertTypeEnum) {
2157
1427
  AlertTypeEnum["PasswordReset"] = "PASSWORD_RESET";
@@ -2413,573 +1683,1478 @@ var VoucherGroupType;
2413
1683
  VoucherGroupType["Import"] = "IMPORT";
2414
1684
  })(VoucherGroupType || (VoucherGroupType = {}));
2415
1685
 
2416
- class ApprovalService {
1686
+ class ProfileService {
1687
+ constructor(apollo) {
1688
+ this.apollo = apollo;
1689
+ }
1690
+ getMyProfile(fetchPolicy) {
1691
+ return this.apollo.query({
1692
+ fetchPolicy,
1693
+ errorPolicy: 'all',
1694
+ query: gql `
1695
+ query getMyProfile {
1696
+ authMsMyProfile {
1697
+ appLoginPrincipal {
1698
+ principalId
1699
+ principalType
1700
+ }
1701
+ appLoginExt {
1702
+ paramCode
1703
+ paramType
1704
+ file {
1705
+ publicUrl
1706
+ }
1707
+ }
1708
+ birthday
1709
+ category
1710
+ company {
1711
+ code
1712
+ guid
1713
+ isInternal
1714
+ name
1715
+ status
1716
+ }
1717
+ gender
1718
+ guid
1719
+ merchants {
1720
+ guid
1721
+ name
1722
+ status
1723
+ }
1724
+ name
1725
+ status
1726
+ }
1727
+ }
1728
+ `,
1729
+ }).pipe(map(({ data: { authMsMyProfile } }) => {
1730
+ if (!authMsMyProfile)
1731
+ return null;
1732
+ return authMsMyProfile;
1733
+ }));
1734
+ }
1735
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProfileService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
1736
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
1737
+ }
1738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ProfileService, decorators: [{
1739
+ type: Injectable,
1740
+ args: [{
1741
+ providedIn: 'root'
1742
+ }]
1743
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1744
+
1745
+ class AuthService {
1746
+ static { this.authToken = ''; }
1747
+ static { this.refreshToken = ''; }
1748
+ constructor(apollo, profileService) {
1749
+ this.apollo = apollo;
1750
+ this.profileService = profileService;
1751
+ }
1752
+ login(input) {
1753
+ return this.apollo.mutate({
1754
+ variables: { input },
1755
+ mutation: gql `
1756
+ mutation Login($input: LoginRq!) {
1757
+ authMsLogin(input: $input) {
1758
+ accessToken
1759
+ refreshToken
1760
+ suggestedAction
1761
+ user {
1762
+ birthday
1763
+ category
1764
+ email
1765
+ gender
1766
+ guid
1767
+ mobileNumber
1768
+ name
1769
+ status
1770
+ }
1771
+ }
1772
+ }
1773
+ `
1774
+ }).pipe(tap(({ data }) => {
1775
+ if (data?.authMsLogin) {
1776
+ const { accessToken, user, refreshToken, suggestedAction } = data.authMsLogin;
1777
+ this.user = user;
1778
+ this.user.photo = '/assets/imgs/profile.svg';
1779
+ AuthService.authToken = accessToken ?? '';
1780
+ AuthService.refreshToken = refreshToken ?? '';
1781
+ if (suggestedAction !== SuggestedAction.ChangePassword) {
1782
+ localStorage.setItem('authToken', AuthService.authToken);
1783
+ }
1784
+ localStorage.setItem('userGuid', this.user.guid);
1785
+ localStorage.setItem('refreshToken', AuthService.refreshToken);
1786
+ }
1787
+ }));
1788
+ }
1789
+ refreshToken(variables) {
1790
+ return this.apollo.mutate({
1791
+ context: {
1792
+ headers: {
1793
+ 'operation-type': 'Mutation',
1794
+ 'operation-name': 'RefreshToken'
1795
+ }
1796
+ },
1797
+ variables,
1798
+ mutation: gql `
1799
+ mutation RefreshToken($refreshToken: String!) {
1800
+ authMsRefreshAccessToken(refreshToken: $refreshToken) {
1801
+ accessToken
1802
+ refreshToken
1803
+ }
1804
+ }
1805
+ `
1806
+ });
1807
+ }
1808
+ getProfile(fetchPolicy) {
1809
+ return this.profileService.getMyProfile(fetchPolicy).pipe(tap((user) => {
1810
+ if (!user)
1811
+ return;
1812
+ this.user = { ...user, photo: '/assets/imgs/profile.svg' };
1813
+ user.appLoginExt?.forEach(({ paramCode, file: { publicUrl } }) => {
1814
+ if (paramCode === 'USER_PROFILE_PHOTO')
1815
+ this.user.photo = publicUrl;
1816
+ });
1817
+ user.appLoginPrincipal?.forEach(({ principalId, principalType }) => {
1818
+ if (principalType === 'EMAIL_USERNAME')
1819
+ this.user.email = principalId;
1820
+ });
1821
+ }));
1822
+ }
1823
+ initForgotPassword(email) {
1824
+ return this.apollo.mutate({
1825
+ variables: {
1826
+ input: {
1827
+ email,
1828
+ sourcePlatform: SourcePlatform.Admin
1829
+ }
1830
+ },
1831
+ mutation: gql `
1832
+ mutation InitForgotPassword($input: ForgotPassOtpRq!) {
1833
+ authMsForgotPasswordOtp(input: $input)
1834
+ }
1835
+ `
1836
+ });
1837
+ }
1838
+ createNewPassword({ newPassword, principalId, sourcePlatform, verifCode }) {
1839
+ return this.apollo.mutate({
1840
+ mutation: gql `
1841
+ mutation SubmitForgotPassword($input: ForgotPassRq!) {
1842
+ authMsForgotPassword(input: $input)
1843
+ }
1844
+ `,
1845
+ variables: {
1846
+ input: {
1847
+ newPassword,
1848
+ principalId,
1849
+ sourcePlatform,
1850
+ verifCode
1851
+ }
1852
+ }
1853
+ });
1854
+ }
1855
+ updatePassword(input) {
1856
+ return this.apollo.mutate({
1857
+ mutation: gql `
1858
+ mutation ChangePassword($input: ChangePassRq!) {
1859
+ authMsChangePassword(input: $input)
1860
+ }
1861
+ `,
1862
+ variables: { input }
1863
+ });
1864
+ }
1865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Apollo }, { token: ProfileService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1866
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthService, providedIn: 'root' }); }
1867
+ }
1868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthService, decorators: [{
1869
+ type: Injectable,
1870
+ args: [{
1871
+ providedIn: 'root'
1872
+ }]
1873
+ }], ctorParameters: () => [{ type: i1$1.Apollo }, { type: ProfileService }] });
1874
+
1875
+ class CurrencyService {
1876
+ constructor(apollo) {
1877
+ this.apollo = apollo;
1878
+ }
1879
+ query(keyword = '') {
1880
+ const input = { page: 0, pageSize: 300, sortBy: 'name', sortDirection: 'asc' };
1881
+ if (keyword !== '')
1882
+ input.name = keyword;
1883
+ return this.apollo.query({
1884
+ errorPolicy: 'all',
1885
+ variables: { input },
1886
+ query: gql `
1887
+ query QueryCurrency($input: CurrencyQueryCriteria!) {
1888
+ webConfigMsCurrency(input: $input) {
1889
+ data {
1890
+ code
1891
+ guid
1892
+ magnifyValue
1893
+ name
1894
+ status
1895
+ }
1896
+ }
1897
+ }
1898
+ `,
1899
+ });
1900
+ }
1901
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CurrencyService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
1902
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
1903
+ }
1904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CurrencyService, decorators: [{
1905
+ type: Injectable,
1906
+ args: [{
1907
+ providedIn: 'root'
1908
+ }]
1909
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1910
+
1911
+ class CountryService {
1912
+ constructor(apollo) {
1913
+ this.apollo = apollo;
1914
+ }
1915
+ query() {
1916
+ return this.apollo.query({
1917
+ errorPolicy: 'all',
1918
+ variables: {
1919
+ input: {
1920
+ page: 0,
1921
+ pageSize: 300,
1922
+ sortBy: 'name',
1923
+ sortDirection: 'asc'
1924
+ }
1925
+ },
1926
+ query: gql `
1927
+ query QueryCountry($input: CountryQueryCriteria!) {
1928
+ webConfigMsCountry(input: $input) {
1929
+ data {
1930
+ code
1931
+ defaultLangCode
1932
+ guid
1933
+ langCodes {
1934
+ code
1935
+ guid
1936
+ }
1937
+ name
1938
+ phoneCodes {
1939
+ code
1940
+ }
1941
+ }
1942
+ }
1943
+ }
1944
+ `,
1945
+ });
1946
+ }
1947
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CountryService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
1948
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CountryService, providedIn: 'root' }); }
1949
+ }
1950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: CountryService, decorators: [{
1951
+ type: Injectable,
1952
+ args: [{
1953
+ providedIn: 'root'
1954
+ }]
1955
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1956
+
1957
+ class FormCurrencyInputComponent {
1958
+ constructor(numberPlaceholder, ch, currencyService) {
1959
+ this.numberPlaceholder = numberPlaceholder;
1960
+ this.ch = ch;
1961
+ this.currencyService = currencyService;
1962
+ this.clearable = true;
1963
+ this.isInputNumber = false;
1964
+ this.initialItems = [];
1965
+ this.numberValue = null;
1966
+ this.isNumberDisabled = false;
1967
+ this.required = false;
1968
+ this.disabled = false;
1969
+ this.bindLabel = 'label';
1970
+ this.bindValue = 'value';
1971
+ this.onChange = new EventEmitter();
1972
+ this.typeahead = new Subject();
1973
+ this.query$ = this.typeahead.pipe(distinctUntilChanged(), debounceTime(300), tap(() => this.isLoading = true), switchMap((k) => this.queryFunc(k).pipe(map((result) => result.length === 0 ? this.initialItems : result), catchError(() => of(this.initialItems)))), tap(() => this.isLoading = false));
1974
+ this.items$ = this.query$;
1975
+ this.isLoading = false;
1976
+ this.isTouched = false;
1977
+ this.value = null;
1978
+ this.decimalLimiter = 0;
1979
+ this.changed = (_val) => { };
1980
+ this.onTouched = () => { };
1981
+ }
1982
+ ngOnChanges(changes) {
1983
+ if (changes['initialItems']) {
1984
+ this.items$ = concat(of(this.initialItems), this.query$);
1985
+ this.decimalLimiter = this.initialItems[0]?.magnifyValue === 1 ? 0 : Math.floor(Math.log10(this.initialItems[0]?.magnifyValue ?? 1));
1986
+ this.numberValue = this.numberValue / this.initialItems[0]?.magnifyValue;
1987
+ }
1988
+ if (this.isInputNumber)
1989
+ this.bindLabel = 'value';
1990
+ }
1991
+ registerOnChange(fn) { this.changed = fn; }
1992
+ registerOnTouched(fn) { this.onTouched = fn; }
1993
+ writeValue(val) {
1994
+ this.value = val;
1995
+ this.ch.markForCheck();
1996
+ }
1997
+ setDisabledState(d) {
1998
+ this.disabled = d;
1999
+ this.ch.markForCheck();
2000
+ }
2001
+ validate(control) {
2002
+ this.formControl = control;
2003
+ return null;
2004
+ }
2005
+ change(e) {
2006
+ if (this.isInputNumber)
2007
+ this.numberValue = null;
2008
+ this.onChange.emit({ ccy: e, number: this.numberValue });
2009
+ this.initialItems = e;
2010
+ if (!this.isTouched) {
2011
+ this.onTouched();
2012
+ this.isTouched = true;
2013
+ }
2014
+ if (!this.disabled) {
2015
+ if (!e)
2016
+ this.value = null;
2017
+ else
2018
+ this.value = e[this.bindValue];
2019
+ this.changed(this.value);
2020
+ this.errorMsg = getFormErrorMessage(this.formControl.errors, 'Currency');
2021
+ }
2022
+ if (e?.magnifyValue === 1)
2023
+ this.decimalLimiter = 0;
2024
+ else
2025
+ this.decimalLimiter = Math.floor(Math.log10(e?.magnifyValue));
2026
+ }
2027
+ numberInput({ value }) {
2028
+ this.numberValue = value;
2029
+ this.onChange.emit({ ccy: this.initialItems, number: value });
2030
+ }
2031
+ limitDecimal({ charCode, preventDefault, target: { value } }) {
2032
+ const reg = this.decimalLimiter > 0 ? new RegExp(`^\\d*(\\.\\d{0,${this.decimalLimiter}})?$`) : /^\d+$/;
2033
+ if (!reg.test(value + String.fromCharCode(charCode)))
2034
+ preventDefault();
2035
+ }
2036
+ queryFunc(keyword) {
2037
+ return this.currencyService.query(keyword).pipe(map(({ data: { webConfigMsCurrency: { data } } }) => data.map(({ code, name, magnifyValue }) => ({ label: `[${code}] ${name}`, value: code, magnifyValue }))));
2038
+ }
2039
+ ;
2040
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormCurrencyInputComponent, deps: [{ token: 'numberPlaceholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: CurrencyService }], target: i0.ɵɵFactoryTarget.Component }); }
2041
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FormCurrencyInputComponent, isStandalone: true, selector: "up-currency-input", inputs: { clearable: "clearable", isInputNumber: "isInputNumber", initialItems: "initialItems", numberValue: "numberValue", isNumberDisabled: "isNumberDisabled", required: "required", disabled: "disabled", bindLabel: "bindLabel", bindValue: "bindValue" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
2042
+ {
2043
+ multi: true,
2044
+ provide: NG_VALUE_ACCESSOR,
2045
+ useExisting: FormCurrencyInputComponent
2046
+ },
2047
+ {
2048
+ multi: true,
2049
+ provide: NG_VALIDATORS,
2050
+ useExisting: FormCurrencyInputComponent
2051
+ }
2052
+ ], usesOnChanges: true, ngImport: i0, template: "<label class=\"form-label\" [class.required]=\"required\">Currency</label>\n\n<ng-template #selectForm>\n <ng-select \n class=\"flex-shrink-0\"\n [class.number]=\"isInputNumber\"\n appendTo=\"body\"\n typeToSearchText=\"Please enter 3 or more characters\"\n placeholder=\"Currency\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [minTermLength]=\"3\"\n [virtualScroll]=\"true\"\n [editableSearchTerm]=\"true\"\n [ngModel]=\"value\"\n [readonly]=\"disabled\" \n [loading]=\"isLoading\"\n [clearable]=\"clearable\"\n [typeahead]=\"typeahead\"\n [items]=\"items$ | async\"\n (change)=\"change($event);\"\n >\n <ng-template ng-option-tmp let-i=\"item\">\n <span>{{ isInputNumber? i.value : i.label }}</span>\n </ng-template>\n </ng-select>\n</ng-template>\n\n<ng-template #inputNumber>\n <div class=\"d-flex justify-content-between gap-1 align-items-center\">\n <ng-container *ngTemplateOutlet=\"selectForm\" />\n\n <input type=\"number\" [placeholder]=\"numberPlaceholder\" class=\"form-control flex-grow-1\" [disabled]=\"isNumberDisabled\" [value]=\"numberValue\" (keypress)=\"limitDecimal($event)\" (input)=\"numberInput($event.target)\">\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"!isInputNumber else inputNumber\">\n <ng-container *ngTemplateOutlet=\"selectForm\" />\n</ng-container>\n\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ng-select.number{min-width:105px;max-width:105px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i3$2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2053
+ }
2054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FormCurrencyInputComponent, decorators: [{
2055
+ type: Component,
2056
+ args: [{ standalone: true, selector: 'up-currency-input', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2057
+ class: 'd-block'
2058
+ }, imports: [
2059
+ CommonModule,
2060
+ FormsModule,
2061
+ NgSelectModule
2062
+ ], providers: [
2063
+ {
2064
+ multi: true,
2065
+ provide: NG_VALUE_ACCESSOR,
2066
+ useExisting: FormCurrencyInputComponent
2067
+ },
2068
+ {
2069
+ multi: true,
2070
+ provide: NG_VALIDATORS,
2071
+ useExisting: FormCurrencyInputComponent
2072
+ }
2073
+ ], template: "<label class=\"form-label\" [class.required]=\"required\">Currency</label>\n\n<ng-template #selectForm>\n <ng-select \n class=\"flex-shrink-0\"\n [class.number]=\"isInputNumber\"\n appendTo=\"body\"\n typeToSearchText=\"Please enter 3 or more characters\"\n placeholder=\"Currency\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [minTermLength]=\"3\"\n [virtualScroll]=\"true\"\n [editableSearchTerm]=\"true\"\n [ngModel]=\"value\"\n [readonly]=\"disabled\" \n [loading]=\"isLoading\"\n [clearable]=\"clearable\"\n [typeahead]=\"typeahead\"\n [items]=\"items$ | async\"\n (change)=\"change($event);\"\n >\n <ng-template ng-option-tmp let-i=\"item\">\n <span>{{ isInputNumber? i.value : i.label }}</span>\n </ng-template>\n </ng-select>\n</ng-template>\n\n<ng-template #inputNumber>\n <div class=\"d-flex justify-content-between gap-1 align-items-center\">\n <ng-container *ngTemplateOutlet=\"selectForm\" />\n\n <input type=\"number\" [placeholder]=\"numberPlaceholder\" class=\"form-control flex-grow-1\" [disabled]=\"isNumberDisabled\" [value]=\"numberValue\" (keypress)=\"limitDecimal($event)\" (input)=\"numberInput($event.target)\">\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"!isInputNumber else inputNumber\">\n <ng-container *ngTemplateOutlet=\"selectForm\" />\n</ng-container>\n\n<label *ngIf=\"errorMsg\" class=\"is-invalid\">{{ errorMsg }}</label>\n", styles: ["ng-select.number{min-width:105px;max-width:105px}\n"] }]
2074
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2075
+ type: Attribute,
2076
+ args: ['numberPlaceholder']
2077
+ }] }, { type: i0.ChangeDetectorRef }, { type: CurrencyService }], propDecorators: { clearable: [{
2078
+ type: Input
2079
+ }], isInputNumber: [{
2080
+ type: Input
2081
+ }], initialItems: [{
2082
+ type: Input
2083
+ }], numberValue: [{
2084
+ type: Input
2085
+ }], isNumberDisabled: [{
2086
+ type: Input
2087
+ }], required: [{
2088
+ type: Input
2089
+ }], disabled: [{
2090
+ type: Input
2091
+ }], bindLabel: [{
2092
+ type: Input
2093
+ }], bindValue: [{
2094
+ type: Input
2095
+ }], onChange: [{
2096
+ type: Output
2097
+ }] } });
2098
+
2099
+ class FilterComponent {
2100
+ constructor(placeholder, ch, popoverCtrl) {
2101
+ this.placeholder = placeholder;
2102
+ this.ch = ch;
2103
+ this.popoverCtrl = popoverCtrl;
2104
+ this.onSearch = new EventEmitter();
2105
+ this.form = new FormGroup({});
2106
+ this.activeFilter = [];
2107
+ }
2108
+ ngOnInit() {
2109
+ this.config.fields.forEach(({ key, initialValue }) => {
2110
+ if (typeof key === 'string')
2111
+ this.createFormControl(key, initialValue);
2112
+ else {
2113
+ key.forEach((k, i) => this.createFormControl(k, initialValue?.at(i)));
2114
+ }
2115
+ });
2116
+ }
2117
+ close() { this.popoverCtrl.dismiss(); }
2118
+ clear() {
2119
+ this.resetValue();
2120
+ this.form.reset();
2121
+ this.onSearch.emit({ mode: this.config.mode, data: null });
2122
+ }
2123
+ removeFilter(i) {
2124
+ this.form.controls[this.activeFilter[i].key].setValue('');
2125
+ this.activeFilter.splice(i, 1);
2126
+ this.emitValue();
2127
+ }
2128
+ search() {
2129
+ this.resetValue();
2130
+ this.emitValue((k, v) => this.activeFilter.push({ key: k, value: v, label: `${k}:${k.includes('date') ? formatDate(v, 'dd MMM yyyy', 'en-US') : v}` }));
2131
+ this.close();
2132
+ }
2133
+ add() {
2134
+ const { key, value } = this.getValue(this.searchBox.nativeElement.value);
2135
+ if (this.config.fields.findIndex(({ key: k }) => k === key) === -1) {
2136
+ this.searchBox.nativeElement.value = '';
2137
+ return;
2138
+ }
2139
+ const i = this.activeFilter.findIndex(({ key: k }) => k === key);
2140
+ if (i === -1)
2141
+ this.activeFilter.push({ label: `${key}:${value}`, key, value });
2142
+ else {
2143
+ this.activeFilter[i].key = key;
2144
+ this.activeFilter[i].value = value;
2145
+ this.activeFilter[i].label = `${key}:${value}`;
2146
+ }
2147
+ this.form.patchValue({ [key]: value });
2148
+ this.searchBox.nativeElement.value = '';
2149
+ this.emitValue();
2150
+ }
2151
+ resetValue() {
2152
+ this.activeFilter.length = 0;
2153
+ this.searchBox.nativeElement.value = '';
2154
+ }
2155
+ getValue(value) {
2156
+ const values = value.split(':');
2157
+ if (values.length === 1)
2158
+ return { key: this.config.fields[0].key, value: values[0] };
2159
+ return { key: values[0], value: values[1] };
2160
+ }
2161
+ emitValue(extraAction) {
2162
+ let flag = false;
2163
+ const f = this.form.getRawValue();
2164
+ const data = {};
2165
+ Object.keys(f).forEach((k) => {
2166
+ if (!f[k])
2167
+ return;
2168
+ flag = true;
2169
+ data[k] = f[k];
2170
+ extraAction?.(k, f[k]);
2171
+ });
2172
+ this.onSearch.emit({ mode: this.config.mode, data: flag ? data : null });
2173
+ }
2174
+ createFormControl(key, val) {
2175
+ this.form.addControl(key, new FormControl(''));
2176
+ if (val) {
2177
+ this.form.controls[key].setValue(val);
2178
+ this.activeFilter.push({ label: `${key}:${val}`, key, value: val });
2179
+ }
2180
+ }
2181
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FilterComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
2182
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: FilterComponent, isStandalone: true, selector: "up-filter", inputs: { id: "id", config: "config" }, outputs: { onSearch: "onSearch" }, host: { classAttribute: "d-block position-relative" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], ngImport: i0, template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n <div *ngIf=\"activeFilter.length > 0\" class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\" *ngFor=\"let item of activeFilter; index as i\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n </div>\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n<ng-container *ngIf=\"config.mode === 'advanced'\">\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n\n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n <ng-container *ngFor=\"let c of config.fields\">\n <ng-container [ngSwitch]=\"c.type\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchCase=\"'number'\" />\n \n <div class=\"my-4\" *ngSwitchCase=\"'checkbox'\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n \n <div class=\"d-flex gap-3 my-4\" *ngSwitchCase=\"'date-range'\">\n <up-date class=\"flex-grow-1\" name=\"filter-from\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" />\n <up-date class=\"flex-grow-1\" name=\"filter-to\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" />\n </div>\n \n <up-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [items]=\"c.options!\" *ngSwitchCase=\"'select'\" />\n <up-searchable-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [queryFunc]=\"c.getOptions!\" [initialItems]=\"c.options!\" *ngSwitchCase=\"'searchable-select'\" />\n \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchDefault />\n </ng-container>\n </ng-container>\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n</ng-container>\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:45%}@media (max-width: 576px){.tag-container{max-width:35%}}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration{-webkit-appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["alignment", "checked", "color", "disabled", "indeterminate", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonPopover, selector: "ion-popover" }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormDateComponent, selector: "up-date", inputs: ["label", "required", "disabled", "presentation"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormSelectComponent, selector: "up-select", inputs: ["items", "clearable", "label", "multiple", "required", "addTag", "disabled", "searchable", "bindLabel", "bindValue"] }, { kind: "component", type: FormSearchableSelectComponent, selector: "up-searchable-select", inputs: ["queryFunc", "clearable", "label", "initialItems", "required", "addTag", "disabled", "multiple", "bindLabel", "bindValue"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2183
+ }
2184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: FilterComponent, decorators: [{
2185
+ type: Component,
2186
+ args: [{ standalone: true, selector: 'up-filter', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2187
+ class: 'd-block position-relative'
2188
+ }, imports: [
2189
+ IonicModule,
2190
+ CommonModule,
2191
+ FormDateComponent,
2192
+ FormInputComponent,
2193
+ ReactiveFormsModule,
2194
+ FormSelectComponent,
2195
+ FormSearchableSelectComponent
2196
+ ], template: "<ion-icon name=\"search\" class=\"fs-4 position-absolute\" />\n\n<div class=\"d-flex align-items-center form-control ps-5 py-0 pe-0 gap-3\">\n <div *ngIf=\"activeFilter.length > 0\" class=\"d-flex flex-grow-1 flex-shrink-0 tag-container gap-2 text-nowrap overflow-auto\">\n <div class=\"tag-item p-1 rounded d-flex align-items-center user-select-none\" *ngFor=\"let item of activeFilter; index as i\">\n <ion-icon name=\"close\" class=\"pe-1 me-1 cursor-pointer text-primary\" (click)=\"removeFilter(i);\" />\n {{ item.label }}\n </div>\n </div>\n\n <input #searchBox type=\"search\" placeholder=\"{{ placeholder }}\" class=\"flex-shrink-1 border-0 form-control ps-0 py-2\" [class.adv]=\"config.mode === 'advanced'\" (keyup.enter)=\"add();\" />\n</div>\n\n<ng-container *ngIf=\"config.mode === 'advanced'\">\n <ion-icon name=\"filter\" class=\"position-absolute fs-4 cursor-pointer\" id=\"filter-{{ id }}\" />\n <ion-icon name=\"close\" class=\"position-absolute fs-4 cursor-pointer\" (click)=\"clear();\" />\n\n <ion-popover trigger=\"filter-{{ id }}\" triggerAction=\"click\">\n <ng-template>\n <div class=\"d-flex flex-column filter\">\n <div class=\"flex-shrink-0 border-bottom p-1 pe-4 d-flex align-items-center\">\n <ion-buttons>\n <ion-button size=\"small\" (click)=\"close()\">\n <ion-icon slot=\"icon-only\" name=\"close\" />\n </ion-button>\n </ion-buttons>\n \n <div class=\"fs-5 fw-medium\">Advanced Filter</div>\n </div>\n \n <form class=\"flex-grow-1 overflow-auto px-4\" [formGroup]=\"form\">\n <ng-container *ngFor=\"let c of config.fields\">\n <ng-container [ngSwitch]=\"c.type\">\n <up-input type=\"number\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchCase=\"'number'\" />\n \n <div class=\"my-4\" *ngSwitchCase=\"'checkbox'\">\n <ion-checkbox labelPlacement=\"end\" formControlName=\"{{ c.key }}\">{{ c.label }}</ion-checkbox>\n </div>\n \n <div class=\"d-flex gap-3 my-4\" *ngSwitchCase=\"'date-range'\">\n <up-date class=\"flex-grow-1\" name=\"filter-from\" label=\"{{ c.label[0] }}\" formControlName=\"{{ c.key[0] }}\" />\n <up-date class=\"flex-grow-1\" name=\"filter-to\" label=\"{{ c.label[1] }}\" formControlName=\"{{ c.key[1] }}\" />\n </div>\n \n <up-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [items]=\"c.options!\" *ngSwitchCase=\"'select'\" />\n <up-searchable-select class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" [queryFunc]=\"c.getOptions!\" [initialItems]=\"c.options!\" *ngSwitchCase=\"'searchable-select'\" />\n \n <up-input type=\"text\" autocomplete=\"off\" class=\"my-4\" label=\"{{ c.label }}\" formControlName=\"{{ c.key }}\" *ngSwitchDefault />\n </ng-container>\n </ng-container>\n </form>\n \n <div class=\"flex-shrink-0 py-3 px-4 border-top d-flex gap-3\">\n <ion-button class=\"flex-grow-1\" color=\"secondary\" (click)=\"form.reset();\">Reset</ion-button>\n <ion-button class=\"flex-grow-1\" color=\"primary\" (click)=\"search();\">Search</ion-button>\n </div>\n </div>\n </ng-template>\n </ion-popover> \n</ng-container>\n", styles: ["ion-icon{top:7px}ion-icon[name=close]{right:16px}ion-icon[name=search]{left:14px}ion-icon[name=filter]{right:48px}ion-popover{--width: 80%;--max-width: 450px}.adv{padding-right:60px}.fs-5,ion-icon{color:#616161}.tag-container{max-width:45%}@media (max-width: 576px){.tag-container{max-width:35%}}.tag-container::-webkit-scrollbar{height:0px}.tag-item{color:#ed6b26;background-color:#fef3ee}.tag-item ion-icon{border-right:1px solid #fbd1be}input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration{-webkit-appearance:none}\n"] }]
2197
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2198
+ type: Attribute,
2199
+ args: ['placeholder']
2200
+ }] }, { type: i0.ChangeDetectorRef }, { type: i1.PopoverController }], propDecorators: { id: [{
2201
+ type: Input,
2202
+ args: [{ required: true }]
2203
+ }], config: [{
2204
+ type: Input,
2205
+ args: [{ required: true }]
2206
+ }], onSearch: [{
2207
+ type: Output
2208
+ }], searchBox: [{
2209
+ type: ViewChild,
2210
+ args: ['searchBox']
2211
+ }] } });
2212
+
2213
+ class GridService {
2214
+ constructor() {
2215
+ this.apis = {};
2216
+ }
2217
+ getApi(id) { return this.apis[id]; }
2218
+ setApi(id, api) { this.apis[id] = api; }
2219
+ refreshGridCache(id, forceRefresh = false) {
2220
+ this.apis[id].refreshInfiniteCache();
2221
+ if (forceRefresh) {
2222
+ this.apis[id].paginationGoToFirstPage();
2223
+ this.apis[id].purgeInfiniteCache();
2224
+ }
2225
+ }
2226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2227
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridService, providedIn: 'root' }); }
2228
+ }
2229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridService, decorators: [{
2230
+ type: Injectable,
2231
+ args: [{
2232
+ providedIn: 'root'
2233
+ }]
2234
+ }] });
2235
+
2236
+ class GridSnapshotComponent {
2237
+ constructor(service) {
2238
+ this.service = service;
2239
+ this.id = 'grid-s';
2240
+ this.rowSelection = 'single';
2241
+ this.onRowClick = new EventEmitter();
2242
+ this.onGridReady = new EventEmitter();
2243
+ this.onSelectionChanged = new EventEmitter();
2244
+ this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
2245
+ this.sort = { order: '', orderBy: '' };
2246
+ ModuleRegistry.register(InfiniteRowModelModule);
2247
+ }
2248
+ ngOnInit() {
2249
+ if (!this.config.rowPerPage)
2250
+ this.config.rowPerPage = 50;
2251
+ this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
2252
+ }
2253
+ ngOnDestroy() { this.subs?.unsubscribe(); }
2254
+ clickRow(data) { this.onRowClick.emit(data.node); }
2255
+ dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
2256
+ changeSelected(data) { this.onSelectionChanged.emit(data); }
2257
+ changePagination(ev) {
2258
+ if (ev.newPageSize)
2259
+ this.config.rowPerPage = this.gridApi.paginationGetPageSize();
2260
+ }
2261
+ setDatasource(ev) {
2262
+ this.gridApi = ev.api;
2263
+ this.onGridReady.emit(ev);
2264
+ this.service.setApi(this.id, this.gridApi);
2265
+ const state = JSON.parse(localStorage.getItem(this.id));
2266
+ if (state)
2267
+ ev.api.applyColumnState({ state, applyOrder: true });
2268
+ this.reset();
2269
+ }
2270
+ reset() {
2271
+ const datasource = {
2272
+ getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
2273
+ this.gridApi.showLoadingOverlay();
2274
+ if (colId !== this.sort.orderBy || sort !== this.sort.order) {
2275
+ this.sort.order = sort;
2276
+ this.sort.orderBy = colId;
2277
+ this.gridApi.paginationGoToFirstPage();
2278
+ }
2279
+ const page = this.gridApi.paginationGetCurrentPage();
2280
+ if (page === 0)
2281
+ this.after = null;
2282
+ this.subs = this.config.getDataSnapshot(this.config.rowPerPage, colId, sort, this.after).subscribe({
2283
+ next: ({ data, totalRecord }) => {
2284
+ this.gridApi.hideOverlay();
2285
+ const { edges, pageInfo } = data;
2286
+ if (edges.length > 0)
2287
+ this.after = pageInfo.endCursor;
2288
+ if (page === 0) {
2289
+ if (edges.length === 0)
2290
+ this.gridApi.showNoRowsOverlay();
2291
+ this.count = totalRecord;
2292
+ }
2293
+ if (!this.config.useTotalRecord && !pageInfo.hasNextPage) {
2294
+ this.count = (page * this.config.rowPerPage) + edges.length;
2295
+ }
2296
+ successCallback(edges, this.count);
2297
+ },
2298
+ error: () => {
2299
+ this.gridApi.hideOverlay();
2300
+ this.gridApi.showNoRowsOverlay();
2301
+ failCallback();
2302
+ }
2303
+ });
2304
+ }
2305
+ };
2306
+ this.gridApi.setGridOption('datasource', datasource);
2307
+ }
2308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridSnapshotComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
2309
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: GridSnapshotComponent, isStandalone: true, selector: "up-snapshot-grid", inputs: { id: "id", config: "config", rowSelection: "rowSelection" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSelectionChanged: "onSelectionChanged" }, host: { classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n rowModelType=\"infinite\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AgGridModule }, { kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "suppressAggAtRootLevel", "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", "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", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2310
+ }
2311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridSnapshotComponent, decorators: [{
2312
+ type: Component,
2313
+ args: [{ standalone: true, selector: 'up-snapshot-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2314
+ class: 'd-block h-100 w-100'
2315
+ }, imports: [
2316
+ AgGridModule
2317
+ ], template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n rowModelType=\"infinite\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n" }]
2318
+ }], ctorParameters: () => [{ type: GridService }], propDecorators: { id: [{
2319
+ type: Input
2320
+ }], config: [{
2321
+ type: Input,
2322
+ args: [{ required: true }]
2323
+ }], rowSelection: [{
2324
+ type: Input
2325
+ }], onRowClick: [{
2326
+ type: Output
2327
+ }], onGridReady: [{
2328
+ type: Output
2329
+ }], onSelectionChanged: [{
2330
+ type: Output
2331
+ }] } });
2332
+
2333
+ class GridPaginationComponent {
2334
+ constructor(service) {
2335
+ this.service = service;
2336
+ this.rowData = [];
2337
+ this.id = 'grid-p';
2338
+ this.rowModelType = 'infinite';
2339
+ this.rowSelection = 'single';
2340
+ this.onRowClick = new EventEmitter();
2341
+ this.onGridReady = new EventEmitter();
2342
+ this.onSelectionChanged = new EventEmitter();
2343
+ this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
2344
+ }
2345
+ ngOnInit() {
2346
+ ModuleRegistry.register(this.rowModelType === 'infinite' ? InfiniteRowModelModule : ClientSideRowModelModule);
2347
+ if (!this.config.rowPerPage)
2348
+ this.config.rowPerPage = 50;
2349
+ this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
2350
+ }
2351
+ ngOnDestroy() { this.subs?.unsubscribe(); }
2352
+ clickRow(data) { this.onRowClick.emit(data); }
2353
+ dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
2354
+ changeSelected(data) { this.onSelectionChanged.emit(data); }
2355
+ changePagination(ev) {
2356
+ if (ev.newPageSize)
2357
+ this.config.rowPerPage = this.gridApi.paginationGetPageSize();
2358
+ }
2359
+ setDatasource(ev) {
2360
+ this.gridApi = ev.api;
2361
+ this.onGridReady.emit(ev);
2362
+ this.service.setApi(this.id, this.gridApi);
2363
+ const state = JSON.parse(localStorage.getItem(this.id));
2364
+ if (state)
2365
+ ev.api.applyColumnState({ state, applyOrder: true });
2366
+ if (this.rowModelType === 'clientSide')
2367
+ this.gridApi.setGridOption('rowData', this.rowData);
2368
+ if (this.rowModelType !== 'infinite')
2369
+ return;
2370
+ this.reset();
2371
+ }
2372
+ reset() {
2373
+ if (!this.gridApi)
2374
+ return;
2375
+ const datasource = {
2376
+ getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
2377
+ this.gridApi.showLoadingOverlay();
2378
+ const offset = this.gridApi.paginationGetCurrentPage();
2379
+ this.subs = this.config.getData(offset, this.config.rowPerPage, colId, sort).subscribe({
2380
+ next: ({ data, totalRecord }) => {
2381
+ this.gridApi.hideOverlay();
2382
+ if (offset === 0) {
2383
+ if (data.length === 0)
2384
+ this.gridApi.showNoRowsOverlay();
2385
+ this.count = totalRecord;
2386
+ }
2387
+ if (!this.config.useTotalRecord && data.length < this.config.rowPerPage) {
2388
+ this.count = (offset * this.config.rowPerPage) + data.length;
2389
+ }
2390
+ successCallback(data, this.count);
2391
+ },
2392
+ error: () => {
2393
+ this.gridApi.hideOverlay();
2394
+ this.gridApi.showNoRowsOverlay();
2395
+ failCallback();
2396
+ }
2397
+ });
2398
+ }
2399
+ };
2400
+ this.gridApi?.setGridOption('datasource', datasource);
2401
+ }
2402
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridPaginationComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
2403
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: GridPaginationComponent, isStandalone: true, selector: "up-pagination-grid", inputs: { config: "config", rowData: "rowData", id: "id", rowModelType: "rowModelType", rowSelection: "rowSelection" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSelectionChanged: "onSelectionChanged" }, host: { classAttribute: "d-block h-100 w-100" }, ngImport: i0, template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowModelType]=\"rowModelType\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AgGridModule }, { kind: "component", type: i2$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "suppressAggAtRootLevel", "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", "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", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2404
+ }
2405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: GridPaginationComponent, decorators: [{
2406
+ type: Component,
2407
+ args: [{ standalone: true, selector: 'up-pagination-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2408
+ class: 'd-block h-100 w-100'
2409
+ }, imports: [
2410
+ AgGridModule
2411
+ ], template: "<ag-grid-angular class=\"ag-theme-balham h-100\"\n [pagination]=\"true\"\n [animateRows]=\"true\"\n [rowModelType]=\"rowModelType\"\n [rowSelection]=\"rowSelection\"\n [columnDefs]=\"config.colDefs\"\n [defaultColDef]=\"defaultColDef\"\n [cacheBlockSize]=\"config.rowPerPage\"\n [paginationPageSize]=\"config.rowPerPage\"\n [overlayNoRowsTemplate]=\"config.noRowText\"\n (dragStopped)=\"dragColumn($event)\"\n (gridReady)=\"setDatasource($event)\"\n (rowClicked)=\"clickRow($event.data)\"\n (selectionChanged)=\"changeSelected($event)\"\n (paginationChanged)=\"changePagination($event)\"\n/>\n" }]
2412
+ }], ctorParameters: () => [{ type: GridService }], propDecorators: { config: [{
2413
+ type: Input,
2414
+ args: [{ required: true }]
2415
+ }], rowData: [{
2416
+ type: Input
2417
+ }], id: [{
2418
+ type: Input
2419
+ }], rowModelType: [{
2420
+ type: Input
2421
+ }], rowSelection: [{
2422
+ type: Input
2423
+ }], onRowClick: [{
2424
+ type: Output
2425
+ }], onGridReady: [{
2426
+ type: Output
2427
+ }], onSelectionChanged: [{
2428
+ type: Output
2429
+ }] } });
2430
+
2431
+ class ListPaginationContainerComponent {
2432
+ constructor(id, router) {
2433
+ this.id = id;
2434
+ this.router = router;
2435
+ this.onRowClick = new EventEmitter();
2436
+ this.onGridReady = new EventEmitter();
2437
+ this.onSearch = new EventEmitter();
2438
+ this.gridId = `grid-${this.id ?? 'p'}`;
2439
+ }
2440
+ openDetail(data) {
2441
+ this.onRowClick.emit(data);
2442
+ this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
2443
+ }
2444
+ setGridApi(ev) {
2445
+ this.gridApi = ev.api;
2446
+ this.onGridReady.emit(ev);
2447
+ }
2448
+ search(k) {
2449
+ this.onSearch.emit(k);
2450
+ this.gridApi.refreshInfiniteCache();
2451
+ }
2452
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ListPaginationContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2453
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ListPaginationContainerComponent, isStandalone: true, selector: "up-list-pagination-container", inputs: { header: "header", config: "config" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSearch: "onSearch" }, host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap flex-md-nowrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-2\">\n <h3 class=\"m-0 text-truncate\">{{ header }}</h3>\n\n <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" class=\"flex-shrink-0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1 flex-lg-grow-0\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["div:has(>up-filter){flex-basis:50%}@media (max-width: 576px){div:has(>up-filter){flex-basis:100%}}.flex-grow-1{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2454
+ }
2455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ListPaginationContainerComponent, decorators: [{
2456
+ type: Component,
2457
+ args: [{ standalone: true, selector: 'up-list-pagination-container', host: {
2458
+ class: 'd-flex flex-column h-100 w-100'
2459
+ }, imports: [
2460
+ IonicModule,
2461
+ CommonModule,
2462
+ RouterModule,
2463
+ FilterComponent,
2464
+ ButtonGroupComponent,
2465
+ GridPaginationComponent
2466
+ ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap flex-md-nowrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-2\">\n <h3 class=\"m-0 text-truncate\">{{ header }}</h3>\n\n <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" class=\"flex-shrink-0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1 flex-lg-grow-0\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["div:has(>up-filter){flex-basis:50%}@media (max-width: 576px){div:has(>up-filter){flex-basis:100%}}.flex-grow-1{min-width:0}\n"] }]
2467
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2468
+ type: Attribute,
2469
+ args: ['id']
2470
+ }] }, { type: i1$2.Router }], propDecorators: { header: [{
2471
+ type: Input,
2472
+ args: [{ required: true }]
2473
+ }], config: [{
2474
+ type: Input,
2475
+ args: [{ required: true }]
2476
+ }], onRowClick: [{
2477
+ type: Output
2478
+ }], onGridReady: [{
2479
+ type: Output
2480
+ }], onSearch: [{
2481
+ type: Output
2482
+ }] } });
2483
+
2484
+ class ListSnapshotContainerComponent {
2485
+ constructor(id, router) {
2486
+ this.id = id;
2487
+ this.router = router;
2488
+ this.onRowClick = new EventEmitter();
2489
+ this.onGridReady = new EventEmitter();
2490
+ this.onSearch = new EventEmitter();
2491
+ this.gridId = `grid-${this.id ?? 'p'}`;
2492
+ }
2493
+ openDetail(data) {
2494
+ this.onRowClick.emit(data);
2495
+ this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
2496
+ }
2497
+ setGridApi(ev) {
2498
+ this.gridApi = ev.api;
2499
+ this.onGridReady.emit(ev);
2500
+ }
2501
+ search(k) {
2502
+ this.onSearch.emit(k);
2503
+ this.gridApi.paginationGoToFirstPage();
2504
+ this.gridApi.purgeInfiniteCache();
2505
+ }
2506
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ListSnapshotContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2507
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ListSnapshotContainerComponent, isStandalone: true, selector: "up-list-snapshot-container", inputs: { header: "header", config: "config" }, outputs: { onRowClick: "onRowClick", onGridReady: "onGridReady", onSearch: "onSearch" }, host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap flex-md-nowrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-2\">\n <h3 class=\"m-0 text-truncate\">{{ header }}</h3>\n\n <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" class=\"flex-shrink-0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1 flex-lg-grow-0\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-snapshot-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["div:has(>up-filter){flex-basis:50%}@media (max-width: 576px){div:has(>up-filter){flex-basis:100%}}.flex-grow-1{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: GridSnapshotComponent, selector: "up-snapshot-grid", inputs: ["id", "config", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2508
+ }
2509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ListSnapshotContainerComponent, decorators: [{
2510
+ type: Component,
2511
+ args: [{ standalone: true, selector: 'up-list-snapshot-container', host: {
2512
+ class: 'd-flex flex-column h-100 w-100'
2513
+ }, imports: [
2514
+ IonicModule,
2515
+ CommonModule,
2516
+ RouterModule,
2517
+ FilterComponent,
2518
+ ButtonGroupComponent,
2519
+ GridSnapshotComponent
2520
+ ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap flex-md-nowrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-2\">\n <h3 class=\"m-0 text-truncate\">{{ header }}</h3>\n\n <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" class=\"flex-shrink-0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1 flex-lg-grow-0\" *ngIf=\"config.filterConfig\">\n <up-filter placeholder=\"Type to search\" id=\"filter-{{ id }}\" [config]=\"config.filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-snapshot-grid [config]=\"config.gridConfig\" [id]=\"gridId\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" />\n</div>\n", styles: ["div:has(>up-filter){flex-basis:50%}@media (max-width: 576px){div:has(>up-filter){flex-basis:100%}}.flex-grow-1{min-width:0}\n"] }]
2521
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2522
+ type: Attribute,
2523
+ args: ['id']
2524
+ }] }, { type: i1$2.Router }], propDecorators: { header: [{
2525
+ type: Input,
2526
+ args: [{ required: true }]
2527
+ }], config: [{
2528
+ type: Input,
2529
+ args: [{ required: true }]
2530
+ }], onRowClick: [{
2531
+ type: Output
2532
+ }], onGridReady: [{
2533
+ type: Output
2534
+ }], onSearch: [{
2535
+ type: Output
2536
+ }] } });
2537
+
2538
+ class TabContentComponent {
2539
+ constructor(fragment, ch) {
2540
+ this.fragment = fragment;
2541
+ this.ch = ch;
2542
+ this.isActive = false;
2543
+ }
2544
+ toggleVisibility(s = true) {
2545
+ this.isActive = s;
2546
+ this.ch.markForCheck();
2547
+ }
2548
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabContentComponent, deps: [{ token: 'fragment', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2549
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: TabContentComponent, selector: "up-tab-content", inputs: { header: "header" }, host: { properties: { "class.flex-grow-1": "this.isActive" }, classAttribute: "overflow-auto" }, ngImport: i0, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2550
+ }
2551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabContentComponent, decorators: [{
2552
+ type: Component,
2553
+ args: [{ selector: 'up-tab-content', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2554
+ class: 'overflow-auto'
2555
+ }, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n" }]
2556
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2557
+ type: Attribute,
2558
+ args: ['fragment']
2559
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { isActive: [{
2560
+ type: HostBinding,
2561
+ args: ['class.flex-grow-1']
2562
+ }], header: [{
2563
+ type: Input,
2564
+ args: [{ required: true }]
2565
+ }] } });
2566
+
2567
+ class TabGroupComponent {
2568
+ constructor(router, activeRoute) {
2569
+ this.router = router;
2570
+ this.activeRoute = activeRoute;
2571
+ this.onChange = new EventEmitter();
2572
+ this.tabs = [];
2573
+ }
2574
+ ngAfterContentInit() {
2575
+ this.content.forEach(({ header, fragment }) => this.tabs.push({ fragment, label: header }));
2576
+ this.changeTab(this.activeRoute.snapshot.fragment);
2577
+ }
2578
+ changeTab(f) {
2579
+ this.onChange.emit(f);
2580
+ this.router.navigate([], { relativeTo: this.activeRoute, fragment: f || undefined, replaceUrl: true });
2581
+ let found = false;
2582
+ this.content.forEach((tab) => {
2583
+ if (tab.fragment !== f)
2584
+ tab.toggleVisibility(false);
2585
+ else {
2586
+ found = true;
2587
+ this.activeFragment = f;
2588
+ tab.toggleVisibility(true);
2589
+ }
2590
+ });
2591
+ if (!found) {
2592
+ this.content.get(0).toggleVisibility(true);
2593
+ this.activeFragment = this.content.get(0).fragment;
2594
+ }
2595
+ }
2596
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabGroupComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2597
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: TabGroupComponent, selector: "up-tab-group", outputs: { onChange: "onChange" }, host: { classAttribute: "d-flex flex-column" }, queries: [{ propertyName: "content", predicate: TabContentComponent, descendants: true }], ngImport: i0, template: "<ion-segment [scrollable]=\"true\" [value]=\"activeFragment\" class=\"d-flex pb-4 flex-shrink-0\">\n <ion-segment-button *ngFor=\"let t of tabs\" class=\"rounded\" [value]=\"t.fragment\" (click)=\"changeTab(t.fragment)\">\n {{ t.label }}\n </ion-segment-button>\n</ion-segment>\n\n<ng-content />\n", styles: ["ion-segment::-webkit-scrollbar{height:0}ion-segment-button{--color: #9E9E9E;--color-checked: #424242;--indicator-color: #ED6B26;border:none;height:34px;font-weight:400;min-width:100px;min-height:34px;width:fit-content;text-transform:none;letter-spacing:normal}ion-segment-button.segment-button-checked{font-weight:500}ion-segment-button::part(native){border-radius:4px}ion-segment-button::part(indicator-background){margin:auto;max-width:25%;border-radius:8px}\n"], dependencies: [{ kind: "component", type: i1.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: i1.IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2598
+ }
2599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabGroupComponent, decorators: [{
2600
+ type: Component,
2601
+ args: [{ selector: 'up-tab-group', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2602
+ class: 'd-flex flex-column'
2603
+ }, template: "<ion-segment [scrollable]=\"true\" [value]=\"activeFragment\" class=\"d-flex pb-4 flex-shrink-0\">\n <ion-segment-button *ngFor=\"let t of tabs\" class=\"rounded\" [value]=\"t.fragment\" (click)=\"changeTab(t.fragment)\">\n {{ t.label }}\n </ion-segment-button>\n</ion-segment>\n\n<ng-content />\n", styles: ["ion-segment::-webkit-scrollbar{height:0}ion-segment-button{--color: #9E9E9E;--color-checked: #424242;--indicator-color: #ED6B26;border:none;height:34px;font-weight:400;min-width:100px;min-height:34px;width:fit-content;text-transform:none;letter-spacing:normal}ion-segment-button.segment-button-checked{font-weight:500}ion-segment-button::part(native){border-radius:4px}ion-segment-button::part(indicator-background){margin:auto;max-width:25%;border-radius:8px}\n"] }]
2604
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { onChange: [{
2605
+ type: Output
2606
+ }], content: [{
2607
+ type: ContentChildren,
2608
+ args: [TabContentComponent, { descendants: true }]
2609
+ }] } });
2610
+
2611
+ class TabsComponentModule {
2612
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2613
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: TabsComponentModule, declarations: [TabGroupComponent,
2614
+ TabContentComponent], imports: [IonicModule,
2615
+ CommonModule], exports: [TabGroupComponent,
2616
+ TabContentComponent] }); }
2617
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabsComponentModule, imports: [IonicModule,
2618
+ CommonModule] }); }
2619
+ }
2620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: TabsComponentModule, decorators: [{
2621
+ type: NgModule,
2622
+ args: [{
2623
+ imports: [
2624
+ IonicModule,
2625
+ CommonModule,
2626
+ ],
2627
+ declarations: [
2628
+ TabGroupComponent,
2629
+ TabContentComponent
2630
+ ],
2631
+ exports: [
2632
+ TabGroupComponent,
2633
+ TabContentComponent
2634
+ ]
2635
+ }]
2636
+ }] });
2637
+
2638
+ class AuditService {
2417
2639
  constructor(apollo) {
2418
2640
  this.apollo = apollo;
2419
- this.baseAttr = `guid createdAt entity remark sourcePlatform status type`;
2641
+ this.baseAttr = `
2642
+ action
2643
+ createdAt
2644
+ description
2645
+ function
2646
+ guid
2647
+ msSource
2648
+ sourceIp
2649
+ user {
2650
+ name
2651
+ sourcePlatform
2652
+ status
2653
+ appLoginPrincipal {
2654
+ principalType
2655
+ principalId
2656
+ }
2420
2657
  }
2421
- query(input, extraAttr = '', fetchPolicy) {
2658
+ `;
2659
+ }
2660
+ query(input, extraAttr = '') {
2422
2661
  return this.apollo.query({
2423
- fetchPolicy,
2424
2662
  variables: { input },
2425
2663
  query: gql `
2426
- query QueryApproval($input: ApprovalCriteria) {
2427
- approvalMsApprovals(input: $input) {
2428
- data {
2429
- ${this.baseAttr}
2430
- ${extraAttr}
2431
- }
2432
- ${input.page === 0 ? 'totalRecord' : ''}
2664
+ query QueryAudit($input: AuditTrailCriteria!) {
2665
+ auditMsAuditTrail(input: $input) {
2666
+ ${this.baseAttr}
2667
+ ${extraAttr}
2433
2668
  }
2434
2669
  }
2435
2670
  `
2436
2671
  });
2437
2672
  }
2438
- request(variables) {
2439
- return this.apollo.mutate({
2440
- variables,
2441
- mutation: gql `
2442
- mutation ${variables.isApprove ? 'ApproveApproval' : 'DeclineApproval'}($approvalGroupGuid: String, $guid: String, $isApprove: Boolean, $reason: String) {
2443
- approvalMsApproveOrDeclineRequest(approvalGroupGuid: $approvalGroupGuid, guid: $guid, isApprove: $isApprove, reason: $reason)
2444
- }
2445
- `
2446
- });
2447
- }
2448
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2449
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
2673
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2674
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditService, providedIn: 'root' }); }
2450
2675
  }
2451
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalService, decorators: [{
2676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditService, decorators: [{
2452
2677
  type: Injectable,
2453
2678
  args: [{
2454
2679
  providedIn: 'root'
2455
2680
  }]
2456
2681
  }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2457
2682
 
2458
- class ApprovalListComponent {
2459
- constructor(entities, router, route, service, alertCtrl) {
2460
- this.entities = entities;
2683
+ class AuditListComponent {
2684
+ constructor(id, url, router, service) {
2685
+ this.id = id;
2686
+ this.url = url;
2461
2687
  this.router = router;
2462
- this.route = route;
2463
2688
  this.service = service;
2464
- this.alertCtrl = alertCtrl;
2689
+ this.filterConfig = { mode: 'simple', fields: [{ key: 'description', label: '', type: 'text' }] };
2465
2690
  this.gridConfig = {
2466
- noRowText: 'Approval not found',
2467
- colDefs: [
2468
- { headerName: 'Entity', field: 'entity', checkboxSelection: true },
2469
- { headerName: 'Remark', field: 'remark' },
2470
- { headerName: 'Source Platform', field: 'sourcePlatform' },
2471
- { headerName: 'Status', field: 'status', maxWidth: 100, cellRenderer: ({ value }) => value ? `<div class="badge m-auto bg-${value === ApprovalStatusEnum.Pending ? 'warning' : value === ApprovalStatusEnum.Approved ? 'success' : 'danger'}">${value}</div>` : '' },
2472
- { headerName: 'Type', field: 'type', maxWidth: 100 },
2473
- { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2474
- ],
2475
- getData: (page, pageSize, sortBy, dir) => {
2476
- const policy = this.input.page === page ? 'no-cache' : undefined;
2477
- this.input.page = page;
2478
- this.input.sortBy = sortBy;
2479
- this.input.pageSize = pageSize;
2480
- this.input.sortDirection = dir;
2481
- return this.service.query(this.input, '', policy).pipe(map(({ data: { approvalMsApprovals: { data, totalRecord: t } } }) => ({ data, totalRecord: t })));
2482
- }
2483
- };
2484
- this.filterConfig = {
2485
- mode: 'advanced',
2486
- fields: [
2487
- { key: 'status', label: 'Status', type: 'select', options: [
2488
- { label: 'Approved', value: ['APPROVED'] },
2489
- { label: 'Declined', value: ['DECLINED'] },
2490
- { label: 'Pending', value: ['PENDING'] }
2491
- ] },
2492
- { key: 'type', label: 'Type', type: 'select', options: [
2493
- { label: 'Creation', value: ['CREATION'] },
2494
- { label: 'Deletion', value: ['DELETION'] },
2495
- { label: 'Linkage', value: ['LINKAGE'] },
2496
- { label: 'Unlink', value: ['UNLINK'] },
2497
- { label: 'Update', value: ['UPDATE'] }
2498
- ] }
2499
- ]
2691
+ useTotalRecord: false,
2692
+ noRowText: 'Audit not found',
2693
+ colDefs: [
2694
+ { headerName: 'User', field: 'user.name', sortable: false },
2695
+ { headerName: 'Description', field: 'description', minWidth: 350, sortable: false },
2696
+ { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2697
+ ],
2698
+ getData: (page, pageSize, sortBy, dir) => {
2699
+ if (!this.criteria.tagValues)
2700
+ return of({ data: [] });
2701
+ this.criteria.page = page;
2702
+ this.criteria.sortBy = sortBy;
2703
+ this.criteria.pageSize = pageSize;
2704
+ this.criteria.sortDirection = dir;
2705
+ return this.service.query(this.criteria).pipe(map(({ data: { auditMsAuditTrail: data } }) => ({ data })));
2706
+ },
2500
2707
  };
2501
- this.btnConfig = [
2502
- { label: 'Approve', icon: 'checkmark', description: 'Approve the approvals', disabled: true, onClick: this.multipleApproval.bind(this) },
2503
- { label: 'Decline', icon: 'close', description: 'Decline the approvals', color: 'danger', disabled: true, onClick: this.multipleApproval.bind(this) }
2504
- ];
2505
- this.input = { page: 0, pageSize: 50, entity: this.entities };
2708
+ this.criteria = { sortBy: 'createdAt', sortDirection: 'desc', page: 0, pageSize: 50 };
2709
+ }
2710
+ ngOnChanges(e) {
2711
+ if (e['tagKeys'])
2712
+ this.criteria.tagKeys = this.tagKeys;
2713
+ if (e['relatedEntities'])
2714
+ this.criteria.relatedEntities = this.relatedEntities;
2506
2715
  }
2507
2716
  setGridApi({ api }) { this.gridApi = api; }
2508
- openDetail({ guid }) { this.router.navigate([`/approval/${guid}`], { preserveFragment: true }); }
2509
- selectApprovals() { this.btnConfig[0].disabled = this.btnConfig[1].disabled = this.gridApi.getSelectedRows().length <= 1; }
2717
+ rowClicked({ guid }) {
2718
+ this.router.navigate([`${this.url}/${this.criteria.tagValues[0]}/audit/${guid}`], { preserveFragment: true });
2719
+ }
2510
2720
  search({ data }) {
2511
- this.input.type = data?.type;
2512
- this.input.status = data?.status;
2513
- this.gridApi.getSelectedNodes().forEach((e) => e.setSelected(false));
2514
- this.gridApi.refreshInfiniteCache();
2721
+ this.criteria.description = data?.description;
2722
+ this.gridComponent.reset();
2515
2723
  }
2516
- multipleApproval(btn) {
2517
- btn.toggleLoading();
2518
- this.router.navigate([`/approval/approval-group`], {
2519
- preserveFragment: true,
2520
- queryParams: {
2521
- isApprove: btn.color !== 'danger',
2522
- guids: this.gridApi.getSelectedRows().map(({ guid }) => guid),
2523
- }
2524
- });
2724
+ setGuid(guid) {
2725
+ this.criteria.description = null;
2726
+ this.criteria.tagValues = [guid];
2727
+ this.gridComponent.reset();
2525
2728
  }
2526
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalListComponent, deps: [{ token: 'ENTITIES' }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: ApprovalService }, { token: i1.AlertController }], target: i0.ɵɵFactoryTarget.Component }); }
2527
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ApprovalListComponent, isStandalone: true, selector: "up-approval-list", host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">Approval</h3>\n\n <up-btn-group id=\"approval-list\" [config]=\"btnConfig\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\">\n <up-filter placeholder=\"Type to search\" id=\"filter-approval-list\" [config]=\"filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"gridConfig\" id=\"grid-approval-list\" rowSelection=\"multiple\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" (onSelectionChanged)=\"selectApprovals()\" />\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2729
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditListComponent, deps: [{ token: 'id', attribute: true }, { token: 'mainUrl', attribute: true }, { token: i1$2.Router }, { token: AuditService }], target: i0.ɵɵFactoryTarget.Component }); }
2730
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AuditListComponent, isStandalone: true, selector: "up-audit-list", inputs: { relatedEntities: "relatedEntities", tagKeys: "tagKeys" }, host: { classAttribute: "d-flex flex-column h-100" }, viewQueries: [{ propertyName: "gridComponent", first: true, predicate: GridPaginationComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex justify-content-end px-4 pb-4 flex-shrink-0\">\n <up-filter class=\"w-100\" id=\"audit-filter\" placeholder=\"Type to search\" [config]=\"filterConfig\" (onSearch)=\"search($event);\" />\n</div>\n \n<up-pagination-grid id=\"grid-audit\" class=\"flex-grow-1\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"rowClicked($event)\" />\n", styles: [""], dependencies: [{ kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2528
2731
  }
2529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalListComponent, decorators: [{
2732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditListComponent, decorators: [{
2530
2733
  type: Component,
2531
- args: [{ standalone: true, selector: 'up-approval-list', host: {
2532
- class: 'd-flex flex-column h-100 w-100'
2734
+ args: [{ standalone: true, selector: 'up-audit-list', host: {
2735
+ class: 'd-flex flex-column h-100'
2533
2736
  }, imports: [
2534
2737
  FilterComponent,
2535
- ButtonGroupComponent,
2536
2738
  GridPaginationComponent
2537
- ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">Approval</h3>\n\n <up-btn-group id=\"approval-list\" [config]=\"btnConfig\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\">\n <up-filter placeholder=\"Type to search\" id=\"filter-approval-list\" [config]=\"filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"gridConfig\" id=\"grid-approval-list\" rowSelection=\"multiple\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" (onSelectionChanged)=\"selectApprovals()\" />\n</div>\n" }]
2739
+ ], template: "<div class=\"d-flex justify-content-end px-4 pb-4 flex-shrink-0\">\n <up-filter class=\"w-100\" id=\"audit-filter\" placeholder=\"Type to search\" [config]=\"filterConfig\" (onSearch)=\"search($event);\" />\n</div>\n \n<up-pagination-grid id=\"grid-audit\" class=\"flex-grow-1\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"rowClicked($event)\" />\n" }]
2538
2740
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2539
- type: Inject,
2540
- args: ['ENTITIES']
2541
- }] }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: ApprovalService }, { type: i1.AlertController }] });
2741
+ type: Attribute,
2742
+ args: ['id']
2743
+ }] }, { type: undefined, decorators: [{
2744
+ type: Attribute,
2745
+ args: ['mainUrl']
2746
+ }] }, { type: i1$2.Router }, { type: AuditService }], propDecorators: { relatedEntities: [{
2747
+ type: Input,
2748
+ args: [{ required: true }]
2749
+ }], tagKeys: [{
2750
+ type: Input
2751
+ }], gridComponent: [{
2752
+ type: ViewChild,
2753
+ args: [GridPaginationComponent]
2754
+ }] } });
2542
2755
 
2543
- class ApprovalFormComponent {
2544
- constructor(router, ch, service, gridService, alertCtrl, permService) {
2545
- this.router = router;
2546
- this.ch = ch;
2756
+ class AuditDetailComponent {
2757
+ constructor(fb, service, route, navCtrl) {
2758
+ this.fb = fb;
2547
2759
  this.service = service;
2548
- this.gridService = gridService;
2549
- this.alertCtrl = alertCtrl;
2550
- this.permService = permService;
2760
+ this.route = route;
2761
+ this.navCtrl = navCtrl;
2762
+ this.gridConfig = {
2763
+ useTotalRecord: false,
2764
+ colDefs: [
2765
+ { headerName: 'Attribute Name', field: 'attribute', sort: 'asc' },
2766
+ { headerName: 'Old Value', field: 'oldData' },
2767
+ { headerName: 'New Value', field: 'newData' }
2768
+ ]
2769
+ };
2770
+ this.form = this.fb.group({
2771
+ guid: new FormControl({ value: null, disabled: true }),
2772
+ action: new FormControl({ value: null, disabled: true }),
2773
+ description: new FormControl({ value: null, disabled: true }),
2774
+ userName: new FormControl({ value: null, disabled: true }),
2775
+ sourceIp: new FormControl({ value: null, disabled: true }),
2776
+ createdAt: new FormControl({ value: null, disabled: true }),
2777
+ msSource: new FormControl({ value: null, disabled: true }),
2778
+ sourcePlatform: new FormControl({ value: null, disabled: true }),
2779
+ function: new FormControl({ value: null, disabled: true }),
2780
+ });
2551
2781
  this.isLoading = true;
2552
- this.btnConfig = [];
2553
- this.data = [];
2782
+ this.guid = '';
2554
2783
  }
2555
2784
  ngOnDestroy() { this.sub?.unsubscribe(); }
2556
- setGuid(guids, isApprove) {
2557
- if (guids.length === 1)
2558
- this.guid = guids[0];
2559
- this.btnConfig.length = 0;
2560
- this.setLoading(true);
2561
- this.sub = this.service.query({ guids, status: [ApprovalStatusEnum.Approved, ApprovalStatusEnum.Declined, ApprovalStatusEnum.Pending] }, 'permission reason').subscribe({
2562
- next: ({ data: { approvalMsApprovals: { data } } }) => {
2563
- if (!data || data.length === 0) {
2564
- this.router.navigateByUrl('approval');
2565
- return;
2566
- }
2567
- this.data = data;
2568
- if (data.length > 1) {
2569
- let dataCount = 0;
2570
- data.map(({ permission, status }) => {
2571
- if (status === ApprovalStatusEnum.Pending) {
2572
- const perm = permission.split('.');
2573
- if (this.permService.checkPermission(perm[0], perm[1], perm[2]))
2574
- dataCount++;
2575
- if (dataCount === data.length)
2576
- isApprove ? this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval(s)', disabled: false, onClick: this.request.bind(this) }) : this.btnConfig.push({ label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
2577
- }
2578
- });
2579
- }
2580
- else {
2581
- const { status, permission } = data[0];
2582
- if (status === ApprovalStatusEnum.Pending) {
2583
- const perm = permission.split('.');
2584
- if (this.permService.checkPermission(perm[0], perm[1], perm[2])) {
2585
- this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval', disabled: false, onClick: this.request.bind(this) }, { label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
2586
- }
2587
- }
2588
- }
2589
- this.setLoading(false);
2590
- },
2591
- error: ({ message }) => {
2592
- this.showAlert('Error', message);
2593
- this.router.navigateByUrl('approval');
2594
- }
2595
- });
2596
- }
2597
- request(btn) {
2598
- const isApprove = btn.color !== 'danger';
2599
- this.showAlert('Confirm', `Are you sure want to ${isApprove ? 'approve the approval?' : 'decline the approval? Please input the reason if you want to decline.'}`, [
2600
- { text: 'Cancel', handler: () => btn.toggleLoading() },
2601
- {
2602
- text: `${isApprove ? 'Approve' : 'Decline'}`,
2603
- handler: ({ reason }) => {
2604
- this.sub?.unsubscribe();
2605
- const variables = {
2606
- ...(this.guid ? { guid: this.guid } : { approvalGroupGuid: '' }),
2607
- isApprove,
2608
- reason
2609
- };
2610
- this.sub = this.service.request(variables).subscribe({
2611
- next: () => {
2612
- this.showAlert('Success', `Approval ${isApprove ? 'approved' : 'declined'}`);
2613
- this.router.navigateByUrl('approval');
2614
- this.gridService.refreshGridCache('grid-approval-list');
2615
- },
2616
- error: ({ message }) => {
2617
- btn.toggleLoading();
2618
- this.showAlert('Error', message);
2619
- }
2620
- });
2621
- }
2622
- }
2623
- ], [{ name: 'reason', type: 'textarea', placeholder: 'Reason' }]);
2624
- }
2625
- setLoading(b) {
2626
- this.isLoading = b;
2627
- this.ch.markForCheck();
2785
+ setGridApi({ api }) {
2786
+ this.gridApi = api;
2787
+ this.getData();
2628
2788
  }
2629
- async showAlert(header, message, buttons = ['OK'], inputs = []) { (await this.alertCtrl.create({ header, message, buttons, inputs })).present(); }
2630
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalFormComponent, deps: [{ token: i1$2.Router }, { token: i0.ChangeDetectorRef }, { token: ApprovalService }, { token: GridService }, { token: i1.AlertController }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
2631
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ApprovalFormComponent, isStandalone: true, selector: "up-approval-form", inputs: { isLoading: "isLoading" }, host: { classAttribute: "px-4 d-block" }, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea class=\"mb-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2632
- }
2633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalFormComponent, decorators: [{
2634
- type: Component,
2635
- args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2636
- class: 'px-4 d-block'
2637
- }, imports: [
2638
- IonicModule,
2639
- CommonModule,
2640
- FormInputComponent,
2641
- FormTextareaComponent
2642
- ], template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea class=\"mb-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n</ng-template>\n" }]
2643
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: ApprovalService }, { type: GridService }, { type: i1.AlertController }, { type: PermissionService }], propDecorators: { isLoading: [{
2644
- type: Input
2645
- }] } });
2646
-
2647
- class ApprovalDetailComponent {
2648
- constructor(router, activatedRoute) {
2649
- this.router = router;
2650
- this.activatedRoute = activatedRoute;
2651
- this.btnConfig = [];
2652
- this.guid = '';
2789
+ isIsoDateString(str) {
2790
+ const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$/;
2791
+ return regex.test(str);
2653
2792
  }
2654
- ngOnInit() {
2655
- this.sub = this.activatedRoute.queryParams.subscribe((params) => {
2656
- if (params) {
2657
- this.guids = params['guids'];
2658
- this.isApprove = params['isApprove'] === 'true';
2659
- }
2660
- });
2793
+ formatData(value) {
2794
+ if (value === null)
2795
+ return value;
2796
+ if (typeof value === 'object')
2797
+ return JSON.stringify(value);
2798
+ if (this.isIsoDateString(value))
2799
+ return formatDate(value, 'dd MMM yyyy HH:mm', 'en-US');
2800
+ return value;
2661
2801
  }
2662
- ngAfterViewInit() {
2663
- if (this.guids) {
2664
- this.setChildGuid('');
2665
- this.changeTab(this.activatedRoute.snapshot.fragment);
2666
- }
2667
- else {
2668
- this.setChildGuid(this.activatedRoute.children[0].snapshot.params['guid']);
2669
- this.changeTab(this.activatedRoute.snapshot.fragment);
2670
- this.sub = this.router.events.pipe(filter((e) => e instanceof NavigationEnd)).subscribe({
2671
- next: () => {
2672
- const newGuid = this.activatedRoute.children[0].snapshot.params['guid'];
2673
- if (this.guid !== newGuid) {
2674
- this.guid = newGuid;
2675
- this.setChildGuid(this.guid);
2676
- }
2802
+ getData() {
2803
+ const newGuid = this.route.children[0].snapshot.params['audit'];
2804
+ if (!newGuid || this.guid === newGuid)
2805
+ return;
2806
+ this.sub?.unsubscribe();
2807
+ this.gridApi?.showLoadingOverlay();
2808
+ this.guid = newGuid;
2809
+ this.isLoading = true;
2810
+ this.sub = this.service.query({ guid: this.guid }, 'data tags { tagKey tagValue }').subscribe({
2811
+ next: ({ data: { auditMsAuditTrail: data } }) => {
2812
+ this.gridApi?.hideOverlay();
2813
+ if (data.length !== 1) {
2814
+ this.navCtrl.back();
2815
+ return;
2677
2816
  }
2678
- });
2679
- }
2817
+ const { guid, action, description, function: func, msSource, sourceIp, createdAt } = data[0];
2818
+ this.form.patchValue({
2819
+ guid,
2820
+ function: func,
2821
+ msSource, sourceIp,
2822
+ action, description,
2823
+ userName: data[0].user?.name,
2824
+ sourcePlatform: data[0].user?.sourcePlatform,
2825
+ createdAt: formatDate(createdAt, 'dd MMM yyyy HH:mm', 'en-US'),
2826
+ });
2827
+ this.isLoading = false;
2828
+ this.getChangedData(data[0].data);
2829
+ },
2830
+ error: () => this.navCtrl.back()
2831
+ });
2680
2832
  }
2681
- ngOnDestroy() { this.sub.unsubscribe(); }
2682
- changeTab(f) {
2683
- switch (f) {
2684
- default:
2685
- this.btnConfig = this.formComponent?.btnConfig ?? [];
2833
+ getChangedData({ oldData, newData }) {
2834
+ if (!newData || Array.isArray(JSON.parse(newData))) {
2835
+ this.gridApi.setGridOption('rowData', []);
2836
+ return;
2686
2837
  }
2838
+ const objNewData = JSON.parse(newData);
2839
+ const changedData = Object.entries(oldData ? JSON.parse(oldData) : JSON.parse(newData))
2840
+ .filter(([key, oldVal]) => JSON.stringify(oldData ? oldVal : null) !== JSON.stringify(objNewData[key]) && !key.match(/update|created/))
2841
+ .map(([key, oldVal]) => ({
2842
+ attribute: key,
2843
+ oldData: oldData ? this.formatData(oldVal) : null,
2844
+ newData: this.formatData(objNewData[key])
2845
+ }));
2846
+ this.gridApi.setGridOption('rowData', changedData);
2687
2847
  }
2688
- setChildGuid(guid) {
2689
- this.formComponent?.setGuid(this.guids ?? [guid], this.isApprove);
2690
- }
2691
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalDetailComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2692
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: ApprovalDetailComponent, isStandalone: true, selector: "up-approval-detail", host: { classAttribute: "d-block h-100" }, viewQueries: [{ propertyName: "formComponent", first: true, predicate: ApprovalFormComponent, descendants: true }], ngImport: i0, template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" />\n\n <ng-template #loading>\n <ion-skeleton-text id=\"button\" class=\"m-0 sk-btn\" />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: ColumnHeaderContainerComponent, selector: "up-column-header-container", inputs: ["header", "prevUrl"] }, { kind: "component", type: ApprovalFormComponent, selector: "up-approval-form", inputs: ["isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2848
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditDetailComponent, deps: [{ token: i3$1.FormBuilder }, { token: AuditService }, { token: i1$2.ActivatedRoute }, { token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
2849
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AuditDetailComponent, isStandalone: true, selector: "up-audit-detail", ngImport: i0, template: "<up-tab-group class=\"h-100\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <form [formGroup]=\"form\" class=\"px-4 pb-4\" *ngIf=\"!isLoading; else loading\">\n <div class=\"d-flex align-items-center gap-2 pb-3\">\n <ion-icon name=\"information-circle\" />\n <h5 class=\"m-0\">Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-lg-4\" label=\"Action\" formControlName=\"action\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Source IP\" formControlName=\"sourceIp\" />\n </div>\n </div>\n \n <up-input class=\"mb-4\" label=\"User Name\" formControlName=\"userName\" />\n <up-textarea class=\"mb-4\" label=\"Description\" formControlName=\"description\" />\n\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"laptop\" />\n <h5 class=\"m-0\">System Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Action Date\" formControlName=\"createdAt\" />\n <up-input class=\"mb-lg-4\" label=\"Source Platform\" formControlName=\"sourcePlatform\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"MS Source\" formControlName=\"msSource\" />\n <up-input class=\"mb-4\" label=\"Function\" formControlName=\"function\" />\n </div>\n </div>\n </form>\n\n <ng-template #loading>\n <ion-skeleton-text class=\"sk-input mx-4 mb-4\" *ngFor=\"let i of [0,1,2,3,4,5,6]\" />\n </ng-template> \n </up-tab-content>\n\n <up-tab-content header=\"Attributes\" fragment=\"attributes\">\n <up-pagination-grid id=\"grid-audit-detail\" rowModelType=\"clientSide\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" />\n </up-tab-content>\n</up-tab-group>\n", styles: ["ion-icon{font-size:24px;margin-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
2693
2850
  }
2694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalDetailComponent, decorators: [{
2851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuditDetailComponent, decorators: [{
2695
2852
  type: Component,
2696
- args: [{ standalone: true, selector: 'up-approval-detail', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2697
- class: 'd-block h-100'
2698
- }, imports: [
2699
- IonicModule,
2853
+ args: [{ standalone: true, selector: 'up-audit-detail', imports: [
2700
2854
  CommonModule,
2855
+ IonicModule,
2856
+ GridPaginationComponent,
2701
2857
  TabsComponentModule,
2702
- ButtonGroupComponent,
2703
- ColumnHeaderContainerComponent,
2704
- ApprovalFormComponent
2705
- ], template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" />\n\n <ng-template #loading>\n <ion-skeleton-text id=\"button\" class=\"m-0 sk-btn\" />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n" }]
2706
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { formComponent: [{
2707
- type: ViewChild,
2708
- args: [ApprovalFormComponent]
2709
- }] } });
2858
+ FormInputComponent,
2859
+ FormTextareaComponent,
2860
+ ReactiveFormsModule
2861
+ ], template: "<up-tab-group class=\"h-100\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <form [formGroup]=\"form\" class=\"px-4 pb-4\" *ngIf=\"!isLoading; else loading\">\n <div class=\"d-flex align-items-center gap-2 pb-3\">\n <ion-icon name=\"information-circle\" />\n <h5 class=\"m-0\">Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-lg-4\" label=\"Action\" formControlName=\"action\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Source IP\" formControlName=\"sourceIp\" />\n </div>\n </div>\n \n <up-input class=\"mb-4\" label=\"User Name\" formControlName=\"userName\" />\n <up-textarea class=\"mb-4\" label=\"Description\" formControlName=\"description\" />\n\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\">\n <ion-icon name=\"laptop\" />\n <h5 class=\"m-0\">System Information</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Action Date\" formControlName=\"createdAt\" />\n <up-input class=\"mb-lg-4\" label=\"Source Platform\" formControlName=\"sourcePlatform\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"MS Source\" formControlName=\"msSource\" />\n <up-input class=\"mb-4\" label=\"Function\" formControlName=\"function\" />\n </div>\n </div>\n </form>\n\n <ng-template #loading>\n <ion-skeleton-text class=\"sk-input mx-4 mb-4\" *ngFor=\"let i of [0,1,2,3,4,5,6]\" />\n </ng-template> \n </up-tab-content>\n\n <up-tab-content header=\"Attributes\" fragment=\"attributes\">\n <up-pagination-grid id=\"grid-audit-detail\" rowModelType=\"clientSide\" [config]=\"gridConfig\" (onGridReady)=\"setGridApi($event)\" />\n </up-tab-content>\n</up-tab-group>\n", styles: ["ion-icon{font-size:24px;margin-right:5px}\n"] }]
2862
+ }], ctorParameters: () => [{ type: i3$1.FormBuilder }, { type: AuditService }, { type: i1$2.ActivatedRoute }, { type: i1.NavController }] });
2710
2863
 
2711
- class ProfileService {
2864
+ class ApprovalService {
2712
2865
  constructor(apollo) {
2713
2866
  this.apollo = apollo;
2867
+ this.baseAttr = `guid createdAt entity remark sourcePlatform status type`;
2714
2868
  }
2715
- getMyProfile(fetchPolicy) {
2869
+ query(input, extraAttr = '', fetchPolicy) {
2716
2870
  return this.apollo.query({
2717
2871
  fetchPolicy,
2718
- errorPolicy: 'all',
2872
+ variables: { input },
2719
2873
  query: gql `
2720
- query getMyProfile {
2721
- authMsMyProfile {
2722
- appLoginPrincipal {
2723
- principalId
2724
- principalType
2725
- }
2726
- appLoginExt {
2727
- paramCode
2728
- paramType
2729
- file {
2730
- publicUrl
2731
- }
2732
- }
2733
- birthday
2734
- category
2735
- company {
2736
- code
2737
- guid
2738
- isInternal
2739
- name
2740
- status
2741
- }
2742
- gender
2743
- guid
2744
- merchants {
2745
- guid
2746
- name
2747
- status
2874
+ query QueryApproval($input: ApprovalCriteria) {
2875
+ approvalMsApprovals(input: $input) {
2876
+ data {
2877
+ ${this.baseAttr}
2878
+ ${extraAttr}
2748
2879
  }
2749
- name
2750
- status
2880
+ ${input.page === 0 ? 'totalRecord' : ''}
2751
2881
  }
2752
2882
  }
2753
- `,
2754
- }).pipe(map(({ data: { authMsMyProfile } }) => {
2755
- if (!authMsMyProfile)
2756
- return null;
2757
- return authMsMyProfile;
2758
- }));
2883
+ `
2884
+ });
2885
+ }
2886
+ request(variables) {
2887
+ return this.apollo.mutate({
2888
+ variables,
2889
+ mutation: gql `
2890
+ mutation ${variables.isApprove ? 'ApproveApproval' : 'DeclineApproval'}($approvalGroupGuid: String, $guid: String, $isApprove: Boolean, $reason: String) {
2891
+ approvalMsApproveOrDeclineRequest(approvalGroupGuid: $approvalGroupGuid, guid: $guid, isApprove: $isApprove, reason: $reason)
2892
+ }
2893
+ `
2894
+ });
2759
2895
  }
2760
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProfileService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2761
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
2896
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2897
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
2762
2898
  }
2763
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProfileService, decorators: [{
2899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalService, decorators: [{
2764
2900
  type: Injectable,
2765
2901
  args: [{
2766
2902
  providedIn: 'root'
2767
2903
  }]
2768
2904
  }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2769
2905
 
2770
- class AuthService {
2771
- static { this.authToken = ''; }
2772
- static { this.refreshToken = ''; }
2773
- constructor(apollo, profileService) {
2774
- this.apollo = apollo;
2775
- this.profileService = profileService;
2776
- }
2777
- login(input) {
2778
- return this.apollo.mutate({
2779
- variables: { input },
2780
- mutation: gql `
2781
- mutation Login($input: LoginRq!) {
2782
- authMsLogin(input: $input) {
2783
- accessToken
2784
- refreshToken
2785
- suggestedAction
2786
- user {
2787
- birthday
2788
- category
2789
- email
2790
- gender
2791
- guid
2792
- mobileNumber
2793
- name
2794
- status
2795
- }
2796
- }
2797
- }
2798
- `
2799
- }).pipe(tap(({ data }) => {
2800
- if (data?.authMsLogin) {
2801
- const { accessToken, user, refreshToken } = data.authMsLogin;
2802
- this.user = user;
2803
- this.user.photo = '/assets/imgs/profile.svg';
2804
- AuthService.authToken = accessToken ?? '';
2805
- AuthService.refreshToken = refreshToken ?? '';
2806
- localStorage.setItem('userGuid', this.user.guid);
2807
- localStorage.setItem('authToken', AuthService.authToken);
2808
- localStorage.setItem('refreshToken', AuthService.refreshToken);
2906
+ class ApprovalListComponent {
2907
+ constructor(entities, router, route, service, alertCtrl) {
2908
+ this.entities = entities;
2909
+ this.router = router;
2910
+ this.route = route;
2911
+ this.service = service;
2912
+ this.alertCtrl = alertCtrl;
2913
+ this.gridConfig = {
2914
+ noRowText: 'Approval not found',
2915
+ colDefs: [
2916
+ { headerName: 'Entity', field: 'entity', checkboxSelection: true },
2917
+ { headerName: 'Remark', field: 'remark' },
2918
+ { headerName: 'Source Platform', field: 'sourcePlatform' },
2919
+ { headerName: 'Status', field: 'status', maxWidth: 100, cellRenderer: ({ value }) => value ? `<div class="badge m-auto bg-${value === ApprovalStatusEnum.Pending ? 'warning' : value === ApprovalStatusEnum.Approved ? 'success' : 'danger'}">${value}</div>` : '' },
2920
+ { headerName: 'Type', field: 'type', maxWidth: 100 },
2921
+ { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2922
+ ],
2923
+ getData: (page, pageSize, sortBy, dir) => {
2924
+ const policy = this.input.page === page ? 'no-cache' : undefined;
2925
+ this.input.page = page;
2926
+ this.input.sortBy = sortBy;
2927
+ this.input.pageSize = pageSize;
2928
+ this.input.sortDirection = dir;
2929
+ return this.service.query(this.input, '', policy).pipe(map(({ data: { approvalMsApprovals: { data, totalRecord: t } } }) => ({ data, totalRecord: t })));
2809
2930
  }
2810
- }));
2931
+ };
2932
+ this.filterConfig = {
2933
+ mode: 'advanced',
2934
+ fields: [
2935
+ { key: 'status', label: 'Status', type: 'select', options: [
2936
+ { label: 'Approved', value: ['APPROVED'] },
2937
+ { label: 'Declined', value: ['DECLINED'] },
2938
+ { label: 'Pending', value: ['PENDING'] }
2939
+ ] },
2940
+ { key: 'type', label: 'Type', type: 'select', options: [
2941
+ { label: 'Creation', value: ['CREATION'] },
2942
+ { label: 'Deletion', value: ['DELETION'] },
2943
+ { label: 'Linkage', value: ['LINKAGE'] },
2944
+ { label: 'Unlink', value: ['UNLINK'] },
2945
+ { label: 'Update', value: ['UPDATE'] }
2946
+ ] }
2947
+ ]
2948
+ };
2949
+ this.btnConfig = [
2950
+ { label: 'Approve', icon: 'checkmark', description: 'Approve the approvals', disabled: true, onClick: this.multipleApproval.bind(this) },
2951
+ { label: 'Decline', icon: 'close', description: 'Decline the approvals', color: 'danger', disabled: true, onClick: this.multipleApproval.bind(this) }
2952
+ ];
2953
+ this.input = { page: 0, pageSize: 50, entity: this.entities };
2811
2954
  }
2812
- refreshToken(variables) {
2813
- return this.apollo.mutate({
2814
- context: {
2815
- headers: {
2816
- 'operation-type': 'Mutation',
2817
- 'operation-name': 'RefreshToken'
2818
- }
2819
- },
2820
- variables,
2821
- mutation: gql `
2822
- mutation RefreshToken($refreshToken: String!) {
2823
- authMsRefreshAccessToken(refreshToken: $refreshToken) {
2824
- accessToken
2825
- refreshToken
2826
- }
2827
- }
2828
- `
2955
+ setGridApi({ api }) { this.gridApi = api; }
2956
+ openDetail({ guid }) { this.router.navigate([`/approval/${guid}`], { preserveFragment: true }); }
2957
+ selectApprovals() { this.btnConfig[0].disabled = this.btnConfig[1].disabled = this.gridApi.getSelectedRows().length <= 1; }
2958
+ search({ data }) {
2959
+ this.input.type = data?.type;
2960
+ this.input.status = data?.status;
2961
+ this.gridApi.getSelectedNodes().forEach((e) => e.setSelected(false));
2962
+ this.gridApi.refreshInfiniteCache();
2963
+ }
2964
+ multipleApproval(btn) {
2965
+ btn.toggleLoading();
2966
+ this.router.navigate([`/approval/approval-group`], {
2967
+ preserveFragment: true,
2968
+ queryParams: {
2969
+ isApprove: btn.color !== 'danger',
2970
+ guids: this.gridApi.getSelectedRows().map(({ guid }) => guid),
2971
+ }
2829
2972
  });
2830
2973
  }
2831
- getProfile(fetchPolicy) {
2832
- return this.profileService.getMyProfile(fetchPolicy).pipe(tap((user) => {
2833
- if (!user)
2834
- return;
2835
- this.user = { ...user, photo: '/assets/imgs/profile.svg' };
2836
- user.appLoginExt?.forEach(({ paramCode, file: { publicUrl } }) => {
2837
- if (paramCode === 'USER_PROFILE_PHOTO')
2838
- this.user.photo = publicUrl;
2839
- });
2840
- user.appLoginPrincipal?.forEach(({ principalId, principalType }) => {
2841
- if (principalType === 'EMAIL_USERNAME')
2842
- this.user.email = principalId;
2843
- });
2844
- }));
2974
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalListComponent, deps: [{ token: 'ENTITIES' }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: ApprovalService }, { token: i1.AlertController }], target: i0.ɵɵFactoryTarget.Component }); }
2975
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ApprovalListComponent, isStandalone: true, selector: "up-approval-list", host: { classAttribute: "d-flex flex-column h-100 w-100" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">Approval</h3>\n\n <up-btn-group id=\"approval-list\" [config]=\"btnConfig\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\">\n <up-filter placeholder=\"Type to search\" id=\"filter-approval-list\" [config]=\"filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"gridConfig\" id=\"grid-approval-list\" rowSelection=\"multiple\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" (onSelectionChanged)=\"selectApprovals()\" />\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: FilterComponent, selector: "up-filter", inputs: ["id", "config"], outputs: ["onSearch"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: GridPaginationComponent, selector: "up-pagination-grid", inputs: ["config", "rowData", "id", "rowModelType", "rowSelection"], outputs: ["onRowClick", "onGridReady", "onSelectionChanged"] }] }); }
2976
+ }
2977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalListComponent, decorators: [{
2978
+ type: Component,
2979
+ args: [{ standalone: true, selector: 'up-approval-list', host: {
2980
+ class: 'd-flex flex-column h-100 w-100'
2981
+ }, imports: [
2982
+ FilterComponent,
2983
+ ButtonGroupComponent,
2984
+ GridPaginationComponent
2985
+ ], template: "<div class=\"d-flex align-items-center justify-content-between gap-4 p-4 flex-shrink-0 flex-wrap\">\n <div class=\"flex-grow-1 d-flex align-items-center gap-3\">\n <h3 class=\"m-0\">Approval</h3>\n\n <up-btn-group id=\"approval-list\" [config]=\"btnConfig\" />\n </div>\n\n <div class=\"flex-shrink-0 flex-grow-1\">\n <up-filter placeholder=\"Type to search\" id=\"filter-approval-list\" [config]=\"filterConfig\" (onSearch)=\"search($event)\" />\n </div>\n</div>\n\n<div class=\"flex-grow-1 px-1 pb-1\">\n <up-pagination-grid [config]=\"gridConfig\" id=\"grid-approval-list\" rowSelection=\"multiple\" (onGridReady)=\"setGridApi($event)\" (onRowClick)=\"openDetail($event)\" (onSelectionChanged)=\"selectApprovals()\" />\n</div>\n" }]
2986
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2987
+ type: Inject,
2988
+ args: ['ENTITIES']
2989
+ }] }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: ApprovalService }, { type: i1.AlertController }] });
2990
+
2991
+ class ApprovalFormComponent {
2992
+ constructor(router, ch, service, gridService, alertCtrl, permService) {
2993
+ this.router = router;
2994
+ this.ch = ch;
2995
+ this.service = service;
2996
+ this.gridService = gridService;
2997
+ this.alertCtrl = alertCtrl;
2998
+ this.permService = permService;
2999
+ this.isLoading = true;
3000
+ this.btnConfig = [];
3001
+ this.data = [];
2845
3002
  }
2846
- initForgotPassword(email) {
2847
- return this.apollo.mutate({
2848
- variables: {
2849
- input: {
2850
- email,
2851
- sourcePlatform: SourcePlatform.Admin
3003
+ ngOnDestroy() { this.sub?.unsubscribe(); }
3004
+ setGuid(guids, isApprove) {
3005
+ if (guids.length === 1)
3006
+ this.guid = guids[0];
3007
+ this.btnConfig.length = 0;
3008
+ this.setLoading(true);
3009
+ this.sub = this.service.query({ guids, status: [ApprovalStatusEnum.Approved, ApprovalStatusEnum.Declined, ApprovalStatusEnum.Pending] }, 'permission reason').subscribe({
3010
+ next: ({ data: { approvalMsApprovals: { data } } }) => {
3011
+ if (!data || data.length === 0) {
3012
+ this.router.navigateByUrl('approval');
3013
+ return;
3014
+ }
3015
+ this.data = data;
3016
+ if (data.length > 1) {
3017
+ let dataCount = 0;
3018
+ data.map(({ permission, status }) => {
3019
+ if (status === ApprovalStatusEnum.Pending) {
3020
+ const perm = permission.split('.');
3021
+ if (this.permService.checkPermission(perm[0], perm[1], perm[2]))
3022
+ dataCount++;
3023
+ if (dataCount === data.length)
3024
+ isApprove ? this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval(s)', disabled: false, onClick: this.request.bind(this) }) : this.btnConfig.push({ label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
3025
+ }
3026
+ });
3027
+ }
3028
+ else {
3029
+ const { status, permission } = data[0];
3030
+ if (status === ApprovalStatusEnum.Pending) {
3031
+ const perm = permission.split('.');
3032
+ if (this.permService.checkPermission(perm[0], perm[1], perm[2])) {
3033
+ this.btnConfig.push({ label: 'Approve', icon: 'checkmark', description: 'Approve the approval', disabled: false, onClick: this.request.bind(this) }, { label: 'Decline', icon: 'close', description: 'Decline the approval', color: 'danger', disabled: false, onClick: this.request.bind(this) });
3034
+ }
3035
+ }
2852
3036
  }
3037
+ this.setLoading(false);
2853
3038
  },
2854
- mutation: gql `
2855
- mutation InitForgotPassword($input: ForgotPassOtpRq!) {
2856
- authMsForgotPasswordOtp(input: $input)
2857
- }
2858
- `
3039
+ error: ({ message }) => {
3040
+ this.showAlert('Error', message);
3041
+ this.router.navigateByUrl('approval');
3042
+ }
2859
3043
  });
2860
3044
  }
2861
- createNewPassword({ newPassword, principalId, sourcePlatform, verifCode }) {
2862
- return this.apollo.mutate({
2863
- mutation: gql `
2864
- mutation SubmitForgotPassword($input: ForgotPassRq!) {
2865
- authMsForgotPassword(input: $input)
2866
- }
2867
- `,
2868
- variables: {
2869
- input: {
2870
- newPassword,
2871
- principalId,
2872
- sourcePlatform,
2873
- verifCode
3045
+ request(btn) {
3046
+ const isApprove = btn.color !== 'danger';
3047
+ this.showAlert('Confirm', `Are you sure want to ${isApprove ? 'approve the approval?' : 'decline the approval? Please input the reason if you want to decline.'}`, [
3048
+ { text: 'Cancel', handler: () => btn.toggleLoading() },
3049
+ {
3050
+ text: `${isApprove ? 'Approve' : 'Decline'}`,
3051
+ handler: ({ reason }) => {
3052
+ this.sub?.unsubscribe();
3053
+ const variables = {
3054
+ ...(this.guid ? { guid: this.guid } : { approvalGroupGuid: '' }),
3055
+ isApprove,
3056
+ reason
3057
+ };
3058
+ this.sub = this.service.request(variables).subscribe({
3059
+ next: () => {
3060
+ this.showAlert('Success', `Approval ${isApprove ? 'approved' : 'declined'}`);
3061
+ this.router.navigateByUrl('approval');
3062
+ this.gridService.refreshGridCache('grid-approval-list');
3063
+ },
3064
+ error: ({ message }) => {
3065
+ btn.toggleLoading();
3066
+ this.showAlert('Error', message);
3067
+ }
3068
+ });
2874
3069
  }
2875
3070
  }
2876
- });
3071
+ ], [{ name: 'reason', type: 'textarea', placeholder: 'Reason' }]);
2877
3072
  }
2878
- updatePassword(input) {
2879
- return this.apollo.mutate({
2880
- mutation: gql `
2881
- mutation ChangePassword($input: ChangePassRq!) {
2882
- authMsChangePassword(input: $input)
2883
- }
2884
- `,
2885
- variables: { input }
2886
- });
3073
+ setLoading(b) {
3074
+ this.isLoading = b;
3075
+ this.ch.markForCheck();
2887
3076
  }
2888
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Apollo }, { token: ProfileService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2889
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthService, providedIn: 'root' }); }
3077
+ async showAlert(header, message, buttons = ['OK'], inputs = []) { (await this.alertCtrl.create({ header, message, buttons, inputs })).present(); }
3078
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalFormComponent, deps: [{ token: i1$2.Router }, { token: i0.ChangeDetectorRef }, { token: ApprovalService }, { token: GridService }, { token: i1.AlertController }, { token: PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
3079
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ApprovalFormComponent, isStandalone: true, selector: "up-approval-form", inputs: { isLoading: "isLoading" }, host: { classAttribute: "px-4 d-block" }, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea class=\"mb-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: FormInputComponent, selector: "up-input", inputs: ["label", "value", "required", "disabled"], outputs: ["onInput"] }, { kind: "component", type: FormTextareaComponent, selector: "up-textarea", inputs: ["value", "required", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2890
3080
  }
2891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthService, decorators: [{
2892
- type: Injectable,
2893
- args: [{
2894
- providedIn: 'root'
2895
- }]
2896
- }], ctorParameters: () => [{ type: i1$1.Apollo }, { type: ProfileService }] });
3081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalFormComponent, decorators: [{
3082
+ type: Component,
3083
+ args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
3084
+ class: 'px-4 d-block'
3085
+ }, imports: [
3086
+ IonicModule,
3087
+ CommonModule,
3088
+ FormInputComponent,
3089
+ FormTextareaComponent
3090
+ ], template: "<ng-container *ngIf=\"!isLoading; else loading\">\n <div *ngFor=\"let d of data, let i = index\">\n <div class=\"d-flex align-items-center gap-2 pb-3 pt-2\" *ngIf=\"data.length > 1\">\n <ion-icon name=\"document\" />\n <h5 class=\"m-0\">Approval {{ i + 1 }}</h5>\n </div>\n\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Entity\" [disabled]=\"true\" [value]=\"d.entity\" />\n <up-input class=\"mb-4\" label=\"Remark\" [disabled]=\"true\" [value]=\"d.remark\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <up-input class=\"mb-4\" label=\"Created At\" [disabled]=\"true\" [value]=\"d.createdAt | date:'dd MMM yyyy HH:mm'\" />\n <up-input class=\"mb-4\" label=\"Status\" [disabled]=\"true\" [value]=\"d.status\" />\n </div>\n </div>\n\n <up-textarea class=\"mb-4\" label=\"Reason\" [disabled]=\"true\" [value]=\"d.reason\" *ngIf=\"d.status !== 'PENDING'\" />\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"d-flex flex-column flex-lg-row gap-4\">\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n\n <div class=\"flex-grow-1\">\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n <ion-skeleton-text class=\"m-0 mb-4 sk-input\" />\n </div>\n </div>\n</ng-template>\n" }]
3091
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: ApprovalService }, { type: GridService }, { type: i1.AlertController }, { type: PermissionService }], propDecorators: { isLoading: [{
3092
+ type: Input
3093
+ }] } });
2897
3094
 
2898
- class CurrencyService {
2899
- constructor(apollo) {
2900
- this.apollo = apollo;
3095
+ class ApprovalDetailComponent {
3096
+ constructor(router, activatedRoute) {
3097
+ this.router = router;
3098
+ this.activatedRoute = activatedRoute;
3099
+ this.btnConfig = [];
3100
+ this.guid = '';
2901
3101
  }
2902
- query() {
2903
- return this.apollo.query({
2904
- errorPolicy: 'all',
2905
- variables: {
2906
- input: {
2907
- page: 0,
2908
- pageSize: 300,
2909
- sortBy: 'name',
2910
- sortDirection: 'asc'
2911
- }
2912
- },
2913
- query: gql `
2914
- query QueryCurrency($input: CurrencyQueryCriteria!) {
2915
- webConfigMsCurrency(input: $input) {
2916
- data {
2917
- code
2918
- guid
2919
- magnifyValue
2920
- name
2921
- status
3102
+ ngOnInit() {
3103
+ this.sub = this.activatedRoute.queryParams.subscribe((params) => {
3104
+ if (params) {
3105
+ this.guids = params['guids'];
3106
+ this.isApprove = params['isApprove'] === 'true';
2922
3107
  }
2923
- }
2924
- }
2925
- `,
2926
3108
  });
2927
3109
  }
2928
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CurrencyService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2929
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
2930
- }
2931
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CurrencyService, decorators: [{
2932
- type: Injectable,
2933
- args: [{
2934
- providedIn: 'root'
2935
- }]
2936
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2937
-
2938
- class CountryService {
2939
- constructor(apollo) {
2940
- this.apollo = apollo;
2941
- }
2942
- query() {
2943
- return this.apollo.query({
2944
- errorPolicy: 'all',
2945
- variables: {
2946
- input: {
2947
- page: 0,
2948
- pageSize: 300,
2949
- sortBy: 'name',
2950
- sortDirection: 'asc'
3110
+ ngAfterViewInit() {
3111
+ if (this.guids) {
3112
+ this.setChildGuid('');
3113
+ this.changeTab(this.activatedRoute.snapshot.fragment);
3114
+ }
3115
+ else {
3116
+ this.setChildGuid(this.activatedRoute.children[0].snapshot.params['guid']);
3117
+ this.changeTab(this.activatedRoute.snapshot.fragment);
3118
+ this.sub = this.router.events.pipe(filter((e) => e instanceof NavigationEnd)).subscribe({
3119
+ next: () => {
3120
+ const newGuid = this.activatedRoute.children[0].snapshot.params['guid'];
3121
+ if (this.guid !== newGuid) {
3122
+ this.guid = newGuid;
3123
+ this.setChildGuid(this.guid);
3124
+ }
2951
3125
  }
2952
- },
2953
- query: gql `
2954
- query QueryCountry($input: CountryQueryCriteria!) {
2955
- webConfigMsCountry(input: $input) {
2956
- data {
2957
- code
2958
- defaultLangCode
2959
- guid
2960
- langCodes {
2961
- code
2962
- guid
2963
- }
2964
- name
2965
- phoneCodes {
2966
- code
2967
- }
2968
- }
2969
- }
3126
+ });
2970
3127
  }
2971
- `,
2972
- });
2973
3128
  }
2974
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CountryService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2975
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CountryService, providedIn: 'root' }); }
3129
+ ngOnDestroy() { this.sub.unsubscribe(); }
3130
+ changeTab(f) {
3131
+ switch (f) {
3132
+ default:
3133
+ this.btnConfig = this.formComponent?.btnConfig ?? [];
3134
+ }
3135
+ }
3136
+ setChildGuid(guid) {
3137
+ this.formComponent?.setGuid(this.guids ?? [guid], this.isApprove);
3138
+ }
3139
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalDetailComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
3140
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: ApprovalDetailComponent, isStandalone: true, selector: "up-approval-detail", host: { classAttribute: "d-block h-100" }, viewQueries: [{ propertyName: "formComponent", first: true, predicate: ApprovalFormComponent, descendants: true }], ngImport: i0, template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" />\n\n <ng-template #loading>\n <ion-skeleton-text id=\"button\" class=\"m-0 sk-btn\" />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: IonicModule }, { kind: "component", type: i1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TabsComponentModule }, { kind: "component", type: TabGroupComponent, selector: "up-tab-group", outputs: ["onChange"] }, { kind: "component", type: TabContentComponent, selector: "up-tab-content", inputs: ["header"] }, { kind: "component", type: ButtonGroupComponent, selector: "up-btn-group", inputs: ["config"] }, { kind: "component", type: ColumnHeaderContainerComponent, selector: "up-column-header-container", inputs: ["header", "prevUrl"] }, { kind: "component", type: ApprovalFormComponent, selector: "up-approval-form", inputs: ["isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2976
3141
  }
2977
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CountryService, decorators: [{
2978
- type: Injectable,
2979
- args: [{
2980
- providedIn: 'root'
2981
- }]
2982
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
3142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: ApprovalDetailComponent, decorators: [{
3143
+ type: Component,
3144
+ args: [{ standalone: true, selector: 'up-approval-detail', changeDetection: ChangeDetectionStrategy.OnPush, host: {
3145
+ class: 'd-block h-100'
3146
+ }, imports: [
3147
+ IonicModule,
3148
+ CommonModule,
3149
+ TabsComponentModule,
3150
+ ButtonGroupComponent,
3151
+ ColumnHeaderContainerComponent,
3152
+ ApprovalFormComponent
3153
+ ], template: "<up-column-header-container header=\"Approval Detail\" prevUrl=\"/approval\" class=\"bg-white\">\n <up-btn-group id=\"button\" *ngIf=\"!formComponent?.isLoading; else loading\" [config]=\"btnConfig\" />\n\n <ng-template #loading>\n <ion-skeleton-text id=\"button\" class=\"m-0 sk-btn\" />\n </ng-template>\n\n <up-tab-group class=\"h-100\" (onChange)=\"changeTab($event)\">\n <up-tab-content header=\"Detail\" fragment=\"detail\">\n <up-approval-form />\n </up-tab-content>\n </up-tab-group>\n</up-column-header-container>\n" }]
3154
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { formComponent: [{
3155
+ type: ViewChild,
3156
+ args: [ApprovalFormComponent]
3157
+ }] } });
2983
3158
 
2984
3159
  class AuthResolver {
2985
3160
  isUserLoggedIn() {
@@ -3055,10 +3230,10 @@ class AuthResolver {
3055
3230
  buffer = chars.indexOf(buffer);
3056
3231
  return output;
3057
3232
  }
3058
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3059
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, providedIn: 'root' }); }
3233
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3234
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthResolver, providedIn: 'root' }); }
3060
3235
  }
3061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, decorators: [{
3236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AuthResolver, decorators: [{
3062
3237
  type: Injectable,
3063
3238
  args: [{
3064
3239
  providedIn: 'root'
@@ -3083,10 +3258,10 @@ class HeaderInterceptor {
3083
3258
  }
3084
3259
  }));
3085
3260
  }
3086
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3087
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor }); }
3261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HeaderInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HeaderInterceptor }); }
3088
3263
  }
3089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor, decorators: [{
3264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: HeaderInterceptor, decorators: [{
3090
3265
  type: Injectable
3091
3266
  }] });
3092
3267
 
@@ -3121,12 +3296,12 @@ class RefreshTokenInterceptor {
3121
3296
  return throwError(() => errors[0]);
3122
3297
  }));
3123
3298
  }
3124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RefreshTokenInterceptor, deps: [{ token: i1$2.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3125
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RefreshTokenInterceptor }); }
3299
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RefreshTokenInterceptor, deps: [{ token: i1$2.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3300
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RefreshTokenInterceptor }); }
3126
3301
  }
3127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RefreshTokenInterceptor, decorators: [{
3302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: RefreshTokenInterceptor, decorators: [{
3128
3303
  type: Injectable
3129
3304
  }], ctorParameters: () => [{ type: i1$2.Router }, { type: AuthService }] });
3130
3305
 
3131
- export { AppletContainerComponent, ApprovalDetailComponent, ApprovalListComponent, AuditDetailComponent, AuditListComponent, AuthGuard, AuthResolver, AuthService, ButtonGroupComponent, ButtonLoadingComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, CountryService, CurrencyService, FilterComponent, FormDateComponent, FormImagePickerComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, GridPaginationComponent, GridService, GridSnapshotComponent, HeaderInterceptor, ListPaginationContainerComponent, ListSnapshotContainerComponent, LoadingPage, ModalContainerComponent, PermissionDirective, PermissionGuard, PermissionModule, PermissionService, ProfileService, RefreshTokenInterceptor, TabContentComponent, TabGroupComponent, TabsComponentModule, UnauthorizedPage, bootstrap, getFormErrorMessage };
3306
+ export { AppletContainerComponent, ApprovalDetailComponent, ApprovalListComponent, AuditDetailComponent, AuditListComponent, AuthGuard, AuthResolver, AuthService, ButtonGroupComponent, ButtonLoadingComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, CountryService, CurrencyService, FilterComponent, FormCurrencyInputComponent, FormDateComponent, FormImagePickerComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, GridPaginationComponent, GridService, GridSnapshotComponent, HeaderInterceptor, ListPaginationContainerComponent, ListSnapshotContainerComponent, LoadingPage, ModalContainerComponent, PermissionDirective, PermissionGuard, PermissionModule, PermissionService, ProfileService, RefreshTokenInterceptor, TabContentComponent, TabGroupComponent, TabsComponentModule, UnauthorizedPage, bootstrap, getFormErrorMessage };
3132
3307
  //# sourceMappingURL=unipin-angular-applet.mjs.map