@unipin/angular-applet 17.3.0 → 17.4.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 (61) 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 +3 -3
  11. package/esm2022/lib/components/containers/colum-header-container/column-header-container.component.mjs +3 -3
  12. package/esm2022/lib/components/containers/column-container/column-container.component.mjs +3 -3
  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 +3 -3
  18. package/esm2022/lib/components/filter/filter.component.mjs +3 -3
  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 +11 -7
  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 +5 -5
  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 +9 -5
  32. package/esm2022/lib/components/grids/grid-snapshot/grid-snapshot.component.mjs +9 -5
  33. package/esm2022/lib/components/grids/services/grid.service.mjs +3 -3
  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 +3 -3
  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 +1465 -1313
  52. package/fesm2022/unipin-angular-applet.mjs.map +1 -1
  53. package/lib/components/containers/list-container/interfaces/list-container-config.interface.d.ts +2 -3
  54. package/lib/components/forms/currency-input/form-currency-input.component.d.ts +55 -0
  55. package/lib/components/forms/date/form-date.component.d.ts +1 -0
  56. package/lib/components/forms/index.d.ts +1 -0
  57. package/lib/components/index.d.ts +1 -1
  58. package/lib/services/currency/currency.service.d.ts +1 -1
  59. package/package.json +1 -1
  60. package/public-api.d.ts +1 -1
  61. package/src/assets/scss/select.scss +1 -1
@@ -12,9 +12,9 @@ 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.2.1", ngImport: i0, type: ButtonLoadingComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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 }); }
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 }); }
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ButtonLoadingComponent, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.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: "17.2.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\" [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: "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\" [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.2.1", ngImport: i0, type: ButtonGroupComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.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: "17.2.1", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
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' }); }
263
263
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PermissionService, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.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: "17.2.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"] }] }); }
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"] }] }); }
299
299
  }
300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LoadingPage, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.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: "17.2.1", type: PermissionDirective, selector: "[hasPermission]", inputs: { hasPermission: "hasPermission", hasPermissionScope: "hasPermissionScope", hasPermissionType: "hasPermissionType" }, ngImport: i0 }); }
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 }); }
333
333
  }
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PermissionDirective, decorators: [{
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.1", ngImport: i0, type: PermissionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
367
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: PermissionModule, declarations: [PermissionDirective], exports: [PermissionDirective] }); }
368
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: 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 }); }
369
369
  }
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PermissionModule, decorators: [{
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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.2.1", ngImpor
380
380
  }] });
381
381
 
382
382
  class UnauthorizedPage {
383
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UnauthorizedPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
384
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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"] }] }); }
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"] }] }); }
385
385
  }
