@yomotech/view-toolkit 0.0.4 → 0.0.5

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.
@@ -1,44 +1,135 @@
1
- import * as i7 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
1
+ import * as i5 from '@angular/common';
2
+ import { CommonModule, NgIf } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Injectable, EventEmitter, NgZone, Output, Input, NgModule } from '@angular/core';
5
- import * as i8 from '@angular/forms';
4
+ import { EventEmitter, Output, Input, Component, Injectable, NgZone, NgModule, HostListener, ViewChild, Inject } from '@angular/core';
5
+ import * as i2 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
- import * as i1 from '@angular/common/http';
7
+ import * as i1$1 from '@angular/common/http';
8
8
  import { HttpHeaders } from '@angular/common/http';
9
9
  import { CapacitorHttp, Capacitor } from '@capacitor/core';
10
10
  import * as i9 from 'ng-zorro-antd/icon';
11
11
  import { NzIconModule } from 'ng-zorro-antd/icon';
12
12
  import * as i11 from 'ng-zorro-antd/button';
13
13
  import { NzButtonModule } from 'ng-zorro-antd/button';
14
- import * as i14 from 'ng-zorro-antd/date-picker';
14
+ import * as i5$2 from 'ng-zorro-antd/date-picker';
15
15
  import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
16
16
  import * as i4 from 'ng-zorro-antd/modal';
17
17
  import { NzModalModule } from 'ng-zorro-antd/modal';
18
18
  import * as i10 from 'primeng/datepicker';
19
19
  import { DatePickerModule } from 'primeng/datepicker';
20
+ import * as i1 from '@angular/cdk/platform';
21
+ import { PlatformModule } from '@angular/cdk/platform';
20
22
  import { Preferences } from '@capacitor/preferences';
21
23
  import { loadStripe } from '@stripe/stripe-js';
22
24
  import { lastValueFrom } from 'rxjs';
23
- import * as i1$1 from '@angular/cdk/platform';
24
- import * as i5 from 'angular-oauth2-oidc';
25
+ import * as i5$1 from 'angular-oauth2-oidc';
25
26
  import * as i12 from 'ng-zorro-antd/core/transition-patch';
26
27
  import * as i13 from 'ng-zorro-antd/core/wave';
28
+ import * as i3 from 'ng-zorro-antd/select';
29
+ import { NzSelectModule } from 'ng-zorro-antd/select';
30
+ import * as i7 from 'ng-zorro-antd/table';
31
+ import { NzTableModule } from 'ng-zorro-antd/table';
32
+ import * as i9$1 from 'primeng/button';
33
+ import { ButtonModule } from 'primeng/button';
34
+ import * as i1$2 from 'ngx-toastr';
35
+ import * as i4$1 from '@okta/okta-angular';
36
+ import { OKTA_AUTH } from '@okta/okta-angular';
37
+ import * as i2$2 from 'primeng/autocomplete';
38
+ import { AutoCompleteModule } from 'primeng/autocomplete';
39
+ import * as i2$1 from 'primeng/inputtext';
40
+ import { InputTextModule } from 'primeng/inputtext';
41
+ import { SelectModule } from 'primeng/select';
42
+ import OktaAuth from '@okta/okta-auth-js';
43
+ import { jwtDecode } from 'jwt-decode';
44
+ import * as i8 from 'primeng/dynamicdialog';
45
+ import { DynamicDialogModule } from 'primeng/dynamicdialog';
46
+ import { Device } from '@capacitor/device';
47
+ import * as i1$3 from 'ng-zorro-antd/i18n';
48
+ import { de_DE, en_US } from 'ng-zorro-antd/i18n';
49
+ import * as i12$1 from 'ng-zorro-antd/menu';
50
+ import { NzMenuModule } from 'ng-zorro-antd/menu';
51
+ import * as i14 from 'ng-zorro-antd/tooltip';
52
+ import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
27
53
  import { App } from '@capacitor/app';
28
54
  import { Browser } from '@capacitor/browser';
29
55
  import { OAuth2Client } from '@byteowls/capacitor-oauth2';
30
- import * as i1$2 from 'ngx-toastr';
31
56
  import PouchDB from 'pouchdb';
32
57
  import JSZip from 'jszip';
33
58
 
34
- class GridComponent {
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: GridComponent, isStandalone: true, selector: "vt-grid", ngImport: i0, template: "<p>grid works!</p>\r\n", styles: [""] });
59
+ class PaginationComponent {
60
+ platform;
61
+ itemInfo = {
62
+ layoutSchema: {},
63
+ propertySchema: {},
64
+ data: []
65
+ };
66
+ pageSize;
67
+ currentPage = 0;
68
+ pages = [];
69
+ pageSizeChange = new EventEmitter();
70
+ onGoToPage = new EventEmitter();
71
+ isMobile = false;
72
+ constructor(platform) {
73
+ this.platform = platform;
74
+ }
75
+ ngOnInit() {
76
+ if (this.platform.ANDROID || this.platform.IOS) {
77
+ this.isMobile = true;
78
+ }
79
+ }
80
+ invokeOnPageSizeChange(pageSize) {
81
+ this.pageSizeChange.emit(pageSize);
82
+ }
83
+ invokeGoToPage(page) {
84
+ this.onGoToPage.emit(page);
85
+ }
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PaginationComponent, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component });
87
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: PaginationComponent, isStandalone: true, selector: "vl-pagination", inputs: { itemInfo: "itemInfo", pageSize: "pageSize", currentPage: "currentPage", pages: "pages" }, outputs: { pageSizeChange: "pageSizeChange", onGoToPage: "onGoToPage" }, ngImport: i0, template: "<div [class]=\"itemInfo?.layoutSchema?.pagination?.style?.classes[0]\">\r\n <ul class=\"pagination\" [ngStyle]=\"{ 'z-index': isMobile ? 99999 : 'auto' }\">\r\n <li (click)=\"invokeGoToPage(0)\" [class.disabled]=\"currentPage === 0\">\u00AB\u00AB</li>\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [class.disabled]=\"currentPage === 0\">\u00AB</li>\r\n <li *ngFor=\"let page of pages\" [class.active]=\"currentPage === page\" (click)=\"invokeGoToPage(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [class.disabled]=\"currentPage === pages.length -1\">\r\n \u00BB\r\n </li>\r\n <li (click)=\"invokeGoToPage(pages.length -1)\" [class.disabled]=\"currentPage === pages.length -1\">\r\n \u00BB\u00BB\r\n </li>\r\n </ul>\r\n\r\n <!-- Page Size Dropdown -->\r\n <label *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" for=\"pageSize\">{{\r\n itemInfo?.layoutSchema?.pagination?.caption }}</label>\r\n <select *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" id=\"pageSize\" [(ngModel)]=\"pageSize\"\r\n (change)=\"invokeOnPageSizeChange(pageSize)\">\r\n <option *ngFor=\"let size of [5, 10, 15, 20]\" [value]=\"size\">{{ size }}</option>\r\n </select>\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PlatformModule }] });
37
88
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: GridComponent, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PaginationComponent, decorators: [{
39
90
  type: Component,
40
- args: [{ selector: 'vt-grid', imports: [], standalone: true, template: "<p>grid works!</p>\r\n" }]
41
- }] });
91
+ args: [{ standalone: true, selector: 'vl-pagination', imports: [
92
+ CommonModule,
93
+ FormsModule,
94
+ PlatformModule
95
+ ], template: "<div [class]=\"itemInfo?.layoutSchema?.pagination?.style?.classes[0]\">\r\n <ul class=\"pagination\" [ngStyle]=\"{ 'z-index': isMobile ? 99999 : 'auto' }\">\r\n <li (click)=\"invokeGoToPage(0)\" [class.disabled]=\"currentPage === 0\">\u00AB\u00AB</li>\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [class.disabled]=\"currentPage === 0\">\u00AB</li>\r\n <li *ngFor=\"let page of pages\" [class.active]=\"currentPage === page\" (click)=\"invokeGoToPage(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [class.disabled]=\"currentPage === pages.length -1\">\r\n \u00BB\r\n </li>\r\n <li (click)=\"invokeGoToPage(pages.length -1)\" [class.disabled]=\"currentPage === pages.length -1\">\r\n \u00BB\u00BB\r\n </li>\r\n </ul>\r\n\r\n <!-- Page Size Dropdown -->\r\n <label *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" for=\"pageSize\">{{\r\n itemInfo?.layoutSchema?.pagination?.caption }}</label>\r\n <select *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" id=\"pageSize\" [(ngModel)]=\"pageSize\"\r\n (change)=\"invokeOnPageSizeChange(pageSize)\">\r\n <option *ngFor=\"let size of [5, 10, 15, 20]\" [value]=\"size\">{{ size }}</option>\r\n </select>\r\n</div>" }]
96
+ }], ctorParameters: () => [{ type: i1.Platform }], propDecorators: { itemInfo: [{
97
+ type: Input
98
+ }], pageSize: [{
99
+ type: Input
100
+ }], currentPage: [{
101
+ type: Input
102
+ }], pages: [{
103
+ type: Input
104
+ }], pageSizeChange: [{
105
+ type: Output
106
+ }], onGoToPage: [{
107
+ type: Output
108
+ }] } });
109
+
110
+ let String$1 = class String {
111
+ formField;
112
+ modalItemInfo;
113
+ getScope(scope) {
114
+ let propertyScope = "";
115
+ let start = scope?.indexOf("#/") + 2;
116
+ let end = scope?.indexOf("/", start);
117
+ if (start && end) {
118
+ propertyScope = scope.substring(start, end);
119
+ }
120
+ return propertyScope;
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: String, deps: [], target: i0.ɵɵFactoryTarget.Component });
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: String, isStandalone: true, selector: "vl-string", inputs: { formField: "formField", modalItemInfo: "modalItemInfo" }, ngImport: i0, template: "<h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n</h5>", styles: [""] });
124
+ };
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: String$1, decorators: [{
126
+ type: Component,
127
+ args: [{ selector: 'vl-string', standalone: true, template: "<h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n</h5>" }]
128
+ }], propDecorators: { formField: [{
129
+ type: Input
130
+ }], modalItemInfo: [{
131
+ type: Input
132
+ }] } });
42
133
 
43
134
  class RequestService {
44
135
  http;
@@ -154,7 +245,7 @@ class RequestService {
154
245
  return this.http.post(url, {}, { headers });
155
246
  // }
156
247
  }
157
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: RequestService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
248
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: RequestService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
158
249
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: RequestService, providedIn: 'root' });
159
250
  }
160
251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: RequestService, decorators: [{
@@ -162,7 +253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
162
253
  args: [{
163
254
  providedIn: 'root'
164
255
  }]
165
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
256
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }] });
166
257
 
167
258
  // import { Couchdb } from './couchdb';
168
259
  class UtilityService {
@@ -678,7 +769,7 @@ class UtilityService {
678
769
  const offM = pad(Math.abs(offset) % 60);
679
770
  return `${year}-${month}-${day}T${hrs}:${mins}:00${sign}${offH}:${offM}`;
680
771
  }
681
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, deps: [{ token: i1$1.Platform }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Injectable });
772
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, deps: [{ token: i1.Platform }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Injectable });
682
773
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, providedIn: 'root' });
683
774
  }
684
775
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, decorators: [{
@@ -686,7 +777,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
686
777
  args: [{
687
778
  providedIn: 'root'
688
779
  }]
689
- }], ctorParameters: () => [{ type: i1$1.Platform }, { type: RequestService }] });
780
+ }], ctorParameters: () => [{ type: i1.Platform }, { type: RequestService }] });
690
781
 
691
782
  class CardComponent {
692
783
  utilityService;
@@ -1079,12 +1170,14 @@ class CardComponent {
1079
1170
  }
1080
1171
  return propertyScope;
1081
1172
  }
