@yomotech/view-toolkit 0.0.9 → 0.0.12

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.
@@ -129,6 +129,191 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
129
129
  type: Input
130
130
  }] } });
131
131
 
132
+ class Couchdb {
133
+ utilityService;
134
+ couchDbBaseUrl = 'https://couchdb.yomotech.de';
135
+ constructor(utilityService) {
136
+ this.utilityService = utilityService;
137
+ }
138
+ async getTenantDatabases(tenantKey) {
139
+ if (!tenantKey || !tenantKey.trim()) {
140
+ throw new Error('Missing tenantKey');
141
+ }
142
+ const response = await fetch(`https://couchdb.yomotech.de/tenant-dbs`, {
143
+ method: 'GET',
144
+ headers: {
145
+ Accept: 'application/json',
146
+ 'X-Tenant-Key': tenantKey.trim(),
147
+ },
148
+ });
149
+ const data = await this.parseJsonOrText(response);
150
+ if (!response.ok) {
151
+ throw new Error(`GET /tenant-dbs -> ${response.status} ${this.stringifyErrorDetails(data)}`);
152
+ }
153
+ return data;
154
+ }
155
+ async parseJsonOrText(response) {
156
+ const rawText = await response.text();
157
+ if (!rawText)
158
+ return null;
159
+ try {
160
+ return JSON.parse(rawText);
161
+ }
162
+ catch {
163
+ return rawText;
164
+ }
165
+ }
166
+ stringifyErrorDetails(data) {
167
+ if (typeof data === 'string')
168
+ return data;
169
+ try {
170
+ return JSON.stringify(data);
171
+ }
172
+ catch {
173
+ return 'Unknown error';
174
+ }
175
+ }
176
+ async getFileContentFromCouchDb(couchDbName, filePath) {
177
+ try {
178
+ const dbName = couchDbName;
179
+ const docId = filePath?.trim();
180
+ if (!docId) {
181
+ console.error('Missing file path');
182
+ return null;
183
+ }
184
+ const response = await fetch(this.getDocumentUrl(dbName, docId), {
185
+ method: 'GET',
186
+ headers: await this.getReadHeaders(),
187
+ });
188
+ const doc = await this.parseJsonOrText(response);
189
+ if (!response.ok) {
190
+ console.error(`Failed to fetch file "${docId}" from "${dbName}": ${response.status}`, doc);
191
+ return null;
192
+ }
193
+ if (!doc?.data) {
194
+ console.error(`Document "${docId}" does not contain file data`);
195
+ return null;
196
+ }
197
+ // do not decode images as utf8 text
198
+ if (this.isImageFile(doc.name || doc.path || docId, doc.contentType)) {
199
+ return {
200
+ type: 'base64file',
201
+ mimeType: doc.contentType || this.getImageMimeType(docId),
202
+ base64: doc.data,
203
+ };
204
+ }
205
+ const decodedContent = this.fromBase64(doc.data);
206
+ if (this.isJsonFile(doc.name || doc.path || docId, doc.contentType)) {
207
+ try {
208
+ return JSON.parse(decodedContent);
209
+ }
210
+ catch (jsonError) {
211
+ console.error(`Failed to parse JSON for file "${docId}"`, jsonError);
212
+ return decodedContent;
213
+ }
214
+ }
215
+ return decodedContent;
216
+ }
217
+ catch (error) {
218
+ console.error(`Unexpected error while fetching file "${filePath}" from "${couchDbName}"`, error);
219
+ return null;
220
+ }
221
+ }
222
+ isImageFile(fileNameOrPath, contentType) {
223
+ const lower = (fileNameOrPath || '').toLowerCase();
224
+ return (lower.endsWith('.png') ||
225
+ lower.endsWith('.jpg') ||
226
+ lower.endsWith('.jpeg') ||
227
+ lower.endsWith('.ico') ||
228
+ lower.endsWith('.svg') ||
229
+ (contentType || '').startsWith('image/'));
230
+ }
231
+ getImageMimeType(fileNameOrPath) {
232
+ const lower = (fileNameOrPath || '').toLowerCase();
233
+ if (lower.endsWith('.png'))
234
+ return 'image/png';
235
+ if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
236
+ return 'image/jpeg';
237
+ if (lower.endsWith('.ico'))
238
+ return 'image/x-icon';
239
+ if (lower.endsWith('.svg'))
240
+ return 'image/svg+xml';
241
+ return 'image/png';
242
+ }
243
+ fromBase64(base64) {
244
+ try {
245
+ return decodeURIComponent(escape(atob(base64)));
246
+ }
247
+ catch {
248
+ return atob(base64);
249
+ }
250
+ }
251
+ isJsonFile(fileNameOrPath, contentType) {
252
+ const lower = (fileNameOrPath || '').toLowerCase();
253
+ return lower.endsWith('.json') || contentType === 'application/json';
254
+ }
255
+ getDocumentUrl(dbName, docId) {
256
+ return `${this.getDbUrl(dbName)}/${encodeURIComponent(docId)}`;
257
+ }
258
+ getDbUrl(dbName) {
259
+ return `${this.couchDbBaseUrl}/${dbName}`;
260
+ }
261
+ async getReadHeaders() {
262
+ return {
263
+ Accept: 'application/json',
264
+ ...(await this.buildTenantHeaders()),
265
+ };
266
+ }
267
+ async buildTenantHeaders() {
268
+ const tenantKey = await this.utilityService.getStorage('tenantKey');
269
+ const tenantName = await this.utilityService.getStorage('tenantName');
270
+ if (tenantKey) {
271
+ if (typeof tenantKey !== 'string' || !tenantKey.trim()) {
272
+ throw new Error('Missing tenantKey');
273
+ }
274
+ return {
275
+ 'X-Tenant-Key': tenantKey.trim(),
276
+ };
277
+ }
278
+ else {
279
+ if (typeof tenantName !== 'string' || !tenantName.trim()) {
280
+ throw new Error('Missing tenantName');
281
+ }
282
+ return {
283
+ 'X-Tenant': tenantName.trim(),
284
+ };
285
+ }
286
+ }
287
+ async getImageSrcFromCouchDb(couchDbName, filePath) {
288
+ const dbName = couchDbName;
289
+ const docId = filePath?.trim();
290
+ if (!docId) {
291
+ throw new Error('Missing file path');
292
+ }
293
+ const response = await fetch(this.getDocumentUrl(dbName, docId), {
294
+ method: 'GET',
295
+ headers: await this.getReadHeaders(),
296
+ });
297
+ const doc = await this.parseJsonOrText(response);
298
+ if (!response.ok) {
299
+ throw new Error(`Failed to fetch image "${docId}" from "${dbName}": ${response.status} ${this.stringifyErrorDetails(doc)}`);
300
+ }
301
+ if (!doc?.data) {
302
+ throw new Error(`Document "${docId}" does not contain image data`);
303
+ }
304
+ const mimeType = doc.contentType || 'image/png';
305
+ return `data:${mimeType};base64,${doc.data}`;
306
+ }
307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, deps: [{ token: UtilityService }], target: i0.ɵɵFactoryTarget.Injectable });
308
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, providedIn: 'root' });
309
+ }
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, decorators: [{
311
+ type: Injectable,
312
+ args: [{
313
+ providedIn: 'root',
314
+ }]
315
+ }], ctorParameters: () => [{ type: UtilityService }] });
316
+
132
317
  class RequestService {
133
318
  http;
134
319
  pageSize = 0;
@@ -253,15 +438,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
253
438
  }]