386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UnauthorizedPage, decorators: [{
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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'
@@ -404,10 +404,10 @@ class AppletContainerComponent {
404
404
  }
405
405
  ngOnDestroy() { this.sub.unsubscribe(); }
406
406
  toggleSidenav() { this.isCollapsed = !this.isCollapsed; }
407
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", 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.2.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\">\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 }); }
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 }); }
409
409
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AppletContainerComponent, decorators: [{
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AppletContainerComponent, decorators: [{
411
411
  type: Component,
412
412
  args: [{ standalone: true, selector: 'up-applet-container', changeDetection: ChangeDetectionStrategy.OnPush, host: {
413
413
  class: 'd-flex h-100 w-100'
@@ -428,10 +428,10 @@ class LazyRouteDirective {
428
428
  ngOnInit() {
429
429
  this.loadRoute.loadComponent().then((m) => this.vcr.createComponent(m));
430
430
  }
431
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LazyRouteDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
432
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: LazyRouteDirective, isStandalone: true, selector: "[loadRoute]", inputs: { loadRoute: "loadRoute" }, ngImport: i0 }); }
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 }); }
433
433
  }
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LazyRouteDirective, decorators: [{
434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LazyRouteDirective, decorators: [{
435
435
  type: Directive,
436
436
  args: [{
437
437
  standalone: true,
@@ -485,10 +485,10 @@ class ColumnContainerComponent {
485
485
  this.areas[pos - 2].visible = true;
486
486
  }
487
487
  }
488
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", 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.2.1", 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"] }] }); }
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"] }] }); }
490
490
  }
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ColumnContainerComponent, decorators: [{
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnContainerComponent, decorators: [{
492
492
  type: Component,
493
493
  args: [{ standalone: true, selector: 'up-column-container', host: {
494
494
  class: 'd-block h-100 w-100'
@@ -501,10 +501,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
501
501
  }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }] });
502
502
 
503
503
  class ColumnHeaderContainerComponent {
504
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ColumnHeaderContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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>\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 }); }
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 }); }
506
506
  }
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ColumnHeaderContainerComponent, decorators: [{
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ColumnHeaderContainerComponent, decorators: [{
508
508
  type: Component,
509
509
  args: [{ standalone: true, selector: 'up-column-header-container', changeDetection: ChangeDetectionStrategy.OnPush, host: {
510
510
  class: 'd-flex flex-column h-100'
@@ -537,10 +537,10 @@ class ModalContainerComponent {
537
537
  close() {
538
538
  this.modalCtrl.dismiss();
539
539
  }
540
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ModalContainerComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component }); }
541
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", 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 }); }
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 }); }
542
542
  }
543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ModalContainerComponent, decorators: [{
543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ModalContainerComponent, decorators: [{
544
544
  type: Component,
545
545
  args: [{ standalone: true, selector: 'up-modal-container', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
546
546
  IonicModule
@@ -584,6 +584,7 @@ class FormDateComponent {
584
584
  this.presentation = 'date';
585
585
  this.isTouched = false;
586
586
  this.value = '';
587
+ this.localValue = '';
587
588
  this.dateFormat = 'dd LLL yyyy';
588
589
  this.onChange = (_val) => { };
589
590
  this.onTouched = () => { };
@@ -596,6 +597,9 @@ class FormDateComponent {
596
597
  registerOnTouched(fn) { this.onTouched = fn; }
597
598
  writeValue(val) {
598
599
  this.value = val;
600
+ let localTime = new Date(val);
601
+ localTime = new Date(localTime.getTime() - (localTime.getTimezoneOffset() * 60000));
602
+ this.localValue = localTime.toISOString();
599
603
  this.ch.markForCheck();
600
604
  }
601
605
  setDisabledState(d) {
@@ -612,14 +616,14 @@ class FormDateComponent {
612
616
  this.isTouched = true;
613
617
  }
614
618
  if (!this.disabled) {
615
- this.value = value;
619
+ this.value = this.localValue = value;
616
620
  this.ch.markForCheck();
617
621
  this.onChange(this.value);
618
622
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
619
623
  }
620
624
  }
621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormDateComponent, deps: [{ token: 'name', attribute: true }, { token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
622
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormDateComponent, isStandalone: true, selector: "up-date", inputs: { label: "label", required: "required", disabled: "disabled", presentation: "presentation" }, host: { classAttribute: "d-block position-relative" }, providers: [
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: [
623
627
  {
624
628
  multi: true,
625
629
  provide: NG_VALUE_ACCESSOR,
@@ -630,9 +634,9 @@ class FormDateComponent {
630
634
  provide: NG_VALIDATORS,
631
635
  useExisting: FormDateComponent
632
636
  }
633
- ], 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=\"{{ value }}\" [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", "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 }); }
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\" 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 }); }
634
638
  }
635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormDateComponent, decorators: [{
639
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormDateComponent, decorators: [{
636
640
  type: Component,
637
641
  args: [{ standalone: true, selector: 'up-date', changeDetection: ChangeDetectionStrategy.OnPush, host: {
638
642
  class: 'd-block position-relative'
@@ -650,7 +654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
650
654
  provide: NG_VALIDATORS,
651
655
  useExisting: FormDateComponent
652
656
  }
653
- ], 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=\"{{ value }}\" [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"] }]
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\" 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"] }]
654
658
  }], ctorParameters: () => [{ type: undefined, decorators: [{
655
659
  type: Attribute,
656
660
  args: ['name']
@@ -706,8 +710,8 @@ class FormInputComponent {
706
710
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
707
711
  }
708
712
  }
709
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.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 }); }
710
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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: [
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: [
711
715
  {
712
716
  multi: true,
713
717
  provide: NG_VALUE_ACCESSOR,
@@ -720,7 +724,7 @@ class FormInputComponent {
720
724
  }
721
725
  ], 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 }); }
722
726
  }
723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormInputComponent, decorators: [{
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormInputComponent, decorators: [{
724
728
  type: Component,
725
729
  args: [{ standalone: true, selector: 'up-input', changeDetection: ChangeDetectionStrategy.OnPush, host: {
726
730
  class: 'd-block'
@@ -781,10 +785,10 @@ class LocaleNumberPipe {
781
785
  }
782
786
  return seperators;
783
787
  }
784
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LocaleNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
785
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: LocaleNumberPipe, isStandalone: true, name: "localeNumber" }); }
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" }); }
786
790
  }
787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LocaleNumberPipe, decorators: [{
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LocaleNumberPipe, decorators: [{
788
792
  type: Pipe,
789
793
  args: [{
790
794
  standalone: true,
@@ -837,8 +841,8 @@ class FormNumberComponent {
837
841
  if (!/^\d$/.test(key))
838
842
  ev.preventDefault();
839
843
  }
840
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormNumberComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
841
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormNumberComponent, isStandalone: true, selector: "up-number", inputs: { label: "label", value: "value", required: "required", disabled: "disabled", locale: "locale" }, host: { classAttribute: "d-block" }, providers: [
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: [
842
846
  {
843
847
  multi: true,
844
848
  provide: NG_VALUE_ACCESSOR,
@@ -851,7 +855,7 @@ class FormNumberComponent {
851
855
  }
852
856
  ], 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 }); }
853
857
  }
854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormNumberComponent, decorators: [{
858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormNumberComponent, decorators: [{
855
859
  type: Component,
856
860
  args: [{ standalone: true, selector: 'up-number', changeDetection: ChangeDetectionStrategy.OnPush, host: {
857
861
  class: 'd-block'
@@ -925,8 +929,8 @@ class FormPasswordComponent {
925
929
  }
926
930
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
927
931
  }
928
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormPasswordComponent, deps: [{ token: 'label', attribute: true }, { token: 'autocomplete', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
929
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormPasswordComponent, isStandalone: true, selector: "up-password", inputs: { required: "required", mustSame: "mustSame" }, host: { classAttribute: "d-block position-relative" }, providers: [
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: [
930
934
  {
931
935
  multi: true,
932
936
  provide: NG_VALUE_ACCESSOR,
@@ -939,7 +943,7 @@ class FormPasswordComponent {
939
943
  }
940
944
  ], 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 }); }
941
945
  }
942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormPasswordComponent, decorators: [{
946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormPasswordComponent, decorators: [{
943
947
  type: Component,
944
948
  args: [{ standalone: true, selector: 'up-password', changeDetection: ChangeDetectionStrategy.OnPush, host: {
945
949
  class: 'd-block position-relative'
@@ -1028,8 +1032,8 @@ class FormSearchableSelectComponent {
1028
1032
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1029
1033
  }
1030
1034
  }
1031
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormSearchableSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1032
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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: [
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: [
1033
1037
  {
1034
1038
  multi: true,
1035
1039
  provide: NG_VALUE_ACCESSOR,
@@ -1040,9 +1044,9 @@ class FormSearchableSelectComponent {
1040
1044
  provide: NG_VALIDATORS,
1041
1045
  useExisting: FormSearchableSelectComponent
1042
1046
  }
1043
- ], 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 }); }
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: 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 }); }
1044
1048
  }
1045
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormSearchableSelectComponent, decorators: [{
1049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSearchableSelectComponent, decorators: [{
1046
1050
  type: Component,
1047
1051
  args: [{ standalone: true, selector: 'up-searchable-select', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1048
1052
  class: 'd-block'
@@ -1137,8 +1141,8 @@ class FormSelectComponent {
1137
1141
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1138
1142
  }
1139
1143
  }
1140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormSelectComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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: [
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: [
1142
1146
  {
1143
1147
  multi: true,
1144
1148
  provide: NG_VALUE_ACCESSOR,
@@ -1149,9 +1153,9 @@ class FormSelectComponent {
1149
1153
  provide: NG_VALIDATORS,
1150
1154
  useExisting: FormSelectComponent
1151
1155
  }
1152
- ], 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 }); }
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:38px;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:38px}.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 }); }
1153
1157
  }
1154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormSelectComponent, decorators: [{
1158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormSelectComponent, decorators: [{
1155
1159
  type: Component,
1156
1160
  args: [{ standalone: true, selector: 'up-select', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1157
1161
  class: 'd-block'
@@ -1170,7 +1174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
1170
1174
  provide: NG_VALIDATORS,
1171
1175
  useExisting: FormSelectComponent
1172
1176
  }
1173
- ], 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"] }]
1177
+ ], 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:38px;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:38px}.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"] }]
1174
1178
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1175
1179
  type: Attribute,
1176
1180
  args: ['placeholder']
@@ -1234,8 +1238,8 @@ class FormTextareaComponent {
1234
1238
  this.errorMsg = getFormErrorMessage(this.formControl.errors, this.label);
1235
1239
  }
1236
1240
  }
1237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.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 }); }
1238
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormTextareaComponent, isStandalone: true, selector: "up-textarea", inputs: { value: "value", required: "required", disabled: "disabled" }, host: { classAttribute: "d-block" }, providers: [
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: [
1239
1243
  {
1240
1244
  multi: true,
1241
1245
  provide: NG_VALUE_ACCESSOR,
@@ -1248,7 +1252,7 @@ class FormTextareaComponent {
1248
1252
  }
1249
1253
  ], 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 }); }
1250
1254
  }
1251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormTextareaComponent, decorators: [{
1255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormTextareaComponent, decorators: [{
1252
1256
  type: Component,
1253
1257
  args: [{ standalone: true, selector: 'up-textarea', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1254
1258
  class: 'd-block'
@@ -1306,10 +1310,10 @@ class DragNDropDirective {
1306
1310
  if (files.length > 0)
1307
1311
  this.fileDropped.emit(files);
1308
1312
  }
1309
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DragNDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1310
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: DragNDropDirective, isStandalone: true, selector: "[upDragNDrop]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0 }); }
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 }); }
1311
1315
  }
1312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: DragNDropDirective, decorators: [{
1316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DragNDropDirective, decorators: [{
1313
1317
  type: Directive,
1314
1318
  args: [{
1315
1319
  standalone: true,
@@ -1355,8 +1359,8 @@ class FormImagePickerComponent {
1355
1359
  this.onChange.emit(files[0]);
1356
1360
  }
1357
1361
  }
1358
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormImagePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1359
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: FormImagePickerComponent, isStandalone: true, selector: "up-image-picker", inputs: { ratio: "ratio", label: "label", required: "required" }, outputs: { onChange: "onChange" }, host: { classAttribute: "d-block" }, providers: [
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: [
1360
1364
  {
1361
1365
  multi: true,
1362
1366
  provide: NG_VALUE_ACCESSOR,
@@ -1364,7 +1368,7 @@ class FormImagePickerComponent {
1364
1368
  },
1365
1369
  ], 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 }); }
1366
1370
  }
1367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FormImagePickerComponent, decorators: [{
1371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormImagePickerComponent, decorators: [{
1368
1372
  type: Component,
1369
1373
  args: [{ standalone: true, selector: 'up-image-picker', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1370
1374
  class: 'd-block'
@@ -1389,757 +1393,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImpor
1389
1393
  type: Output
1390
1394
  }] } });
1391
1395
 
1392
- class FilterComponent {
1393
- constructor(placeholder, ch, popoverCtrl) {
1394
- this.placeholder = placeholder;
1395
- this.ch = ch;
1396
- this.popoverCtrl = popoverCtrl;
1397
- this.onSearch = new EventEmitter();
1398
- this.form = new FormGroup({});
1399
- this.activeFilter = [];
1400
- }
1401
- ngOnInit() {
1402
- this.config.fields.forEach(({ key, initialValue }) => {
1403
- if (typeof key === 'string')
1404
- this.createFormControl(key, initialValue);
1405
- else {
1406
- key.forEach((k, i) => this.createFormControl(k, initialValue?.at(i)));
1407
- }
1408
- });
1409
- }
1410
- close() { this.popoverCtrl.dismiss(); }
1411
- clear() {
1412
- this.resetValue();
1413
- this.form.reset();
1414
- this.onSearch.emit({ mode: this.config.mode, data: null });
1415
- }
1416
- removeFilter(i) {
1417
- this.form.controls[this.activeFilter[i].key].setValue('');
1418
- this.activeFilter.splice(i, 1);
1419
- this.emitValue();
1420
- }
1421
- search() {
1422
- this.resetValue();
1423
- this.emitValue((k, v) => this.activeFilter.push({ key: k, value: v, label: `${k}:${k.includes('date') ? formatDate(v, 'dd MMM yyyy', 'en-US') : v}` }));
1424
- this.close();
1425
- }
1426
- add() {
1427
- const { key, value } = this.getValue(this.searchBox.nativeElement.value);
1428
- if (this.config.fields.findIndex(({ key: k }) => k === key) === -1) {
1429
- this.searchBox.nativeElement.value = '';
1430
- return;
1431
- }
1432
- const i = this.activeFilter.findIndex(({ key: k }) => k === key);
1433
- if (i === -1)
1434
- this.activeFilter.push({ label: `${key}:${value}`, key, value });
1435
- else {
1436
- this.activeFilter[i].key = key;
1437
- this.activeFilter[i].value = value;
1438
- this.activeFilter[i].label = `${key}:${value}`;
1439
- }
1440
- this.form.patchValue({ [key]: value });
1441
- this.searchBox.nativeElement.value = '';
1442
- this.emitValue();
1443
- }
1444
- resetValue() {
1445
- this.activeFilter.length = 0;
1446
- this.searchBox.nativeElement.value = '';
1447
- }
1448
- getValue(value) {
1449
- const values = value.split(':');
1450
- if (values.length === 1)
1451
- return { key: this.config.fields[0].key, value: values[0] };
1452
- return { key: values[0], value: values[1] };
1453
- }
1454
- emitValue(extraAction) {
1455
- let flag = false;
1456
- const f = this.form.getRawValue();
1457
- const data = {};
1458
- Object.keys(f).forEach((k) => {
1459
- if (!f[k])
1460
- return;
1461
- flag = true;
1462
- data[k] = f[k];
1463
- extraAction?.(k, f[k]);
1464
- });
1465
- this.onSearch.emit({ mode: this.config.mode, data: flag ? data : null });
1466
- }
1467
- createFormControl(key, val) {
1468
- this.form.addControl(key, new FormControl(''));
1469
- if (val) {
1470
- this.form.controls[key].setValue(val);
1471
- this.activeFilter.push({ label: `${key}:${val}`, key, value: val });
1472
- }
1473
- }
1474
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterComponent, deps: [{ token: 'placeholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i1.PopoverController }], target: i0.ɵɵFactoryTarget.Component }); }
1475
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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: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 }); }
1476
- }
1477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FilterComponent, decorators: [{
1478
- type: Component,
1479
- args: [{ standalone: true, selector: 'up-filter', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1480
- class: 'd-block position-relative'
1481
- }, imports: [
1482
- IonicModule,
1483
- CommonModule,
1484
- FormDateComponent,
1485
- FormInputComponent,
1486
- ReactiveFormsModule,
1487
- FormSelectComponent,
1488
- FormSearchableSelectComponent
1489
- ], 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"] }]
1490
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1491
- type: Attribute,
1492
- args: ['placeholder']
1493
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.PopoverController }], propDecorators: { id: [{
1494
- type: Input,
1495
- args: [{ required: true }]
1496
- }], config: [{
1497
- type: Input,
1498
- args: [{ required: true }]
1499
- }], onSearch: [{
1500
- type: Output
1501
- }], searchBox: [{
1502
- type: ViewChild,
1503
- args: ['searchBox']
1504
- }] } });
1505
-
1506
- class GridService {
1507
- constructor() {
1508
- this.apis = {};
1509
- }
1510
- getApi(id) { return this.apis[id]; }
1511
- setApi(id, api) { this.apis[id] = api; }
1512
- refreshGridCache(id) {
1513
- this.apis[id].refreshInfiniteCache();
1514
- }
1515
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1516
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridService, providedIn: 'root' }); }
1517
- }
1518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridService, decorators: [{
1519
- type: Injectable,
1520
- args: [{
1521
- providedIn: 'root'
1522
- }]
1523
- }] });
1524
-
1525
- class GridSnapshotComponent {
1526
- constructor(service) {
1527
- this.service = service;
1528
- this.id = 'grid-s';
1529
- this.rowSelection = 'single';
1530
- this.onRowClick = new EventEmitter();
1531
- this.onGridReady = new EventEmitter();
1532
- this.onSelectionChanged = new EventEmitter();
1533
- this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
1534
- this.sort = { order: '', orderBy: '' };
1535
- ModuleRegistry.register(InfiniteRowModelModule);
1536
- }
1537
- ngOnInit() {
1538
- if (!this.config.rowPerPage)
1539
- this.config.rowPerPage = 50;
1540
- this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
1541
- }
1542
- ngOnDestroy() { this.subs?.unsubscribe(); }
1543
- clickRow(data) { this.onRowClick.emit(data.node); }
1544
- dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
1545
- changeSelected(data) { this.onSelectionChanged.emit(data); }
1546
- changePagination(ev) {
1547
- if (ev.newPageSize)
1548
- this.config.rowPerPage = this.gridApi.paginationGetPageSize();
1549
- }
1550
- setDatasource(ev) {
1551
- this.gridApi = ev.api;
1552
- this.onGridReady.emit(ev);
1553
- this.service.setApi(this.id, this.gridApi);
1554
- const state = JSON.parse(localStorage.getItem(this.id));
1555
- if (state)
1556
- ev.api.applyColumnState({ state, applyOrder: true });
1557
- this.reset();
1558
- }
1559
- reset() {
1560
- const datasource = {
1561
- getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
1562
- this.gridApi.showLoadingOverlay();
1563
- if (colId !== this.sort.orderBy || sort !== this.sort.order) {
1564
- this.sort.order = sort;
1565
- this.sort.orderBy = colId;
1566
- this.gridApi.paginationGoToFirstPage();
1567
- }
1568
- const page = this.gridApi.paginationGetCurrentPage();
1569
- if (page === 0)
1570
- this.after = null;
1571
- this.subs = this.config.getDataSnapshot(this.config.rowPerPage, colId, sort, this.after).subscribe({
1572
- next: ({ data, totalRecord }) => {
1573
- this.gridApi.hideOverlay();
1574
- const { edges, pageInfo } = data;
1575
- if (edges.length > 0)
1576
- this.after = pageInfo.endCursor;
1577
- if (page === 0) {
1578
- if (edges.length === 0)
1579
- this.gridApi.showNoRowsOverlay();
1580
- this.count = totalRecord;
1581
- }
1582
- if (!this.config.useTotalRecord && !pageInfo.hasNextPage) {
1583
- this.count = (page * this.config.rowPerPage) + edges.length;
1584
- }
1585
- successCallback(edges, this.count);
1586
- },
1587
- error: () => failCallback()
1588
- });
1589
- }
1590
- };
1591
- this.gridApi.setGridOption('datasource', datasource);
1592
- }
1593
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridSnapshotComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
1594
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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", "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", "cellFlashDelay", "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", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "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", "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 }); }
1595
- }
1596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridSnapshotComponent, decorators: [{
1597
- type: Component,
1598
- args: [{ standalone: true, selector: 'up-snapshot-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1599
- class: 'd-block h-100 w-100'
1600
- }, imports: [
1601
- AgGridModule
1602
- ], 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" }]
1603
- }], ctorParameters: () => [{ type: GridService }], propDecorators: { id: [{
1604
- type: Input
1605
- }], config: [{
1606
- type: Input,
1607
- args: [{ required: true }]
1608
- }], rowSelection: [{
1609
- type: Input
1610
- }], onRowClick: [{
1611
- type: Output
1612
- }], onGridReady: [{
1613
- type: Output
1614
- }], onSelectionChanged: [{
1615
- type: Output
1616
- }] } });
1617
-
1618
- class GridPaginationComponent {
1619
- constructor(service) {
1620
- this.service = service;
1621
- this.rowData = [];
1622
- this.id = 'grid-p';
1623
- this.rowModelType = 'infinite';
1624
- this.rowSelection = 'single';
1625
- this.onRowClick = new EventEmitter();
1626
- this.onGridReady = new EventEmitter();
1627
- this.onSelectionChanged = new EventEmitter();
1628
- this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
1629
- }
1630
- ngOnInit() {
1631
- ModuleRegistry.register(this.rowModelType === 'infinite' ? InfiniteRowModelModule : ClientSideRowModelModule);
1632
- if (!this.config.rowPerPage)
1633
- this.config.rowPerPage = 50;
1634
- this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
1635
- }
1636
- ngOnDestroy() { this.subs?.unsubscribe(); }
1637
- clickRow(data) { this.onRowClick.emit(data); }
1638
- dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
1639
- changeSelected(data) { this.onSelectionChanged.emit(data); }
1640
- changePagination(ev) {
1641
- if (ev.newPageSize)
1642
- this.config.rowPerPage = this.gridApi.paginationGetPageSize();
1643
- }
1644
- setDatasource(ev) {
1645
- this.gridApi = ev.api;
1646
- this.onGridReady.emit(ev);
1647
- this.service.setApi(this.id, this.gridApi);
1648
- const state = JSON.parse(localStorage.getItem(this.id));
1649
- if (state)
1650
- ev.api.applyColumnState({ state, applyOrder: true });
1651
- if (this.rowModelType === 'clientSide')
1652
- this.gridApi.setGridOption('rowData', this.rowData);
1653
- if (this.rowModelType !== 'infinite')
1654
- return;
1655
- this.reset();
1656
- }
1657
- reset() {
1658
- if (!this.gridApi)
1659
- return;
1660
- const datasource = {
1661
- getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
1662
- this.gridApi.showLoadingOverlay();
1663
- const offset = this.gridApi.paginationGetCurrentPage();
1664
- this.subs = this.config.getData(offset, this.config.rowPerPage, colId, sort).subscribe({
1665
- next: ({ data, totalRecord }) => {
1666
- this.gridApi.hideOverlay();
1667
- if (offset === 0) {
1668
- if (data.length === 0)
1669
- this.gridApi.showNoRowsOverlay();
1670
- this.count = totalRecord;
1671
- }
1672
- if (!this.config.useTotalRecord && data.length < this.config.rowPerPage) {
1673
- this.count = (offset * this.config.rowPerPage) + data.length;
1674
- }
1675
- successCallback(data, this.count);
1676
- },
1677
- error: () => failCallback()
1678
- });
1679
- }
1680
- };
1681
- this.gridApi?.setGridOption('datasource', datasource);
1682
- }
1683
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridPaginationComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
1684
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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", "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", "cellFlashDelay", "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", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "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", "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 }); }
1685
- }
1686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GridPaginationComponent, decorators: [{
1687
- type: Component,
1688
- args: [{ standalone: true, selector: 'up-pagination-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1689
- class: 'd-block h-100 w-100'
1690
- }, imports: [
1691
- AgGridModule
1692
- ], 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" }]
1693
- }], ctorParameters: () => [{ type: GridService }], propDecorators: { config: [{
1694
- type: Input,
1695
- args: [{ required: true }]
1696
- }], rowData: [{
1697
- type: Input
1698
- }], id: [{
1699
- type: Input
1700
- }], rowModelType: [{
1701
- type: Input
1702
- }], rowSelection: [{
1703
- type: Input
1704
- }], onRowClick: [{
1705
- type: Output
1706
- }], onGridReady: [{
1707
- type: Output
1708
- }], onSelectionChanged: [{
1709
- type: Output
1710
- }] } });
1711
-
1712
- class ListPaginationContainerComponent {
1713
- constructor(id, router) {
1714
- this.id = id;
1715
- this.router = router;
1716
- this.onRowClick = new EventEmitter();
1717
- this.onGridReady = new EventEmitter();
1718
- this.onSearch = new EventEmitter();
1719
- this.gridId = `grid-${this.id ?? 'p'}`;
1720
- }
1721
- openDetail(data) {
1722
- this.onRowClick.emit(data);
1723
- this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
1724
- }
1725
- setGridApi(ev) {
1726
- this.gridApi = ev.api;
1727
- this.onGridReady.emit(ev);
1728
- }
1729
- search(k) {
1730
- this.onSearch.emit(k);
1731
- this.gridApi.refreshInfiniteCache();
1732
- }
1733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListPaginationContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1734
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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\">\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"] }] }); }
1735
- }
1736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListPaginationContainerComponent, decorators: [{
1737
- type: Component,
1738
- args: [{ standalone: true, selector: 'up-list-pagination-container', host: {
1739
- class: 'd-flex flex-column h-100 w-100'
1740
- }, imports: [
1741
- IonicModule,
1742
- CommonModule,
1743
- RouterModule,
1744
- FilterComponent,
1745
- GridPaginationComponent
1746
- ], 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"] }]
1747
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1748
- type: Attribute,
1749
- args: ['id']
1750
- }] }, { type: i1$2.Router }], propDecorators: { header: [{
1751
- type: Input,
1752
- args: [{ required: true }]
1753
- }], config: [{
1754
- type: Input,
1755
- args: [{ required: true }]
1756
- }], onRowClick: [{
1757
- type: Output
1758
- }], onGridReady: [{
1759
- type: Output
1760
- }], onSearch: [{
1761
- type: Output
1762
- }] } });
1763
-
1764
- class ListSnapshotContainerComponent {
1765
- constructor(id, router) {
1766
- this.id = id;
1767
- this.router = router;
1768
- this.onRowClick = new EventEmitter();
1769
- this.onGridReady = new EventEmitter();
1770
- this.onSearch = new EventEmitter();
1771
- this.gridId = `grid-${this.id ?? 'p'}`;
1772
- }
1773
- openDetail(data) {
1774
- this.onRowClick.emit(data);
1775
- this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
1776
- }
1777
- setGridApi(ev) {
1778
- this.gridApi = ev.api;
1779
- this.onGridReady.emit(ev);
1780
- }
1781
- search(k) {
1782
- this.onSearch.emit(k);
1783
- this.gridApi.paginationGoToFirstPage();
1784
- this.gridApi.purgeInfiniteCache();
1785
- }
1786
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListSnapshotContainerComponent, deps: [{ token: 'id', attribute: true }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1787
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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\">\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"] }] }); }
1788
- }
1789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListSnapshotContainerComponent, decorators: [{
1790
- type: Component,
1791
- args: [{ standalone: true, selector: 'up-list-snapshot-container', host: {
1792
- class: 'd-flex flex-column h-100 w-100'
1793
- }, imports: [
1794
- IonicModule,
1795
- CommonModule,
1796
- RouterModule,
1797
- FilterComponent,
1798
- GridSnapshotComponent
1799
- ], 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"] }]
1800
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1801
- type: Attribute,
1802
- args: ['id']
1803
- }] }, { type: i1$2.Router }], propDecorators: { header: [{
1804
- type: Input,
1805
- args: [{ required: true }]
1806
- }], config: [{
1807
- type: Input,
1808
- args: [{ required: true }]
1809
- }], onRowClick: [{
1810
- type: Output
1811
- }], onGridReady: [{
1812
- type: Output
1813
- }], onSearch: [{
1814
- type: Output
1815
- }] } });
1816
-
1817
- class TabContentComponent {
1818
- constructor(fragment, ch) {
1819
- this.fragment = fragment;
1820
- this.ch = ch;
1821
- this.isActive = false;
1822
- }
1823
- toggleVisibility(s = true) {
1824
- this.isActive = s;
1825
- this.ch.markForCheck();
1826
- }
1827
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabContentComponent, deps: [{ token: 'fragment', attribute: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1828
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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 }); }
1829
- }
1830
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabContentComponent, decorators: [{
1831
- type: Component,
1832
- args: [{ selector: 'up-tab-content', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1833
- class: 'overflow-auto'
1834
- }, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n" }]
1835
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1836
- type: Attribute,
1837
- args: ['fragment']
1838
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { isActive: [{
1839
- type: HostBinding,
1840
- args: ['class.flex-grow-1']
1841
- }], header: [{
1842
- type: Input,
1843
- args: [{ required: true }]
1844
- }] } });
1845
-
1846
- class TabGroupComponent {
1847
- constructor(router, activeRoute) {
1848
- this.router = router;
1849
- this.activeRoute = activeRoute;
1850
- this.onChange = new EventEmitter();
1851
- this.tabs = [];
1852
- }
1853
- ngAfterContentInit() {
1854
- this.content.forEach(({ header, fragment }) => this.tabs.push({ fragment, label: header }));
1855
- this.changeTab(this.activeRoute.snapshot.fragment);
1856
- }
1857
- changeTab(f) {
1858
- this.onChange.emit(f);
1859
- this.router.navigate([], { relativeTo: this.activeRoute, fragment: f || undefined, replaceUrl: true });
1860
- let found = false;
1861
- this.content.forEach((tab) => {
1862
- if (tab.fragment !== f)
1863
- tab.toggleVisibility(false);
1864
- else {
1865
- found = true;
1866
- this.activeFragment = f;
1867
- tab.toggleVisibility(true);
1868
- }
1869
- });
1870
- if (!found) {
1871
- this.content.get(0).toggleVisibility(true);
1872
- this.activeFragment = this.content.get(0).fragment;
1873
- }
1874
- }
1875
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabGroupComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
1876
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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 }); }
1877
- }
1878
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabGroupComponent, decorators: [{
1879
- type: Component,
1880
- args: [{ selector: 'up-tab-group', changeDetection: ChangeDetectionStrategy.OnPush, host: {
1881
- class: 'd-flex flex-column'
1882
- }, 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"] }]
1883
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { onChange: [{
1884
- type: Output
1885
- }], content: [{
1886
- type: ContentChildren,
1887
- args: [TabContentComponent, { descendants: true }]
1888
- }] } });
1889
-
1890
- class TabsComponentModule {
1891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1892
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: TabsComponentModule, declarations: [TabGroupComponent,
1893
- TabContentComponent], imports: [IonicModule,
1894
- CommonModule], exports: [TabGroupComponent,
1895
- TabContentComponent] }); }
1896
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabsComponentModule, imports: [IonicModule,
1897
- CommonModule] }); }
1898
- }
1899
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TabsComponentModule, decorators: [{
1900
- type: NgModule,
1901
- args: [{
1902
- imports: [
1903
- IonicModule,
1904
- CommonModule,
1905
- ],
1906
- declarations: [
1907
- TabGroupComponent,
1908
- TabContentComponent
1909
- ],
1910
- exports: [
1911
- TabGroupComponent,
1912
- TabContentComponent
1913
- ]
1914
- }]
1915
- }] });
1916
-
1917
- class AuditService {
1918
- constructor(apollo) {
1919
- this.apollo = apollo;
1920
- this.baseAttr = `
1921
- action
1922
- createdAt
1923
- description
1924
- function
1925
- guid
1926
- msSource
1927
- sourceIp
1928
- user {
1929
- name
1930
- sourcePlatform
1931
- status
1932
- appLoginPrincipal {
1933
- principalType
1934
- principalId
1935
- }
1936
- }
1937
- `;
1938
- }
1939
- query(input, extraAttr = '') {
1940
- return this.apollo.query({
1941
- variables: { input },
1942
- query: gql `
1943
- query QueryAudit($input: AuditTrailCriteria!) {
1944
- auditMsAuditTrail(input: $input) {
1945
- ${this.baseAttr}
1946
- ${extraAttr}
1947
- }
1948
- }
1949
- `
1950
- });
1951
- }
1952
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
1953
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditService, providedIn: 'root' }); }
1954
- }
1955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditService, decorators: [{
1956
- type: Injectable,
1957
- args: [{
1958
- providedIn: 'root'
1959
- }]
1960
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1961
-
1962
- class AuditListComponent {
1963
- constructor(id, url, router, service) {
1964
- this.id = id;
1965
- this.url = url;
1966
- this.router = router;
1967
- this.service = service;
1968
- this.filterConfig = { mode: 'simple', fields: [{ key: 'description', label: '', type: 'text' }] };
1969
- this.gridConfig = {
1970
- useTotalRecord: false,
1971
- noRowText: 'Audit not found',
1972
- colDefs: [
1973
- { headerName: 'User', field: 'user.name', sortable: false },
1974
- { headerName: 'Description', field: 'description', minWidth: 350, sortable: false },
1975
- { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
1976
- ],
1977
- getData: (page, pageSize, sortBy, dir) => {
1978
- if (!this.criteria.tagValues)
1979
- return of({ data: [] });
1980
- this.criteria.page = page;
1981
- this.criteria.sortBy = sortBy;
1982
- this.criteria.pageSize = pageSize;
1983
- this.criteria.sortDirection = dir;
1984
- return this.service.query(this.criteria).pipe(map(({ data: { auditMsAuditTrail: data } }) => ({ data })));
1985
- },
1986
- };
1987
- this.criteria = { sortBy: 'createdAt', sortDirection: 'desc', page: 0, pageSize: 50 };
1988
- }
1989
- ngOnChanges(e) {
1990
- if (e['tagKeys'])
1991
- this.criteria.tagKeys = this.tagKeys;
1992
- if (e['relatedEntities'])
1993
- this.criteria.relatedEntities = this.relatedEntities;
1994
- }
1995
- setGridApi({ api }) { this.gridApi = api; }
1996
- rowClicked({ guid }) {
1997
- this.router.navigate([`${this.url}/${this.criteria.tagValues[0]}/audit/${guid}`], { preserveFragment: true });
1998
- }
1999
- search({ data }) {
2000
- this.criteria.description = data?.description;
2001
- this.gridComponent.reset();
2002
- }
2003
- setGuid(guid) {
2004
- this.criteria.description = null;
2005
- this.criteria.tagValues = [guid];
2006
- this.gridComponent.reset();
2007
- }
2008
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditListComponent, deps: [{ token: 'id', attribute: true }, { token: 'mainUrl', attribute: true }, { token: i1$2.Router }, { token: AuditService }], target: i0.ɵɵFactoryTarget.Component }); }
2009
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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"] }] }); }
2010
- }
2011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditListComponent, decorators: [{
2012
- type: Component,
2013
- args: [{ standalone: true, selector: 'up-audit-list', host: {
2014
- class: 'd-flex flex-column h-100'
2015
- }, imports: [
2016
- FilterComponent,
2017
- GridPaginationComponent
2018
- ], 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" }]
2019
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2020
- type: Attribute,
2021
- args: ['id']
2022
- }] }, { type: undefined, decorators: [{
2023
- type: Attribute,
2024
- args: ['mainUrl']
2025
- }] }, { type: i1$2.Router }, { type: AuditService }], propDecorators: { relatedEntities: [{
2026
- type: Input,
2027
- args: [{ required: true }]
2028
- }], tagKeys: [{
2029
- type: Input
2030
- }], gridComponent: [{
2031
- type: ViewChild,
2032
- args: [GridPaginationComponent]
2033
- }] } });
2034
-
2035
- class AuditDetailComponent {
2036
- constructor(fb, service, route, navCtrl) {
2037
- this.fb = fb;
2038
- this.service = service;
2039
- this.route = route;
2040
- this.navCtrl = navCtrl;
2041
- this.gridConfig = {
2042
- useTotalRecord: false,
2043
- colDefs: [
2044
- { headerName: 'Attribute Name', field: 'attribute', sort: 'asc' },
2045
- { headerName: 'Old Value', field: 'oldData' },
2046
- { headerName: 'New Value', field: 'newData' }
2047
- ]
2048
- };
2049
- this.form = this.fb.group({
2050
- guid: new FormControl({ value: null, disabled: true }),
2051
- action: new FormControl({ value: null, disabled: true }),
2052
- description: new FormControl({ value: null, disabled: true }),
2053
- userName: new FormControl({ value: null, disabled: true }),
2054
- sourceIp: new FormControl({ value: null, disabled: true }),
2055
- createdAt: new FormControl({ value: null, disabled: true }),
2056
- msSource: new FormControl({ value: null, disabled: true }),
2057
- sourcePlatform: new FormControl({ value: null, disabled: true }),
2058
- function: new FormControl({ value: null, disabled: true }),
2059
- });
2060
- this.isLoading = true;
2061
- this.guid = '';
2062
- }
2063
- ngOnDestroy() { this.sub?.unsubscribe(); }
2064
- setGridApi({ api }) {
2065
- this.gridApi = api;
2066
- this.getData();
2067
- }
2068
- isIsoDateString(str) {
2069
- const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$/;
2070
- return regex.test(str);
2071
- }
2072
- formatData(value) {
2073
- if (value === null)
2074
- return value;
2075
- if (typeof value === 'object')
2076
- return JSON.stringify(value);
2077
- if (this.isIsoDateString(value))
2078
- return formatDate(value, 'dd MMM yyyy HH:mm', 'en-US');
2079
- return value;
2080
- }
2081
- getData() {
2082
- const newGuid = this.route.children[0].snapshot.params['audit'];
2083
- if (!newGuid || this.guid === newGuid)
2084
- return;
2085
- this.sub?.unsubscribe();
2086
- this.gridApi?.showLoadingOverlay();
2087
- this.guid = newGuid;
2088
- this.isLoading = true;
2089
- this.sub = this.service.query({ guid: this.guid }, 'data tags { tagKey tagValue }').subscribe({
2090
- next: ({ data: { auditMsAuditTrail: data } }) => {
2091
- this.gridApi?.hideOverlay();
2092
- if (data.length !== 1) {
2093
- this.navCtrl.back();
2094
- return;
2095
- }
2096
- const { guid, action, description, function: func, msSource, sourceIp, createdAt } = data[0];
2097
- this.form.patchValue({
2098
- guid,
2099
- function: func,
2100
- msSource, sourceIp,
2101
- action, description,
2102
- userName: data[0].user?.name,
2103
- sourcePlatform: data[0].user?.sourcePlatform,
2104
- createdAt: formatDate(createdAt, 'dd MMM yyyy HH:mm', 'en-US'),
2105
- });
2106
- this.isLoading = false;
2107
- this.getChangedData(data[0].data);
2108
- },
2109
- error: () => this.navCtrl.back()
2110
- });
2111
- }
2112
- getChangedData({ oldData, newData }) {
2113
- if (!newData || Array.isArray(JSON.parse(newData))) {
2114
- this.gridApi.setGridOption('rowData', []);
2115
- return;
2116
- }
2117
- const objNewData = JSON.parse(newData);
2118
- const changedData = Object.entries(oldData ? JSON.parse(oldData) : JSON.parse(newData))
2119
- .filter(([key, oldVal]) => JSON.stringify(oldData ? oldVal : null) !== JSON.stringify(objNewData[key]) && !key.match(/update|created/))
2120
- .map(([key, oldVal]) => ({
2121
- attribute: key,
2122
- oldData: oldData ? this.formatData(oldVal) : null,
2123
- newData: this.formatData(objNewData[key])
2124
- }));
2125
- this.gridApi.setGridOption('rowData', changedData);
2126
- }
2127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditDetailComponent, deps: [{ token: i1$3.FormBuilder }, { token: AuditService }, { token: i1$2.ActivatedRoute }, { token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
2128
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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: 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"] }] }); }
2129
- }
2130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuditDetailComponent, decorators: [{
2131
- type: Component,
2132
- args: [{ standalone: true, selector: 'up-audit-detail', imports: [
2133
- CommonModule,
2134
- IonicModule,
2135
- GridPaginationComponent,
2136
- TabsComponentModule,
2137
- FormInputComponent,
2138
- FormTextareaComponent,
2139
- ReactiveFormsModule
2140
- ], 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"] }]
2141
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: AuditService }, { type: i1$2.ActivatedRoute }, { type: i1.NavController }] });
2142
-
2143
1396
  var AlertTypeEnum;
2144
1397
  (function (AlertTypeEnum) {
2145
1398
  AlertTypeEnum["PasswordReset"] = "PASSWORD_RESET";
@@ -2401,573 +1654,1472 @@ var VoucherGroupType;
2401
1654
  VoucherGroupType["Import"] = "IMPORT";
2402
1655
  })(VoucherGroupType || (VoucherGroupType = {}));
2403
1656
 
2404
- class ApprovalService {
1657
+ class ProfileService {
1658
+ constructor(apollo) {
1659
+ this.apollo = apollo;
1660
+ }
1661
+ getMyProfile(fetchPolicy) {
1662
+ return this.apollo.query({
1663
+ fetchPolicy,
1664
+ errorPolicy: 'all',
1665
+ query: gql `
1666
+ query getMyProfile {
1667
+ authMsMyProfile {
1668
+ appLoginPrincipal {
1669
+ principalId
1670
+ principalType
1671
+ }
1672
+ appLoginExt {
1673
+ paramCode
1674
+ paramType
1675
+ file {
1676
+ publicUrl
1677
+ }
1678
+ }
1679
+ birthday
1680
+ category
1681
+ company {
1682
+ code
1683
+ guid
1684
+ isInternal
1685
+ name
1686
+ status
1687
+ }
1688
+ gender
1689
+ guid
1690
+ merchants {
1691
+ guid
1692
+ name
1693
+ status
1694
+ }
1695
+ name
1696
+ status
1697
+ }
1698
+ }
1699
+ `,
1700
+ }).pipe(map(({ data: { authMsMyProfile } }) => {
1701
+ if (!authMsMyProfile)
1702
+ return null;
1703
+ return authMsMyProfile;
1704
+ }));
1705
+ }
1706
+ 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 }); }
1707
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
1708
+ }
1709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProfileService, decorators: [{
1710
+ type: Injectable,
1711
+ args: [{
1712
+ providedIn: 'root'
1713
+ }]
1714
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1715
+
1716
+ class AuthService {
1717
+ static { this.authToken = ''; }
1718
+ static { this.refreshToken = ''; }
1719
+ constructor(apollo, profileService) {
1720
+ this.apollo = apollo;
1721
+ this.profileService = profileService;
1722
+ }
1723
+ login(input) {
1724
+ return this.apollo.mutate({
1725
+ variables: { input },
1726
+ mutation: gql `
1727
+ mutation Login($input: LoginRq!) {
1728
+ authMsLogin(input: $input) {
1729
+ accessToken
1730
+ refreshToken
1731
+ suggestedAction
1732
+ user {
1733
+ birthday
1734
+ category
1735
+ email
1736
+ gender
1737
+ guid
1738
+ mobileNumber
1739
+ name
1740
+ status
1741
+ }
1742
+ }
1743
+ }
1744
+ `
1745
+ }).pipe(tap(({ data }) => {
1746
+ if (data?.authMsLogin) {
1747
+ const { accessToken, user, refreshToken } = data.authMsLogin;
1748
+ this.user = user;
1749
+ this.user.photo = '/assets/imgs/profile.svg';
1750
+ AuthService.authToken = accessToken ?? '';
1751
+ AuthService.refreshToken = refreshToken ?? '';
1752
+ localStorage.setItem('userGuid', this.user.guid);
1753
+ localStorage.setItem('authToken', AuthService.authToken);
1754
+ localStorage.setItem('refreshToken', AuthService.refreshToken);
1755
+ }
1756
+ }));
1757
+ }
1758
+ refreshToken(variables) {
1759
+ return this.apollo.mutate({
1760
+ context: {
1761
+ headers: {
1762
+ 'operation-type': 'Mutation',
1763
+ 'operation-name': 'RefreshToken'
1764
+ }
1765
+ },
1766
+ variables,
1767
+ mutation: gql `
1768
+ mutation RefreshToken($refreshToken: String!) {
1769
+ authMsRefreshAccessToken(refreshToken: $refreshToken) {
1770
+ accessToken
1771
+ refreshToken
1772
+ }
1773
+ }
1774
+ `
1775
+ });
1776
+ }
1777
+ getProfile(fetchPolicy) {
1778
+ return this.profileService.getMyProfile(fetchPolicy).pipe(tap((user) => {
1779
+ if (!user)
1780
+ return;
1781
+ this.user = { ...user, photo: '/assets/imgs/profile.svg' };
1782
+ user.appLoginExt?.forEach(({ paramCode, file: { publicUrl } }) => {
1783
+ if (paramCode === 'USER_PROFILE_PHOTO')
1784
+ this.user.photo = publicUrl;
1785
+ });
1786
+ user.appLoginPrincipal?.forEach(({ principalId, principalType }) => {
1787
+ if (principalType === 'EMAIL_USERNAME')
1788
+ this.user.email = principalId;
1789
+ });
1790
+ }));
1791
+ }
1792
+ initForgotPassword(email) {
1793
+ return this.apollo.mutate({
1794
+ variables: {
1795
+ input: {
1796
+ email,
1797
+ sourcePlatform: SourcePlatform.Admin
1798
+ }
1799
+ },
1800
+ mutation: gql `
1801
+ mutation InitForgotPassword($input: ForgotPassOtpRq!) {
1802
+ authMsForgotPasswordOtp(input: $input)
1803
+ }
1804
+ `
1805
+ });
1806
+ }
1807
+ createNewPassword({ newPassword, principalId, sourcePlatform, verifCode }) {
1808
+ return this.apollo.mutate({
1809
+ mutation: gql `
1810
+ mutation SubmitForgotPassword($input: ForgotPassRq!) {
1811
+ authMsForgotPassword(input: $input)
1812
+ }
1813
+ `,
1814
+ variables: {
1815
+ input: {
1816
+ newPassword,
1817
+ principalId,
1818
+ sourcePlatform,
1819
+ verifCode
1820
+ }
1821
+ }
1822
+ });
1823
+ }
1824
+ updatePassword(input) {
1825
+ return this.apollo.mutate({
1826
+ mutation: gql `
1827
+ mutation ChangePassword($input: ChangePassRq!) {
1828
+ authMsChangePassword(input: $input)
1829
+ }
1830
+ `,
1831
+ variables: { input }
1832
+ });
1833
+ }
1834
+ 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 }); }
1835
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthService, providedIn: 'root' }); }
1836
+ }
1837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthService, decorators: [{
1838
+ type: Injectable,
1839
+ args: [{
1840
+ providedIn: 'root'
1841
+ }]
1842
+ }], ctorParameters: () => [{ type: i1$1.Apollo }, { type: ProfileService }] });
1843
+
1844
+ class CurrencyService {
1845
+ constructor(apollo) {
1846
+ this.apollo = apollo;
1847
+ }
1848
+ query(keyword = '') {
1849
+ const input = { page: 0, pageSize: 300, sortBy: 'name', sortDirection: 'asc' };
1850
+ if (keyword !== '')
1851
+ input.name = keyword;
1852
+ return this.apollo.query({
1853
+ errorPolicy: 'all',
1854
+ variables: { input },
1855
+ query: gql `
1856
+ query QueryCurrency($input: CurrencyQueryCriteria!) {
1857
+ webConfigMsCurrency(input: $input) {
1858
+ data {
1859
+ code
1860
+ guid
1861
+ magnifyValue
1862
+ name
1863
+ status
1864
+ }
1865
+ }
1866
+ }
1867
+ `,
1868
+ });
1869
+ }
1870
+ 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 }); }
1871
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
1872
+ }
1873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CurrencyService, decorators: [{
1874
+ type: Injectable,
1875
+ args: [{
1876
+ providedIn: 'root'
1877
+ }]
1878
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1879
+
1880
+ class CountryService {
1881
+ constructor(apollo) {
1882
+ this.apollo = apollo;
1883
+ }
1884
+ query() {
1885
+ return this.apollo.query({
1886
+ errorPolicy: 'all',
1887
+ variables: {
1888
+ input: {
1889
+ page: 0,
1890
+ pageSize: 300,
1891
+ sortBy: 'name',
1892
+ sortDirection: 'asc'
1893
+ }
1894
+ },
1895
+ query: gql `
1896
+ query QueryCountry($input: CountryQueryCriteria!) {
1897
+ webConfigMsCountry(input: $input) {
1898
+ data {
1899
+ code
1900
+ defaultLangCode
1901
+ guid
1902
+ langCodes {
1903
+ code
1904
+ guid
1905
+ }
1906
+ name
1907
+ phoneCodes {
1908
+ code
1909
+ }
1910
+ }
1911
+ }
1912
+ }
1913
+ `,
1914
+ });
1915
+ }
1916
+ 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 }); }
1917
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CountryService, providedIn: 'root' }); }
1918
+ }
1919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CountryService, decorators: [{
1920
+ type: Injectable,
1921
+ args: [{
1922
+ providedIn: 'root'
1923
+ }]
1924
+ }], ctorParameters: () => [{ type: i1$1.Apollo }] });
1925
+
1926
+ class FormCurrencyInputComponent {
1927
+ constructor(numberPlaceholder, ch, currencyService) {
1928
+ this.numberPlaceholder = numberPlaceholder;
1929
+ this.ch = ch;
1930
+ this.currencyService = currencyService;
1931
+ this.clearable = true;
1932
+ this.isInputNumber = false;
1933
+ this.initialItems = [];
1934
+ this.numberValue = null;
1935
+ this.isNumberDisabled = false;
1936
+ this.required = false;
1937
+ this.disabled = false;
1938
+ this.bindLabel = 'label';
1939
+ this.bindValue = 'value';
1940
+ this.onChange = new EventEmitter();
1941
+ this.typeahead = new Subject();
1942
+ 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));
1943
+ this.items$ = this.query$;
1944
+ this.isLoading = false;
1945
+ this.isTouched = false;
1946
+ this.value = null;
1947
+ this.decimalLimiter = 0;
1948
+ this.changed = (_val) => { };
1949
+ this.onTouched = () => { };
1950
+ }
1951
+ ngOnChanges(changes) {
1952
+ if (changes['initialItems']) {
1953
+ this.items$ = concat(of(this.initialItems), this.query$);
1954
+ this.decimalLimiter = this.initialItems[0]?.magnifyValue === 1 ? 0 : Math.floor(Math.log10(this.initialItems[0]?.magnifyValue ?? 1));
1955
+ this.numberValue = this.numberValue / this.initialItems[0]?.magnifyValue;
1956
+ }
1957
+ if (this.isInputNumber)
1958
+ this.bindLabel = 'value';
1959
+ }
1960
+ registerOnChange(fn) { this.changed = fn; }
1961
+ registerOnTouched(fn) { this.onTouched = fn; }
1962
+ writeValue(val) {
1963
+ this.value = val;
1964
+ this.ch.markForCheck();
1965
+ }
1966
+ setDisabledState(d) {
1967
+ this.disabled = d;
1968
+ this.ch.markForCheck();
1969
+ }
1970
+ validate(control) {
1971
+ this.formControl = control;
1972
+ return null;
1973
+ }
1974
+ change(e) {
1975
+ if (this.isInputNumber)
1976
+ this.numberValue = null;
1977
+ this.onChange.emit({ ccy: e, number: this.numberValue });
1978
+ this.initialItems = e;
1979
+ if (!this.isTouched) {
1980
+ this.onTouched();
1981
+ this.isTouched = true;
1982
+ }
1983
+ if (!this.disabled) {
1984
+ if (!e)
1985
+ this.value = null;
1986
+ else
1987
+ this.value = e[this.bindValue];
1988
+ this.changed(this.value);
1989
+ this.errorMsg = getFormErrorMessage(this.formControl.errors, 'Currency');
1990
+ }
1991
+ if (e?.magnifyValue === 1)
1992
+ this.decimalLimiter = 0;
1993
+ else
1994
+ this.decimalLimiter = Math.floor(Math.log10(e?.magnifyValue));
1995
+ }
1996
+ numberInput({ value }) {
1997
+ this.numberValue = value;
1998
+ this.onChange.emit({ ccy: this.initialItems, number: value });
1999
+ }
2000
+ limitDecimal({ charCode, preventDefault, target: { value } }) {
2001
+ const reg = this.decimalLimiter > 0 ? new RegExp(`^\\d*(\\.\\d{0,${this.decimalLimiter}})?$`) : /^\d+$/;
2002
+ if (!reg.test(value + String.fromCharCode(charCode)))
2003
+ preventDefault();
2004
+ }
2005
+ queryFunc(keyword) {
2006
+ return this.currencyService.query(keyword).pipe(map(({ data: { webConfigMsCurrency: { data } } }) => data.map(({ code, name, magnifyValue }) => ({ label: `[${code}] ${name}`, value: code, magnifyValue }))));
2007
+ }
2008
+ ;
2009
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormCurrencyInputComponent, deps: [{ token: 'numberPlaceholder', attribute: true }, { token: i0.ChangeDetectorRef }, { token: CurrencyService }], target: i0.ɵɵFactoryTarget.Component }); }
2010
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", 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: [
2011
+ {
2012
+ multi: true,
2013
+ provide: NG_VALUE_ACCESSOR,
2014
+ useExisting: FormCurrencyInputComponent
2015
+ },
2016
+ {
2017
+ multi: true,
2018
+ provide: NG_VALIDATORS,
2019
+ useExisting: FormCurrencyInputComponent
2020
+ }
2021
+ ], 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 }); }
2022
+ }
2023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FormCurrencyInputComponent, decorators: [{
2024
+ type: Component,
2025
+ args: [{ standalone: true, selector: 'up-currency-input', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2026
+ class: 'd-block'
2027
+ }, imports: [
2028
+ CommonModule,
2029
+ FormsModule,
2030
+ NgSelectModule
2031
+ ], providers: [
2032
+ {
2033
+ multi: true,
2034
+ provide: NG_VALUE_ACCESSOR,
2035
+ useExisting: FormCurrencyInputComponent
2036
+ },
2037
+ {
2038
+ multi: true,
2039
+ provide: NG_VALIDATORS,
2040
+ useExisting: FormCurrencyInputComponent
2041
+ }
2042
+ ], 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"] }]
2043
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2044
+ type: Attribute,
2045
+ args: ['numberPlaceholder']
2046
+ }] }, { type: i0.ChangeDetectorRef }, { type: CurrencyService }], propDecorators: { clearable: [{
2047
+ type: Input
2048
+ }], isInputNumber: [{
2049
+ type: Input
2050
+ }], initialItems: [{
2051
+ type: Input
2052
+ }], numberValue: [{
2053
+ type: Input
2054
+ }], isNumberDisabled: [{
2055
+ type: Input
2056
+ }], required: [{
2057
+ type: Input
2058
+ }], disabled: [{
2059
+ type: Input
2060
+ }], bindLabel: [{
2061
+ type: Input
2062
+ }], bindValue: [{
2063
+ type: Input
2064
+ }], onChange: [{
2065
+ type: Output
2066
+ }] } });
2067
+
2068
+ class FilterComponent {
2069
+ constructor(placeholder, ch, popoverCtrl) {
2070
+ this.placeholder = placeholder;
2071
+ this.ch = ch;
2072
+ this.popoverCtrl = popoverCtrl;
2073
+ this.onSearch = new EventEmitter();
2074
+ this.form = new FormGroup({});
2075
+ this.activeFilter = [];
2076
+ }
2077
+ ngOnInit() {
2078
+ this.config.fields.forEach(({ key, initialValue }) => {
2079
+ if (typeof key === 'string')
2080
+ this.createFormControl(key, initialValue);
2081
+ else {
2082
+ key.forEach((k, i) => this.createFormControl(k, initialValue?.at(i)));
2083
+ }
2084
+ });
2085
+ }
2086
+ close() { this.popoverCtrl.dismiss(); }
2087
+ clear() {
2088
+ this.resetValue();
2089
+ this.form.reset();
2090
+ this.onSearch.emit({ mode: this.config.mode, data: null });
2091
+ }
2092
+ removeFilter(i) {
2093
+ this.form.controls[this.activeFilter[i].key].setValue('');
2094
+ this.activeFilter.splice(i, 1);
2095
+ this.emitValue();
2096
+ }
2097
+ search() {
2098
+ this.resetValue();
2099
+ this.emitValue((k, v) => this.activeFilter.push({ key: k, value: v, label: `${k}:${k.includes('date') ? formatDate(v, 'dd MMM yyyy', 'en-US') : v}` }));
2100
+ this.close();
2101
+ }
2102
+ add() {
2103
+ const { key, value } = this.getValue(this.searchBox.nativeElement.value);
2104
+ if (this.config.fields.findIndex(({ key: k }) => k === key) === -1) {
2105
+ this.searchBox.nativeElement.value = '';
2106
+ return;
2107
+ }
2108
+ const i = this.activeFilter.findIndex(({ key: k }) => k === key);
2109
+ if (i === -1)
2110
+ this.activeFilter.push({ label: `${key}:${value}`, key, value });
2111
+ else {
2112
+ this.activeFilter[i].key = key;
2113
+ this.activeFilter[i].value = value;
2114
+ this.activeFilter[i].label = `${key}:${value}`;
2115
+ }
2116
+ this.form.patchValue({ [key]: value });
2117
+ this.searchBox.nativeElement.value = '';
2118
+ this.emitValue();
2119
+ }
2120
+ resetValue() {
2121
+ this.activeFilter.length = 0;
2122
+ this.searchBox.nativeElement.value = '';
2123
+ }
2124
+ getValue(value) {
2125
+ const values = value.split(':');
2126
+ if (values.length === 1)
2127
+ return { key: this.config.fields[0].key, value: values[0] };
2128
+ return { key: values[0], value: values[1] };
2129
+ }
2130
+ emitValue(extraAction) {
2131
+ let flag = false;
2132
+ const f = this.form.getRawValue();
2133
+ const data = {};
2134
+ Object.keys(f).forEach((k) => {
2135
+ if (!f[k])
2136
+ return;
2137
+ flag = true;
2138
+ data[k] = f[k];
2139
+ extraAction?.(k, f[k]);
2140
+ });
2141
+ this.onSearch.emit({ mode: this.config.mode, data: flag ? data : null });
2142
+ }
2143
+ createFormControl(key, val) {
2144
+ this.form.addControl(key, new FormControl(''));
2145
+ if (val) {
2146
+ this.form.controls[key].setValue(val);
2147
+ this.activeFilter.push({ label: `${key}:${val}`, key, value: val });
2148
+ }
2149
+ }
2150
+ 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 }); }
2151
+ 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: 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 }); }
2152
+ }
2153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FilterComponent, decorators: [{
2154
+ type: Component,
2155
+ args: [{ standalone: true, selector: 'up-filter', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2156
+ class: 'd-block position-relative'
2157
+ }, imports: [
2158
+ IonicModule,
2159
+ CommonModule,
2160
+ FormDateComponent,
2161
+ FormInputComponent,
2162
+ ReactiveFormsModule,
2163
+ FormSelectComponent,
2164
+ FormSearchableSelectComponent
2165
+ ], 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"] }]
2166
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2167
+ type: Attribute,
2168
+ args: ['placeholder']
2169
+ }] }, { type: i0.ChangeDetectorRef }, { type: i1.PopoverController }], propDecorators: { id: [{
2170
+ type: Input,
2171
+ args: [{ required: true }]
2172
+ }], config: [{
2173
+ type: Input,
2174
+ args: [{ required: true }]
2175
+ }], onSearch: [{
2176
+ type: Output
2177
+ }], searchBox: [{
2178
+ type: ViewChild,
2179
+ args: ['searchBox']
2180
+ }] } });
2181
+
2182
+ class GridService {
2183
+ constructor() {
2184
+ this.apis = {};
2185
+ }
2186
+ getApi(id) { return this.apis[id]; }
2187
+ setApi(id, api) { this.apis[id] = api; }
2188
+ refreshGridCache(id) {
2189
+ this.apis[id].refreshInfiniteCache();
2190
+ }
2191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2192
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, providedIn: 'root' }); }
2193
+ }
2194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridService, decorators: [{
2195
+ type: Injectable,
2196
+ args: [{
2197
+ providedIn: 'root'
2198
+ }]
2199
+ }] });
2200
+
2201
+ class GridSnapshotComponent {
2202
+ constructor(service) {
2203
+ this.service = service;
2204
+ this.id = 'grid-s';
2205
+ this.rowSelection = 'single';
2206
+ this.onRowClick = new EventEmitter();
2207
+ this.onGridReady = new EventEmitter();
2208
+ this.onSelectionChanged = new EventEmitter();
2209
+ this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
2210
+ this.sort = { order: '', orderBy: '' };
2211
+ ModuleRegistry.register(InfiniteRowModelModule);
2212
+ }
2213
+ ngOnInit() {
2214
+ if (!this.config.rowPerPage)
2215
+ this.config.rowPerPage = 50;
2216
+ this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
2217
+ }
2218
+ ngOnDestroy() { this.subs?.unsubscribe(); }
2219
+ clickRow(data) { this.onRowClick.emit(data.node); }
2220
+ dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
2221
+ changeSelected(data) { this.onSelectionChanged.emit(data); }
2222
+ changePagination(ev) {
2223
+ if (ev.newPageSize)
2224
+ this.config.rowPerPage = this.gridApi.paginationGetPageSize();
2225
+ }
2226
+ setDatasource(ev) {
2227
+ this.gridApi = ev.api;
2228
+ this.onGridReady.emit(ev);
2229
+ this.service.setApi(this.id, this.gridApi);
2230
+ const state = JSON.parse(localStorage.getItem(this.id));
2231
+ if (state)
2232
+ ev.api.applyColumnState({ state, applyOrder: true });
2233
+ this.reset();
2234
+ }
2235
+ reset() {
2236
+ const datasource = {
2237
+ getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
2238
+ this.gridApi.showLoadingOverlay();
2239
+ if (colId !== this.sort.orderBy || sort !== this.sort.order) {
2240
+ this.sort.order = sort;
2241
+ this.sort.orderBy = colId;
2242
+ this.gridApi.paginationGoToFirstPage();
2243
+ }
2244
+ const page = this.gridApi.paginationGetCurrentPage();
2245
+ if (page === 0)
2246
+ this.after = null;
2247
+ this.subs = this.config.getDataSnapshot(this.config.rowPerPage, colId, sort, this.after).subscribe({
2248
+ next: ({ data, totalRecord }) => {
2249
+ this.gridApi.hideOverlay();
2250
+ const { edges, pageInfo } = data;
2251
+ if (edges.length > 0)
2252
+ this.after = pageInfo.endCursor;
2253
+ if (page === 0) {
2254
+ if (edges.length === 0)
2255
+ this.gridApi.showNoRowsOverlay();
2256
+ this.count = totalRecord;
2257
+ }
2258
+ if (!this.config.useTotalRecord && !pageInfo.hasNextPage) {
2259
+ this.count = (page * this.config.rowPerPage) + edges.length;
2260
+ }
2261
+ successCallback(edges, this.count);
2262
+ },
2263
+ error: () => {
2264
+ this.gridApi.hideOverlay();
2265
+ this.gridApi.showNoRowsOverlay();
2266
+ failCallback();
2267
+ }
2268
+ });
2269
+ }
2270
+ };
2271
+ this.gridApi.setGridOption('datasource', datasource);
2272
+ }
2273
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridSnapshotComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
2274
+ 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 }); }
2275
+ }
2276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridSnapshotComponent, decorators: [{
2277
+ type: Component,
2278
+ args: [{ standalone: true, selector: 'up-snapshot-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2279
+ class: 'd-block h-100 w-100'
2280
+ }, imports: [
2281
+ AgGridModule
2282
+ ], 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" }]
2283
+ }], ctorParameters: () => [{ type: GridService }], propDecorators: { id: [{
2284
+ type: Input
2285
+ }], config: [{
2286
+ type: Input,
2287
+ args: [{ required: true }]
2288
+ }], rowSelection: [{
2289
+ type: Input
2290
+ }], onRowClick: [{
2291
+ type: Output
2292
+ }], onGridReady: [{
2293
+ type: Output
2294
+ }], onSelectionChanged: [{
2295
+ type: Output
2296
+ }] } });
2297
+
2298
+ class GridPaginationComponent {
2299
+ constructor(service) {
2300
+ this.service = service;
2301
+ this.rowData = [];
2302
+ this.id = 'grid-p';
2303
+ this.rowModelType = 'infinite';
2304
+ this.rowSelection = 'single';
2305
+ this.onRowClick = new EventEmitter();
2306
+ this.onGridReady = new EventEmitter();
2307
+ this.onSelectionChanged = new EventEmitter();
2308
+ this.defaultColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: ['asc', 'desc'], cellStyle: { textAlign: 'left' } };
2309
+ }
2310
+ ngOnInit() {
2311
+ ModuleRegistry.register(this.rowModelType === 'infinite' ? InfiniteRowModelModule : ClientSideRowModelModule);
2312
+ if (!this.config.rowPerPage)
2313
+ this.config.rowPerPage = 50;
2314
+ this.config.noRowText = `<span class="f20">${this.config.noRowText ?? 'Data not found'}</span>`;
2315
+ }
2316
+ ngOnDestroy() { this.subs?.unsubscribe(); }
2317
+ clickRow(data) { this.onRowClick.emit(data); }
2318
+ dragColumn({ api }) { localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
2319
+ changeSelected(data) { this.onSelectionChanged.emit(data); }
2320
+ changePagination(ev) {
2321
+ if (ev.newPageSize)
2322
+ this.config.rowPerPage = this.gridApi.paginationGetPageSize();
2323
+ }
2324
+ setDatasource(ev) {
2325
+ this.gridApi = ev.api;
2326
+ this.onGridReady.emit(ev);
2327
+ this.service.setApi(this.id, this.gridApi);
2328
+ const state = JSON.parse(localStorage.getItem(this.id));
2329
+ if (state)
2330
+ ev.api.applyColumnState({ state, applyOrder: true });
2331
+ if (this.rowModelType === 'clientSide')
2332
+ this.gridApi.setGridOption('rowData', this.rowData);
2333
+ if (this.rowModelType !== 'infinite')
2334
+ return;
2335
+ this.reset();
2336
+ }
2337
+ reset() {
2338
+ if (!this.gridApi)
2339
+ return;
2340
+ const datasource = {
2341
+ getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }) => {
2342
+ this.gridApi.showLoadingOverlay();
2343
+ const offset = this.gridApi.paginationGetCurrentPage();
2344
+ this.subs = this.config.getData(offset, this.config.rowPerPage, colId, sort).subscribe({
2345
+ next: ({ data, totalRecord }) => {
2346
+ this.gridApi.hideOverlay();
2347
+ if (offset === 0) {
2348
+ if (data.length === 0)
2349
+ this.gridApi.showNoRowsOverlay();
2350
+ this.count = totalRecord;
2351
+ }
2352
+ if (!this.config.useTotalRecord && data.length < this.config.rowPerPage) {
2353
+ this.count = (offset * this.config.rowPerPage) + data.length;
2354
+ }
2355
+ successCallback(data, this.count);
2356
+ },
2357
+ error: () => {
2358
+ this.gridApi.hideOverlay();
2359
+ this.gridApi.showNoRowsOverlay();
2360
+ failCallback();
2361
+ }
2362
+ });
2363
+ }
2364
+ };
2365
+ this.gridApi?.setGridOption('datasource', datasource);
2366
+ }
2367
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridPaginationComponent, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Component }); }
2368
+ 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 }); }
2369
+ }
2370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GridPaginationComponent, decorators: [{
2371
+ type: Component,
2372
+ args: [{ standalone: true, selector: 'up-pagination-grid', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2373
+ class: 'd-block h-100 w-100'
2374
+ }, imports: [
2375
+ AgGridModule
2376
+ ], 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" }]
2377
+ }], ctorParameters: () => [{ type: GridService }], propDecorators: { config: [{
2378
+ type: Input,
2379
+ args: [{ required: true }]
2380
+ }], rowData: [{
2381
+ type: Input
2382
+ }], id: [{
2383
+ type: Input
2384
+ }], rowModelType: [{
2385
+ type: Input
2386
+ }], rowSelection: [{
2387
+ type: Input
2388
+ }], onRowClick: [{
2389
+ type: Output
2390
+ }], onGridReady: [{
2391
+ type: Output
2392
+ }], onSelectionChanged: [{
2393
+ type: Output
2394
+ }] } });
2395
+
2396
+ class ListPaginationContainerComponent {
2397
+ constructor(id, router) {
2398
+ this.id = id;
2399
+ this.router = router;
2400
+ this.onRowClick = new EventEmitter();
2401
+ this.onGridReady = new EventEmitter();
2402
+ this.onSearch = new EventEmitter();
2403
+ this.gridId = `grid-${this.id ?? 'p'}`;
2404
+ }
2405
+ openDetail(data) {
2406
+ this.onRowClick.emit(data);
2407
+ this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
2408
+ }
2409
+ setGridApi(ev) {
2410
+ this.gridApi = ev.api;
2411
+ this.onGridReady.emit(ev);
2412
+ }
2413
+ search(k) {
2414
+ this.onSearch.emit(k);
2415
+ this.gridApi.refreshInfiniteCache();
2416
+ }
2417
+ 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 }); }
2418
+ 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 <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\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: "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"] }] }); }
2419
+ }
2420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListPaginationContainerComponent, decorators: [{
2421
+ type: Component,
2422
+ args: [{ standalone: true, selector: 'up-list-pagination-container', host: {
2423
+ class: 'd-flex flex-column h-100 w-100'
2424
+ }, imports: [
2425
+ IonicModule,
2426
+ CommonModule,
2427
+ RouterModule,
2428
+ FilterComponent,
2429
+ ButtonGroupComponent,
2430
+ GridPaginationComponent
2431
+ ], 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 <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\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"] }]
2432
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2433
+ type: Attribute,
2434
+ args: ['id']
2435
+ }] }, { type: i1$2.Router }], propDecorators: { header: [{
2436
+ type: Input,
2437
+ args: [{ required: true }]
2438
+ }], config: [{
2439
+ type: Input,
2440
+ args: [{ required: true }]
2441
+ }], onRowClick: [{
2442
+ type: Output
2443
+ }], onGridReady: [{
2444
+ type: Output
2445
+ }], onSearch: [{
2446
+ type: Output
2447
+ }] } });
2448
+
2449
+ class ListSnapshotContainerComponent {
2450
+ constructor(id, router) {
2451
+ this.id = id;
2452
+ this.router = router;
2453
+ this.onRowClick = new EventEmitter();
2454
+ this.onGridReady = new EventEmitter();
2455
+ this.onSearch = new EventEmitter();
2456
+ this.gridId = `grid-${this.id ?? 'p'}`;
2457
+ }
2458
+ openDetail(data) {
2459
+ this.onRowClick.emit(data);
2460
+ this.router.navigate([`${this.config.baseUrl}${data.guid}`], { preserveFragment: true });
2461
+ }
2462
+ setGridApi(ev) {
2463
+ this.gridApi = ev.api;
2464
+ this.onGridReady.emit(ev);
2465
+ }
2466
+ search(k) {
2467
+ this.onSearch.emit(k);
2468
+ this.gridApi.paginationGoToFirstPage();
2469
+ this.gridApi.purgeInfiniteCache();
2470
+ }
2471
+ 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 }); }
2472
+ 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 <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\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: "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"] }] }); }
2473
+ }
2474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ListSnapshotContainerComponent, decorators: [{
2475
+ type: Component,
2476
+ args: [{ standalone: true, selector: 'up-list-snapshot-container', host: {
2477
+ class: 'd-flex flex-column h-100 w-100'
2478
+ }, imports: [
2479
+ IonicModule,
2480
+ CommonModule,
2481
+ RouterModule,
2482
+ FilterComponent,
2483
+ ButtonGroupComponent,
2484
+ GridSnapshotComponent
2485
+ ], 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 <up-btn-group *ngIf=\"config.buttons && config.buttons.length > 0\" id=\"btn-list-snapshot-container\" [config]=\"config.buttons\" />\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"] }]
2486
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2487
+ type: Attribute,
2488
+ args: ['id']
2489
+ }] }, { type: i1$2.Router }], propDecorators: { header: [{
2490
+ type: Input,
2491
+ args: [{ required: true }]
2492
+ }], config: [{
2493
+ type: Input,
2494
+ args: [{ required: true }]
2495
+ }], onRowClick: [{
2496
+ type: Output
2497
+ }], onGridReady: [{
2498
+ type: Output
2499
+ }], onSearch: [{
2500
+ type: Output
2501
+ }] } });
2502
+
2503
+ class TabContentComponent {
2504
+ constructor(fragment, ch) {
2505
+ this.fragment = fragment;
2506
+ this.ch = ch;
2507
+ this.isActive = false;
2508
+ }
2509
+ toggleVisibility(s = true) {
2510
+ this.isActive = s;
2511
+ this.ch.markForCheck();
2512
+ }
2513
+ 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 }); }
2514
+ 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 }); }
2515
+ }
2516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabContentComponent, decorators: [{
2517
+ type: Component,
2518
+ args: [{ selector: 'up-tab-content', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2519
+ class: 'overflow-auto'
2520
+ }, template: "<div [hidden]=\"!isActive\" class=\"h-100\">\n <ng-content />\n</div>\n" }]
2521
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2522
+ type: Attribute,
2523
+ args: ['fragment']
2524
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { isActive: [{
2525
+ type: HostBinding,
2526
+ args: ['class.flex-grow-1']
2527
+ }], header: [{
2528
+ type: Input,
2529
+ args: [{ required: true }]
2530
+ }] } });
2531
+
2532
+ class TabGroupComponent {
2533
+ constructor(router, activeRoute) {
2534
+ this.router = router;
2535
+ this.activeRoute = activeRoute;
2536
+ this.onChange = new EventEmitter();
2537
+ this.tabs = [];
2538
+ }
2539
+ ngAfterContentInit() {
2540
+ this.content.forEach(({ header, fragment }) => this.tabs.push({ fragment, label: header }));
2541
+ this.changeTab(this.activeRoute.snapshot.fragment);
2542
+ }
2543
+ changeTab(f) {
2544
+ this.onChange.emit(f);
2545
+ this.router.navigate([], { relativeTo: this.activeRoute, fragment: f || undefined, replaceUrl: true });
2546
+ let found = false;
2547
+ this.content.forEach((tab) => {
2548
+ if (tab.fragment !== f)
2549
+ tab.toggleVisibility(false);
2550
+ else {
2551
+ found = true;
2552
+ this.activeFragment = f;
2553
+ tab.toggleVisibility(true);
2554
+ }
2555
+ });
2556
+ if (!found) {
2557
+ this.content.get(0).toggleVisibility(true);
2558
+ this.activeFragment = this.content.get(0).fragment;
2559
+ }
2560
+ }
2561
+ 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 }); }
2562
+ 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 }); }
2563
+ }
2564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabGroupComponent, decorators: [{
2565
+ type: Component,
2566
+ args: [{ selector: 'up-tab-group', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2567
+ class: 'd-flex flex-column'
2568
+ }, 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"] }]
2569
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { onChange: [{
2570
+ type: Output
2571
+ }], content: [{
2572
+ type: ContentChildren,
2573
+ args: [TabContentComponent, { descendants: true }]
2574
+ }] } });
2575
+
2576
+ class TabsComponentModule {
2577
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2578
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, declarations: [TabGroupComponent,
2579
+ TabContentComponent], imports: [IonicModule,
2580
+ CommonModule], exports: [TabGroupComponent,
2581
+ TabContentComponent] }); }
2582
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, imports: [IonicModule,
2583
+ CommonModule] }); }
2584
+ }
2585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TabsComponentModule, decorators: [{
2586
+ type: NgModule,
2587
+ args: [{
2588
+ imports: [
2589
+ IonicModule,
2590
+ CommonModule,
2591
+ ],
2592
+ declarations: [
2593
+ TabGroupComponent,
2594
+ TabContentComponent
2595
+ ],
2596
+ exports: [
2597
+ TabGroupComponent,
2598
+ TabContentComponent
2599
+ ]
2600
+ }]
2601
+ }] });
2602
+
2603
+ class AuditService {
2405
2604
  constructor(apollo) {
2406
2605
  this.apollo = apollo;
2407
- this.baseAttr = `guid createdAt entity remark sourcePlatform status type`;
2606
+ this.baseAttr = `
2607
+ action
2608
+ createdAt
2609
+ description
2610
+ function
2611
+ guid
2612
+ msSource
2613
+ sourceIp
2614
+ user {
2615
+ name
2616
+ sourcePlatform
2617
+ status
2618
+ appLoginPrincipal {
2619
+ principalType
2620
+ principalId
2621
+ }
2408
2622
  }
2409
- query(input, extraAttr = '', fetchPolicy) {
2623
+ `;
2624
+ }
2625
+ query(input, extraAttr = '') {
2410
2626
  return this.apollo.query({
2411
- fetchPolicy,
2412
2627
  variables: { input },
2413
2628
  query: gql `
2414
- query QueryApproval($input: ApprovalCriteria) {
2415
- approvalMsApprovals(input: $input) {
2416
- data {
2417
- ${this.baseAttr}
2418
- ${extraAttr}
2419
- }
2420
- ${input.page === 0 ? 'totalRecord' : ''}
2629
+ query QueryAudit($input: AuditTrailCriteria!) {
2630
+ auditMsAuditTrail(input: $input) {
2631
+ ${this.baseAttr}
2632
+ ${extraAttr}
2421
2633
  }
2422
2634
  }
2423
2635
  `
2424
2636
  });
2425
2637
  }
2426
- request(variables) {
2427
- return this.apollo.mutate({
2428
- variables,
2429
- mutation: gql `
2430
- mutation ${variables.isApprove ? 'ApproveApproval' : 'DeclineApproval'}($approvalGroupGuid: String, $guid: String, $isApprove: Boolean, $reason: String) {
2431
- approvalMsApproveOrDeclineRequest(approvalGroupGuid: $approvalGroupGuid, guid: $guid, isApprove: $isApprove, reason: $reason)
2432
- }
2433
- `
2434
- });
2435
- }
2436
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2437
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
2638
+ 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 }); }
2639
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditService, providedIn: 'root' }); }
2438
2640
  }