1082
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CardComponent, deps: [{ token: UtilityService }, { token: i1$1.Platform }, { token: i1.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i4.NzModalService }, { token: i5.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
1083
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: CardComponent, isStandalone: true, selector: "vt-card", inputs: { itemInfo: "itemInfo", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<span *ngIf=\"this.selectedLanguageInfo?.selectedLanguage\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize && itemInfo?.layoutSchema?.pagination?.top\">\r\n <!-- <app-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </app-pagination> -->\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements\" [style]=\"getStyleWithoutClasses(itemInfo?.header?.style).style\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.header?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.header?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\" [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <!-- <app-string [formField]=\"element\" [modalItemInfo]=\"itemInfo\">\r\n </app-string> -->\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker (ngModelChange)=\"dateChangeEvent(element, $event)\" [showIcon]=\"true\" type=\"number\"\r\n inputmode=\"numeric\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onFocus)=\"forceNumericKeyboard($event)\" (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div [class]=\"itemInfo.class\" [style]=\"itemInfo.style\">\r\n <div *ngFor=\"let record of itemInfo.data; let k = index\"\r\n [ngClass]=\"itemInfo.layoutSchema.pagination ? itemInfo.layoutSchema.pagination ? cardPerRow + itemInfo.layoutSchema?.stylePerCard?.elementPerRow[k % itemInfo.layoutSchema?.stylePerCard?.elementPerRow.length] : '' : ''\">\r\n <div [class]=\"itemInfo.layoutSchema?.stylePerCard?.classes[0]\">\r\n <div *ngFor=\"let layout of itemInfo.layoutSchema.cards\">\r\n <ng-container\r\n [ngSwitch]=\"layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"layout?.option?.src ? layout?.option?.src : record[layout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ layout.label ? layout.label : getProperty(layout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(layout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{ record[layout.scope?.reference.split('/').pop()] | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"invokeButtonClick(layout, record, k)\">\r\n <ng-container *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [src]=\"innerLayout?.option?.src ? innerLayout?.option?.src : record[innerLayout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ innerLayout.label ? innerLayout.label : getProperty(innerLayout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(innerLayout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] &&itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{ record[innerLayout.scope?.reference.split('/').pop()] | currency:\r\n innerLayout.option?.currency ?\r\n innerLayout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(innerLayout, record, k)\">\r\n <ng-container *ngIf=\"!innerLayout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"innerLayout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ innerLayout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker [required]=\"element.option.required\" [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <!-- <div *ngIf=\"itemInfo?.layoutSchema?.pagination && itemInfo?.layoutSchema?.pagination?.bottom\">\r\n <app-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </app-pagination>\r\n </div> -->\r\n</span>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i10.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i13.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i14.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "pipe", type: i7.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i7.DatePipe, name: "date" }] });
1173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CardComponent, deps: [{ token: UtilityService }, { token: i1.Platform }, { token: i1$1.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i4.NzModalService }, { token: i5$1.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
1174
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: CardComponent, isStandalone: true, selector: "vl-card", inputs: { itemInfo: "itemInfo", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<span *ngIf=\"this.selectedLanguageInfo?.selectedLanguage\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize && itemInfo?.layoutSchema?.pagination?.top\">\r\n <vl-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements\" [style]=\"getStyleWithoutClasses(itemInfo?.header?.style).style\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.header?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.header?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\" [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\" [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker (ngModelChange)=\"dateChangeEvent(element, $event)\" [showIcon]=\"true\" type=\"number\"\r\n inputmode=\"numeric\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onFocus)=\"forceNumericKeyboard($event)\" (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div [class]=\"itemInfo.class\" [style]=\"itemInfo.style\">\r\n <div *ngFor=\"let record of itemInfo.data; let k = index\"\r\n [ngClass]=\"itemInfo.layoutSchema.pagination ? itemInfo.layoutSchema.pagination ? cardPerRow + itemInfo.layoutSchema?.stylePerCard?.elementPerRow[k % itemInfo.layoutSchema?.stylePerCard?.elementPerRow.length] : '' : ''\">\r\n <div [class]=\"itemInfo.layoutSchema?.stylePerCard?.classes[0]\">\r\n <div *ngFor=\"let layout of itemInfo.layoutSchema.cards\">\r\n <ng-container\r\n [ngSwitch]=\"layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"layout?.option?.src ? layout?.option?.src : record[layout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ layout.label ? layout.label : getProperty(layout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(layout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{ record[layout.scope?.reference.split('/').pop()] | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"invokeButtonClick(layout, record, k)\">\r\n <ng-container *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [src]=\"innerLayout?.option?.src ? innerLayout?.option?.src : record[innerLayout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ innerLayout.label ? innerLayout.label : getProperty(innerLayout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(innerLayout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] &&itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{ record[innerLayout.scope?.reference.split('/').pop()] | currency:\r\n innerLayout.option?.currency ?\r\n innerLayout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(innerLayout, record, k)\">\r\n <ng-container *ngIf=\"!innerLayout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"innerLayout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ innerLayout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker [required]=\"element.option.required\" [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination && itemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n</span>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i10.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i13.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$2.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type:
1175
+ // StringComponent,
1176
+ PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }] });
1084
1177
  }
1085
1178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CardComponent, decorators: [{
1086
1179
  type: Component,
1087
- args: [{ selector: 'vt-card', imports: [
1180
+ args: [{ selector: 'vl-card', imports: [
1088
1181
  CommonModule,
1089
1182
  FormsModule,
1090
1183
  NzIconModule,
@@ -1093,9 +1186,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1093
1186
  NzDatePickerModule,
1094
1187
  NzModalModule,
1095
1188
  // StringComponent,
1096
- // PaginationComponent
1097
- ], standalone: true, template: "<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<span *ngIf=\"this.selectedLanguageInfo?.selectedLanguage\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize && itemInfo?.layoutSchema?.pagination?.top\">\r\n <!-- <app-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </app-pagination> -->\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements\" [style]=\"getStyleWithoutClasses(itemInfo?.header?.style).style\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.header?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.header?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\" [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <!-- <app-string [formField]=\"element\" [modalItemInfo]=\"itemInfo\">\r\n </app-string> -->\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker (ngModelChange)=\"dateChangeEvent(element, $event)\" [showIcon]=\"true\" type=\"number\"\r\n inputmode=\"numeric\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onFocus)=\"forceNumericKeyboard($event)\" (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div [class]=\"itemInfo.class\" [style]=\"itemInfo.style\">\r\n <div *ngFor=\"let record of itemInfo.data; let k = index\"\r\n [ngClass]=\"itemInfo.layoutSchema.pagination ? itemInfo.layoutSchema.pagination ? cardPerRow + itemInfo.layoutSchema?.stylePerCard?.elementPerRow[k % itemInfo.layoutSchema?.stylePerCard?.elementPerRow.length] : '' : ''\">\r\n <div [class]=\"itemInfo.layoutSchema?.stylePerCard?.classes[0]\">\r\n <div *ngFor=\"let layout of itemInfo.layoutSchema.cards\">\r\n <ng-container\r\n [ngSwitch]=\"layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"layout?.option?.src ? layout?.option?.src : record[layout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ layout.label ? layout.label : getProperty(layout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(layout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{ record[layout.scope?.reference.split('/').pop()] | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"invokeButtonClick(layout, record, k)\">\r\n <ng-container *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [src]=\"innerLayout?.option?.src ? innerLayout?.option?.src : record[innerLayout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ innerLayout.label ? innerLayout.label : getProperty(innerLayout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(innerLayout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] &&itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{ record[innerLayout.scope?.reference.split('/').pop()] | currency:\r\n innerLayout.option?.currency ?\r\n innerLayout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(innerLayout, record, k)\">\r\n <ng-container *ngIf=\"!innerLayout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"innerLayout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ innerLayout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker [required]=\"element.option.required\" [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <!-- <div *ngIf=\"itemInfo?.layoutSchema?.pagination && itemInfo?.layoutSchema?.pagination?.bottom\">\r\n <app-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </app-pagination>\r\n </div> -->\r\n</span>" }]
1098
- }], ctorParameters: () => [{ type: UtilityService }, { type: i1$1.Platform }, { type: i1.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i4.NzModalService }, { type: i5.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
1189
+ PaginationComponent,
1190
+ String$1
1191
+ ], standalone: true, template: "<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<span *ngIf=\"this.selectedLanguageInfo?.selectedLanguage\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize && itemInfo?.layoutSchema?.pagination?.top\">\r\n <vl-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements\" [style]=\"getStyleWithoutClasses(itemInfo?.header?.style).style\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.header?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.header?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\" [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\" [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker (ngModelChange)=\"dateChangeEvent(element, $event)\" [showIcon]=\"true\" type=\"number\"\r\n inputmode=\"numeric\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onFocus)=\"forceNumericKeyboard($event)\" (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div [class]=\"itemInfo.class\" [style]=\"itemInfo.style\">\r\n <div *ngFor=\"let record of itemInfo.data; let k = index\"\r\n [ngClass]=\"itemInfo.layoutSchema.pagination ? itemInfo.layoutSchema.pagination ? cardPerRow + itemInfo.layoutSchema?.stylePerCard?.elementPerRow[k % itemInfo.layoutSchema?.stylePerCard?.elementPerRow.length] : '' : ''\">\r\n <div [class]=\"itemInfo.layoutSchema?.stylePerCard?.classes[0]\">\r\n <div *ngFor=\"let layout of itemInfo.layoutSchema.cards\">\r\n <ng-container\r\n [ngSwitch]=\"layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"layout?.option?.src ? layout?.option?.src : record[layout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ layout.label ? layout.label : getProperty(layout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(layout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\" [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\" [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{ record[layout.scope?.reference.split('/').pop()] | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"invokeButtonClick(layout, record, k)\">\r\n <ng-container *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n <!-- Image Control -->\r\n <div *ngSwitchCase=\"'image'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- <img [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [src]=\"innerLayout?.option?.src ? innerLayout?.option?.src : record[innerLayout.scope?.reference.split('/').pop()]\"\r\n alt=\"{{ innerLayout.label ? innerLayout.label : getProperty(innerLayout.scope?.reference).productSchema.caption }}\"\r\n (click)=\"showImageDetails(innerLayout.option, record)\" /> -->\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3 *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] &&itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{ record[innerLayout.scope?.reference.split('/').pop()] | currency:\r\n innerLayout.option?.currency ?\r\n innerLayout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"innerLayout.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"innerLayout.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"innerLayout.label?.style?.classes?.[0]\">\r\n {{ innerLayout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3 *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container *ngIf=\"innerLayout.option?.dateFormat; else checkTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.dateFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template #checkTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ? (record[innerLayout.scope?.reference.split('/').pop()] | date:\r\n innerLayout.option.timeFormat)\r\n : '--'\r\n }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template #normalValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?? '--'\r\n }}\r\n </ng-template>\r\n\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(innerLayout, record, k)\">\r\n <ng-container *ngIf=\"!innerLayout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"innerLayout.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ innerLayout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\" [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{ element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker [required]=\"element.option.required\" [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\" [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination && itemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"itemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n</span>" }]
1192
+ }], ctorParameters: () => [{ type: UtilityService }, { type: i1.Platform }, { type: i1$1.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i4.NzModalService }, { type: i5$1.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
1099
1193
  type: Input
1100
1194
  }], currentPage: [{
1101
1195
  type: Input
@@ -1120,135 +1214,1250 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1120
1214
  }] } });
1121
1215
 
1122
1216
  class FormComponent {
1217
+ customEmailPattern = '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$';
1218
+ showPassword = false;
1219
+ formCopy = {};
1220
+ errorMessages = {};
1221
+ creditCardError = {};
1222
+ form = {};
1223
+ selectedLanguageInfo = {};
1224
+ formButtonClick = new EventEmitter();
1225
+ checkBoxChangeEvent = new EventEmitter();
1226
+ constructor() { }
1227
+ ngOnInit() {
1228
+ }
1229
+ ngOnChanges(changes) {
1230
+ setTimeout(() => {
1231
+ if (changes['form'] && this.form) {
1232
+ this.formCopy = JSON.parse(JSON.stringify(this.form));
1233
+ }
1234
+ if ((changes['selectedLanguageInfo'] || this.selectedLanguageInfo) && this.selectedLanguageInfo.selectedLanguage) {
1235
+ if (this.selectedLanguageInfo?.errorMessages) {
1236
+ this.errorMessages = this.selectedLanguageInfo.errorMessages;
1237
+ }
1238
+ this.form.propertySchema = this.formCopy.propertySchema ? JSON.parse(JSON.stringify(this.formCopy.propertySchema)) : {};
1239
+ this.form.propertySchema = this.translateSchema(this.form.propertySchema, this.selectedLanguageInfo.selectedLanguage);
1240
+ if (this.formCopy.layoutSchema && this.formCopy.layoutSchema.formSections) {
1241
+ this.formCopy.layoutSchema.formSections.forEach((formSection, index) => {
1242
+ if (formSection?.label?.caption && this.selectedLanguageInfo.selectedLanguage[formSection.label.caption]) {
1243
+ this.form.layoutSchema.formSections[index].label.caption = this.selectedLanguageInfo.selectedLanguage[formSection.label.caption];
1244
+ }
1245
+ if (formSection.formFields && formSection.formFields.length > 0) {
1246
+ formSection.formFields.forEach((formField, fieldIndex) => {
1247
+ if (formField.label?.caption && this.selectedLanguageInfo.selectedLanguage[formField.label.caption]) {
1248
+ this.form.layoutSchema.formSections[index].formFields[fieldIndex].label.caption = this.selectedLanguageInfo.selectedLanguage[formField.label.caption];
1249
+ }
1250
+ });
1251
+ }
1252
+ });
1253
+ }
1254
+ }
1255
+ }, 1000);
1256
+ }
1257
+ translateSchema(schema, SelectedLanguage) {
1258
+ if (schema && typeof schema === 'object' && SelectedLanguage) {
1259
+ for (const key of Object.keys(schema)) {
1260
+ const val = schema[key];
1261
+ // If nested object → recurse
1262
+ if (val && typeof val === 'object' && !Array.isArray(val)) {
1263
+ this.translateSchema(val, SelectedLanguage);
1264
+ }
1265
+ // If array → loop items and recurse each one
1266
+ if (Array.isArray(val)) {
1267
+ val.forEach((item) => {
1268
+ if (item && typeof item === 'object') {
1269
+ this.translateSchema(item, SelectedLanguage);
1270
+ }
1271
+ });
1272
+ }
1273
+ // Translate caption
1274
+ if (val &&
1275
+ typeof val === 'object' &&
1276
+ typeof val.caption === 'string' &&
1277
+ val.caption.trim()) {
1278
+ const original = val.caption.trim();
1279
+ if (SelectedLanguage[original]) {
1280
+ val.caption = SelectedLanguage[original];
1281
+ }
1282
+ }
1283
+ // Translate placeholder
1284
+ if (val &&
1285
+ typeof val === 'object' &&
1286
+ typeof val.placeholder === 'string' &&
1287
+ val.placeholder.trim()) {
1288
+ const original = val.placeholder.trim();
1289
+ if (SelectedLanguage[original]) {
1290
+ val.placeholder = SelectedLanguage[original];
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ return schema;
1296
+ }
1297
+ togglePasswordVisibility() {
1298
+ this.showPassword = !this.showPassword;
1299
+ }
1300
+ ngAfterViewInit() {
1301
+ setTimeout(() => {
1302
+ this.setValidations();
1303
+ }, 2000);
1304
+ }
1305
+ getStyleWithoutClasses(styleObject) {
1306
+ if (!styleObject) {
1307
+ return { classes: '', style: {} };
1308
+ }
1309
+ const { classes, ...styleWithoutClasses } = styleObject;
1310
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
1311
+ }
1312
+ getScope(scope) {
1313
+ let propertyScope = "";
1314
+ let start = scope?.indexOf("#/") + 2;
1315
+ let end = scope?.indexOf("/", start);
1316
+ if (start && end) {
1317
+ propertyScope = scope.substring(start, end);
1318
+ }
1319
+ return propertyScope;
1320
+ }
1321
+ invokeFormBtnClick(option, propertySchema) {
1322
+ this.formButtonClick.emit({ option: option, propertySchema: propertySchema });
1323
+ }
1324
+ setformData() {
1325
+ this.checkBoxChangeEvent.emit();
1326
+ }
1327
+ setErroMessage(formField, errorMessages, field) {
1328
+ let error = "";
1329
+ let fieldName = "";
1330
+ if (field?.errors?.required) {
1331
+ error = errorMessages.required;
1332
+ }
1333
+ else if (field?.errors?.email || field.errors?.pattern) {
1334
+ error = errorMessages.pattern;
1335
+ }
1336
+ else if (field?.errors?.minlength) {
1337
+ error = errorMessages.minlength;
1338
+ }
1339
+ else if (field?.errors?.maxlength) {
1340
+ error = errorMessages.maxlength;
1341
+ }
1342
+ if (formField.label?.value) {
1343
+ fieldName = formField.label?.value;
1344
+ }
1345
+ else {
1346
+ let propertySchema = this.form.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()];
1347
+ fieldName = propertySchema?.caption ? propertySchema.caption : propertySchema?.placeholder;
1348
+ }
1349
+ if (error && error.toString().includes("{{requiredLength}}")) {
1350
+ error = error.replace(/{{\s*requiredLength\s*}}/g, formField?.minlength.toString());
1351
+ }
1352
+ return error.replace(/{{\s*field\s*}}/g, fieldName);
1353
+ }
1354
+ setValidations() {
1355
+ if (this.form?.layoutSchema?.formSections?.length) {
1356
+ this.form?.layoutSchema?.formSections.forEach((formSection) => {
1357
+ if (formSection?.formFields?.length) {
1358
+ formSection.formFields.forEach((formField) => {
1359
+ if (formField.scope && this.form.propertySchema && Object.keys(this.form.propertySchema)?.length && this.form.propertySchema[this.getScope(formField.scope?.reference)]) {
1360
+ let validations = this.form.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.validation;
1361
+ if (validations?.length > 0) {
1362
+ validations.forEach((validation) => {
1363
+ if (validation.required) {
1364
+ formField['required'] = true;
1365
+ }
1366
+ if (validation.email) {
1367
+ formField['email'] = true;
1368
+ }
1369
+ if (validation.minlength) {
1370
+ formField['minlength'] = validation.minlength;
1371
+ }
1372
+ if (validation.maxlength) {
1373
+ formField['maxlength'] = validation.maxlength;
1374
+ }
1375
+ });
1376
+ }
1377
+ }
1378
+ });
1379
+ }
1380
+ });
1381
+ }
1382
+ }
1123
1383
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1124
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: FormComponent, isStandalone: true, selector: "vt-form", ngImport: i0, template: "<p>form works!</p>\r\n", styles: [""] });
1384
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent" }, usesOnChanges: true, ngImport: i0, template: "<div [style]=\"getStyleWithoutClasses(form?.layoutSchema?.style).style\" [class]=\"form?.layoutSchema?.style?.classes[0]\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <span *ngFor=\"let formSection of form?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection.label.caption\" [class]=\"formSection?.label?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\r\n {{formSection.label.caption}}\r\n </div>\r\n <div [class]=\"formSection?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(formSection?.style).style\"\r\n *ngIf=\"formSection.formFields?.length > 0\">\r\n <div *ngFor=\"let formField of formSection.formFields\" [class]=\"formField?.style?.classes[0]\">\r\n <div\r\n [ngSwitch]=\"formField?.scope?.reference && form.propertySchema[getScope(formField.scope?.reference)] ?\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- image control -->\r\n <div *ngSwitchCase=\"'image'\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <img [src]=\"formField.option.src\" [alt]=\"'img'\" />\r\n </div>\r\n\r\n <!-- credit card control -->\r\n <div *ngSwitchCase=\"'carditCard'\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n </div>\r\n <!-- Used to display form errors -->\r\n <div id=\"card-errors\" [class]=\"creditCardError.textContent!=='' ? 'text-red-400 m-0': ''\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <span *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"formField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value ?\r\n formField.label?.value : formField.label?.caption ? formField.label?.caption :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <div\r\n [ngStyle]=\"formField?.option.password ? {'position':'relative','display':'flex','align-items':'center'} : {}\">\r\n <input [type]=\"formField?.option.password ? !showPassword ? 'password' : 'text' : 'text'\"\r\n #inputField=\"ngModel\" [required]=\"formField?.required\" [attr.inputmode]=\"\r\n formField?.option?.email ? 'email' :\r\n formField?.option?.password ? 'numeric' :\r\n 'text'\" [pattern]=\"formField?.email ? customEmailPattern : ''\" [email]=\"formField?.email\"\r\n [class]=\"formField?.scope?.style?.classes[0]\" [minlength]=\"formField?.minlength\"\r\n [maxlength]=\"formField?.maxlength\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n\r\n <!-- Eye Icon -->\r\n <i *ngIf=\"formField?.option.password\" class=\"fa\"\r\n [ngClass]=\"showPassword ? 'fa-eye' : 'fa-eye-slash'\" (click)=\"togglePasswordVisibility()\"\r\n style=\"position: absolute; right: 10px; cursor: pointer;\">\r\n </i>\r\n </div>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p [class]=\"formField?.layout == 'horizontal' ? 'text-red-400 m-0 horizontal-error' : 'text-red-400 m-0'\"\r\n *ngIf=\"inputField?.errors\">{{ setErroMessage(formField, errorMessages, inputField) }}</p>\r\n </div>\r\n </span>\r\n </span>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"formField.option.protected\" [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:formField.option.currency :true: formField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- checkBox control -->\r\n <div *ngSwitchCase=\"'checkbox'\" class=\"form-group\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <label class=\"form-check-label\"><input type=\"checkbox\" class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" (ngModelChange)=\"setformData()\" />{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\"\r\n [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label class=\"form-check-label\">{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n <input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" /></label>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" [class]=\"formField?.scope?.style?.classes[0]\" #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField.option.optionValue\"> {{ formField.option.optionLabel}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\" #dropdownField=\"ngModel\"\r\n [required]=\"formField?.required\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField.option.optionLabel]\"\r\n [nzValue]=\"item[formField.option.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p [class]=\"formField?.layout == 'horizontal' ? 'text-red-400 m-0 horizontal-error' : 'text-red-400 m-0'\"\r\n *ngIf=\"dropdownField?.errors\">{{ setErroMessage(formField, errorMessages, dropdownField) }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(formField.style).style\"\r\n (click)=\"invokeFormBtnClick(formField.option, form.propertySchema)\"\r\n [class]=\"formField?.style?.classes[0]\">\r\n {{ formField.label?.caption }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </span>\r\n </form>\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type:
1385
+ // Angular
1386
+ CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type:
1387
+ // NG-ZORRO
1388
+ NzSelectModule }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }] });
1125
1389
  }
1126
1390
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: FormComponent, decorators: [{
1127
1391
  type: Component,
1128
- args: [{ selector: 'vt-form', imports: [], standalone: true, template: "<p>form works!</p>\r\n" }]
1129
- }] });
1130
-
1131
- class PaginationComponent {
1132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1133
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: PaginationComponent, isStandalone: true, selector: "vt-pagination", ngImport: i0, template: "<p>pagination works!</p>\r\n", styles: [""] });
1134
- }
1135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PaginationComponent, decorators: [{
1136
- type: Component,
1137
- args: [{ selector: 'vt-pagination', imports: [], standalone: true, template: "<p>pagination works!</p>\r\n" }]
1138
- }] });
1139
-
1140
- // lib/view-toolkit.module.ts
1141
- class ViewToolkitModule {
1142
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1143
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, imports: [CommonModule,
1144
- CardComponent,
1145
- FormComponent,
1146
- GridComponent,
1147
- PaginationComponent], exports: [CardComponent,
1148
- FormComponent,
1149
- GridComponent,
1150
- PaginationComponent] });
1151
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, imports: [CommonModule,
1152
- CardComponent] });
1153
- }
1154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, decorators: [{
1155
- type: NgModule,
1156
- args: [{
1157
- imports: [
1392
+ args: [{ standalone: true, imports: [
1393
+ // Angular
1158
1394
  CommonModule,
1159
- CardComponent,
1160
- FormComponent,
1161
- GridComponent,
1162
- PaginationComponent
1163
- ],
1164
- exports: [
1165
- CardComponent,
1166
- FormComponent,
1167
- GridComponent,
1168
- PaginationComponent
1169
- ]
1170
- }]
1171
- }] });
1172
-
1173
- // AUTO-GENERATED. Do not edit.
1174
- const APP_VERSION = '1.0.204';
1395
+ FormsModule,
1396
+ // NG-ZORRO
1397
+ NzSelectModule
1398
+ ], selector: 'vl-form', template: "<div [style]=\"getStyleWithoutClasses(form?.layoutSchema?.style).style\" [class]=\"form?.layoutSchema?.style?.classes[0]\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <span *ngFor=\"let formSection of form?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection.label.caption\" [class]=\"formSection?.label?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\r\n {{formSection.label.caption}}\r\n </div>\r\n <div [class]=\"formSection?.style?.classes[0]\" [style]=\"getStyleWithoutClasses(formSection?.style).style\"\r\n *ngIf=\"formSection.formFields?.length > 0\">\r\n <div *ngFor=\"let formField of formSection.formFields\" [class]=\"formField?.style?.classes[0]\">\r\n <div\r\n [ngSwitch]=\"formField?.scope?.reference && form.propertySchema[getScope(formField.scope?.reference)] ?\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- image control -->\r\n <div *ngSwitchCase=\"'image'\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <img [src]=\"formField.option.src\" [alt]=\"'img'\" />\r\n </div>\r\n\r\n <!-- credit card control -->\r\n <div *ngSwitchCase=\"'carditCard'\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n </div>\r\n <!-- Used to display form errors -->\r\n <div id=\"card-errors\" [class]=\"creditCardError.textContent!=='' ? 'text-red-400 m-0': ''\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <span *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"formField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value ?\r\n formField.label?.value : formField.label?.caption ? formField.label?.caption :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <div\r\n [ngStyle]=\"formField?.option.password ? {'position':'relative','display':'flex','align-items':'center'} : {}\">\r\n <input [type]=\"formField?.option.password ? !showPassword ? 'password' : 'text' : 'text'\"\r\n #inputField=\"ngModel\" [required]=\"formField?.required\" [attr.inputmode]=\"\r\n formField?.option?.email ? 'email' :\r\n formField?.option?.password ? 'numeric' :\r\n 'text'\" [pattern]=\"formField?.email ? customEmailPattern : ''\" [email]=\"formField?.email\"\r\n [class]=\"formField?.scope?.style?.classes[0]\" [minlength]=\"formField?.minlength\"\r\n [maxlength]=\"formField?.maxlength\" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n\r\n <!-- Eye Icon -->\r\n <i *ngIf=\"formField?.option.password\" class=\"fa\"\r\n [ngClass]=\"showPassword ? 'fa-eye' : 'fa-eye-slash'\" (click)=\"togglePasswordVisibility()\"\r\n style=\"position: absolute; right: 10px; cursor: pointer;\">\r\n </i>\r\n </div>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p [class]=\"formField?.layout == 'horizontal' ? 'text-red-400 m-0 horizontal-error' : 'text-red-400 m-0'\"\r\n *ngIf=\"inputField?.errors\">{{ setErroMessage(formField, errorMessages, inputField) }}</p>\r\n </div>\r\n </span>\r\n </span>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"formField.option.protected\" [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:formField.option.currency :true: formField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- checkBox control -->\r\n <div *ngSwitchCase=\"'checkbox'\" class=\"form-group\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <label class=\"form-check-label\"><input type=\"checkbox\" class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" (ngModelChange)=\"setformData()\" />{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\"\r\n [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label class=\"form-check-label\">{{\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n <input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" /></label>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" [class]=\"formField?.scope?.style?.classes[0]\" #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField.option.optionValue\"> {{ formField.option.optionLabel}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\" #dropdownField=\"ngModel\"\r\n [required]=\"formField?.required\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField.option.optionLabel]\"\r\n [nzValue]=\"item[formField.option.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p [class]=\"formField?.layout == 'horizontal' ? 'text-red-400 m-0 horizontal-error' : 'text-red-400 m-0'\"\r\n *ngIf=\"dropdownField?.errors\">{{ setErroMessage(formField, errorMessages, dropdownField) }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(formField.style).style\"\r\n (click)=\"invokeFormBtnClick(formField.option, form.propertySchema)\"\r\n [class]=\"formField?.style?.classes[0]\">\r\n {{ formField.label?.caption }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </span>\r\n </form>\r\n</div>" }]
1399
+ }], ctorParameters: () => [], propDecorators: { errorMessages: [{
1400
+ type: Input
1401
+ }], creditCardError: [{
1402
+ type: Input
1403
+ }], form: [{
1404
+ type: Input
1405
+ }], selectedLanguageInfo: [{
1406
+ type: Input
1407
+ }], formButtonClick: [{
1408
+ type: Output
1409
+ }], checkBoxChangeEvent: [{
1410
+ type: Output
1411
+ }] } });
1175
1412
 