254
439
  }], ctorParameters: () => [{ type: i1$1.HttpClient }] });
255
440
 
256
- // import { Couchdb } from './couchdb';
257
441
  class UtilityService {
258
442
  platform;
443
+ couchdbService;
259
444
  requestService;
260
445
  stripe = null;
261
- constructor(platform,
262
- // private couchdbService: Couchdb,
263
- requestService) {
446
+ constructor(platform, couchdbService, requestService) {
264
447
  this.platform = platform;
448
+ this.couchdbService = couchdbService;
265
449
  this.requestService = requestService;
266
450
  }
267
451
  getScope(scope) {
@@ -430,7 +614,7 @@ class UtilityService {
430
614
  tableitemInfo.data = records.map((record) => ({
431
615
  ...record,
432
616
  ...(record.hasOwnProperty('imageUrl') && record.imageUrl
433
- ? { imageUrl: `${projectSeleted}/pages/images/` + record.imageUrl.split('/').pop() }
617
+ ? { imageUrl: `${projectSeleted}/Media/` + record.imageUrl.split('/').pop() }
434
618
  : {})
435
619
  }));
436
620
  return tableitemInfo;
@@ -554,17 +738,14 @@ class UtilityService {
554
738
  }
555
739
  const transformed = await Promise.all(data.map(async (record) => {
556
740
  let imageUrl = record.imageUrl;
557
- const imagePath = `pages/images/` +
741
+ const imagePath = `Media/` +
558
742
  record?.imageUrl?.split('/').pop();
559
743
  if (tenantName &&
560
744
  record?.imageUrl &&
561
745
  options.setImageUrl) {
562
746
  try {
563
747
  imageUrl = "";
564
- // imageUrl = await this.couchdbService.getFileContentFromCouchDb(
565
- // `${tenantName}_${options.projectSelected}`,
566
- // imagePath
567
- // );
748
+ imageUrl = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${options.projectSelected}`, imagePath);
568
749
  }
569
750
  catch (err) {
570
751
  console.warn(`Failed to fetch image from CouchDB for ${imagePath}`, err);
@@ -582,17 +763,14 @@ class UtilityService {
582
763
  async setTableDataImages(records, tenantName, projectSelected) {
583
764
  const transformed = await Promise.all(records.map(async (record) => {
584
765
  let imageUrl = record.imageUrl;
585
- const imagePath = record?.imagePath ? record?.imagePath : `pages/images/` +
766
+ const imagePath = record?.imagePath ? record?.imagePath : `Media/` +
586
767
  record?.imageUrl?.split('/').pop();
587
768
  if (tenantName &&
588
769
  record?.imageUrl &&
589
770
  record.hasOwnProperty('imageUrl')) {
590
771
  try {
591
772
  imageUrl = "";
592
- // imageUrl = await this.couchdbService.getFileContentFromCouchDb(
593
- // `${tenantName}_${projectSelected}`,
594
- // imagePath
595
- // );
773
+ imageUrl = await this.couchdbService.getFileContentFromCouchDb(`${tenantName}_${projectSelected}`, imagePath);
596
774
  }
597
775
  catch (err) {
598
776
  console.warn(`Failed to fetch image from CouchDB for ${imagePath}`, err);
@@ -767,7 +945,7 @@ class UtilityService {
767
945
  const offM = pad(Math.abs(offset) % 60);
768
946
  return `${year}-${month}-${day}T${hrs}:${mins}:00${sign}${offH}:${offM}`;
769
947
  }
770
- 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 });
948
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, deps: [{ token: i1.Platform }, { token: Couchdb }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Injectable });
771
949
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, providedIn: 'root' });
772
950
  }
773
951
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: UtilityService, decorators: [{
@@ -775,7 +953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
775
953
  args: [{
776
954
  providedIn: 'root'
777
955
  }]
778
- }], ctorParameters: () => [{ type: i1.Platform }, { type: RequestService }] });
956
+ }], ctorParameters: () => [{ type: i1.Platform }, { type: Couchdb }, { type: RequestService }] });
779
957
 
780
958
  class CardComponent {
781
959
  utilityService;
@@ -797,7 +975,7 @@ class CardComponent {
797
975
  imageDetails = new EventEmitter();
798
976
  onPageSizeChange = new EventEmitter();
799
977
  onPageChange = new EventEmitter();
800
- cardPerRow = "col-12 md:col-6 lg:col-";
978
+ cardPerRow = "md:col-6 lg:col-";
801
979
  isLoading = false;
802
980
  layoutSchemaCopy = {};
803
981
  headerSchemaCopy = {};
@@ -817,7 +995,7 @@ class CardComponent {
817
995
  this.cardPerRow = "col-";
818
996
  }
819
997
  else {
820
- this.cardPerRow = "col-12 md:col-6 lg:col-";
998
+ this.cardPerRow = "md:col-6 lg:col-";
821
999
  }
822
1000
  }
823
1001
  ngOnChanges(changes) {
@@ -1169,7 +1347,7 @@ class CardComponent {
1169
1347
  return propertyScope;
1170
1348
  }
1171
1349
  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 });
1172
- 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:
1350
+ 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:
1173
1351
  // StringComponent,
1174
1352
  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" }] });
1175
1353
  }
@@ -1186,7 +1364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1186
1364
  // StringComponent,
1187
1365
  PaginationComponent,
1188
1366
  String$1
1189
- ], 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>" }]
1367
+ ], 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>" }]
1190
1368
  }], 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: [{
1191
1369
  type: Input
1192
1370
  }], currentPage: [{
@@ -2365,193 +2543,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
2365
2543
  args: [{ selector: 'vl-time', standalone: true, template: "<p>time works!</p>\r\n" }]
2366
2544
  }] });
2367
2545
 
2368
- class Couchdb {
2369
- utilityService;
2370
- couchDbBaseUrl = 'https://couchdb.yomotech.de';
2371
- constructor(utilityService) {
2372
- this.utilityService = utilityService;
2373
- }
2374
- async getTenantDatabases(tenantKey) {
2375
- if (!tenantKey || !tenantKey.trim()) {
2376
- throw new Error('Missing tenantKey');
2377
- }
2378
- const response = await fetch(`https://couchdb.yomotech.de/tenant-dbs`, {
2379
- method: 'GET',
2380
- headers: {
2381
- Accept: 'application/json',
2382
- 'X-Tenant-Key': tenantKey.trim(),
2383
- },
2384
- });
2385
- const data = await this.parseJsonOrText(response);
2386
- if (!response.ok) {
2387
- throw new Error(`GET /tenant-dbs -> ${response.status} ${this.stringifyErrorDetails(data)}`);
2388
- }
2389
- return data;
2390
- }
2391
- async parseJsonOrText(response) {
2392
- const rawText = await response.text();
2393
- if (!rawText)
2394
- return null;
2395
- try {
2396
- return JSON.parse(rawText);
2397
- }
2398
- catch {
2399
- return rawText;
2400
- }
2401
- }
2402
- stringifyErrorDetails(data) {
2403
- if (typeof data === 'string')
2404
- return data;
2405
- try {
2406
- return JSON.stringify(data);
2407
- }
2408
- catch {
2409
- return 'Unknown error';
2410
- }
2411
- }
2412
- async getFileContentFromCouchDb(couchDbName, filePath) {
2413
- try {
2414
- const dbName = couchDbName;
2415
- const docId = filePath?.trim();
2416
- if (!docId) {
2417
- console.error('Missing file path');
2418
- return null;
2419
- }
2420
- const response = await fetch(this.getDocumentUrl(dbName, docId), {
2421
- method: 'GET',
2422
- headers: await this.getReadHeaders(),
2423
- });
2424
- const doc = await this.parseJsonOrText(response);
2425
- if (!response.ok) {
2426
- console.error(`Failed to fetch file "${docId}" from "${dbName}": ${response.status}`, doc);
2427
- return null;
2428
- }
2429
- if (!doc?.data) {
2430
- console.error(`Document "${docId}" does not contain file data`);
2431
- return null;
2432
- }
2433
- // do not decode images as utf8 text
2434
- if (this.isImageFile(doc.name || doc.path || docId, doc.contentType)) {
2435
- return {
2436
- type: 'base64file',
2437
- mimeType: doc.contentType || this.getImageMimeType(docId),
2438
- base64: doc.data,
2439
- };
2440
- }
2441
- const decodedContent = this.fromBase64(doc.data);
2442
- if (this.isJsonFile(doc.name || doc.path || docId, doc.contentType)) {
2443
- try {
2444
- return JSON.parse(decodedContent);
2445
- }
2446
- catch (jsonError) {
2447
- console.error(`Failed to parse JSON for file "${docId}"`, jsonError);
2448
- return decodedContent;
2449
- }
2450
- }
2451
- return decodedContent;
2452
- }
2453
- catch (error) {
2454
- console.error(`Unexpected error while fetching file "${filePath}" from "${couchDbName}"`, error);
2455
- return null;
2456
- }
2457
- }
2458
- isImageFile(fileNameOrPath, contentType) {
2459
- const lower = (fileNameOrPath || '').toLowerCase();
2460
- return (lower.endsWith('.png') ||
2461
- lower.endsWith('.jpg') ||
2462
- lower.endsWith('.jpeg') ||
2463
- lower.endsWith('.ico') ||
2464
- lower.endsWith('.svg') ||
2465
- (contentType || '').startsWith('image/'));
2466
- }
2467
- getImageMimeType(fileNameOrPath) {
2468
- const lower = (fileNameOrPath || '').toLowerCase();
2469
- if (lower.endsWith('.png'))
2470
- return 'image/png';
2471
- if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
2472
- return 'image/jpeg';
2473
- if (lower.endsWith('.ico'))
2474
- return 'image/x-icon';
2475
- if (lower.endsWith('.svg'))
2476
- return 'image/svg+xml';
2477
- return 'image/png';
2478
- }
2479
- fromBase64(base64) {
2480
- try {
2481
- return decodeURIComponent(escape(atob(base64)));
2482
- }
2483
- catch {
2484
- return atob(base64);
2485
- }
2486
- }
2487
- isJsonFile(fileNameOrPath, contentType) {
2488
- const lower = (fileNameOrPath || '').toLowerCase();
2489
- return lower.endsWith('.json') || contentType === 'application/json';
2490
- }
2491
- getDocumentUrl(dbName, docId) {
2492
- return `${this.getDbUrl(dbName)}/${encodeURIComponent(docId)}`;
2493
- }
2494
- getDbUrl(dbName) {
2495
- return `${this.couchDbBaseUrl}/${dbName}`;
2496
- }
2497
- async getReadHeaders() {
2498
- return {
2499
- Accept: 'application/json',
2500
- ...(await this.buildTenantHeaders()),
2501
- };
2502
- }
2503
- async buildTenantHeaders() {
2504
- const tenantKey = await this.utilityService.getStorage('tenantKey');
2505
- const tenantName = await this.utilityService.getStorage('tenantName');
2506
- if (tenantKey) {
2507
- console.log('tenantKey: ', tenantKey);
2508
- if (typeof tenantKey !== 'string' || !tenantKey.trim()) {
2509
- throw new Error('Missing tenantKey');
2510
- }
2511
- return {
2512
- 'X-Tenant-Key': tenantKey.trim(),
2513
- };
2514
- }
2515
- else {
2516
- console.log('tenantName: ', tenantName);
2517
- if (typeof tenantName !== 'string' || !tenantName.trim()) {
2518
- throw new Error('Missing tenantName');
2519
- }
2520
- return {
2521
- 'X-Tenant': tenantName.trim(),
2522
- };
2523
- }
2524
- }
2525
- async getImageSrcFromCouchDb(couchDbName, filePath) {
2526
- const dbName = couchDbName;
2527
- const docId = filePath?.trim();
2528
- if (!docId) {
2529
- throw new Error('Missing file path');
2530
- }
2531
- const response = await fetch(this.getDocumentUrl(dbName, docId), {
2532
- method: 'GET',
2533
- headers: await this.getReadHeaders(),
2534
- });
2535
- const doc = await this.parseJsonOrText(response);
2536
- if (!response.ok) {
2537
- throw new Error(`Failed to fetch image "${docId}" from "${dbName}": ${response.status} ${this.stringifyErrorDetails(doc)}`);
2538
- }
2539
- if (!doc?.data) {
2540
- throw new Error(`Document "${docId}" does not contain image data`);
2541
- }
2542
- const mimeType = doc.contentType || 'image/png';
2543
- return `data:${mimeType};base64,${doc.data}`;
2544
- }
2545
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, deps: [{ token: UtilityService }], target: i0.ɵɵFactoryTarget.Injectable });
2546
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, providedIn: 'root' });
2547
- }
2548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: Couchdb, decorators: [{
2549
- type: Injectable,
2550
- args: [{
2551
- providedIn: 'root',
2552
- }]
2553
- }], ctorParameters: () => [{ type: UtilityService }] });
2554
-
2555
2546
  class ConfigService {
2556
2547
  couchdbService;
2557
2548
  utilityService;
@@ -3022,24 +3013,27 @@ class SideMenuComponent {
3022
3013
  }
3023
3014
  }
