@yomotech/view-toolkit 1.0.40 → 1.0.42

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.
@@ -21,7 +21,7 @@ import { throwError, lastValueFrom, BehaviorSubject } from 'rxjs';
21
21
  import * as i1$2 from '@angular/cdk/platform';
22
22
  import { PlatformModule } from '@angular/cdk/platform';
23
23
  import * as i1$1 from '@angular/common/http';
24
- import { HttpHeaders, HttpParams } from '@angular/common/http';
24
+ import { HttpHeaders } from '@angular/common/http';
25
25
  import * as i2$2 from 'primeng/select';
26
26
  import { SelectModule } from 'primeng/select';
27
27
  import { DomSanitizer } from '@angular/platform-browser';
@@ -43,6 +43,7 @@ import { NzModalModule } from 'ng-zorro-antd/modal';
43
43
  import * as i16 from '@angular/material/tooltip';
44
44
  import { MatTooltipModule } from '@angular/material/tooltip';
45
45
  import * as i7 from 'angular-oauth2-oidc';
46
+ import { OAuthService } from 'angular-oauth2-oidc';
46
47
  import * as i13 from 'ng-zorro-antd/core/transition-patch';
47
48
  import * as i14 from 'ng-zorro-antd/core/wave';
48
49
  import * as i7$1 from 'ng-zorro-antd/table';
@@ -2293,49 +2294,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
2293
2294
  args: ['box']
2294
2295
  }] } });
2295
2296
 
2296
- // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11
2297
- // - new: isNativeMobile(), the one answer to "is this the app on iOS or Android". The runtime asked
2298
- // Angular CDK's Platform (platform.IOS / platform.ANDROID), which reads the browser's user agent;
2299
- // an iPad has reported itself as a Mac there since iPadOS 13, so on the iPad the app behaved like
2300
- // the web version - it signed in through the web flow (Keycloak: "Invalid parameter:
2301
- // redirect_uri"). Capacitor knows the platform the app runs on.
2302
- /** True in the native app on iOS (iPhone and iPad) and Android; false in a browser. */
2303
- function isNativeMobile() {
2304
- const platform = Capacitor.getPlatform();
2305
- return Capacitor.isNativePlatform() && (platform === 'ios' || platform === 'android');
2297
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
2298
+ // - new: formatDate - how a date is written for a backend, by a pattern the page sets (option.dateFormat).
2299
+ // Without a pattern ISO 8601 with the time zone, no milliseconds: 2026-10-20T00:00:00+02:00.
2300
+ // yyyy MM dd HH mm ss, SSS / SSSS milliseconds (3 or 4 digits), xxx time zone (+02:00), xx (+0200),
2301
+ // 'text' as it is; storageValue / fromStorageValue / parseStorageDate - the one place where a date
2302
+ // becomes text for browser storage and back (dates in lists - a period - too). P5 writes "yyyy-MM-dd'T'HH:mm:ss:SSSSxxx" (before fixed in the card, A4)
2303
+ const DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssxxx";
2304
+ const TOKENS = /'([^']*)'|yyyy|SSSS|SSS|MM|dd|HH|mm|ss|xxx|xx/g;
2305
+ /** The date written by the pattern, in the device's local time. */
2306
+ function formatDate(date, pattern = DEFAULT_DATE_FORMAT) {
2307
+ const pad = (n, len = 2) => String(Math.abs(n)).padStart(len, '0');
2308
+ const offset = -date.getTimezoneOffset();
2309
+ const sign = offset >= 0 ? '+' : '-';
2310
+ const zoneH = pad(Math.floor(Math.abs(offset) / 60));
2311
+ const zoneM = pad(Math.abs(offset) % 60);
2312
+ return (pattern || DEFAULT_DATE_FORMAT).replace(TOKENS, (token, text) => {
2313
+ if (text !== undefined)
2314
+ return text;
2315
+ switch (token) {
2316
+ case 'yyyy': return String(date.getFullYear());
2317
+ case 'MM': return pad(date.getMonth() + 1);
2318
+ case 'dd': return pad(date.getDate());
2319
+ case 'HH': return pad(date.getHours());
2320
+ case 'mm': return pad(date.getMinutes());
2321
+ case 'ss': return pad(date.getSeconds());
2322
+ case 'SSS': return pad(date.getMilliseconds(), 3);
2323
+ case 'SSSS': return pad(date.getMilliseconds(), 4);
2324
+ case 'xxx': return `${sign}${zoneH}:${zoneM}`;
2325
+ case 'xx': return `${sign}${zoneH}${zoneM}`;
2326
+ default: return token;
2327
+ }
2328
+ });
2306
2329
  }
2330
+ /** How the app keeps a date in browser storage: local time without time zone. */
2331
+ const STORAGE_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
2307
2332
  /**
2308
- * True in the native app on a phone - upright and in landscape alike (its shorter screen side is
2309
- * below 600pt). Tablets get the tablet and desktop styles by width.
2333
+ * A field's value as it goes into browser storage: a Date as local time without zone, a list (a
2334
+ * period) element by element - JSON wrote the dates of a list as UTC ("…T22:00:00.000Z", a day early).
2310
2335
  */
2311
- function isNativePhone() {
2312
- return isNativeMobile() && Math.min(window.screen.width, window.screen.height) < 600;
2336
+ function storageValue(value) {
2337
+ if (value instanceof Date)
2338
+ return isNaN(value.getTime()) ? null : formatDate(value, STORAGE_DATE_FORMAT);
2339
+ if (Array.isArray(value))
2340
+ return value.map(item => (item instanceof Date ? storageValue(item) : item));
2341
+ return value;
2313
2342
  }
2314
-
2315
- // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
2316
- // - new: backendUrl - the one place that decides how a backend is reached. On the devices the
2317
- // backend is called directly (native HTTP, no CORS). In the web a backend without CORS headers
2318
- // (P5 / WildFly) cannot be called from the page, so the call goes to the page's own origin as
2319
- // /api/proxy/<host>/<path> and the server that serves the app forwards it - only to declared
2320
- // hosts (locally ng serve's proxy.conf.json, in operation nginx with an allow-list). Replaces the
2321
- // hard-coded /p5ws path of the web and the direct calls that failed with CORS
2322
- /** Prefix of the forwarding path on the app's own origin. */
2323
- const BACKEND_PROXY_PREFIX = '/api/proxy';
2343
+ /** The field types whose value is a date (date, time, date and time) or a list of dates (period). */
2344
+ const DATE_TYPES = new Set(['date', 'time', 'datetime', 'date-time', 'date&time']);
2345
+ const RANGE_TYPES = new Set(['daterange']);
2324
2346
  /**
2325
- * The address to call for a backend URL: unchanged on the devices and for relative URLs; in the web
2326
- * https://p5w1.wilken.de/p5ws/x?y=1 becomes <origin>/api/proxy/p5w1.wilken.de/p5ws/x?y=1.
2347
+ * A stored date text as the wall time it names: Z or an offset (+02:00, what the app itself sends) is
2348
+ * dropped, so 2026-10-18T08:00:00+02:00 reads 08:00 like 2026-10-18T08:00:00 from P5W1.
2327
2349
  */
2328
- function backendUrl(url) {
2329
- if (isNativeMobile() || typeof window === 'undefined' || !/^https?:\/\//i.test(url || '')) {
2330
- return url;
2331
- }
2332
- const target = new URL(url);
2333
- if (target.origin === window.location.origin) {
2334
- return url;
2335
- }
2336
- return `${window.location.origin}${BACKEND_PROXY_PREFIX}/${target.host}${target.pathname}${target.search}`;
2350
+ function parseStorageDate(value) {
2351
+ const clean = value.trim().replace(/(Z|[+-]\d{2}:?\d{2})$/i, '');
2352
+ const [datePart, timePart = '00:00:00.000'] = clean.split('T');
2353
+ const [y, m, d] = datePart.split('-').map(Number);
2354
+ const [hh = 0, mm = 0, ss = 0, ms = 0] = timePart.split(/[:.]/).map(Number);
2355
+ return new Date(y, m - 1, d, hh, mm, ss, ms);
2356
+ }
2357
+ /**
2358
+ * A stored value back as the field's control expects it, by the field's type: date, time and date and
2359
+ * time as a Date, a period as a list of Dates; anything else unchanged.
2360
+ */
2361
+ function fromStorageValue(value, type) {
2362
+ const kind = String(type ?? '').toLowerCase();
2363
+ const asDate = (item) => (typeof item === 'string' && /^\d{4}-\d{2}-\d{2}/.test(item) ? parseStorageDate(item) : item);
2364
+ if (DATE_TYPES.has(kind))
2365
+ return asDate(value);
2366
+ if (RANGE_TYPES.has(kind) && Array.isArray(value))
2367
+ return value.map(asDate);
2368
+ return value;
2369
+ }
2370
+ /** Every Date inside a value (object, list) written by the pattern; everything else stays. */
2371
+ function formatDates(value, pattern) {
2372
+ if (value instanceof Date)
2373
+ return isNaN(value.getTime()) ? value : formatDate(value, pattern);
2374
+ if (Array.isArray(value))
2375
+ return value.map(item => formatDates(item, pattern));
2376
+ if (value && typeof value === 'object') {
2377
+ const out = {};
2378
+ for (const [key, item] of Object.entries(value))
2379
+ out[key] = formatDates(item, pattern);
2380
+ return out;
2381
+ }
2382
+ return value;
2337
2383
  }
2338
2384
 
2385
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
2386
+ // - change: saveDb and getSaveOrder removed - fixed P5 time-recording calls; saving and loading with a
2387
+ // filter go through BackendCallService with what the page describes (A2)
2339
2388
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
2340
2389
  // - change: saveDb and getSaveOrder (web) go through backendUrl (/api/proxy/<host>/...) instead of
2341
2390
  // a direct call (CORS) or the /p5ws path only ng serve knew
@@ -2443,50 +2492,6 @@ class RequestService {
2443
2492
  headers: this.createAuthorizationHeader(token, true),
2444
2493
  });
2445
2494
  }
2446
- saveDb(token, userInfo, order = {}) {
2447
- if (token) {
2448
- const headers = new HttpHeaders({
2449
- 'Authorization': `Bearer ${token}`,
2450
- 'Accept': 'application/json'
2451
- });
2452
- let url2 = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : " "}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`;
2453
- this.http.post(backendUrl(url2), order, { headers }).subscribe({
2454
- next: res => {
2455
- console.log('Save-res: ', res);
2456
- }
2457
- });
2458
- }
2459
- }
2460
- getSaveOrder(token, userInfo, fromDate, toDate) {
2461
- if (!token) {
2462
- throw new Error('Missing authentication token');
2463
- }
2464
- if (!userInfo?.p5_backend_url) {
2465
- throw new Error('Missing p5_backend_url');
2466
- }
2467
- const headers = new HttpHeaders({
2468
- Authorization: `Bearer ${token}`,
2469
- Accept: 'application/json',
2470
- 'Content-Type': 'application/json'
2471
- });
2472
- const company = userInfo.p5_plant
2473
- ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`
2474
- : `${userInfo.p5_group}/${userInfo.p5_client}/`;
2475
- const url = backendUrl(`${String(userInfo.p5_backend_url).replace(/\/+$/, '')}` +
2476
- '/assetsmobileservice/Zeiterfassung/requestBookedTimeRecording');
2477
- const params = new HttpParams()
2478
- .set('resourceNo', userInfo.p5_resource_no || '')
2479
- .set('workDayFrom', fromDate)
2480
- .set('workDayTo', toDate)
2481
- .set('company', company)
2482
- .set('appVersion', '1');
2483
- console.log('[Saved orders][Web] URL:', url);
2484
- console.log('[Saved orders][Web] Params:', params.toString());
2485
- return this.http.post(url, {}, {
2486
- headers,
2487
- params
2488
- });
2489
- }
2490
2495
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: RequestService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2491
2496
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: RequestService, providedIn: 'root' });
2492
2497
  }
@@ -2875,14 +2880,9 @@ class UtilityService {
2875
2880
  // set date in localstorage
2876
2881
  normalizeDatesForStorage(obj) {
2877
2882
  const normalized = {};
2883
+ // a date as local time, a period (a list of dates) element by element - it went in as UTC
2878
2884
  Object.entries(obj).forEach(([key, value]) => {
2879
- if (this.isDateLike(value)) {
2880
- const date = value instanceof Date ? value : new Date(value);
2881
- normalized[key] = this.toLocalISOString(date);
2882
- }
2883
- else {
2884
- normalized[key] = value;
2885
- }
2885
+ normalized[key] = storageValue(value);
2886
2886
  });
2887
2887
  return normalized;
2888
2888
  }
@@ -2906,40 +2906,24 @@ class UtilityService {
2906
2906
  .slice(0, 19);
2907
2907
  }
2908
2908
  // restore date Field from localstorage
2909
+ /** Dates of stored records back to Date objects - date, time, date and time, period (date-format.ts). */
2909
2910
  restoreDatesFromStorage(records, propertySchema) {
2910
- if (!Array.isArray(records))
2911
- return records;
2912
- if (!propertySchema)
2911
+ if (!Array.isArray(records) || !propertySchema)
2913
2912
  return records;
2914
2913
  return records.map(record => {
2915
2914
  const restored = { ...record };
2916
- Object.keys(propertySchema).forEach(scopeKey => {
2917
- const schemaGroup = propertySchema[scopeKey];
2918
- if (!schemaGroup)
2919
- return;
2920
- Object.keys(schemaGroup).forEach(fieldKey => {
2921
- const fieldSchema = schemaGroup[fieldKey];
2922
- const value = restored[fieldKey];
2923
- if (!value || typeof value !== 'string')
2924
- return;
2925
- // ✅ DATE or TIME fields only
2926
- if (fieldSchema.type === 'date' || fieldSchema.type === 'time') {
2927
- restored[fieldKey] = this.parseLocalISODate(value);
2928
- }
2929
- });
2930
- });
2915
+ for (const schemaGroup of Object.values(propertySchema)) {
2916
+ for (const [fieldKey, fieldSchema] of Object.entries(schemaGroup || {})) {
2917
+ if (restored[fieldKey] != null)
2918
+ restored[fieldKey] = fromStorageValue(restored[fieldKey], fieldSchema?.type);
2919
+ }
2920
+ }
2931
2921
  return restored;
2932
2922
  });
2933
2923
  }
2924
+ /** A stored date text as the wall time it names (date-format.ts). */
2934
2925
  parseLocalISODate(value) {
2935
- // The wall time as written: Z or an offset (+02:00, what the app itself sends) is dropped, so
2936
- // 2026-10-18T08:00:00+02:00 reads 08:00 like 2026-10-18T08:00:00 from P5W1 - before, the offset
2937
- // ended up in the seconds ("00+02") and gave an invalid date
2938
- const clean = value.trim().replace(/(Z|[+-]\d{2}:?\d{2})$/i, '');
2939
- const [datePart, timePart = '00:00:00.000'] = clean.split('T');
2940
- const [y, m, d] = datePart.split('-').map(Number);
2941
- const [hh = 0, mm = 0, ss = 0, ms = 0] = timePart.split(/[:.]/).map(Number);
2942
- return new Date(y, m - 1, d, hh, mm, ss, ms);
2926
+ return parseStorageDate(value);
2943
2927
  }
2944
2928
  // savecard conversion
2945
2929
  convertToDailyLogs(cardOrCards) {
@@ -3911,6 +3895,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
3911
3895
  type: Output
3912
3896
  }] } });
3913
3897
 
3898
+ // Shuaib 2026-10-21
3899
+ // - new: what a list (card, grid) shows for a field, the one rule for <vl-control mode="display">:
3900
+ // the value the record stores - never the property's default, which belongs only to a new record
3901
+ // in the dialog (an empty status showed "beantragt") -, "--" for an empty value, a date or time as
3902
+ // text, a selection as the caption of the chosen entry (also used by vl-dropdown). No Angular, so
3903
+ // it can be tested with node --test (#166)
3904
+ /** What a list shows for an empty value. */
3905
+ const EMPTY_TEXT = '--';
3906
+ function isEmptyValue(value) {
3907
+ return value === null || value === undefined || value === '';
3908
+ }
3909
+ /** The value of a field in a record ("#/workOrder/properties/status" -> record.status), as stored. */
3910
+ function displayValue(field, record) {
3911
+ const { name } = splitReference(field?.scope?.reference);
3912
+ return name ? record?.[name] : undefined;
3913
+ }
3914
+ /** A plain value as text: "--" when empty. */
3915
+ function displayText(value) {
3916
+ return isEmptyValue(value) ? EMPTY_TEXT : String(value);
3917
+ }
3918
+ /** A date, time or date and time as text in the app language (services/date-display.ts); "--" when empty. */
3919
+ function displayDateText(value, kind, option) {
3920
+ if (isEmptyValue(value)) {
3921
+ return EMPTY_TEXT;
3922
+ }
3923
+ const text = displayDateValue(value, kind, option);
3924
+ return isEmptyValue(text) ? EMPTY_TEXT : String(text);
3925
+ }
3926
+ /**
3927
+ * The entries of a selection: the Designer's allowed values with their labels
3928
+ * (option.fieldData.validation.enum, option.labels), or the field's list (the property's data, from
3929
+ * option.autocomplete) read with optionLabel / optionValue (the Designer writes optionlabel /
3930
+ * optionvalue - both are read).
3931
+ */
3932
+ function selectionEntries(option, items, translations) {
3933
+ const o = option ?? {};
3934
+ const values = o.fieldData?.validation?.enum;
3935
+ const source = Array.isArray(values) && values.length ? values : items;
3936
+ const labelKey = o.optionLabel ?? o.optionlabel ?? 'label';
3937
+ const valueKey = o.optionValue ?? o.optionvalue ?? 'value';
3938
+ const caption = (key) => {
3939
+ const text = o.labels?.[String(key)];
3940
+ return typeof text === 'string' && text ? translations?.[text] || text : String(key);
3941
+ };
3942
+ return (source ?? []).map((item) => item !== null && typeof item === 'object'
3943
+ ? { label: String(item[labelKey] ?? item[valueKey] ?? ''), value: item[valueKey] ?? item }
3944
+ : { label: caption(item), value: item });
3945
+ }
3946
+ /** The caption of the chosen entry; the value itself when no entry has it; "--" when empty. */
3947
+ function selectionCaption(entries, value) {
3948
+ if (isEmptyValue(value)) {
3949
+ return EMPTY_TEXT;
3950
+ }
3951
+ return entries.find(e => e.value === value || String(e.value) === String(value))?.label ?? String(value);
3952
+ }
3953
+
3954
+ // Shuaib 2026-10-21
3955
+ // - change: entries and the shown caption come from controls/display-value.ts (selectionEntries,
3956
+ // selectionCaption), the rule the lists use too; unchanged behaviour (#166)
3914
3957
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
3915
3958
  // - new: vl-dropdown, the drop-down choice without typing - the same in form, dialog, card and grid
3916
3959
  // (before: a plain <select> and an nz-select side by side, each copied per container). Entries:
@@ -3936,28 +3979,18 @@ class DropdownControl {
3936
3979
  control;
3937
3980
  cache = { from: null, to: [] };
3938
3981
  get option() { return this.field?.option ?? {}; }
3939
- caption(key) {
3940
- const text = this.option.labels?.[String(key)];
3941
- return typeof text === 'string' && text ? this.translations?.[text] || text : String(key);
3942
- }
3943
3982
  /** { label, value } entries - the same array while the source does not change */
3944
3983
  entries() {
3945
3984
  const values = this.option.fieldData?.validation?.enum;
3946
3985
  const source = Array.isArray(values) && values.length ? values : this.items;
3947
3986
  if (this.cache.from === source)
3948
3987
  return this.cache.to;
3949
- const labelKey = this.option.optionLabel ?? this.option.optionlabel ?? 'label';
3950
- const valueKey = this.option.optionValue ?? this.option.optionvalue ?? 'value';
3951
- const to = (source ?? []).map((item) => item !== null && typeof item === 'object'
3952
- ? { label: String(item[labelKey] ?? item[valueKey] ?? ''), value: item[valueKey] ?? item }
3953
- : { label: this.caption(item), value: item });
3988
+ const to = selectionEntries(this.option, this.items, this.translations);
3954
3989
  this.cache = { from: source, to };
3955
3990
  return to;
3956
3991
  }
3957
3992
  shown(value) {
3958
- if (value === null || value === undefined || value === '')
3959
- return '--';
3960
- return this.entries().find(e => e.value === value || String(e.value) === String(value))?.label ?? String(value);
3993
+ return selectionCaption(this.entries(), value);
3961
3994
  }
3962
3995
  placeholder() {
3963
3996
  return layoutPlaceholder(this.field?.option, this.translations);
@@ -4022,6 +4055,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
4022
4055
  args: ['dd']
4023
4056
  }] } });
4024
4057
 