1176
- const VERSION_KEY = 'APP_VERSION';
1177
- class AppVersionResetService {
1178
- platform;
1179
- constructor(platform) {
1180
- this.platform = platform;
1413
+ class NotificationService {
1414
+ toastr;
1415
+ constructor(toastr) {
1416
+ this.toastr = toastr;
1181
1417
  }
1182
- async run() {
1183
- if (this.platform.ANDROID || this.platform.IOS) {
1184
- await this.clearNativeIfChanged();
1185
- // this.clearWebIfChanged();
1186
- // return;
1187
- }
1418
+ success(message, time = 5000) {
1419
+ this.toastr.success(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
1188
1420
  }
1189
- async clearNativeIfChanged() {
1190
- const { value: savedVersion } = await Preferences.get({ key: VERSION_KEY });
1191
- if (savedVersion === APP_VERSION)
1192
- return;
1193
- console.log(`🧹 Clearing Capacitor Preferences (new build ${APP_VERSION})`);
1194
- await Preferences.clear();
1195
- this.clearWebStores();
1196
- await Preferences.set({ key: VERSION_KEY, value: APP_VERSION });
1421
+ info(message, time = 5000) {
1422
+ this.toastr.info(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
1197
1423
  }
1198
- // private clearWebIfChanged(): void {
1199
- // const savedVersion = sessionStorage.getItem(VERSION_KEY) || localStorage.getItem(VERSION_KEY);
1200
- // if (savedVersion === APP_VERSION) return;
1201
- // this.clearWebStores();
1202
- // localStorage.setItem(VERSION_KEY, APP_VERSION);
1203
- // sessionStorage.setItem(VERSION_KEY, APP_VERSION);
1204
- // }
1205
- clearWebStores() {
1206
- try {
1207
- localStorage.clear();
1208
- }
1209
- catch { }
1210
- try {
1211
- sessionStorage.clear();
1212
- }
1213
- catch { }
1214
- try {
1215
- if (typeof document !== 'undefined' && document.cookie) {
1216
- document.cookie.split(';').forEach((c) => {
1217
- const eqPos = c.indexOf('=');
1218
- const name = eqPos > -1 ? c.substring(0, eqPos).trim() : c.trim();
1219
- if (name) {
1220
- document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
1221
- }
1222
- });
1223
- }
1224
- }
1225
- catch { }
1424
+ warning(message, time = 20000) {
1425
+ this.toastr.warning(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
1226
1426
  }
1227
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, deps: [{ token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
1228
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, providedIn: 'root' });
1427
+ error(error, time = 20000, message) {
1428
+ this.toastr.error(error, message, { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
1429
+ }
1430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, deps: [{ token: i1$2.ToastrService }], target: i0.ɵɵFactoryTarget.Injectable });
1431
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, providedIn: 'root' });
1229
1432
  }
1230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, decorators: [{
1433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, decorators: [{
1231
1434
  type: Injectable,
1232
1435
  args: [{
1233
1436
  providedIn: 'root'
1234
1437
  }]
1235
- }], ctorParameters: () => [{ type: i1$1.Platform }] });
1438
+ }], ctorParameters: () => [{ type: i1$2.ToastrService }] });
1236
1439
 
1237
- class Couchdb {
1440
+ class GridComponent {
1441
+ requestService;
1238
1442
  utilityService;
1239
- couchDbBaseUrl = 'https://couchdb.yomotech.de';
1240
- constructor(utilityService) {
1443
+ notificationService;
1444
+ oktaAuthService;
1445
+ isLogined = false;
1446
+ tableitemInfoCopy = {};
1447
+ errorMessages = {};
1448
+ environment;
1449
+ selectedLanguageInfo = {};
1450
+ tableitemInfo = {};
1451
+ form = {};
1452
+ isTableDataLoad = false;
1453
+ currenTableOptions = {};
1454
+ projectSeleted = '';
1455
+ pageSize = 5;
1456
+ currentPage = 0;
1457
+ pages = [];
1458
+ userInfo;
1459
+ onPageChange = new EventEmitter();
1460
+ onPageSizeChange = new EventEmitter();
1461
+ onGridScroll = new EventEmitter();
1462
+ showGridLink = new EventEmitter();
1463
+ gridButtonClick = new EventEmitter();
1464
+ gridIncreamentClick = new EventEmitter();
1465
+ gridDecreamentClick = new EventEmitter();
1466
+ gridImgClick = new EventEmitter();
1467
+ constructor(requestService, utilityService, notificationService, oktaAuthService) {
1468
+ this.requestService = requestService;
1241
1469
  this.utilityService = utilityService;
1470
+ this.notificationService = notificationService;
1471
+ this.oktaAuthService = oktaAuthService;
1472
+ }
1473
+ ngAfterViewInit() {
1474
+ this.authenticating();
1475
+ setTimeout(() => {
1476
+ if (this.environment && this.environment?.login && this.environment?.login?.type == "oktaAuth") {
1477
+ this.oktaAuthService.authState$.subscribe((result) => {
1478
+ if (result.isAuthenticated) {
1479
+ this.isLogined = true;
1480
+ }
1481
+ });
1482
+ }
1483
+ }, 500);
1242
1484
  }
1243
- async getTenantDatabases(tenantKey) {
1244
- if (!tenantKey || !tenantKey.trim()) {
1245
- throw new Error('Missing tenantKey');
1485
+ ngOnChanges(changes) {
1486
+ setTimeout(() => {
1487
+ if (changes['tableitemInfo'] && this.tableitemInfo) {
1488
+ console.log('this.tableitemInfo: ', this.tableitemInfo);
1489
+ console.log('this.selectedLanguageInfo?: ', this.selectedLanguageInfo);
1490
+ this.tableitemInfoCopy = JSON.parse(JSON.stringify(this.tableitemInfo));
1491
+ }
1492
+ if (changes['SelectedLanguage'] || this.selectedLanguageInfo?.selectedLanguage) {
1493
+ if (this.tableitemInfoCopy?.layoutSchema && this.tableitemInfoCopy.layoutSchema?.elements?.length) {
1494
+ this.tableitemInfo.propertySchema = JSON.parse(JSON.stringify(this.tableitemInfoCopy.propertySchema));
1495
+ this.tableitemInfo.propertySchema = this.translateSchema(this.tableitemInfo.propertySchema, this.selectedLanguageInfo.selectedLanguage);
1496
+ if (this.tableitemInfoCopy?.footer) {
1497
+ this.tableitemInfo.footer = JSON.parse(JSON.stringify(this.tableitemInfoCopy.footer));
1498
+ this.tableitemInfo.footer = this.translateSchema(this.tableitemInfo.footer, this.selectedLanguageInfo.selectedLanguage);
1499
+ }
1500
+ this.tableitemInfoCopy.layoutSchema.elements.forEach((column, index) => {
1501
+ if (column.label && column.label.caption && this.selectedLanguageInfo.selectedLanguage[column.label.caption]) {
1502
+ this.tableitemInfo.layoutSchema.elements[index].label.caption = this.selectedLanguageInfo.selectedLanguage[column.label.caption];
1503
+ }
1504
+ });
1505
+ }
1506
+ }
1507
+ }, 500);
1508
+ }
1509
+ translateSchema(schema, SelectedLanguage) {
1510
+ if (schema && typeof schema === 'object') {
1511
+ for (const key of Object.keys(schema)) {
1512
+ const val = schema[key];
1513
+ if (val && typeof val === 'object') {
1514
+ this.translateSchema(val, SelectedLanguage);
1515
+ }
1516
+ if (val && val.caption !== undefined && typeof val.caption === 'string') {
1517
+ const original = val.caption.trim();
1518
+ if (original && SelectedLanguage[original]) {
1519
+ val.caption = SelectedLanguage[original];
1520
+ }
1521
+ }
1522
+ if (val && val.value !== undefined && typeof val.value === 'string' && !val.value.includes("{{")) {
1523
+ const originalVal = val.value.trim();
1524
+ if (originalVal && SelectedLanguage[originalVal]) {
1525
+ val.value = SelectedLanguage[originalVal];
1526
+ }
1527
+ }
1528
+ }
1246
1529
  }
1247
- const response = await fetch(`https://couchdb.yomotech.de/tenant-dbs`, {
1248
- method: 'GET',
1249
- headers: {
1250
- Accept: 'application/json',
1251
- 'X-Tenant-Key': tenantKey.trim(),
1530
+ return schema;
1531
+ }
1532
+ getScope(scope) {
1533
+ let propertyScope = "";
1534
+ let start = scope?.indexOf("#/") + 2;
1535
+ let end = scope?.indexOf("/", start);
1536
+ if (start && end) {
1537
+ propertyScope = scope.substring(start, end);
1538
+ }
1539
+ return propertyScope;
1540
+ }
1541
+ getStyleWithoutClasses(styleObject) {
1542
+ if (!styleObject) {
1543
+ return { classes: '', style: {} };
1544
+ }
1545
+ const { classes, ...styleWithoutClasses } = styleObject;
1546
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
1547
+ }
1548
+ onScrollEvent(event) {
1549
+ this.onGridScroll.emit(event);
1550
+ }
1551
+ showLinkDetails(option, data) {
1552
+ this.showGridLink.emit({ option: option, data: data });
1553
+ }
1554
+ invokeGridBtnClick(option, propertySchema) {
1555
+ this.gridButtonClick.emit({ option: option, propertySchema: propertySchema });
1556
+ }
1557
+ upsertAction(option, data) {
1558
+ let url = option?.data_url;
1559
+ if (url && url?.includes("{{")) {
1560
+ const regex = /{{(.*?)}}/g;
1561
+ const matches = [...url.matchAll(regex)].map(m => m[1]);
1562
+ if (matches && data && data[matches[0]]) {
1563
+ option.data_url = url.replace(`{{${matches[0]}}}`, data[matches[0]]);
1564
+ }
1565
+ }
1566
+ let baseUrl = this.environment?.apiUrl + option.data_url;
1567
+ this.requestService.dynamicCall(option.method, {}, baseUrl, option?.passToken, this.projectSeleted, this.userInfo).subscribe((res) => {
1568
+ console.log('res: ', res);
1569
+ if (option?.reload) {
1570
+ window.location.reload();
1571
+ }
1572
+ else if (option.notifcation) {
1573
+ if (option.notifcation.success) {
1574
+ this.notificationService.success(option.notifcation.success);
1575
+ let findObj = this.findDynamicKeyAndValue(option);
1576
+ if (findObj.keyName) {
1577
+ data[findObj.keyName] = "APPROVED";
1578
+ }
1579
+ }
1580
+ }
1581
+ });
1582
+ }
1583
+ setActionColumn(option, data) {
1584
+ let showAction = true;
1585
+ let findCondiontionalKey = this.findDynamicKeyAndValue(option);
1586
+ if (findCondiontionalKey.keyName) {
1587
+ showAction = data[findCondiontionalKey.keyName] === findCondiontionalKey.value ? true : false;
1588
+ }
1589
+ return showAction;
1590
+ }
1591
+ findDynamicKeyAndValue(object) {
1592
+ const regex = /^\{\{(.*?)\}\}$/;
1593
+ for (const key of Object.keys(object)) {
1594
+ const match = key.match(regex);
1595
+ if (match) {
1596
+ return {
1597
+ keyName: match[1].trim(),
1598
+ value: object[key]
1599
+ };
1600
+ }
1601
+ }
1602
+ return null;
1603
+ }
1604
+ incrementQuantity(index, field, option) {
1605
+ this.gridIncreamentClick.emit({ index: index, field: field, option: option });
1606
+ }
1607
+ invokeTableImageClick(column, data) {
1608
+ this.gridImgClick.emit({ col: column, data: data });
1609
+ }
1610
+ decrementQuantity(index, field, option) {
1611
+ this.gridDecreamentClick.emit({ index: index, field: field, option: option });
1612
+ }
1613
+ invokeOnPageSizeChange(pageSize) {
1614
+ this.onPageSizeChange.emit(pageSize);
1615
+ }
1616
+ invokeGoToPage(page) {
1617
+ this.onPageChange.emit(page);
1618
+ }
1619
+ authenticating() {
1620
+ this.utilityService.getStorage(`${this.projectSeleted}Logined`).then((logined) => {
1621
+ if (logined == "true") {
1622
+ this.isLogined = true;
1623
+ }
1624
+ });
1625
+ }
1626
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: GridComponent, deps: [{ token: RequestService }, { token: UtilityService }, { token: NotificationService }, { token: i4$1.OktaAuthStateService }], target: i0.ɵɵFactoryTarget.Component });
1627
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", userInfo: "userInfo" }, outputs: { onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\" role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n###\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <nz-table #basicTable [nzData]=\"tableitemInfo.data\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\" (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\">{{ column?.label?.caption }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of tableitemInfo.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'string'\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.link\" (click)=\"showLinkDetails(col.option, data)\">\r\n {{data[col.scope?.reference.split('/').pop()]}}\r\n </span>\r\n <span *ngIf=\"!col.option?.link\">\r\n <ng-container *ngIf=\"col?.option?.dateFormat; else string\">\r\n {{ data[col.scope?.reference.split('/').pop()] | date:'yyyy-MM-dd' }}\r\n </ng-container>\r\n <ng-template #string>\r\n {{ data[col.scope?.reference.split('/').pop()] }}\r\n </ng-template>\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'number'\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.innerAction?.action == 'multiply'\">\r\n {{\r\n (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to])\r\n | number:'1.2-2'\r\n }}\r\n </span>\r\n <span *ngIf=\"!col.option?.innerAction\">\r\n {{data[col.scope?.reference.split('/').pop()] | currency:\r\n tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.currency\r\n :true }}\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\" type=\"number\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'image'\">\r\n <img *ngIf=\"data[col.scope?.reference.split('/').pop()]\"\r\n [src]=\"data[col.scope?.reference.split('/').pop()]\" alt=\"Image\"\r\n (click)=\"invokeTableImageClick(col, data)\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\" />\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!col?.scope?.reference\">\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon *ngIf=\"setActionColumn(col.option?.save, data)\" [nzType]=\"col.option?.save?.icon\" [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\" [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes[0]\" (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon *ngIf=\"setActionColumn(col.option?.delete, data)\" [nzType]=\"col.option?.delete?.icon\" [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\" [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\" [class]=\"col?.label?.style?.classes[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n </ng-container>\r\n\r\n <!-- For quantity column, display increment/decrement buttons -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'quantity'\">\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()] }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields\">\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{ tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"text\" #inputField=\"ngModel\" [required]=\"tableField.option.required\"\r\n [email]=\"tableField.option.email\" [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(tableField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">{{tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">{{(tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:tableField.option.currency :true: tableField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{ tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i7.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i7.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i7.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i7.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i7.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i7.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i9$1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }] });
1628
+ }
1629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: GridComponent, decorators: [{
1630
+ type: Component,
1631
+ args: [{ standalone: true, imports: [
1632
+ CommonModule,
1633
+ FormsModule,
1634
+ NzTableModule,
1635
+ NzIconModule,
1636
+ ButtonModule,
1637
+ PaginationComponent
1638
+ ], selector: 'vl-grid', template: "<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\" role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n###\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <nz-table #basicTable [nzData]=\"tableitemInfo.data\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\" (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\">{{ column?.label?.caption }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of tableitemInfo.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'string'\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.link\" (click)=\"showLinkDetails(col.option, data)\">\r\n {{data[col.scope?.reference.split('/').pop()]}}\r\n </span>\r\n <span *ngIf=\"!col.option?.link\">\r\n <ng-container *ngIf=\"col?.option?.dateFormat; else string\">\r\n {{ data[col.scope?.reference.split('/').pop()] | date:'yyyy-MM-dd' }}\r\n </ng-container>\r\n <ng-template #string>\r\n {{ data[col.scope?.reference.split('/').pop()] }}\r\n </ng-template>\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'number'\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.innerAction?.action == 'multiply'\">\r\n {{\r\n (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to])\r\n | number:'1.2-2'\r\n }}\r\n </span>\r\n <span *ngIf=\"!col.option?.innerAction\">\r\n {{data[col.scope?.reference.split('/').pop()] | currency:\r\n tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.currency\r\n :true }}\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\" type=\"number\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'image'\">\r\n <img *ngIf=\"data[col.scope?.reference.split('/').pop()]\"\r\n [src]=\"data[col.scope?.reference.split('/').pop()]\" alt=\"Image\"\r\n (click)=\"invokeTableImageClick(col, data)\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\" />\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!col?.scope?.reference\">\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon *ngIf=\"setActionColumn(col.option?.save, data)\" [nzType]=\"col.option?.save?.icon\" [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\" [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes[0]\" (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon *ngIf=\"setActionColumn(col.option?.delete, data)\" [nzType]=\"col.option?.delete?.icon\" [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\" [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\" [class]=\"col?.label?.style?.classes[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n </ng-container>\r\n\r\n <!-- For quantity column, display increment/decrement buttons -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'quantity'\">\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()] }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields\">\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{ tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"text\" #inputField=\"ngModel\" [required]=\"tableField.option.required\"\r\n [email]=\"tableField.option.email\" [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(tableField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">{{tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">{{(tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:tableField.option.currency :true: tableField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{ tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\" [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\" [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\" (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>" }]
1639
+ }], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4$1.OktaAuthStateService }], propDecorators: { errorMessages: [{
1640
+ type: Input
1641
+ }], environment: [{
1642
+ type: Input
1643
+ }], selectedLanguageInfo: [{
1644
+ type: Input
1645
+ }], tableitemInfo: [{
1646
+ type: Input
1647
+ }], form: [{
1648
+ type: Input
1649
+ }], isTableDataLoad: [{
1650
+ type: Input
1651
+ }], currenTableOptions: [{
1652
+ type: Input
1653
+ }], projectSeleted: [{
1654
+ type: Input
1655
+ }], pageSize: [{
1656
+ type: Input
1657
+ }], currentPage: [{
1658
+ type: Input
1659
+ }], pages: [{
1660
+ type: Input
1661
+ }], userInfo: [{
1662
+ type: Input
1663
+ }], onPageChange: [{
1664
+ type: Output
1665
+ }], onPageSizeChange: [{
1666
+ type: Output
1667
+ }], onGridScroll: [{
1668
+ type: Output
1669
+ }], showGridLink: [{
1670
+ type: Output
1671
+ }], gridButtonClick: [{
1672
+ type: Output
1673
+ }], gridIncreamentClick: [{
1674
+ type: Output
1675
+ }], gridDecreamentClick: [{
1676
+ type: Output
1677
+ }], gridImgClick: [{
1678
+ type: Output
1679
+ }] } });
1680
+
1681
+ class HeaderMenuComponent {
1682
+ oktaAuthService;
1683
+ requestService;
1684
+ utilityService;
1685
+ platform;
1686
+ isLogined = false;
1687
+ headerItems = [];
1688
+ environment;
1689
+ projectSeleted;
1690
+ cartInfo = {
1691
+ items: [],
1692
+ totalPrice: 0,
1693
+ quantity: 0
1694
+ };
1695
+ buttonClick = new EventEmitter();
1696
+ showTableContent = new EventEmitter();
1697
+ searchItems = new EventEmitter();
1698
+ constructor(oktaAuthService, requestService, utilityService, platform) {
1699
+ this.oktaAuthService = oktaAuthService;
1700
+ this.requestService = requestService;
1701
+ this.utilityService = utilityService;
1702
+ this.platform = platform;
1703
+ }
1704
+ ngAfterViewInit() {
1705
+ setTimeout(() => {
1706
+ if (this.environment && this.environment?.login && this.environment?.login?.type == "oktaAuth") {
1707
+ if (this.platform.ANDROID || this.platform.IOS) {
1708
+ this.utilityService.getLocalStorage(`loginedUser`).then((logined) => {
1709
+ if (logined && logined.token) {
1710
+ this.requestService.getLoginUser(logined?.token).subscribe((userInfo) => {
1711
+ this.isLogined = true;
1712
+ });
1713
+ }
1714
+ });
1715
+ }
1716
+ this.oktaAuthService.authState$.subscribe((result) => {
1717
+ if (result.isAuthenticated) {
1718
+ this.isLogined = true;
1719
+ }
1720
+ });
1721
+ }
1722
+ }, 500);
1723
+ }
1724
+ invokeSearchedItems(option, search) {
1725
+ this.searchItems.emit({ option: option, search: search });
1726
+ }
1727
+ invokeHeaderButtonClick(option) {
1728
+ this.buttonClick.emit(option);
1729
+ }
1730
+ invokeShowtableContent(option) {
1731
+ this.showTableContent.emit(option);
1732
+ }
1733
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: i4$1.OktaAuthStateService }, { token: RequestService }, { token: UtilityService }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Component });
1734
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: HeaderMenuComponent, isStandalone: true, selector: "vl-header-menu", inputs: { headerItems: "headerItems", environment: "environment", projectSeleted: "projectSeleted", cartInfo: "cartInfo" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems" }, ngImport: i0, template: "<header class=\"header\" *ngIf=\"headerItems.length > 0\">\r\n <div *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n <div *ngSwitchCase=\"'logo'\" [class]=\"header?.option?.visible ? 'logo' : 'hidden'\">\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt\" />\r\n </div>\r\n\r\n <div *ngSwitchCase=\"'searchInput'\" [class]=\"header?.option?.visible ? 'search-box' : 'hidden'\">\r\n <input #search (keyup.enter)=\"invokeSearchedItems(header.option, search)\" type=\"text\"\r\n [placeholder]=\"header.option.placeholder\" />\r\n <button *ngIf=\"header.option.button !== false\" (click)=\"invokeSearchedItems(header.option, search)\">\r\n <ng-container *ngIf=\"!header.caption; else textContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <div *ngSwitchCase=\"'cart'\" [class]=\"header?.option?.visible ? 'cart' : 'hidden'\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n <span>{{cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD'}}</span>\r\n <span>{{cartInfo.quantity}}</span>\r\n <i [class]=\"header.icon\"></i>\r\n </div>\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"header?.option.islogin ? isLogined ? 'header-buttons' : 'hidden' : header?.option.islogin == false ? isLogined ? 'hidden' : 'header-buttons' : 'header-buttons'\">\r\n <button (click)=\"invokeHeaderButtonClick(header.option)\">\r\n <ng-container *ngIf=\"!header.label; else textContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n</header>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }] });
1735
+ }
1736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
1737
+ type: Component,
1738
+ args: [{ standalone: true, imports: [
1739
+ CommonModule,
1740
+ NzIconModule
1741
+ ], selector: 'vl-header-menu', template: "<header class=\"header\" *ngIf=\"headerItems.length > 0\">\r\n <div *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n <div *ngSwitchCase=\"'logo'\" [class]=\"header?.option?.visible ? 'logo' : 'hidden'\">\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt\" />\r\n </div>\r\n\r\n <div *ngSwitchCase=\"'searchInput'\" [class]=\"header?.option?.visible ? 'search-box' : 'hidden'\">\r\n <input #search (keyup.enter)=\"invokeSearchedItems(header.option, search)\" type=\"text\"\r\n [placeholder]=\"header.option.placeholder\" />\r\n <button *ngIf=\"header.option.button !== false\" (click)=\"invokeSearchedItems(header.option, search)\">\r\n <ng-container *ngIf=\"!header.caption; else textContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <div *ngSwitchCase=\"'cart'\" [class]=\"header?.option?.visible ? 'cart' : 'hidden'\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n <span>{{cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD'}}</span>\r\n <span>{{cartInfo.quantity}}</span>\r\n <i [class]=\"header.icon\"></i>\r\n </div>\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"header?.option.islogin ? isLogined ? 'header-buttons' : 'hidden' : header?.option.islogin == false ? isLogined ? 'hidden' : 'header-buttons' : 'header-buttons'\">\r\n <button (click)=\"invokeHeaderButtonClick(header.option)\">\r\n <ng-container *ngIf=\"!header.label; else textContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n</header>" }]
1742
+ }], ctorParameters: () => [{ type: i4$1.OktaAuthStateService }, { type: RequestService }, { type: UtilityService }, { type: i1.Platform }], propDecorators: { headerItems: [{
1743
+ type: Input
1744
+ }], environment: [{
1745
+ type: Input
1746
+ }], projectSeleted: [{
1747
+ type: Input
1748
+ }], cartInfo: [{
1749
+ type: Input
1750
+ }], buttonClick: [{
1751
+ type: Output
1752
+ }], showTableContent: [{
1753
+ type: Output
1754
+ }], searchItems: [{
1755
+ type: Output
1756
+ }] } });
1757
+
1758
+ class NetworkLogService {
1759
+ logs = [];
1760
+ addLog(log) {
1761
+ this.logs.unshift(log); // latest first
1762
+ localStorage.setItem('networkLogs', JSON.stringify(this.logs));
1763
+ }
1764
+ getLogsByDate(date) {
1765
+ return this.logs.filter(l => l.date === date);
1766
+ }
1767
+ getAll() {
1768
+ return [...this.logs];
1769
+ }
1770
+ clear() {
1771
+ this.logs = [];
1772
+ localStorage.removeItem('networkLogs');
1773
+ }
1774
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1775
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, providedIn: 'root' });
1776
+ }
1777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, decorators: [{
1778
+ type: Injectable,
1779
+ args: [{
1780
+ providedIn: 'root'
1781
+ }]
1782
+ }] });
1783
+
1784
+ class LogsComponent {
1785
+ logService;
1786
+ logs = [];
1787
+ expandedRow = null;
1788
+ constructor(logService) {
1789
+ this.logService = logService;
1790
+ }
1791
+ ngOnInit() {
1792
+ const today = new Date().toISOString().split('T')[0];
1793
+ this.logs = this.logService.getLogsByDate(today);
1794
+ console.log('this.logs: ', this.logs);
1795
+ }
1796
+ toggleRow(index) {
1797
+ this.expandedRow = this.expandedRow === index ? null : index;
1798
+ }
1799
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: LogsComponent, deps: [{ token: NetworkLogService }], target: i0.ɵɵFactoryTarget.Component });
1800
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: LogsComponent, isStandalone: true, selector: "vl-logs", ngImport: i0, template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.JsonPipe, name: "json" }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }] });
1801
+ }
1802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: LogsComponent, decorators: [{
1803
+ type: Component,
1804
+ args: [{ standalone: true, imports: [
1805
+ CommonModule
1806
+ ], selector: 'vl-logs', template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"] }]
1807
+ }], ctorParameters: () => [{ type: NetworkLogService }] });
1808
+
1809
+ class Label {
1810
+ formField;
1811
+ modalItemInfo;
1812
+ getScope(scope) {
1813
+ let propertyScope = "";
1814
+ let start = scope?.indexOf("#/") + 2;
1815
+ let end = scope?.indexOf("/", start);
1816
+ if (start && end) {
1817
+ propertyScope = scope.substring(start, end);
1818
+ }
1819
+ return propertyScope;
1820
+ }
1821
+ getStyleWithoutClasses(styleObject) {
1822
+ if (!styleObject) {
1823
+ return { classes: '', style: {} };
1824
+ }
1825
+ const { classes, ...styleWithoutClasses } = styleObject;
1826
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
1827
+ }
1828
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Label, deps: [], target: i0.ɵɵFactoryTarget.Component });
1829
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Label, isStandalone: true, selector: "vl-label", inputs: { formField: "formField", modalItemInfo: "modalItemInfo" }, ngImport: i0, template: "<label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\" [class]=\"formField?.label?.style?.classes[0]\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>", styles: [""] });
1830
+ }
1831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Label, decorators: [{
1832
+ type: Component,
1833
+ args: [{ selector: 'vl-label', standalone: true, template: "<label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\" [class]=\"formField?.label?.style?.classes[0]\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>" }]
1834
+ }], propDecorators: { formField: [{
1835
+ type: Input
1836
+ }], modalItemInfo: [{
1837
+ type: Input
1838
+ }] } });
1839
+
1840
+ class Textbox {
1841
+ formField;
1842
+ modalItemInfo;
1843
+ getScope(scope) {
1844
+ let propertyScope = "";
1845
+ let start = scope?.indexOf("#/") + 2;
1846
+ let end = scope?.indexOf("/", start);
1847
+ if (start && end) {
1848
+ propertyScope = scope.substring(start, end);
1849
+ }
1850
+ return propertyScope;
1851
+ }
1852
+ getStyleWithoutClasses(styleObject) {
1853
+ if (!styleObject) {
1854
+ return { classes: '', style: {} };
1855
+ }
1856
+ const { classes, ...styleWithoutClasses } = styleObject;
1857
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
1858
+ }
1859
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Textbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
1860
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Textbox, isStandalone: true, selector: "vl-textbox", inputs: { formField: "formField", modalItemInfo: "modalItemInfo" }, ngImport: i0, template: "<input pInputText type=\"text\" #inputField=\"ngModel\" [required]=\"formField.option?.required\"\r\n [email]=\"formField.option?.email\" [disabled]=\"formField?.option?.disabled\"\r\n [readonly]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.readonly\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
1861
+ }
1862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Textbox, decorators: [{
1863
+ type: Component,
1864
+ args: [{ selector: 'vl-textbox', standalone: true, imports: [FormsModule, InputTextModule], template: "<input pInputText type=\"text\" #inputField=\"ngModel\" [required]=\"formField.option?.required\"\r\n [email]=\"formField.option?.email\" [disabled]=\"formField?.option?.disabled\"\r\n [readonly]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.readonly\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />" }]
1865
+ }], propDecorators: { formField: [{
1866
+ type: Input
1867
+ }], modalItemInfo: [{
1868
+ type: Input
1869
+ }] } });
1870
+
1871
+ class Autocomplete {
1872
+ formField;
1873
+ modalItemInfo;
1874
+ matchData;
1875
+ selectedLanguageInfo;
1876
+ errorMessages;
1877
+ autocompSelect = new EventEmitter();
1878
+ autocompChange = new EventEmitter();
1879
+ autocompFocusOut = new EventEmitter();
1880
+ autocompSelectEvent(event, formField) {
1881
+ this.autocompSelect.emit({ event: event, formField: formField });
1882
+ }
1883
+ autocompChangeEvent(event, formField) {
1884
+ this.autocompChange.emit({ event: event, formField: formField });
1885
+ }
1886
+ autocompFocusOutEvent(event, formField) {
1887
+ this.autocompFocusOut.emit({ event: event, formField: formField });
1888
+ }
1889
+ getScope(scope) {
1890
+ let propertyScope = "";
1891
+ let start = scope?.indexOf("#/") + 2;
1892
+ let end = scope?.indexOf("/", start);
1893
+ if (start && end) {
1894
+ propertyScope = scope.substring(start, end);
1895
+ }
1896
+ return propertyScope;
1897
+ }
1898
+ getStyleWithoutClasses(styleObject) {
1899
+ if (!styleObject) {
1900
+ return { classes: '', style: {} };
1901
+ }
1902
+ const { classes, ...styleWithoutClasses } = styleObject;
1903
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
1904
+ }
1905
+ setErroMessage(formField, errorMessages, errorType) {
1906
+ let error = "";
1907
+ let fieldName = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;
1908
+ if (errorType == "required") {
1909
+ error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required;
1910
+ }
1911
+ if (error && error.toString().includes("{{requiredLength}}")) {
1912
+ error = error.replace(/{{\s*requiredLength\s*}}/g, formField?.minlength.toString());
1913
+ }
1914
+ return error.replace(/{{\s*field\s*}}/g, fieldName);
1915
+ }
1916
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Autocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
1917
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Autocomplete, isStandalone: true, selector: "vl-autocomplete", inputs: { formField: "formField", modalItemInfo: "modalItemInfo", matchData: "matchData", selectedLanguageInfo: "selectedLanguageInfo", errorMessages: "errorMessages" }, outputs: { autocompSelect: "autocompSelect", autocompChange: "autocompChange", autocompFocusOut: "autocompFocusOut" }, ngImport: i0, template: "<p-autoComplete #autocompleteField=\"ngModel\" [required]=\"formField.option.required\" [name]=\"formField.scope?.reference\"\r\n inputmode\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [suggestions]=\"matchData\" [dropdown]=\"true\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\" (onSelect)=\"autocompSelectEvent($event, formField)\"\r\n (onBlur)=\"autocompFocusOutEvent($event, formField)\"\r\n [attr.inputmode]=\"formField.option.keyboard === 'numeric' ? 'numeric' : null\">\r\n</p-autoComplete>\r\n\r\n<!-- Error Message -->\r\n<div *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i2$2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: SelectModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1918
+ }
1919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Autocomplete, decorators: [{
1920
+ type: Component,
1921
+ args: [{ selector: 'vl-autocomplete', standalone: true, imports: [
1922
+ FormsModule,
1923
+ AutoCompleteModule,
1924
+ SelectModule,
1925
+ NgIf
1926
+ ], template: "<p-autoComplete #autocompleteField=\"ngModel\" [required]=\"formField.option.required\" [name]=\"formField.scope?.reference\"\r\n inputmode\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [suggestions]=\"matchData\" [dropdown]=\"true\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\" (onSelect)=\"autocompSelectEvent($event, formField)\"\r\n (onBlur)=\"autocompFocusOutEvent($event, formField)\"\r\n [attr.inputmode]=\"formField.option.keyboard === 'numeric' ? 'numeric' : null\">\r\n</p-autoComplete>\r\n\r\n<!-- Error Message -->\r\n<div *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n</div>" }]
1927
+ }], propDecorators: { formField: [{
1928
+ type: Input
1929
+ }], modalItemInfo: [{
1930
+ type: Input
1931
+ }], matchData: [{
1932
+ type: Input
1933
+ }], selectedLanguageInfo: [{
1934
+ type: Input
1935
+ }], errorMessages: [{
1936
+ type: Input
1937
+ }], autocompSelect: [{
1938
+ type: Output
1939
+ }], autocompChange: [{
1940
+ type: Output
1941
+ }], autocompFocusOut: [{
1942
+ type: Output
1943
+ }] } });
1944
+
1945
+ class ModelComponent {
1946
+ matchData = [];
1947
+ errorMessages = {};
1948
+ isModalShow = false;
1949
+ modalItemInfo = {};
1950
+ selectedLanguageInfo = {};
1951
+ userInfo = {};
1952
+ invokeButtonClick = new EventEmitter();
1953
+ invokeSetFormData = new EventEmitter();
1954
+ modalClose = new EventEmitter();
1955
+ copyLayoutSchema = {};
1956
+ isLoading = false;
1957
+ constructor() {
1958
+ }
1959
+ ngAfterViewInit() {
1960
+ }
1961
+ async ngOnChanges(changes) {
1962
+ if (this.isModalShow === true) {
1963
+ if (this.modalItemInfo.layoutSchema) {
1964
+ this.copyLayoutSchema = JSON.parse(JSON.stringify(this.modalItemInfo.layoutSchema));
1965
+ }
1966
+ if ((changes['selectedLanguageInfo'] || this.selectedLanguageInfo) && this.selectedLanguageInfo.selectedLanguage) {
1967
+ this.modalItemInfo.layoutSchema = this.updateLayoutLanguage(this.copyLayoutSchema, this.selectedLanguageInfo.selectedLanguage);
1968
+ }
1969
+ if (this.modalItemInfo?.currentRecord) {
1970
+ this.mapDataToPropertySchema(this.modalItemInfo.currentRecord, this.modalItemInfo);
1971
+ }
1972
+ await this.setAutoCompleteData();
1973
+ }
1974
+ }
1975
+ updateLayoutLanguage(schema, translations) {
1976
+ const cloned = JSON.parse(JSON.stringify(schema));
1977
+ const walk = (obj) => {
1978
+ if (!obj || typeof obj !== 'object')
1979
+ return;
1980
+ // 🔹 label.caption (most common in form schemas)
1981
+ if (obj.label && typeof obj.label.caption === 'string') {
1982
+ const original = obj.label.caption;
1983
+ obj.label.caption = translations[original] ?? original;
1984
+ }
1985
+ // 🔹 direct caption (fallback / buttons / future-proof)
1986
+ if (typeof obj.caption === 'string') {
1987
+ const original = obj.caption;
1988
+ obj.caption = translations[original] ?? original;
1989
+ }
1990
+ // 🚫 Skip huge data arrays (autocomplete datasets, etc.)
1991
+ if (Array.isArray(obj.data))
1992
+ return;
1993
+ // 🔁 Recurse
1994
+ Object.keys(obj).forEach((key) => {
1995
+ const value = obj[key];
1996
+ if (typeof value === 'object') {
1997
+ walk(value);
1998
+ }
1999
+ });
2000
+ };
2001
+ walk(cloned);
2002
+ return cloned;
2003
+ }
2004
+ mapDataToPropertySchema(data, modalItemInfo) {
2005
+ if (!data || !modalItemInfo?.propertySchema)
2006
+ return;
2007
+ const [rootScope] = Object.keys(modalItemInfo.propertySchema);
2008
+ if (!rootScope)
2009
+ return;
2010
+ const schemaFields = modalItemInfo.propertySchema[rootScope];
2011
+ Object.keys(schemaFields).forEach((fieldKey) => {
2012
+ if (data.hasOwnProperty(fieldKey)) {
2013
+ if (!schemaFields[fieldKey]) {
2014
+ schemaFields[fieldKey] = {};
2015
+ }
2016
+ schemaFields[fieldKey].value = data[fieldKey];
2017
+ }
2018
+ });
2019
+ }
2020
+ async setAutoCompleteData() {
2021
+ for (const section of this.modalItemInfo.layoutSchema.formSections) {
2022
+ for (const field of section.formFields || []) {
2023
+ const type = this.modalItemInfo.propertySchema[this.getScope(field.scope?.reference)]?.[field.scope.reference.split('/').pop()]?.type;
2024
+ if (type === 'autocomplete' && field.option?.autocomplete) {
2025
+ this.isLoading = true;
2026
+ field['data'] = await this.fetchAutocompleteData(field);
2027
+ this.isLoading = false;
2028
+ }
2029
+ }
2030
+ }
2031
+ }
2032
+ async fetchAutocompleteData(formField) {
2033
+ const config = formField.option?.autocomplete;
2034
+ if (!config)
2035
+ return;
2036
+ const request = this.resolveAutocompleteConfig(config, this.userInfo);
2037
+ const response = await CapacitorHttp.request({
2038
+ url: request.url,
2039
+ method: request.method,
2040
+ params: request.params,
2041
+ headers: request.headers
2042
+ });
2043
+ return response.data?.length > 0 ? response.data : [];
2044
+ }
2045
+ resolveAutocompleteConfig(config, userInfo) {
2046
+ const params = {};
2047
+ Object.entries(config.params || {}).forEach(([key, value]) => {
2048
+ // 🔹 Dynamic token
2049
+ if (typeof value === 'string' && value.includes('{{')) {
2050
+ params[key] = this.resolveToken(value, userInfo);
2051
+ }
2052
+ // 🔹 Computed param
2053
+ else if (value?.type === 'company') {
2054
+ params[key] = this.buildCompany(userInfo);
2055
+ }
2056
+ // 🔹 Static
2057
+ else {
2058
+ params[key] = value;
2059
+ }
2060
+ });
2061
+ return {
2062
+ url: `${userInfo.p5_backend_url}${config.url}`,
2063
+ method: config.method || 'POST',
2064
+ params,
2065
+ headers: config.passToken
2066
+ ? {
2067
+ Authorization: `Bearer ${userInfo.token}`,
2068
+ Accept: 'application/json'
2069
+ }
2070
+ : {}
2071
+ };
2072
+ }
2073
+ buildCompany(userInfo) {
2074
+ return userInfo.p5_plant
2075
+ ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`
2076
+ : `${userInfo.p5_group}/${userInfo.p5_client}/`;
2077
+ }
2078
+ resolveToken(template, context) {
2079
+ return template.replace(/{{(.*?)}}/g, (_, path) => {
2080
+ return path.split('.').reduce((acc, key) => acc?.[key], context) ?? '';
2081
+ });
2082
+ }
2083
+ getScope(scope) {
2084
+ let propertyScope = "";
2085
+ let start = scope?.indexOf("#/") + 2;
2086
+ let end = scope?.indexOf("/", start);
2087
+ if (start && end) {
2088
+ propertyScope = scope.substring(start, end);
2089
+ }
2090
+ return propertyScope;
2091
+ }
2092
+ autocompChangeEvent(event) {
2093
+ const q = (event?.event.query || '').toLowerCase();
2094
+ let fieldName = event?.formField.scope?.reference?.split('/')?.pop();
2095
+ if (fieldName) {
2096
+ this.matchData = event?.formField.data?.filter((x) => x[fieldName] && x[fieldName]?.toLowerCase()?.startsWith(q));
2097
+ }
2098
+ }
2099
+ autocompFocusOutEvent(event) {
2100
+ const selected = event?.event.target.value;
2101
+ let fieldName = event?.formField.scope?.reference?.split('/')?.pop();
2102
+ if (fieldName && (selected || typeof selected !== 'object')) {
2103
+ let actualObj = event?.formField.data?.find((x) => x[fieldName] == selected);
2104
+ if (actualObj) {
2105
+ this.autocompSelectEvent(event);
2106
+ }
2107
+ }
2108
+ }
2109
+ autocompSelectEvent(event) {
2110
+ const selected = event?.event.value;
2111
+ const mapping = event.formField.option?.onSelect?.mapFields;
2112
+ if (!selected || !mapping)
2113
+ return;
2114
+ Object.entries(mapping).forEach(([targetProp, sourceKey]) => {
2115
+ const scope = this.getScope(event.formField.scope.reference);
2116
+ if (this.modalItemInfo.propertySchema?.[scope]?.[targetProp]) {
2117
+ this.modalItemInfo.propertySchema[scope][targetProp].value = selected[sourceKey] ?? null;
2118
+ }
2119
+ });
2120
+ }
2121
+ setErroMessage(formField, errorMessages, errorType) {
2122
+ let error = "";
2123
+ let fieldName = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;
2124
+ if (errorType == "required") {
2125
+ error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required;
2126
+ }
2127
+ if (error && error.toString().includes("{{requiredLength}}")) {
2128
+ error = error.replace(/{{\s*requiredLength\s*}}/g, formField?.minlength.toString());
2129
+ }
2130
+ return error.replace(/{{\s*field\s*}}/g, fieldName);
2131
+ }
2132
+ getStyleWithoutClasses(styleObject) {
2133
+ if (!styleObject) {
2134
+ return { classes: '', style: {} };
2135
+ }
2136
+ const { classes, ...styleWithoutClasses } = styleObject;
2137
+ return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
2138
+ }
2139
+ dateChangeEvent(formField, value) {
2140
+ this.handleRules(formField, value);
2141
+ }
2142
+ onDateTyping(event) {
2143
+ const input = event.target;
2144
+ if (!input)
2145
+ return;
2146
+ let digits = input.value.replace(/\D/g, '');
2147
+ digits = digits.substring(0, 8);
2148
+ let formatted = '';
2149
+ if (digits.length <= 4) {
2150
+ formatted = digits;
2151
+ }
2152
+ else if (digits.length <= 6) {
2153
+ formatted = `${digits.slice(0, 4)}-${digits.slice(4)}`;
2154
+ }
2155
+ else {
2156
+ formatted = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;
2157
+ }
2158
+ input.value = formatted;
2159
+ }
2160
+ forceNumericKeyboard(event) {
2161
+ const input = event?.target;
2162
+ if (input && input.tagName === 'INPUT') {
2163
+ input.setAttribute('inputmode', 'numeric'); // Android
2164
+ input.setAttribute('pattern', '[0-9:]*'); // iOS
2165
+ input.setAttribute('type', 'tel'); // strongest signal
2166
+ }
2167
+ }
2168
+ onTimeTyping(event) {
2169
+ const input = event?.target || event?.originalEvent?.target;
2170
+ if (!input)
2171
+ return;
2172
+ let digits = input.value.replace(/\D/g, '');
2173
+ digits = digits.substring(0, 4);
2174
+ let formatted = '';
2175
+ if (digits.length <= 2) {
2176
+ formatted = digits;
2177
+ }
2178
+ else {
2179
+ formatted = `${digits.slice(0, 2)}:${digits.slice(2)}`;
2180
+ }
2181
+ input.value = formatted;
2182
+ }
2183
+ timeChangeEvent(formField, value) {
2184
+ this.handleRules(formField, value);
2185
+ }
2186
+ handleRules(formField, value) {
2187
+ const scope = this.getScope(formField.scope.reference);
2188
+ const field = formField.scope?.reference.split('/').pop();
2189
+ const rules = formField.option?.rules;
2190
+ this.modalItemInfo.propertySchema[scope][field].value = value;
2191
+ if (!rules)
2192
+ return;
2193
+ rules.forEach((rule) => {
2194
+ let exist = this.isRuleTriggered(rule, formField);
2195
+ if (!exist)
2196
+ return;
2197
+ switch (rule.action) {
2198
+ case 'calculateDuration':
2199
+ this.applyDurationRule(rule, formField);
2200
+ break;
2201
+ case 'resetValue':
2202
+ this.resetRule(rule, formField);
2203
+ break;
2204
+ }
2205
+ });
2206
+ }
2207
+ resetRule(rule, formField) {
2208
+ const scope = this.getScope(formField.scope.reference);
2209
+ if (rule?.resetValue?.length > 0) {
2210
+ rule.resetValue.forEach((prop) => {
2211
+ this.modalItemInfo.propertySchema[scope][prop].value = null;
2212
+ });
2213
+ }
2214
+ }
2215
+ isRuleTriggered(rule, formField) {
2216
+ if (rule.when === 'timeRangeComplete') {
2217
+ const scope = this.getScope(formField.scope.reference);
2218
+ return (this.modalItemInfo.propertySchema[scope]?.workDayTimeFrom?.value &&
2219
+ this.modalItemInfo.propertySchema[scope]?.workDayTimeTo?.value);
2220
+ }
2221
+ else if (rule.when === 'change') {
2222
+ return true;
2223
+ }
2224
+ return false;
2225
+ }
2226
+ applyDurationRule(rule, formField) {
2227
+ const scope = this.getScope(formField.scope.reference);
2228
+ const schema = this.modalItemInfo.propertySchema[scope];
2229
+ const fromTimeVal = schema?.workDayTimeFrom?.value;
2230
+ const toTimeVal = schema?.workDayTimeTo?.value;
2231
+ const baseDateVal = schema?.fromDate?.value;
2232
+ // 🔒 Guard
2233
+ if (!fromTimeVal || !toTimeVal || !baseDateVal) {
2234
+ schema[rule.params.durationField].value = '';
2235
+ return;
2236
+ }
2237
+ // 📅 Base date (From Date)
2238
+ const baseDate = new Date(baseDateVal);
2239
+ baseDate.setHours(0, 0, 0, 0);
2240
+ // ⏱ FROM datetime
2241
+ const fromDateTime = new Date(baseDate);
2242
+ fromDateTime.setHours(fromTimeVal.getHours(), fromTimeVal.getMinutes(), 0, 0);
2243
+ // ⏱ TO datetime
2244
+ let toDateTime = new Date(baseDate);
2245
+ toDateTime.setHours(toTimeVal.getHours(), toTimeVal.getMinutes(), 0, 0);
2246
+ // 🌙 Overnight handling
2247
+ if (toDateTime <= fromDateTime) {
2248
+ toDateTime.setDate(toDateTime.getDate() + 1);
2249
+ }
2250
+ // ⏳ Duration calculation
2251
+ const diffMs = toDateTime.getTime() - fromDateTime.getTime();
2252
+ const totalMinutes = Math.floor(diffMs / 60000);
2253
+ const hours = Math.floor(totalMinutes / 60);
2254
+ const minutes = totalMinutes % 60;
2255
+ const duration = `${hours}:${minutes.toString().padStart(2, '0')}`;
2256
+ // ✅ Set duration
2257
+ schema[rule.params.durationField].value = duration;
2258
+ // ✅ Auto set To Date
2259
+ schema.toDate.value = new Date(toDateTime);
2260
+ }
2261
+ invokeSetformData() {
2262
+ this.invokeSetFormData.emit();
2263
+ }
2264
+ invokeFormBtnClick(option, propertySchema, form) {
2265
+ if (option.innerAction === 'submit') {
2266
+ let valid = this.checkValidty(form);
2267
+ if (valid) {
2268
+ this.invokeButtonClick.emit({ option: option, propertySchema: propertySchema, recordIndex: this.modalItemInfo?.recordIndex });
2269
+ }
2270
+ }
2271
+ else {
2272
+ this.invokeButtonClick.emit({ option: option, propertySchema: propertySchema });
2273
+ }
2274
+ }
2275
+ checkValidty(form) {
2276
+ if (!form) {
2277
+ return false;
2278
+ }
2279
+ Object.values(form.controls).forEach(control => {
2280
+ control.markAsTouched();
2281
+ control.updateValueAndValidity();
2282
+ });
2283
+ return !!form.valid;
2284
+ }
2285
+ onCancel() {
2286
+ this.modalClose.emit();
2287
+ }
2288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", isModalShow: "isModalShow", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo" }, outputs: { invokeButtonClick: "invokeButtonClick", invokeSetFormData: "invokeSetFormData", modalClose: "modalClose" }, usesOnChanges: true, ngImport: i0, template: "<nz-modal [nzTitle]=\"modalItemInfo?.modalTitle\" nzCentered [(nzVisible)]=\"isModalShow\" [nzFooter]=\"null\"\r\n (nzOnCancel)=\"onCancel()\">\r\n <!-- Loader Spinner -->\r\n <div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n </div>\r\n <ng-container *nzModalContent>\r\n <div [style]=\"getStyleWithoutClasses(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"modalItemInfo?.layoutSchema?.style?.classes[0]\">\r\n <form #dynamicForm=\"ngForm\" *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\" [class]=\"formSection?.label?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\r\n {{formSection.label.caption}}\r\n </div>\r\n <div [class]=\"formSection?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.style).style\"\r\n *ngIf=\"formSection.formFields?.length > 0\">\r\n <div *ngFor=\"let formField of formSection.formFields\">\r\n <div\r\n [ngSwitch]=\"formField?.scope?.reference && modalItemInfo.propertySchema[getScope(formField.scope?.reference)] ?\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- image control -->\r\n <div *ngSwitchCase=\"'image'\" [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <img [src]=\"formField.option.src\" [alt]=\"'img'\" />\r\n </div>\r\n\r\n <!-- credit card control -->\r\n <div *ngSwitchCase=\"'carditCard'\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n </div>\r\n <!-- Used to display form errors -->\r\n <div id=\"card-errors\"\r\n class=\"displayError.textContent!=='': 'alert alert-danger mt-1'\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n <vl-textbox [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\"></vl-textbox>\r\n </div>\r\n <!-- Error Message -->\r\n <!-- <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div> -->\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:formField.option.currency :true: formField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"formField.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- DateRange control -->\r\n <div *ngSwitchCase=\"'dateRange'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dateRangeField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dateRangeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <p-datepicker #dateField=\"ngModel\" [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" type=\"number\" inputmode=\"numeric\"\r\n [disabled]=\"formField?.option?.disabled\" [showIcon]=\"true\"\r\n (ngModelChange)=\"dateChangeEvent(formField, $event)\"\r\n (onInput)=\"onDateTyping($event)\"\r\n (onFocus)=\"forceNumericKeyboard($event)\"\r\n [dateFormat]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.format ? modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n appendTo=\"body\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateField?.touched && dateField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dateField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dateField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Time control -->\r\n <div *ngSwitchCase=\"'time'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker #timeField=\"ngModel\" [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" [timeOnly]=\"true\" hourFormat=\"24\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n (onFocus)=\"forceNumericKeyboard($event)\"\r\n (onInput)=\"onTimeTyping($event)\"\r\n (ngModelChange)=\"timeChangeEvent(formField, $event)\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n appendTo=\"body\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\">\r\n </p-datepicker>\r\n\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"timeField?.touched && timeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"timeField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"timeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Autocomplete control -->\r\n <div *ngSwitchCase=\"'autocomplete'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n\r\n <vl-autocomplete [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\"\r\n [matchData]=\"matchData\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n (autocompSelectEvent)=\"autocompSelectEvent($event)\"\r\n (autocompChange)=\"autocompChangeEvent($event)\"\r\n (autocompFocusOut)=\"autocompFocusOutEvent($event)\">\r\n </vl-autocomplete>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- checkBox control -->\r\n <div *ngSwitchCase=\"'checkbox'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <label class=\"form-check-label\"><input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"invokeSetformData()\" />{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\"\r\n [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label class=\"form-check-label\">{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n <input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" /></label>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" [class]=\"formField.style?.classes[0]\"\r\n #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField.option.optionValue\"> {{\r\n formField.option.optionLabel}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\" [required]=\"formField.option.required\"\r\n [class]=\"formField.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField.option.optionLabel]\"\r\n [nzValue]=\"item[formField.option.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dropdownField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dropdownField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"button\" [style]=\"getStyleWithoutClasses(formField.style).style\"\r\n (click)=\"invokeFormBtnClick(formField.option, modalItemInfo.propertySchema, dynamicForm)\"\r\n class=\"btn btn-primary btn-block\">\r\n {{ formField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n</nz-modal>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i4.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i4.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$2.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5$2.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i10.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: Label, selector: "vl-label", inputs: ["formField", "modalItemInfo"] }, { kind: "component", type: Textbox, selector: "vl-textbox", inputs: ["formField", "modalItemInfo"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }, { kind: "component", type: Autocomplete, selector: "vl-autocomplete", inputs: ["formField", "modalItemInfo", "matchData", "selectedLanguageInfo", "errorMessages"], outputs: ["autocompSelect", "autocompChange", "autocompFocusOut"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }] });
2290
+ }
2291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ModelComponent, decorators: [{
2292
+ type: Component,
2293
+ args: [{ standalone: true, selector: 'vl-model', imports: [
2294
+ CommonModule,
2295
+ FormsModule,
2296
+ NzModalModule,
2297
+ NzSelectModule,
2298
+ NzDatePickerModule,
2299
+ DatePickerModule,
2300
+ AutoCompleteModule,
2301
+ InputTextModule,
2302
+ Label,
2303
+ Textbox,
2304
+ String$1,
2305
+ Autocomplete
2306
+ ], template: "<nz-modal [nzTitle]=\"modalItemInfo?.modalTitle\" nzCentered [(nzVisible)]=\"isModalShow\" [nzFooter]=\"null\"\r\n (nzOnCancel)=\"onCancel()\">\r\n <!-- Loader Spinner -->\r\n <div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n </div>\r\n <ng-container *nzModalContent>\r\n <div [style]=\"getStyleWithoutClasses(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"modalItemInfo?.layoutSchema?.style?.classes[0]\">\r\n <form #dynamicForm=\"ngForm\" *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\" [class]=\"formSection?.label?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\r\n {{formSection.label.caption}}\r\n </div>\r\n <div [class]=\"formSection?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.style).style\"\r\n *ngIf=\"formSection.formFields?.length > 0\">\r\n <div *ngFor=\"let formField of formSection.formFields\">\r\n <div\r\n [ngSwitch]=\"formField?.scope?.reference && modalItemInfo.propertySchema[getScope(formField.scope?.reference)] ?\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- image control -->\r\n <div *ngSwitchCase=\"'image'\" [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <img [src]=\"formField.option.src\" [alt]=\"'img'\" />\r\n </div>\r\n\r\n <!-- credit card control -->\r\n <div *ngSwitchCase=\"'carditCard'\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n </div>\r\n <!-- Used to display form errors -->\r\n <div id=\"card-errors\"\r\n class=\"displayError.textContent!=='': 'alert alert-danger mt-1'\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n <vl-textbox [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\"></vl-textbox>\r\n </div>\r\n <!-- Error Message -->\r\n <!-- <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div> -->\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:formField.option.currency :true: formField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\" [class]=\"formField.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- DateRange control -->\r\n <div *ngSwitchCase=\"'dateRange'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dateRangeField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dateRangeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <p-datepicker #dateField=\"ngModel\" [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" type=\"number\" inputmode=\"numeric\"\r\n [disabled]=\"formField?.option?.disabled\" [showIcon]=\"true\"\r\n (ngModelChange)=\"dateChangeEvent(formField, $event)\"\r\n (onInput)=\"onDateTyping($event)\"\r\n (onFocus)=\"forceNumericKeyboard($event)\"\r\n [dateFormat]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.format ? modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n appendTo=\"body\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\">\r\n </p-datepicker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateField?.touched && dateField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dateField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dateField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Time control -->\r\n <div *ngSwitchCase=\"'time'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">{{ formField.label?.value\r\n ?\r\n formField.label?.value : formField.label?.caption ?\r\n formField.label?.caption :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <p-datepicker #timeField=\"ngModel\" [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" [timeOnly]=\"true\" hourFormat=\"24\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n (onFocus)=\"forceNumericKeyboard($event)\"\r\n (onInput)=\"onTimeTyping($event)\"\r\n (ngModelChange)=\"timeChangeEvent(formField, $event)\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n appendTo=\"body\" [class]=\"formField?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\">\r\n </p-datepicker>\r\n\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"timeField?.touched && timeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"timeField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"timeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Autocomplete control -->\r\n <div *ngSwitchCase=\"'autocomplete'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n\r\n <vl-autocomplete [formField]=\"formField\" [modalItemInfo]=\"modalItemInfo\"\r\n [matchData]=\"matchData\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n (autocompSelectEvent)=\"autocompSelectEvent($event)\"\r\n (autocompChange)=\"autocompChangeEvent($event)\"\r\n (autocompFocusOut)=\"autocompFocusOutEvent($event)\">\r\n </vl-autocomplete>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- checkBox control -->\r\n <div *ngSwitchCase=\"'checkbox'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <label class=\"form-check-label\"><input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"invokeSetformData()\" />{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\"\r\n [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label class=\"form-check-label\">{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n <input type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" /></label>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" [class]=\"formField.style?.classes[0]\"\r\n #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField.option.optionValue\"> {{\r\n formField.option.optionLabel}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\" [required]=\"formField.option.required\"\r\n [class]=\"formField.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField.option.optionLabel]\"\r\n [nzValue]=\"item[formField.option.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"dropdownField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\" *ngIf=\"dropdownField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"button\" [style]=\"getStyleWithoutClasses(formField.style).style\"\r\n (click)=\"invokeFormBtnClick(formField.option, modalItemInfo.propertySchema, dynamicForm)\"\r\n class=\"btn btn-primary btn-block\">\r\n {{ formField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </ng-container>\r\n</nz-modal>" }]
2307
+ }], ctorParameters: () => [], propDecorators: { errorMessages: [{
2308
+ type: Input
2309
+ }], isModalShow: [{
2310
+ type: Input
2311
+ }], modalItemInfo: [{
2312
+ type: Input
2313
+ }], selectedLanguageInfo: [{
2314
+ type: Input
2315
+ }], userInfo: [{
2316
+ type: Input
2317
+ }], invokeButtonClick: [{
2318
+ type: Output
2319
+ }], invokeSetFormData: [{
2320
+ type: Output
2321
+ }], modalClose: [{
2322
+ type: Output
2323
+ }] } });
2324
+
2325
+ class Button {
2326
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
2327
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Button, isStandalone: true, selector: "vl-button", ngImport: i0, template: "<p>button works!</p>\r\n", styles: [""] });
2328
+ }
2329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Button, decorators: [{
2330
+ type: Component,
2331
+ args: [{ selector: 'vl-button', standalone: true, template: "<p>button works!</p>\r\n" }]
2332
+ }] });
2333
+
2334
+ let Date$1 = class Date {
2335
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Date, deps: [], target: i0.ɵɵFactoryTarget.Component });
2336
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Date, isStandalone: true, selector: "vl-date", ngImport: i0, template: "<p>date works!</p>\r\n", styles: [""] });
2337
+ };
2338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Date$1, decorators: [{
2339
+ type: Component,
2340
+ args: [{ selector: 'vl-date', standalone: true, template: "<p>date works!</p>\r\n" }]
2341
+ }] });
2342
+
2343
+ class Dropdown {
2344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Dropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
2345
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Dropdown, isStandalone: true, selector: "vl-dropdown", ngImport: i0, template: "<p>dropdown works!</p>\r\n", styles: [""] });
2346
+ }
2347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Dropdown, decorators: [{
2348
+ type: Component,
2349
+ args: [{ selector: 'vl-dropdown', standalone: true, template: "<p>dropdown works!</p>\r\n" }]
2350
+ }] });
2351
+
2352
+ class ErrorMessage {
2353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ErrorMessage, deps: [], target: i0.ɵɵFactoryTarget.Component });
2354
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: ErrorMessage, isStandalone: true, selector: "vl-error-message", ngImport: i0, template: "<p>error-message works!</p>\r\n", styles: [""] });
2355
+ }
2356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ErrorMessage, decorators: [{
2357
+ type: Component,
2358
+ args: [{ selector: 'vl-error-message', standalone: true, template: "<p>error-message works!</p>\r\n" }]
2359
+ }] });
2360
+
2361
+ class Time {
2362
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Time, deps: [], target: i0.ɵɵFactoryTarget.Component });
2363
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: Time, isStandalone: true, selector: "vl-time", ngImport: i0, template: "<p>time works!</p>\r\n", styles: [""] });
2364
+ }
2365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Time, decorators: [{
2366
+ type: Component,
2367
+ args: [{ selector: 'vl-time', standalone: true, template: "<p>time works!</p>\r\n" }]
2368
+ }] });
2369
+
2370
+ // lib/view-toolkit.module.ts
2371
+ class ViewToolkitModule {
2372
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2373
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, imports: [CommonModule,
2374
+ CardComponent,
2375
+ FormComponent,
2376
+ GridComponent,
2377
+ HeaderMenuComponent,
2378
+ LogsComponent,
2379
+ ModelComponent,
2380
+ PaginationComponent,
2381
+ SideMenuComponent,
2382
+ Autocomplete,
2383
+ Button,
2384
+ Date$1,
2385
+ Dropdown,
2386
+ ErrorMessage,
2387
+ Label,
2388
+ String$1,
2389
+ Textbox,
2390
+ Time], exports: [CardComponent,
2391
+ FormComponent,
2392
+ GridComponent,
2393
+ HeaderMenuComponent,
2394
+ LogsComponent,
2395
+ ModelComponent,
2396
+ PaginationComponent,
2397
+ SideMenuComponent] });
2398
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, imports: [CommonModule,
2399
+ CardComponent,
2400
+ FormComponent,
2401
+ GridComponent,
2402
+ HeaderMenuComponent,
2403
+ LogsComponent,
2404
+ ModelComponent,
2405
+ PaginationComponent,
2406
+ SideMenuComponent,
2407
+ Autocomplete,
2408
+ Textbox] });
2409
+ }
2410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ViewToolkitModule, decorators: [{
2411
+ type: NgModule,
2412
+ args: [{
2413
+ imports: [
2414
+ CommonModule,
2415
+ CardComponent,
2416
+ FormComponent,
2417
+ GridComponent,
2418
+ HeaderMenuComponent,
2419
+ LogsComponent,
2420
+ ModelComponent,
2421
+ PaginationComponent,
2422
+ SideMenuComponent,
2423
+ Autocomplete,
2424
+ Button,
2425
+ Date$1,
2426
+ Dropdown,
2427
+ ErrorMessage,
2428
+ Label,
2429
+ String$1,
2430
+ Textbox,
2431
+ Time
2432
+ ],
2433
+ exports: [
2434
+ CardComponent,
2435
+ FormComponent,
2436
+ GridComponent,
2437
+ HeaderMenuComponent,
2438
+ LogsComponent,
2439
+ ModelComponent,
2440
+ PaginationComponent,
2441
+ SideMenuComponent
2442
+ ]
2443
+ }]
2444
+ }] });
2445
+
2446
+ class Couchdb {
2447
+ utilityService;
2448
+ couchDbBaseUrl = 'https://couchdb.yomotech.de';
2449
+ constructor(utilityService) {
2450
+ this.utilityService = utilityService;
2451
+ }
2452
+ async getTenantDatabases(tenantKey) {
2453
+ if (!tenantKey || !tenantKey.trim()) {
2454
+ throw new Error('Missing tenantKey');
2455
+ }
2456
+ const response = await fetch(`https://couchdb.yomotech.de/tenant-dbs`, {
2457
+ method: 'GET',
2458
+ headers: {
2459
+ Accept: 'application/json',
2460
+ 'X-Tenant-Key': tenantKey.trim(),
1252
2461
  },
1253
2462
  });