3024
3015
  async setSettingImages() {
3025
- const tasks = [];
3026
- for (const menu of this.settings?.submenu) {
3027
- if (menu?.submenu?.length) {
3028
- for (const childMenu of menu.submenu) {
3029
- if (childMenu.options && childMenu.options.setImageUrl) {
3030
- tasks.push((async () => {
3031
- try {
3032
- childMenu.icon = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `${childMenu.icon}`);
3033
- }
3034
- catch (err) {
3035
- console.error("Failed to fetch icon:", err);
3036
- }
3037
- })());
3016
+ if (this.settings && this.settings.length > 0) {
3017
+ const tasks = [];
3018
+ console.log('this.settings: ', this.settings);
3019
+ for (const menu of this.settings?.submenu) {
3020
+ if (menu?.submenu?.length) {
3021
+ for (const childMenu of menu.submenu) {
3022
+ if (childMenu.options && childMenu.options.setImageUrl) {
3023
+ tasks.push((async () => {
3024
+ try {
3025
+ childMenu.icon = await this.couchdbService.getFileContentFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, `${childMenu.icon}`);
3026
+ }
3027
+ catch (err) {
3028
+ console.error("Failed to fetch icon:", err);
3029
+ }
3030
+ })());
3031
+ }
3038
3032
  }
3039
3033
  }
3040
3034
  }
3035
+ await Promise.all(tasks);
3041
3036
  }
3042
- await Promise.all(tasks);
3043
3037
  this.settingMenu = JSON.parse(JSON.stringify(this.settings));
3044
3038
  }
3045
3039
  isUrl(value) {