@yomotech/view-toolkit 1.0.44 → 1.0.46
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.
- package/fesm2022/yomotech-view-toolkit-catalog.mjs +117 -4
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +752 -348
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +45 -5
- package/types/yomotech-view-toolkit.d.ts +150 -46
|
@@ -290,6 +290,9 @@ function toggleMeridiem(text) {
|
|
|
290
290
|
return time ? `${time} ${now === 'PM' ? 'AM' : 'PM'}` : time;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
294
|
+
// - fix: testWrites - a submit to a backend address writes (Purchase was marked as not writing)
|
|
295
|
+
// - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
|
|
293
296
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
294
297
|
// - change: a data object holds names and types only - the label is the layout's caption, else the property's name
|
|
295
298
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
@@ -462,6 +465,18 @@ function fieldInnerLayoutStyle(formField, container = 'dialog') {
|
|
|
462
465
|
function testFieldKey(field) {
|
|
463
466
|
return splitReference(field?.scope?.reference).name || null;
|
|
464
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* The field's DTO name and its key, the way tests name it: "#/shipping/properties/street" -> "shipping.street",
|
|
470
|
+
* nested "#/order/properties/address/properties/city" -> "order.address.city". data-vl-path.
|
|
471
|
+
*/
|
|
472
|
+
function testFieldPath(field) {
|
|
473
|
+
const text = String(field?.scope?.reference ?? '');
|
|
474
|
+
const start = text.indexOf('#/');
|
|
475
|
+
if (start < 0)
|
|
476
|
+
return null;
|
|
477
|
+
const parts = text.substring(start + 2).split('/').filter((p) => p && p !== 'properties' && p !== 'items');
|
|
478
|
+
return parts.length > 1 ? parts.join('.') : null;
|
|
479
|
+
}
|
|
465
480
|
function testAction(option) {
|
|
466
481
|
return option?.action || option?.innerAction || null;
|
|
467
482
|
}
|
|
@@ -471,12 +486,88 @@ function testAction(option) {
|
|
|
471
486
|
* unless the flow says "books": true and a person confirmed it (data-vl-writes).
|
|
472
487
|
*/
|
|
473
488
|
function testWrites(option) {
|
|
489
|
+
const toBackend = !!String(option?.data_url ?? '').trim()
|
|
490
|
+
&& !['localstorage', 'sessionstorage', 'filter'].includes(String(option?.storageType ?? '').toLowerCase());
|
|
474
491
|
const writes = option?.storageType === 'database'
|
|
475
492
|
|| ['save', 'delete'].includes(option?.action)
|
|
476
|
-
|| ['saveAll'].includes(option?.innerAction)
|
|
493
|
+
|| ['saveAll'].includes(option?.innerAction)
|
|
494
|
+
// a submit that sends to the backend (luv2shop's Purchase: innerAction submit, data_url checkout/purchase)
|
|
495
|
+
|| ((option?.action === 'submit' || option?.innerAction === 'submit') && toBackend);
|
|
477
496
|
return writes ? 'true' : 'false';
|
|
478
497
|
}
|
|
479
498
|
|
|
499
|
+
// Shuaib 2026-10-20
|
|
500
|
+
// - new: controlKind - which building block draws a field of a layout, the one rule for every
|
|
501
|
+
// container instead of a switch in each; the same decision as the Designer's modal canvas
|
|
502
|
+
// (canvasControl), so the app draws a field as the Designer shows it. styleParts - a layout style
|
|
503
|
+
// split into its classes (all of them) and its CSS. No Angular, tested with node --test (#166)
|
|
504
|
+
/** The property a field is bound to (scope.reference) in the page's property schema, or undefined. */
|
|
505
|
+
function controlProperty(field, propertySchema) {
|
|
506
|
+
const reference = field?.scope?.reference;
|
|
507
|
+
if (!reference)
|
|
508
|
+
return undefined;
|
|
509
|
+
const { scope, name } = splitReference(reference);
|
|
510
|
+
return propertySchema?.[scope]?.[name];
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* The building block of a field:
|
|
514
|
+
* - no scope.reference: a button (layout field without a property)
|
|
515
|
+
* - the property type decides media, credit card and the period (dateRange)
|
|
516
|
+
* - otherwise the control (option.control, or the field catalog's choice for the type)
|
|
517
|
+
*/
|
|
518
|
+
function controlKind(field, property) {
|
|
519
|
+
if (!field?.scope?.reference)
|
|
520
|
+
return 'button';
|
|
521
|
+
const type = String(property?.type || '').toLowerCase();
|
|
522
|
+
if (type === 'media' || type === 'image')
|
|
523
|
+
return 'media';
|
|
524
|
+
if (type === 'creditcard')
|
|
525
|
+
return 'creditCard';
|
|
526
|
+
if (type === 'daterange')
|
|
527
|
+
return 'daterange';
|
|
528
|
+
// older data objects naming the control as their type
|
|
529
|
+
if (type === 'autocomplete' && !field?.option?.control)
|
|
530
|
+
return 'autocomplete';
|
|
531
|
+
switch (effectiveControl(field?.option || {}, property || {})) {
|
|
532
|
+
case 'dateRangepicker': return 'daterange';
|
|
533
|
+
case 'datepicker': return 'date';
|
|
534
|
+
case 'timepicker': return 'time';
|
|
535
|
+
case 'dateTimepicker': return 'datetime';
|
|
536
|
+
case 'password': return 'password';
|
|
537
|
+
case 'textArea': return 'textarea';
|
|
538
|
+
case 'combobox': return 'combobox';
|
|
539
|
+
case 'autocomplete': return 'autocomplete';
|
|
540
|
+
case 'dropdown': return 'dropdown';
|
|
541
|
+
case 'radiobutton': return 'radio';
|
|
542
|
+
case 'checkbox': return 'checkbox';
|
|
543
|
+
case 'switch': return 'switch';
|
|
544
|
+
case 'spinner':
|
|
545
|
+
case 'slider':
|
|
546
|
+
case 'quantity': return 'number';
|
|
547
|
+
case 'creditCard': return 'creditCard';
|
|
548
|
+
}
|
|
549
|
+
// a date, time or date and time typed as text keeps its picker: the value is a date, not text
|
|
550
|
+
if (type === 'date')
|
|
551
|
+
return 'date';
|
|
552
|
+
if (type === 'time')
|
|
553
|
+
return 'time';
|
|
554
|
+
if (['datetime', 'date&time', 'date-time'].includes(type))
|
|
555
|
+
return 'datetime';
|
|
556
|
+
return ['number', 'integer', 'bigdecimal', 'decimal'].includes(type) ? 'number' : 'text';
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* A style object of the layout split into its classes and its CSS: { classes: ['a', 'b'], color }
|
|
560
|
+
* -> { classes: 'a b', style: { color } }. Every class counts, not only the first.
|
|
561
|
+
*/
|
|
562
|
+
function styleParts(styleObject) {
|
|
563
|
+
if (!styleObject || typeof styleObject !== 'object') {
|
|
564
|
+
return { classes: '', style: {} };
|
|
565
|
+
}
|
|
566
|
+
const { classes, ...style } = styleObject;
|
|
567
|
+
const list = Array.isArray(classes) ? classes : typeof classes === 'string' ? [classes] : [];
|
|
568
|
+
return { classes: list.filter((c) => typeof c === 'string' && c.trim()).join(' '), style };
|
|
569
|
+
}
|
|
570
|
+
|
|
480
571
|
// Shuaib 2026-10-26
|
|
481
572
|
// - new: the design mode of the containers (#166). The Designer draws a page with the same containers as the app
|
|
482
573
|
// (vl-form, vl-model, vl-card, vl-grid) and hands them [design]; the container then shows every element of the
|
|
@@ -1417,34 +1508,34 @@ class DesignBarComponent {
|
|
|
1417
1508
|
return ICONS[action];
|
|
1418
1509
|
}
|
|
1419
1510
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1420
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DesignBarComponent, isStandalone: true, selector: "vl-design-bar", inputs: { actions: "actions", titles: "titles" }, outputs: { act: "act" }, ngImport: i0, template: `
|
|
1421
|
-
@for (action of actions; track action) {
|
|
1422
|
-
@if (action === 'drag') {
|
|
1423
|
-
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1424
|
-
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1425
|
-
(click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
|
|
1426
|
-
} @else {
|
|
1427
|
-
<button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
|
|
1428
|
-
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1429
|
-
(mousedown)="$event.stopPropagation()"
|
|
1430
|
-
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1431
|
-
}
|
|
1511
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DesignBarComponent, isStandalone: true, selector: "vl-design-bar", inputs: { actions: "actions", titles: "titles" }, outputs: { act: "act" }, ngImport: i0, template: `
|
|
1512
|
+
@for (action of actions; track action) {
|
|
1513
|
+
@if (action === 'drag') {
|
|
1514
|
+
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1515
|
+
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1516
|
+
(click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
|
|
1517
|
+
} @else {
|
|
1518
|
+
<button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
|
|
1519
|
+
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1520
|
+
(mousedown)="$event.stopPropagation()"
|
|
1521
|
+
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1522
|
+
}
|
|
1432
1523
|
}`, isInline: true, styles: [":host{display:inline-flex;gap:4px;align-items:center}.vl-design-bar__btn{width:26px;height:26px;min-width:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:6px;background:#fff;color:#344054;font-size:12px;cursor:pointer;box-shadow:0 1px 2px #10182814}.vl-design-bar__btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}.vl-design-bar__btn--danger:hover{border-color:#dc2626;color:#dc2626;background:#fef2f2}.vl-design-bar__btn--drag{cursor:grab}.vl-design-bar__btn--drag:active{cursor:grabbing}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1433
1524
|
}
|
|
1434
1525
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, decorators: [{
|
|
1435
1526
|
type: Component,
|
|
1436
|
-
args: [{ selector: 'vl-design-bar', standalone: true, imports: [DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1437
|
-
@for (action of actions; track action) {
|
|
1438
|
-
@if (action === 'drag') {
|
|
1439
|
-
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1440
|
-
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1441
|
-
(click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
|
|
1442
|
-
} @else {
|
|
1443
|
-
<button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
|
|
1444
|
-
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1445
|
-
(mousedown)="$event.stopPropagation()"
|
|
1446
|
-
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1447
|
-
}
|
|
1527
|
+
args: [{ selector: 'vl-design-bar', standalone: true, imports: [DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1528
|
+
@for (action of actions; track action) {
|
|
1529
|
+
@if (action === 'drag') {
|
|
1530
|
+
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1531
|
+
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1532
|
+
(click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
|
|
1533
|
+
} @else {
|
|
1534
|
+
<button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
|
|
1535
|
+
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
1536
|
+
(mousedown)="$event.stopPropagation()"
|
|
1537
|
+
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1538
|
+
}
|
|
1448
1539
|
}`, styles: [":host{display:inline-flex;gap:4px;align-items:center}.vl-design-bar__btn{width:26px;height:26px;min-width:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:6px;background:#fff;color:#344054;font-size:12px;cursor:pointer;box-shadow:0 1px 2px #10182814}.vl-design-bar__btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}.vl-design-bar__btn--danger:hover{border-color:#dc2626;color:#dc2626;background:#fef2f2}.vl-design-bar__btn--drag{cursor:grab}.vl-design-bar__btn--drag:active{cursor:grabbing}\n"] }]
|
|
1449
1540
|
}], propDecorators: { actions: [{
|
|
1450
1541
|
type: Input
|
|
@@ -1458,20 +1549,20 @@ class DropMarkerComponent {
|
|
|
1458
1549
|
type = 'empty';
|
|
1459
1550
|
text = '';
|
|
1460
1551
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DropMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1461
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DropMarkerComponent, isStandalone: true, selector: "vl-drop-marker", inputs: { type: "type", text: "text" }, ngImport: i0, template: `
|
|
1462
|
-
@if (type === 'empty') {
|
|
1463
|
-
<div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
|
|
1464
|
-
} @else {
|
|
1465
|
-
<div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
|
|
1552
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DropMarkerComponent, isStandalone: true, selector: "vl-drop-marker", inputs: { type: "type", text: "text" }, ngImport: i0, template: `
|
|
1553
|
+
@if (type === 'empty') {
|
|
1554
|
+
<div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
|
|
1555
|
+
} @else {
|
|
1556
|
+
<div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
|
|
1466
1557
|
}`, isInline: true, styles: [":host{display:contents}.vl-drop-marker__box{grid-column:1 / -1;min-height:56px;display:flex;gap:8px;align-items:center;justify-content:center;border:2px dashed #2563eb;border-radius:8px;background:#2563eb0f;color:#1d4ed8;font-size:13px;font-weight:600;pointer-events:none}.vl-drop-marker__line{position:absolute;z-index:30;background:#2563eb;border-radius:3px;pointer-events:none}.vl-drop-marker__line span{position:absolute;white-space:nowrap;background:#2563eb;color:#fff;font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px}.vl-drop-marker__line--before{left:0;right:0;top:-3px;height:4px}.vl-drop-marker__line--after{left:0;right:0;bottom:-3px;height:4px}.vl-drop-marker__line--left{top:0;bottom:0;left:-3px;width:4px}.vl-drop-marker__line--right{top:0;bottom:0;right:-3px;width:4px}.vl-drop-marker__line--before span,.vl-drop-marker__line--after span{left:50%;transform:translate(-50%,-50%);top:50%}.vl-drop-marker__line--left span{left:8px;top:50%;transform:translateY(-50%)}.vl-drop-marker__line--right span{right:8px;top:50%;transform:translateY(-50%)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1467
1558
|
}
|
|
1468
1559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DropMarkerComponent, decorators: [{
|
|
1469
1560
|
type: Component,
|
|
1470
|
-
args: [{ selector: 'vl-drop-marker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1471
|
-
@if (type === 'empty') {
|
|
1472
|
-
<div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
|
|
1473
|
-
} @else {
|
|
1474
|
-
<div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
|
|
1561
|
+
args: [{ selector: 'vl-drop-marker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1562
|
+
@if (type === 'empty') {
|
|
1563
|
+
<div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
|
|
1564
|
+
} @else {
|
|
1565
|
+
<div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
|
|
1475
1566
|
}`, styles: [":host{display:contents}.vl-drop-marker__box{grid-column:1 / -1;min-height:56px;display:flex;gap:8px;align-items:center;justify-content:center;border:2px dashed #2563eb;border-radius:8px;background:#2563eb0f;color:#1d4ed8;font-size:13px;font-weight:600;pointer-events:none}.vl-drop-marker__line{position:absolute;z-index:30;background:#2563eb;border-radius:3px;pointer-events:none}.vl-drop-marker__line span{position:absolute;white-space:nowrap;background:#2563eb;color:#fff;font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px}.vl-drop-marker__line--before{left:0;right:0;top:-3px;height:4px}.vl-drop-marker__line--after{left:0;right:0;bottom:-3px;height:4px}.vl-drop-marker__line--left{top:0;bottom:0;left:-3px;width:4px}.vl-drop-marker__line--right{top:0;bottom:0;right:-3px;width:4px}.vl-drop-marker__line--before span,.vl-drop-marker__line--after span{left:50%;transform:translate(-50%,-50%);top:50%}.vl-drop-marker__line--left span{left:8px;top:50%;transform:translateY(-50%)}.vl-drop-marker__line--right span{right:8px;top:50%;transform:translateY(-50%)}\n"] }]
|
|
1476
1567
|
}], propDecorators: { type: [{
|
|
1477
1568
|
type: Input
|
|
@@ -3423,6 +3514,117 @@ function formatDates(value, pattern) {
|
|
|
3423
3514
|
return value;
|
|
3424
3515
|
}
|
|
3425
3516
|
|
|
3517
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3518
|
+
// - new: fillPlaceholders / PLACEHOLDER_SOURCES - one way to fill the placeholders of every address: the sources
|
|
3519
|
+
// userInfo, env, record, form, filter, pageNumber, pageSize with any field; unknown ones stay for the caller
|
|
3520
|
+
// Faramarz Yousefian and Agent Toni (Claude Sonnet 5.5) 2026-10-23
|
|
3521
|
+
// - new: a body template can make a list from a list: { "$each": "cart.items", "item": { "productId":
|
|
3522
|
+
// "{{item.id}}", ... } } - one filled-in "item" per element, so a page renames and picks the fields
|
|
3523
|
+
// a backend wants without the code knowing any names (purchase button, OFFENE-PUNKTE 98). The
|
|
3524
|
+
// context takes further keys (form, cart, response)
|
|
3525
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
3526
|
+
// - new: a backend call described by the page instead of written into the code (A2). Saving,
|
|
3527
|
+
// loading with a filter and selection lists read the same keys of an option:
|
|
3528
|
+
// data_url (or url) address, with {{placeholders}}
|
|
3529
|
+
// method GET, POST, PUT, DELETE (default POST)
|
|
3530
|
+
// params URL parameters, values with {{placeholders}}
|
|
3531
|
+
// body content, a template; "{{records}}" as a whole value puts in the list itself
|
|
3532
|
+
// transform a named conversion of the records before sending (dailyLogs, OFFENE-PUNKTE 91)
|
|
3533
|
+
// afterSuccess "removeLocal": take the sent records out of browser storage
|
|
3534
|
+
// dateFormat how dates in params and body are written (date-format.ts; default ISO 8601
|
|
3535
|
+
// with time zone, e.g. P5 "yyyy-MM-dd'T'HH:mm:ss:SSSSxxx")
|
|
3536
|
+
// Placeholders: {{userInfo.x}} (the signed-in user, e.g. p5_backend_url), {{record.x}},
|
|
3537
|
+
// {{filter.x}}, {{records}}, {{env.x}} (the environment); {{x|'text'}} puts in text when x is empty
|
|
3538
|
+
// (P5: an empty plant is sent as two spaces). Replaces the fixed P5 time-recording
|
|
3539
|
+
// addresses in card, request service and selection lists
|
|
3540
|
+
const WHOLE = /^\s*{{\s*([^}]+?)\s*}}\s*$/;
|
|
3541
|
+
const ANY = /{{\s*([^}]+?)\s*}}/g;
|
|
3542
|
+
/** A placeholder's value; "path|'text'" gives text when the value is missing or empty. */
|
|
3543
|
+
function lookup(placeholder, context) {
|
|
3544
|
+
const fallback = placeholder.match(/^(.*?)\|\s*(['"])(.*)\2\s*$/s);
|
|
3545
|
+
const path = (fallback ? fallback[1] : placeholder).trim();
|
|
3546
|
+
const scope = { ...(context.userInfo || {}), ...context };
|
|
3547
|
+
const value = path.split('.').reduce((acc, key) => (acc == null ? undefined : acc[key]), scope);
|
|
3548
|
+
return fallback && (value == null || value === '') ? fallback[3] : value;
|
|
3549
|
+
}
|
|
3550
|
+
/**
|
|
3551
|
+
* A template with its placeholders filled in. A string that is only one placeholder gives the value
|
|
3552
|
+
* itself (a list stays a list); inside a longer text a missing value becomes empty. Objects and
|
|
3553
|
+
* lists are filled in deeply.
|
|
3554
|
+
*/
|
|
3555
|
+
function resolveTemplate(template, context) {
|
|
3556
|
+
if (typeof template === 'string') {
|
|
3557
|
+
const whole = template.match(WHOLE);
|
|
3558
|
+
if (whole) {
|
|
3559
|
+
const value = lookup(whole[1], context);
|
|
3560
|
+
return value === undefined ? '' : value;
|
|
3561
|
+
}
|
|
3562
|
+
return template.replace(ANY, (_, path) => {
|
|
3563
|
+
const value = lookup(path, context);
|
|
3564
|
+
return value == null ? '' : value instanceof Date ? formatDate(value) : String(value);
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3567
|
+
if (Array.isArray(template)) {
|
|
3568
|
+
return template.map(item => resolveTemplate(item, context));
|
|
3569
|
+
}
|
|
3570
|
+
if (template && typeof template === 'object') {
|
|
3571
|
+
if (typeof template.$each === 'string') {
|
|
3572
|
+
// { "$each": "cart.items", "item": { ... } }: one filled-in copy of "item" per element of the list
|
|
3573
|
+
const list = lookup(template.$each, context);
|
|
3574
|
+
return Array.isArray(list) ? list.map(item => resolveTemplate(template.item, { ...context, item })) : [];
|
|
3575
|
+
}
|
|
3576
|
+
const out = {};
|
|
3577
|
+
for (const [key, value] of Object.entries(template))
|
|
3578
|
+
out[key] = resolveTemplate(value, context);
|
|
3579
|
+
return out;
|
|
3580
|
+
}
|
|
3581
|
+
return template;
|
|
3582
|
+
}
|
|
3583
|
+
/** The sources a placeholder may name - the library knows no field names of an app, only these sources. */
|
|
3584
|
+
const PLACEHOLDER_SOURCES = ['userInfo', 'env', 'record', 'form', 'filter', 'item', 'cart', 'response', 'pageNumber', 'pageSize'];
|
|
3585
|
+
/**
|
|
3586
|
+
* An address or text with the placeholders filled in that the context can answer: a known source
|
|
3587
|
+
* ({{userInfo.x}}, {{env.x}}, {{record.x}}, {{form.x}}, {{filter.x}}, {{pageNumber}}, {{pageSize}}) - empty when the
|
|
3588
|
+
* value is missing - or a field the context or the signed-in user has ({{p5_backend_url}}). Anything else stays as
|
|
3589
|
+
* written, so a caller can fill its own ({{id}} of a delete). encode: URL-encode the values (an address part).
|
|
3590
|
+
*/
|
|
3591
|
+
function fillPlaceholders(text, context, encode = false) {
|
|
3592
|
+
return String(text ?? '').replace(ANY, (whole, path) => {
|
|
3593
|
+
const root = String(path).split(/[.|]/)[0].trim();
|
|
3594
|
+
const value = lookup(path, context);
|
|
3595
|
+
if (value === undefined && !PLACEHOLDER_SOURCES.includes(root))
|
|
3596
|
+
return whole;
|
|
3597
|
+
const textValue = value == null ? '' : value instanceof Date ? formatDate(value) : String(value);
|
|
3598
|
+
return encode ? encodeURIComponent(textValue) : textValue;
|
|
3599
|
+
});
|
|
3600
|
+
}
|
|
3601
|
+
/** True when the option describes a backend call (it has an address). */
|
|
3602
|
+
function hasBackendCall(option) {
|
|
3603
|
+
return !!String(option?.data_url ?? option?.url ?? '').trim();
|
|
3604
|
+
}
|
|
3605
|
+
/**
|
|
3606
|
+
* The call of an option: address, method, URL parameters and content with the placeholders filled in.
|
|
3607
|
+
* A relative address is put after env.apiUrl. Without an address there is no call (null).
|
|
3608
|
+
*/
|
|
3609
|
+
function buildBackendCall(option, context) {
|
|
3610
|
+
if (!hasBackendCall(option))
|
|
3611
|
+
return null;
|
|
3612
|
+
let url = String(resolveTemplate(String(option.data_url ?? option.url), context)).trim();
|
|
3613
|
+
const base = String(context.env?.apiUrl ?? '').replace(/\/+$/, '');
|
|
3614
|
+
if (!/^https?:\/\//i.test(url) && base) {
|
|
3615
|
+
url = `${base}/${url.replace(/^\/+/, '')}`;
|
|
3616
|
+
}
|
|
3617
|
+
const dateFormat = option.dateFormat;
|
|
3618
|
+
const params = {};
|
|
3619
|
+
for (const [key, value] of Object.entries(resolveTemplate(option.params || {}, context) || {})) {
|
|
3620
|
+
params[key] = value == null ? '' : value instanceof Date ? formatDate(value, dateFormat) : String(value);
|
|
3621
|
+
}
|
|
3622
|
+
const body = formatDates(option.body !== undefined
|
|
3623
|
+
? resolveTemplate(option.body, context)
|
|
3624
|
+
: context.records ?? context.record ?? {}, dateFormat);
|
|
3625
|
+
return { url, method: String(option.method || 'POST').toUpperCase(), params, body };
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3426
3628
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11
|
|
3427
3629
|
// - new: isNativeMobile(), the one answer to "is this the app on iOS or Android". The runtime asked
|
|
3428
3630
|
// Angular CDK's Platform (platform.IOS / platform.ANDROID), which reads the browser's user agent;
|
|
@@ -3442,6 +3644,34 @@ function isNativePhone() {
|
|
|
3442
3644
|
return isNativeMobile() && Math.min(window.screen.width, window.screen.height) < 600;
|
|
3443
3645
|
}
|
|
3444
3646
|
|
|
3647
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3648
|
+
// - new: whether a backend call goes through the app's proxy (/api/proxy/<host>/...) - decided by the customer in
|
|
3649
|
+
// the Designer, never automatically (user decision 2026-10-25): the call's own option.proxy (true / false), else
|
|
3650
|
+
// the Configuration's environment.proxy; off when neither says. The host must be in addon/addon.json hosts.
|
|
3651
|
+
let appEnvironment = null;
|
|
3652
|
+
/** The app's environment (Configuration), set once by the app; the default for every call. */
|
|
3653
|
+
function setProxyEnvironment(environment) {
|
|
3654
|
+
appEnvironment = environment ?? null;
|
|
3655
|
+
}
|
|
3656
|
+
/** true: through the proxy. The call decides (option.proxy true/false), else the Configuration (environment.proxy). */
|
|
3657
|
+
function proxyFor(option, environment = appEnvironment) {
|
|
3658
|
+
if (option?.proxy === true || option?.proxy === false)
|
|
3659
|
+
return option.proxy;
|
|
3660
|
+
return environment?.proxy === true;
|
|
3661
|
+
}
|
|
3662
|
+
/** The forwarding path of a URL on the app's own origin: https://h/x?y -> <origin>/api/proxy/h/x?y. */
|
|
3663
|
+
function proxiedUrl(url, origin) {
|
|
3664
|
+
if (!/^https?:\/\//i.test(url || ''))
|
|
3665
|
+
return url;
|
|
3666
|
+
const target = new URL(url);
|
|
3667
|
+
if (target.origin === origin)
|
|
3668
|
+
return url;
|
|
3669
|
+
return `${origin}/api/proxy/${target.host}${target.pathname}${target.search}`;
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3673
|
+
// - change: backendUrl takes the proxy decision (proxyFor: option.proxy, else the Configuration) - it forwarded
|
|
3674
|
+
// every call to another origin automatically, some ways of the app did not ask it at all
|
|
3445
3675
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15
|
|
3446
3676
|
// - new: backendUrl - the one place that decides how a backend is reached. On the devices the
|
|
3447
3677
|
// backend is called directly (native HTTP, no CORS). In the web a backend without CORS headers
|
|
@@ -3452,23 +3682,20 @@ function isNativePhone() {
|
|
|
3452
3682
|
/** Prefix of the forwarding path on the app's own origin. */
|
|
3453
3683
|
const BACKEND_PROXY_PREFIX = '/api/proxy';
|
|
3454
3684
|
/**
|
|
3455
|
-
* The address to call for a backend URL
|
|
3456
|
-
*
|
|
3685
|
+
* The address to call for a backend URL. Through the proxy only when the customer switched it on (proxyFor:
|
|
3686
|
+
* the call's option.proxy, else the Configuration) - never automatically (user decision 2026-10-25). Unchanged
|
|
3687
|
+
* on the devices (native HTTP, no CORS) and for relative URLs.
|
|
3457
3688
|
*/
|
|
3458
|
-
function backendUrl(url) {
|
|
3459
|
-
if (isNativeMobile() || typeof window === 'undefined'
|
|
3689
|
+
function backendUrl(url, proxy) {
|
|
3690
|
+
if (!proxy || isNativeMobile() || typeof window === 'undefined')
|
|
3460
3691
|
return url;
|
|
3461
|
-
|
|
3462
|
-
const target = new URL(url);
|
|
3463
|
-
if (target.origin === window.location.origin) {
|
|
3464
|
-
return url;
|
|
3465
|
-
}
|
|
3466
|
-
return `${window.location.origin}${BACKEND_PROXY_PREFIX}/${target.host}${target.pathname}${target.search}`;
|
|
3692
|
+
return proxiedUrl(url, window.location.origin);
|
|
3467
3693
|
}
|
|
3468
3694
|
|
|
3469
3695
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3470
|
-
// - fix:
|
|
3471
|
-
//
|
|
3696
|
+
// - fix: getSectionInfo joins apiUrl and the address with exactly one "/" (a "//" was rejected by the server)
|
|
3697
|
+
// - change: dynamicCall, getSectionInfo and getInfo take the call's option; the proxy only when it (option.proxy)
|
|
3698
|
+
// or the Configuration switches it on - the same decision as every other backend call
|
|
3472
3699
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
3473
3700
|
// - change: saveDb and getSaveOrder removed - fixed P5 time-recording calls; saving and loading with a
|
|
3474
3701
|
// filter go through BackendCallService with what the page describes (A2)
|
|
@@ -3493,15 +3720,23 @@ class RequestService {
|
|
|
3493
3720
|
getEnvironmet(selectedProject) {
|
|
3494
3721
|
return this.http.get(`../../assets/projects/${selectedProject}/environments/environment.json`);
|
|
3495
3722
|
}
|
|
3496
|
-
getSectionInfo(url, envUrl, passToken = false, selectedProject = '', userInfo = null) {
|
|
3723
|
+
getSectionInfo(url, envUrl, passToken = false, selectedProject = '', userInfo = null, option = null) {
|
|
3724
|
+
// through the proxy only when the page (option.proxy) or the Configuration says so
|
|
3725
|
+
const proxy = proxyFor(option);
|
|
3726
|
+
// exactly one "/" between apiUrl and the page's address - ".../api/" + "/products" gave "//", which Spring's
|
|
3727
|
+
// firewall rejects (luv2shop server log); a full address stays as it is
|
|
3728
|
+
if (envUrl)
|
|
3729
|
+
url = backendUrl(/^https?:\/\//i.test(url) ? url : `${String(envUrl).replace(/\/+$/, '')}/${String(url).replace(/^\/+/, '')}`, proxy);
|
|
3730
|
+
else
|
|
3731
|
+
url = backendUrl(url, proxy);
|
|
3497
3732
|
if (envUrl) {
|
|
3498
3733
|
if (passToken && selectedProject) {
|
|
3499
|
-
return this.http.get(
|
|
3734
|
+
return this.http.get(url, {
|
|
3500
3735
|
headers: this.createAuthorizationHeader(userInfo),
|
|
3501
3736
|
});
|
|
3502
3737
|
}
|
|
3503
3738
|
else {
|
|
3504
|
-
return this.http.get(
|
|
3739
|
+
return this.http.get(url);
|
|
3505
3740
|
}
|
|
3506
3741
|
}
|
|
3507
3742
|
else {
|
|
@@ -3518,13 +3753,12 @@ class RequestService {
|
|
|
3518
3753
|
getMainLayout(selectedProject) {
|
|
3519
3754
|
return this.http.get(`../assets/projects/${selectedProject}/main/layout_schema.json`);
|
|
3520
3755
|
}
|
|
3521
|
-
getInfo(url) {
|
|
3522
|
-
return this.http.get(url);
|
|
3756
|
+
getInfo(url, option = null) {
|
|
3757
|
+
return this.http.get(backendUrl(url, proxyFor(option)));
|
|
3523
3758
|
}
|
|
3524
|
-
dynamicCall(method = "get", body = null, url, passToken = false, selectedProject = '', userInfo = null) {
|
|
3525
|
-
//
|
|
3526
|
-
|
|
3527
|
-
url = backendUrl(url);
|
|
3759
|
+
dynamicCall(method = "get", body = null, url, passToken = false, selectedProject = '', userInfo = null, option = null) {
|
|
3760
|
+
// through the proxy only when the call (option.proxy) or the Configuration says so
|
|
3761
|
+
url = backendUrl(url, proxyFor(option));
|
|
3528
3762
|
switch (method.toLowerCase()) {
|
|
3529
3763
|
case 'get':
|
|
3530
3764
|
if (passToken && selectedProject) {
|
|
@@ -3592,6 +3826,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
3592
3826
|
}]
|
|
3593
3827
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }] });
|
|
3594
3828
|
|
|
3829
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
3830
|
+
// - removed: setTableData - called nowhere, a second copy of the old answer rule with a fixed "_embedded.products";
|
|
3831
|
+
// the records come out of an answer through recordsFrom (page-data.ts)
|
|
3832
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3833
|
+
// - change: replacePaginationParams fills every placeholder source (userInfo, env ...) besides page number and size
|
|
3834
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
3835
|
+
// - change: the old calls hand their option on - the proxy follows option.proxy / the Configuration
|
|
3836
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
3837
|
+
// - new: cardComplete / requiredCardMissing - a required card field without a whole card keeps a button
|
|
3838
|
+
// with needsValid locked (the card is the means of payment; Stripe's frame is no field of the form)
|
|
3839
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-23
|
|
3840
|
+
// - new: setDefaultUser reads the app settings form (OFFENE-PUNKTE 109): the start page is center.option for
|
|
3841
|
+
// every sign-in setting, a role's own start page through startPageFor of the catalog; userClaims adds the
|
|
3842
|
+
// claims of the access token, so roles of Keycloak and Okta count too. The older form stays readable
|
|
3843
|
+
// Faramarz Yousefian and Agent Toni (Claude Sonnet 5.5) 2026-10-23
|
|
3844
|
+
// - new: confirmCardPayment - pays with the card field the page mounted (Stripe confirmCardPayment with
|
|
3845
|
+
// the client secret of a payment intent), for the purchase button (luv2shop, OFFENE-PUNKTE 98)
|
|
3846
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
|
|
3847
|
+
// - fix: normalizeDatesForStorage also writes the dates of a list (a period) as local time; they went
|
|
3848
|
+
// into browser storage as UTC ("2026-10-19T22:00:00.000Z" for 20 Oct) - storageValue (date-format.ts)
|
|
3849
|
+
// - fix: getMediaSrc takes a source that is already a string (data URL) - the header logo was empty
|
|
3850
|
+
// - change: restoreDatesFromStorage and parseLocalISODate go to date-format.ts; reading back also gives
|
|
3851
|
+
// date and time and a period as Dates (before date and time only)
|
|
3852
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
|
|
3853
|
+
// - fix: parseLocalISODate reads values with a timezone offset (+02:00) as wall time instead of an
|
|
3854
|
+
// invalid date; values without one (P5W1) read as before (CONTROLS-PLAN.md C1, #166)
|
|
3855
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14
|
|
3856
|
+
// - fix: Okta web read login.web.scopes, which the Designer never writes (it stores
|
|
3857
|
+
// login.web.scope), so the configured scope did not reach Okta. Both are read now
|
|
3858
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13
|
|
3859
|
+
// - fix: Okta login on the devices failed with 400 invalid_scope. login.mobile.scope may be an
|
|
3860
|
+
// array (luv2shop: ["openid profile email"]); the OAuth2 plugin expects a string and dropped it,
|
|
3861
|
+
// so no scope reached Okta. Arrays are joined with spaces, a missing scope falls back to
|
|
3862
|
+
// "openid profile email"
|
|
3863
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11
|
|
3864
|
+
// - fix: showAllProjects ("Framework Settings > Home") cleared selectedProject only from session
|
|
3865
|
+
// storage; the app keeps it in local storage, so after the reload it opened the same project
|
|
3866
|
+
// instead of the project list
|
|
3867
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07
|
|
3868
|
+
// - change: on the devices a saved sign-in - KeycloakInfo (keycloak), loginedUser (oktaAuth),
|
|
3869
|
+
// <project>Logined (jwtToken) - is kept in the iOS keychain / Android keystore through
|
|
3870
|
+
// @aparajita/capacitor-secure-storage instead of plain WebView storage or Preferences, where any
|
|
3871
|
+
// code in the page could read it. Values stored the old way move over on first read. The
|
|
3872
|
+
// browser keeps localStorage / sessionStorage - it has no keychain
|
|
3873
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19
|
|
3874
|
+
// - change: the credit card type is tested as creditCard. The rename of 2026-09-15 reached
|
|
3875
|
+
// model.component.html and the whole Designer but not this file, so one data object rendered
|
|
3876
|
+
// in a modal and stayed empty in a form
|
|
3877
|
+
// - new: a @contract comment documenting that the toolkit utility, side menu,
|
|
3878
|
+
// and ViewDefinition runtime handle keycloak, oktaAuth, and jwtToken.
|
|
3595
3879
|
class UtilityService {
|
|
3596
3880
|
platform;
|
|
3597
3881
|
requestService;
|
|
@@ -3776,14 +4060,18 @@ class UtilityService {
|
|
|
3776
4060
|
});
|
|
3777
4061
|
return quantity;
|
|
3778
4062
|
}
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
4063
|
+
/**
|
|
4064
|
+
* A page's address with its placeholders: {{pageNumber}}, {{pageSize}} and - with a context - any field of the
|
|
4065
|
+
* signed-in user ({{userInfo.userId}}) or the Configuration ({{env.x}}). Only page number and size were filled
|
|
4066
|
+
* before, so an address could not name the user (hotel Bookings asked for user 3 whoever was signed in).
|
|
4067
|
+
*/
|
|
4068
|
+
replacePaginationParams(url, currentPage, pageSize, context = {}) {
|
|
4069
|
+
if (!url)
|
|
4070
|
+
return url;
|
|
4071
|
+
const values = { ...context, pageNumber: currentPage };
|
|
4072
|
+
if (pageSize !== undefined && pageSize !== null)
|
|
4073
|
+
values['pageSize'] = pageSize;
|
|
4074
|
+
return fillPlaceholders(url, values, true);
|
|
3787
4075
|
}
|
|
3788
4076
|
customButton(option, propertySchema, projectSeleted, environment) {
|
|
3789
4077
|
if (option.url) {
|
|
@@ -3795,7 +4083,7 @@ class UtilityService {
|
|
|
3795
4083
|
}, {});
|
|
3796
4084
|
}
|
|
3797
4085
|
let url = environment?.apiUrl + option.url;
|
|
3798
|
-
this.requestService.dynamicCall(option.method, body, url, option.passToken, projectSeleted).subscribe((res) => {
|
|
4086
|
+
this.requestService.dynamicCall(option.method, body, url, option.passToken, projectSeleted, null, option).subscribe((res) => {
|
|
3799
4087
|
window.location.reload();
|
|
3800
4088
|
});
|
|
3801
4089
|
}
|
|
@@ -3861,34 +4149,6 @@ class UtilityService {
|
|
|
3861
4149
|
}
|
|
3862
4150
|
return { ...claims, ...userInfo };
|
|
3863
4151
|
}
|
|
3864
|
-
setTableData(data, option = {}, tableitemInfo, projectSeleted) {
|
|
3865
|
-
if (option?.pagination?.pageSize && option?.pagination?.scrollable) {
|
|
3866
|
-
tableitemInfo.pageSize = option?.pagination?.pageSize;
|
|
3867
|
-
}
|
|
3868
|
-
let records;
|
|
3869
|
-
if (option.dataKey) {
|
|
3870
|
-
records = data[option.dataKey];
|
|
3871
|
-
}
|
|
3872
|
-
else if (option.key && data?._embedded) {
|
|
3873
|
-
records = data?._embedded[option.key];
|
|
3874
|
-
}
|
|
3875
|
-
else {
|
|
3876
|
-
if (!data?._embedded?.products && !Array.isArray(data)) {
|
|
3877
|
-
records = [data];
|
|
3878
|
-
}
|
|
3879
|
-
else {
|
|
3880
|
-
records = data?._embedded?.products;
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
tableitemInfo.totalRecords = data?.totalPages ? data?.totalPages : data?.page?.totalElements;
|
|
3884
|
-
tableitemInfo.data = records.map((record) => ({
|
|
3885
|
-
...record,
|
|
3886
|
-
...(record.hasOwnProperty('imageUrl') && record.imageUrl
|
|
3887
|
-
? { imageUrl: `${projectSeleted}/Media/` + record.imageUrl.split('/').pop() }
|
|
3888
|
-
: {})
|
|
3889
|
-
}));
|
|
3890
|
-
return tableitemInfo;
|
|
3891
|
-
}
|
|
3892
4152
|
setOktaWebCredential(environment, projectName) {
|
|
3893
4153
|
return {
|
|
3894
4154
|
logo: `favicon.ico`,
|
|
@@ -4015,7 +4275,7 @@ class UtilityService {
|
|
|
4015
4275
|
// Dropdown logic (async data fetching)
|
|
4016
4276
|
if (field.type === 'dropdown' && formField.option?.data_url) {
|
|
4017
4277
|
try {
|
|
4018
|
-
const res = await lastValueFrom(this.requestService.getInfo(environment.apiUrl + formField.option.data_url));
|
|
4278
|
+
const res = await lastValueFrom(this.requestService.getInfo(environment.apiUrl + formField.option.data_url, formField.option));
|
|
4019
4279
|
const key = Object.keys(res._embedded || {})[0];
|
|
4020
4280
|
if (key) {
|
|
4021
4281
|
field.data = res._embedded[key];
|
|
@@ -6920,78 +7180,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
6920
7180
|
type: Output
|
|
6921
7181
|
}] } });
|
|
6922
7182
|
|
|
6923
|
-
//
|
|
6924
|
-
// -
|
|
6925
|
-
// container instead of a switch in each; the same decision as the Designer's modal canvas
|
|
6926
|
-
// (canvasControl), so the app draws a field as the Designer shows it. styleParts - a layout style
|
|
6927
|
-
// split into its classes (all of them) and its CSS. No Angular, tested with node --test (#166)
|
|
6928
|
-
/** The property a field is bound to (scope.reference) in the page's property schema, or undefined. */
|
|
6929
|
-
function controlProperty(field, propertySchema) {
|
|
6930
|
-
const reference = field?.scope?.reference;
|
|
6931
|
-
if (!reference)
|
|
6932
|
-
return undefined;
|
|
6933
|
-
const { scope, name } = splitReference(reference);
|
|
6934
|
-
return propertySchema?.[scope]?.[name];
|
|
6935
|
-
}
|
|
6936
|
-
/**
|
|
6937
|
-
* The building block of a field:
|
|
6938
|
-
* - no scope.reference: a button (layout field without a property)
|
|
6939
|
-
* - the property type decides media, credit card and the period (dateRange)
|
|
6940
|
-
* - otherwise the control (option.control, or the field catalog's choice for the type)
|
|
6941
|
-
*/
|
|
6942
|
-
function controlKind(field, property) {
|
|
6943
|
-
if (!field?.scope?.reference)
|
|
6944
|
-
return 'button';
|
|
6945
|
-
const type = String(property?.type || '').toLowerCase();
|
|
6946
|
-
if (type === 'media' || type === 'image')
|
|
6947
|
-
return 'media';
|
|
6948
|
-
if (type === 'creditcard')
|
|
6949
|
-
return 'creditCard';
|
|
6950
|
-
if (type === 'daterange')
|
|
6951
|
-
return 'daterange';
|
|
6952
|
-
// older data objects naming the control as their type
|
|
6953
|
-
if (type === 'autocomplete' && !field?.option?.control)
|
|
6954
|
-
return 'autocomplete';
|
|
6955
|
-
switch (effectiveControl(field?.option || {}, property || {})) {
|
|
6956
|
-
case 'dateRangepicker': return 'daterange';
|
|
6957
|
-
case 'datepicker': return 'date';
|
|
6958
|
-
case 'timepicker': return 'time';
|
|
6959
|
-
case 'dateTimepicker': return 'datetime';
|
|
6960
|
-
case 'password': return 'password';
|
|
6961
|
-
case 'textArea': return 'textarea';
|
|
6962
|
-
case 'combobox': return 'combobox';
|
|
6963
|
-
case 'autocomplete': return 'autocomplete';
|
|
6964
|
-
case 'dropdown': return 'dropdown';
|
|
6965
|
-
case 'radiobutton': return 'radio';
|
|
6966
|
-
case 'checkbox': return 'checkbox';
|
|
6967
|
-
case 'switch': return 'switch';
|
|
6968
|
-
case 'spinner':
|
|
6969
|
-
case 'slider':
|
|
6970
|
-
case 'quantity': return 'number';
|
|
6971
|
-
case 'creditCard': return 'creditCard';
|
|
6972
|
-
}
|
|
6973
|
-
// a date, time or date and time typed as text keeps its picker: the value is a date, not text
|
|
6974
|
-
if (type === 'date')
|
|
6975
|
-
return 'date';
|
|
6976
|
-
if (type === 'time')
|
|
6977
|
-
return 'time';
|
|
6978
|
-
if (['datetime', 'date&time', 'date-time'].includes(type))
|
|
6979
|
-
return 'datetime';
|
|
6980
|
-
return ['number', 'integer', 'bigdecimal', 'decimal'].includes(type) ? 'number' : 'text';
|
|
6981
|
-
}
|
|
6982
|
-
/**
|
|
6983
|
-
* A style object of the layout split into its classes and its CSS: { classes: ['a', 'b'], color }
|
|
6984
|
-
* -> { classes: 'a b', style: { color } }. Every class counts, not only the first.
|
|
6985
|
-
*/
|
|
6986
|
-
function styleParts(styleObject) {
|
|
6987
|
-
if (!styleObject || typeof styleObject !== 'object') {
|
|
6988
|
-
return { classes: '', style: {} };
|
|
6989
|
-
}
|
|
6990
|
-
const { classes, ...style } = styleObject;
|
|
6991
|
-
const list = Array.isArray(classes) ? classes : typeof classes === 'string' ? [classes] : [];
|
|
6992
|
-
return { classes: list.filter((c) => typeof c === 'string' && c.trim()).join(' '), style };
|
|
6993
|
-
}
|
|
6994
|
-
|
|
7183
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
7184
|
+
// - fix: legacyDateFormat takes only a text as pattern - dateFormat true printed "true" instead of the date
|
|
6995
7185
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
6996
7186
|
// - change: no list of the missing fields under a locked button (user 2026-10-24) - goToField removed
|
|
6997
7187
|
// - change: lockHints - every reason under the button (sign-in link and fields hint), the missing fields named
|
|
@@ -7143,7 +7333,10 @@ class ControlComponent {
|
|
|
7143
7333
|
/** an older layout's own date pattern (Angular date pipe: option.dateFormat / timeFormat) */
|
|
7144
7334
|
get legacyDateFormat() {
|
|
7145
7335
|
const option = this.field?.option || {};
|
|
7146
|
-
|
|
7336
|
+
const pattern = this.kind === 'time' ? option.timeFormat : option.dateFormat || option.timeFormat;
|
|
7337
|
+
// only a text is a pattern - dateFormat true only marks a date (shown in the app language); as a pattern the
|
|
7338
|
+
// date pipe printed "true" (luv2shop Orders)
|
|
7339
|
+
return typeof pattern === 'string' ? pattern : '';
|
|
7147
7340
|
}
|
|
7148
7341
|
get isLink() {
|
|
7149
7342
|
return !!this.field?.option?.link;
|
|
@@ -7289,6 +7482,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7289
7482
|
type: Output
|
|
7290
7483
|
}] } });
|
|
7291
7484
|
|
|
7485
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
7486
|
+
// - new: paginationClasses - the layout's classes reach the bar (they were dropped)
|
|
7487
|
+
// - new: sizeOptions - the size in use is always offered; page items carry classes for the app's style
|
|
7292
7488
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
|
|
7293
7489
|
// - fix: on desktop the page buttons have a default (side by side, centred) under the page's own
|
|
7294
7490
|
// listStyle; without one they stood one below the other
|
|
@@ -7335,6 +7531,17 @@ class PaginationComponent {
|
|
|
7335
7531
|
this.currentPage >=
|
|
7336
7532
|
this.pages.length - 1);
|
|
7337
7533
|
}
|
|
7534
|
+
/** The sizes offered: the layout's (or 5/10/15/20) and the size in use, sorted - a size the backend chose stays visible. */
|
|
7535
|
+
sizeOptions() {
|
|
7536
|
+
const listed = (this.itemInfo?.layoutSchema?.pagination?.pageSizeOptions || [5, 10, 15, 20]).map(Number);
|
|
7537
|
+
const current = Number(this.pageSize);
|
|
7538
|
+
const all = Number.isFinite(current) && current > 0 ? [...listed, current] : listed;
|
|
7539
|
+
return [...new Set(all)].sort((a, b) => a - b);
|
|
7540
|
+
}
|
|
7541
|
+
/** The classes the layout gives the bar (pagination.style.classes) - the app's style.css styles the bar through them. */
|
|
7542
|
+
get paginationClasses() {
|
|
7543
|
+
return styleParts(this.itemInfo?.layoutSchema?.pagination?.style).classes;
|
|
7544
|
+
}
|
|
7338
7545
|
/*
|
|
7339
7546
|
* Desktop returns the original schema style unchanged.
|
|
7340
7547
|
* Mobile overrides only the layout direction.
|
|
@@ -7514,7 +7721,7 @@ class PaginationComponent {
|
|
|
7514
7721
|
this.onGoToPage.emit(page);
|
|
7515
7722
|
}
|
|
7516
7723
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PaginationComponent, deps: [{ token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
7517
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: PaginationComponent, isStandalone: true, selector: "vl-pagination", inputs: { itemInfo: "itemInfo", pageSize: "pageSize", currentPage: "currentPage", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { pageSizeChange: "pageSizeChange", onGoToPage: "onGoToPage" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<div [ngStyle]=\"paginationStyle\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"
|
|
7724
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: PaginationComponent, isStandalone: true, selector: "vl-pagination", inputs: { itemInfo: "itemInfo", pageSize: "pageSize", currentPage: "currentPage", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { pageSizeChange: "pageSizeChange", onGoToPage: "onGoToPage" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: the page items carry classes (vl-page, --active, --disabled, --step) so the app's style.css can style them;\r\n the size choice offers the size in use too (sizeOptions) - it showed empty when the backend paged by 6 -->\r\n<div [ngStyle]=\"paginationStyle\" [class]=\"paginationClasses\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\" class=\"vl-page\" [class.vl-page--active]=\"page === currentPage\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\" class=\"vl-page vl-page--summary\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"let size of sizeOptions()\" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>", styles: [":host{display:block;width:100%;min-width:0;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: PlatformModule }] });
|
|
7518
7725
|
}
|
|
7519
7726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
7520
7727
|
type: Component,
|
|
@@ -7522,7 +7729,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7522
7729
|
CommonModule,
|
|
7523
7730
|
FormsModule,
|
|
7524
7731
|
PlatformModule
|
|
7525
|
-
], template: "<div [ngStyle]=\"paginationStyle\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"
|
|
7732
|
+
], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: the page items carry classes (vl-page, --active, --disabled, --step) so the app's style.css can style them;\r\n the size choice offers the size in use too (sizeOptions) - it showed empty when the backend paged by 6 -->\r\n<div [ngStyle]=\"paginationStyle\" [class]=\"paginationClasses\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\" class=\"vl-page\" [class.vl-page--active]=\"page === currentPage\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\" class=\"vl-page vl-page--summary\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"let size of sizeOptions()\" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>", styles: [":host{display:block;width:100%;min-width:0;box-sizing:border-box}\n"] }]
|
|
7526
7733
|
}], ctorParameters: () => [{ type: i1$2.Platform }], propDecorators: { itemInfo: [{
|
|
7527
7734
|
type: Input
|
|
7528
7735
|
}], pageSize: [{
|
|
@@ -7566,96 +7773,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7566
7773
|
type: Input
|
|
7567
7774
|
}] } });
|
|
7568
7775
|
|
|
7569
|
-
// Faramarz Yousefian and Agent Toni (Claude
|
|
7570
|
-
// -
|
|
7571
|
-
//
|
|
7572
|
-
// a backend wants without the code knowing any names (purchase button, OFFENE-PUNKTE 98). The
|
|
7573
|
-
// context takes further keys (form, cart, response)
|
|
7574
|
-
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
7575
|
-
// - new: a backend call described by the page instead of written into the code (A2). Saving,
|
|
7576
|
-
// loading with a filter and selection lists read the same keys of an option:
|
|
7577
|
-
// data_url (or url) address, with {{placeholders}}
|
|
7578
|
-
// method GET, POST, PUT, DELETE (default POST)
|
|
7579
|
-
// params URL parameters, values with {{placeholders}}
|
|
7580
|
-
// body content, a template; "{{records}}" as a whole value puts in the list itself
|
|
7581
|
-
// transform a named conversion of the records before sending (dailyLogs, OFFENE-PUNKTE 91)
|
|
7582
|
-
// afterSuccess "removeLocal": take the sent records out of browser storage
|
|
7583
|
-
// dateFormat how dates in params and body are written (date-format.ts; default ISO 8601
|
|
7584
|
-
// with time zone, e.g. P5 "yyyy-MM-dd'T'HH:mm:ss:SSSSxxx")
|
|
7585
|
-
// Placeholders: {{userInfo.x}} (the signed-in user, e.g. p5_backend_url), {{record.x}},
|
|
7586
|
-
// {{filter.x}}, {{records}}, {{env.x}} (the environment); {{x|'text'}} puts in text when x is empty
|
|
7587
|
-
// (P5: an empty plant is sent as two spaces). Replaces the fixed P5 time-recording
|
|
7588
|
-
// addresses in card, request service and selection lists
|
|
7589
|
-
const WHOLE = /^\s*{{\s*([^}]+?)\s*}}\s*$/;
|
|
7590
|
-
const ANY = /{{\s*([^}]+?)\s*}}/g;
|
|
7591
|
-
/** A placeholder's value; "path|'text'" gives text when the value is missing or empty. */
|
|
7592
|
-
function lookup(placeholder, context) {
|
|
7593
|
-
const fallback = placeholder.match(/^(.*?)\|\s*(['"])(.*)\2\s*$/s);
|
|
7594
|
-
const path = (fallback ? fallback[1] : placeholder).trim();
|
|
7595
|
-
const scope = { ...(context.userInfo || {}), ...context };
|
|
7596
|
-
const value = path.split('.').reduce((acc, key) => (acc == null ? undefined : acc[key]), scope);
|
|
7597
|
-
return fallback && (value == null || value === '') ? fallback[3] : value;
|
|
7598
|
-
}
|
|
7599
|
-
/**
|
|
7600
|
-
* A template with its placeholders filled in. A string that is only one placeholder gives the value
|
|
7601
|
-
* itself (a list stays a list); inside a longer text a missing value becomes empty. Objects and
|
|
7602
|
-
* lists are filled in deeply.
|
|
7603
|
-
*/
|
|
7604
|
-
function resolveTemplate(template, context) {
|
|
7605
|
-
if (typeof template === 'string') {
|
|
7606
|
-
const whole = template.match(WHOLE);
|
|
7607
|
-
if (whole) {
|
|
7608
|
-
const value = lookup(whole[1], context);
|
|
7609
|
-
return value === undefined ? '' : value;
|
|
7610
|
-
}
|
|
7611
|
-
return template.replace(ANY, (_, path) => {
|
|
7612
|
-
const value = lookup(path, context);
|
|
7613
|
-
return value == null ? '' : value instanceof Date ? formatDate(value) : String(value);
|
|
7614
|
-
});
|
|
7615
|
-
}
|
|
7616
|
-
if (Array.isArray(template)) {
|
|
7617
|
-
return template.map(item => resolveTemplate(item, context));
|
|
7618
|
-
}
|
|
7619
|
-
if (template && typeof template === 'object') {
|
|
7620
|
-
if (typeof template.$each === 'string') {
|
|
7621
|
-
// { "$each": "cart.items", "item": { ... } }: one filled-in copy of "item" per element of the list
|
|
7622
|
-
const list = lookup(template.$each, context);
|
|
7623
|
-
return Array.isArray(list) ? list.map(item => resolveTemplate(template.item, { ...context, item })) : [];
|
|
7624
|
-
}
|
|
7625
|
-
const out = {};
|
|
7626
|
-
for (const [key, value] of Object.entries(template))
|
|
7627
|
-
out[key] = resolveTemplate(value, context);
|
|
7628
|
-
return out;
|
|
7629
|
-
}
|
|
7630
|
-
return template;
|
|
7631
|
-
}
|
|
7632
|
-
/** True when the option describes a backend call (it has an address). */
|
|
7633
|
-
function hasBackendCall(option) {
|
|
7634
|
-
return !!String(option?.data_url ?? option?.url ?? '').trim();
|
|
7635
|
-
}
|
|
7636
|
-
/**
|
|
7637
|
-
* The call of an option: address, method, URL parameters and content with the placeholders filled in.
|
|
7638
|
-
* A relative address is put after env.apiUrl. Without an address there is no call (null).
|
|
7639
|
-
*/
|
|
7640
|
-
function buildBackendCall(option, context) {
|
|
7641
|
-
if (!hasBackendCall(option))
|
|
7642
|
-
return null;
|
|
7643
|
-
let url = String(resolveTemplate(String(option.data_url ?? option.url), context)).trim();
|
|
7644
|
-
const base = String(context.env?.apiUrl ?? '').replace(/\/+$/, '');
|
|
7645
|
-
if (!/^https?:\/\//i.test(url) && base) {
|
|
7646
|
-
url = `${base}/${url.replace(/^\/+/, '')}`;
|
|
7647
|
-
}
|
|
7648
|
-
const dateFormat = option.dateFormat;
|
|
7649
|
-
const params = {};
|
|
7650
|
-
for (const [key, value] of Object.entries(resolveTemplate(option.params || {}, context) || {})) {
|
|
7651
|
-
params[key] = value == null ? '' : value instanceof Date ? formatDate(value, dateFormat) : String(value);
|
|
7652
|
-
}
|
|
7653
|
-
const body = formatDates(option.body !== undefined
|
|
7654
|
-
? resolveTemplate(option.body, context)
|
|
7655
|
-
: context.records ?? context.record ?? {}, dateFormat);
|
|
7656
|
-
return { url, method: String(option.method || 'POST').toUpperCase(), params, body };
|
|
7657
|
-
}
|
|
7658
|
-
|
|
7776
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
7777
|
+
// - change: the proxy only when the list's call or the Configuration switches it on (proxyFor); setEnvironment
|
|
7778
|
+
// hands the Configuration to every call (setProxyEnvironment)
|
|
7659
7779
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
7660
7780
|
// - change: a list's request is built like every backend call of a page (backend-call.ts). The base
|
|
7661
7781
|
// address was always the user's p5_backend_url and the parameter {"type": "company"} built the P5
|
|
@@ -7681,6 +7801,8 @@ class RemoteListService {
|
|
|
7681
7801
|
environment = null;
|
|
7682
7802
|
setEnvironment(environment) {
|
|
7683
7803
|
this.environment = environment ?? null;
|
|
7804
|
+
// the Configuration's proxy setting is the default of every backend call of the app
|
|
7805
|
+
setProxyEnvironment(this.environment);
|
|
7684
7806
|
}
|
|
7685
7807
|
/** The signed-in user the app handed over, or null. */
|
|
7686
7808
|
user() {
|
|
@@ -7731,7 +7853,7 @@ class RemoteListService {
|
|
|
7731
7853
|
throw new Error('Missing autocomplete endpoint URL');
|
|
7732
7854
|
}
|
|
7733
7855
|
return {
|
|
7734
|
-
url: backendUrl(call.url),
|
|
7856
|
+
url: backendUrl(call.url, proxyFor(config, this.environment)),
|
|
7735
7857
|
method: call.method,
|
|
7736
7858
|
params: call.params,
|
|
7737
7859
|
headers: config.passToken && userInfo?.token
|
|
@@ -7995,6 +8117,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7995
8117
|
}]
|
|
7996
8118
|
}], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1$2.Platform }] });
|
|
7997
8119
|
|
|
8120
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
8121
|
+
// - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
|
|
8122
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
8123
|
+
// - fix: a new page's layout replaces the untranslated copy - the copy of the page before was translated over it
|
|
8124
|
+
// (a detail page showed the list's cards); an empty copy is not written over a layout
|
|
8125
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
8126
|
+
// - fix: a card row with classes gets no display/width on the element - the class decides (it could never win)
|
|
8127
|
+
// - fix: classNames / getStyleWithoutClasses give every class of a style, not only the first (a text gave its first letter)
|
|
7998
8128
|
// Shuaib 2026-10-26
|
|
7999
8129
|
// - new: design mode (input design, output designChange): the Designer's canvas draws its card page with this
|
|
8000
8130
|
// container - sample records (sampleRecords), the page bar as the app shows it (withAppPagination), every element
|
|
@@ -8085,6 +8215,7 @@ class CardComponent {
|
|
|
8085
8215
|
requestService;
|
|
8086
8216
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
8087
8217
|
vlFieldKey = testFieldKey;
|
|
8218
|
+
vlFieldPath = testFieldPath;
|
|
8088
8219
|
vlAction = testAction;
|
|
8089
8220
|
vlWrites = testWrites;
|
|
8090
8221
|
// ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----
|
|
@@ -8222,6 +8353,8 @@ class CardComponent {
|
|
|
8222
8353
|
}
|
|
8223
8354
|
this.updateDeviceMode();
|
|
8224
8355
|
}
|
|
8356
|
+
/** The layout this card wrote last (translated) - any other is a new page's layout. */
|
|
8357
|
+
translatedLayout = null;
|
|
8225
8358
|
ngOnChanges(changes) {
|
|
8226
8359
|
if (this.design) {
|
|
8227
8360
|
// the canvas shows the layout as written with sample records: no translation, no data, no backend list
|
|
@@ -8256,10 +8389,15 @@ class CardComponent {
|
|
|
8256
8389
|
* start page). A copy is therefore also taken while it is still empty and the source is not.
|
|
8257
8390
|
*/
|
|
8258
8391
|
const hasContent = (value) => !!value && Object.keys(value).length > 0;
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8392
|
+
// a layout this card did not write itself (a new page's) is the new source - the copy of the page before stayed
|
|
8393
|
+
// when the new page first came with an empty layout, and the language pass wrote it over the new one (luv2shop:
|
|
8394
|
+
// the detail page of a mug showed the book list's cards, without its own elements)
|
|
8395
|
+
const layout = this.itemInfo?.layoutSchema;
|
|
8396
|
+
if (hasContent(layout) && layout !== this.translatedLayout) {
|
|
8397
|
+
this.layoutSchemaCopy = JSON.parse(JSON.stringify(layout));
|
|
8398
|
+
}
|
|
8399
|
+
else if (changes['itemInfo'] && !hasContent(layout)) {
|
|
8400
|
+
this.layoutSchemaCopy = {};
|
|
8263
8401
|
}
|
|
8264
8402
|
// a new page without header or footer clears the copy - before, the previous page's header (with
|
|
8265
8403
|
// its buttons, e.g. "Save All" that books) came back on the next language pass (#166, test F12)
|
|
@@ -8272,7 +8410,9 @@ class CardComponent {
|
|
|
8272
8410
|
if ((changes['selectedLanguageInfo'] || this.selectedLanguageInfo) && this.selectedLanguageInfo.selectedLanguage) {
|
|
8273
8411
|
this.itemInfo.footer = this.updatebuttonLanguage(this.footerSchemaCopy, this.selectedLanguageInfo.selectedLanguage);
|
|
8274
8412
|
this.itemInfo.header = this.updatebuttonLanguage(this.headerSchemaCopy, this.selectedLanguageInfo.selectedLanguage);
|
|
8275
|
-
|
|
8413
|
+
if (hasContent(this.layoutSchemaCopy)) {
|
|
8414
|
+
this.itemInfo.layoutSchema = this.translatedLayout = this.updateLayoutLanguage(this.layoutSchemaCopy, this.selectedLanguageInfo.selectedLanguage);
|
|
8415
|
+
}
|
|
8276
8416
|
}
|
|
8277
8417
|
}
|
|
8278
8418
|
onWindowResize() {
|
|
@@ -8653,6 +8793,10 @@ class CardComponent {
|
|
|
8653
8793
|
productSchema: this.itemInfo.propertySchema[this.getScope(scope)][property],
|
|
8654
8794
|
};
|
|
8655
8795
|
}
|
|
8796
|
+
/** Every class of a style as one class string (array or text) - only the first was set before. */
|
|
8797
|
+
classNames(style) {
|
|
8798
|
+
return styleParts(style).classes;
|
|
8799
|
+
}
|
|
8656
8800
|
getStyleWithoutClasses(styleObject) {
|
|
8657
8801
|
if (!styleObject) {
|
|
8658
8802
|
return {
|
|
@@ -8727,11 +8871,14 @@ class CardComponent {
|
|
|
8727
8871
|
getHorizontalLayoutStyle(layout) {
|
|
8728
8872
|
const baseStyle = this.getStyleWithoutClasses(layout?.style).style;
|
|
8729
8873
|
const responsiveStyle = this.getStyleWithoutClasses(layout?.responsiveStyle?.[this.deviceMode]).style;
|
|
8874
|
+
// a row with classes is laid out by them (the app's style.css): no grid or width set on the element, which
|
|
8875
|
+
// would win over the class (hotel's Edit/Delete stayed one below the other with .horizontalActionButton flex)
|
|
8876
|
+
const hasClasses = !!this.getStyleWithoutClasses(layout?.style).classes;
|
|
8730
8877
|
return {
|
|
8731
8878
|
...baseStyle,
|
|
8732
8879
|
...responsiveStyle,
|
|
8733
|
-
|
|
8734
|
-
|
|
8880
|
+
...(baseStyle.display || hasClasses ? {} : { display: 'grid' }),
|
|
8881
|
+
...(baseStyle.width || hasClasses ? {} : { width: '100%' }),
|
|
8735
8882
|
minWidth: '0',
|
|
8736
8883
|
boxSizing: 'border-box',
|
|
8737
8884
|
};
|
|
@@ -8840,7 +8987,7 @@ class CardComponent {
|
|
|
8840
8987
|
return resolveCustomKeyboardType(field?.option, property);
|
|
8841
8988
|
}
|
|
8842
8989
|
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$1.NzModalService }, { token: NotificationService }, { token: i7.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8843
|
-
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", design: "design" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange", designChange: "designChange" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollPaginationSentinel", first: true, predicate: ["scrollPaginationSentinel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n<div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n</div>\r\n} @else {\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 *ngTemplateOutlet=\"headerElement; context: { element: element }\"></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 <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\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}\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<!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n<ng-template #headerElement let-element=\"element\">\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 (element.label?.value || element.label?.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</ng-template>\r\n<!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n<ng-template #cardBody let-record=\"record\">\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</ng-template>\r\n<!-- the card page's footer -->\r\n<ng-template #cardFooter>\r\n <div [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 (element.label?.value || element.label?.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 (element.label?.value || element.label?.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]=\"(element.option?.customDisplayFormat || '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</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-grid-item>div{margin-left:auto;margin-right:auto}.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}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { 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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: 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"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }] });
|
|
8990
|
+
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", design: "design" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange", designChange: "designChange" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, 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-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 @if (design) {\r\n <!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n <div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\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 !scrollPagination\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 [attr.data-vl-path]=\"vlFieldPath(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 *ngTemplateOutlet=\"headerElement; context: { element: element }\"></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 <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\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 }\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 <!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n <ng-template #headerElement let-element=\"element\">\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]=\"classNames(element.label?.style)\">\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]=\"classNames(element?.label?.style)\">\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]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.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]=\"classNames(element?.scope?.style) || ''\" [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 </ng-template>\r\n <!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n <ng-template #cardBody let-record=\"record\">\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 </ng-template>\r\n <!-- the card page's footer -->\r\n <ng-template #cardFooter>\r\n <div [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]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.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]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.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]=\"(element.option?.customDisplayFormat || '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 </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-grid-item>div{margin-left:auto;margin-right:auto}.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}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { 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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: 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"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }] });
|
|
8844
8991
|
}
|
|
8845
8992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, decorators: [{
|
|
8846
8993
|
type: Component,
|
|
@@ -8859,7 +9006,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
8859
9006
|
DragDropModule,
|
|
8860
9007
|
DesignBarComponent,
|
|
8861
9008
|
DropMarkerComponent,
|
|
8862
|
-
], standalone: true, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n<div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n</div>\r\n} @else {\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 *ngTemplateOutlet=\"headerElement; context: { element: element }\"></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 <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\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}\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<!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n<ng-template #headerElement let-element=\"element\">\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 (element.label?.value || element.label?.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</ng-template>\r\n<!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n<ng-template #cardBody let-record=\"record\">\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</ng-template>\r\n<!-- the card page's footer -->\r\n<ng-template #cardFooter>\r\n <div [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 (element.label?.value || element.label?.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 (element.label?.value || element.label?.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]=\"(element.option?.customDisplayFormat || '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</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-grid-item>div{margin-left:auto;margin-right:auto}.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}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
9009
|
+
], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 @if (design) {\r\n <!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n <div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\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 !scrollPagination\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 [attr.data-vl-path]=\"vlFieldPath(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 *ngTemplateOutlet=\"headerElement; context: { element: element }\"></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 <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\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 }\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 <!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n <ng-template #headerElement let-element=\"element\">\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]=\"classNames(element.label?.style)\">\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]=\"classNames(element?.label?.style)\">\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]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.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]=\"classNames(element?.scope?.style) || ''\" [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 </ng-template>\r\n <!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n <ng-template #cardBody let-record=\"record\">\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 </ng-template>\r\n <!-- the card page's footer -->\r\n <ng-template #cardFooter>\r\n <div [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]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.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]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.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]=\"(element.option?.customDisplayFormat || '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 </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-grid-item>div{margin-left:auto;margin-right:auto}.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}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
8863
9010
|
}], ctorParameters: () => [{ type: UtilityService }, { type: i1$2.Platform }, { type: i1$1.HttpClient }, { type: ConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i5$1.NzModalService }, { type: NotificationService }, { type: i7.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
|
|
8864
9011
|
type: Input
|
|
8865
9012
|
}], pageData: [{
|
|
@@ -9247,6 +9394,8 @@ function lockHint(option, reason, translations) {
|
|
|
9247
9394
|
return translations?.[text.trim()] || text.trim();
|
|
9248
9395
|
}
|
|
9249
9396
|
|
|
9397
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
9398
|
+
// - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
|
|
9250
9399
|
// Shuaib 2026-10-26
|
|
9251
9400
|
// - new: design mode (input design, output designChange): the Designer's canvas draws its form with this container -
|
|
9252
9401
|
// every section (conditional ones marked) and field with drag, edit and delete (SectionDesigner), no translation
|
|
@@ -9304,6 +9453,7 @@ function lockHint(option, reason, translations) {
|
|
|
9304
9453
|
class FormComponent {
|
|
9305
9454
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
9306
9455
|
vlFieldKey = testFieldKey;
|
|
9456
|
+
vlFieldPath = testFieldPath;
|
|
9307
9457
|
// ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----
|
|
9308
9458
|
remoteLists = inject(RemoteListService);
|
|
9309
9459
|
/** Loaded lists by field reference. */
|
|
@@ -9782,11 +9932,11 @@ class FormComponent {
|
|
|
9782
9932
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
9783
9933
|
}
|
|
9784
9934
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9785
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", design: "design" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent", signIn: "signIn", designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\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 || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\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 [class.field-row--locked]=\"isLocked(formField, formRef)\">\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 [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\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 </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\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}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.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", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
9935
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", design: "design" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent", signIn: "signIn", designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\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 || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\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 [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\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 </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\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}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.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", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
9786
9936
|
}
|
|
9787
9937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, decorators: [{
|
|
9788
9938
|
type: Component,
|
|
9789
|
-
args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent, DragDropModule, DesignBarComponent, DropMarkerComponent], selector: 'vl-form', template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\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 || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\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 [class.field-row--locked]=\"isLocked(formField, formRef)\">\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 [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\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 </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\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}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
9939
|
+
args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent, DragDropModule, DesignBarComponent, DropMarkerComponent], selector: 'vl-form', template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\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 || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\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 [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\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 </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\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}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
9790
9940
|
}], propDecorators: { errorMessages: [{
|
|
9791
9941
|
type: Input
|
|
9792
9942
|
}], creditCardError: [{
|
|
@@ -9880,6 +10030,16 @@ function replaceColumn(layout, index, column) {
|
|
|
9880
10030
|
return next;
|
|
9881
10031
|
}
|
|
9882
10032
|
|
|
10033
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
10034
|
+
// - new: scrollPagination - the table's end in view asks for its next page, like the cards (a backend table showed
|
|
10035
|
+
// only its first page: luv2shop Coffee Mugs List 5 of 13)
|
|
10036
|
+
// - fix: upsertAction fills the address per click (the layout's data_url was overwritten), takes the server's
|
|
10037
|
+
// record or option.afterSuccessSet and updates only this row (markForCheck) - it wrote a fixed "APPROVED"
|
|
10038
|
+
// - fix: cellStyle - a row's cell keeps display table-cell (an image column's display: block moved the columns)
|
|
10039
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
10040
|
+
// - fix: classNames / getStyleWithoutClasses give every class of a style, not only the first (a text gave its first letter)
|
|
10041
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
10042
|
+
// - change: the grid's call hands its option on - the proxy follows option.proxy / the Configuration
|
|
9883
10043
|
// Shuaib 2026-10-26
|
|
9884
10044
|
// - new: design mode (input design, output designChange): the Designer's canvas draws its grid page with this
|
|
9885
10045
|
// container - sample rows, the page bar as the app shows it, every column with drag, edit, delete and resize;
|
|
@@ -9973,7 +10133,25 @@ class GridComponent {
|
|
|
9973
10133
|
picker = inject(DateTimePickerService);
|
|
9974
10134
|
host = inject((ElementRef));
|
|
9975
10135
|
cdr = inject(ChangeDetectorRef);
|
|
10136
|
+
/** Watches the element under the table; in view (with 250px ahead) it asks for the next page. */
|
|
10137
|
+
observeEnd(el) {
|
|
10138
|
+
this.endObserver?.disconnect();
|
|
10139
|
+
this.endElement = el;
|
|
10140
|
+
if (!el || typeof IntersectionObserver === 'undefined')
|
|
10141
|
+
return;
|
|
10142
|
+
this.endObserver = new IntersectionObserver((entries) => {
|
|
10143
|
+
if (!entries[0]?.isIntersecting || !this.scrollPagination)
|
|
10144
|
+
return;
|
|
10145
|
+
const next = Number(this.currentPage) + 1;
|
|
10146
|
+
if (next >= (this.pages?.length ?? 0) || this.askedPage === next)
|
|
10147
|
+
return;
|
|
10148
|
+
this.askedPage = next;
|
|
10149
|
+
this.onPageChange.emit(next);
|
|
10150
|
+
}, { root: null, rootMargin: '0px 0px 250px 0px', threshold: 0 });
|
|
10151
|
+
this.endObserver.observe(el.nativeElement);
|
|
10152
|
+
}
|
|
9976
10153
|
ngOnDestroy() {
|
|
10154
|
+
this.endObserver?.disconnect();
|
|
9977
10155
|
this.stopResize();
|
|
9978
10156
|
this.picker.closeIfWithin(this.host.nativeElement);
|
|
9979
10157
|
this.sideHintObserver?.disconnect();
|
|
@@ -10024,6 +10202,12 @@ class GridComponent {
|
|
|
10024
10202
|
pageSize = 5;
|
|
10025
10203
|
currentPage = 0;
|
|
10026
10204
|
pages = [];
|
|
10205
|
+
/** The table pages by scrolling: its end in view asks for the next page (onPageChange). */
|
|
10206
|
+
scrollPagination = false;
|
|
10207
|
+
set scrollSentinel(el) { this.observeEnd(el); }
|
|
10208
|
+
endObserver;
|
|
10209
|
+
endElement;
|
|
10210
|
+
askedPage = -1;
|
|
10027
10211
|
userInfo;
|
|
10028
10212
|
/** A page from browser storage or a filter (A4): its records, delete and paging go through PageData. */
|
|
10029
10213
|
pageData = null;
|
|
@@ -10111,6 +10295,12 @@ class GridComponent {
|
|
|
10111
10295
|
this.refreshDesign();
|
|
10112
10296
|
return;
|
|
10113
10297
|
}
|
|
10298
|
+
// a page was added: watching anew asks again while the end is still in view (a short list loads to its end)
|
|
10299
|
+
// (also when new rows came: an early ask before the list had loaded was lost and blocked the next one)
|
|
10300
|
+
if ((changes['currentPage'] || changes['tableitemInfo'] || changes['pages']) && this.endElement) {
|
|
10301
|
+
this.askedPage = -1;
|
|
10302
|
+
queueMicrotask(() => this.observeEnd(this.endElement));
|
|
10303
|
+
}
|
|
10114
10304
|
// Backend lists of fields with option.autocomplete (any data type, any control).
|
|
10115
10305
|
if ((changes['tableitemInfo'] || changes['form']) && this.tableitemInfo) {
|
|
10116
10306
|
void this.loadRemoteLists([this.tableitemInfo.layoutSchema, this.form?.layoutSchema], this.form?.propertySchema ?? this.tableitemInfo.propertySchema);
|
|
@@ -10206,7 +10396,13 @@ class GridComponent {
|
|
|
10206
10396
|
}
|
|
10207
10397
|
/** A cell: the column's scope style, the row's stripe, the column's size. */
|
|
10208
10398
|
cellStyle(column, index) {
|
|
10209
|
-
|
|
10399
|
+
// A column or stripe must not take its cell out of the table's layout.
|
|
10400
|
+
const { display, ...style } = {
|
|
10401
|
+
...this.getStyleWithoutClasses(column?.scope?.style).style,
|
|
10402
|
+
...this.rowStyleOf(index),
|
|
10403
|
+
...this.columnSize(column),
|
|
10404
|
+
};
|
|
10405
|
+
return style;
|
|
10210
10406
|
}
|
|
10211
10407
|
// ---- design mode ----
|
|
10212
10408
|
/** The sample rows and the page bar of the canvas, from the layout as it is now. */
|
|
@@ -10343,12 +10539,16 @@ class GridComponent {
|
|
|
10343
10539
|
}
|
|
10344
10540
|
return propertyScope;
|
|
10345
10541
|
}
|
|
10542
|
+
/** Every class of a style as one class string (array or text) - only the first was set before. */
|
|
10543
|
+
classNames(style) {
|
|
10544
|
+
return styleParts(style).classes;
|
|
10545
|
+
}
|
|
10346
10546
|
getStyleWithoutClasses(styleObject) {
|
|
10347
10547
|
if (!styleObject) {
|
|
10348
10548
|
return { classes: '', style: {} };
|
|
10349
10549
|
}
|
|
10350
10550
|
const { classes, ...styleWithoutClasses } = styleObject;
|
|
10351
|
-
return { classes:
|
|
10551
|
+
return { classes: styleParts(styleObject).classes, style: styleWithoutClasses };
|
|
10352
10552
|
}
|
|
10353
10553
|
onScrollEvent(event) {
|
|
10354
10554
|
this.onGridScroll.emit(event);
|
|
@@ -10359,30 +10559,33 @@ class GridComponent {
|
|
|
10359
10559
|
invokeGridBtnClick(option, propertySchema) {
|
|
10360
10560
|
this.gridButtonClick.emit({ option: option, propertySchema: propertySchema });
|
|
10361
10561
|
}
|
|
10562
|
+
/**
|
|
10563
|
+
* An action icon of a row (save / delete of an action column) calls its address. The address is filled per click
|
|
10564
|
+
* from the layout ({{field}} = the row's field) - the layout's own option stays as it is (it was overwritten, a
|
|
10565
|
+
* second row called the first row's id). After success only this row changes: the record the server answers, else
|
|
10566
|
+
* the values the action sets (option.afterSuccessSet, chosen in the Designer) - no value is fixed here (it wrote
|
|
10567
|
+
* "APPROVED", also when rejecting).
|
|
10568
|
+
*/
|
|
10362
10569
|
upsertAction(option, data) {
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
const matches = [...url.matchAll(regex)].map(m => m[1]);
|
|
10367
|
-
if (matches && data && data[matches[0]]) {
|
|
10368
|
-
option.data_url = url.replace(`{{${matches[0]}}}`, data[matches[0]]);
|
|
10369
|
-
}
|
|
10370
|
-
}
|
|
10371
|
-
let baseUrl = this.environment?.apiUrl + option.data_url;
|
|
10372
|
-
this.requestService.dynamicCall(option.method, {}, baseUrl, option?.passToken, this.projectSeleted, this.userInfo).subscribe((res) => {
|
|
10373
|
-
console.log('res: ', res);
|
|
10570
|
+
const url = String(option?.data_url ?? '').replace(/{{\s*(.*?)\s*}}/g, (all, field) => data?.[field] !== undefined && data?.[field] !== null ? encodeURIComponent(String(data[field])) : all);
|
|
10571
|
+
const baseUrl = this.environment?.apiUrl + url;
|
|
10572
|
+
this.requestService.dynamicCall(option.method, {}, baseUrl, option?.passToken, this.projectSeleted, this.userInfo, { ...option, data_url: url }).subscribe((res) => {
|
|
10374
10573
|
if (option?.reload) {
|
|
10375
10574
|
window.location.reload();
|
|
10575
|
+
return;
|
|
10376
10576
|
}
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
}
|
|
10577
|
+
const success = option?.notification?.success ?? option?.notifcation?.success;
|
|
10578
|
+
if (success)
|
|
10579
|
+
this.notificationService.success(success);
|
|
10580
|
+
// the row: the answer when it is this record (same id), else the values the action sets
|
|
10581
|
+
const key = option?.key || 'id';
|
|
10582
|
+
if (res && typeof res === 'object' && !Array.isArray(res) && res[key] !== undefined && String(res[key]) === String(data?.[key])) {
|
|
10583
|
+
Object.assign(data, res);
|
|
10385
10584
|
}
|
|
10585
|
+
else if (option?.afterSuccessSet && typeof option.afterSuccessSet === 'object') {
|
|
10586
|
+
Object.assign(data, option.afterSuccessSet);
|
|
10587
|
+
}
|
|
10588
|
+
this.cdr.markForCheck();
|
|
10386
10589
|
});
|
|
10387
10590
|
}
|
|
10388
10591
|
setActionColumn(option, data) {
|
|
@@ -10861,7 +11064,7 @@ class GridComponent {
|
|
|
10861
11064
|
return this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() || '']?.type ?? '';
|
|
10862
11065
|
}
|
|
10863
11066
|
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 });
|
|
10864
|
-
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", design: "design" }, outputs: { editRow: "editRow", designChange: "designChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\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@if (design) {\r\n<!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n<div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n</div>\r\n} @else {\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 <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\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(tableitemInfo?.layoutSchema?.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 [ngStyle]=\"columnSize(column)\"\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\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\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 <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\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 {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\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\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</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)\">✎</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<ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n</ng-container>\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}\r\n<!-- the search box above the table (layoutSchema.search) -->\r\n<ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"searchPositionClass\">\r\n <div class=\"grid-search-box\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <span *ngIf=\"searchText\" nz-icon nzType=\"close-circle\" class=\"grid-search-clear\" (click)=\"searchText = ''\"></span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n<ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @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</ng-template>\r\n<!-- the table's footer -->\r\n<ng-template #gridFooter>\r\n<div 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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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</ng-template>\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}.grid-toolbar{width:100%;display:flex;margin-bottom:14px}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.grid-search-box{position:relative;width:100%;max-width:320px}.grid-search-input{width:100%;height:40px;padding:0 38px;border:1px solid #d0d5dd;border-radius:var(--radius-sm, 6px);outline:none;font-size:14px;background:#fff;box-sizing:border-box;transition:border-color .18s ease,box-shadow .18s ease}.grid-search-input:focus{border-color:#98a2b3;box-shadow:0 0 0 3px #1118270f}.grid-search-icon,.grid-search-clear{position:absolute;top:50%;transform:translateY(-50%);color:#98a2b3;font-size:14px}.grid-search-icon{left:12px}.grid-search-clear{right:12px;cursor:pointer}.grid-search-clear:hover{color:#475467}.vl-d-th{position:relative;cursor:pointer;border-radius:0;outline-offset:-2px}.vl-d-th .vl-d-bar{top:2px;right:4px}.vl-d-resize{position:absolute;z-index:25;opacity:0;transition:opacity .15s ease,background-color .15s ease}.vl-d-th:hover .vl-d-resize{opacity:1}.vl-d-resize--width{top:0;right:-3px;width:6px;height:100%;cursor:col-resize}.vl-d-resize--height{left:0;bottom:-3px;width:100%;height:6px;cursor:row-resize}.vl-d-resize:hover{background:#1890ff59}.vl-d-grid-empty{min-height:120px}.vl-d-cell{cursor:default}th.cdk-drag-preview{display:flex;align-items:center;padding:12px 16px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 10px 24px #0f172a29}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { 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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: 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.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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }] });
|
|
11067
|
+
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", scrollPagination: "scrollPagination", userInfo: "userInfo", pageData: "pageData", design: "design" }, outputs: { editRow: "editRow", designChange: "designChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollSentinel", first: true, predicate: ["scrollSentinel"], descendants: true }, { propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\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 @if (design) {\r\n <!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n <div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" 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 <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\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(tableitemInfo?.layoutSchema?.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 [ngStyle]=\"columnSize(column)\"\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 [ngModelOptions]=\"{ standalone: true }\"\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\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\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 <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\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 {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\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\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</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)\">✎</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 <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !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 }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"searchPositionClass\">\r\n <div class=\"grid-search-box\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <span *ngIf=\"searchText\" nz-icon nzType=\"close-circle\" class=\"grid-search-clear\" (click)=\"searchText = ''\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n <ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @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]=\"classNames(col.option?.save?.style)\"\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]=\"classNames(col.option?.delete?.style)\"\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]=\"classNames(col?.label?.style)\">\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 </ng-template>\r\n <!-- the table's footer -->\r\n <ng-template #gridFooter>\r\n <div 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]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField.scope?.style) ?? ''\"></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 </ng-template>\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}.grid-toolbar{width:100%;display:flex;margin-bottom:14px}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.grid-search-box{position:relative;width:100%;max-width:320px}.grid-search-input{width:100%;height:40px;padding:0 38px;border:1px solid #d0d5dd;border-radius:var(--radius-sm, 6px);outline:none;font-size:14px;background:#fff;box-sizing:border-box;transition:border-color .18s ease,box-shadow .18s ease}.grid-search-input:focus{border-color:#98a2b3;box-shadow:0 0 0 3px #1118270f}.grid-search-icon,.grid-search-clear{position:absolute;top:50%;transform:translateY(-50%);color:#98a2b3;font-size:14px}.grid-search-icon{left:12px}.grid-search-clear{right:12px;cursor:pointer}.grid-search-clear:hover{color:#475467}.vl-d-th{position:relative;cursor:pointer;border-radius:0;outline-offset:-2px}.vl-d-th .vl-d-bar{top:2px;right:4px}.vl-d-resize{position:absolute;z-index:25;opacity:0;transition:opacity .15s ease,background-color .15s ease}.vl-d-th:hover .vl-d-resize{opacity:1}.vl-d-resize--width{top:0;right:-3px;width:6px;height:100%;cursor:col-resize}.vl-d-resize--height{left:0;bottom:-3px;width:100%;height:6px;cursor:row-resize}.vl-d-resize:hover{background:#1890ff59}.vl-d-grid-empty{min-height:120px}.vl-d-cell{cursor:default}th.cdk-drag-preview{display:flex;align-items:center;padding:12px 16px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 10px 24px #0f172a29}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { 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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: 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.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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }] });
|
|
10865
11068
|
}
|
|
10866
11069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, decorators: [{
|
|
10867
11070
|
type: Component,
|
|
@@ -10887,7 +11090,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
10887
11090
|
CustomKeyboardDirective,
|
|
10888
11091
|
DragDropModule,
|
|
10889
11092
|
DesignBarComponent,
|
|
10890
|
-
], selector: 'vl-grid', template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\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@if (design) {\r\n<!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n<div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n</div>\r\n} @else {\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 <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\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(tableitemInfo?.layoutSchema?.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 [ngStyle]=\"columnSize(column)\"\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\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\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 <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\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 {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\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\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</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)\">✎</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<ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n</ng-container>\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}\r\n<!-- the search box above the table (layoutSchema.search) -->\r\n<ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"searchPositionClass\">\r\n <div class=\"grid-search-box\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <span *ngIf=\"searchText\" nz-icon nzType=\"close-circle\" class=\"grid-search-clear\" (click)=\"searchText = ''\"></span>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n<ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @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</ng-template>\r\n<!-- the table's footer -->\r\n<ng-template #gridFooter>\r\n<div 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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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 (tableField.label?.value || tableField.label?.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</ng-template>\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}.grid-toolbar{width:100%;display:flex;margin-bottom:14px}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.grid-search-box{position:relative;width:100%;max-width:320px}.grid-search-input{width:100%;height:40px;padding:0 38px;border:1px solid #d0d5dd;border-radius:var(--radius-sm, 6px);outline:none;font-size:14px;background:#fff;box-sizing:border-box;transition:border-color .18s ease,box-shadow .18s ease}.grid-search-input:focus{border-color:#98a2b3;box-shadow:0 0 0 3px #1118270f}.grid-search-icon,.grid-search-clear{position:absolute;top:50%;transform:translateY(-50%);color:#98a2b3;font-size:14px}.grid-search-icon{left:12px}.grid-search-clear{right:12px;cursor:pointer}.grid-search-clear:hover{color:#475467}.vl-d-th{position:relative;cursor:pointer;border-radius:0;outline-offset:-2px}.vl-d-th .vl-d-bar{top:2px;right:4px}.vl-d-resize{position:absolute;z-index:25;opacity:0;transition:opacity .15s ease,background-color .15s ease}.vl-d-th:hover .vl-d-resize{opacity:1}.vl-d-resize--width{top:0;right:-3px;width:6px;height:100%;cursor:col-resize}.vl-d-resize--height{left:0;bottom:-3px;width:100%;height:6px;cursor:row-resize}.vl-d-resize:hover{background:#1890ff59}.vl-d-grid-empty{min-height:120px}.vl-d-cell{cursor:default}th.cdk-drag-preview{display:flex;align-items:center;padding:12px 16px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 10px 24px #0f172a29}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
11093
|
+
], selector: 'vl-grid', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- 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 - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\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 @if (design) {\r\n <!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n <div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" 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 <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\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(tableitemInfo?.layoutSchema?.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 [ngStyle]=\"columnSize(column)\"\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 [ngModelOptions]=\"{ standalone: true }\"\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\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\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 <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\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 {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\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\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</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)\">✎</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 <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !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 }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"searchPositionClass\">\r\n <div class=\"grid-search-box\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <span *ngIf=\"searchText\" nz-icon nzType=\"close-circle\" class=\"grid-search-clear\" (click)=\"searchText = ''\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n <ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @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]=\"classNames(col.option?.save?.style)\"\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]=\"classNames(col.option?.delete?.style)\"\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]=\"classNames(col?.label?.style)\">\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 </ng-template>\r\n <!-- the table's footer -->\r\n <ng-template #gridFooter>\r\n <div 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]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.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]=\"classNames(tableField.scope?.style) ?? ''\"></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 </ng-template>\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}.grid-toolbar{width:100%;display:flex;margin-bottom:14px}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.grid-search-box{position:relative;width:100%;max-width:320px}.grid-search-input{width:100%;height:40px;padding:0 38px;border:1px solid #d0d5dd;border-radius:var(--radius-sm, 6px);outline:none;font-size:14px;background:#fff;box-sizing:border-box;transition:border-color .18s ease,box-shadow .18s ease}.grid-search-input:focus{border-color:#98a2b3;box-shadow:0 0 0 3px #1118270f}.grid-search-icon,.grid-search-clear{position:absolute;top:50%;transform:translateY(-50%);color:#98a2b3;font-size:14px}.grid-search-icon{left:12px}.grid-search-clear{right:12px;cursor:pointer}.grid-search-clear:hover{color:#475467}.vl-d-th{position:relative;cursor:pointer;border-radius:0;outline-offset:-2px}.vl-d-th .vl-d-bar{top:2px;right:4px}.vl-d-resize{position:absolute;z-index:25;opacity:0;transition:opacity .15s ease,background-color .15s ease}.vl-d-th:hover .vl-d-resize{opacity:1}.vl-d-resize--width{top:0;right:-3px;width:6px;height:100%;cursor:col-resize}.vl-d-resize--height{left:0;bottom:-3px;width:100%;height:6px;cursor:row-resize}.vl-d-resize:hover{background:#1890ff59}.vl-d-grid-empty{min-height:120px}.vl-d-cell{cursor:default}th.cdk-drag-preview{display:flex;align-items:center;padding:12px 16px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 10px 24px #0f172a29}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
10891
11094
|
}], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4.OktaAuthStateService }], propDecorators: { errorMessages: [{
|
|
10892
11095
|
type: Input
|
|
10893
11096
|
}], environment: [{
|
|
@@ -10910,6 +11113,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
10910
11113
|
type: Input
|
|
10911
11114
|
}], pages: [{
|
|
10912
11115
|
type: Input
|
|
11116
|
+
}], scrollPagination: [{
|
|
11117
|
+
type: Input
|
|
11118
|
+
}], scrollSentinel: [{
|
|
11119
|
+
type: ViewChild,
|
|
11120
|
+
args: ['scrollSentinel']
|
|
10913
11121
|
}], userInfo: [{
|
|
10914
11122
|
type: Input
|
|
10915
11123
|
}], pageData: [{
|
|
@@ -10947,6 +11155,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
10947
11155
|
type: Output
|
|
10948
11156
|
}] } });
|
|
10949
11157
|
|
|
11158
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
11159
|
+
// - change: a free header (OFFENE-PUNKTE 117): kindOf names an element's kind (image, text, button, search, cart,
|
|
11160
|
+
// user, group) from its control, older headers by their field name; isShown (visible, islogin); captionOf;
|
|
11161
|
+
// userInfo in - the user element shows the signed-in name; a group's elements and every image element load
|
|
11162
|
+
// their picture (not only a field named logo); a picture already given as data: or http(s) is not fetched
|
|
11163
|
+
// from the database again (luv2shop: GET .../data%3Aimage... failed on every start)
|
|
11164
|
+
// - fix: classNames - the classes of a header style (style.classes) reach the elements; they were ignored
|
|
10950
11165
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
|
|
10951
11166
|
// - fix: the header logo is drawn once loaded (markForCheck after setHeaderItems) - without zone.js it
|
|
10952
11167
|
// kept the file path "Media/favicon.ico" and showed a broken image
|
|
@@ -10976,6 +11191,8 @@ class HeaderMenuComponent {
|
|
|
10976
11191
|
environment;
|
|
10977
11192
|
tenantName;
|
|
10978
11193
|
projectSeleted;
|
|
11194
|
+
/** The signed-in user - its name for the user element. */
|
|
11195
|
+
userInfo = null;
|
|
10979
11196
|
cartInfo = {
|
|
10980
11197
|
items: [],
|
|
10981
11198
|
totalPrice: 0,
|
|
@@ -11043,21 +11260,58 @@ class HeaderMenuComponent {
|
|
|
11043
11260
|
const { classes, ...styleWithoutClasses } = styleObject;
|
|
11044
11261
|
return styleWithoutClasses;
|
|
11045
11262
|
}
|
|
11263
|
+
/** The classes of a style (style.classes), for [ngClass] beside getStyle. */
|
|
11264
|
+
classNames(styleObject) {
|
|
11265
|
+
return styleParts(styleObject).classes;
|
|
11266
|
+
}
|
|
11046
11267
|
isVisible(header) {
|
|
11047
11268
|
return header?.option?.visible !== false;
|
|
11048
11269
|
}
|
|
11049
|
-
|
|
11050
|
-
|
|
11270
|
+
/** The kinds of header elements; a group holds elements of its own. */
|
|
11271
|
+
static KINDS = ['image', 'text', 'button', 'search', 'cart', 'user', 'group'];
|
|
11272
|
+
/** An element's kind: its control, else (older headers) its field name or its cart action; else a button. */
|
|
11273
|
+
kindOf(header) {
|
|
11274
|
+
const control = String(header?.control ?? '').trim();
|
|
11275
|
+
if (control === 'logo')
|
|
11276
|
+
return 'image';
|
|
11277
|
+
if (control === 'link')
|
|
11278
|
+
return 'button';
|
|
11279
|
+
if (HeaderMenuComponent.KINDS.includes(control))
|
|
11280
|
+
return control;
|
|
11281
|
+
if (Array.isArray(header?.elements))
|
|
11282
|
+
return 'group';
|
|
11283
|
+
const name = String(header?.scope?.reference ?? '').split('/').pop();
|
|
11284
|
+
if (name === 'logo')
|
|
11285
|
+
return 'image';
|
|
11286
|
+
if (name === 'searchInput')
|
|
11287
|
+
return 'search';
|
|
11288
|
+
if (header?.option?.action === 'cart')
|
|
11289
|
+
return 'cart';
|
|
11290
|
+
return 'button';
|
|
11291
|
+
}
|
|
11292
|
+
/** Shown: visible, and - with islogin - only signed in (true) or only signed out (false). */
|
|
11293
|
+
isShown(header) {
|
|
11294
|
+
if (!this.isVisible(header))
|
|
11051
11295
|
return false;
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
if (header?.option?.islogin === false) {
|
|
11057
|
-
return !this.isLogined;
|
|
11058
|
-
}
|
|
11296
|
+
if (header?.option?.islogin === true)
|
|
11297
|
+
return this.signedIn();
|
|
11298
|
+
if (header?.option?.islogin === false)
|
|
11299
|
+
return !this.signedIn();
|
|
11059
11300
|
return true;
|
|
11060
11301
|
}
|
|
11302
|
+
/** The text of an element: label.caption, an older label text or caption. */
|
|
11303
|
+
captionOf(header) {
|
|
11304
|
+
const label = header?.label;
|
|
11305
|
+
const text = typeof label === 'string' ? label : label?.caption ?? header?.caption;
|
|
11306
|
+
return typeof text === 'string' ? text : '';
|
|
11307
|
+
}
|
|
11308
|
+
signedIn() {
|
|
11309
|
+
return this.isLogined || isSignedIn(this.userInfo);
|
|
11310
|
+
}
|
|
11311
|
+
/** The name of the signed-in user (name, else email). */
|
|
11312
|
+
userName() {
|
|
11313
|
+
return String(this.userInfo?.name || this.userInfo?.email || this.userInfo?.preferred_username || '');
|
|
11314
|
+
}
|
|
11061
11315
|
invokeSearchedItems(option, search) {
|
|
11062
11316
|
this.searchItems.emit({ option: option, search: search });
|
|
11063
11317
|
}
|
|
@@ -11068,36 +11322,38 @@ class HeaderMenuComponent {
|
|
|
11068
11322
|
this.showTableContent.emit(option);
|
|
11069
11323
|
}
|
|
11070
11324
|
async setHeaderItems(items) {
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
let projectName = `${this.tenantName}_${this.projectSeleted}`;
|
|
11085
|
-
const image = await this.couchdbService.getImageSrcFromCouchDb(projectName, `${logoUrl}`);
|
|
11325
|
+
const projectName = `${this.tenantName}_${this.projectSeleted}`;
|
|
11326
|
+
const load = async (list) => {
|
|
11327
|
+
for (const item of list || []) {
|
|
11328
|
+
if (Array.isArray(item?.elements))
|
|
11329
|
+
await load(item.elements);
|
|
11330
|
+
if (this.kindOf(item) !== 'image' || !this.projectSeleted)
|
|
11331
|
+
continue;
|
|
11332
|
+
const src = String(item?.option?.src ?? '');
|
|
11333
|
+
// a picture of Media (a path) is fetched; one given as data: or an address is used as it is
|
|
11334
|
+
if (!src || /^(data:|https?:|blob:)/i.test(src))
|
|
11335
|
+
continue;
|
|
11336
|
+
try {
|
|
11337
|
+
const image = await this.couchdbService.getImageSrcFromCouchDb(projectName, src);
|
|
11086
11338
|
item.option.src = this.utilityService.getMediaSrc(image);
|
|
11087
11339
|
}
|
|
11340
|
+
catch (error) {
|
|
11341
|
+
console.warn('[header] the picture could not be loaded', src, error);
|
|
11342
|
+
}
|
|
11088
11343
|
}
|
|
11089
|
-
}
|
|
11344
|
+
};
|
|
11345
|
+
await load(items);
|
|
11090
11346
|
return items;
|
|
11091
11347
|
}
|
|
11092
11348
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: i4.OktaAuthStateService }, { token: RequestService }, { token: UtilityService }, { token: Couchdb }, { token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
11093
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: HeaderMenuComponent, isStandalone: true, selector: "vl-header-menu", inputs: { headerItems: "headerItems", headerLayout: "headerLayout", environment: "environment", tenantName: "tenantName", projectSeleted: "projectSeleted", cartInfo: "cartInfo" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-
|
|
11349
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: HeaderMenuComponent, isStandalone: true, selector: "vl-header-menu", inputs: { headerItems: "headerItems", headerLayout: "headerLayout", environment: "environment", tenantName: "tenantName", projectSeleted: "projectSeleted", userInfo: "userInfo", cartInfo: "cartInfo" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the cart carries data-vl-action=\"cart\" for the test runners (step cart)\r\n - change: the header is a free container (OFFENE-PUNKTE 117, user: \"any elements - why should I prescribe it to\r\n the customer\"). An element is drawn by its kind (kindOf: control image, text, button, search, cart, user,\r\n group), no longer by a fixed field name; a group holds elements of its own, so any arrangement is possible.\r\n Older headers (scope.reference logo / searchInput, control or action cart, a plain button) are read as\r\n image / search / cart / button. Every part takes its style and its classes (style.classes) - the classes\r\n were left out before, a header could not be styled from style.css -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: headerItems }\"></ng-container>\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements>\r\n <ng-container *ngFor=\"let header of elements\">\r\n @if (isShown(header)) {\r\n @switch (kindOf(header)) {\r\n\r\n <!-- Image (a logo) -->\r\n @case ('image') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <img [src]=\"header.option?.src\" [alt]=\"header.alt || header.label?.caption || ''\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n </div>\r\n }\r\n\r\n <!-- Text -->\r\n @case ('text') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n </div>\r\n }\r\n\r\n <!-- Search: field and magnifier -->\r\n @case ('search') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <input #search type=\"text\" [placeholder]=\"header.option?.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n <button *ngIf=\"header.option?.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!captionOf(header); else searchCaption\">\r\n <i nz-icon [nzType]=\"header.icon || 'search'\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #searchCaption>{{ captionOf(header) }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Cart: total, quantity, icon -->\r\n @case ('cart') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n data-vl-action=\"cart\" data-vl-writes=\"false\" (click)=\"invokeShowtableContent(header.option)\">\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n </div>\r\n }\r\n\r\n <!-- User: the signed-in name and sign out, or sign in -->\r\n @case ('user') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n @if (signedIn()) {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ userName() }}</span>\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'logout' })\" data-vl-action=\"logout\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signOutText || 'Sign out' }}\r\n </button>\r\n } @else {\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'login' })\" data-vl-action=\"login\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signInText || 'Sign in' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Group: elements of its own, side by side or as its classes say -->\r\n @case ('group') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [] }\"></ng-container>\r\n </div>\r\n }\r\n\r\n <!-- Button (a link to a page, sign in / out, any menu action) -->\r\n @default {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\" [attr.data-vl-action]=\"vlAction(header.option)\" [attr.data-vl-writes]=\"vlWrites(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n @if (header.icon) {<i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>}\r\n @if (captionOf(header)) {<span>{{ captionOf(header) }}</span>}\r\n </button>\r\n </div>\r\n }\r\n }\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }] });
|
|
11094
11350
|
}
|
|
11095
11351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
|
|
11096
11352
|
type: Component,
|
|
11097
11353
|
args: [{ standalone: true, imports: [
|
|
11098
11354
|
CommonModule,
|
|
11099
11355
|
NzIconModule
|
|
11100
|
-
], selector: 'vl-header-menu', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-
|
|
11356
|
+
], selector: 'vl-header-menu', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the cart carries data-vl-action=\"cart\" for the test runners (step cart)\r\n - change: the header is a free container (OFFENE-PUNKTE 117, user: \"any elements - why should I prescribe it to\r\n the customer\"). An element is drawn by its kind (kindOf: control image, text, button, search, cart, user,\r\n group), no longer by a fixed field name; a group holds elements of its own, so any arrangement is possible.\r\n Older headers (scope.reference logo / searchInput, control or action cart, a plain button) are read as\r\n image / search / cart / button. Every part takes its style and its classes (style.classes) - the classes\r\n were left out before, a header could not be styled from style.css -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: headerItems }\"></ng-container>\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements>\r\n <ng-container *ngFor=\"let header of elements\">\r\n @if (isShown(header)) {\r\n @switch (kindOf(header)) {\r\n\r\n <!-- Image (a logo) -->\r\n @case ('image') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <img [src]=\"header.option?.src\" [alt]=\"header.alt || header.label?.caption || ''\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n </div>\r\n }\r\n\r\n <!-- Text -->\r\n @case ('text') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n </div>\r\n }\r\n\r\n <!-- Search: field and magnifier -->\r\n @case ('search') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <input #search type=\"text\" [placeholder]=\"header.option?.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n <button *ngIf=\"header.option?.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!captionOf(header); else searchCaption\">\r\n <i nz-icon [nzType]=\"header.icon || 'search'\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #searchCaption>{{ captionOf(header) }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Cart: total, quantity, icon -->\r\n @case ('cart') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n data-vl-action=\"cart\" data-vl-writes=\"false\" (click)=\"invokeShowtableContent(header.option)\">\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n </div>\r\n }\r\n\r\n <!-- User: the signed-in name and sign out, or sign in -->\r\n @case ('user') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n @if (signedIn()) {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ userName() }}</span>\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'logout' })\" data-vl-action=\"logout\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signOutText || 'Sign out' }}\r\n </button>\r\n } @else {\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'login' })\" data-vl-action=\"login\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signInText || 'Sign in' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Group: elements of its own, side by side or as its classes say -->\r\n @case ('group') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [] }\"></ng-container>\r\n </div>\r\n }\r\n\r\n <!-- Button (a link to a page, sign in / out, any menu action) -->\r\n @default {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\" [attr.data-vl-action]=\"vlAction(header.option)\" [attr.data-vl-writes]=\"vlWrites(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n @if (header.icon) {<i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>}\r\n @if (captionOf(header)) {<span>{{ captionOf(header) }}</span>}\r\n </button>\r\n </div>\r\n }\r\n }\r\n }\r\n </ng-container>\r\n</ng-template>\r\n" }]
|
|
11101
11357
|
}], ctorParameters: () => [{ type: i4.OktaAuthStateService }, { type: RequestService }, { type: UtilityService }, { type: Couchdb }, { type: i1$2.Platform }], propDecorators: { headerItems: [{
|
|
11102
11358
|
type: Input
|
|
11103
11359
|
}], headerLayout: [{
|
|
@@ -11108,6 +11364,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
11108
11364
|
type: Input
|
|
11109
11365
|
}], projectSeleted: [{
|
|
11110
11366
|
type: Input
|
|
11367
|
+
}], userInfo: [{
|
|
11368
|
+
type: Input
|
|
11111
11369
|
}], cartInfo: [{
|
|
11112
11370
|
type: Input
|
|
11113
11371
|
}], buttonClick: [{
|
|
@@ -11169,6 +11427,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
11169
11427
|
], 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"] }]
|
|
11170
11428
|
}], ctorParameters: () => [{ type: NetworkLogService }] });
|
|
11171
11429
|
|
|
11430
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
11431
|
+
// - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
|
|
11172
11432
|
// Shuaib 2026-10-26
|
|
11173
11433
|
// - new: design mode (input design, output designChange): the Designer's canvas draws its dialog with this
|
|
11174
11434
|
// container - every field with drag, edit and delete (SectionDesigner), no translation, record or backend list;
|
|
@@ -11251,6 +11511,7 @@ class ModelComponent {
|
|
|
11251
11511
|
utilityService;
|
|
11252
11512
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
11253
11513
|
vlFieldKey = testFieldKey;
|
|
11514
|
+
vlFieldPath = testFieldPath;
|
|
11254
11515
|
remoteLists = inject(RemoteListService);
|
|
11255
11516
|
/** Date and time picker behaviour shared by all containers. */
|
|
11256
11517
|
picker = inject(DateTimePickerService);
|
|
@@ -11742,7 +12003,7 @@ class ModelComponent {
|
|
|
11742
12003
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
11743
12004
|
}
|
|
11744
12005
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.DynamicDialogRef, optional: true }, { token: i1$4.DynamicDialogConfig, optional: true }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11745
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler", design: "design" }, outputs: { designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\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 [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\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 [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\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}\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}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: 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", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
12006
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler", design: "design" }, outputs: { designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\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 [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\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 [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\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}\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}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: 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", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
11746
12007
|
}
|
|
11747
12008
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, decorators: [{
|
|
11748
12009
|
type: Component,
|
|
@@ -11754,7 +12015,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
11754
12015
|
DragDropModule,
|
|
11755
12016
|
DesignBarComponent,
|
|
11756
12017
|
DropMarkerComponent,
|
|
11757
|
-
], template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\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 [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\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 [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\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}\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}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
12018
|
+
], template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- 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@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\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 [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\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 [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\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}\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}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
|
|
11758
12019
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef, decorators: [{
|
|
11759
12020
|
type: Optional
|
|
11760
12021
|
}] }, { type: i1$4.DynamicDialogConfig, decorators: [{
|
|
@@ -12344,6 +12605,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
12344
12605
|
}]
|
|
12345
12606
|
}], ctorParameters: () => [{ type: ConfigService }, { type: i1$1.HttpClient }, { type: UtilityService }, { type: i1$2.Platform }, { type: MobileOidcService }] });
|
|
12346
12607
|
|
|
12608
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
12609
|
+
// - fix: a menu choice closes the menu only in mobile mode (it toggled on every choice on a laptop)
|
|
12610
|
+
// - new: itemHidden / roleFits - an entry with option.role only for a user of that role (app settings roleKey, any case)
|
|
12611
|
+
// - fix: a token without a name showed "User is undefined" - the e-mail stands in and is shown once
|
|
12347
12612
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
12348
12613
|
// - change: a text document of Terms & Conditions opens in vl-terms-dialog (it was a notice in the corner)
|
|
12349
12614
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-23
|
|
@@ -12915,10 +13180,15 @@ class SideMenuComponent {
|
|
|
12915
13180
|
const decoded = jwtDecode(token);
|
|
12916
13181
|
return {
|
|
12917
13182
|
sub: decoded.sub,
|
|
13183
|
+
// name stays the "signed in" mark of this menu; without a name in the token the e-mail stands in and
|
|
13184
|
+
// the profile shows it once (nameFromToken false) - it showed "User is undefined"
|
|
12918
13185
|
name: decoded.name ??
|
|
12919
|
-
|
|
13186
|
+
decoded.email ??
|
|
13187
|
+
decoded.sub ??
|
|
13188
|
+
'User',
|
|
13189
|
+
nameFromToken: !!decoded.name,
|
|
12920
13190
|
role: decoded.role ??
|
|
12921
|
-
'
|
|
13191
|
+
'',
|
|
12922
13192
|
email: decoded.email ??
|
|
12923
13193
|
decoded.sub,
|
|
12924
13194
|
iat: decoded.iat,
|
|
@@ -12930,6 +13200,43 @@ class SideMenuComponent {
|
|
|
12930
13200
|
return null;
|
|
12931
13201
|
}
|
|
12932
13202
|
}
|
|
13203
|
+
/**
|
|
13204
|
+
* Whether a menu entry is hidden: sign-in (option.login) like before, and an entry with option.role only for a
|
|
13205
|
+
* user of that role. The role is the user's value under the app settings' roleKey (default userRole), compared
|
|
13206
|
+
* without case - Main says "ADMIN", a backend may answer "admin". hotel showed admin and customer entries to all.
|
|
13207
|
+
*/
|
|
13208
|
+
itemHidden(item, submenu = false) {
|
|
13209
|
+
const option = item?.option ?? {};
|
|
13210
|
+
const provider = ['oktaAuth', 'keycloak', 'jwtToken'].includes(this.environment?.login?.type);
|
|
13211
|
+
const named = !!this.loginedUserInfo?.name;
|
|
13212
|
+
if (submenu) {
|
|
13213
|
+
if (option.login === true && provider)
|
|
13214
|
+
return !named || !this.roleFits(option);
|
|
13215
|
+
if (option.login === false)
|
|
13216
|
+
return named;
|
|
13217
|
+
return !this.roleFits(option);
|
|
13218
|
+
}
|
|
13219
|
+
if (provider) {
|
|
13220
|
+
if (option.login === true)
|
|
13221
|
+
return !named || !this.roleFits(option);
|
|
13222
|
+
if (option.login === false)
|
|
13223
|
+
return named;
|
|
13224
|
+
return !this.roleFits(option);
|
|
13225
|
+
}
|
|
13226
|
+
// without a sign-in provider (as before): signed in by userId, then only the entries with login
|
|
13227
|
+
if (this.userInfo?.userId)
|
|
13228
|
+
return option.login ? !this.roleFits(option) : true;
|
|
13229
|
+
return !!option.login;
|
|
13230
|
+
}
|
|
13231
|
+
/** True without option.role, else when the signed-in user has that role (case does not matter). */
|
|
13232
|
+
roleFits(option) {
|
|
13233
|
+
const wanted = String(option?.role ?? '').trim().toLowerCase();
|
|
13234
|
+
if (!wanted)
|
|
13235
|
+
return true;
|
|
13236
|
+
const key = this.mainCenter?.appSettings?.login?.roleKey || 'userRole';
|
|
13237
|
+
const role = String(this.userInfo?.[key] ?? this.loginedUserInfo?.role ?? '').trim().toLowerCase();
|
|
13238
|
+
return role === wanted;
|
|
13239
|
+
}
|
|
12933
13240
|
setLoginedUser(user) {
|
|
12934
13241
|
if (!user?.name) {
|
|
12935
13242
|
this.clearLoginUser();
|
|
@@ -13169,7 +13476,10 @@ class SideMenuComponent {
|
|
|
13169
13476
|
}
|
|
13170
13477
|
return;
|
|
13171
13478
|
}
|
|
13172
|
-
|
|
13479
|
+
// closing after a choice only where the open menu lies over the page (mobile) - it toggled on every
|
|
13480
|
+
// choice, so on a laptop the menu closed and opened in turns (hotel)
|
|
13481
|
+
if (this.mobileMode && !this.isCollapsed)
|
|
13482
|
+
this.toggleCollapsed();
|
|
13173
13483
|
this.invokeMenu.emit(menu);
|
|
13174
13484
|
}
|
|
13175
13485
|
openLogsTable() {
|
|
@@ -13318,7 +13628,7 @@ class SideMenuComponent {
|
|
|
13318
13628
|
});
|
|
13319
13629
|
}
|
|
13320
13630
|
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 });
|
|
13321
|
-
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", mainCenter: "mainCenter" }, 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\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
|
|
13631
|
+
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", mainCenter: "mainCenter" }, 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-25\r\n - change: an entry's visibility by itemHidden (sign-in and option.role); the name line only for a name from the token -->\r\n<!-- 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\" *ngIf=\"loginedUserInfo.nameFromToken !== false\">{{ 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]=\"itemHidden(item) ? '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]=\"itemHidden(item, true) ? '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\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
|
|
13322
13632
|
// NG-ZORRO
|
|
13323
13633
|
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:
|
|
13324
13634
|
// PrimeNG
|
|
@@ -13337,7 +13647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
13337
13647
|
// PrimeNG
|
|
13338
13648
|
DynamicDialogModule,
|
|
13339
13649
|
TermsDialog
|
|
13340
|
-
], 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\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\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"] }]
|
|
13650
|
+
], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: an entry's visibility by itemHidden (sign-in and option.role); the name line only for a name from the token -->\r\n<!-- 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\" *ngIf=\"loginedUserInfo.nameFromToken !== false\">{{ 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]=\"itemHidden(item) ? '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]=\"itemHidden(item, true) ? '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\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\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"] }]
|
|
13341
13651
|
}], 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: [{
|
|
13342
13652
|
type: Input
|
|
13343
13653
|
}], userInfo: [{
|
|
@@ -13848,6 +14158,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
13848
14158
|
args: [{ providedIn: 'root' }]
|
|
13849
14159
|
}], ctorParameters: () => [{ type: UtilityService }] });
|
|
13850
14160
|
|
|
14161
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
14162
|
+
// - fix: loadData reads with GET unless the page names its method (it sent POST: luv2shop 404 once card pages loaded
|
|
14163
|
+
// through PageData); the app's user may come with the call; the token also from authToken (Okta) or jwt
|
|
14164
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
14165
|
+
// - change: the proxy only when the call or the Configuration switches it on (proxyFor)
|
|
13851
14166
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
13852
14167
|
// - new: BackendCallService - sends a backend call a page describes (backend-call.ts): the user's
|
|
13853
14168
|
// token when the option says passToken, on the devices directly, in the web through the app's own
|
|
@@ -13884,8 +14199,10 @@ class BackendCallService {
|
|
|
13884
14199
|
}
|
|
13885
14200
|
/** Loads from the option's backend with the given context (e.g. filter values). */
|
|
13886
14201
|
async loadData(option, extra = {}) {
|
|
13887
|
-
|
|
13888
|
-
const
|
|
14202
|
+
// the app's own user when it gives one (Okta, JWT, Keycloak alike), else the stored sign-in
|
|
14203
|
+
const userInfo = extra.userInfo ?? await this.currentUser();
|
|
14204
|
+
// loading reads: GET unless the page names its method (a filter page with a body: POST)
|
|
14205
|
+
const call = buildBackendCall({ ...option, method: option?.method || 'GET' }, { ...extra, userInfo });
|
|
13889
14206
|
if (!call)
|
|
13890
14207
|
return [];
|
|
13891
14208
|
return this.send(call, option, userInfo);
|
|
@@ -13894,13 +14211,13 @@ class BackendCallService {
|
|
|
13894
14211
|
async send(call, option, userInfo) {
|
|
13895
14212
|
const headers = { Accept: 'application/json', 'Content-Type': 'application/json' };
|
|
13896
14213
|
if (option?.passToken) {
|
|
13897
|
-
const token = userInfo?.token || this.oauthService?.getAccessToken();
|
|
14214
|
+
const token = userInfo?.token || userInfo?.authToken || userInfo?.jwt || this.oauthService?.getAccessToken();
|
|
13898
14215
|
if (token)
|
|
13899
14216
|
headers['Authorization'] = `Bearer ${token}`;
|
|
13900
14217
|
}
|
|
13901
14218
|
const hasBody = call.method !== 'GET' && call.method !== 'DELETE';
|
|
13902
14219
|
const response = await stagedRequest(() => CapacitorHttp.request({
|
|
13903
|
-
url: backendUrl(call.url),
|
|
14220
|
+
url: backendUrl(call.url, proxyFor(option)),
|
|
13904
14221
|
method: call.method,
|
|
13905
14222
|
params: call.params,
|
|
13906
14223
|
headers,
|
|
@@ -13919,6 +14236,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
13919
14236
|
args: [{ providedIn: 'root' }]
|
|
13920
14237
|
}] });
|
|
13921
14238
|
|
|
14239
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
14240
|
+
// - new: recordsFrom(answer, dataKey) - the one rule that takes the records out of a backend answer, for every
|
|
14241
|
+
// page (also the older table/card way of the app): dataKey is a path ("_embedded.orders", "roomDtoList"),
|
|
14242
|
+
// without it the answer itself when it is a list, else its "content" (a Spring page), else none. No app name
|
|
14243
|
+
// in here - the old way looked for a fixed "_embedded.products" (luv2shop) and Orders stayed empty;
|
|
14244
|
+
// @answer (the answer itself) and @none (no records) are explicit choices, so the editor can require dataKey
|
|
14245
|
+
// - new: loadPage(page, append) - backend pages one after another (a queue), scrolling appends, a page is asked once;
|
|
14246
|
+
// a fresh load drops answers of older ones; restore() takes a list as it was left; prepare (the app's work on
|
|
14247
|
+
// loaded records, e.g. Media pictures); lastAnswer. An append before the first page is loaded is dropped. The app's card pages load through it (step 2, OFFENE-PUNKTE 111)
|
|
13922
14248
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
13923
14249
|
// - new: PageData - the records of one open page and everything done with them, in one place for
|
|
13924
14250
|
// every container (A4, variant c). Card and grid only draw `visible` and call the actions:
|
|
@@ -13932,6 +14258,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
13932
14258
|
// An index always means the position in all records, not on the current page.
|
|
13933
14259
|
// No Angular here: storage, backend, question and message come in as PageDataDeps, so it is tested
|
|
13934
14260
|
// with node --test (page-data.spec.mjs)
|
|
14261
|
+
/** What PageData needs from the app: storage, backend, the question before deleting, a message. */
|
|
14262
|
+
/** dataKey: the answer itself is the list (or the one record, a detail page). */
|
|
14263
|
+
const DATA_KEY_ANSWER = '@answer';
|
|
14264
|
+
/** dataKey: the answer carries no records (void, or only a status). */
|
|
14265
|
+
const DATA_KEY_NONE = '@none';
|
|
14266
|
+
/**
|
|
14267
|
+
* The records in a backend answer. dataKey is where they stand: a path ("_embedded.orders"), @answer (the
|
|
14268
|
+
* answer itself - a list, or one record) or @none (no records). Without dataKey (older data) the answer itself
|
|
14269
|
+
* when it is a list, else its "content" (a Spring page), else none - or, with oneRecord, the answer as the one
|
|
14270
|
+
* record (a page that loads a single record, e.g. a detail by its id).
|
|
14271
|
+
*/
|
|
14272
|
+
function recordsFrom(answer, dataKey, oneRecord = false) {
|
|
14273
|
+
const path = String(dataKey ?? '').trim();
|
|
14274
|
+
const asRecords = (value) => Array.isArray(value) ? value : value && typeof value === 'object' ? [value] : [];
|
|
14275
|
+
if (path === DATA_KEY_NONE)
|
|
14276
|
+
return [];
|
|
14277
|
+
if (path === DATA_KEY_ANSWER)
|
|
14278
|
+
return asRecords(answer);
|
|
14279
|
+
if (path)
|
|
14280
|
+
return asRecords(path.split('.').reduce((value, key) => value?.[key], answer));
|
|
14281
|
+
if (Array.isArray(answer))
|
|
14282
|
+
return answer;
|
|
14283
|
+
if (Array.isArray(answer?.content))
|
|
14284
|
+
return answer.content;
|
|
14285
|
+
return oneRecord && answer && typeof answer === 'object' ? [answer] : [];
|
|
14286
|
+
}
|
|
13935
14287
|
class PageData {
|
|
13936
14288
|
records = [];
|
|
13937
14289
|
visible = [];
|
|
@@ -13941,10 +14293,19 @@ class PageData {
|
|
|
13941
14293
|
totalItems = 0;
|
|
13942
14294
|
loading = false;
|
|
13943
14295
|
filter = {};
|
|
14296
|
+
/** The last backend answer as it came (its paging fields). */
|
|
14297
|
+
lastAnswer = null;
|
|
13944
14298
|
/** Called after every change of the state above - the container redraws. */
|
|
13945
14299
|
onChange = () => { };
|
|
13946
14300
|
source;
|
|
13947
14301
|
deps;
|
|
14302
|
+
/** Backend pages load one after another - a second request waits for the first (a card asked for page 2 while
|
|
14303
|
+
* page 1 was still on its way, and page 2 replaced it: luv2shop search showed 2 of 7 hits). */
|
|
14304
|
+
queue = Promise.resolve();
|
|
14305
|
+
/** Counts fresh loads; an appended page started before a fresh load is dropped. */
|
|
14306
|
+
generation = 0;
|
|
14307
|
+
/** The pages already added while scrolling (page 0 = the first). */
|
|
14308
|
+
loadedUpTo = -1;
|
|
13948
14309
|
constructor(source, deps, pageSize = 5) {
|
|
13949
14310
|
this.source = source;
|
|
13950
14311
|
this.deps = deps;
|
|
@@ -13965,10 +14326,43 @@ class PageData {
|
|
|
13965
14326
|
return this.setRecords(this.deps.restoreDates ? this.deps.restoreDates(records) : records);
|
|
13966
14327
|
}
|
|
13967
14328
|
if (String(this.source?.data_url ?? '').trim()) {
|
|
13968
|
-
return this.
|
|
14329
|
+
return this.loadPage(this.page, false);
|
|
13969
14330
|
}
|
|
13970
14331
|
this.setRecords([]);
|
|
13971
14332
|
}
|
|
14333
|
+
/**
|
|
14334
|
+
* A page of a backend list: fresh (append false) shows only that page, append adds it to the records shown -
|
|
14335
|
+
* scrolling. Requests run one after another; a page already added, or beyond the last, is not asked again.
|
|
14336
|
+
*/
|
|
14337
|
+
loadPage(page, append = false) {
|
|
14338
|
+
if (!append)
|
|
14339
|
+
this.generation++;
|
|
14340
|
+
const generation = this.generation;
|
|
14341
|
+
const run = async () => {
|
|
14342
|
+
if (append) {
|
|
14343
|
+
if (generation !== this.generation)
|
|
14344
|
+
return;
|
|
14345
|
+
// nothing loaded yet: the first page comes from the fresh load (a card's end was in view while the list was
|
|
14346
|
+
// still empty and asked for page 2 first - the list then began at page 2)
|
|
14347
|
+
if (this.loadedUpTo < 0)
|
|
14348
|
+
return;
|
|
14349
|
+
if (page <= this.loadedUpTo || (this.pageCount && page >= this.pageCount))
|
|
14350
|
+
return;
|
|
14351
|
+
}
|
|
14352
|
+
this.page = page;
|
|
14353
|
+
await this.loadBackendRecords(append, generation);
|
|
14354
|
+
};
|
|
14355
|
+
this.queue = this.queue.then(run, run);
|
|
14356
|
+
return this.queue;
|
|
14357
|
+
}
|
|
14358
|
+
/** The list as it was left (back with the page X): its records and the pages they came from. */
|
|
14359
|
+
restore(records, page) {
|
|
14360
|
+
this.records = Array.isArray(records) ? records : [];
|
|
14361
|
+
this.visible = this.records;
|
|
14362
|
+
this.page = page;
|
|
14363
|
+
this.loadedUpTo = page;
|
|
14364
|
+
this.onChange();
|
|
14365
|
+
}
|
|
13972
14366
|
/** Records the app loaded itself (a backend page with images, its own paging). */
|
|
13973
14367
|
useRecords(records) {
|
|
13974
14368
|
this.setRecords(records);
|
|
@@ -13987,7 +14381,7 @@ class PageData {
|
|
|
13987
14381
|
this.slice();
|
|
13988
14382
|
}
|
|
13989
14383
|
else {
|
|
13990
|
-
await this.
|
|
14384
|
+
await this.loadPage(this.page, false);
|
|
13991
14385
|
}
|
|
13992
14386
|
}
|
|
13993
14387
|
async setPageSize(size) {
|
|
@@ -13997,7 +14391,7 @@ class PageData {
|
|
|
13997
14391
|
this.slice();
|
|
13998
14392
|
}
|
|
13999
14393
|
else {
|
|
14000
|
-
await this.
|
|
14394
|
+
await this.loadPage(0, false);
|
|
14001
14395
|
}
|
|
14002
14396
|
}
|
|
14003
14397
|
/** A record from a dialog or form: replaces record index, else is appended (and its page shown). */
|
|
@@ -14066,23 +14460,31 @@ class PageData {
|
|
|
14066
14460
|
const values = Object.values(this.filter);
|
|
14067
14461
|
return values.length > 0 && values.every(v => v != null && v !== '');
|
|
14068
14462
|
}
|
|
14069
|
-
async loadBackendRecords() {
|
|
14463
|
+
async loadBackendRecords(append = false, generation = this.generation) {
|
|
14070
14464
|
this.setLoading(true);
|
|
14071
14465
|
try {
|
|
14072
14466
|
const filter = {};
|
|
14073
14467
|
for (const [key, value] of Object.entries(this.filter))
|
|
14074
14468
|
filter[key] = this.filterValue(value);
|
|
14075
14469
|
const data = await this.deps.loadBackend(this.source, { filter, pageNumber: this.page, pageSize: this.pageSize });
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14470
|
+
// a fresh load started meanwhile: this answer is old
|
|
14471
|
+
if (generation !== this.generation)
|
|
14472
|
+
return;
|
|
14473
|
+
// older data without dataKey: a single answer is the one record (a detail page by its id, /products/{id})
|
|
14474
|
+
let records = recordsFrom(data, this.source?.['dataKey'], true);
|
|
14475
|
+
if (this.deps.prepare)
|
|
14476
|
+
records = await this.deps.prepare(records);
|
|
14477
|
+
if (generation !== this.generation)
|
|
14478
|
+
return;
|
|
14479
|
+
this.lastAnswer = data;
|
|
14079
14480
|
if (this.clientPaging) {
|
|
14080
14481
|
this.setRecords(this.deps.restoreDates ? this.deps.restoreDates(records) : records);
|
|
14081
14482
|
}
|
|
14082
14483
|
else {
|
|
14083
|
-
this.records = records;
|
|
14084
|
-
this.visible = records;
|
|
14085
|
-
this.
|
|
14484
|
+
this.records = append ? [...this.records, ...records] : records;
|
|
14485
|
+
this.visible = this.records;
|
|
14486
|
+
this.loadedUpTo = this.page;
|
|
14487
|
+
this.totalItems = Number(data?.totalElements ?? data?.page?.totalElements ?? this.records.length);
|
|
14086
14488
|
this.pageCount = Number(data?.totalPages ?? data?.page?.totalPages ?? Math.ceil(this.totalItems / this.pageSize)) || 0;
|
|
14087
14489
|
}
|
|
14088
14490
|
}
|
|
@@ -14200,10 +14602,13 @@ function applyLayoutDefaults(schemas, layout, asValue) {
|
|
|
14200
14602
|
}
|
|
14201
14603
|
}
|
|
14202
14604
|
|
|
14605
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
|
|
14606
|
+
// - change: termsUrl fills {{userInfo.x}} too (fillPlaceholders) - {{user}} stays for old apps
|
|
14203
14607
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
14204
14608
|
// - new: the acceptance of the terms (user decision 2026-10-24): confirmed before the sign-in, kept in the browser
|
|
14205
14609
|
// per app and state of the terms; with a backend (center.appSettings.terms.backend) the app asks for the state
|
|
14206
14610
|
// after the sign-in and sends the acceptance - the backend may name a newer state, then the app asks again
|
|
14611
|
+
/** The terms part of the app settings as readAppSettings gives it. */
|
|
14207
14612
|
/** The terms must be confirmed before anything else: switched on and something to read. */
|
|
14208
14613
|
function termsToConfirm(terms) {
|
|
14209
14614
|
return !!terms?.enabled && !!terms.confirmOnStart && Object.values(terms.documents || {}).some(doc => !!doc?.value);
|
|
@@ -14233,12 +14638,11 @@ function termsStorageKey(project) {
|
|
|
14233
14638
|
function acceptedLocally(stored, stamp) {
|
|
14234
14639
|
return !!stored && stored.stamp === stamp;
|
|
14235
14640
|
}
|
|
14236
|
-
/** An address with {{user}}, {{version}} and {{env.x}} filled in (URL-encoded); a relative one goes after apiUrl. */
|
|
14641
|
+
/** An address with {{user}}, {{version}}, {{userInfo.x}} and {{env.x}} filled in (URL-encoded); a relative one goes after apiUrl. */
|
|
14237
14642
|
function termsUrl(url, values) {
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
.replace(/\{\{\s*env\.([\w.]+)\s*\}\}/g, (_m, key) => String(values.env?.[key] ?? ''));
|
|
14643
|
+
// {{user}} stays for apps written with it; any field of the sign-in is {{userInfo.x}}, any value of the
|
|
14644
|
+
// Configuration {{env.x}} - the library knows no field names (decided with the user 2026-10-25)
|
|
14645
|
+
const filled = fillPlaceholders(url.replace(/\{\{\s*user\s*\}\}/g, encodeURIComponent(values.user)), { userInfo: values.userInfo ?? {}, env: values.env ?? {}, version: values.version }, true);
|
|
14242
14646
|
if (/^https?:\/\//i.test(filled))
|
|
14243
14647
|
return filled;
|
|
14244
14648
|
const base = String(values.env?.['apiUrl'] ?? '').replace(/\/$/, '');
|
|
@@ -14280,5 +14684,5 @@ function termsUser(userInfo) {
|
|
|
14280
14684
|
* Generated bundle index. Do not edit.
|
|
14281
14685
|
*/
|
|
14282
14686
|
|
|
14283
|
-
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, 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, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, cardButton, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, designDropIds, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, headerButton, inputFormatHint, insertField, isBrowserSource, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, newButton, newSection, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, rebalanceRow, recordOf, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, replaceCardElement, replaceColumn, replaceField, replaceSection, resizeColumn, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline, withAppPagination };
|
|
14687
|
+
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, 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, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, cardButton, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, designDropIds, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, headerButton, inputFormatHint, insertField, isBrowserSource, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, newButton, newSection, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, replaceCardElement, replaceColumn, replaceField, replaceSection, resizeColumn, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline, withAppPagination };
|
|
14284
14688
|
//# sourceMappingURL=yomotech-view-toolkit.mjs.map
|