1254
2463
  const data = await this.parseJsonOrText(response);
@@ -1537,7 +2746,7 @@ class ConfigService {
1537
2746
  responseType: this.keycloakConfig.responseType
1538
2747
  };
1539
2748
  }
1540
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ConfigService, deps: [{ token: Couchdb }, { token: UtilityService }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
2749
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ConfigService, deps: [{ token: Couchdb }, { token: UtilityService }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
1541
2750
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ConfigService, providedIn: 'root' });
1542
2751
  }
1543
2752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: ConfigService, decorators: [{
@@ -1545,7 +2754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1545
2754
  args: [{
1546
2755
  providedIn: 'root'
1547
2756
  }]
1548
- }], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1$1.Platform }] });
2757
+ }], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1.Platform }] });
1549
2758
 
1550
2759
  class MobileKeycloakService {
1551
2760
  config;
@@ -1641,7 +2850,7 @@ class MobileKeycloakService {
1641
2850
  await this.utilityService.removeLocalStorage('KeycloakInfo');
1642
2851
  window.location.reload();
1643
2852
  }
1644
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: MobileKeycloakService, deps: [{ token: ConfigService }, { token: i1.HttpClient }, { token: UtilityService }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
2853
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: MobileKeycloakService, deps: [{ token: ConfigService }, { token: i1$1.HttpClient }, { token: UtilityService }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
1645
2854
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: MobileKeycloakService, providedIn: 'root' });
1646
2855
  }