2439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalService, decorators: [{
2641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditService, decorators: [{
2440
2642
  type: Injectable,
2441
2643
  args: [{
2442
2644
  providedIn: 'root'
2443
2645
  }]
2444
2646
  }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2445
2647
 
2446
- class ApprovalListComponent {
2447
- constructor(entities, router, route, service, alertCtrl) {
2448
- this.entities = entities;
2648
+ class AuditListComponent {
2649
+ constructor(id, url, router, service) {
2650
+ this.id = id;
2651
+ this.url = url;
2449
2652
  this.router = router;
2450
- this.route = route;
2451
2653
  this.service = service;
2452
- this.alertCtrl = alertCtrl;
2654
+ this.filterConfig = { mode: 'simple', fields: [{ key: 'description', label: '', type: 'text' }] };
2453
2655
  this.gridConfig = {
2454
- noRowText: 'Approval not found',
2656
+ useTotalRecord: false,
2657
+ noRowText: 'Audit not found',
2455
2658
  colDefs: [
2456
- { headerName: 'Entity', field: 'entity', checkboxSelection: true },
2457
- { headerName: 'Remark', field: 'remark' },
2458
- { headerName: 'Source Platform', field: 'sourcePlatform' },
2459
- { 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>` : '' },
2460
- { headerName: 'Type', field: 'type', maxWidth: 100 },
2461
- { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2462
- ],
2463
- getData: (page, pageSize, sortBy, dir) => {
2464
- const policy = this.input.page === page ? 'no-cache' : undefined;
2465
- this.input.page = page;
2466
- this.input.sortBy = sortBy;
2467
- this.input.pageSize = pageSize;
2468
- this.input.sortDirection = dir;
2469
- return this.service.query(this.input, '', policy).pipe(map(({ data: { approvalMsApprovals: { data, totalRecord: t } } }) => ({ data, totalRecord: t })));
2470
- }
2471
- };
2472
- this.filterConfig = {
2473
- mode: 'advanced',
2474
- fields: [
2475
- { key: 'status', label: 'Status', type: 'select', options: [
2476
- { label: 'Approved', value: ['APPROVED'] },
2477
- { label: 'Declined', value: ['DECLINED'] },
2478
- { label: 'Pending', value: ['PENDING'] }
2479
- ] },
2480
- { key: 'type', label: 'Type', type: 'select', options: [
2481
- { label: 'Creation', value: ['CREATION'] },
2482
- { label: 'Deletion', value: ['DELETION'] },
2483
- { label: 'Linkage', value: ['LINKAGE'] },
2484
- { label: 'Unlink', value: ['UNLINK'] },
2485
- { label: 'Update', value: ['UPDATE'] }
2486
- ] }
2487
- ]
2659
+ { headerName: 'User', field: 'user.name', sortable: false },
2660
+ { headerName: 'Description', field: 'description', minWidth: 350, sortable: false },
2661
+ { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2662
+ ],
2663
+ getData: (page, pageSize, sortBy, dir) => {
2664
+ if (!this.criteria.tagValues)
2665
+ return of({ data: [] });
2666
+ this.criteria.page = page;
2667
+ this.criteria.sortBy = sortBy;
2668
+ this.criteria.pageSize = pageSize;
2669
+ this.criteria.sortDirection = dir;
2670
+ return this.service.query(this.criteria).pipe(map(({ data: { auditMsAuditTrail: data } }) => ({ data })));
2671
+ },
2488
2672
  };
2489
- this.btnConfig = [
2490
- { label: 'Approve', icon: 'checkmark', description: 'Approve the approvals', disabled: true, onClick: this.multipleApproval.bind(this) },
2491
- { label: 'Decline', icon: 'close', description: 'Decline the approvals', color: 'danger', disabled: true, onClick: this.multipleApproval.bind(this) }
2492
- ];
2493
- this.input = { page: 0, pageSize: 50, entity: this.entities };
2673
+ this.criteria = { sortBy: 'createdAt', sortDirection: 'desc', page: 0, pageSize: 50 };
2674
+ }
2675
+ ngOnChanges(e) {
2676
+ if (e['tagKeys'])
2677
+ this.criteria.tagKeys = this.tagKeys;
2678
+ if (e['relatedEntities'])
2679
+ this.criteria.relatedEntities = this.relatedEntities;
2494
2680
  }
2495
2681
  setGridApi({ api }) { this.gridApi = api; }
2496
- openDetail({ guid }) { this.router.navigate([`/approval/${guid}`], { preserveFragment: true }); }
2497
- selectApprovals() { this.btnConfig[0].disabled = this.btnConfig[1].disabled = this.gridApi.getSelectedRows().length <= 1; }
2682
+ rowClicked({ guid }) {
2683
+ this.router.navigate([`${this.url}/${this.criteria.tagValues[0]}/audit/${guid}`], { preserveFragment: true });
2684
+ }
2498
2685
  search({ data }) {
2499
- this.input.type = data?.type;
2500
- this.input.status = data?.status;
2501
- this.gridApi.getSelectedNodes().forEach((e) => e.setSelected(false));
2502
- this.gridApi.refreshInfiniteCache();
2686
+ this.criteria.description = data?.description;
2687
+ this.gridComponent.reset();
2503
2688
  }
2504
- multipleApproval(btn) {
2505
- btn.toggleLoading();
2506
- this.router.navigate([`/approval/approval-group`], {
2507
- preserveFragment: true,
2508
- queryParams: {
2509
- isApprove: btn.color !== 'danger',
2510
- guids: this.gridApi.getSelectedRows().map(({ guid }) => guid),
2511
- }
2512
- });
2689
+ setGuid(guid) {
2690
+ this.criteria.description = null;
2691
+ this.criteria.tagValues = [guid];
2692
+ this.gridComponent.reset();
2513
2693
  }
2514
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.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 }); }
2515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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"] }] }); }
2694
+ 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 }); }
2695
+ 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"] }] }); }
2516
2696
  }
2517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalListComponent, decorators: [{
2697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditListComponent, decorators: [{
2518
2698
  type: Component,
2519
- args: [{ standalone: true, selector: 'up-approval-list', host: {
2520
- class: 'd-flex flex-column h-100 w-100'
2699
+ args: [{ standalone: true, selector: 'up-audit-list', host: {
2700
+ class: 'd-flex flex-column h-100'
2521
2701
  }, imports: [
2522
2702
  FilterComponent,
2523
- ButtonGroupComponent,
2524
2703
  GridPaginationComponent
2525
- ], 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" }]
2704
+ ], 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" }]
2526
2705
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2527
- type: Inject,
2528
- args: ['ENTITIES']
2529
- }] }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: ApprovalService }, { type: i1.AlertController }] });
2706
+ type: Attribute,
2707
+ args: ['id']
2708
+ }] }, { type: undefined, decorators: [{
2709
+ type: Attribute,
2710
+ args: ['mainUrl']
2711
+ }] }, { type: i1$2.Router }, { type: AuditService }], propDecorators: { relatedEntities: [{
2712
+ type: Input,
2713
+ args: [{ required: true }]
2714
+ }], tagKeys: [{
2715
+ type: Input
2716
+ }], gridComponent: [{
2717
+ type: ViewChild,
2718
+ args: [GridPaginationComponent]
2719
+ }] } });
2530
2720
 
2531
- class ApprovalFormComponent {
2532
- constructor(router, ch, service, gridService, alertCtrl, permService) {
2533
- this.router = router;
2534
- this.ch = ch;
2721
+ class AuditDetailComponent {
2722
+ constructor(fb, service, route, navCtrl) {
2723
+ this.fb = fb;
2535
2724
  this.service = service;
2536
- this.gridService = gridService;
2537
- this.alertCtrl = alertCtrl;
2538
- this.permService = permService;
2725
+ this.route = route;
2726
+ this.navCtrl = navCtrl;
2727
+ this.gridConfig = {
2728
+ useTotalRecord: false,
2729
+ colDefs: [
2730
+ { headerName: 'Attribute Name', field: 'attribute', sort: 'asc' },
2731
+ { headerName: 'Old Value', field: 'oldData' },
2732
+ { headerName: 'New Value', field: 'newData' }
2733
+ ]
2734
+ };
2735
+ this.form = this.fb.group({
2736
+ guid: new FormControl({ value: null, disabled: true }),
2737
+ action: new FormControl({ value: null, disabled: true }),
2738
+ description: new FormControl({ value: null, disabled: true }),
2739
+ userName: new FormControl({ value: null, disabled: true }),
2740
+ sourceIp: new FormControl({ value: null, disabled: true }),
2741
+ createdAt: new FormControl({ value: null, disabled: true }),
2742
+ msSource: new FormControl({ value: null, disabled: true }),
2743
+ sourcePlatform: new FormControl({ value: null, disabled: true }),
2744
+ function: new FormControl({ value: null, disabled: true }),
2745
+ });
2539
2746
  this.isLoading = true;
2540
- this.btnConfig = [];
2541
- this.data = [];
2747
+ this.guid = '';
2542
2748
  }
2543
2749
  ngOnDestroy() { this.sub?.unsubscribe(); }
2544
- setGuid(guids, isApprove) {
2545
- if (guids.length === 1)
2546
- this.guid = guids[0];
2547
- this.btnConfig.length = 0;
2548
- this.setLoading(true);
2549
- this.sub = this.service.query({ guids, status: [ApprovalStatusEnum.Approved, ApprovalStatusEnum.Declined, ApprovalStatusEnum.Pending] }, 'permission reason').subscribe({
2550
- next: ({ data: { approvalMsApprovals: { data } } }) => {
2551
- if (!data || data.length === 0) {
2552
- this.router.navigateByUrl('approval');
2553
- return;
2554
- }
2555
- this.data = data;
2556
- if (data.length > 1) {
2557
- let dataCount = 0;
2558
- data.map(({ permission, status }) => {
2559
- if (status === ApprovalStatusEnum.Pending) {
2560
- const perm = permission.split('.');
2561
- if (this.permService.checkPermission(perm[0], perm[1], perm[2]))
2562
- dataCount++;
2563
- if (dataCount === data.length)
2564
- 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) });
2565
- }
2566
- });
2567
- }
2568
- else {
2569
- const { status, permission } = data[0];
2570
- if (status === ApprovalStatusEnum.Pending) {
2571
- const perm = permission.split('.');
2572
- if (this.permService.checkPermission(perm[0], perm[1], perm[2])) {
2573
- 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) });
2574
- }
2575
- }
2576
- }
2577
- this.setLoading(false);
2578
- },
2579
- error: ({ message }) => {
2580
- this.showAlert('Error', message);
2581
- this.router.navigateByUrl('approval');
2582
- }
2583
- });
2584
- }
2585
- request(btn) {
2586
- const isApprove = btn.color !== 'danger';
2587
- this.showAlert('Confirm', `Are you sure want to ${isApprove ? 'approve the approval?' : 'decline the approval? Please input the reason if you want to decline.'}`, [
2588
- { text: 'Cancel', handler: () => btn.toggleLoading() },
2589
- {
2590
- text: `${isApprove ? 'Approve' : 'Decline'}`,
2591
- handler: ({ reason }) => {
2592
- this.sub?.unsubscribe();
2593
- const variables = {
2594
- ...(this.guid ? { guid: this.guid } : { approvalGroupGuid: '' }),
2595
- isApprove,
2596
- reason
2597
- };
2598
- this.sub = this.service.request(variables).subscribe({
2599
- next: () => {
2600
- this.showAlert('Success', `Approval ${isApprove ? 'approved' : 'declined'}`);
2601
- this.router.navigateByUrl('approval');
2602
- this.gridService.refreshGridCache('grid-approval-list');
2603
- },
2604
- error: ({ message }) => {
2605
- btn.toggleLoading();
2606
- this.showAlert('Error', message);
2607
- }
2608
- });
2609
- }
2610
- }
2611
- ], [{ name: 'reason', type: 'textarea', placeholder: 'Reason' }]);
2612
- }
2613
- setLoading(b) {
2614
- this.isLoading = b;
2615
- this.ch.markForCheck();
2750
+ setGridApi({ api }) {
2751
+ this.gridApi = api;
2752
+ this.getData();
2616
2753
  }
2617
- async showAlert(header, message, buttons = ['OK'], inputs = []) { (await this.alertCtrl.create({ header, message, buttons, inputs })).present(); }
2618
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.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 }); }
2619
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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 }); }
2620
- }
2621
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalFormComponent, decorators: [{
2622
- type: Component,
2623
- args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2624
- class: 'px-4 d-block'
2625
- }, imports: [
2626
- IonicModule,
2627
- CommonModule,
2628
- FormInputComponent,
2629
- FormTextareaComponent
2630
- ], 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" }]
2631
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: ApprovalService }, { type: GridService }, { type: i1.AlertController }, { type: PermissionService }], propDecorators: { isLoading: [{
2632
- type: Input
2633
- }] } });
2634
-
2635
- class ApprovalDetailComponent {
2636
- constructor(router, activatedRoute) {
2637
- this.router = router;
2638
- this.activatedRoute = activatedRoute;
2639
- this.btnConfig = [];
2640
- this.guid = '';
2754
+ isIsoDateString(str) {
2755
+ const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$/;
2756
+ return regex.test(str);
2641
2757
  }
2642
- ngOnInit() {
2643
- this.sub = this.activatedRoute.queryParams.subscribe((params) => {
2644
- if (params) {
2645
- this.guids = params['guids'];
2646
- this.isApprove = params['isApprove'] === 'true';
2647
- }
2648
- });
2758
+ formatData(value) {
2759
+ if (value === null)
2760
+ return value;
2761
+ if (typeof value === 'object')
2762
+ return JSON.stringify(value);
2763
+ if (this.isIsoDateString(value))
2764
+ return formatDate(value, 'dd MMM yyyy HH:mm', 'en-US');
2765
+ return value;
2649
2766
  }
2650
- ngAfterViewInit() {
2651
- if (this.guids) {
2652
- this.setChildGuid('');
2653
- this.changeTab(this.activatedRoute.snapshot.fragment);
2654
- }
2655
- else {
2656
- this.setChildGuid(this.activatedRoute.children[0].snapshot.params['guid']);
2657
- this.changeTab(this.activatedRoute.snapshot.fragment);
2658
- this.sub = this.router.events.pipe(filter((e) => e instanceof NavigationEnd)).subscribe({
2659
- next: () => {
2660
- const newGuid = this.activatedRoute.children[0].snapshot.params['guid'];
2661
- if (this.guid !== newGuid) {
2662
- this.guid = newGuid;
2663
- this.setChildGuid(this.guid);
2664
- }
2767
+ getData() {
2768
+ const newGuid = this.route.children[0].snapshot.params['audit'];
2769
+ if (!newGuid || this.guid === newGuid)
2770
+ return;
2771
+ this.sub?.unsubscribe();
2772
+ this.gridApi?.showLoadingOverlay();
2773
+ this.guid = newGuid;
2774
+ this.isLoading = true;
2775
+ this.sub = this.service.query({ guid: this.guid }, 'data tags { tagKey tagValue }').subscribe({
2776
+ next: ({ data: { auditMsAuditTrail: data } }) => {
2777
+ this.gridApi?.hideOverlay();
2778
+ if (data.length !== 1) {
2779
+ this.navCtrl.back();
2780
+ return;
2665
2781
  }
2666
- });
2667
- }
2782
+ const { guid, action, description, function: func, msSource, sourceIp, createdAt } = data[0];
2783
+ this.form.patchValue({
2784
+ guid,
2785
+ function: func,
2786
+ msSource, sourceIp,
2787
+ action, description,
2788
+ userName: data[0].user?.name,
2789
+ sourcePlatform: data[0].user?.sourcePlatform,
2790
+ createdAt: formatDate(createdAt, 'dd MMM yyyy HH:mm', 'en-US'),
2791
+ });
2792
+ this.isLoading = false;
2793
+ this.getChangedData(data[0].data);
2794
+ },
2795
+ error: () => this.navCtrl.back()
2796
+ });
2668
2797
  }
2669
- ngOnDestroy() { this.sub.unsubscribe(); }
2670
- changeTab(f) {
2671
- switch (f) {
2672
- default:
2673
- this.btnConfig = this.formComponent?.btnConfig ?? [];
2798
+ getChangedData({ oldData, newData }) {
2799
+ if (!newData || Array.isArray(JSON.parse(newData))) {
2800
+ this.gridApi.setGridOption('rowData', []);
2801
+ return;
2674
2802
  }
2803
+ const objNewData = JSON.parse(newData);
2804
+ const changedData = Object.entries(oldData ? JSON.parse(oldData) : JSON.parse(newData))
2805
+ .filter(([key, oldVal]) => JSON.stringify(oldData ? oldVal : null) !== JSON.stringify(objNewData[key]) && !key.match(/update|created/))
2806
+ .map(([key, oldVal]) => ({
2807
+ attribute: key,
2808
+ oldData: oldData ? this.formatData(oldVal) : null,
2809
+ newData: this.formatData(objNewData[key])
2810
+ }));
2811
+ this.gridApi.setGridOption('rowData', changedData);
2675
2812
  }
2676
- setChildGuid(guid) {
2677
- this.formComponent?.setGuid(this.guids ?? [guid], this.isApprove);
2678
- }
2679
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalDetailComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2680
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.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 }); }
2813
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditDetailComponent, deps: [{ token: i3$1.FormBuilder }, { token: AuditService }, { token: i1$2.ActivatedRoute }, { token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
2814
+ 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: 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"] }] }); }
2681
2815
  }
2682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ApprovalDetailComponent, decorators: [{
2816
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuditDetailComponent, decorators: [{
2683
2817
  type: Component,
2684
- args: [{ standalone: true, selector: 'up-approval-detail', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2685
- class: 'd-block h-100'
2686
- }, imports: [
2687
- IonicModule,
2818
+ args: [{ standalone: true, selector: 'up-audit-detail', imports: [
2688
2819
  CommonModule,
2820
+ IonicModule,
2821
+ GridPaginationComponent,
2689
2822
  TabsComponentModule,
2690
- ButtonGroupComponent,
2691
- ColumnHeaderContainerComponent,
2692
- ApprovalFormComponent
2693
- ], 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" }]
2694
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { formComponent: [{
2695
- type: ViewChild,
2696
- args: [ApprovalFormComponent]
2697
- }] } });
2823
+ FormInputComponent,
2824
+ FormTextareaComponent,
2825
+ ReactiveFormsModule
2826
+ ], 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"] }]
2827
+ }], ctorParameters: () => [{ type: i3$1.FormBuilder }, { type: AuditService }, { type: i1$2.ActivatedRoute }, { type: i1.NavController }] });
2698
2828
 
2699
- class ProfileService {
2829
+ class ApprovalService {
2700
2830
  constructor(apollo) {
2701
2831
  this.apollo = apollo;
2832
+ this.baseAttr = `guid createdAt entity remark sourcePlatform status type`;
2702
2833
  }
2703
- getMyProfile(fetchPolicy) {
2834
+ query(input, extraAttr = '', fetchPolicy) {
2704
2835
  return this.apollo.query({
2705
2836
  fetchPolicy,
2706
- errorPolicy: 'all',
2837
+ variables: { input },
2707
2838
  query: gql `
2708
- query getMyProfile {
2709
- authMsMyProfile {
2710
- appLoginPrincipal {
2711
- principalId
2712
- principalType
2713
- }
2714
- appLoginExt {
2715
- paramCode
2716
- paramType
2717
- file {
2718
- publicUrl
2719
- }
2720
- }
2721
- birthday
2722
- category
2723
- company {
2724
- code
2725
- guid
2726
- isInternal
2727
- name
2728
- status
2729
- }
2730
- gender
2731
- guid
2732
- merchants {
2733
- guid
2734
- name
2735
- status
2839
+ query QueryApproval($input: ApprovalCriteria) {
2840
+ approvalMsApprovals(input: $input) {
2841
+ data {
2842
+ ${this.baseAttr}
2843
+ ${extraAttr}
2736
2844
  }
2737
- name
2738
- status
2845
+ ${input.page === 0 ? 'totalRecord' : ''}
2739
2846
  }
2740
2847
  }
2741
- `,
2742
- }).pipe(map(({ data: { authMsMyProfile } }) => {
2743
- if (!authMsMyProfile)
2744
- return null;
2745
- return authMsMyProfile;
2746
- }));
2848
+ `
2849
+ });
2850
+ }
2851
+ request(variables) {
2852
+ return this.apollo.mutate({
2853
+ variables,
2854
+ mutation: gql `
2855
+ mutation ${variables.isApprove ? 'ApproveApproval' : 'DeclineApproval'}($approvalGroupGuid: String, $guid: String, $isApprove: Boolean, $reason: String) {
2856
+ approvalMsApproveOrDeclineRequest(approvalGroupGuid: $approvalGroupGuid, guid: $guid, isApprove: $isApprove, reason: $reason)
2857
+ }
2858
+ `
2859
+ });
2747
2860
  }
2748
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ProfileService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2749
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
2861
+ 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 }); }
2862
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
2750
2863
  }
2751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ProfileService, decorators: [{
2864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalService, decorators: [{
2752
2865
  type: Injectable,
2753
2866
  args: [{
2754
2867
  providedIn: 'root'
2755
2868
  }]
2756
2869
  }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2757
2870
 
2758
- class AuthService {
2759
- static { this.authToken = ''; }
2760
- static { this.refreshToken = ''; }
2761
- constructor(apollo, profileService) {
2762
- this.apollo = apollo;
2763
- this.profileService = profileService;
2764
- }
2765
- login(input) {
2766
- return this.apollo.mutate({
2767
- variables: { input },
2768
- mutation: gql `
2769
- mutation Login($input: LoginRq!) {
2770
- authMsLogin(input: $input) {
2771
- accessToken
2772
- refreshToken
2773
- suggestedAction
2774
- user {
2775
- birthday
2776
- category
2777
- email
2778
- gender
2779
- guid
2780
- mobileNumber
2781
- name
2782
- status
2783
- }
2784
- }
2785
- }
2786
- `
2787
- }).pipe(tap(({ data }) => {
2788
- if (data?.authMsLogin) {
2789
- const { accessToken, user, refreshToken } = data.authMsLogin;
2790
- this.user = user;
2791
- this.user.photo = '/assets/imgs/profile.svg';
2792
- AuthService.authToken = accessToken ?? '';
2793
- AuthService.refreshToken = refreshToken ?? '';
2794
- localStorage.setItem('userGuid', this.user.guid);
2795
- localStorage.setItem('authToken', AuthService.authToken);
2796
- localStorage.setItem('refreshToken', AuthService.refreshToken);
2871
+ class ApprovalListComponent {
2872
+ constructor(entities, router, route, service, alertCtrl) {
2873
+ this.entities = entities;
2874
+ this.router = router;
2875
+ this.route = route;
2876
+ this.service = service;
2877
+ this.alertCtrl = alertCtrl;
2878
+ this.gridConfig = {
2879
+ noRowText: 'Approval not found',
2880
+ colDefs: [
2881
+ { headerName: 'Entity', field: 'entity', checkboxSelection: true },
2882
+ { headerName: 'Remark', field: 'remark' },
2883
+ { headerName: 'Source Platform', field: 'sourcePlatform' },
2884
+ { 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>` : '' },
2885
+ { headerName: 'Type', field: 'type', maxWidth: 100 },
2886
+ { headerName: 'Created Date', field: 'createdAt', sort: 'desc', valueFormatter: ({ value }) => value ? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
2887
+ ],
2888
+ getData: (page, pageSize, sortBy, dir) => {
2889
+ const policy = this.input.page === page ? 'no-cache' : undefined;
2890
+ this.input.page = page;
2891
+ this.input.sortBy = sortBy;
2892
+ this.input.pageSize = pageSize;
2893
+ this.input.sortDirection = dir;
2894
+ return this.service.query(this.input, '', policy).pipe(map(({ data: { approvalMsApprovals: { data, totalRecord: t } } }) => ({ data, totalRecord: t })));
2797
2895
  }
2798
- }));
2896
+ };
2897
+ this.filterConfig = {
2898
+ mode: 'advanced',
2899
+ fields: [
2900
+ { key: 'status', label: 'Status', type: 'select', options: [
2901
+ { label: 'Approved', value: ['APPROVED'] },
2902
+ { label: 'Declined', value: ['DECLINED'] },
2903
+ { label: 'Pending', value: ['PENDING'] }
2904
+ ] },
2905
+ { key: 'type', label: 'Type', type: 'select', options: [
2906
+ { label: 'Creation', value: ['CREATION'] },
2907
+ { label: 'Deletion', value: ['DELETION'] },
2908
+ { label: 'Linkage', value: ['LINKAGE'] },
2909
+ { label: 'Unlink', value: ['UNLINK'] },
2910
+ { label: 'Update', value: ['UPDATE'] }
2911
+ ] }
2912
+ ]
2913
+ };
2914
+ this.btnConfig = [
2915
+ { label: 'Approve', icon: 'checkmark', description: 'Approve the approvals', disabled: true, onClick: this.multipleApproval.bind(this) },
2916
+ { label: 'Decline', icon: 'close', description: 'Decline the approvals', color: 'danger', disabled: true, onClick: this.multipleApproval.bind(this) }
2917
+ ];
2918
+ this.input = { page: 0, pageSize: 50, entity: this.entities };
2799
2919
  }
2800
- refreshToken(variables) {
2801
- return this.apollo.mutate({
2802
- context: {
2803
- headers: {
2804
- 'operation-type': 'Mutation',
2805
- 'operation-name': 'RefreshToken'
2806
- }
2807
- },
2808
- variables,
2809
- mutation: gql `
2810
- mutation RefreshToken($refreshToken: String!) {
2811
- authMsRefreshAccessToken(refreshToken: $refreshToken) {
2812
- accessToken
2813
- refreshToken
2814
- }
2815
- }
2816
- `
2920
+ setGridApi({ api }) { this.gridApi = api; }
2921
+ openDetail({ guid }) { this.router.navigate([`/approval/${guid}`], { preserveFragment: true }); }
2922
+ selectApprovals() { this.btnConfig[0].disabled = this.btnConfig[1].disabled = this.gridApi.getSelectedRows().length <= 1; }
2923
+ search({ data }) {
2924
+ this.input.type = data?.type;
2925
+ this.input.status = data?.status;
2926
+ this.gridApi.getSelectedNodes().forEach((e) => e.setSelected(false));
2927
+ this.gridApi.refreshInfiniteCache();
2928
+ }
2929
+ multipleApproval(btn) {
2930
+ btn.toggleLoading();
2931
+ this.router.navigate([`/approval/approval-group`], {
2932
+ preserveFragment: true,
2933
+ queryParams: {
2934
+ isApprove: btn.color !== 'danger',
2935
+ guids: this.gridApi.getSelectedRows().map(({ guid }) => guid),
2936
+ }
2817
2937
  });
2818
2938
  }
2819
- getProfile(fetchPolicy) {
2820
- return this.profileService.getMyProfile(fetchPolicy).pipe(tap((user) => {
2821
- if (!user)
2822
- return;
2823
- this.user = { ...user, photo: '/assets/imgs/profile.svg' };
2824
- user.appLoginExt?.forEach(({ paramCode, file: { publicUrl } }) => {
2825
- if (paramCode === 'USER_PROFILE_PHOTO')
2826
- this.user.photo = publicUrl;
2827
- });
2828
- user.appLoginPrincipal?.forEach(({ principalId, principalType }) => {
2829
- if (principalType === 'EMAIL_USERNAME')
2830
- this.user.email = principalId;
2831
- });
2832
- }));
2939
+ 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 }); }
2940
+ 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"] }] }); }
2941
+ }
2942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalListComponent, decorators: [{
2943
+ type: Component,
2944
+ args: [{ standalone: true, selector: 'up-approval-list', host: {
2945
+ class: 'd-flex flex-column h-100 w-100'
2946
+ }, imports: [
2947
+ FilterComponent,
2948
+ ButtonGroupComponent,
2949
+ GridPaginationComponent
2950
+ ], 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" }]
2951
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2952
+ type: Inject,
2953
+ args: ['ENTITIES']
2954
+ }] }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: ApprovalService }, { type: i1.AlertController }] });
2955
+
2956
+ class ApprovalFormComponent {
2957
+ constructor(router, ch, service, gridService, alertCtrl, permService) {
2958
+ this.router = router;
2959
+ this.ch = ch;
2960
+ this.service = service;
2961
+ this.gridService = gridService;
2962
+ this.alertCtrl = alertCtrl;
2963
+ this.permService = permService;
2964
+ this.isLoading = true;
2965
+ this.btnConfig = [];
2966
+ this.data = [];
2833
2967
  }
2834
- initForgotPassword(email) {
2835
- return this.apollo.mutate({
2836
- variables: {
2837
- input: {
2838
- email,
2839
- sourcePlatform: SourcePlatform.Admin
2968
+ ngOnDestroy() { this.sub?.unsubscribe(); }
2969
+ setGuid(guids, isApprove) {
2970
+ if (guids.length === 1)
2971
+ this.guid = guids[0];
2972
+ this.btnConfig.length = 0;
2973
+ this.setLoading(true);
2974
+ this.sub = this.service.query({ guids, status: [ApprovalStatusEnum.Approved, ApprovalStatusEnum.Declined, ApprovalStatusEnum.Pending] }, 'permission reason').subscribe({
2975
+ next: ({ data: { approvalMsApprovals: { data } } }) => {
2976
+ if (!data || data.length === 0) {
2977
+ this.router.navigateByUrl('approval');
2978
+ return;
2840
2979
  }
2980
+ this.data = data;
2981
+ if (data.length > 1) {
2982
+ let dataCount = 0;
2983
+ data.map(({ permission, status }) => {
2984
+ if (status === ApprovalStatusEnum.Pending) {
2985
+ const perm = permission.split('.');
2986
+ if (this.permService.checkPermission(perm[0], perm[1], perm[2]))
2987
+ dataCount++;
2988
+ if (dataCount === data.length)
2989
+ 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) });
2990
+ }
2991
+ });
2992
+ }
2993
+ else {
2994
+ const { status, permission } = data[0];
2995
+ if (status === ApprovalStatusEnum.Pending) {
2996
+ const perm = permission.split('.');
2997
+ if (this.permService.checkPermission(perm[0], perm[1], perm[2])) {
2998
+ 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) });
2999
+ }
3000
+ }
3001
+ }
3002
+ this.setLoading(false);
2841
3003
  },
2842
- mutation: gql `
2843
- mutation InitForgotPassword($input: ForgotPassOtpRq!) {
2844
- authMsForgotPasswordOtp(input: $input)
2845
- }
2846
- `
3004
+ error: ({ message }) => {
3005
+ this.showAlert('Error', message);
3006
+ this.router.navigateByUrl('approval');
3007
+ }
2847
3008
  });
2848
3009
  }
2849
- createNewPassword({ newPassword, principalId, sourcePlatform, verifCode }) {
2850
- return this.apollo.mutate({
2851
- mutation: gql `
2852
- mutation SubmitForgotPassword($input: ForgotPassRq!) {
2853
- authMsForgotPassword(input: $input)
2854
- }
2855
- `,
2856
- variables: {
2857
- input: {
2858
- newPassword,
2859
- principalId,
2860
- sourcePlatform,
2861
- verifCode
3010
+ request(btn) {
3011
+ const isApprove = btn.color !== 'danger';
3012
+ this.showAlert('Confirm', `Are you sure want to ${isApprove ? 'approve the approval?' : 'decline the approval? Please input the reason if you want to decline.'}`, [
3013
+ { text: 'Cancel', handler: () => btn.toggleLoading() },
3014
+ {
3015
+ text: `${isApprove ? 'Approve' : 'Decline'}`,
3016
+ handler: ({ reason }) => {
3017
+ this.sub?.unsubscribe();
3018
+ const variables = {
3019
+ ...(this.guid ? { guid: this.guid } : { approvalGroupGuid: '' }),
3020
+ isApprove,
3021
+ reason
3022
+ };
3023
+ this.sub = this.service.request(variables).subscribe({
3024
+ next: () => {
3025
+ this.showAlert('Success', `Approval ${isApprove ? 'approved' : 'declined'}`);
3026
+ this.router.navigateByUrl('approval');
3027
+ this.gridService.refreshGridCache('grid-approval-list');
3028
+ },
3029
+ error: ({ message }) => {
3030
+ btn.toggleLoading();
3031
+ this.showAlert('Error', message);
3032
+ }
3033
+ });
2862
3034
  }
2863
3035
  }
2864
- });
3036
+ ], [{ name: 'reason', type: 'textarea', placeholder: 'Reason' }]);
2865
3037
  }
2866
- updatePassword(input) {
2867
- return this.apollo.mutate({
2868
- mutation: gql `
2869
- mutation ChangePassword($input: ChangePassRq!) {
2870
- authMsChangePassword(input: $input)
2871
- }
2872
- `,
2873
- variables: { input }
2874
- });
3038
+ setLoading(b) {
3039
+ this.isLoading = b;
3040
+ this.ch.markForCheck();
2875
3041
  }
2876
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Apollo }, { token: ProfileService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2877
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthService, providedIn: 'root' }); }
3042
+ async showAlert(header, message, buttons = ['OK'], inputs = []) { (await this.alertCtrl.create({ header, message, buttons, inputs })).present(); }
3043
+ 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 }); }
3044
+ 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 }); }
2878
3045
  }
2879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthService, decorators: [{
2880
- type: Injectable,
2881
- args: [{
2882
- providedIn: 'root'
2883
- }]
2884
- }], ctorParameters: () => [{ type: i1$1.Apollo }, { type: ProfileService }] });
3046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalFormComponent, decorators: [{
3047
+ type: Component,
3048
+ args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
3049
+ class: 'px-4 d-block'
3050
+ }, imports: [
3051
+ IonicModule,
3052
+ CommonModule,
3053
+ FormInputComponent,
3054
+ FormTextareaComponent
3055
+ ], 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" }]
3056
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i0.ChangeDetectorRef }, { type: ApprovalService }, { type: GridService }, { type: i1.AlertController }, { type: PermissionService }], propDecorators: { isLoading: [{
3057
+ type: Input
3058
+ }] } });
2885
3059
 
2886
- class CurrencyService {
2887
- constructor(apollo) {
2888
- this.apollo = apollo;
3060
+ class ApprovalDetailComponent {
3061
+ constructor(router, activatedRoute) {
3062
+ this.router = router;
3063
+ this.activatedRoute = activatedRoute;
3064
+ this.btnConfig = [];
3065
+ this.guid = '';
2889
3066
  }
2890
- query() {
2891
- return this.apollo.query({
2892
- errorPolicy: 'all',
2893
- variables: {
2894
- input: {
2895
- page: 0,
2896
- pageSize: 300,
2897
- sortBy: 'name',
2898
- sortDirection: 'asc'
2899
- }
2900
- },
2901
- query: gql `
2902
- query QueryCurrency($input: CurrencyQueryCriteria!) {
2903
- webConfigMsCurrency(input: $input) {
2904
- data {
2905
- code
2906
- guid
2907
- magnifyValue
2908
- name
2909
- status
3067
+ ngOnInit() {
3068
+ this.sub = this.activatedRoute.queryParams.subscribe((params) => {
3069
+ if (params) {
3070
+ this.guids = params['guids'];
3071
+ this.isApprove = params['isApprove'] === 'true';
2910
3072
  }
2911
- }
2912
- }
2913
- `,
2914
3073
  });
2915
3074
  }
2916
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2917
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, providedIn: 'root' }); }
2918
- }
2919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CurrencyService, decorators: [{
2920
- type: Injectable,
2921
- args: [{
2922
- providedIn: 'root'
2923
- }]
2924
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
2925
-
2926
- class CountryService {
2927
- constructor(apollo) {
2928
- this.apollo = apollo;
2929
- }
2930
- query() {
2931
- return this.apollo.query({
2932
- errorPolicy: 'all',
2933
- variables: {
2934
- input: {
2935
- page: 0,
2936
- pageSize: 300,
2937
- sortBy: 'name',
2938
- sortDirection: 'asc'
3075
+ ngAfterViewInit() {
3076
+ if (this.guids) {
3077
+ this.setChildGuid('');
3078
+ this.changeTab(this.activatedRoute.snapshot.fragment);
3079
+ }
3080
+ else {
3081
+ this.setChildGuid(this.activatedRoute.children[0].snapshot.params['guid']);
3082
+ this.changeTab(this.activatedRoute.snapshot.fragment);
3083
+ this.sub = this.router.events.pipe(filter((e) => e instanceof NavigationEnd)).subscribe({
3084
+ next: () => {
3085
+ const newGuid = this.activatedRoute.children[0].snapshot.params['guid'];
3086
+ if (this.guid !== newGuid) {
3087
+ this.guid = newGuid;
3088
+ this.setChildGuid(this.guid);
3089
+ }
2939
3090
  }
2940
- },
2941
- query: gql `
2942
- query QueryCountry($input: CountryQueryCriteria!) {
2943
- webConfigMsCountry(input: $input) {
2944
- data {
2945
- code
2946
- defaultLangCode
2947
- guid
2948
- langCodes {
2949
- code
2950
- guid
2951
- }
2952
- name
2953
- phoneCodes {
2954
- code
2955
- }
2956
- }
2957
- }
3091
+ });
2958
3092
  }
2959
- `,
2960
- });
2961
3093
  }
2962
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CountryService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
2963
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CountryService, providedIn: 'root' }); }
3094
+ ngOnDestroy() { this.sub.unsubscribe(); }
3095
+ changeTab(f) {
3096
+ switch (f) {
3097
+ default:
3098
+ this.btnConfig = this.formComponent?.btnConfig ?? [];
3099
+ }
3100
+ }
3101
+ setChildGuid(guid) {
3102
+ this.formComponent?.setGuid(this.guids ?? [guid], this.isApprove);
3103
+ }
3104
+ 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 }); }
3105
+ 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 }); }
2964
3106
  }
2965
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: CountryService, decorators: [{
2966
- type: Injectable,
2967
- args: [{
2968
- providedIn: 'root'
2969
- }]
2970
- }], ctorParameters: () => [{ type: i1$1.Apollo }] });
3107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ApprovalDetailComponent, decorators: [{
3108
+ type: Component,
3109
+ args: [{ standalone: true, selector: 'up-approval-detail', changeDetection: ChangeDetectionStrategy.OnPush, host: {
3110
+ class: 'd-block h-100'
3111
+ }, imports: [
3112
+ IonicModule,
3113
+ CommonModule,
3114
+ TabsComponentModule,
3115
+ ButtonGroupComponent,
3116
+ ColumnHeaderContainerComponent,
3117
+ ApprovalFormComponent
3118
+ ], 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" }]
3119
+ }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }], propDecorators: { formComponent: [{
3120
+ type: ViewChild,
3121
+ args: [ApprovalFormComponent]
3122
+ }] } });
2971
3123
 
2972
3124
  class AuthResolver {
2973
3125
  isUserLoggedIn() {
@@ -3043,10 +3195,10 @@ class AuthResolver {
3043
3195
  buffer = chars.indexOf(buffer);
3044
3196
  return output;
3045
3197
  }
3046
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3047
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthResolver, providedIn: 'root' }); }
3198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3199
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, providedIn: 'root' }); }
3048
3200
  }
3049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AuthResolver, decorators: [{
3201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AuthResolver, decorators: [{
3050
3202
  type: Injectable,
3051
3203
  args: [{
3052
3204
  providedIn: 'root'
@@ -3071,10 +3223,10 @@ class HeaderInterceptor {
3071
3223
  }
3072
3224
  }));
3073
3225
  }
3074
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: HeaderInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3075
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: HeaderInterceptor }); }
3226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3227
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor }); }
3076
3228
  }
3077
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: HeaderInterceptor, decorators: [{
3229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: HeaderInterceptor, decorators: [{
3078
3230
  type: Injectable
3079
3231
  }] });
3080
3232
 
@@ -3109,12 +3261,12 @@ class RefreshTokenInterceptor {
3109
3261
  return throwError(() => errors[0]);
3110
3262
  }));
3111
3263
  }
3112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RefreshTokenInterceptor, deps: [{ token: i1$2.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3113
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RefreshTokenInterceptor }); }
3264
+ 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 }); }
3265
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RefreshTokenInterceptor }); }
3114
3266
  }
3115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: RefreshTokenInterceptor, decorators: [{
3267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RefreshTokenInterceptor, decorators: [{
3116
3268
  type: Injectable
3117
3269
  }], ctorParameters: () => [{ type: i1$2.Router }, { type: AuthService }] });
3118
3270
 
3119
- 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 };
3271
+ 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 };
3120
3272
  //# sourceMappingURL=unipin-angular-applet.mjs.map