4058
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11
4059
+ // - new: isNativeMobile(), the one answer to "is this the app on iOS or Android". The runtime asked
4060
+ // Angular CDK's Platform (platform.IOS / platform.ANDROID), which reads the browser's user agent;
4061
+ // an iPad has reported itself as a Mac there since iPadOS 13, so on the iPad the app behaved like
4062
+ // the web version - it signed in through the web flow (Keycloak: "Invalid parameter:
4063
+ // redirect_uri"). Capacitor knows the platform the app runs on.
4064
+ /** True in the native app on iOS (iPhone and iPad) and Android; false in a browser. */
4065
+ function isNativeMobile() {
4066
+ const platform = Capacitor.getPlatform();
4067
+ return Capacitor.isNativePlatform() && (platform === 'ios' || platform === 'android');
4068
+ }
4069
+ /**
4070
+ * True in the native app on a phone - upright and in landscape alike (its shorter screen side is
4071
+ * below 600pt). Tablets get the tablet and desktop styles by width.
4072
+ */
4073
+ function isNativePhone() {
4074
+ return isNativeMobile() && Math.min(window.screen.width, window.screen.height) < 600;
4075
+ }
4076
+
4025
4077
  class NotificationService {
4026
4078
  toastr;
4027
4079
  constructor(toastr) {
@@ -5068,6 +5120,9 @@ function numberStep(field, shape, integer) {
5068
5120
  return integer ? 1 : 'any';
5069
5121
  }
5070
5122
 
5123
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
5124
+ // - fix: the spinner's field has a small padding and a centred number - in a table cell it was 35px
5125
+ // wide and its 2 x 12px padding hid the number
5071
5126
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
5072
5127
  // - new: vl-number, the number field - the same in form, dialog, card and grid: a number field with
5073
5128
  // the numeric keyboard; spinner adds - / + (step, default 1); slider moves between the rule's
@@ -5181,7 +5236,7 @@ class NumberControl {
5181
5236
  <p class="text-danger vl-number__error" *ngIf="showError()">{{ message() }}</p>
5182
5237
  </ng-container>
5183
5238
  <ng-template #shownText><span class="vl-number__text">{{ shown(value) }}</span></ng-template>
5184
- `, isInline: true, styles: [":host{display:block;min-width:0}.vl-number{display:flex;align-items:center;gap:6px;min-width:0}.vl-number__box{position:relative;flex:1;min-width:0;display:block}.vl-number__input{min-width:0;width:100%}.vl-number__input--sign{padding-right:2.5rem!important}.vl-number__sign{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);color:#64748b;pointer-events:none}.vl-number__step{width:2.5rem;height:2.5rem;flex:0 0 auto;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:1.1rem;cursor:pointer}.vl-number__range{flex:1;min-width:0}.vl-number__value{min-width:3ch;text-align:right}.vl-number__error{margin:4px 0 0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: RulesPipe, name: "vlRules" }], viewProviders: [{ provide: ControlContainer, useFactory: (form) => form, deps: [[new Optional(), new SkipSelf(), NgForm]] }] });
5239
+ `, isInline: true, styles: [":host{display:block;min-width:0}.vl-number{display:flex;align-items:center;gap:6px;min-width:0}.vl-number__box{position:relative;flex:1;min-width:0;display:block}.vl-number__input{min-width:0;width:100%}.vl-number--spinner .vl-number__input{padding-left:4px!important;padding-right:4px!important;text-align:center}.vl-number__input--sign{padding-right:2.5rem!important}.vl-number__sign{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);color:#64748b;pointer-events:none}.vl-number__step{width:2.5rem;height:2.5rem;flex:0 0 auto;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:1.1rem;cursor:pointer}.vl-number__range{flex:1;min-width:0}.vl-number__value{min-width:3ch;text-align:right}.vl-number__error{margin:4px 0 0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: RulesPipe, name: "vlRules" }], viewProviders: [{ provide: ControlContainer, useFactory: (form) => form, deps: [[new Optional(), new SkipSelf(), NgForm]] }] });
5185
5240
  }
5186
5241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NumberControl, decorators: [{
5187
5242
  type: Component,
@@ -5214,7 +5269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
5214
5269
  <p class="text-danger vl-number__error" *ngIf="showError()">{{ message() }}</p>
5215
5270
  </ng-container>
5216
5271
  <ng-template #shownText><span class="vl-number__text">{{ shown(value) }}</span></ng-template>
5217
- `, styles: [":host{display:block;min-width:0}.vl-number{display:flex;align-items:center;gap:6px;min-width:0}.vl-number__box{position:relative;flex:1;min-width:0;display:block}.vl-number__input{min-width:0;width:100%}.vl-number__input--sign{padding-right:2.5rem!important}.vl-number__sign{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);color:#64748b;pointer-events:none}.vl-number__step{width:2.5rem;height:2.5rem;flex:0 0 auto;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:1.1rem;cursor:pointer}.vl-number__range{flex:1;min-width:0}.vl-number__value{min-width:3ch;text-align:right}.vl-number__error{margin:4px 0 0}\n"] }]
5272
+ `, styles: [":host{display:block;min-width:0}.vl-number{display:flex;align-items:center;gap:6px;min-width:0}.vl-number__box{position:relative;flex:1;min-width:0;display:block}.vl-number__input{min-width:0;width:100%}.vl-number--spinner .vl-number__input{padding-left:4px!important;padding-right:4px!important;text-align:center}.vl-number__input--sign{padding-right:2.5rem!important}.vl-number__sign{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);color:#64748b;pointer-events:none}.vl-number__step{width:2.5rem;height:2.5rem;flex:0 0 auto;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:1.1rem;cursor:pointer}.vl-number__range{flex:1;min-width:0}.vl-number__value{min-width:3ch;text-align:right}.vl-number__error{margin:4px 0 0}\n"] }]
5218
5273
  }], propDecorators: { field: [{
5219
5274
  type: Input
5220
5275
  }], target: [{
@@ -5788,9 +5843,12 @@ function styleParts(styleObject) {
5788
5843
  return { classes: list.filter((c) => typeof c === 'string' && c.trim()).join(' '), style };
5789
5844
  }
5790
5845
 
5846
+ // Shuaib 2026-10-21
5847
+ // - fix: display mode shows what the record stores: an empty value is "--", never the property's
5848
+ // default (a request saved without status showed "beantragt"); the rule is controls/display-value.ts
5791
5849
  // Shuaib 2026-10-20
5792
5850
  // - new: mode "display" for the lists (card, grid): the value of a record (record[name], else the
5793
- // property's default, else --) shown read only, styled by scope.style, a link when option.link,
5851
+ // --) shown read only, styled by scope.style, a link when option.link,
5794
5852
  // media compact and clickable; date and time as text (option.dateFormat / timeFormat of older
5795
5853
  // layouts still count). Edit mode (dialog, form) stays as it was
5796
5854
  // - new: buttonType, list / listLoading, creditCardError for the form; hideLabel, styleValue, compact
@@ -5880,26 +5938,25 @@ class ControlComponent {
5880
5938
  get readonly() {
5881
5939
  return this.display || this.field?.option?.protected === true;
5882
5940
  }
5883
- /** the value shown: the record's in a list (else the property's default), the property's otherwise */
5941
+ /**
5942
+ * the value shown: in a list what the record stores (never the property's default - that belongs
5943
+ * to a new record in the dialog), the property's otherwise
5944
+ */
5884
5945
  get value() {
5885
- if (!this.display) {
5886
- return this.property?.value;
5887
- }
5888
- const own = this.record?.[this.name];
5889
- return own === null || own === undefined || own === '' ? this.property?.default : own;
5946
+ return this.display ? displayValue(this.field, this.record) : this.property?.value;
5947
+ }
5948
+ /** a plain value of a list as text, "--" when empty */
5949
+ get text() {
5950
+ return displayText(this.value);
5890
5951
  }
5891
5952
  /** the row a number reads its currency field from: the record in a list */
5892
5953
  get numberRow() {
5893
5954
  return this.display ? this.record : this.row;
5894
5955
  }
5895
- /** a date or time of a list as text; the --- of an empty value is shown by the template */
5956
+ /** a date or time of a list as text, "--" when empty */
5896
5957
  get dateText() {
5897
- const value = this.value;
5898
- if (value === null || value === undefined || value === '') {
5899
- return '';
5900
- }
5901
5958
  const kind = this.kind === 'time' ? 'time' : this.kind === 'datetime' ? 'datetime' : 'date';
5902
- return `${displayDateValue(value, kind, this.field?.option) ?? ''}`;
5959
+ return displayDateText(this.value, kind, this.field?.option);
5903
5960
  }
5904
5961
  /** an older layout's own date pattern (Angular date pipe: option.dateFormat / timeFormat) */
5905
5962
  get legacyDateFormat() {
@@ -5963,7 +6020,7 @@ class ControlComponent {
5963
6020
  return styleParts(this.field?.style);
5964
6021
  }
5965
6022
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5966
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: ControlComponent, isStandalone: true, selector: "vl-control", inputs: { field: "field", propertySchema: "propertySchema", selectedLanguageInfo: "selectedLanguageInfo", errorMessages: "errorMessages", saveTried: "saveTried", container: "container", buttonType: "buttonType", mode: "mode", record: "record", hideLabel: "hideLabel", styleValue: "styleValue", compact: "compact", list: "list", listLoading: "listLoading", creditCardError: "creditCardError" }, outputs: { picked: "picked", changed: "changed", opened: "opened", toggled: "toggled", linkClicked: "linkClicked", mediaClicked: "mediaClicked", buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\r\n - new: one field of a layout with the library's building blocks, as the Designer's canvas shows it;\r\n every control gets the project's translated messages (messages) (#166)\r\n - the button carries only the layout's classes and style - no Bootstrap classes, the app does not\r\n load Bootstrap -->\r\n@if (kind === 'button') {\r\n<button [attr.type]=\"buttonType\"\r\n [attr.data-vl-action]=\"vlAction(field?.option)\" [attr.data-vl-writes]=\"vlWrites(field?.option)\"\r\n [class]=\"buttonStyle().classes\"\r\n [ngStyle]=\"buttonStyle().style\"\r\n (click)=\"buttonClick.emit(field?.option)\">\r\n {{ label }}\r\n</button>\r\n} @else if (kind === 'creditCard') {\r\n<div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n</div>\r\n<div id=\"card-errors\" [class]=\"creditCardError?.textContent ? 'text-red-400 m-0' : ''\"></div>\r\n} @else if (display) {\r\n<!-- a list (card, grid): the record's value, read only; scope.style styles the value -->\r\n@if (showLabel) {\r\n<span [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</span>\r\n}\r\n@if (kind === 'media') {\r\n<vl-media [field]=\"field\" [compact]=\"true\" [property]=\"property\" [value]=\"value\"\r\n [mediaClass]=\"valueStyle().classes\" [mediaStyle]=\"valueStyle().style\"\r\n (clicked)=\"mediaClicked.emit(field?.option)\"></vl-media>\r\n} @else {\r\n<div [class]=\"'vl-control__value ' + valueStyle().classes\"\r\n [class.vl-control__value--number]=\"kind === 'number'\"\r\n [class.vl-control__value--link]=\"isLink\"\r\n [ngStyle]=\"valueStyle().style\" (click)=\"openLink()\">\r\n @switch (kind) {\r\n @case ('number') {\r\n <vl-number style=\"display:inline-block\" [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [property]=\"property\" [row]=\"numberRow\" [translations]=\"translations\"></vl-number>\r\n }\r\n @case ('password') { <vl-password [field]=\"field\" [readonly]=\"true\" [value]=\"value\"></vl-password> }\r\n @case ('textarea') { <vl-textarea [field]=\"field\" [readonly]=\"true\" [compact]=\"compact\" [value]=\"value\"></vl-textarea> }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\" [translations]=\"translations\"></vl-radio>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [items]=\"property?.data\"\r\n [translations]=\"translations\"></vl-dropdown>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"\r\n [translations]=\"translations\"></vl-switch>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"></vl-checkbox>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\" [combobox]=\"true\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('date') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('time') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('datetime') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [translations]=\"translations\"></vl-daterange>\r\n }\r\n @default { {{ value === null || value === undefined || value === '' ? '--' : value }} }\r\n }\r\n</div>\r\n}\r\n} @else {\r\n<div [ngStyle]=\"innerStyle()\">\r\n @if (showLabel) {\r\n <label [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</label>\r\n }\r\n @switch (kind) {\r\n @case ('media') {\r\n <vl-media [field]=\"field\" [property]=\"property\" [value]=\"property?.value\"></vl-media>\r\n }\r\n @case ('password') {\r\n <vl-password [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-password>\r\n }\r\n @case ('textarea') {\r\n <vl-textarea [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-textarea>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\" [combobox]=\"true\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [items]=\"property?.data\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-dropdown>\r\n }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n (chosen)=\"toggled.emit($event)\"></vl-radio>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [caption]=\"label\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\"\r\n (toggled)=\"toggled.emit($event)\"></vl-checkbox>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [translations]=\"translations\"\r\n (switched)=\"toggled.emit($event)\"></vl-switch>\r\n }\r\n @case ('number') {\r\n <vl-number [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"property?.type || 'number'\" [property]=\"property\" [row]=\"row\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-number>\r\n }\r\n @case ('date') {\r\n <vl-datetime kind=\"date\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('time') {\r\n <vl-datetime kind=\"time\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\" (opened)=\"opened.emit()\"></vl-datetime>\r\n }\r\n @case ('datetime') {\r\n <vl-datetime kind=\"datetime\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-daterange>\r\n }\r\n @default {\r\n <!-- textInput, email and every other text control -->\r\n <vl-textbox [formField]=\"field\" [modalItemInfo]=\"textboxInfo\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\"></vl-textbox>\r\n }\r\n }\r\n</div>\r\n}\r\n", styles: [":host{display:block;min-width:0}.vl-control__value{margin:0;min-width:0;overflow-wrap:anywhere}.vl-control__value--number{font-size:1.17em;font-weight:700}.vl-control__value--link{cursor:pointer;text-decoration:underline}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Autocomplete, selector: "vl-autocomplete", inputs: ["field", "target", "value", "readonly", "list", "loading", "combobox", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["picked"] }, { kind: "component", type: CheckboxControl, selector: "vl-checkbox", inputs: ["field", "target", "key", "value", "readonly", "type", "caption", "saveTried", "errorMessages", "translations", "inputStyle"], outputs: ["toggled"] }, { kind: "component", type: DateRangeControl, selector: "vl-daterange", inputs: ["field", "target", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed"] }, { kind: "component", type: DateTimeControl, selector: "vl-datetime", inputs: ["field", "target", "property", "kind", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed", "opened"] }, { kind: "component", type: DropdownControl, selector: "vl-dropdown", inputs: ["field", "target", "value", "readonly", "items", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["chosen"] }, { kind: "component", type: MediaControl, selector: "vl-media", inputs: ["field", "value", "property", "compact", "mediaStyle", "mediaClass"], outputs: ["clicked"] }, { kind: "component", type: NumberControl, selector: "vl-number", inputs: ["field", "target", "value", "readonly", "type", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass", "property", "row"], outputs: ["changed"] }, { kind: "component", type: PasswordControl, selector: "vl-password", inputs: ["field", "target", "value", "readonly", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: RadioControl, selector: "vl-radio", inputs: ["field", "target", "value", "readonly", "type", "saveTried", "errorMessages", "translations"], outputs: ["chosen"] }, { kind: "component", type: SwitchControl, selector: "vl-switch", inputs: ["field", "target", "value", "readonly", "type", "translations"], outputs: ["switched"] }, { kind: "component", type: TextareaControl, selector: "vl-textarea", inputs: ["field", "target", "value", "readonly", "compact", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: Textbox, selector: "vl-textbox", inputs: ["formField", "modalItemInfo", "saveTried", "errorMessages", "readonly", "value"], outputs: ["linkClicked"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
6023
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: ControlComponent, isStandalone: true, selector: "vl-control", inputs: { field: "field", propertySchema: "propertySchema", selectedLanguageInfo: "selectedLanguageInfo", errorMessages: "errorMessages", saveTried: "saveTried", container: "container", buttonType: "buttonType", mode: "mode", record: "record", hideLabel: "hideLabel", styleValue: "styleValue", compact: "compact", list: "list", listLoading: "listLoading", creditCardError: "creditCardError" }, outputs: { picked: "picked", changed: "changed", opened: "opened", toggled: "toggled", linkClicked: "linkClicked", mediaClicked: "mediaClicked", buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\r\n - new: one field of a layout with the library's building blocks, as the Designer's canvas shows it;\r\n every control gets the project's translated messages (messages) (#166)\r\n - the button carries only the layout's classes and style - no Bootstrap classes, the app does not\r\n load Bootstrap -->\r\n@if (kind === 'button') {\r\n<button [attr.type]=\"buttonType\"\r\n [attr.data-vl-action]=\"vlAction(field?.option)\" [attr.data-vl-writes]=\"vlWrites(field?.option)\"\r\n [class]=\"buttonStyle().classes\"\r\n [ngStyle]=\"buttonStyle().style\"\r\n (click)=\"buttonClick.emit(field?.option)\">\r\n {{ label }}\r\n</button>\r\n} @else if (kind === 'creditCard') {\r\n<div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n</div>\r\n<div id=\"card-errors\" [class]=\"creditCardError?.textContent ? 'text-red-400 m-0' : ''\"></div>\r\n} @else if (display) {\r\n<!-- a list (card, grid): the record's value, read only; scope.style styles the value -->\r\n@if (showLabel) {\r\n<span [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</span>\r\n}\r\n@if (kind === 'media') {\r\n<vl-media [field]=\"field\" [compact]=\"true\" [property]=\"property\" [value]=\"value\"\r\n [mediaClass]=\"valueStyle().classes\" [mediaStyle]=\"valueStyle().style\"\r\n (clicked)=\"mediaClicked.emit(field?.option)\"></vl-media>\r\n} @else {\r\n<div [class]=\"'vl-control__value ' + valueStyle().classes\"\r\n [class.vl-control__value--number]=\"kind === 'number'\"\r\n [class.vl-control__value--link]=\"isLink\"\r\n [ngStyle]=\"valueStyle().style\" (click)=\"openLink()\">\r\n @switch (kind) {\r\n @case ('number') {\r\n <vl-number style=\"display:inline-block\" [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [property]=\"property\" [row]=\"numberRow\" [translations]=\"translations\"></vl-number>\r\n }\r\n @case ('password') { <vl-password [field]=\"field\" [readonly]=\"true\" [value]=\"value\"></vl-password> }\r\n @case ('textarea') { <vl-textarea [field]=\"field\" [readonly]=\"true\" [compact]=\"compact\" [value]=\"value\"></vl-textarea> }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\" [translations]=\"translations\"></vl-radio>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [items]=\"property?.data\"\r\n [translations]=\"translations\"></vl-dropdown>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"\r\n [translations]=\"translations\"></vl-switch>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"></vl-checkbox>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\" [combobox]=\"true\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('date') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('time') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('datetime') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [translations]=\"translations\"></vl-daterange>\r\n }\r\n @default { {{ text }} }\r\n }\r\n</div>\r\n}\r\n} @else {\r\n<div class=\"vl-control__inner\" [ngStyle]=\"innerStyle()\">\r\n @if (showLabel) {\r\n <label [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</label>\r\n }\r\n @switch (kind) {\r\n @case ('media') {\r\n <vl-media [field]=\"field\" [property]=\"property\" [value]=\"property?.value\"></vl-media>\r\n }\r\n @case ('password') {\r\n <vl-password [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-password>\r\n }\r\n @case ('textarea') {\r\n <vl-textarea [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-textarea>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\" [combobox]=\"true\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [items]=\"property?.data\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-dropdown>\r\n }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n (chosen)=\"toggled.emit($event)\"></vl-radio>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [caption]=\"label\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\"\r\n (toggled)=\"toggled.emit($event)\"></vl-checkbox>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [translations]=\"translations\"\r\n (switched)=\"toggled.emit($event)\"></vl-switch>\r\n }\r\n @case ('number') {\r\n <vl-number [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"property?.type || 'number'\" [property]=\"property\" [row]=\"row\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-number>\r\n }\r\n @case ('date') {\r\n <vl-datetime kind=\"date\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('time') {\r\n <vl-datetime kind=\"time\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\" (opened)=\"opened.emit()\"></vl-datetime>\r\n }\r\n @case ('datetime') {\r\n <vl-datetime kind=\"datetime\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-daterange>\r\n }\r\n @default {\r\n <!-- textInput, email and every other text control -->\r\n <vl-textbox [formField]=\"field\" [modalItemInfo]=\"textboxInfo\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\"></vl-textbox>\r\n }\r\n }\r\n</div>\r\n}\r\n", styles: [":host{display:block;min-width:0}.vl-control__value{margin:0;min-width:0;overflow-wrap:anywhere}.vl-control__value--number{font-size:1.17em;font-weight:700}.vl-control__value--link{cursor:pointer;text-decoration:underline}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Autocomplete, selector: "vl-autocomplete", inputs: ["field", "target", "value", "readonly", "list", "loading", "combobox", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["picked"] }, { kind: "component", type: CheckboxControl, selector: "vl-checkbox", inputs: ["field", "target", "key", "value", "readonly", "type", "caption", "saveTried", "errorMessages", "translations", "inputStyle"], outputs: ["toggled"] }, { kind: "component", type: DateRangeControl, selector: "vl-daterange", inputs: ["field", "target", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed"] }, { kind: "component", type: DateTimeControl, selector: "vl-datetime", inputs: ["field", "target", "property", "kind", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed", "opened"] }, { kind: "component", type: DropdownControl, selector: "vl-dropdown", inputs: ["field", "target", "value", "readonly", "items", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["chosen"] }, { kind: "component", type: MediaControl, selector: "vl-media", inputs: ["field", "value", "property", "compact", "mediaStyle", "mediaClass"], outputs: ["clicked"] }, { kind: "component", type: NumberControl, selector: "vl-number", inputs: ["field", "target", "value", "readonly", "type", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass", "property", "row"], outputs: ["changed"] }, { kind: "component", type: PasswordControl, selector: "vl-password", inputs: ["field", "target", "value", "readonly", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: RadioControl, selector: "vl-radio", inputs: ["field", "target", "value", "readonly", "type", "saveTried", "errorMessages", "translations"], outputs: ["chosen"] }, { kind: "component", type: SwitchControl, selector: "vl-switch", inputs: ["field", "target", "value", "readonly", "type", "translations"], outputs: ["switched"] }, { kind: "component", type: TextareaControl, selector: "vl-textarea", inputs: ["field", "target", "value", "readonly", "compact", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: Textbox, selector: "vl-textbox", inputs: ["formField", "modalItemInfo", "saveTried", "errorMessages", "readonly", "value"], outputs: ["linkClicked"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
5967
6024
  }
5968
6025
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ControlComponent, decorators: [{
5969
6026
  type: Component,
@@ -5982,7 +6039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
5982
6039
  SwitchControl,
5983
6040
  TextareaControl,
5984
6041
  Textbox,
5985
- ], template: "<!-- Shuaib 2026-10-20\r\n - new: one field of a layout with the library's building blocks, as the Designer's canvas shows it;\r\n every control gets the project's translated messages (messages) (#166)\r\n - the button carries only the layout's classes and style - no Bootstrap classes, the app does not\r\n load Bootstrap -->\r\n@if (kind === 'button') {\r\n<button [attr.type]=\"buttonType\"\r\n [attr.data-vl-action]=\"vlAction(field?.option)\" [attr.data-vl-writes]=\"vlWrites(field?.option)\"\r\n [class]=\"buttonStyle().classes\"\r\n [ngStyle]=\"buttonStyle().style\"\r\n (click)=\"buttonClick.emit(field?.option)\">\r\n {{ label }}\r\n</button>\r\n} @else if (kind === 'creditCard') {\r\n<div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n</div>\r\n<div id=\"card-errors\" [class]=\"creditCardError?.textContent ? 'text-red-400 m-0' : ''\"></div>\r\n} @else if (display) {\r\n<!-- a list (card, grid): the record's value, read only; scope.style styles the value -->\r\n@if (showLabel) {\r\n<span [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</span>\r\n}\r\n@if (kind === 'media') {\r\n<vl-media [field]=\"field\" [compact]=\"true\" [property]=\"property\" [value]=\"value\"\r\n [mediaClass]=\"valueStyle().classes\" [mediaStyle]=\"valueStyle().style\"\r\n (clicked)=\"mediaClicked.emit(field?.option)\"></vl-media>\r\n} @else {\r\n<div [class]=\"'vl-control__value ' + valueStyle().classes\"\r\n [class.vl-control__value--number]=\"kind === 'number'\"\r\n [class.vl-control__value--link]=\"isLink\"\r\n [ngStyle]=\"valueStyle().style\" (click)=\"openLink()\">\r\n @switch (kind) {\r\n @case ('number') {\r\n <vl-number style=\"display:inline-block\" [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [property]=\"property\" [row]=\"numberRow\" [translations]=\"translations\"></vl-number>\r\n }\r\n @case ('password') { <vl-password [field]=\"field\" [readonly]=\"true\" [value]=\"value\"></vl-password> }\r\n @case ('textarea') { <vl-textarea [field]=\"field\" [readonly]=\"true\" [compact]=\"compact\" [value]=\"value\"></vl-textarea> }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\" [translations]=\"translations\"></vl-radio>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [items]=\"property?.data\"\r\n [translations]=\"translations\"></vl-dropdown>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"\r\n [translations]=\"translations\"></vl-switch>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"></vl-checkbox>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\" [combobox]=\"true\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('date') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('time') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('datetime') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText || '--' }} }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [translations]=\"translations\"></vl-daterange>\r\n }\r\n @default { {{ value === null || value === undefined || value === '' ? '--' : value }} }\r\n }\r\n</div>\r\n}\r\n} @else {\r\n<div [ngStyle]=\"innerStyle()\">\r\n @if (showLabel) {\r\n <label [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</label>\r\n }\r\n @switch (kind) {\r\n @case ('media') {\r\n <vl-media [field]=\"field\" [property]=\"property\" [value]=\"property?.value\"></vl-media>\r\n }\r\n @case ('password') {\r\n <vl-password [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-password>\r\n }\r\n @case ('textarea') {\r\n <vl-textarea [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-textarea>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\" [combobox]=\"true\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [items]=\"property?.data\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-dropdown>\r\n }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n (chosen)=\"toggled.emit($event)\"></vl-radio>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [caption]=\"label\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\"\r\n (toggled)=\"toggled.emit($event)\"></vl-checkbox>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [translations]=\"translations\"\r\n (switched)=\"toggled.emit($event)\"></vl-switch>\r\n }\r\n @case ('number') {\r\n <vl-number [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"property?.type || 'number'\" [property]=\"property\" [row]=\"row\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-number>\r\n }\r\n @case ('date') {\r\n <vl-datetime kind=\"date\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('time') {\r\n <vl-datetime kind=\"time\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\" (opened)=\"opened.emit()\"></vl-datetime>\r\n }\r\n @case ('datetime') {\r\n <vl-datetime kind=\"datetime\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-daterange>\r\n }\r\n @default {\r\n <!-- textInput, email and every other text control -->\r\n <vl-textbox [formField]=\"field\" [modalItemInfo]=\"textboxInfo\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\"></vl-textbox>\r\n }\r\n }\r\n</div>\r\n}\r\n", styles: [":host{display:block;min-width:0}.vl-control__value{margin:0;min-width:0;overflow-wrap:anywhere}.vl-control__value--number{font-size:1.17em;font-weight:700}.vl-control__value--link{cursor:pointer;text-decoration:underline}\n"] }]
6042
+ ], template: "<!-- Shuaib 2026-10-20\r\n - new: one field of a layout with the library's building blocks, as the Designer's canvas shows it;\r\n every control gets the project's translated messages (messages) (#166)\r\n - the button carries only the layout's classes and style - no Bootstrap classes, the app does not\r\n load Bootstrap -->\r\n@if (kind === 'button') {\r\n<button [attr.type]=\"buttonType\"\r\n [attr.data-vl-action]=\"vlAction(field?.option)\" [attr.data-vl-writes]=\"vlWrites(field?.option)\"\r\n [class]=\"buttonStyle().classes\"\r\n [ngStyle]=\"buttonStyle().style\"\r\n (click)=\"buttonClick.emit(field?.option)\">\r\n {{ label }}\r\n</button>\r\n} @else if (kind === 'creditCard') {\r\n<div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n</div>\r\n<div id=\"card-errors\" [class]=\"creditCardError?.textContent ? 'text-red-400 m-0' : ''\"></div>\r\n} @else if (display) {\r\n<!-- a list (card, grid): the record's value, read only; scope.style styles the value -->\r\n@if (showLabel) {\r\n<span [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</span>\r\n}\r\n@if (kind === 'media') {\r\n<vl-media [field]=\"field\" [compact]=\"true\" [property]=\"property\" [value]=\"value\"\r\n [mediaClass]=\"valueStyle().classes\" [mediaStyle]=\"valueStyle().style\"\r\n (clicked)=\"mediaClicked.emit(field?.option)\"></vl-media>\r\n} @else {\r\n<div [class]=\"'vl-control__value ' + valueStyle().classes\"\r\n [class.vl-control__value--number]=\"kind === 'number'\"\r\n [class.vl-control__value--link]=\"isLink\"\r\n [ngStyle]=\"valueStyle().style\" (click)=\"openLink()\">\r\n @switch (kind) {\r\n @case ('number') {\r\n <vl-number style=\"display:inline-block\" [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [property]=\"property\" [row]=\"numberRow\" [translations]=\"translations\"></vl-number>\r\n }\r\n @case ('password') { <vl-password [field]=\"field\" [readonly]=\"true\" [value]=\"value\"></vl-password> }\r\n @case ('textarea') { <vl-textarea [field]=\"field\" [readonly]=\"true\" [compact]=\"compact\" [value]=\"value\"></vl-textarea> }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [readonly]=\"true\" [value]=\"value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\" [translations]=\"translations\"></vl-radio>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [items]=\"property?.data\"\r\n [translations]=\"translations\"></vl-dropdown>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"\r\n [translations]=\"translations\"></vl-switch>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [type]=\"toggleType\"></vl-checkbox>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [list]=\"selectionList\" [combobox]=\"true\"\r\n [translations]=\"translations\"></vl-autocomplete>\r\n }\r\n @case ('date') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('time') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('datetime') { {{ legacyDateFormat && value ? (value | date: legacyDateFormat) : dateText }} }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [readonly]=\"true\" [value]=\"value\" [translations]=\"translations\"></vl-daterange>\r\n }\r\n @default { {{ text }} }\r\n }\r\n</div>\r\n}\r\n} @else {\r\n<div class=\"vl-control__inner\" [ngStyle]=\"innerStyle()\">\r\n @if (showLabel) {\r\n <label [class]=\"labelStyle().classes\" [ngStyle]=\"labelStyle().style\">{{ label }}</label>\r\n }\r\n @switch (kind) {\r\n @case ('media') {\r\n <vl-media [field]=\"field\" [property]=\"property\" [value]=\"property?.value\"></vl-media>\r\n }\r\n @case ('password') {\r\n <vl-password [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-password>\r\n }\r\n @case ('textarea') {\r\n <vl-textarea [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-textarea>\r\n }\r\n @case ('autocomplete') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [list]=\"selectionList\" [loading]=\"selectionLoading\" [combobox]=\"true\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (picked)=\"picked.emit($event)\"></vl-autocomplete>\r\n }\r\n @case ('dropdown') {\r\n <vl-dropdown [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [items]=\"property?.data\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-dropdown>\r\n }\r\n @case ('radio') {\r\n <vl-radio [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n (chosen)=\"toggled.emit($event)\"></vl-radio>\r\n }\r\n @case ('checkbox') {\r\n <vl-checkbox [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [caption]=\"label\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\"\r\n (toggled)=\"toggled.emit($event)\"></vl-checkbox>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"toggleType\" [translations]=\"translations\"\r\n (switched)=\"toggled.emit($event)\"></vl-switch>\r\n }\r\n @case ('number') {\r\n <vl-number [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [type]=\"property?.type || 'number'\" [property]=\"property\" [row]=\"row\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"></vl-number>\r\n }\r\n @case ('date') {\r\n <vl-datetime kind=\"date\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('time') {\r\n <vl-datetime kind=\"time\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\" (opened)=\"opened.emit()\"></vl-datetime>\r\n }\r\n @case ('datetime') {\r\n <vl-datetime kind=\"datetime\" [field]=\"field\" [target]=\"target\" [property]=\"property\" [readonly]=\"readonly\"\r\n [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-datetime>\r\n }\r\n @case ('daterange') {\r\n <vl-daterange [field]=\"field\" [target]=\"target\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [keyboard]=\"keyboard\" [saveTried]=\"saveTried\" [errorMessages]=\"messages\" [translations]=\"translations\"\r\n [inputStyle]=\"inputStyle().style\" [inputClass]=\"inputStyle().classes\"\r\n (changed)=\"changed.emit($event)\"></vl-daterange>\r\n }\r\n @default {\r\n <!-- textInput, email and every other text control -->\r\n <vl-textbox [formField]=\"field\" [modalItemInfo]=\"textboxInfo\" [readonly]=\"readonly\" [value]=\"property?.value\"\r\n [saveTried]=\"saveTried\" [errorMessages]=\"messages\"></vl-textbox>\r\n }\r\n }\r\n</div>\r\n}\r\n", styles: [":host{display:block;min-width:0}.vl-control__value{margin:0;min-width:0;overflow-wrap:anywhere}.vl-control__value--number{font-size:1.17em;font-weight:700}.vl-control__value--link{cursor:pointer;text-decoration:underline}\n"] }]
5986
6043
  }], propDecorators: { field: [{
5987
6044
  type: Input
5988
6045
  }], propertySchema: [{
@@ -6029,6 +6086,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
6029
6086
  type: Output
6030
6087
  }] } });
6031
6088
 
6089
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
6090
+ // - fix: on desktop the page buttons have a default (side by side, centred) under the page's own
6091
+ // listStyle; without one they stood one below the other
6032
6092
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11
6033
6093
  // - fix: "is this the app on iOS/Android" asks isNativeMobile() (native-platform.ts) instead of
6034
6094
  // Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web
@@ -6099,7 +6159,18 @@ class PaginationComponent {
6099
6159
  const baseStyle = this.getStyle(this.itemInfo?.layoutSchema
6100
6160
  ?.pagination?.listStyle);
6101
6161
  if (!this.isMobile) {
6102
- return baseStyle;
6162
+ // the buttons side by side unless the page styles the list itself - without a listStyle they
6163
+ // stood one below the other (tm-test Controls Grid)
6164
+ return {
6165
+ display: 'flex',
6166
+ 'align-items': 'center',
6167
+ 'justify-content': 'center',
6168
+ gap: '4px',
6169
+ 'list-style': 'none',
6170
+ margin: '0',
6171
+ padding: '8px 0',
6172
+ ...baseStyle,
6173
+ };
6103
6174
  }
6104
6175
  return {
6105
6176
  ...baseStyle,
@@ -6292,6 +6363,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
6292
6363
  type: Input
6293
6364
  }] } });
6294
6365
 
6366
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
6367
+ // - new: backendUrl - the one place that decides how a backend is reached. On the devices the
6368
+ // backend is called directly (native HTTP, no CORS). In the web a backend without CORS headers
6369
+ // (P5 / WildFly) cannot be called from the page, so the call goes to the page's own origin as
6370
+ // /api/proxy/<host>/<path> and the server that serves the app forwards it - only to declared
6371
+ // hosts (locally ng serve's proxy.conf.json, in operation nginx with an allow-list). Replaces the
6372
+ // hard-coded /p5ws path of the web and the direct calls that failed with CORS
6373
+ /** Prefix of the forwarding path on the app's own origin. */
6374
+ const BACKEND_PROXY_PREFIX = '/api/proxy';
6375
+ /**
6376
+ * The address to call for a backend URL: unchanged on the devices and for relative URLs; in the web
6377
+ * https://p5w1.wilken.de/p5ws/x?y=1 becomes <origin>/api/proxy/p5w1.wilken.de/p5ws/x?y=1.
6378
+ */
6379
+ function backendUrl(url) {
6380
+ if (isNativeMobile() || typeof window === 'undefined' || !/^https?:\/\//i.test(url || '')) {
6381
+ return url;
6382
+ }
6383
+ const target = new URL(url);
6384
+ if (target.origin === window.location.origin) {
6385
+ return url;
6386
+ }
6387
+ return `${window.location.origin}${BACKEND_PROXY_PREFIX}/${target.host}${target.pathname}${target.search}`;
6388
+ }
6389
+
6390
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
6391
+ // - new: a backend call described by the page instead of written into the code (A2). Saving,
6392
+ // loading with a filter and selection lists read the same keys of an option:
6393
+ // data_url (or url) address, with {{placeholders}}
6394
+ // method GET, POST, PUT, DELETE (default POST)
6395
+ // params URL parameters, values with {{placeholders}}
6396
+ // body content, a template; "{{records}}" as a whole value puts in the list itself
6397
+ // transform a named conversion of the records before sending (dailyLogs, OFFENE-PUNKTE 91)
6398
+ // afterSuccess "removeLocal": take the sent records out of browser storage
6399
+ // dateFormat how dates in params and body are written (date-format.ts; default ISO 8601
6400
+ // with time zone, e.g. P5 "yyyy-MM-dd'T'HH:mm:ss:SSSSxxx")
6401
+ // Placeholders: {{userInfo.x}} (the signed-in user, e.g. p5_backend_url), {{record.x}},
6402
+ // {{filter.x}}, {{records}}, {{env.x}} (the environment); {{x|'text'}} puts in text when x is empty
6403
+ // (P5: an empty plant is sent as two spaces). Replaces the fixed P5 time-recording
6404
+ // addresses in card, request service and selection lists
6405
+ const WHOLE = /^\s*{{\s*([^}]+?)\s*}}\s*$/;
6406
+ const ANY = /{{\s*([^}]+?)\s*}}/g;
6407
+ /** A placeholder's value; "path|'text'" gives text when the value is missing or empty. */
6408
+ function lookup(placeholder, context) {
6409
+ const fallback = placeholder.match(/^(.*?)\|\s*(['"])(.*)\2\s*$/s);
6410
+ const path = (fallback ? fallback[1] : placeholder).trim();
6411
+ const scope = { ...(context.userInfo || {}), ...context };
6412
+ const value = path.split('.').reduce((acc, key) => (acc == null ? undefined : acc[key]), scope);
6413
+ return fallback && (value == null || value === '') ? fallback[3] : value;
6414
+ }
6415
+ /**
6416
+ * A template with its placeholders filled in. A string that is only one placeholder gives the value
6417
+ * itself (a list stays a list); inside a longer text a missing value becomes empty. Objects and
6418
+ * lists are filled in deeply.
6419
+ */
6420
+ function resolveTemplate(template, context) {
6421
+ if (typeof template === 'string') {
6422
+ const whole = template.match(WHOLE);
6423
+ if (whole) {
6424
+ const value = lookup(whole[1], context);
6425
+ return value === undefined ? '' : value;
6426
+ }
6427
+ return template.replace(ANY, (_, path) => {
6428
+ const value = lookup(path, context);
6429
+ return value == null ? '' : value instanceof Date ? formatDate(value) : String(value);
6430
+ });
6431
+ }
6432
+ if (Array.isArray(template)) {
6433
+ return template.map(item => resolveTemplate(item, context));
6434
+ }
6435
+ if (template && typeof template === 'object') {
6436
+ const out = {};
6437
+ for (const [key, value] of Object.entries(template))
6438
+ out[key] = resolveTemplate(value, context);
6439
+ return out;
6440
+ }
6441
+ return template;
6442
+ }
6443
+ /** True when the option describes a backend call (it has an address). */
6444
+ function hasBackendCall(option) {
6445
+ return !!String(option?.data_url ?? option?.url ?? '').trim();
6446
+ }
6447
+ /**
6448
+ * The call of an option: address, method, URL parameters and content with the placeholders filled in.
6449
+ * A relative address is put after env.apiUrl. Without an address there is no call (null).
6450
+ */
6451
+ function buildBackendCall(option, context) {
6452
+ if (!hasBackendCall(option))
6453
+ return null;
6454
+ let url = String(resolveTemplate(String(option.data_url ?? option.url), context)).trim();
6455
+ const base = String(context.env?.apiUrl ?? '').replace(/\/+$/, '');
6456
+ if (!/^https?:\/\//i.test(url) && base) {
6457
+ url = `${base}/${url.replace(/^\/+/, '')}`;
6458
+ }
6459
+ const dateFormat = option.dateFormat;
6460
+ const params = {};
6461
+ for (const [key, value] of Object.entries(resolveTemplate(option.params || {}, context) || {})) {
6462
+ params[key] = value == null ? '' : value instanceof Date ? formatDate(value, dateFormat) : String(value);
6463
+ }
6464
+ const body = formatDates(option.body !== undefined
6465
+ ? resolveTemplate(option.body, context)
6466
+ : context.records ?? context.record ?? {}, dateFormat);
6467
+ return { url, method: String(option.method || 'POST').toUpperCase(), params, body };
6468
+ }
6469
+
6470
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
6471
+ // - change: a list's request is built like every backend call of a page (backend-call.ts). The base
6472
+ // address was always the user's p5_backend_url and the parameter {"type": "company"} built the P5
6473
+ // company key in the code; both are written in the page now ("{{p5_backend_url}}/…",
6474
+ // "{{p5_group}}/{{p5_client}}/{{p5_plant}}") - no P5 name left here (A2). user() for BackendCallService
6475
+ // - fix: setEnvironment - a relative list address goes after the app's apiUrl like every other call;
6476
+ // it was sent as it was (2026-10-22)
6295
6477
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
6296
6478
  // - change: the web autocomplete goes through backendUrl (/api/proxy/<host>/...) instead of the
6297
6479
  // /p5ws path only ng serve forwarded
@@ -6306,6 +6488,15 @@ class RemoteListService {
6306
6488
  setUser(userInfo) {
6307
6489
  this.currentUser = userInfo ?? null;
6308
6490
  }
6491
+ /** The app's environment (apiUrl): a relative list address goes after it, like every other call. */
6492
+ environment = null;
6493
+ setEnvironment(environment) {
6494
+ this.environment = environment ?? null;
6495
+ }
6496
+ /** The signed-in user the app handed over, or null. */
6497
+ user() {
6498
+ return this.currentUser;
6499
+ }
6309
6500
  /** Lists already loaded, by request (url + params), so a page does not ask twice. */
6310
6501
  cache = new Map();
6311
6502
  /** Like load(), with the current user and one request per source while the app runs. */
@@ -6341,72 +6532,27 @@ class RemoteListService {
6341
6532
  }
6342
6533
  return Array.isArray(response.data) ? response.data : [];
6343
6534
  }
6535
+ /**
6536
+ * The request of a field's list, described like every backend call of a page (backend-call.ts):
6537
+ * url with {{placeholders}} from the signed-in user, method, params, passToken.
6538
+ */
6344
6539
  resolveAutocompleteConfig(config, userInfo) {
6345
- const params = {};
6346
- Object.entries(config.params || {}).forEach(([key, value]) => {
6347
- // Dynamic token
6348
- if (typeof value === 'string' &&
6349
- value.includes('{{')) {
6350
- params[key] =
6351
- this.resolveToken(value, userInfo);
6352
- }
6353
- // Computed parameter
6354
- else if (value?.type === 'company') {
6355
- params[key] =
6356
- this.buildCompany(userInfo);
6357
- }
6358
- // Static parameter
6359
- else {
6360
- params[key] = value;
6361
- }
6362
- });
6363
- const requestUrl = this.getAutocompleteRequestUrl(userInfo?.p5_backend_url, config?.url);
6540
+ const call = buildBackendCall({ ...config, method: config?.method || 'POST' }, { userInfo, env: this.environment });
6541
+ if (!call) {
6542
+ throw new Error('Missing autocomplete endpoint URL');
6543
+ }
6364
6544
  return {
6365
- url: requestUrl,
6366
- method: config.method || 'POST',
6367
- params,
6368
- headers: config.passToken
6369
- ? {
6370
- Authorization: `Bearer ${userInfo.token}`,
6371
- Accept: 'application/json'
6372
- }
6545
+ url: backendUrl(call.url),
6546
+ method: call.method,
6547
+ params: call.params,
6548
+ headers: config.passToken && userInfo?.token
6549
+ ? { Authorization: `Bearer ${userInfo.token}`, Accept: 'application/json' }
6373
6550
  : {}
6374
6551
  };
6375
6552
  }
6376
- getAutocompleteRequestUrl(backendUrl$1, endpoint) {
6377
- const normalizedBackendUrl = backendUrl$1?.trim()?.replace(/\/+$/, '');
6378
- const normalizedEndpoint = endpoint?.trim();
6379
- if (!normalizedBackendUrl) {
6380
- throw new Error('Missing p5_backend_url for autocomplete request');
6381
- }
6382
- if (!normalizedEndpoint) {
6383
- throw new Error('Missing autocomplete endpoint URL');
6384
- }
6385
- if (Capacitor.isNativePlatform()) {
6386
- if (/^https?:\/\//i.test(normalizedEndpoint)) {
6387
- return normalizedEndpoint;
6388
- }
6389
- return (`${normalizedBackendUrl}/` +
6390
- normalizedEndpoint.replace(/^\/+/, ''));
6391
- }
6392
- // Web: through the app's own origin (/api/proxy/<host>/...), P5 sends no CORS headers
6393
- const absolute = /^https?:\/\//i.test(normalizedEndpoint)
6394
- ? normalizedEndpoint
6395
- : `${normalizedBackendUrl}/${normalizedEndpoint.replace(/^\/+/, '')}`;
6396
- return backendUrl(absolute);
6397
- }
6398
- buildCompany(userInfo) {
6399
- return userInfo.p5_plant
6400
- ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`
6401
- : `${userInfo.p5_group}/${userInfo.p5_client}/`;
6402
- }
6553
+ /** Fills {{...}} from the user info (backend-call.ts). */
6403
6554
  resolveToken(template, context) {
6404
- // The project writes {{userInfo.p5_resource_no}}; the context is the user info itself, so a
6405
- // leading "userInfo." resolves too - inside it the value came out empty.
6406
- const scope = { ...context, userInfo: context };
6407
- return template.replace(/{{(.*?)}}/g, (_, path) => {
6408
- return path.trim().split('.').reduce((acc, key) => acc?.[key], scope) ?? '';
6409
- });
6555
+ return resolveTemplate(template, { userInfo: context });
6410
6556
  }
6411
6557
  /** Suggestions of `list` whose `field` starts with the typed `query` (case-insensitive). */
6412
6558
  filter(list, field, query) {
@@ -6426,6 +6572,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
6426
6572
  }]
6427
6573
  }] });
6428
6574
 
6575
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
6576
+ // - new: the data source of a page and the format of its records in browser storage, in one place
6577
+ // (RecordStore uses it). A data source is what the page has anyway: storageType + data_url.
6578
+ // Records are stored as a plain JSON list [{…},{…}] - the same JSON a backend sends and receives.
6579
+ // Reading also takes the old format, a JSON text of that text ("double-wrapped"), which the app
6580
+ // wrote until now; a list written by hand or by the AI no longer stops the page (#166, A1)
6581
+ /** The kind of a data source, lowercase - "localStorage" of older Designer versions counts as "localstorage". */
6582
+ function storageKind(source) {
6583
+ const type = String(source?.storageType ?? '').trim().toLowerCase();
6584
+ if (type === 'localstorage' || type === 'sessionstorage' || type === 'filter' || type === 'database') {
6585
+ return type;
6586
+ }
6587
+ if (!type && source?.localStorage === true)
6588
+ return 'localstorage';
6589
+ if (!type && source?.sessionStorage === true)
6590
+ return 'sessionstorage';
6591
+ return '';
6592
+ }
6593
+ /** True when the records of the source live in the browser (local or session storage). */
6594
+ function isBrowserSource(source) {
6595
+ const kind = storageKind(source);
6596
+ return (kind === 'localstorage' || kind === 'sessionstorage') && !!source?.data_url;
6597
+ }
6598
+ /**
6599
+ * The records of a stored value: a list stays a list, a JSON text is read - also when it is the
6600
+ * JSON text of a JSON text. Anything else (nothing, broken JSON, an object) gives an empty list.
6601
+ */
6602
+ function parseRecords(value) {
6603
+ let current = value;
6604
+ for (let depth = 0; depth < 3 && typeof current === 'string'; depth++) {
6605
+ try {
6606
+ current = JSON.parse(current);
6607
+ }
6608
+ catch {
6609
+ return [];
6610
+ }
6611
+ }
6612
+ return Array.isArray(current) ? current : [];
6613
+ }
6614
+ /**
6615
+ * The record of a form, dialog or grid row: every field's value exactly as its control holds it - text,
6616
+ * number, date, period (a list), yes/no, selection - nothing unpacked, no exception by type. The same
6617
+ * for every container; dates are turned into storage text later, in one place (RecordStore).
6618
+ * fields: only these names (a grid row's editable columns); without, every field of the data objects.
6619
+ */
6620
+ function recordOf(propertySchema, fields) {
6621
+ const record = {};
6622
+ for (const group of Object.values(propertySchema || {})) {
6623
+ if (!group || typeof group !== 'object')
6624
+ continue;
6625
+ for (const [name, property] of Object.entries(group)) {
6626
+ if (fields && !fields.includes(name))
6627
+ continue;
6628
+ record[name] = property?.value ?? null;
6629
+ }
6630
+ }
6631
+ return record;
6632
+ }
6633
+
6634
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20
6635
+ // - fix: a project without environment.login (an app without sign-in) no longer stops the app at its
6636
+ // start - login.type, login.mobile and login.web are read with ?. ; before, loadKeycloakConfig threw
6637
+ // and the page stayed white (dev_urlaub, first app built with the AI)
6429
6638
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14
6430
6639
  // - fix: Keycloak on iOS/Android came from a hard-coded block (realm p5, client "mobile",
6431
6640
  // de.yomotech:/login/callback) instead of login.mobile, so every project signed in at wilken/p5
@@ -6469,7 +6678,7 @@ class ConfigService {
6469
6678
  this.config = await this.couchdbService.getFileContentFromCouchDb(`${projectName}`, 'environments/environment.json');
6470
6679
  }
6471
6680
  if (isNativeMobile()) {
6472
- if (this.config.environment.login.mobile) {
6681
+ if (this.config?.environment?.login?.mobile) {
6473
6682
  this.setConfiguration(this.config.environment.login.mobile);
6474
6683
  }
6475
6684
  else {
@@ -6477,7 +6686,7 @@ class ConfigService {
6477
6686
  }
6478
6687
  }
6479
6688
  else {
6480
- if (this.config.environment.login.web) {
6689
+ if (this.config?.environment?.login?.web) {
6481
6690
  this.setConfiguration(this.config.environment.login.web);
6482
6691
  }
6483
6692
  else {
@@ -6532,7 +6741,7 @@ class ConfigService {
6532
6741
  else {
6533
6742
  env = await this.couchdbService.getFileContentFromCouchDb(`${projectName}`, 'environments/environment.json');
6534
6743
  }
6535
- if (env?.environment?.login.type === "keycloak") {
6744
+ if (env?.environment?.login?.type === "keycloak") {
6536
6745
  if (isNativeMobile()) {
6537
6746
  // login.mobile of the project - every project its own realm and client
6538
6747
  const mobile = env?.environment?.login?.mobile ?? {};
@@ -6597,6 +6806,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
6597
6806
  }]
6598
6807
  }], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1$2.Platform }] });
6599
6808
 
6809
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
6810
+ // - change: delete, save, save all and the filter go to the page's PageData (input pageData, from the
6811
+ // app) - the card only draws; its own copies (deleteRecord, deleteAllRecord, saveData, showConfirm,
6812
+ // the filter load, cardDataChange) are gone, the same rules hold for the grid (A4)
6813
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
6814
+ // - fix: delete and delete all wrote the list into the fixed key "timeRecords", whatever the page's
6815
+ // data_url was (Urlaub "antrag": a delete hit the wrong data). They write through RecordStore into
6816
+ // the page's own data source - input dataSource, given by the app (#166, A1)
6817
+ // - fix: a delete button without deleteMessage did nothing. Deleting always asks first - its own
6818
+ // deleteMessage or the fixed text deleteConfirm; confirmDelete: false skips the question (OFFENE-PUNKTE 90)
6819
+ // - change: saving to a backend (button save, header "saveAll") and loading with a filter send what
6820
+ // the page describes (BackendCallService: data_url, method, params, body, transform, afterSuccess).
6821
+ // The fixed P5 calls registerTimeRecording / requestBookedTimeRecording, the P5 user fields and the
6822
+ // filter names fromDateFilter / toDateFilter are gone (saveData replaces saveToDb, A2)
6823
+ // - fix: a filter field not set yet counted as no filter field - the first date already loaded with
6824
+ // workDayTo empty; every filter field counts now, unset as null (A2 follow-up)
6825
+ // - change: formatToOffsetISO removed - filter dates are written by the page's dateFormat (date-format.ts)
6600
6826
  // Shuaib 2026-10-20
6601
6827
  // - change: the card's fields are drawn by the shared <vl-control> in display mode (ControlComponent);
6602
6828
  // header, footer and buttons keep their own blocks (#166)
@@ -6723,6 +6949,8 @@ class CardComponent {
6723
6949
  return field?.option?.control === 'dateTimepicker' || ['datetime', 'date&time', 'date-time'].includes(`${type ?? ''}`.toLowerCase()) ? 'datetime' : 'date';
6724
6950
  }
6725
6951
  itemInfo = {};
6952
+ /** The records of the page and what is done with them (PageData, shared with the grid). */
6953
+ pageData = null;
6726
6954
  currentPage = 0;
6727
6955
  pageSize = 5;
6728
6956
  selectedLanguageInfo = {};
@@ -6737,7 +6965,6 @@ class CardComponent {
6737
6965
  onPageChange = new EventEmitter();
6738
6966
  paginationMode = 'server';
6739
6967
  paginationLoading = false;
6740
- cardDataChange = new EventEmitter();
6741
6968
  scrollPaginationSentinel;
6742
6969
  scrollObserver;
6743
6970
  requestedScrollPage = null;
@@ -6891,24 +7118,6 @@ class CardComponent {
6891
7118
  }
6892
7119
  return this.itemInfo.data.indexOf(record);
6893
7120
  }
6894
- publishCardDataChange(resetPage = false) {
6895
- const records = Array.isArray(this.itemInfo?.data)
6896
- ? [...this.itemInfo.data]
6897
- : [];
6898
- this.cardDataChange.emit({
6899
- records,
6900
- resetPage
6901
- });
6902
- }
6903
- setFilteredCardData(records) {
6904
- const normalizedRecords = this.utilityService.restoreDatesFromStorage(Array.isArray(records) ? records : [], this.itemInfo.propertySchema);
6905
- this.itemInfo.data = normalizedRecords;
6906
- /*
6907
- * Filtering creates a new complete client-side dataset.
6908
- * Move pagination back to the first page.
6909
- */
6910
- this.publishCardDataChange(true);
6911
- }
6912
7121
  updateDeviceMode() {
6913
7122
  if (typeof window === 'undefined') {
6914
7123
  this.deviceMode = this.mobileDisplay ? 'mobile' : 'desktop';
@@ -7031,109 +7240,20 @@ class CardComponent {
7031
7240
  this.itemInfo.propertySchema[scope][field].value = value;
7032
7241
  this.applyDateFilter(this.extractFilterValues(this.itemInfo.propertySchema[scope]));
7033
7242
  }
7243
+ /** The filter values go to the page's data; it loads once every filter field is set. */
7034
7244
  async applyDateFilter(filters) {
7035
- const from = filters.fromDateFilter ? new Date(filters.fromDateFilter) : null;
7036
- const to = filters.toDateFilter ? new Date(filters.toDateFilter) : null;
7037
- if (to && from) {
7038
- // both dates there: the search starts - the keyboard has done its job and closes
7245
+ const values = Object.values(filters || {});
7246
+ if (values.length && values.every(value => value != null && value !== '')) {
7247
+ // every filter set: the search starts - the keyboard has done its job and closes
7039
7248
  this.keyboard.close({ blurTarget: true });
7040
- const formattedFrom = this.formatToOffsetISO(from);
7041
- const formattedTo = this.formatToOffsetISO(to);
7042
- const keycloakInfo = await this.utilityService.getLocalStorage('KeycloakInfo');
7043
- const logined = await this.utilityService.getLocalStorage('loginedUser');
7044
- this.safeUpdate(() => this.isLoading = true);
7045
- if (isNativeMobile()) {
7046
- try {
7047
- const saveOrders = await this.getSaveOrder(keycloakInfo?.token, keycloakInfo, formattedFrom, formattedTo);
7048
- this.safeUpdate(() => {
7049
- this.setFilteredCardData(saveOrders);
7050
- this.isLoading = false;
7051
- });
7052
- }
7053
- catch (error) {
7054
- console.error('Failed to fetch saved work orders', error);
7055
- this.safeUpdate(() => {
7056
- this.setFilteredCardData([]);
7057
- this.isLoading = false;
7058
- });
7059
- }
7060
- return;
7061
- }
7062
- else {
7063
- this.requestService
7064
- .getSaveOrder(logined?.token, logined, formattedFrom, formattedTo)
7065
- .subscribe({
7066
- next: (saveOrders) => {
7067
- this.safeUpdate(() => {
7068
- this.setFilteredCardData(saveOrders);
7069
- this.isLoading = false;
7070
- });
7071
- },
7072
- error: (error) => {
7073
- console.error('Failed to fetch saved work orders', error);
7074
- this.safeUpdate(() => {
7075
- this.setFilteredCardData([]);
7076
- this.isLoading = false;
7077
- });
7078
- }
7079
- });
7080
- }
7081
- }
7082
- }
7083
- async getSaveOrder(token, userInfo, fromDate, toDate) {
7084
- if (!token) {
7085
- return;
7086
- }
7087
- const company = userInfo.p5_plant
7088
- ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`
7089
- : `${userInfo.p5_group}/${userInfo.p5_client}/`;
7090
- const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/requestBookedTimeRecording`;
7091
- try {
7092
- const response = await stagedRequest(() => CapacitorHttp.post({
7093
- url,
7094
- params: {
7095
- resourceNo: userInfo.p5_resource_no,
7096
- workDayFrom: fromDate,
7097
- workDayTo: toDate,
7098
- company,
7099
- appVersion: '1',
7100
- },
7101
- headers: {
7102
- Authorization: `Bearer ${token}`, // ✅ REQUIRED
7103
- Accept: 'application/json',
7104
- },
7105
- // ❗ NO BODY needed for this endpoint
7106
- }));
7107
- console.log('getSaveOrder response:', response.data);
7108
- return response.data;
7109
- }
7110
- catch (error) {
7111
- console.error('Failed to fetch saved orders', error);
7112
- throw error;
7113
7249
  }
7250
+ await this.pageData?.setFilter(filters || {});
7114
7251
  }
7115
- formatToOffsetISO(date) {
7116
- if (!date)
7117
- return '';
7118
- const pad = (n, len = 2) => String(n).padStart(len, '0');
7119
- const year = date.getFullYear();
7120
- const month = pad(date.getMonth() + 1);
7121
- const day = pad(date.getDate());
7122
- const hours = pad(date.getHours());
7123
- const minutes = pad(date.getMinutes());
7124
- const seconds = pad(date.getSeconds());
7125
- const ms = pad(date.getMilliseconds(), 4); // 4-digit milliseconds
7126
- // timezone offset
7127
- const offset = -date.getTimezoneOffset(); // in minutes
7128
- const offSign = offset >= 0 ? '+' : '-';
7129
- const offHours = pad(Math.floor(Math.abs(offset) / 60));
7130
- const offMinutes = pad(Math.abs(offset) % 60);
7131
- return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}:${ms}${offSign}${offHours}:${offMinutes}`;
7132
- }
7252
+ /** Every filter field of the page, an unset one as null - the page loads only when none is empty. */
7133
7253
  extractFilterValues(schema) {
7134
7254
  return Object.keys(schema).reduce((acc, key) => {
7135
- if (key.includes('Filter') && schema[key]?.value !== undefined) {
7136
- acc[key] = schema[key].value;
7255
+ if (key.includes('Filter')) {
7256
+ acc[key] = schema[key]?.value ?? null;
7137
7257
  }
7138
7258
  return acc;
7139
7259
  }, {});
@@ -7156,7 +7276,7 @@ class CardComponent {
7156
7276
  }
7157
7277
  invokeOnCardHeader(element) {
7158
7278
  if (element.option && element.option.innerAction === "saveAll") {
7159
- this.d4_SaveAll();
7279
+ this.saveAllData(element.option);
7160
7280
  }
7161
7281
  else {
7162
7282
  this.cardHeaderButtonClick.emit(element);
@@ -7165,157 +7285,27 @@ class CardComponent {
7165
7285
  invokeOnCardFooter(element) {
7166
7286
  // this.cardHeaderButtonClick.emit(element);
7167
7287
  }
7288
+ /** Delete (asks first) and save to a backend go to the page's data; anything else to the app. */
7168
7289
  async invokeButtonClick(layout, record, recordIndex) {
7169
- if (layout?.option?.action === 'delete' && layout?.option?.storageType == 'localstorage') {
7170
- if (layout?.option?.deleteMessage) {
7171
- this.showConfirm(layout?.option, recordIndex);
7172
- }
7290
+ if (layout?.option?.action === 'delete' && storageKind(layout?.option) === 'localstorage') {
7291
+ await this.pageData?.remove(recordIndex, layout);
7173
7292
  }
7174
- else if (layout?.option?.action === 'save' && layout?.option?.storageType === 'database') {
7175
- this.configService.updateLoader(true);
7176
- const final_array = this.utilityService.convertToDailyLogs(record);
7177
- await this.saveToDb(final_array, recordIndex, layout.option.data_url);
7293
+ else if (layout?.option?.action === 'save' && storageKind(layout?.option) === 'database') {
7294
+ await this.pageData?.send(layout, recordIndex);
7178
7295
  }
7179
7296
  else {
7180
7297
  this.cardButtonClick.emit({ layout: layout, record: record, recordIndex: recordIndex });
7181
7298
  }
7182
7299
  }
7183
- showConfirm(option, recordIndex) {
7184
- this.modalService.confirm({
7185
- nzTitle: this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Confirm']
7186
- ? this.selectedLanguageInfo.selectedLanguage['Confirm']
7187
- : 'Confirm',
7188
- nzContent: this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage &&
7189
- this.selectedLanguageInfo?.selectedLanguage[option.deleteMessage]
7190
- ? this.selectedLanguageInfo.selectedLanguage[option.deleteMessage]
7191
- : option.deleteMessage,
7192
- nzOkText: this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Delete']
7193
- ? this.selectedLanguageInfo.selectedLanguage['Delete']
7194
- : 'Delete',
7195
- nzCancelText: this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Cancel']
7196
- ? this.selectedLanguageInfo.selectedLanguage['Cancel']
7197
- : 'Cancel',
7198
- nzOnOk: () => this.deleteRecord(recordIndex),
7199
- });
7200
- }
7201
- async d4_SaveAll() {
7202
- if (this.itemInfo?.data?.length) {
7203
- let allOrders = [];
7204
- for (let i = 0; i < this.itemInfo.data.length; i++) {
7205
- const element = this.itemInfo.data[i];
7206
- const dailyLogs = this.utilityService.convertToDailyLogs(element);
7207
- if (Array.isArray(dailyLogs)) {
7208
- allOrders.push(...dailyLogs);
7209
- }
7210
- }
7211
- await this.saveToDb(allOrders, null, true);
7300
+ /** "Save all": every record of the page in one call. */
7301
+ async saveAllData(option) {
7302
+ if (this.pageData?.records.length) {
7303
+ await this.pageData.send({ option }, 'all');
7212
7304
  }
7213
7305
  else {
7214
7306
  this.notificationService.warning(this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] ? this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] : 'No Record Found');
7215
7307
  }
7216
7308
  }
7217
- async deleteRecord(recordIndex) {
7218
- if (!Array.isArray(this.itemInfo?.data) ||
7219
- recordIndex < 0 ||
7220
- recordIndex >= this.itemInfo.data.length) {
7221
- this.configService.updateLoader(false);
7222
- return;
7223
- }
7224
- this.itemInfo.data.splice(recordIndex, 1);
7225
- await this.utilityService.setLocalStorage('timeRecords', JSON.stringify(this.itemInfo.data));
7226
- /*
7227
- * Notify AppComponent so page count is recalculated.
7228
- */
7229
- this.publishCardDataChange(false);
7230
- this.configService.updateLoader(false);
7231
- }
7232
- async deleteAllRecord() {
7233
- this.itemInfo.data = [];
7234
- await this.utilityService.setLocalStorage('timeRecords', JSON.stringify([]));
7235
- this.publishCardDataChange(true);
7236
- this.configService.updateLoader(false);
7237
- }
7238
- async saveToDb(orders, orderIndex, data_url, deleteAll = false) {
7239
- this.safeUpdate(() => (this.isLoading = true));
7240
- const token = this.oauthService.getAccessToken();
7241
- const logined = await this.utilityService.getLocalStorage('loginedUser');
7242
- const keycloakInfo = await this.utilityService.getLocalStorage('KeycloakInfo');
7243
- let saveobject = {
7244
- ressourceNo: logined?.p5_resource_no ? logined.p5_resource_no : keycloakInfo?.p5_resource_no,
7245
- returnTimeRecordingLine: orders
7246
- };
7247
- if (isNativeMobile()) {
7248
- const res = await this.mobileSaveDb(keycloakInfo.token, keycloakInfo, saveobject, orderIndex, data_url, deleteAll);
7249
- }
7250
- else {
7251
- this.webSaveDb(token, logined, saveobject, orderIndex, data_url, deleteAll);
7252
- }
7253
- }
7254
- webSaveDb(token, userInfo, order = {}, orderIndex, dataUrl, deleteAll = false) {
7255
- if (token) {
7256
- const headers = new HttpHeaders({
7257
- 'Authorization': `Bearer ${token}`,
7258
- 'Accept': 'application/json'
7259
- });
7260
- let url2 = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : " "}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`;
7261
- this.http.post(backendUrl(url2), order, { headers }).subscribe({
7262
- next: res => {
7263
- this.safeUpdate(() => this.isLoading = false);
7264
- if (orderIndex > -1) {
7265
- this.deleteRecord(orderIndex);
7266
- }
7267
- else {
7268
- this.deleteAllRecord();
7269
- }
7270
- },
7271
- error: (error) => {
7272
- // The loader kept turning and the record stayed without any message.
7273
- this.safeUpdate(() => this.isLoading = false);
7274
- console.error('Failed to save time recording', error);
7275
- this.notificationService.error(this.selectedLanguageInfo?.selectedLanguage?.['saveFailed'] ?? 'The record could not be saved.');
7276
- }
7277
- });
7278
- }
7279
- }
7280
- async mobileSaveDb(token, userInfo, order = {}, orderIndex, dataUrl, deleteAll = false) {
7281
- if (!token) {
7282
- console.log('NO-token', token);
7283
- return;
7284
- }
7285
- const company = userInfo.p5_plant
7286
- ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`
7287
- : `${userInfo.p5_group}/${userInfo.p5_client}/`;
7288
- const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording`;
7289
- try {
7290
- const response = await stagedRequest(() => CapacitorHttp.post({
7291
- url,
7292
- params: {
7293
- company,
7294
- appVersion: '1',
7295
- resourceNo: userInfo.p5_resource_no,
7296
- },
7297
- headers: {
7298
- Authorization: `Bearer ${token}`,
7299
- Accept: 'application/json',
7300
- 'Content-Type': 'application/json',
7301
- },
7302
- data: order,
7303
- }));
7304
- if (orderIndex != null && orderIndex > -1) {
7305
- this.deleteRecord(orderIndex);
7306
- }
7307
- else {
7308
- this.deleteAllRecord();
7309
- }
7310
- this.safeUpdate(() => (this.isLoading = false));
7311
- return response.data;
7312
- }
7313
- catch (error) {
7314
- this.safeUpdate(() => (this.isLoading = false));
7315
- console.error('Failed to save time recording', error);
7316
- throw error;
7317
- }
7318
- }
7319
7309
  showLinkDetails(option, record) {
7320
7310
  this.linkDetails.emit({ option: option, record: record });
7321
7311
  }
@@ -7518,27 +7508,27 @@ class CardComponent {
7518
7508
  return resolveCustomKeyboardType(field?.option, property);
7519
7509
  }
7520
7510
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, deps: [{ token: UtilityService }, { token: i1$2.Platform }, { token: i1$1.HttpClient }, { token: ConfigService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i5.NzModalService }, { token: NotificationService }, { token: i7.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
7521
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CardComponent, isStandalone: true, selector: "vl-card", inputs: { itemInfo: "itemInfo", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", mobileDisplay: "mobileDisplay", scrollPagination: "scrollPagination", pages: "pages", paginationMode: "paginationMode", paginationLoading: "paginationLoading" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange", cardDataChange: "cardDataChange" }, host: { listeners: { "window:resize": "onWindowResize()" } }, viewQueries: [{ propertyName: "scrollPaginationSentinel", first: true, predicate: ["scrollPaginationSentinel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [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\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [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]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n 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 <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"element?.scope?.style?.classes?.[0] || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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\"\r\n [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\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n 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\r\n [required]=\"element.option.required\"\r\n [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'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n 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=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\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>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "component", type: DateTimeControl, selector: "vl-datetime", inputs: ["field", "target", "property", "kind", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed", "opened"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵ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: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i15.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: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i16.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "ngmodule", type: InputTextModule }] });
7511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CardComponent, isStandalone: true, selector: "vl-card", inputs: { itemInfo: "itemInfo", pageData: "pageData", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", mobileDisplay: "mobileDisplay", scrollPagination: "scrollPagination", pages: "pages", paginationMode: "paginationMode", paginationLoading: "paginationLoading" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange" }, host: { listeners: { "window:resize": "onWindowResize()" } }, viewQueries: [{ propertyName: "scrollPaginationSentinel", first: true, predicate: ["scrollPaginationSentinel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21\r\n - change: the loader also shows while the page's PageData loads or sends (A4)\r\n - fix: a grid page draws no card area - an empty gap stood between filter fields and table -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [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\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [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]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n 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 <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"element?.scope?.style?.classes?.[0] || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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\"\r\n [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\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n 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\r\n [required]=\"element.option.required\"\r\n [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'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n 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=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\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>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "component", type: DateTimeControl, selector: "vl-datetime", inputs: ["field", "target", "property", "kind", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed", "opened"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵ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: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i15.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: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i16.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }] });
7522
7512
  }
7523
7513
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, decorators: [{
7524
7514
  type: Component,
7525
- args: [{ selector: 'vl-card', imports: [ControlComponent, PlaceholderPipe, Autocomplete, SwitchControl, RadioControl, NumberControl, CheckboxControl, DropdownControl, DateTimeControl, MediaControl, PasswordControl, TextareaControl, DateHintPipe, DateFormatPipe, DateTextPipe, MediaSourcePipe,
7515
+ args: [{ selector: 'vl-card', imports: [
7516
+ ControlComponent,
7517
+ DateTimeControl,
7526
7518
  CommonModule,
7527
7519
  FormsModule,
7528
7520
  NzIconModule,
7529
- DatePickerModule,
7530
7521
  NzButtonModule,
7531
7522
  NzDatePickerModule,
7532
7523
  NzModalModule,
7533
7524
  PaginationComponent,
7534
7525
  MatTooltipModule,
7535
7526
  String$1,
7536
- AutoCompleteModule,
7537
- InputTextModule,
7538
- CustomKeyboardDirective,
7539
- ], standalone: true, template: "<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [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\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [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]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n 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 <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"element?.scope?.style?.classes?.[0] || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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\"\r\n [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\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n 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\r\n [required]=\"element.option.required\"\r\n [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'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n 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=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\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>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}\n"] }]
7527
+ ], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21\r\n - change: the loader also shows while the page's PageData loads or sends (A4)\r\n - fix: a grid page draws no card area - an empty gap stood between filter fields and table -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [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\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [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]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n 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 <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"element?.scope?.style?.classes?.[0] || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(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\"\r\n [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\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n 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\r\n [required]=\"element.option.required\"\r\n [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'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n 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=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\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>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}\n"] }]
7540
7528
  }], ctorParameters: () => [{ type: UtilityService }, { type: i1$2.Platform }, { type: i1$1.HttpClient }, { type: ConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i5.NzModalService }, { type: NotificationService }, { type: i7.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
7541
7529
  type: Input
7530
+ }], pageData: [{
7531
+ type: Input
7542
7532
  }], currentPage: [{
7543
7533
  type: Input
7544
7534
  }], pageSize: [{
@@ -7567,8 +7557,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7567
7557
  type: Input
7568
7558
  }], paginationLoading: [{
7569
7559
  type: Input
7570
- }], cardDataChange: [{
7571
- type: Output
7572
7560
  }], scrollPaginationSentinel: [{
7573
7561
  type: ViewChild,
7574
7562
  args: ['scrollPaginationSentinel']
@@ -7941,11 +7929,11 @@ class FormComponent {
7941
7929
  return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
7942
7930
  }
7943
7931
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7944
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\n over types and controls in this template - the same building block as the dialog (#166)\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\n and drop-down put scope.style around label and input); all classes of a style count\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\n password, text area, media were still editable; a protected field shows label and value -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\n - change: media fields are the one vl-media (#166 step 4.4)\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\n - change: check boxes with vl-checkbox (#166 step 4.4)\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\n - change: the text field is the one vl-textbox (#166 step 4.4)\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\n project defines none; it showed the text \"undefined\" -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\n names another one ('native' keeps the system keyboard)\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\n instead of PrimeNG's own icon with empty handlers -->\n\n<!-- Shuaib 2026-09-24\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\n\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\n model.component.html and the whole Designer but not this file, so one data object rendered\n in a modal and stayed empty here\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\n next to the code that implements it -->\n<div class=\"form-renderer\"\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\n <div\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\n class=\"section-card\">\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\n <div class=\"section-title\"\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\n {{ formSection.label.caption }}\n </div>\n </div>\n\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\n <vl-control [field]=\"formField\"\n [propertySchema]=\"form.propertySchema\"\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\n [errorMessages]=\"errorMessages\"\n [saveTried]=\"saveTried\"\n container=\"form\"\n buttonType=\"submit\"\n [list]=\"remoteData[formField.scope?.reference]\"\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\n [creditCardError]=\"creditCardError\"\n (toggled)=\"setformData()\"\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\n </vl-control>\n </div>\n </div>\n </div>\n </form>\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
7932
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\r\n over types and controls in this template - the same building block as the dialog (#166)\r\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\r\n and drop-down put scope.style around label and input); all classes of a style count\r\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\r\n password, text area, media were still editable; a protected field shows label and value -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\r\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - change: the text field is the one vl-textbox (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\r\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\r\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\r\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\r\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <div\r\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\r\n class=\"section-card\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\r\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
7945
7933
  }
7946
7934
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, decorators: [{
7947
7935
  type: Component,
7948
- args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent], selector: 'vl-form', template: "<!-- Shuaib 2026-10-20\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\n over types and controls in this template - the same building block as the dialog (#166)\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\n and drop-down put scope.style around label and input); all classes of a style count\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\n password, text area, media were still editable; a protected field shows label and value -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\n - change: media fields are the one vl-media (#166 step 4.4)\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\n - change: check boxes with vl-checkbox (#166 step 4.4)\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\n - change: the text field is the one vl-textbox (#166 step 4.4)\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\n project defines none; it showed the text \"undefined\" -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\n names another one ('native' keeps the system keyboard)\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\n instead of PrimeNG's own icon with empty handlers -->\n\n<!-- Shuaib 2026-09-24\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\n\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\n model.component.html and the whole Designer but not this file, so one data object rendered\n in a modal and stayed empty here\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\n next to the code that implements it -->\n<div class=\"form-renderer\"\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\n <div\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\n class=\"section-card\">\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\n <div class=\"section-title\"\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\n {{ formSection.label.caption }}\n </div>\n </div>\n\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\n <vl-control [field]=\"formField\"\n [propertySchema]=\"form.propertySchema\"\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\n [errorMessages]=\"errorMessages\"\n [saveTried]=\"saveTried\"\n container=\"form\"\n buttonType=\"submit\"\n [list]=\"remoteData[formField.scope?.reference]\"\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\n [creditCardError]=\"creditCardError\"\n (toggled)=\"setformData()\"\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\n </vl-control>\n </div>\n </div>\n </div>\n </form>\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}\n"] }]
7936
+ args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent], selector: 'vl-form', template: "<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\r\n over types and controls in this template - the same building block as the dialog (#166)\r\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\r\n and drop-down put scope.style around label and input); all classes of a style count\r\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\r\n password, text area, media were still editable; a protected field shows label and value -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\r\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - change: the text field is the one vl-textbox (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\r\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\r\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\r\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\r\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <div\r\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\r\n class=\"section-card\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\r\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}\n"] }]
7949
7937
  }], propDecorators: { errorMessages: [{
7950
7938
  type: Input
7951
7939
  }], creditCardError: [{
@@ -7960,6 +7948,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7960
7948
  type: Output
7961
7949
  }] } });
7962
7950
 
7951
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
7952
+ // - new: input pageData - a grid page from browser storage or a filter (A4): rows come from the app as
7953
+ // PageData.visible, the delete icon deletes through PageData (asks first, the page's own list),
7954
+ // paging goes to PageData; without pageData everything works as before (backend, table: true)
7955
+ // - new: editing as the page sets it (layoutSchema.edit.mode): "row" - startEdit/saveRow/cancelEdit with
7956
+ // a copy of the data objects per row, checked through the form like the dialog, saved through
7957
+ // PageData; "dialog" - editRow asks the app to open the page's dialog. inlineEditable and
7958
+ // checkboxEditable are gone - without edit the grid is read only
7963
7959
  // Shuaib 2026-10-20
7964
7960
  // - change: the cells that show a value are drawn by the shared <vl-control> in display mode
7965
7961
  // (ControlComponent); cellType, inlineEditable, checkboxEditable decide which cells keep their own
@@ -8085,6 +8081,15 @@ class GridComponent {
8085
8081
  currentPage = 0;
8086
8082
  pages = [];
8087
8083
  userInfo;
8084
+ /** A page from browser storage or a filter (A4): its records, delete and paging go through PageData. */
8085
+ pageData = null;
8086
+ /** "dialog" edit: the app opens the page's dialog with the record (like a card's showModal). */
8087
+ editRow = new EventEmitter();
8088
+ gridForm;
8089
+ /** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
8090
+ editingRow = null;
8091
+ rowSchema = {};
8092
+ rowSaveTried = false;
8088
8093
  onPageChange = new EventEmitter();
8089
8094
  onPageSizeChange = new EventEmitter();
8090
8095
  onGridScroll = new EventEmitter();
@@ -8296,11 +8301,131 @@ class GridComponent {
8296
8301
  this.gridDecreamentClick.emit({ index: index, field: field, option: option });
8297
8302
  }
8298
8303
  invokeOnPageSizeChange(pageSize) {
8304
+ if (this.pageData) {
8305
+ this.pageData.setPageSize(Number(pageSize));
8306
+ return;
8307
+ }
8299
8308
  this.onPageSizeChange.emit(pageSize);
8300
8309
  }
8301
8310
  invokeGoToPage(page) {
8311
+ if (this.pageData) {
8312
+ this.pageData.goTo(Number(page));
8313
+ return;
8314
+ }
8302
8315
  this.onPageChange.emit(page);
8303
8316
  }
8317
+ /** layoutSchema.edit: { mode: "row" | "dialog", layout_url?, property_url?, modalTitle?, data_url?, method? } */
8318
+ get editConfig() {
8319
+ return this.tableitemInfo?.layoutSchema?.edit ?? null;
8320
+ }
8321
+ get editMode() {
8322
+ const mode = this.editConfig?.mode;
8323
+ return mode === 'row' || mode === 'dialog' ? mode : null;
8324
+ }
8325
+ /** The edit column shows when the page sets a mode and has at least one unlocked field. */
8326
+ get canEdit() {
8327
+ return !!this.editMode && (this.tableitemInfo?.layoutSchema?.elements || [])
8328
+ .some((col) => col?.scope?.reference && !col?.option?.protected);
8329
+ }
8330
+ /** A column whose cells can be edited: it has a field and the field is not locked. */
8331
+ editableCol(col) {
8332
+ return !!col?.scope?.reference && !col?.option?.protected;
8333
+ }
8334
+ /** A cell is an input only in the row being edited, and only when its field is not locked. */
8335
+ cellEditing(col, data) {
8336
+ return this.editingRow === data && this.editableCol(col);
8337
+ }
8338
+ /** A cell that needs more room while edited: multi-line text, a period, date and time. */
8339
+ wideEditCell(col) {
8340
+ const type = this.cellType(col).toLowerCase();
8341
+ const control = String(col?.option?.control ?? '').toLowerCase();
8342
+ return type === 'daterange' || type === 'datetime' || control === 'textarea' || control === 'daterangepicker';
8343
+ }
8344
+ /** The project's text for a fixed key (Edit, Save, Cancel), else the key. */
8345
+ t(key) {
8346
+ return this.selectedLanguageInfo?.selectedLanguage?.[key] ?? key;
8347
+ }
8348
+ recordIndexOf(data) {
8349
+ return this.pageData ? this.pageData.records.indexOf(data) : (this.tableitemInfo?.data || []).indexOf(data);
8350
+ }
8351
+ startEdit(data) {
8352
+ if (this.editMode === 'dialog') {
8353
+ const config = this.editConfig || {};
8354
+ const source = this.pageData?.source || {};
8355
+ this.editRow.emit({
8356
+ option: {
8357
+ innerAction: 'showModal',
8358
+ layout_url: config.layout_url,
8359
+ property_url: config.property_url ?? source.property_url,
8360
+ modalTitle: config.modalTitle,
8361
+ storageType: source.storageType,
8362
+ data_url: source.data_url,
8363
+ },
8364
+ record: data,
8365
+ recordIndex: this.recordIndexOf(data),
8366
+ });
8367
+ return;
8368
+ }
8369
+ // a copy of the data objects with the row's values - the controls write there, the row stays
8370
+ // untouched until ✓ (JSON keeps no Date, so the values are set afterwards)
8371
+ const schema = JSON.parse(JSON.stringify(this.tableitemInfo?.propertySchema || {}));
8372
+ for (const group of Object.values(schema)) {
8373
+ for (const [name, property] of Object.entries(group || {})) {
8374
+ if (property && typeof property === 'object')
8375
+ property.value = fromStorageValue(data?.[name], property.type) ?? null;
8376
+ }
8377
+ }
8378
+ this.rowSchema = schema;
8379
+ this.rowSaveTried = false;
8380
+ this.editingRow = data;
8381
+ }
8382
+ cancelEdit() {
8383
+ this.editingRow = null;
8384
+ this.rowSchema = {};
8385
+ this.rowSaveTried = false;
8386
+ }
8387
+ /** ✓: checks the row's controls like the dialog, then saves the record (browser list or backend). */
8388
+ async saveRow() {
8389
+ if (!this.editingRow)
8390
+ return;
8391
+ this.rowSaveTried = true;
8392
+ const form = this.gridForm;
8393
+ if (form) {
8394
+ Object.values(form.controls).forEach(control => {
8395
+ control.markAsTouched();
8396
+ control.updateValueAndValidity();
8397
+ });
8398
+ if (!form.valid)
8399
+ return;
8400
+ }
8401
+ const editable = (this.tableitemInfo?.layoutSchema?.elements || [])
8402
+ .filter((col) => this.cellEditing(col, this.editingRow))
8403
+ .map((col) => splitReference(col.scope.reference).name);
8404
+ const values = recordOf(this.rowSchema, editable);
8405
+ const record = { ...this.editingRow, ...values };
8406
+ const index = this.recordIndexOf(this.editingRow);
8407
+ let saved = false;
8408
+ if (this.pageData && isBrowserSource(this.pageData.source)) {
8409
+ saved = await this.pageData.saveRecord(record, index);
8410
+ }
8411
+ else if (this.pageData && this.editConfig?.data_url) {
8412
+ // a backend page: the edit's own address (method default PUT), then the page loads again
8413
+ this.pageData.records[index] = record;
8414
+ saved = await this.pageData.send({ option: { method: 'PUT', ...this.editConfig } }, index);
8415
+ if (saved)
8416
+ await this.pageData.load();
8417
+ }
8418
+ if (saved)
8419
+ this.cancelEdit();
8420
+ }
8421
+ /** The delete icon of a row: a browser list deletes through PageData (asks first), a backend as before. */
8422
+ deleteRow(option, data) {
8423
+ if (this.pageData && isBrowserSource(this.pageData.source)) {
8424
+ this.pageData.remove(this.pageData.records.indexOf(data), { option: { action: 'delete', ...option } });
8425
+ return;
8426
+ }
8427
+ this.upsertAction(option, data);
8428
+ }
8304
8429
  authenticating() {
8305
8430
  this.utilityService.getStorage(`${this.projectSeleted}Logined`).then((logined) => {
8306
8431
  if (logined == "true") {
@@ -8616,26 +8741,22 @@ class GridComponent {
8616
8741
  const reference = col?.scope?.reference || '';
8617
8742
  return this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() || '']?.type ?? '';
8618
8743
  }
8619
- /**
8620
- * An unlocked text or number cell is typed in; the action column saves the row. A column with a
8621
- * shared control (password, text area, switch, combobox, radio) is shown, not typed in.
8622
- */
8623
- inlineEditable(col) {
8624
- const type = this.cellType(col);
8625
- return !col?.option?.protected && !this.cellControl(col) && (type === 'string' || type === 'number');
8626
- }
8627
- /** An unlocked Boolean column without switch or radio ticks the row's value. */
8628
- checkboxEditable(col) {
8629
- const type = this.cellType(col);
8630
- return !col?.option?.protected && !this.cellControl(col)
8631
- && (type === 'boolean' || this.isLegacyCheckboxFieldType(type));
8632
- }
8633
8744
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, deps: [{ token: RequestService }, { token: UtilityService }, { token: NotificationService }, { token: i4.OktaAuthStateService }], target: i0.ɵɵFactoryTarget.Component });
8634
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", userInfo: "userInfo" }, outputs: { onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\n columns stayed empty\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\n the check box of the row, action columns, buttons, the footer\n - change: a locked check box is shown read only; it could be ticked\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\n - change: media fields are the one vl-media (#166 step 4.4)\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\n - change: check boxes with vl-checkbox (#166 step 4.4)\n - change: the footer's number field is the one vl-number (#166 step 4.4)\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\n shared controls, cells read only and compact (#166 step 4.4)\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\n project defines none; it showed the text \"undefined\" -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\n names another one ('native' keeps the system keyboard)\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\n their PrimeNG icon opened the calendar together with the system keyboard -->\n\n<!-- Shuaib 2026-09-24\n - change: grid cells render legacy checkbox fields through the boolean control. -->\n\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\n reads option.filter and never option.columnFilter, which is the mistake a layout author\n makes without being told -->\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\n role=\"alert\">\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\n</div>\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\n (scroll)=\"onScrollEvent($event)\"\n [nzLoading]=\"isTableDataLoad\">\n <thead>\n <!-- @contract decision: option.sortable is read here\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\n the key was decoration. The column also needs a scope.reference -\n without one getColumnSortFn has nothing to sort by.\n seen: grid.component.ts:338 -->\n <!-- Column headings and sorting -->\n <tr>\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\n [nzSortFn]=\"\n column?.option?.sortable\n ? getColumnSortFn(column)\n : false\n \">\n\n {{ column?.label?.caption }}\n </th>\n </tr>\n\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\n starts the comparison (the renderer falls back to contains), and\n option.filter.placeholder labels the input.\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\n column carrying it looks filterable in the file and is not on screen.\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\n projects, all of them dead -->\n <!-- Column filters -->\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\n\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\n class=\"grid-filter-cell\">\n\n <ng-container *ngIf=\"\n column?.option?.filter?.filtering === true &&\n column?.scope?.reference\n \">\n\n <div class=\"grid-filter-input-wrapper\">\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\n [ngModel]=\"getColumnFilterState(column).value\"\n (ngModelChange)=\"\n setColumnFilterValue(column, $event)\n \" />\n\n <!-- Operator selection button -->\n <button type=\"button\"\n class=\"grid-filter-operator-button\" nz-dropdown\n nzTrigger=\"click\"\n [nzDropdownMenu]=\"operatorMenu\"\n [class.grid-filter-operator-button--active]=\"\n hasActiveColumnFilter(column)\n \" [title]=\"\n 'Operator: ' +\n getFilterOperatorLabel(\n getColumnFilterState(column).operator\n )\n \">\n\n <span nz-icon nzType=\"filter\"></span>\n </button>\n\n <!-- Clear current column filter -->\n <button *ngIf=\"hasActiveColumnFilter(column)\"\n type=\"button\" class=\"grid-filter-clear-button\"\n aria-label=\"Clear column filter\"\n title=\"Clear filter\"\n (click)=\"clearColumnFilter(column)\">\n\n <span nz-icon nzType=\"close\"></span>\n </button>\n </div>\n\n <!-- Operator dropdown -->\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"grid-filter-operator-menu\">\n <li *ngFor=\"let operator of filterOperators\"\n nz-menu-item [nzSelected]=\"\n getColumnFilterState(column).operator ===\n operator.value\n \" (click)=\"\n setColumnFilterOperator(\n column,\n operator.value\n )\n \">\n\n <span *ngIf=\"\n getColumnFilterState(column).operator ===\n operator.value\n \" nz-icon nzType=\"check\">\n </span>\n\n {{ operator.label }}\n </li>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n </th>\n </tr>\n </thead>\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\n unlocked text and number cells, quantity, multiply and the check box keep their own\n blocks, because they write into the row.\n\n @contract decision: columns without scope.reference are valid\n reality: with option.actionColumn they render save/delete icons, otherwise a\n button. That is why the conditions below all guard on the reference. -->\n <tbody>\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\n <!-- a column without property: action icons or a button. Unlocked text and number cells\n are typed in (the row is saved by the action column), a check box ticks the row; every\n other cell shows the row's value through the shared <vl-control> in display mode -->\n @if (!col?.scope?.reference) {\n <ng-container *ngIf=\"!col?.scope?.reference\">\n <span *ngIf=\"col.option?.actionColumn\">\n <span nz-icon\n *ngIf=\"setActionColumn(col.option?.save, data)\"\n [nzType]=\"col.option?.save?.icon\"\n [nzTheme]=\"'twotone'\"\n [style]=\"col.option?.save?.style\"\n [nzTwotoneColor]=\"'#52c41a'\"\n [class]=\"col.option?.save?.style?.classes?.[0]\"\n (click)=\"upsertAction(col.option?.save, data)\">\n </span>\n <span nz-icon\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\n [nzType]=\"col.option?.delete?.icon\"\n [nzTheme]=\"'twotone'\"\n [style]=\"col.option?.delete?.style\"\n [nzTwotoneColor]=\"'#FF0000'\"\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\n\n </span>\n <span *ngIf=\"!col.option?.actionColumn\">\n <button type=\"submit\"\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\n (click)=\"invokeGridBtnClick(col.option, data)\"\n [class]=\"col?.label?.style?.classes?.[0]\">\n {{ col.label?.caption }}\n </button>\n </span>\n </ng-container>\n\n } @else if (cellType(col) === 'quantity') {\n <div style=\"display: flex; align-items: center;\">\n <button pButton icon=\"pi pi-minus\"\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\n [disabled]=\"data.quantity <= 0\"\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\n <span>{{ data[col.scope?.reference.split('/').pop()]\n }}</span>\n <button pButton icon=\"pi pi-plus\"\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\n </div>\n } @else if (inlineEditable(col)) {\n @if (cellType(col) === 'number') {\n <input [vlCustomKeyboard]=\"keyboardTypeFor(col, tableitemInfo.propertySchema)\"\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\n type=\"number\"\n class=\"p-inputtext p-component\" />\n } @else {\n <input [vlCustomKeyboard]=\"keyboardTypeFor(col, tableitemInfo.propertySchema)\"\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\n class=\"p-inputtext p-component\" />\n }\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\n } @else if (checkboxEditable(col)) {\n <vl-checkbox [field]=\"col\" type=\"boolean\" [target]=\"data\" [key]=\"col.scope?.reference.split('/').pop()\"\n [inputStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"></vl-checkbox>\n } @else {\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\n [propertySchema]=\"tableitemInfo.propertySchema\"\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\n [list]=\"remoteData[col.scope.reference]\"\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\n (linkClicked)=\"showLinkDetails(col.option, data)\"\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\n </vl-control>\n }\n </td>\n </tr>\n </tbody>\n </nz-table>\n</div>\n\n<!-- table footer -->\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\n <!-- @contract decision: the footer renders string and number only\n reality: the switch below carries those two cases and a default. It did NOT change\n when the columns gained their types on 2026-09-18.\n failure: any other type in a footer field renders empty.\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\n @switch (cellControl(tableField)) {\n @case ('password') {\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\n }\n @case ('textArea') {\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\n }\n @case ('switch') {\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\n }\n @case ('radiobutton') {\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\n }\n @case ('combobox') {\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\n }\n @default {\n <div\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\n\n <!-- string control -->\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\n <span *ngIf=\"tableField.option.protected\">\n <h5 style=\"display: flex; justify-content: space-between;\">\n <span\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">\n {{\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}\n </span>\n <span>\n {{\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\n }}\n </span>\n </h5>\n </span>\n <div *ngIf=\"!tableField.option.protected\">\n <div\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\n <label\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\n tableField.label?.value ?\n tableField.label?.value :\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\n </div>\n </div>\n </div>\n\n <!-- number control -->\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\n <span *ngIf=\"tableField.option.protected\"\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">\n <h5>{{\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\n </h5>\n </span>\n <span *ngIf=\"!tableField.option.protected\">\n <div\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\n <label\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\n tableField.label?.value ?\n tableField.label?.value :\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\n [inputClass]=\"tableField.scope?.style?.classes?.[0] ?? ''\"></vl-number>\n </div>\n\n </span>\n </div>\n\n <!-- button control -->\n <div *ngSwitchCase=\"'default'\">\n <button type=\"submit\"\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\n {{ tableField.label?.caption }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n</div>\n\n<!-- bottom pagination on grid -->\n<div\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\n [currentPage]=\"currentPage\" [pages]=\"pages\"\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\n (onGoToPage)=\"invokeGoToPage($event)\">\n </vl-pagination>\n</div>\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "component", type: Textbox, selector: "vl-textbox", inputs: ["formField", "modalItemInfo", "saveTried", "errorMessages", "readonly", "value"], outputs: ["linkClicked"] }, { kind: "component", type: Autocomplete, selector: "vl-autocomplete", inputs: ["field", "target", "value", "readonly", "list", "loading", "combobox", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["picked"] }, { kind: "component", type: PasswordControl, selector: "vl-password", inputs: ["field", "target", "value", "readonly", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: TextareaControl, selector: "vl-textarea", inputs: ["field", "target", "value", "readonly", "compact", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: SwitchControl, selector: "vl-switch", inputs: ["field", "target", "value", "readonly", "type", "translations"], outputs: ["switched"] }, { kind: "component", type: RadioControl, selector: "vl-radio", inputs: ["field", "target", "value", "readonly", "type", "saveTried", "errorMessages", "translations"], outputs: ["chosen"] }, { kind: "component", type: NumberControl, selector: "vl-number", inputs: ["field", "target", "value", "readonly", "type", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass", "property", "row"], outputs: ["changed"] }, { kind: "component", type: CheckboxControl, selector: "vl-checkbox", inputs: ["field", "target", "key", "value", "readonly", "type", "caption", "saveTried", "errorMessages", "translations", "inputStyle"], outputs: ["toggled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i7$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i7$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i7$1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i7$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i7$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i7$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i7$1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i9$1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i11$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i11$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i11$2.NzDropdownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i11$2.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzMenuModule }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
8745
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", userInfo: "userInfo", pageData: "pageData" }, outputs: { editRow: "editRow", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, viewQueries: [{ propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - change: the delete icon of a row goes through deleteRow (PageData for a browser list, A4)\r\n - new: editing as the page sets it (layoutSchema.edit.mode): \"row\" - pencil, the unlocked cells of\r\n that row become <vl-control mode=\"edit\"> (every type, checked like the dialog), \u2713 saves, \u2715 cancels;\r\n \"dialog\" - pencil opens the page's dialog with the record; without edit the grid is read only.\r\n The old inputs that wrote text, number and check box cells into the row without saving are gone -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\r\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\r\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\r\n columns stayed empty\r\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\r\n the check box of the row, action columns, buttons, the footer\r\n - change: a locked check box is shown read only; it could be ticked\r\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: the footer's number field is the one vl-number (#166 step 4.4)\r\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\r\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\r\n shared controls, cells read only and compact (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes?.[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes?.[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"tableField.scope?.style?.classes?.[0] ?? ''\"></vl-number>\r\n </div>\r\n\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "component", type: Textbox, selector: "vl-textbox", inputs: ["formField", "modalItemInfo", "saveTried", "errorMessages", "readonly", "value"], outputs: ["linkClicked"] }, { kind: "component", type: Autocomplete, selector: "vl-autocomplete", inputs: ["field", "target", "value", "readonly", "list", "loading", "combobox", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["picked"] }, { kind: "component", type: PasswordControl, selector: "vl-password", inputs: ["field", "target", "value", "readonly", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: TextareaControl, selector: "vl-textarea", inputs: ["field", "target", "value", "readonly", "compact", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"] }, { kind: "component", type: SwitchControl, selector: "vl-switch", inputs: ["field", "target", "value", "readonly", "type", "translations"], outputs: ["switched"] }, { kind: "component", type: RadioControl, selector: "vl-radio", inputs: ["field", "target", "value", "readonly", "type", "saveTried", "errorMessages", "translations"], outputs: ["chosen"] }, { kind: "component", type: NumberControl, selector: "vl-number", inputs: ["field", "target", "value", "readonly", "type", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass", "property", "row"], outputs: ["changed"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i7$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i7$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i7$1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i7$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i7$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i7$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i7$1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i9$1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i11$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i11$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i11$2.NzDropdownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i11$2.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzMenuModule }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
8635
8746
  }
8636
8747
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, decorators: [{
8637
8748
  type: Component,
8638
- args: [{ standalone: true, imports: [ControlComponent, PlaceholderPipe, Textbox, Autocomplete, PasswordControl, TextareaControl, SwitchControl, RadioControl, NumberControl, CheckboxControl, DropdownControl, DateTimeControl, DateRangeControl, MediaControl, RulesPipe, VisiblePipe, DateHintPipe, DateFormatPipe, DateTextPipe, MediaSourcePipe,
8749
+ args: [{ standalone: true, imports: [
8750
+ ControlComponent,
8751
+ Textbox,
8752
+ Autocomplete,
8753
+ PasswordControl,
8754
+ TextareaControl,
8755
+ SwitchControl,
8756
+ RadioControl,
8757
+ NumberControl,
8758
+ CheckboxControl,
8759
+ VisiblePipe,
8639
8760
  CommonModule,
8640
8761
  FormsModule,
8641
8762
  NzTableModule,
@@ -8644,12 +8765,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
8644
8765
  NzDropDownModule,
8645
8766
  NzMenuModule,
8646
8767
  PaginationComponent,
8647
- NzDatePickerModule,
8648
- DatePickerModule,
8649
- AutoCompleteModule,
8650
- InputTextModule,
8651
8768
  CustomKeyboardDirective,
8652
- ], selector: 'vl-grid', template: "<!-- Shuaib 2026-10-20\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\n columns stayed empty\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\n the check box of the row, action columns, buttons, the footer\n - change: a locked check box is shown read only; it could be ticked\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\n - change: media fields are the one vl-media (#166 step 4.4)\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\n - change: check boxes with vl-checkbox (#166 step 4.4)\n - change: the footer's number field is the one vl-number (#166 step 4.4)\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\n shared controls, cells read only and compact (#166 step 4.4)\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\n project defines none; it showed the text \"undefined\" -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\n names another one ('native' keeps the system keyboard)\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\n their PrimeNG icon opened the calendar together with the system keyboard -->\n\n<!-- Shuaib 2026-09-24\n - change: grid cells render legacy checkbox fields through the boolean control. -->\n\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\n reads option.filter and never option.columnFilter, which is the mistake a layout author\n makes without being told -->\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\n role=\"alert\">\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\n</div>\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\n (scroll)=\"onScrollEvent($event)\"\n [nzLoading]=\"isTableDataLoad\">\n <thead>\n <!-- @contract decision: option.sortable is read here\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\n the key was decoration. The column also needs a scope.reference -\n without one getColumnSortFn has nothing to sort by.\n seen: grid.component.ts:338 -->\n <!-- Column headings and sorting -->\n <tr>\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\n [nzSortFn]=\"\n column?.option?.sortable\n ? getColumnSortFn(column)\n : false\n \">\n\n {{ column?.label?.caption }}\n </th>\n </tr>\n\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\n starts the comparison (the renderer falls back to contains), and\n option.filter.placeholder labels the input.\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\n column carrying it looks filterable in the file and is not on screen.\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\n projects, all of them dead -->\n <!-- Column filters -->\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\n\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\n class=\"grid-filter-cell\">\n\n <ng-container *ngIf=\"\n column?.option?.filter?.filtering === true &&\n column?.scope?.reference\n \">\n\n <div class=\"grid-filter-input-wrapper\">\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\n [ngModel]=\"getColumnFilterState(column).value\"\n (ngModelChange)=\"\n setColumnFilterValue(column, $event)\n \" />\n\n <!-- Operator selection button -->\n <button type=\"button\"\n class=\"grid-filter-operator-button\" nz-dropdown\n nzTrigger=\"click\"\n [nzDropdownMenu]=\"operatorMenu\"\n [class.grid-filter-operator-button--active]=\"\n hasActiveColumnFilter(column)\n \" [title]=\"\n 'Operator: ' +\n getFilterOperatorLabel(\n getColumnFilterState(column).operator\n )\n \">\n\n <span nz-icon nzType=\"filter\"></span>\n </button>\n\n <!-- Clear current column filter -->\n <button *ngIf=\"hasActiveColumnFilter(column)\"\n type=\"button\" class=\"grid-filter-clear-button\"\n aria-label=\"Clear column filter\"\n title=\"Clear filter\"\n (click)=\"clearColumnFilter(column)\">\n\n <span nz-icon nzType=\"close\"></span>\n </button>\n </div>\n\n <!-- Operator dropdown -->\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"grid-filter-operator-menu\">\n <li *ngFor=\"let operator of filterOperators\"\n nz-menu-item [nzSelected]=\"\n getColumnFilterState(column).operator ===\n operator.value\n \" (click)=\"\n setColumnFilterOperator(\n column,\n operator.value\n )\n \">\n\n <span *ngIf=\"\n getColumnFilterState(column).operator ===\n operator.value\n \" nz-icon nzType=\"check\">\n </span>\n\n {{ operator.label }}\n </li>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n </th>\n </tr>\n </thead>\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\n unlocked text and number cells, quantity, multiply and the check box keep their own\n blocks, because they write into the row.\n\n @contract decision: columns without scope.reference are valid\n reality: with option.actionColumn they render save/delete icons, otherwise a\n button. That is why the conditions below all guard on the reference. -->\n <tbody>\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\n <!-- a column without property: action icons or a button. Unlocked text and number cells\n are typed in (the row is saved by the action column), a check box ticks the row; every\n other cell shows the row's value through the shared <vl-control> in display mode -->\n @if (!col?.scope?.reference) {\n <ng-container *ngIf=\"!col?.scope?.reference\">\n <span *ngIf=\"col.option?.actionColumn\">\n <span nz-icon\n *ngIf=\"setActionColumn(col.option?.save, data)\"\n [nzType]=\"col.option?.save?.icon\"\n [nzTheme]=\"'twotone'\"\n [style]=\"col.option?.save?.style\"\n [nzTwotoneColor]=\"'#52c41a'\"\n [class]=\"col.option?.save?.style?.classes?.[0]\"\n (click)=\"upsertAction(col.option?.save, data)\">\n </span>\n <span nz-icon\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\n [nzType]=\"col.option?.delete?.icon\"\n [nzTheme]=\"'twotone'\"\n [style]=\"col.option?.delete?.style\"\n [nzTwotoneColor]=\"'#FF0000'\"\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\n\n </span>\n <span *ngIf=\"!col.option?.actionColumn\">\n <button type=\"submit\"\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\n (click)=\"invokeGridBtnClick(col.option, data)\"\n [class]=\"col?.label?.style?.classes?.[0]\">\n {{ col.label?.caption }}\n </button>\n </span>\n </ng-container>\n\n } @else if (cellType(col) === 'quantity') {\n <div style=\"display: flex; align-items: center;\">\n <button pButton icon=\"pi pi-minus\"\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\n [disabled]=\"data.quantity <= 0\"\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\n <span>{{ data[col.scope?.reference.split('/').pop()]\n }}</span>\n <button pButton icon=\"pi pi-plus\"\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\n </div>\n } @else if (inlineEditable(col)) {\n @if (cellType(col) === 'number') {\n <input [vlCustomKeyboard]=\"keyboardTypeFor(col, tableitemInfo.propertySchema)\"\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\n type=\"number\"\n class=\"p-inputtext p-component\" />\n } @else {\n <input [vlCustomKeyboard]=\"keyboardTypeFor(col, tableitemInfo.propertySchema)\"\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\n class=\"p-inputtext p-component\" />\n }\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\n } @else if (checkboxEditable(col)) {\n <vl-checkbox [field]=\"col\" type=\"boolean\" [target]=\"data\" [key]=\"col.scope?.reference.split('/').pop()\"\n [inputStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"></vl-checkbox>\n } @else {\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\n [propertySchema]=\"tableitemInfo.propertySchema\"\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\n [list]=\"remoteData[col.scope.reference]\"\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\n (linkClicked)=\"showLinkDetails(col.option, data)\"\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\n </vl-control>\n }\n </td>\n </tr>\n </tbody>\n </nz-table>\n</div>\n\n<!-- table footer -->\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\n <!-- @contract decision: the footer renders string and number only\n reality: the switch below carries those two cases and a default. It did NOT change\n when the columns gained their types on 2026-09-18.\n failure: any other type in a footer field renders empty.\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\n @switch (cellControl(tableField)) {\n @case ('password') {\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\n }\n @case ('textArea') {\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\n }\n @case ('switch') {\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\n }\n @case ('radiobutton') {\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\n }\n @case ('combobox') {\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\n }\n @default {\n <div\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\n\n <!-- string control -->\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\n <span *ngIf=\"tableField.option.protected\">\n <h5 style=\"display: flex; justify-content: space-between;\">\n <span\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">\n {{\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}\n </span>\n <span>\n {{\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\n }}\n </span>\n </h5>\n </span>\n <div *ngIf=\"!tableField.option.protected\">\n <div\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\n <label\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\n tableField.label?.value ?\n tableField.label?.value :\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\n </div>\n </div>\n </div>\n\n <!-- number control -->\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\n <span *ngIf=\"tableField.option.protected\"\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">\n <h5>{{\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\n </h5>\n </span>\n <span *ngIf=\"!tableField.option.protected\">\n <div\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\n <label\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\n tableField.label?.value ?\n tableField.label?.value :\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\n [inputClass]=\"tableField.scope?.style?.classes?.[0] ?? ''\"></vl-number>\n </div>\n\n </span>\n </div>\n\n <!-- button control -->\n <div *ngSwitchCase=\"'default'\">\n <button type=\"submit\"\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\n {{ tableField.label?.caption }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n</div>\n\n<!-- bottom pagination on grid -->\n<div\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\n [currentPage]=\"currentPage\" [pages]=\"pages\"\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\n (onGoToPage)=\"invokeGoToPage($event)\">\n </vl-pagination>\n</div>\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}\n"] }]
8769
+ ], selector: 'vl-grid', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - change: the delete icon of a row goes through deleteRow (PageData for a browser list, A4)\r\n - new: editing as the page sets it (layoutSchema.edit.mode): \"row\" - pencil, the unlocked cells of\r\n that row become <vl-control mode=\"edit\"> (every type, checked like the dialog), \u2713 saves, \u2715 cancels;\r\n \"dialog\" - pencil opens the page's dialog with the record; without edit the grid is read only.\r\n The old inputs that wrote text, number and check box cells into the row without saving are gone -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\r\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\r\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\r\n columns stayed empty\r\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\r\n the check box of the row, action columns, buttons, the footer\r\n - change: a locked check box is shown read only; it could be ticked\r\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: the footer's number field is the one vl-number (#166 step 4.4)\r\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\r\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\r\n shared controls, cells read only and compact (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes?.[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes?.[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"tableField.scope?.style?.classes?.[0] ?? ''\"></vl-number>\r\n </div>\r\n\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}\n"] }]
8653
8770
  }], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4.OktaAuthStateService }], propDecorators: { errorMessages: [{
8654
8771
  type: Input
8655
8772
  }], environment: [{
@@ -8674,6 +8791,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
8674
8791
  type: Input
8675
8792
  }], userInfo: [{
8676
8793
  type: Input
8794
+ }], pageData: [{
8795
+ type: Input
8796
+ }], editRow: [{
8797
+ type: Output
8798
+ }], gridForm: [{
8799
+ type: ViewChild,
8800
+ args: ['gridForm']
8677
8801
  }], onPageChange: [{
8678
8802
  type: Output
8679
8803
  }], onPageSizeChange: [{
@@ -8908,6 +9032,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
8908
9032
  ], selector: 'vl-logs', template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"] }]
8909
9033
  }], ctorParameters: () => [{ type: NetworkLogService }] });
8910
9034
 
9035
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
9036
+ // - change: buildCompany removed - the P5 company key is written in the page now (A2)
9037
+ // - fix: a record's dates fill the dialog through fromStorageValue - a period (also as UTC text after
9038
+ // a copy of the record) stayed empty
8911
9039
  // Shuaib 2026-10-20
8912
9040
  // - change: the fields are drawn by the shared <vl-control> (controls/control.ts); the switch over
8913
9041
  // types and controls and its helpers (renderFieldType, keyboardTypeFor, getLabel, getButtonCaption,
@@ -9090,7 +9218,12 @@ class ModelComponent {
9090
9218
  if (!schemaFields[fieldKey]) {
9091
9219
  schemaFields[fieldKey] = {};
9092
9220
  }
9093
- schemaFields[fieldKey].value = data[fieldKey];
9221
+ // through the one place for dates: a period or a date that came as text (also as UTC after a
9222
+ // copy of the record) becomes the Date the control expects - the period stayed empty before
9223
+ const value = data[fieldKey] instanceof Date || Array.isArray(data[fieldKey]) && data[fieldKey].every((v) => v instanceof Date)
9224
+ ? data[fieldKey]
9225
+ : fromStorageValue(data[fieldKey], schemaFields[fieldKey]?.type);
9226
+ schemaFields[fieldKey].value = value;
9094
9227
  }
9095
9228
  });
9096
9229
  }
@@ -9146,9 +9279,6 @@ class ModelComponent {
9146
9279
  resolveToken(template, context) {
9147
9280
  return this.remoteLists.resolveToken(template, context);
9148
9281
  }
9149
- buildCompany(userInfo) {
9150
- return this.remoteLists.buildCompany(userInfo);
9151
- }
9152
9282
  getScope(scope) {
9153
9283
  let propertyScope = "";
9154
9284
  let start = scope?.indexOf("#/") + 2;
@@ -9378,7 +9508,7 @@ class ModelComponent {
9378
9508
  return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
9379
9509
  }
9380
9510
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.DynamicDialogRef }, { token: i1$4.DynamicDialogConfig }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Component });
9381
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler" }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"styleOf(formField?.style).classes\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
9511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - new: class vl-dialog-field on every field - on a phone each field takes the whole width with its\r\n label above (model.component.css), whatever columns the page sets for tablet and desktop -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"vl-dialog-field\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}@media(max-width:599px){.vl-dialog-field{grid-column:1 / -1!important}.vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
9382
9512
  }
9383
9513
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, decorators: [{
9384
9514
  type: Component,
@@ -9387,7 +9517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
9387
9517
  FormsModule,
9388
9518
  VisiblePipe,
9389
9519
  ControlComponent,
9390
- ], template: "<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"styleOf(formField?.style).classes\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}\n"] }]
9520
+ ], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - new: class vl-dialog-field on every field - on a phone each field takes the whole width with its\r\n label above (model.component.css), whatever columns the page sets for tablet and desktop -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"vl-dialog-field\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}@media(max-width:599px){.vl-dialog-field{grid-column:1 / -1!important}.vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}\n"] }]
9391
9521
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef }, { type: i1$4.DynamicDialogConfig }, { type: UtilityService }], propDecorators: { errorMessages: [{
9392
9522
  type: Input
9393
9523
  }], modalItemInfo: [{
@@ -9839,6 +9969,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
9839
9969
  }]
9840
9970
  }], ctorParameters: () => [{ type: ConfigService }, { type: i1$1.HttpClient }, { type: UtilityService }, { type: i1$2.Platform }, { type: MobileOidcService }] });
9841
9971
 
9972
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20
9973
+ // - change: the start language comes from the app (startLanguages, in order: in the Designer's preview
9974
+ // the project's main language; otherwise the device language, then the main language) and is the
9975
+ // first one the project HAS - before, it was the device language if German, else always English,
9976
+ // also for a project without English (dev_urlaub: English dates and messages, "en.json not found").
9977
+ // English is the last resort. A language the user chose in the menu is kept
9842
9978
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
9843
9979
  // - fix: the web app loads the language file at start too (browser language, de or en), like the
9844
9980
  // phone; it showed the layout's raw texts until a language was chosen in the menu (#166)
@@ -9910,6 +10046,10 @@ class SideMenuComponent {
9910
10046
  environment;
9911
10047
  projectSeleted;
9912
10048
  appVersionInfo;
10049
+ /** Languages to start in, best first (language codes "de", "en" ...); the first the project has wins. */
10050
+ startLanguages = [];
10051
+ /** Set once the user picks a language in the menu - the start language then no longer applies. */
10052
+ languageChosenByUser = false;
9913
10053
  languageChange = new EventEmitter();
9914
10054
  invokeMenu = new EventEmitter();
9915
10055
  menuToggle = new EventEmitter();
@@ -10075,6 +10215,10 @@ class SideMenuComponent {
10075
10215
  }
10076
10216
  }
10077
10217
  ngOnChanges(changes) {
10218
+ // the main language arrives with the settings, after the first start - take it then
10219
+ if (changes['startLanguages'] && !changes['startLanguages'].firstChange && !this.languageChosenByUser) {
10220
+ void this.applyStartLanguage();
10221
+ }
10078
10222
  if (changes['environment'] ||
10079
10223
  changes['userInfo'] ||
10080
10224
  changes['projectSeleted']) {
@@ -10122,13 +10266,29 @@ class SideMenuComponent {
10122
10266
  // the project's texts in the device's (web: the browser's) language right from the start, on the
10123
10267
  // web as on the phone - before, the web showed the layout's raw texts until a language was
10124
10268
  // chosen in the menu (#166)
10269
+ await this.applyStartLanguage();
10270
+ }
10271
+ /**
10272
+ * The first language of startLanguages the project has a file for - without startLanguages the
10273
+ * device language - and English as the last resort.
10274
+ */
10275
+ async applyStartLanguage() {
10125
10276
  try {
10126
- const deviceLanguage = await this.getDeviceLanguage();
10127
- const supportedLanguage = deviceLanguage === 'de' ? 'de' : 'en';
10128
- await this.changeLanguage(`${supportedLanguage}.json`);
10277
+ const wanted = this.startLanguages?.length
10278
+ ? this.startLanguages
10279
+ : [await this.getDeviceLanguage()];
10280
+ const candidates = [...new Set([...wanted, 'en']
10281
+ .map((code) => String(code || '').slice(0, 2).toLowerCase())
10282
+ .filter(Boolean))];
10283
+ for (const code of candidates) {
10284
+ if (this.languageChosenByUser)
10285
+ return;
10286
+ if (await this.changeLanguage(`${code}.json`))
10287
+ return;
10288
+ }
10129
10289
  }
10130
10290
  catch (error) {
10131
- console.error('Failed to load device language:', error);
10291
+ console.error('Failed to load the start language:', error);
10132
10292
  }
10133
10293
  }
10134
10294
  ngOnDestroy() {
@@ -10528,6 +10688,7 @@ class SideMenuComponent {
10528
10688
  if (this.mobileMode && !this.isCollapsed) {
10529
10689
  this.toggleCollapsed();
10530
10690
  }
10691
+ this.languageChosenByUser = true;
10531
10692
  await this.changeLanguage(option.data_url);
10532
10693
  return;
10533
10694
  }
@@ -10587,11 +10748,12 @@ class SideMenuComponent {
10587
10748
  navigateToProject(project) {
10588
10749
  this.invokeProject.emit(project);
10589
10750
  }
10751
+ /** Loads a language of the project; false when the project has no such language file. */
10590
10752
  async changeLanguage(lang) {
10591
10753
  if (!lang ||
10592
10754
  !this.tenantName ||
10593
10755
  !this.projectSeleted) {
10594
- return;
10756
+ return false;
10595
10757
  }
10596
10758
  try {
10597
10759
  if (lang === 'de.json') {
@@ -10610,7 +10772,7 @@ class SideMenuComponent {
10610
10772
  if (!selectedLanguage ||
10611
10773
  typeof selectedLanguage !== 'object') {
10612
10774
  console.warn(`Language file "${lang}" was not found.`);
10613
- return;
10775
+ return false;
10614
10776
  }
10615
10777
  this.languageChange.emit({
10616
10778
  selectedLanguage,
@@ -10623,9 +10785,11 @@ class SideMenuComponent {
10623
10785
  this.lastMenuTranslations = selectedLanguage;
10624
10786
  this.applyMenuTranslations(selectedLanguage);
10625
10787
  this.applySettingTranslations(selectedLanguage);
10788
+ return true;
10626
10789
  }
10627
10790
  catch (error) {
10628
10791
  console.error(`Failed to change language to "${lang}":`, error);
10792
+ return false;
10629
10793
  }
10630
10794
  }
10631
10795
  applyMenuTranslations(selectedLanguage) {
@@ -10682,7 +10846,7 @@ class SideMenuComponent {
10682
10846
  });
10683
10847
  }
10684
10848
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: SideMenuComponent, deps: [{ token: i1$5.NzI18nService }, { token: MobileKeycloakService }, { token: Couchdb }, { token: i7.OAuthService }, { token: i1$2.Platform }, { token: RequestService }, { token: UtilityService }, { token: i1$4.DialogService }, { token: NotificationService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
10685
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo" }, outputs: { languageChange: "languageChange", invokeMenu: "invokeMenu", menuToggle: "menuToggle", invokeProject: "invokeProject", errorMessage: "errorMessage", deleteProject: "deleteProject", paginationType: "paginationType" }, host: { listeners: { "window:resize": "onResizeMobileMode()", "document:click": "onDocumentClick($event)" }, properties: { "class.sidemenu-mobile": "this.mobileMode" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
10849
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo", startLanguages: "startLanguages" }, outputs: { languageChange: "languageChange", invokeMenu: "invokeMenu", menuToggle: "menuToggle", invokeProject: "invokeProject", errorMessage: "errorMessage", deleteProject: "deleteProject", paginationType: "paginationType" }, host: { listeners: { "window:resize": "onResizeMobileMode()", "document:click": "onDocumentClick($event)" }, properties: { "class.sidemenu-mobile": "this.mobileMode" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20\r\n - new: a fourth footer row \"App\" with the export of the app (appVersionInfo.appRelease, issue #57) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n <!-- the app's own export (issue #57): \"Export 2 \u00B7 41908dd \u00B7 20.10.2026\", only when it has one -->\r\n @if (appVersionInfo.appRelease) {\r\n <div class=\"app-version-footer__item app-version-footer__release\" [title]=\"appVersionInfo.appRelease\">\r\n <span class=\"app-version-footer__label\">App</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appRelease }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-version-footer__release{grid-column:1 / -1}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
10686
10850
  // NG-ZORRO
10687
10851
  NzMenuModule }, { kind: "directive", type: i11$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i11$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i11$1.NzSubMenuComponent, selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzTriggerSubMenuAction", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i13$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type:
10688
10852
  // PrimeNG
@@ -10700,7 +10864,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
10700
10864
  NzButtonModule,
10701
10865
  // PrimeNG
10702
10866
  DynamicDialogModule
10703
- ], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"] }]
10867
+ ], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20\r\n - new: a fourth footer row \"App\" with the export of the app (appVersionInfo.appRelease, issue #57) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n <!-- the app's own export (issue #57): \"Export 2 \u00B7 41908dd \u00B7 20.10.2026\", only when it has one -->\r\n @if (appVersionInfo.appRelease) {\r\n <div class=\"app-version-footer__item app-version-footer__release\" [title]=\"appVersionInfo.appRelease\">\r\n <span class=\"app-version-footer__label\">App</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appRelease }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-version-footer__release{grid-column:1 / -1}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"] }]
10704
10868
  }], ctorParameters: () => [{ type: i1$5.NzI18nService }, { type: MobileKeycloakService }, { type: Couchdb }, { type: i7.OAuthService }, { type: i1$2.Platform }, { type: RequestService }, { type: UtilityService }, { type: i1$4.DialogService }, { type: NotificationService }, { type: i0.Injector }], propDecorators: { menuItems: [{
10705
10869
  type: Input
10706
10870
  }], userInfo: [{
@@ -10717,6 +10881,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
10717
10881
  type: Input
10718
10882
  }], appVersionInfo: [{
10719
10883
  type: Input
10884
+ }], startLanguages: [{
10885
+ type: Input
10720
10886
  }], languageChange: [{
10721
10887
  type: Output
10722
10888
  }], invokeMenu: [{
@@ -11143,6 +11309,363 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
11143
11309
  args: [{ selector: 'vl-custom-keyboard', standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: an AM/PM key on the keyboard of a 12-hour time field (#166 step 4.9) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: a new-line key on the text keyboard of a multi-line field (textArea, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n\r\n @if (multiLine) {\r\n <!-- new line: only in a multi-line field (textArea), #166 step 4.4 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__newline\"\r\n aria-label=\"New line\" title=\"New line\" (click)=\"enterNewLine()\">\r\n <i class=\"pi pi-arrow-down-left\"></i>\r\n </button>\r\n }\r\n }\r\n\r\n @if (session.type === 'time' && keyboard.twelveHours(session.target)) {\r\n <!-- AM/PM: a time field typed with 12 hours (English), #166 step 4.9 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__meridiem\"\r\n aria-label=\"AM or PM\" title=\"AM/PM\" (click)=\"keyboard.toggleMeridiem()\">AM/PM</button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n </div>\r\n</section>\r\n}\r\n", styles: [":host{display:contents}.custom-keyboard{position:fixed;right:0;bottom:0;left:0;z-index:200000;display:block;width:100%;max-height:min(52dvh,390px);padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff));box-shadow:0 -6px 20px #0f172a38;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}.custom-keyboard__row{display:flex;justify-content:center;gap:4px;width:100%;margin-bottom:6px}.custom-keyboard__key{display:flex;flex:1 1 0;width:auto;max-width:52px;min-width:0;height:42px;align-items:center;justify-content:center;padding:0;color:#111827;font-size:16px;font-weight:700;line-height:1;background:#fff;border:1px solid #d1d5db;border-radius:5px;box-shadow:0 1px 2px #0f172a47;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__key:active{background:#e6f4ff;transform:scale(.96)}.custom-keyboard--numeric .custom-keyboard__key{max-width:92px;height:46px;font-size:18px}.custom-keyboard__actions{display:grid;grid-template-columns:46px minmax(90px,1fr) 46px 54px;gap:6px;width:100%;margin-top:4px;padding:0 4px}.custom-keyboard__actions--compact{grid-template-columns:minmax(52px,1fr) minmax(52px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:46px 54px minmax(70px,1fr) 46px 54px}.custom-keyboard__action-button{display:flex;width:100%;min-width:0;height:42px;align-items:center;justify-content:center;padding:0 8px;color:#172033;font-size:15px;font-weight:700;line-height:1;border:0;border-radius:6px;box-shadow:0 1px 2px #0f172a40;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__action-button i{font-size:17px;line-height:1;pointer-events:none}.custom-keyboard__action-button:active{transform:scale(.96)}.custom-keyboard__shift{color:#172033;background:#aeb6c2}.custom-keyboard__shift.active{color:#fff;background:#64748b}.custom-keyboard__space{color:#172033;background:#fff}.custom-keyboard__delete{color:#172033;background:#aeb6c2}.custom-keyboard__done{color:#fff;background:#1890ff}.custom-keyboard__page{color:#172033;font-size:14px;background:#aeb6c2}.custom-keyboard__shift:disabled{opacity:.45}.custom-keyboard__key:focus-visible,.custom-keyboard__action-button:focus-visible{outline:3px solid rgba(24,144,255,.35);outline-offset:1px}@media(max-height:650px){.custom-keyboard{max-height:58dvh;padding-top:6px}.custom-keyboard__row{gap:3px;margin-bottom:4px}.custom-keyboard__key{height:35px;font-size:14px}.custom-keyboard--numeric .custom-keyboard__key{height:38px;font-size:16px}.custom-keyboard__action-button{height:36px}}@media(max-width:360px){.custom-keyboard{padding-right:4px;padding-left:4px}.custom-keyboard__row{gap:3px}.custom-keyboard__key{font-size:14px}.custom-keyboard__actions{grid-template-columns:42px minmax(70px,1fr) 42px 48px;gap:4px;padding-right:2px;padding-left:2px}.custom-keyboard__actions--compact{grid-template-columns:minmax(48px,1fr) minmax(48px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:40px 48px minmax(56px,1fr) 40px 46px}}.custom-keyboard--opening .custom-keyboard__key,.custom-keyboard--opening .custom-keyboard__action-button{pointer-events:none}.custom-keyboard--opening{cursor:default}::ng-deep .p-overlay:has(.p-autocomplete-overlay),::ng-deep .p-overlay:has(.p-select-overlay){width:0!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-option,::ng-deep .p-select-overlay .p-select-option{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-list-container,::ng-deep .p-select-overlay .p-select-list-container{overflow-x:hidden!important}::ng-deep .vl-option-full-text{position:fixed;z-index:2147483000;transform:translateY(-100%);padding:8px 10px;border-radius:8px;background:#1f2328;color:#fff;font-size:14px;line-height:1.4;box-shadow:0 6px 18px #1f232840;pointer-events:none;white-space:normal}::ng-deep .p-datepicker-panel.model-datepicker-panel--docked,::ng-deep .model-datepicker-panel--docked{position:fixed!important;background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff))!important;inset:auto 0 0!important;width:100%!important;min-width:100%!important;max-width:100%!important;max-height:min(52dvh,420px)!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overflow-y:auto!important;transform:none!important;border-radius:12px 12px 0 0!important;box-shadow:0 -6px 20px #0f172a38!important;box-sizing:border-box!important}::ng-deep .model-timepicker-panel.p-datepicker-panel:not(.model-datepicker-panel--docked){width:auto!important;min-width:0!important;padding:4px 8px!important;border-radius:8px!important}::ng-deep .model-timepicker-panel .p-datepicker-time-picker{gap:4px!important;padding:0!important;border:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker{gap:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker span,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker span,::ng-deep .model-timepicker-panel .p-datepicker-separator{font-size:1rem!important;line-height:1.2!important}::ng-deep .model-timepicker-panel .p-datepicker-increment-button,::ng-deep .model-timepicker-panel .p-datepicker-decrement-button{width:2rem!important;height:1.75rem!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked{inset:0 0 0 auto!important;width:var(--vl-side-dock-width, 50vw)!important;min-width:0!important;max-width:var(--vl-side-dock-width, 50vw)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-top:env(safe-area-inset-top,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;border-left:1px solid #e5e7eb!important;box-shadow:-6px 0 20px #0f172a2e!important}.custom-keyboard__key{height:clamp(26px,5.2dvh,42px)}.custom-keyboard--numeric .custom-keyboard__key{height:clamp(28px,5.6dvh,46px)}.custom-keyboard__action-button{height:clamp(28px,5.2dvh,42px)}.custom-keyboard__row{margin-bottom:clamp(3px,.8dvh,6px)}::ng-deep body.vl-side-dock .custom-keyboard{inset:0 0 0 auto;width:var(--vl-side-dock-width, 50vw);max-height:none;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start;padding-top:env(safe-area-inset-top,0px);padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:-6px 0 20px #0f172a2e}.custom-keyboard,::ng-deep .model-datepicker-panel--docked{border-top-left-radius:var(--p-dialog-border-radius, 12px)!important;border-top-right-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden}::ng-deep .model-datepicker-panel--docked .p-datepicker-header{padding-top:clamp(2px,.6dvh,8px)!important;padding-bottom:clamp(2px,.6dvh,8px)!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day-cell,::ng-deep .model-datepicker-panel--docked .p-datepicker-weekday-cell{padding:1px!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day{width:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important;height:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked,::ng-deep body.vl-side-dock .custom-keyboard{top:var(--vl-side-dock-top, max(8px, env(safe-area-inset-top, 0px)))!important;bottom:var(--vl-side-dock-bottom, max(8px, env(safe-area-inset-bottom, 0px)))!important;right:max(8px,env(safe-area-inset-right,0px))!important;left:auto!important;width:calc(var(--vl-side-dock-width, 50vw) - max(8px,env(safe-area-inset-right,0px)))!important;max-width:none!important;height:auto!important;max-height:none!important;padding-top:6px!important;padding-right:6px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body.vl-custom-keyboard-open .custom-keyboard,::ng-deep body.vl-custom-keyboard-open .model-datepicker-panel--docked{left:var(--vl-dock-left, 0px)!important;right:var(--vl-dock-right, 0px)!important;width:auto!important;min-width:0!important;max-width:none!important;bottom:var(--vl-dock-bottom-gap)!important;padding-bottom:8px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body{--vl-dock-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px))}::ng-deep .vl-field-active,::ng-deep .picker-field--active input{border-color:var(--modal-field-focus-color, var(--p-primary-color, #10b981))!important;box-shadow:0 0 0 .2rem color-mix(in srgb,var(--modal-field-focus-color, var(--p-primary-color, #10b981)) 30%,transparent)!important;outline:none!important}\n"] }]
11144
11310
  }], ctorParameters: () => [] });
11145
11311
 
11312
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
11313
+ // - new: RecordStore - reads, writes and deletes the records of a page's data source. Card and app
11314
+ // no longer write browser storage themselves; the card deleted into the fixed key "timeRecords"
11315
+ // whatever the page's data_url was (Urlaub: "antrag"). New kinds (database, roles) come here
11316
+ // later, without touching card, grid or dialog (#166, A1)
11317
+ class RecordStore {
11318
+ utilityService;
11319
+ constructor(utilityService) {
11320
+ this.utilityService = utilityService;
11321
+ }
11322
+ /** The records of the source; an empty list when it has none or is not kept in the browser. */
11323
+ async read(source) {
11324
+ const key = source?.data_url;
11325
+ if (!key)
11326
+ return [];
11327
+ switch (storageKind(source)) {
11328
+ case 'localstorage':
11329
+ return parseRecords(await this.utilityService.getLocalStorage(key));
11330
+ case 'sessionstorage':
11331
+ return parseRecords(await this.utilityService.getStorage(key));
11332
+ default:
11333
+ return [];
11334
+ }
11335
+ }
11336
+ /**
11337
+ * Stores the records as a plain JSON list, dates as local ISO text. False when the source is not
11338
+ * kept in the browser (a backend source is written by its own call).
11339
+ */
11340
+ async write(source, records) {
11341
+ const key = source?.data_url;
11342
+ if (!key)
11343
+ return false;
11344
+ const list = (Array.isArray(records) ? records : []).map(record => record && typeof record === 'object' ? this.utilityService.normalizeDatesForStorage(record) : record);
11345
+ switch (storageKind(source)) {
11346
+ case 'localstorage':
11347
+ await this.utilityService.setLocalStorage(key, list);
11348
+ return true;
11349
+ case 'sessionstorage':
11350
+ await this.utilityService.setStorage(key, JSON.stringify(list));
11351
+ return true;
11352
+ default:
11353
+ return false;
11354
+ }
11355
+ }
11356
+ /** Removes the record at index from the stored list. */
11357
+ async remove(source, index) {
11358
+ const records = await this.read(source);
11359
+ if (index < 0 || index >= records.length)
11360
+ return false;
11361
+ records.splice(index, 1);
11362
+ return this.write(source, records);
11363
+ }
11364
+ /** Empties the stored list. */
11365
+ async clear(source) {
11366
+ return this.write(source, []);
11367
+ }
11368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: RecordStore, deps: [{ token: UtilityService }], target: i0.ɵɵFactoryTarget.Injectable });
11369
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: RecordStore, providedIn: 'root' });
11370
+ }
11371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: RecordStore, decorators: [{
11372
+ type: Injectable,
11373
+ args: [{ providedIn: 'root' }]
11374
+ }], ctorParameters: () => [{ type: UtilityService }] });
11375
+
11376
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
11377
+ // - new: BackendCallService - sends a backend call a page describes (backend-call.ts): the user's
11378
+ // token when the option says passToken, on the devices directly, in the web through the app's own
11379
+ // origin (backendUrl), under the waiting rule of every request. saveData / loadData replace the
11380
+ // fixed P5 time-recording calls of card and request service (A2)
11381
+ const TRANSFORMS = {
11382
+ dailyLogs: (records, utility) => records.flatMap(record => utility.convertToDailyLogs(record) || []),
11383
+ };
11384
+ class BackendCallService {
11385
+ remoteLists = inject(RemoteListService);
11386
+ utilityService = inject(UtilityService);
11387
+ oauthService = inject(OAuthService, { optional: true });
11388
+ /** The signed-in user (claims + token): from the app, else the stored sign-in. */
11389
+ async currentUser() {
11390
+ const known = this.remoteLists.user();
11391
+ if (known)
11392
+ return known;
11393
+ return isNativeMobile()
11394
+ ? await this.utilityService.getLocalStorage('KeycloakInfo')
11395
+ : await this.utilityService.getLocalStorage('loginedUser');
11396
+ }
11397
+ /** The records after the option's named conversion; unknown names change nothing. */
11398
+ transform(option, records) {
11399
+ const convert = option?.transform ? TRANSFORMS[option.transform] : undefined;
11400
+ return convert ? convert(records, this.utilityService) : records;
11401
+ }
11402
+ /** Sends the records to the option's backend; true on success. */
11403
+ async saveData(option, records, extra = {}) {
11404
+ const userInfo = await this.currentUser();
11405
+ const call = buildBackendCall(option, { ...extra, userInfo, records: this.transform(option, records) });
11406
+ if (!call)
11407
+ throw new Error('The button has no backend address (data_url).');
11408
+ return this.send(call, option, userInfo);
11409
+ }
11410
+ /** Loads from the option's backend with the given context (e.g. filter values). */
11411
+ async loadData(option, extra = {}) {
11412
+ const userInfo = await this.currentUser();
11413
+ const call = buildBackendCall(option, { ...extra, userInfo });
11414
+ if (!call)
11415
+ return [];
11416
+ return this.send(call, option, userInfo);
11417
+ }
11418
+ /** Sends a call; the answer's data, an error from status 400 on. */
11419
+ async send(call, option, userInfo) {
11420
+ const headers = { Accept: 'application/json', 'Content-Type': 'application/json' };
11421
+ if (option?.passToken) {
11422
+ const token = userInfo?.token || this.oauthService?.getAccessToken();
11423
+ if (token)
11424
+ headers['Authorization'] = `Bearer ${token}`;
11425
+ }
11426
+ const hasBody = call.method !== 'GET' && call.method !== 'DELETE';
11427
+ const response = await stagedRequest(() => CapacitorHttp.request({
11428
+ url: backendUrl(call.url),
11429
+ method: call.method,
11430
+ params: call.params,
11431
+ headers,
11432
+ ...(hasBody ? { data: call.body } : {}),
11433
+ }));
11434
+ if (response.status >= 400) {
11435
+ throw new Error(`${call.method} ${call.url} failed: ${response.status}`);
11436
+ }
11437
+ return response.data;
11438
+ }
11439
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: BackendCallService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11440
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: BackendCallService, providedIn: 'root' });
11441
+ }
11442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: BackendCallService, decorators: [{
11443
+ type: Injectable,
11444
+ args: [{ providedIn: 'root' }]
11445
+ }] });
11446
+
11447
+ // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
11448
+ // - new: PageData - the records of one open page and everything done with them, in one place for
11449
+ // every container (A4, variant c). Card and grid only draw `visible` and call the actions:
11450
+ // load() browser list | backend | filter page (starts empty); useRecords(list)
11451
+ // takes records the app loaded itself
11452
+ // setFilter(values) loads once every filter field has a value ({{filter.<field>}})
11453
+ // goTo(page), setPageSize(n)
11454
+ // saveRecord(record, i?) from a dialog or form: append, or replace record i
11455
+ // remove(i, button) asks first (confirmDelete: false skips), browser list or backend DELETE
11456
+ // send(button, i|'all') save / save all to the backend the button describes, then afterSuccess
11457
+ // An index always means the position in all records, not on the current page.
11458
+ // No Angular here: storage, backend, question and message come in as PageDataDeps, so it is tested
11459
+ // with node --test (page-data.spec.mjs)
11460
+ class PageData {
11461
+ records = [];
11462
+ visible = [];
11463
+ page = 0;
11464
+ pageSize;
11465
+ pageCount = 0;
11466
+ totalItems = 0;
11467
+ loading = false;
11468
+ filter = {};
11469
+ /** Called after every change of the state above - the container redraws. */
11470
+ onChange = () => { };
11471
+ source;
11472
+ deps;
11473
+ constructor(source, deps, pageSize = 5) {
11474
+ this.source = source;
11475
+ this.deps = deps;
11476
+ this.pageSize = pageSize > 0 ? pageSize : 5;
11477
+ }
11478
+ /** Browser list and filter page: all records are here and paged in the app; a backend pages itself. */
11479
+ get clientPaging() {
11480
+ const kind = storageKind(this.source);
11481
+ return kind === 'localstorage' || kind === 'sessionstorage' || kind === 'filter';
11482
+ }
11483
+ async load() {
11484
+ const kind = storageKind(this.source);
11485
+ if (kind === 'filter') {
11486
+ return this.filterComplete() ? this.loadBackendRecords() : this.setRecords([]);
11487
+ }
11488
+ if (isBrowserSource(this.source)) {
11489
+ const records = await this.deps.readRecords(this.source);
11490
+ return this.setRecords(this.deps.restoreDates ? this.deps.restoreDates(records) : records);
11491
+ }
11492
+ if (String(this.source?.data_url ?? '').trim()) {
11493
+ return this.loadBackendRecords();
11494
+ }
11495
+ this.setRecords([]);
11496
+ }
11497
+ /** Records the app loaded itself (a backend page with images, its own paging). */
11498
+ useRecords(records) {
11499
+ this.setRecords(records);
11500
+ }
11501
+ async setFilter(values) {
11502
+ this.filter = { ...this.filter, ...values };
11503
+ if (this.filterComplete()) {
11504
+ this.page = 0;
11505
+ await this.loadBackendRecords();
11506
+ }
11507
+ }
11508
+ async goTo(page) {
11509
+ const last = Math.max(this.pageCount - 1, 0);
11510
+ this.page = Math.min(Math.max(page, 0), last);
11511
+ if (this.clientPaging) {
11512
+ this.slice();
11513
+ }
11514
+ else {
11515
+ await this.loadBackendRecords();
11516
+ }
11517
+ }
11518
+ async setPageSize(size) {
11519
+ this.pageSize = size > 0 ? size : this.pageSize;
11520
+ this.page = 0;
11521
+ if (this.clientPaging) {
11522
+ this.slice();
11523
+ }
11524
+ else {
11525
+ await this.loadBackendRecords();
11526
+ }
11527
+ }
11528
+ /** A record from a dialog or form: replaces record index, else is appended (and its page shown). */
11529
+ async saveRecord(record, index) {
11530
+ const replace = index != null && index > -1 && index < this.records.length;
11531
+ const records = [...this.records];
11532
+ if (replace)
11533
+ records[index] = record;
11534
+ else
11535
+ records.push(record);
11536
+ if (isBrowserSource(this.source) && !(await this.deps.writeRecords(this.source, records))) {
11537
+ return false;
11538
+ }
11539
+ this.records = records;
11540
+ if (!replace)
11541
+ this.page = Math.max(Math.ceil(records.length / this.pageSize) - 1, 0);
11542
+ this.slice();
11543
+ return true;
11544
+ }
11545
+ /** Deletes record index after the question; browser list, or the button's backend (then reloads). */
11546
+ async remove(index, button = {}) {
11547
+ if (index < 0 || index >= this.records.length)
11548
+ return false;
11549
+ const option = button?.option ?? button;
11550
+ if (option?.confirmDelete !== false && !(await this.deps.confirmDelete(option)))
11551
+ return false;
11552
+ try {
11553
+ if (isBrowserSource(this.source)) {
11554
+ return await this.removeLocal([index]);
11555
+ }
11556
+ const record = this.records[index];
11557
+ await this.deps.sendBackend({ method: 'DELETE', ...option, data_url: this.legacyUrl(option, record) }, [record], { record });
11558
+ await this.load();
11559
+ return true;
11560
+ }
11561
+ catch (error) {
11562
+ this.deps.failed('deleteFailed', error);
11563
+ return false;
11564
+ }
11565
+ }
11566
+ /** Sends one record (index) or all ('all') to the backend the button describes; afterSuccess removeLocal. */
11567
+ async send(button, index) {
11568
+ const option = button?.option ?? button;
11569
+ const indexes = index === 'all' ? this.records.map((_, i) => i) : [index];
11570
+ const records = indexes.map(i => this.records[i]).filter(r => r !== undefined);
11571
+ if (!records.length)
11572
+ return false;
11573
+ this.setLoading(true);
11574
+ try {
11575
+ await this.deps.sendBackend(option, records, { record: records[0] });
11576
+ if (option?.afterSuccess === 'removeLocal')
11577
+ await this.removeLocal(indexes);
11578
+ return true;
11579
+ }
11580
+ catch (error) {
11581
+ this.deps.failed('saveFailed', error);
11582
+ return false;
11583
+ }
11584
+ finally {
11585
+ this.setLoading(false);
11586
+ }
11587
+ }
11588
+ // ---- inside ----
11589
+ /** Filter fields are the keys set by setFilter; a filter page loads only when none is empty. */
11590
+ filterComplete() {
11591
+ const values = Object.values(this.filter);
11592
+ return values.length > 0 && values.every(v => v != null && v !== '');
11593
+ }
11594
+ async loadBackendRecords() {
11595
+ this.setLoading(true);
11596
+ try {
11597
+ const filter = {};
11598
+ for (const [key, value] of Object.entries(this.filter))
11599
+ filter[key] = this.filterValue(value);
11600
+ const data = await this.deps.loadBackend(this.source, { filter, pageNumber: this.page, pageSize: this.pageSize });
11601
+ const records = Array.isArray(data) ? data
11602
+ : Array.isArray(data?.[this.source?.['dataKey']]) ? data[this.source['dataKey']]
11603
+ : Array.isArray(data?.content) ? data.content : [];
11604
+ if (this.clientPaging) {
11605
+ this.setRecords(this.deps.restoreDates ? this.deps.restoreDates(records) : records);
11606
+ }
11607
+ else {
11608
+ this.records = records;
11609
+ this.visible = records;
11610
+ this.totalItems = Number(data?.totalElements ?? data?.page?.totalElements ?? records.length);
11611
+ this.pageCount = Number(data?.totalPages ?? data?.page?.totalPages ?? Math.ceil(this.totalItems / this.pageSize)) || 0;
11612
+ }
11613
+ }
11614
+ catch (error) {
11615
+ this.deps.failed('loadFailed', error);
11616
+ this.setRecords([]);
11617
+ }
11618
+ finally {
11619
+ this.setLoading(false);
11620
+ }
11621
+ }
11622
+ /** A filter date goes on as a Date - the call writes it by the page's dateFormat. */
11623
+ filterValue(value) {
11624
+ const date = value instanceof Date ? value
11625
+ : typeof value === 'string' && /^\d{4}-\d{2}-\d{2}/.test(value) ? new Date(value) : null;
11626
+ return date && !isNaN(date.getTime()) ? date : value;
11627
+ }
11628
+ async removeLocal(indexes) {
11629
+ const drop = new Set(indexes);
11630
+ const records = this.records.filter((_, i) => !drop.has(i));
11631
+ if (isBrowserSource(this.source) && !(await this.deps.writeRecords(this.source, records))) {
11632
+ return false;
11633
+ }
11634
+ this.records = records;
11635
+ this.slice();
11636
+ return true;
11637
+ }
11638
+ /** The old delete address "orders/{{id}}" took record[button.key] for any placeholder. */
11639
+ legacyUrl(option, record) {
11640
+ const url = String(option?.data_url ?? '');
11641
+ if (!option?.key || /{{\s*(record|userInfo|filter|env)\./.test(url))
11642
+ return url;
11643
+ return url.replace(/{{(.*?)}}/g, () => String(record?.[option.key] ?? ''));
11644
+ }
11645
+ setRecords(records) {
11646
+ this.records = Array.isArray(records) ? records : [];
11647
+ this.slice();
11648
+ }
11649
+ /** Browser list and filter page: the current page out of all records; a backend page is shown as it came. */
11650
+ slice() {
11651
+ if (this.clientPaging) {
11652
+ this.totalItems = this.records.length;
11653
+ this.pageCount = Math.ceil(this.totalItems / this.pageSize);
11654
+ this.page = Math.min(this.page, Math.max(this.pageCount - 1, 0));
11655
+ const start = this.page * this.pageSize;
11656
+ this.visible = this.records.slice(start, start + this.pageSize);
11657
+ }
11658
+ else {
11659
+ this.visible = this.records;
11660
+ }
11661
+ this.onChange();
11662
+ }
11663
+ setLoading(loading) {
11664
+ this.loading = loading;
11665
+ this.onChange();
11666
+ }
11667
+ }
11668
+
11146
11669
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
11147
11670
  // - new: exports MediaSourcePipe (vlMedia, #145)
11148
11671
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14
@@ -11159,5 +11682,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
11159
11682
  * Generated bundle index. Do not edit.
11160
11683
  */
11161
11684
 
11162
- export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, SideMenuComponent, SwitchControl, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, backendUrl, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, inputFormatHint, isNativeMobile, isNativePhone, languageDatePattern, layoutPlaceholder, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, primeDatePattern, resolveCustomKeyboardType, resolvePlaceholder, ruleMessage, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storedToTyped, styleParts, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
11685
+ export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DEFAULT_DATE_FORMAT, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SideMenuComponent, SwitchControl, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, backendUrl, buildBackendCall, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, languageDatePattern, layoutPlaceholder, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, recordOf, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
11163
11686
  //# sourceMappingURL=yomotech-view-toolkit.mjs.map