1647
2856
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: MobileKeycloakService, decorators: [{
@@ -1649,60 +2858,497 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1649
2858
  args: [{
1650
2859
  providedIn: 'root'
1651
2860
  }]
1652
- }], ctorParameters: () => [{ type: ConfigService }, { type: i1.HttpClient }, { type: UtilityService }, { type: i1$1.Platform }] });
2861
+ }], ctorParameters: () => [{ type: ConfigService }, { type: i1$1.HttpClient }, { type: UtilityService }, { type: i1.Platform }] });
1653
2862
 
1654
- class NetworkLogService {
1655
- logs = [];
1656
- addLog(log) {
1657
- this.logs.unshift(log); // latest first
1658
- localStorage.setItem('networkLogs', JSON.stringify(this.logs));
2863
+ class SideMenuComponent {
2864
+ i18n;
2865
+ mobileKeycloakService;
2866
+ couchdbService;
2867
+ oauthService;
2868
+ platform;
2869
+ requestService;
2870
+ utilityService;
2871
+ dialogService;
2872
+ oktaAuthService;
2873
+ notificationService;
2874
+ oktaAuth;
2875
+ isCollapsed = false;
2876
+ isMobile = false;
2877
+ projectsLayoutSchema;
2878
+ loginUser = {};
2879
+ isLogined = false;
2880
+ loginedUserInfo = {};
2881
+ menuItemsCopy = {};
2882
+ settingMenu = {};
2883
+ setLanguage = false;
2884
+ tenantKey = '';
2885
+ tenantName = '';
2886
+ menuItems = [];
2887
+ userInfo = {};
2888
+ settings = {};
2889
+ projects;
2890
+ environment;
2891
+ projectSeleted;
2892
+ languageChange = new EventEmitter();
2893
+ invokeMenu = new EventEmitter();
2894
+ menuToggle = new EventEmitter();
2895
+ invokeProject = new EventEmitter();
2896
+ errorMessage = new EventEmitter();
2897
+ deleteProject = new EventEmitter();
2898
+ PRIME_DE = {
2899
+ firstDayOfWeek: 1,
2900
+ dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
2901
+ dayNamesShort: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
2902
+ dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
2903
+ monthNames: [
2904
+ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
2905
+ 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
2906
+ ],
2907
+ monthNamesShort: [
2908
+ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun',
2909
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'
2910
+ ],
2911
+ today: 'Heute',
2912
+ clear: 'Löschen',
2913
+ dateFormat: 'yy-mm-dd',
2914
+ weekHeader: 'KW'
2915
+ };
2916
+ PRIME_EN = {
2917
+ firstDayOfWeek: 0,
2918
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
2919
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
2920
+ dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
2921
+ monthNames: [
2922
+ 'January', 'February', 'March', 'April', 'May', 'June',
2923
+ 'July', 'August', 'September', 'October', 'November', 'December'
2924
+ ],
2925
+ monthNamesShort: [
2926
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
2927
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
2928
+ ],
2929
+ today: 'Today',
2930
+ clear: 'Clear',
2931
+ dateFormat: 'yy-mm-dd',
2932
+ weekHeader: 'Wk'
2933
+ };
2934
+ sideMenu;
2935
+ constructor(i18n, mobileKeycloakService, couchdbService, oauthService, platform, requestService, utilityService, dialogService, oktaAuthService, notificationService, oktaAuth) {
2936
+ this.i18n = i18n;
2937
+ this.mobileKeycloakService = mobileKeycloakService;
2938
+ this.couchdbService = couchdbService;
2939
+ this.oauthService = oauthService;
2940
+ this.platform = platform;
2941
+ this.requestService = requestService;
2942
+ this.utilityService = utilityService;
2943
+ this.dialogService = dialogService;
2944
+ this.oktaAuthService = oktaAuthService;
2945
+ this.notificationService = notificationService;
2946
+ this.oktaAuth = oktaAuth;
2947
+ }
2948
+ onDocumentClick(event) {
2949
+ const path = event.composedPath();
2950
+ const clickedInsideMenu = path.some(el => el === this.sideMenu?.nativeElement);
2951
+ const clickedToggle = path.some(el => el instanceof HTMLElement &&
2952
+ el.classList?.contains('side-toggle-handle'));
2953
+ if (!clickedInsideMenu && !clickedToggle && this.isMobile) {
2954
+ console.log('OUTSIDE CLICK');
2955
+ let btn = document.getElementById('toggle-id');
2956
+ if (btn && !this.isCollapsed) {
2957
+ btn.click();
2958
+ }
2959
+ }
1659
2960
  }
1660
- getLogsByDate(date) {
1661
- return this.logs.filter(l => l.date === date);
2961
+ toggleCollapsed() {
2962
+ if (this.isMobile) {
2963
+ this.isCollapsed = !this.isCollapsed;
2964
+ const sideMenu = document.querySelector('.side-menu');
2965
+ if (sideMenu) {
2966
+ sideMenu.classList.toggle('open', !this.isCollapsed);
2967
+ }
2968
+ }
2969
+ else {
2970
+ this.isCollapsed = !this.isCollapsed;
2971
+ }
1662
2972
  }
1663
- getAll() {
1664
- return [...this.logs];
2973
+ async ngOnInit() {
2974
+ if (this.platform.ANDROID || this.platform.IOS) {
2975
+ this.isCollapsed = true;
2976
+ this.isMobile = true;
2977
+ this.tenantKey = await this.utilityService.getLocalStorage('tenantKey');
2978
+ this.tenantName = await this.utilityService.getLocalStorage('tenantName');
2979
+ }
2980
+ else {
2981
+ this.tenantKey = await this.utilityService.getStorage('tenantKey');
2982
+ this.tenantName = await this.utilityService.getStorage('tenantName');
2983
+ }
1665
2984
  }
1666
- clear() {
1667
- this.logs = [];
1668
- localStorage.removeItem('networkLogs');
2985
+ ngOnChanges(changes) {
2986
+ this.setLoginUser();
2987
+ if (changes['menuItems'] && this.menuItems?.length) {
2988
+ this.menuItemsCopy = JSON.parse(JSON.stringify(this.menuItems));
2989
+ this.setProjectSetting();
2990
+ this.setSettingImages();
2991
+ }
2992
+ }
2993
+ async setProjectSetting() {
2994
+ const tasks = [];
2995
+ this.menuItems.forEach((menuItem) => {
2996
+ if (menuItem?.label?.caption === "Setting" && menuItem?.submenu?.length) {
2997
+ menuItem?.submenu.forEach((subMenu) => {
2998
+ if (subMenu?.label?.caption === "Languages" && subMenu?.submenu?.length) {
2999
+ subMenu?.submenu.forEach((childMenu) => {
3000
+ tasks.push((async () => {
3001
+ try {
3002
+ childMenu.icon = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `${childMenu.icon}`);
3003
+ }
3004
+ catch (err) {
3005
+ console.error("Failed to fetch icon:", err);
3006
+ }
3007
+ })());
3008
+ });
3009
+ }
3010
+ });
3011
+ }
3012
+ });
3013
+ await Promise.all(tasks);
1669
3014
  }
1670
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1671
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, providedIn: 'root' });
3015
+ async ngAfterViewInit() {
3016
+ let mobileLang = await this.getDeviceLanguage();
3017
+ if (mobileLang) {
3018
+ this.changeLanguage(mobileLang + '.json');
3019
+ }
3020
+ setTimeout(async () => {
3021
+ this.initializeProjects();
3022
+ await this.setLoginUser();
3023
+ }, 1000);
3024
+ }
3025
+ async getDeviceLanguage() {
3026
+ const info = await Device.getLanguageCode();
3027
+ return info.value; // e.g. 'en', 'ur', 'de'
3028
+ }
3029
+ async setLoginUser() {
3030
+ try {
3031
+ if (this.environment?.login?.type === 'oktaAuth') {
3032
+ if (this.platform.ANDROID || this.platform.IOS) {
3033
+ const logined = await this.utilityService.getLocalStorage('loginedUser');
3034
+ if (logined?.token) {
3035
+ this.requestService.getLoginUser(logined.token).subscribe({
3036
+ next: (userInfo) => {
3037
+ this.loginUser = { ...this.userInfo, ...logined };
3038
+ this.setLoginedUser(this.loginUser);
3039
+ },
3040
+ error: (err) => {
3041
+ console.error('Failed to fetch login user (mobile):', err);
3042
+ }
3043
+ });
3044
+ }
3045
+ }
3046
+ else {
3047
+ this.oktaAuthService.authState$.subscribe({
3048
+ next: async (result) => {
3049
+ if (result.isAuthenticated) {
3050
+ try {
3051
+ const oktaWebUser = await this.oktaAuth.getUser();
3052
+ const webLoginedUser = { ...this.userInfo, ...oktaWebUser };
3053
+ this.loginUser = webLoginedUser;
3054
+ this.setLoginedUser(this.loginUser);
3055
+ }
3056
+ catch (err) {
3057
+ console.error('Failed to fetch Okta web user:', err);
3058
+ }
3059
+ }
3060
+ },
3061
+ error: (err) => {
3062
+ console.error('Okta auth state subscription error:', err);
3063
+ }
3064
+ });
3065
+ }
3066
+ }
3067
+ else if (this.environment?.login?.type === 'jwtToken' && this.userInfo?.jwt) {
3068
+ const userInfo = this.getUserInfoFromToken(this.userInfo.jwt);
3069
+ this.loginUser = userInfo;
3070
+ this.setLoginedUser(this.loginUser);
3071
+ }
3072
+ else if (this.environment?.login?.type === 'keycloak' && this.userInfo?.name) {
3073
+ this.loginUser = this.userInfo;
3074
+ this.setLoginedUser(this.loginUser);
3075
+ }
3076
+ }
3077
+ catch (error) {
3078
+ console.error('Error in setLoginUser:', error);
3079
+ }
3080
+ }
3081
+ getUserInfoFromToken(token) {
3082
+ try {
3083
+ const decoded = jwtDecode(token);
3084
+ return {
3085
+ sub: decoded.sub,
3086
+ name: decoded.name || 'User is undefined',
3087
+ role: decoded.role || 'Role is undefined',
3088
+ email: decoded.email || decoded.sub,
3089
+ iat: decoded.iat,
3090
+ exp: decoded.exp
3091
+ };
3092
+ }
3093
+ catch (err) {
3094
+ return null;
3095
+ }
3096
+ }
3097
+ async setSettingImages() {
3098
+ const tasks = [];
3099
+ for (const menu of this.settings?.submenu) {
3100
+ if (menu?.submenu?.length) {
3101
+ for (const childMenu of menu.submenu) {
3102
+ if (childMenu.options && childMenu.options.setImageUrl) {
3103
+ tasks.push((async () => {
3104
+ try {
3105
+ childMenu.icon = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `${childMenu.icon}`);
3106
+ }
3107
+ catch (err) {
3108
+ console.error("Failed to fetch icon:", err);
3109
+ }
3110
+ })());
3111
+ }
3112
+ }
3113
+ }
3114
+ }
3115
+ await Promise.all(tasks);
3116
+ this.settingMenu = JSON.parse(JSON.stringify(this.settings));
3117
+ }
3118
+ isUrl(value) {
3119
+ return /^https?:\/\//.test(value) || value.startsWith('blob:');
3120
+ }
3121
+ async setLoginedUser(user) {
3122
+ if (user?.name) {
3123
+ user['image'] = "assets/user.png";
3124
+ this.loginedUserInfo = user;
3125
+ let matchMenu = this.menuItems.find((menu) => menu?.options?.action && menu?.options?.action === "logout");
3126
+ if (matchMenu) {
3127
+ this.loginedUserInfo.actions = [matchMenu];
3128
+ }
3129
+ this.isLogined = this.loginedUserInfo?.name ? true : false;
3130
+ }
3131
+ }
3132
+ initializeProjects() {
3133
+ this.projectsLayoutSchema = this.projects;
3134
+ }
3135
+ async invokeNavigate(menu, parentMenu) {
3136
+ if (menu.options.showAllProjects) {
3137
+ this.utilityService.showAllProjects();
3138
+ }
3139
+ else if (menu.options.changeLang) {
3140
+ this.changeLanguage(menu.options.data_url);
3141
+ }
3142
+ else if (menu.options.changeProject) {
3143
+ this.navigateToProject(menu);
3144
+ }
3145
+ else if (menu.options.logs) {
3146
+ this.openLogsTable();
3147
+ }
3148
+ else if (menu.options.terms) {
3149
+ this.notificationService.info("Term Not Apply");
3150
+ }
3151
+ else if (menu.options.projectPrivacy) {
3152
+ this.notificationService.warning("Project Privacy Not Apply");
3153
+ }
3154
+ else if (menu.options.projectVersion) {
3155
+ this.notificationService.warning("Project Version Not Apply");
3156
+ }
3157
+ else if (menu.options.action == 'login' && this.environment?.login?.type == "keycloak") {
3158
+ if (this.platform.ANDROID || this.platform.IOS) {
3159
+ let login = await this.mobileKeycloakService.login();
3160
+ }
3161
+ else {
3162
+ this.oauthService.initLoginFlow();
3163
+ }
3164
+ }
3165
+ else {
3166
+ this.toggleCollapsed();
3167
+ this.invokeMenu.emit(menu);
3168
+ }
3169
+ }
3170
+ openLogsTable() {
3171
+ let logsModal = this.dialogService.open(LogsComponent, {
3172
+ width: '700px',
3173
+ data: {}
3174
+ });
3175
+ // logsModal.onClose.subscribe((res: any) => {
3176
+ // if (res) {
3177
+ // console.log('res789: ', res);
3178
+ // }
3179
+ // });
3180
+ }
3181
+ deleteMenuItem(subChild, index, event) {
3182
+ event.stopPropagation();
3183
+ this.settings.submenu[1].submenu.splice(index, 1);
3184
+ this.deleteProject.emit(subChild);
3185
+ }
3186
+ navigateToProject(project) {
3187
+ this.invokeProject.emit(project);
3188
+ }
3189
+ async changeLanguage(lang) {
3190
+ if (lang) {
3191
+ if (lang === 'de.json') {
3192
+ // NG-Zorro
3193
+ this.i18n.setLocale(de_DE);
3194
+ // PrimeNG 🔥
3195
+ // this.primengConfig.setTranslation(this.PRIME_DE);
3196
+ }
3197
+ else {
3198
+ this.i18n.setLocale(en_US);
3199
+ // this.primengConfig.setTranslation(this.PRIME_EN);
3200
+ }
3201
+ const selectedLanguage = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `languages/${lang}`);
3202
+ const errorMessages = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `languages/errorMessage_${lang}`);
3203
+ this.languageChange.emit({ selectedLanguage: selectedLanguage, errorMessages: errorMessages });
3204
+ this.setLanguage = true;
3205
+ this.menuItemsCopy.forEach((menu, index) => {
3206
+ if (menu.label && menu.label.caption && selectedLanguage[menu.label.caption]) {
3207
+ this.menuItems[index].label.caption = selectedLanguage[menu.label.caption];
3208
+ }
3209
+ if (menu?.submenu?.length) {
3210
+ menu?.submenu.forEach((subMenuInfo, subIndex) => {
3211
+ if (subMenuInfo.label && subMenuInfo.label.caption && selectedLanguage[subMenuInfo.label.caption]) {
3212
+ this.menuItems[index].submenu[subIndex].label.caption = selectedLanguage[subMenuInfo.label.caption];
3213
+ }
3214
+ if (subMenuInfo?.submenu?.length) {
3215
+ subMenuInfo.submenu.forEach((childMenu, childIndex) => {
3216
+ if (childMenu.label && childMenu.label.caption && selectedLanguage[childMenu.label.caption]) {
3217
+ this.menuItems[index].submenu[subIndex].submenu[childIndex].label.caption = selectedLanguage[childMenu.label.caption];
3218
+ }
3219
+ });
3220
+ }
3221
+ });
3222
+ }
3223
+ });
3224
+ if (this.settingMenu?.label?.caption) {
3225
+ this.settingMenu.label.caption = selectedLanguage[this.settings.label.caption];
3226
+ }
3227
+ this.settings?.submenu?.forEach((menu, index) => {
3228
+ if (menu.label && menu.label.caption && selectedLanguage[menu.label.caption] && this.settingMenu?.submenu[index] && this.settingMenu.submenu[index]?.label) {
3229
+ this.settingMenu.submenu[index].label.caption = selectedLanguage[menu.label.caption];
3230
+ }
3231
+ });
3232
+ }
3233
+ }
3234
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: SideMenuComponent, deps: [{ token: i1$3.NzI18nService }, { token: MobileKeycloakService }, { token: Couchdb }, { token: i5$1.OAuthService }, { token: i1.Platform }, { token: RequestService }, { token: UtilityService }, { token: i8.DialogService }, { token: i4$1.OktaAuthStateService }, { token: NotificationService }, { token: OKTA_AUTH }], target: i0.ɵɵFactoryTarget.Component });
3235
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", environment: "environment", projectSeleted: "projectSeleted" }, outputs: { languageChange: "languageChange", invokeMenu: "invokeMenu", menuToggle: "menuToggle", invokeProject: "invokeProject", errorMessage: "errorMessage", deleteProject: "deleteProject" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\" #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\" [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu h-screen\" id=\"sidemenuwrap\" *ngIf=\"setLanguage\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container *ngIf=\"!item.submenu && item?.options?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' ? item.options?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.options?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.options?.login ? item.options.role ? item.options.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.options?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.options?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak') ? loginedUserInfo?.name ? '' : 'hidden' : item.options?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.options?.action != 'logout'\" [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\" [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container *ngIf=\"subChild?.options?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\" [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\" style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\" [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\" [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\" nz-menu-item>\r\n <span [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container *ngIf=\"subChild?.options?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\" [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\" nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\" (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n\r\n </ul>\r\n </div>\r\n</div>", styles: [".menu-separator{height:1px;margin:15px 0 6px;background-color:#ffffff26;list-style:none}.side-menu{background-color:#0d1b2a;color:#fff;display:flex;flex-direction:column;height:100%;transition:width .3s ease}.side-menu ul[nz-menu]{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scroll-behavior:smooth}.user-profile{text-align:center;padding:20px 10px;margin-top:40px;border-bottom:1px solid rgba(255,255,255,.1)}.user-profile.collapsed{padding:10px}.user-profile .avatar{width:64px;height:64px;border-radius:50%;border:2px solid #fff;margin-bottom:8px}.user-profile.collapsed .avatar{width:40px;height:40px;margin-bottom:0}.user-profile .name{font-weight:600;font-size:14px;color:#fff}.user-profile .email{font-size:12px;color:#aaa;margin-bottom:8px;word-break:break-word}.user-profile .actions button{margin:0 4px;color:#fff}.projects{position:absolute;bottom:0;width:100%}@media(max-width:768px){.side-menu{height:calc(100dvh - var(--header-height));top:var(--header-height)}.side-menu.open{width:250px}.user-profile .details{display:none}.user-profile .avatar{width:40px;height:40px}}.collapse-btn{position:absolute;z-index:10001}@media(max-width:768px){.collapse-btn{top:calc(var(--header-height) + 8px);left:10px}}@media(max-width:768px){.left-wrap.sidemenu.collapsed .user-profile{max-height:0;opacity:0;overflow:hidden;padding:0;transition:all .2s ease}}.menu-row{display:flex;align-items:center;justify-content:space-between;width:100%}.menu-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{margin-left:auto;cursor:pointer}.side-toggle-handle{position:absolute;right:-14px;width:28px;height:48px;background:#0d1b2a;border-radius:0 6px 6px 0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10000;transition:all .25s ease;box-shadow:2px 0 6px #00000040}.side-toggle-handle span{color:#fff;font-size:14px;transition:transform .25s ease}@media(max-width:768px){.side-toggle-handle{top:calc(var(--header-height) + -56px)!important;padding-left:10px;transform:none!important}}@media(min-width:769px){.left-wrap.sidemenu.collapsed:hover{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
3236
+ // NG-ZORRO
3237
+ NzMenuModule }, { kind: "directive", type: i12$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i12$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i12$1.NzSubMenuComponent, selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzTriggerSubMenuAction", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i14.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type:
3238
+ // PrimeNG
3239
+ DynamicDialogModule }] });
1672
3240
  }
1673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NetworkLogService, decorators: [{
1674
- type: Injectable,
1675
- args: [{
1676
- providedIn: 'root'
1677
- }]
1678
- }] });
3241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: SideMenuComponent, decorators: [{
3242
+ type: Component,
3243
+ args: [{ standalone: true, selector: 'vl-side-menu', imports: [
3244
+ CommonModule,
3245
+ PlatformModule,
3246
+ // NG-ZORRO
3247
+ NzMenuModule,
3248
+ NzIconModule,
3249
+ NzTooltipModule,
3250
+ NzButtonModule,
3251
+ // PrimeNG
3252
+ DynamicDialogModule
3253
+ ], template: "<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\" #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\" [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu h-screen\" id=\"sidemenuwrap\" *ngIf=\"setLanguage\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container *ngIf=\"!item.submenu && item?.options?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' ? item.options?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.options?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.options?.login ? item.options.role ? item.options.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.options?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.options?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak') ? loginedUserInfo?.name ? '' : 'hidden' : item.options?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.options?.action != 'logout'\" [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\" [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container *ngIf=\"subChild?.options?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\" [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\" style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\" [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\" [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\" nz-menu-item>\r\n <span [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container *ngIf=\"subChild?.options?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\" [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\" nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\" (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n\r\n </ul>\r\n </div>\r\n</div>", styles: [".menu-separator{height:1px;margin:15px 0 6px;background-color:#ffffff26;list-style:none}.side-menu{background-color:#0d1b2a;color:#fff;display:flex;flex-direction:column;height:100%;transition:width .3s ease}.side-menu ul[nz-menu]{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scroll-behavior:smooth}.user-profile{text-align:center;padding:20px 10px;margin-top:40px;border-bottom:1px solid rgba(255,255,255,.1)}.user-profile.collapsed{padding:10px}.user-profile .avatar{width:64px;height:64px;border-radius:50%;border:2px solid #fff;margin-bottom:8px}.user-profile.collapsed .avatar{width:40px;height:40px;margin-bottom:0}.user-profile .name{font-weight:600;font-size:14px;color:#fff}.user-profile .email{font-size:12px;color:#aaa;margin-bottom:8px;word-break:break-word}.user-profile .actions button{margin:0 4px;color:#fff}.projects{position:absolute;bottom:0;width:100%}@media(max-width:768px){.side-menu{height:calc(100dvh - var(--header-height));top:var(--header-height)}.side-menu.open{width:250px}.user-profile .details{display:none}.user-profile .avatar{width:40px;height:40px}}.collapse-btn{position:absolute;z-index:10001}@media(max-width:768px){.collapse-btn{top:calc(var(--header-height) + 8px);left:10px}}@media(max-width:768px){.left-wrap.sidemenu.collapsed .user-profile{max-height:0;opacity:0;overflow:hidden;padding:0;transition:all .2s ease}}.menu-row{display:flex;align-items:center;justify-content:space-between;width:100%}.menu-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{margin-left:auto;cursor:pointer}.side-toggle-handle{position:absolute;right:-14px;width:28px;height:48px;background:#0d1b2a;border-radius:0 6px 6px 0;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10000;transition:all .25s ease;box-shadow:2px 0 6px #00000040}.side-toggle-handle span{color:#fff;font-size:14px;transition:transform .25s ease}@media(max-width:768px){.side-toggle-handle{top:calc(var(--header-height) + -56px)!important;padding-left:10px;transform:none!important}}@media(min-width:769px){.left-wrap.sidemenu.collapsed:hover{transform:translate(0)}}\n"] }]
3254
+ }], ctorParameters: () => [{ type: i1$3.NzI18nService }, { type: MobileKeycloakService }, { type: Couchdb }, { type: i5$1.OAuthService }, { type: i1.Platform }, { type: RequestService }, { type: UtilityService }, { type: i8.DialogService }, { type: i4$1.OktaAuthStateService }, { type: NotificationService }, { type: OktaAuth, decorators: [{
3255
+ type: Inject,
3256
+ args: [OKTA_AUTH]
3257
+ }] }], propDecorators: { menuItems: [{
3258
+ type: Input
3259
+ }], userInfo: [{
3260
+ type: Input
3261
+ }], settings: [{
3262
+ type: Input
3263
+ }], projects: [{
3264
+ type: Input
3265
+ }], environment: [{
3266
+ type: Input
3267
+ }], projectSeleted: [{
3268
+ type: Input
3269
+ }], languageChange: [{
3270
+ type: Output
3271
+ }], invokeMenu: [{
3272
+ type: Output
3273
+ }], menuToggle: [{
3274
+ type: Output
3275
+ }], invokeProject: [{
3276
+ type: Output
3277
+ }], errorMessage: [{
3278
+ type: Output
3279
+ }], deleteProject: [{
3280
+ type: Output
3281
+ }], sideMenu: [{
3282
+ type: ViewChild,
3283
+ args: ['sideMenu', { static: true }]
3284
+ }], onDocumentClick: [{
3285
+ type: HostListener,
3286
+ args: ['document:click', ['$event']]
3287
+ }] } });
1679
3288
 
1680
- class NotificationService {
1681
- toastr;
1682
- constructor(toastr) {
1683
- this.toastr = toastr;
1684
- }
1685
- success(message, time = 5000) {
1686
- this.toastr.success(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
3289
+ // AUTO-GENERATED. Do not edit.
3290
+ const APP_VERSION = '1.0.204';
3291
+
3292
+ const VERSION_KEY = 'APP_VERSION';
3293
+ class AppVersionResetService {
3294
+ platform;
3295
+ constructor(platform) {
3296
+ this.platform = platform;
1687
3297
  }
1688
- info(message, time = 5000) {
1689
- this.toastr.info(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
3298
+ async run() {
3299
+ if (this.platform.ANDROID || this.platform.IOS) {
3300
+ await this.clearNativeIfChanged();
3301
+ // this.clearWebIfChanged();
3302
+ // return;
3303
+ }
1690
3304
  }
1691
- warning(message, time = 20000) {
1692
- this.toastr.warning(message, "", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
3305
+ async clearNativeIfChanged() {
3306
+ const { value: savedVersion } = await Preferences.get({ key: VERSION_KEY });
3307
+ if (savedVersion === APP_VERSION)
3308
+ return;
3309
+ console.log(`🧹 Clearing Capacitor Preferences (new build ${APP_VERSION})`);
3310
+ await Preferences.clear();
3311
+ this.clearWebStores();
3312
+ await Preferences.set({ key: VERSION_KEY, value: APP_VERSION });
1693
3313
  }
1694
- error(error, time = 20000, message) {
1695
- this.toastr.error(error, message, { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });
3314
+ // private clearWebIfChanged(): void {
3315
+ // const savedVersion = sessionStorage.getItem(VERSION_KEY) || localStorage.getItem(VERSION_KEY);
3316
+ // if (savedVersion === APP_VERSION) return;
3317
+ // this.clearWebStores();
3318
+ // localStorage.setItem(VERSION_KEY, APP_VERSION);
3319
+ // sessionStorage.setItem(VERSION_KEY, APP_VERSION);
3320
+ // }
3321
+ clearWebStores() {
3322
+ try {
3323
+ localStorage.clear();
3324
+ }
3325
+ catch { }
3326
+ try {
3327
+ sessionStorage.clear();
3328
+ }
3329
+ catch { }
3330
+ try {
3331
+ if (typeof document !== 'undefined' && document.cookie) {
3332
+ document.cookie.split(';').forEach((c) => {
3333
+ const eqPos = c.indexOf('=');
3334
+ const name = eqPos > -1 ? c.substring(0, eqPos).trim() : c.trim();
3335
+ if (name) {
3336
+ document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
3337
+ }
3338
+ });
3339
+ }
3340
+ }
3341
+ catch { }
1696
3342
  }
1697
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, deps: [{ token: i1$2.ToastrService }], target: i0.ɵɵFactoryTarget.Injectable });
1698
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, providedIn: 'root' });
3343
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
3344
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, providedIn: 'root' });
1699
3345
  }
1700
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NotificationService, decorators: [{
3346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AppVersionResetService, decorators: [{
1701
3347
  type: Injectable,
1702
3348
  args: [{
1703
3349
  providedIn: 'root'
1704
3350
  }]
1705
- }], ctorParameters: () => [{ type: i1$2.ToastrService }] });
3351
+ }], ctorParameters: () => [{ type: i1.Platform }] });
1706
3352
 
1707
3353
  class PouchdbService {
1708
3354
  db = new PouchDB("");
@@ -1889,5 +3535,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1889
3535
  * Generated bundle index. Do not edit.
1890
3536
  */
1891
3537
 
1892
- export { AppVersionResetService, CardComponent, ConfigService, Couchdb, FormComponent, GridComponent, MobileKeycloakService, NetworkLogService, NotificationService, PaginationComponent, PouchdbService, RequestService, UtilityService, ViewToolkitModule };
3538
+ export { AppVersionResetService, CardComponent, ConfigService, Couchdb, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MobileKeycloakService, ModelComponent, NetworkLogService, NotificationService, PaginationComponent, PouchdbService, RequestService, SideMenuComponent, UtilityService, ViewToolkitModule };
1893
3539
  //# sourceMappingURL=yomotech-view-toolkit.mjs.map