@yomotech/view-toolkit 1.0.43 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i5 from '@angular/common';
|
|
2
2
|
import { NgIf, NgStyle, NgTemplateOutlet, AsyncPipe, NgFor, NgClass, DatePipe, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Pipe, signal, Injectable, HostListener,
|
|
5
|
-
import { effectiveControl, keyboardFor, startPageFor, START_PAGE_KEYS, appSettingsMenu, readAppSettings } from '@yomotech/view-toolkit/catalog';
|
|
4
|
+
import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component, Pipe, signal, Injectable, HostListener, Directive, Optional, SkipSelf, ViewChild, inject, ViewChildren, ElementRef, NgZone, HostBinding, ChangeDetectorRef, NgModule, effect, DestroyRef } from '@angular/core';
|
|
5
|
+
import { effectiveControl, keyboardFor, paginationFor, startPageFor, START_PAGE_KEYS, appSettingsMenu, readAppSettings } from '@yomotech/view-toolkit/catalog';
|
|
6
6
|
import * as catalog from '@yomotech/view-toolkit/catalog';
|
|
7
7
|
export { catalog as FieldCatalog };
|
|
8
|
+
import * as i17 from '@angular/cdk/drag-drop';
|
|
9
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
8
10
|
import * as i1 from '@angular/forms';
|
|
9
11
|
import { NgForm, ControlContainer, FormsModule } from '@angular/forms';
|
|
10
12
|
import * as i2 from 'primeng/autocomplete';
|
|
@@ -38,7 +40,7 @@ import * as i12 from 'ng-zorro-antd/button';
|
|
|
38
40
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
39
41
|
import * as i15 from 'ng-zorro-antd/date-picker';
|
|
40
42
|
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
41
|
-
import * as i5 from 'ng-zorro-antd/modal';
|
|
43
|
+
import * as i5$1 from 'ng-zorro-antd/modal';
|
|
42
44
|
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
43
45
|
import * as i16 from '@angular/material/tooltip';
|
|
44
46
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -48,7 +50,7 @@ import * as i13 from 'ng-zorro-antd/core/transition-patch';
|
|
|
48
50
|
import * as i14 from 'ng-zorro-antd/core/wave';
|
|
49
51
|
import * as i7$1 from 'ng-zorro-antd/table';
|
|
50
52
|
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
51
|
-
import * as i9
|
|
53
|
+
import * as i9 from 'primeng/button';
|
|
52
54
|
import { ButtonModule } from 'primeng/button';
|
|
53
55
|
import * as i11$2 from 'ng-zorro-antd/dropdown';
|
|
54
56
|
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
@@ -475,6 +477,1034 @@ function testWrites(option) {
|
|
|
475
477
|
return writes ? 'true' : 'false';
|
|
476
478
|
}
|
|
477
479
|
|
|
480
|
+
// Shuaib 2026-10-26
|
|
481
|
+
// - new: the design mode of the containers (#166). The Designer draws a page with the same containers as the app
|
|
482
|
+
// (vl-form, vl-model, vl-card, vl-grid) and hands them [design]; the container then shows every element of the
|
|
483
|
+
// layout with drag, edit and delete around it, sample records instead of data, and tells the Designer what was
|
|
484
|
+
// chosen or changed (designChange). A new container or control comes to the Designer with the next package.
|
|
485
|
+
const DESIGN_TEXTS = {
|
|
486
|
+
dragSection: 'Drag section',
|
|
487
|
+
addButton: 'Add button',
|
|
488
|
+
editSection: 'Edit section',
|
|
489
|
+
deleteSection: 'Delete section',
|
|
490
|
+
section: 'Section',
|
|
491
|
+
addSection: '+ Add section',
|
|
492
|
+
dragField: 'Drag field',
|
|
493
|
+
editField: 'Edit field',
|
|
494
|
+
deleteField: 'Delete field',
|
|
495
|
+
emptySection: 'Drop fields here or use Object Files to add fields.',
|
|
496
|
+
dropHere: 'Drop field here',
|
|
497
|
+
placeAbove: 'Place above',
|
|
498
|
+
placeBelow: 'Place below',
|
|
499
|
+
placeLeft: 'Place beside left',
|
|
500
|
+
placeRight: 'Place beside right',
|
|
501
|
+
hiddenInApp: 'Hidden in the app',
|
|
502
|
+
edit: 'Edit',
|
|
503
|
+
delete: 'Delete',
|
|
504
|
+
editLayout: 'Edit layout',
|
|
505
|
+
addCard: 'Add card',
|
|
506
|
+
deleteCard: 'Delete card',
|
|
507
|
+
addHeaderButton: 'Add header button',
|
|
508
|
+
editHeader: 'Edit header style',
|
|
509
|
+
clearHeader: 'Clear header',
|
|
510
|
+
editHeaderButton: 'Edit button',
|
|
511
|
+
deleteHeaderButton: 'Delete button',
|
|
512
|
+
emptyCardTitle: 'Pick some properties to generate card',
|
|
513
|
+
emptyCardText: 'Drag properties from the left panel and drop them here.',
|
|
514
|
+
dropCardItem: 'Drop card item here',
|
|
515
|
+
dragColumn: 'Drag column',
|
|
516
|
+
editColumn: 'Edit column',
|
|
517
|
+
deleteColumn: 'Delete column',
|
|
518
|
+
resizeWidth: 'Resize width',
|
|
519
|
+
resizeHeight: 'Resize height',
|
|
520
|
+
editGrid: 'Edit grid',
|
|
521
|
+
emptyGrid: 'Drag properties from the left panel and drop them here to add columns.',
|
|
522
|
+
button: 'Button',
|
|
523
|
+
};
|
|
524
|
+
/** The design texts with the Designer's own over the English ones. */
|
|
525
|
+
function designTexts(design) {
|
|
526
|
+
return { ...DESIGN_TEXTS, ...(design?.texts || {}) };
|
|
527
|
+
}
|
|
528
|
+
/** Whether the target is the element (same kind and place) - the selection mark. */
|
|
529
|
+
function isTarget(selected, target) {
|
|
530
|
+
if (!selected || selected.kind !== target.kind)
|
|
531
|
+
return false;
|
|
532
|
+
const same = (a, b) => (a ?? null) === (b ?? null);
|
|
533
|
+
return same(selected.sectionIndex, target.sectionIndex) && same(selected.fieldIndex, target.fieldIndex)
|
|
534
|
+
&& same(selected.index, target.index) && same(selected.parentIndex, target.parentIndex);
|
|
535
|
+
}
|
|
536
|
+
/** A drop from the Designer's data objects (not an element moved inside the container). */
|
|
537
|
+
function isPropertyDrop(data) {
|
|
538
|
+
return !!data && typeof data === 'object' && data.kind === 'object-property' && typeof data.name === 'string';
|
|
539
|
+
}
|
|
540
|
+
/** The data object a dropped property belongs to ("orders.json" -> "orders"). */
|
|
541
|
+
function dropObjectName(drop) {
|
|
542
|
+
return String(drop.objectName || drop.objectNode?.name || '').replace(/\.json$/i, '').trim();
|
|
543
|
+
}
|
|
544
|
+
/** A copy of a layout (layouts are JSON). */
|
|
545
|
+
function cloneLayout(value) {
|
|
546
|
+
return value === undefined ? value : JSON.parse(JSON.stringify(value));
|
|
547
|
+
}
|
|
548
|
+
/** The ids of every drop list of the containers in design mode on the page (the Designer's data objects drop on them). */
|
|
549
|
+
function designDropIds() {
|
|
550
|
+
if (typeof document === 'undefined')
|
|
551
|
+
return [];
|
|
552
|
+
return Array.from(document.querySelectorAll('[data-vl-design-list]')).map(el => el.id).filter(Boolean);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// Shuaib 2026-10-26
|
|
556
|
+
// - new: the Designer's edits of a card page: drop a data object's field or move an element above, below or beside
|
|
557
|
+
// another (side by side they form a HorizontalLayout), add buttons, delete elements; the page header's buttons.
|
|
558
|
+
// Moved here from the Designer's own card (LiveForge), so the Designer and vl-card keep one rule (#166). Pure:
|
|
559
|
+
// every edit returns a new layout.
|
|
560
|
+
function horizontalStyle() {
|
|
561
|
+
return { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '10px', alignItems: 'start', width: '100%', boxSizing: 'border-box' };
|
|
562
|
+
}
|
|
563
|
+
/** A horizontal layout draws its elements in as many equal columns as it has elements. */
|
|
564
|
+
function normalizeHorizontal(layout) {
|
|
565
|
+
layout.style = layout.style || horizontalStyle();
|
|
566
|
+
delete layout.style.classes;
|
|
567
|
+
layout.style.display = layout.style.display || 'grid';
|
|
568
|
+
layout.style.gridTemplateColumns = `repeat(${Math.max(1, layout.elements?.length || 1)}, minmax(0, 1fr))`;
|
|
569
|
+
layout.style.gap = layout.style.gap || '10px';
|
|
570
|
+
layout.style.alignItems = layout.style.alignItems || 'start';
|
|
571
|
+
}
|
|
572
|
+
function horizontalOf(elements) {
|
|
573
|
+
const layout = { type: 'HorizontalLayout', style: horizontalStyle(), elements };
|
|
574
|
+
normalizeHorizontal(layout);
|
|
575
|
+
return layout;
|
|
576
|
+
}
|
|
577
|
+
/** A horizontal layout with one element left becomes that element; an empty one goes. */
|
|
578
|
+
function normalizeRows(cards) {
|
|
579
|
+
for (let i = cards.length - 1; i >= 0; i--) {
|
|
580
|
+
const layout = cards[i];
|
|
581
|
+
if (layout?.type !== 'HorizontalLayout')
|
|
582
|
+
continue;
|
|
583
|
+
layout.elements = Array.isArray(layout.elements) ? layout.elements : [];
|
|
584
|
+
if (layout.elements.length === 0)
|
|
585
|
+
cards.splice(i, 1);
|
|
586
|
+
else if (layout.elements.length === 1)
|
|
587
|
+
cards.splice(i, 1, layout.elements[0]);
|
|
588
|
+
else
|
|
589
|
+
normalizeHorizontal(layout);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* The card layout as the Designer keeps it, changed in place: no empty classes on the card styles, the card's
|
|
594
|
+
* columns are drawn by the container (no gridTemplateColumns in its style), no classes on the elements (the right
|
|
595
|
+
* panel sets styles only), horizontal layouts in shape.
|
|
596
|
+
*/
|
|
597
|
+
function normalizeCard(layout) {
|
|
598
|
+
if (!layout)
|
|
599
|
+
return layout;
|
|
600
|
+
const emptyClasses = (style) => Array.isArray(style?.classes) && style.classes.every((c) => !String(c ?? '').trim());
|
|
601
|
+
if (emptyClasses(layout.style))
|
|
602
|
+
delete layout.style.classes;
|
|
603
|
+
if (emptyClasses(layout.stylePerCard))
|
|
604
|
+
delete layout.stylePerCard.classes;
|
|
605
|
+
if (layout.style) {
|
|
606
|
+
delete layout.style.gridTemplateColumns;
|
|
607
|
+
delete layout.style['grid-template-columns'];
|
|
608
|
+
}
|
|
609
|
+
const clean = (elements) => {
|
|
610
|
+
for (const element of elements) {
|
|
611
|
+
if (!element || typeof element !== 'object')
|
|
612
|
+
continue;
|
|
613
|
+
if (element.style)
|
|
614
|
+
delete element.style.classes;
|
|
615
|
+
if (element.label?.style)
|
|
616
|
+
delete element.label.style.classes;
|
|
617
|
+
if (element.scope?.style)
|
|
618
|
+
delete element.scope.style.classes;
|
|
619
|
+
if (element.type === 'HorizontalLayout') {
|
|
620
|
+
element.elements = Array.isArray(element.elements) ? element.elements : [];
|
|
621
|
+
clean(element.elements);
|
|
622
|
+
normalizeHorizontal(element);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
layout.cards = Array.isArray(layout.cards) ? layout.cards : [];
|
|
627
|
+
clean(layout.cards);
|
|
628
|
+
normalizeRows(layout.cards);
|
|
629
|
+
return layout;
|
|
630
|
+
}
|
|
631
|
+
/** A button as the Designer adds it to a card. */
|
|
632
|
+
function cardButton(caption = 'Button') {
|
|
633
|
+
return {
|
|
634
|
+
control: 'button',
|
|
635
|
+
icon: '',
|
|
636
|
+
caption,
|
|
637
|
+
style: { border: '1px solid #2563eb', background: '#2563eb', color: '#ffffff', borderRadius: '4px', padding: '8px 12px', cursor: 'pointer' },
|
|
638
|
+
option: {
|
|
639
|
+
visible: true, protected: false, passToken: false, action: null, innerAction: null, storageType: null, key: '',
|
|
640
|
+
data_url: '', deleteMessage: '', params: {}, form: false, modalTitle: '', passData: false, layout_url: '', property_url: [],
|
|
641
|
+
},
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
/** The card element a data object's property becomes when it is dropped: its value, read only. */
|
|
645
|
+
function elementFromProperty(drop, caption) {
|
|
646
|
+
if (String(drop?.type ?? '').toLowerCase() === 'button')
|
|
647
|
+
return cardButton(caption);
|
|
648
|
+
return {
|
|
649
|
+
label: { caption: drop?.name || '', style: { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '4px', display: 'block' } },
|
|
650
|
+
scope: { reference: `#/${dropObjectName(drop)}/properties/${drop?.name}`, style: { width: '100%', boxSizing: 'border-box' } },
|
|
651
|
+
option: {
|
|
652
|
+
action: 'get', visible: true, protected: true, link: false, setImageUrl: String(drop?.type ?? '').toLowerCase() === 'media',
|
|
653
|
+
layout_url: '', property_url: [''], data_url: '',
|
|
654
|
+
},
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
function takeOut(cards, place) {
|
|
658
|
+
if (place.parentIndex === null || place.parentIndex === undefined) {
|
|
659
|
+
return place.index >= 0 && place.index < cards.length ? cards.splice(place.index, 1)[0] : null;
|
|
660
|
+
}
|
|
661
|
+
const parent = cards[place.parentIndex];
|
|
662
|
+
if (!Array.isArray(parent?.elements) || place.index < 0 || place.index >= parent.elements.length)
|
|
663
|
+
return null;
|
|
664
|
+
return parent.elements.splice(place.index, 1)[0];
|
|
665
|
+
}
|
|
666
|
+
function putTopLevel(cards, element, index, type) {
|
|
667
|
+
if (index === null || index === undefined || !cards[index]) {
|
|
668
|
+
cards.push(element);
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
if (type === 'left' || type === 'right') {
|
|
672
|
+
const target = cards[index];
|
|
673
|
+
if (target.type === 'HorizontalLayout') {
|
|
674
|
+
target.elements = Array.isArray(target.elements) ? target.elements : [];
|
|
675
|
+
if (type === 'left')
|
|
676
|
+
target.elements.unshift(element);
|
|
677
|
+
else
|
|
678
|
+
target.elements.push(element);
|
|
679
|
+
normalizeHorizontal(target);
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
cards.splice(index, 1, horizontalOf(type === 'left' ? [element, target] : [target, element]));
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
cards.splice(type === 'before' ? index : index + 1, 0, element);
|
|
686
|
+
}
|
|
687
|
+
function putInner(cards, element, parentIndex, innerIndex, type) {
|
|
688
|
+
const parent = cards[parentIndex];
|
|
689
|
+
if (parent?.type !== 'HorizontalLayout') {
|
|
690
|
+
putTopLevel(cards, element, parentIndex, 'after');
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
parent.elements = Array.isArray(parent.elements) ? parent.elements : [];
|
|
694
|
+
if (innerIndex === null || innerIndex === undefined || !parent.elements[innerIndex])
|
|
695
|
+
parent.elements.push(element);
|
|
696
|
+
else
|
|
697
|
+
parent.elements.splice(type === 'left' || type === 'before' ? innerIndex : innerIndex + 1, 0, element);
|
|
698
|
+
normalizeHorizontal(parent);
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* The places of a list shift when an element is taken out before them: the spot is corrected, so the element
|
|
702
|
+
* lands where the hint showed it.
|
|
703
|
+
*/
|
|
704
|
+
function shiftSpot(spot, from, cards, countBefore) {
|
|
705
|
+
const next = { ...spot };
|
|
706
|
+
if (from.parentIndex === null) {
|
|
707
|
+
if (next.index !== null && from.index < next.index)
|
|
708
|
+
next.index--;
|
|
709
|
+
if (next.parentIndex !== null && from.index < next.parentIndex)
|
|
710
|
+
next.parentIndex--;
|
|
711
|
+
}
|
|
712
|
+
else if (next.parentIndex === from.parentIndex && next.innerIndex !== null && from.index < next.innerIndex) {
|
|
713
|
+
next.innerIndex--;
|
|
714
|
+
}
|
|
715
|
+
// the horizontal layout the element came from may have become a single element or gone
|
|
716
|
+
if (from.parentIndex !== null && cards.length < countBefore) {
|
|
717
|
+
if (next.index !== null && next.index > from.parentIndex)
|
|
718
|
+
next.index--;
|
|
719
|
+
if (next.parentIndex !== null && next.parentIndex > from.parentIndex)
|
|
720
|
+
next.parentIndex--;
|
|
721
|
+
}
|
|
722
|
+
return next;
|
|
723
|
+
}
|
|
724
|
+
function put(cards, element, spot) {
|
|
725
|
+
if (spot.parentIndex === null) {
|
|
726
|
+
putTopLevel(cards, element, spot.index, spot.type);
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
const parent = cards[spot.parentIndex];
|
|
730
|
+
// above or below inside a horizontal layout means above or below the layout itself
|
|
731
|
+
if (!parent || spot.type === 'before' || spot.type === 'after') {
|
|
732
|
+
putTopLevel(cards, element, spot.parentIndex, spot.type === 'before' ? 'before' : 'after');
|
|
733
|
+
}
|
|
734
|
+
else if (parent.type === 'HorizontalLayout') {
|
|
735
|
+
putInner(cards, element, spot.parentIndex, spot.innerIndex, spot.type);
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
// the horizontal layout became one element when the dragged one left it: beside that element again
|
|
739
|
+
putTopLevel(cards, element, spot.parentIndex, spot.type === 'empty' ? 'after' : spot.type);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
/** A data object's field dropped at the spot. */
|
|
743
|
+
function dropCardProperty(layout, drop, spot, buttonCaption) {
|
|
744
|
+
const next = cloneLayout(layout || {});
|
|
745
|
+
next.cards = Array.isArray(next.cards) ? next.cards : [];
|
|
746
|
+
put(next.cards, elementFromProperty(drop, buttonCaption), spot);
|
|
747
|
+
return normalizeCard(next);
|
|
748
|
+
}
|
|
749
|
+
/** An element moved from its place to the spot. */
|
|
750
|
+
function moveCardElement(layout, from, spot) {
|
|
751
|
+
const next = cloneLayout(layout || {});
|
|
752
|
+
next.cards = Array.isArray(next.cards) ? next.cards : [];
|
|
753
|
+
const cards = next.cards;
|
|
754
|
+
if (from.parentIndex === null && spot.parentIndex === null && spot.index === from.index)
|
|
755
|
+
return next;
|
|
756
|
+
const countBefore = cards.length;
|
|
757
|
+
const element = takeOut(cards, from);
|
|
758
|
+
if (!element)
|
|
759
|
+
return next;
|
|
760
|
+
// a horizontal layout left with one element becomes that element, an empty one goes
|
|
761
|
+
if (from.parentIndex !== null) {
|
|
762
|
+
const parent = cards[from.parentIndex];
|
|
763
|
+
if (parent?.elements?.length === 0)
|
|
764
|
+
cards.splice(from.parentIndex, 1);
|
|
765
|
+
else if (parent?.elements?.length === 1)
|
|
766
|
+
cards.splice(from.parentIndex, 1, parent.elements[0]);
|
|
767
|
+
}
|
|
768
|
+
put(cards, element, shiftSpot(spot, from, cards, countBefore));
|
|
769
|
+
return normalizeCard(next);
|
|
770
|
+
}
|
|
771
|
+
function removeCardElement(layout, place) {
|
|
772
|
+
const next = cloneLayout(layout || {});
|
|
773
|
+
next.cards = Array.isArray(next.cards) ? next.cards : [];
|
|
774
|
+
takeOut(next.cards, place);
|
|
775
|
+
return normalizeCard(next);
|
|
776
|
+
}
|
|
777
|
+
/** A button added after the element (in its horizontal layout when it stands in one). */
|
|
778
|
+
function addCardButton(layout, after, caption) {
|
|
779
|
+
const next = cloneLayout(layout || {});
|
|
780
|
+
next.cards = Array.isArray(next.cards) ? next.cards : [];
|
|
781
|
+
const list = after.parentIndex === null ? next.cards : next.cards[after.parentIndex]?.elements;
|
|
782
|
+
if (!Array.isArray(list))
|
|
783
|
+
return next;
|
|
784
|
+
list.splice(after.index + 1, 0, cardButton(caption));
|
|
785
|
+
return normalizeCard(next);
|
|
786
|
+
}
|
|
787
|
+
/** The settings of a card element changed in the Designer's right panel. */
|
|
788
|
+
function replaceCardElement(layout, place, element) {
|
|
789
|
+
const next = cloneLayout(layout || {});
|
|
790
|
+
next.cards = Array.isArray(next.cards) ? next.cards : [];
|
|
791
|
+
const list = place.parentIndex === null || place.parentIndex === undefined ? next.cards : next.cards[place.parentIndex]?.elements;
|
|
792
|
+
if (!Array.isArray(list) || place.index < 0 || place.index >= list.length)
|
|
793
|
+
return next;
|
|
794
|
+
list[place.index] = cloneLayout(element);
|
|
795
|
+
return normalizeCard(next);
|
|
796
|
+
}
|
|
797
|
+
// ---- the page header the card shows ----
|
|
798
|
+
/** A button as the Designer adds it to the page header (it opens the page's dialog). */
|
|
799
|
+
function headerButton(caption = 'Add') {
|
|
800
|
+
return {
|
|
801
|
+
caption,
|
|
802
|
+
icon: '',
|
|
803
|
+
style: { width: 'auto', minWidth: '110px', maxWidth: '100%', height: '40px', padding: '0 16px', boxSizing: 'border-box' },
|
|
804
|
+
option: { innerAction: 'showModal', visible: true, modalTitle: 'Record Working Time', protected: false, layout_url: '', property_url: [] },
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function removeHeaderElement(header, index) {
|
|
808
|
+
const next = cloneLayout(header || {});
|
|
809
|
+
next.elements = Array.isArray(next.elements) ? next.elements : [];
|
|
810
|
+
if (index >= 0 && index < next.elements.length)
|
|
811
|
+
next.elements.splice(index, 1);
|
|
812
|
+
return next;
|
|
813
|
+
}
|
|
814
|
+
function clearHeader(header) {
|
|
815
|
+
return { ...cloneLayout(header || {}), elements: [] };
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// Shuaib 2026-10-26
|
|
819
|
+
// - new: the Designer's edits of a page with sections (form and dialog): drop a data object's field, move a field
|
|
820
|
+
// beside / above / below another (rows of up to four fields share the 12 columns), add and delete fields,
|
|
821
|
+
// buttons and sections. Moved here from the Designer's own form and dialog (LiveForge), so the Designer and the
|
|
822
|
+
// containers keep one rule (#166). Pure: every edit returns a new layout.
|
|
823
|
+
// - change: a field placed beside another keeps its label position in the dialog too (field.layout); the
|
|
824
|
+
// Designer's form kept it since 2026-10-24, its dialog still set it from the width
|
|
825
|
+
const GRID_COLUMNS = 12;
|
|
826
|
+
const MAX_FIELDS_PER_ROW = 4;
|
|
827
|
+
/** The upper quarter of a field puts the drop above, the lower quarter below, the middle beside it (left or right half). */
|
|
828
|
+
function dropTypeAt(rect, x, y) {
|
|
829
|
+
const relY = y - rect.top;
|
|
830
|
+
if (relY <= rect.height * 0.25)
|
|
831
|
+
return 'before';
|
|
832
|
+
if (relY >= rect.height * 0.75)
|
|
833
|
+
return 'after';
|
|
834
|
+
return x - rect.left <= rect.width / 2 ? 'left' : 'right';
|
|
835
|
+
}
|
|
836
|
+
function rowId() {
|
|
837
|
+
return `row_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
838
|
+
}
|
|
839
|
+
/** How many of the section's 12 columns a field takes (gridSpan, else its style's "span N", else by its label position). */
|
|
840
|
+
function fieldSpan(field) {
|
|
841
|
+
let span = Number(field?.gridSpan);
|
|
842
|
+
if (!span) {
|
|
843
|
+
const gridColumn = field?.style?.gridColumn || field?.style?.['grid-column'];
|
|
844
|
+
const match = typeof gridColumn === 'string' ? gridColumn.match(/span\s+(\d+)/) : null;
|
|
845
|
+
span = match ? Number(match[1]) : 0;
|
|
846
|
+
}
|
|
847
|
+
if (!span)
|
|
848
|
+
span = field?.layout === 'horizontal' ? 6 : GRID_COLUMNS;
|
|
849
|
+
return Math.max(1, Math.min(GRID_COLUMNS, span));
|
|
850
|
+
}
|
|
851
|
+
/** Gives a field its width; the label position stays as chosen, only a field without one gets it from the width. */
|
|
852
|
+
function setSpan(field, span, kind) {
|
|
853
|
+
const safe = Math.max(1, Math.min(GRID_COLUMNS, span));
|
|
854
|
+
field.gridSpan = safe;
|
|
855
|
+
field.layout = field.layout || (safe === GRID_COLUMNS ? 'vertical' : 'horizontal');
|
|
856
|
+
field.style = { ...(field.style || {}), gridColumn: `span ${safe}`, width: '100%', boxSizing: 'border-box' };
|
|
857
|
+
if (kind === 'dialog')
|
|
858
|
+
field.style.minWidth = '0';
|
|
859
|
+
if (kind === 'form')
|
|
860
|
+
delete field.style.classes;
|
|
861
|
+
for (const key of ['flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flex-grow', 'flex-shrink', 'flex-basis'])
|
|
862
|
+
delete field.style[key];
|
|
863
|
+
}
|
|
864
|
+
function fullWidth(field, kind) {
|
|
865
|
+
field.rowId = rowId();
|
|
866
|
+
setSpan(field, GRID_COLUMNS, kind);
|
|
867
|
+
return field;
|
|
868
|
+
}
|
|
869
|
+
/** The fields of one row share the 12 columns (at most four; more go to rows of their own). */
|
|
870
|
+
function rebalanceRow(fields, id, kind) {
|
|
871
|
+
const row = fields.filter(field => field?.rowId === id);
|
|
872
|
+
if (!row.length)
|
|
873
|
+
return;
|
|
874
|
+
if (row.length === 1) {
|
|
875
|
+
setSpan(row[0], GRID_COLUMNS, kind);
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
const span = Math.floor(GRID_COLUMNS / Math.min(row.length, MAX_FIELDS_PER_ROW));
|
|
879
|
+
row.forEach((field, index) => {
|
|
880
|
+
if (index < MAX_FIELDS_PER_ROW) {
|
|
881
|
+
field.rowId = id;
|
|
882
|
+
setSpan(field, span, kind);
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
fullWidth(field, kind);
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
function insertFullRow(fields, field, targetIndex, position, kind) {
|
|
890
|
+
fullWidth(field, kind);
|
|
891
|
+
if (targetIndex === null || !fields[targetIndex]) {
|
|
892
|
+
fields.push(field);
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
const target = fields[targetIndex].rowId;
|
|
896
|
+
if (!target) {
|
|
897
|
+
fields.splice(position === 'before' ? targetIndex : targetIndex + 1, 0, field);
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
if (position === 'before') {
|
|
901
|
+
const first = fields.findIndex(f => f?.rowId === target);
|
|
902
|
+
fields.splice(first >= 0 ? first : targetIndex, 0, field);
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
let last = -1;
|
|
906
|
+
fields.forEach((f, index) => { if (f?.rowId === target)
|
|
907
|
+
last = index; });
|
|
908
|
+
fields.splice(last >= 0 ? last + 1 : targetIndex + 1, 0, field);
|
|
909
|
+
}
|
|
910
|
+
function insertSameRow(fields, field, targetIndex, side, kind) {
|
|
911
|
+
const target = fields[targetIndex];
|
|
912
|
+
if (!target)
|
|
913
|
+
return;
|
|
914
|
+
const id = target.rowId || (target.rowId = rowId());
|
|
915
|
+
if (fields.filter(f => f?.rowId === id).length >= MAX_FIELDS_PER_ROW) {
|
|
916
|
+
insertFullRow(fields, field, targetIndex, 'after', kind);
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
field.rowId = id;
|
|
920
|
+
fields.splice(side === 'left' ? targetIndex : targetIndex + 1, 0, field);
|
|
921
|
+
rebalanceRow(fields, id, kind);
|
|
922
|
+
}
|
|
923
|
+
/** Puts a field into a section's fields at the drop spot. */
|
|
924
|
+
function insertField(fields, field, spot, kind) {
|
|
925
|
+
if ((spot.type === 'left' || spot.type === 'right') && spot.targetIndex !== null && fields[spot.targetIndex]) {
|
|
926
|
+
insertSameRow(fields, field, spot.targetIndex, spot.type, kind);
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
insertFullRow(fields, field, spot.targetIndex, spot.type === 'before' ? 'before' : spot.type === 'after' ? 'after' : 'empty', kind);
|
|
930
|
+
}
|
|
931
|
+
// ---- what a new section, button and field look like ----
|
|
932
|
+
function sectionLayout() {
|
|
933
|
+
return { mode: 'auto-grid', desktopColumns: 12, tabletColumns: 6, mobileColumns: 1, gap: '10px', mobileStack: true };
|
|
934
|
+
}
|
|
935
|
+
function formLabelStyle() {
|
|
936
|
+
return { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '6px', display: 'block' };
|
|
937
|
+
}
|
|
938
|
+
function formWrapperStyle() {
|
|
939
|
+
return {
|
|
940
|
+
gridColumn: 'span 12', width: '100%', boxSizing: 'border-box', padding: '12px', borderRadius: '4px',
|
|
941
|
+
border: '1px solid #ececf5', background: '#ffffff', margin: '0', boxShadow: '0 8px 18px rgba(16, 24, 40, 0.04)',
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function inputStyle() {
|
|
945
|
+
return { width: '100%', padding: '10px 12px', borderRadius: '4px', border: '1px solid #e5e7eb', background: '#ffffff', outline: 'none' };
|
|
946
|
+
}
|
|
947
|
+
/** An empty section as the Designer adds it. */
|
|
948
|
+
function newSection(kind) {
|
|
949
|
+
const body = { padding: '14px', borderRadius: '4px', border: '1px solid #e7e8ef', background: '#ffffff', marginBottom: '14px', boxShadow: '0 8px 18px rgba(16, 24, 40, 0.04)' };
|
|
950
|
+
const label = { fontSize: '15px', fontWeight: '700', color: '#111827' };
|
|
951
|
+
if (kind === 'dialog') {
|
|
952
|
+
return { label: { caption: '', style: { classes: ['lf-section-title'], ...label } }, style: { classes: ['lf-section-body'], ...body }, formFields: [] };
|
|
953
|
+
}
|
|
954
|
+
return { label: { caption: '', style: label }, layout: sectionLayout(), style: body, responsiveStyle: { tablet: {}, mobile: {} }, formFields: [] };
|
|
955
|
+
}
|
|
956
|
+
/** A button as the Designer adds it to a section. */
|
|
957
|
+
function newButton(kind, caption = 'Button') {
|
|
958
|
+
if (kind === 'dialog') {
|
|
959
|
+
return fullWidth({ label: { caption, style: {} }, option: { innerAction: 'submit' }, style: { gridColumn: 'span 12', width: '100%' }, layout: 'vertical' }, kind);
|
|
960
|
+
}
|
|
961
|
+
return { label: { caption, style: formLabelStyle() }, option: {}, required: false, style: formWrapperStyle(), layout: 'vertical', gridSpan: 12, rowId: rowId() };
|
|
962
|
+
}
|
|
963
|
+
/** The field a data object's property becomes when it is dropped (label: the property's name, changed afterwards). */
|
|
964
|
+
function fieldFromProperty(drop, kind) {
|
|
965
|
+
if (String(drop?.type ?? '').toLowerCase() === 'button')
|
|
966
|
+
return newButton(kind, drop.caption || 'Button');
|
|
967
|
+
const reference = `#/${dropObjectName(drop)}/properties/${drop.name}`;
|
|
968
|
+
if (kind === 'dialog') {
|
|
969
|
+
return {
|
|
970
|
+
label: { caption: drop.name, style: { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '6px', display: 'block' } },
|
|
971
|
+
option: { protected: false, required: false, disabled: false },
|
|
972
|
+
required: false,
|
|
973
|
+
scope: { reference, style: inputStyle() },
|
|
974
|
+
validation: { style: { color: '#ef4444', fontSize: '12px', marginTop: '4px' } },
|
|
975
|
+
style: { gridColumn: 'span 12' },
|
|
976
|
+
layout: 'vertical',
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
return {
|
|
980
|
+
label: { caption: drop.name, style: formLabelStyle() },
|
|
981
|
+
option: {},
|
|
982
|
+
required: false,
|
|
983
|
+
scope: { reference, style: { ...inputStyle(), boxSizing: 'border-box' } },
|
|
984
|
+
style: formWrapperStyle(),
|
|
985
|
+
layout: 'vertical',
|
|
986
|
+
gridSpan: 12,
|
|
987
|
+
rowId: rowId(),
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
// ---- the layout kept in shape ----
|
|
991
|
+
/**
|
|
992
|
+
* The layout as the Designer keeps it, changed in place: every section has its fields list; in a form the
|
|
993
|
+
* classes go (the right panel sets styles only), the section's grid is drawn by the container (no display or
|
|
994
|
+
* columns in its style) and every field belongs to a row.
|
|
995
|
+
*/
|
|
996
|
+
function normalizeSections(layout, kind) {
|
|
997
|
+
if (!layout)
|
|
998
|
+
return layout;
|
|
999
|
+
const sections = layout.formSections;
|
|
1000
|
+
if (kind === 'dialog') {
|
|
1001
|
+
if (Array.isArray(sections))
|
|
1002
|
+
sections.forEach((section) => { if (!Array.isArray(section.formFields))
|
|
1003
|
+
section.formFields = []; });
|
|
1004
|
+
return layout;
|
|
1005
|
+
}
|
|
1006
|
+
layout.style = layout.style || {};
|
|
1007
|
+
delete layout.style.classes;
|
|
1008
|
+
if (!Array.isArray(sections))
|
|
1009
|
+
return layout;
|
|
1010
|
+
for (const section of sections) {
|
|
1011
|
+
section.label = section.label || {};
|
|
1012
|
+
section.label.style = section.label.style || {};
|
|
1013
|
+
delete section.label.style.classes;
|
|
1014
|
+
section.layout = section.layout || sectionLayout();
|
|
1015
|
+
section.responsiveStyle = section.responsiveStyle || { tablet: {}, mobile: {} };
|
|
1016
|
+
section.style = section.style || {};
|
|
1017
|
+
for (const key of ['classes', 'display', 'gridTemplateColumns', 'grid-template-columns', 'alignItems', 'align-items', 'flex', 'flexWrap', 'flexDirection', 'flex-wrap', 'flex-direction']) {
|
|
1018
|
+
delete section.style[key];
|
|
1019
|
+
}
|
|
1020
|
+
if (!Array.isArray(section.formFields))
|
|
1021
|
+
section.formFields = [];
|
|
1022
|
+
normalizeFields(section.formFields);
|
|
1023
|
+
}
|
|
1024
|
+
return layout;
|
|
1025
|
+
}
|
|
1026
|
+
function normalizeFields(fields) {
|
|
1027
|
+
let activeRow = '';
|
|
1028
|
+
let activeSpan = 0;
|
|
1029
|
+
for (const field of fields) {
|
|
1030
|
+
field.style = field.style || {};
|
|
1031
|
+
delete field.style.classes;
|
|
1032
|
+
field.label = field.label || {};
|
|
1033
|
+
field.label.style = field.label.style || {};
|
|
1034
|
+
delete field.label.style.classes;
|
|
1035
|
+
if (field.scope) {
|
|
1036
|
+
field.scope.style = field.scope.style || {};
|
|
1037
|
+
delete field.scope.style.classes;
|
|
1038
|
+
}
|
|
1039
|
+
if (field.validation?.style)
|
|
1040
|
+
delete field.validation.style.classes;
|
|
1041
|
+
const span = fieldSpan(field);
|
|
1042
|
+
if (!field.rowId) {
|
|
1043
|
+
if (span === GRID_COLUMNS || !activeRow || activeSpan + span > GRID_COLUMNS) {
|
|
1044
|
+
activeRow = rowId();
|
|
1045
|
+
activeSpan = 0;
|
|
1046
|
+
}
|
|
1047
|
+
field.rowId = activeRow;
|
|
1048
|
+
activeSpan += span;
|
|
1049
|
+
}
|
|
1050
|
+
setSpan(field, span, 'form');
|
|
1051
|
+
}
|
|
1052
|
+
for (const id of new Set(fields.map(field => field.rowId).filter(Boolean)))
|
|
1053
|
+
rebalanceRow(fields, id, 'form');
|
|
1054
|
+
}
|
|
1055
|
+
// ---- the edits: each returns the new layout ----
|
|
1056
|
+
function sectionsOf(layout) {
|
|
1057
|
+
layout.formSections = Array.isArray(layout.formSections) ? layout.formSections : [];
|
|
1058
|
+
return layout.formSections;
|
|
1059
|
+
}
|
|
1060
|
+
/** A data object's field dropped at the spot. */
|
|
1061
|
+
function dropProperty(layout, drop, spot, kind) {
|
|
1062
|
+
const next = cloneLayout(layout || {});
|
|
1063
|
+
const section = sectionsOf(next)[spot.sectionIndex];
|
|
1064
|
+
if (!section)
|
|
1065
|
+
return next;
|
|
1066
|
+
section.formFields = Array.isArray(section.formFields) ? section.formFields : [];
|
|
1067
|
+
insertField(section.formFields, fieldFromProperty(drop, kind), spot, kind);
|
|
1068
|
+
return normalizeSections(next, kind);
|
|
1069
|
+
}
|
|
1070
|
+
/** A field moved from its place to the spot (same or another section). */
|
|
1071
|
+
function moveField(layout, from, spot, kind) {
|
|
1072
|
+
const next = cloneLayout(layout || {});
|
|
1073
|
+
const sections = sectionsOf(next);
|
|
1074
|
+
const source = sections[from.sectionIndex]?.formFields;
|
|
1075
|
+
const target = sections[spot.sectionIndex]?.formFields;
|
|
1076
|
+
if (!Array.isArray(source) || !Array.isArray(target))
|
|
1077
|
+
return next;
|
|
1078
|
+
const field = source[from.fieldIndex];
|
|
1079
|
+
if (!field)
|
|
1080
|
+
return next;
|
|
1081
|
+
const same = source === target;
|
|
1082
|
+
// dropped beside itself: nothing to do
|
|
1083
|
+
if (same && spot.targetIndex === from.fieldIndex && (spot.type === 'left' || spot.type === 'right'))
|
|
1084
|
+
return next;
|
|
1085
|
+
const oldRow = field.rowId;
|
|
1086
|
+
source.splice(from.fieldIndex, 1);
|
|
1087
|
+
let targetIndex = spot.targetIndex;
|
|
1088
|
+
if (same && targetIndex !== null && from.fieldIndex < targetIndex)
|
|
1089
|
+
targetIndex--;
|
|
1090
|
+
insertField(target, field, { type: spot.type, targetIndex }, kind);
|
|
1091
|
+
if (oldRow)
|
|
1092
|
+
rebalanceRow(source, oldRow, kind);
|
|
1093
|
+
return normalizeSections(next, kind);
|
|
1094
|
+
}
|
|
1095
|
+
function removeField(layout, sectionIndex, fieldIndex, kind) {
|
|
1096
|
+
const next = cloneLayout(layout || {});
|
|
1097
|
+
const fields = sectionsOf(next)[sectionIndex]?.formFields;
|
|
1098
|
+
if (!Array.isArray(fields) || fieldIndex < 0 || fieldIndex >= fields.length)
|
|
1099
|
+
return next;
|
|
1100
|
+
const [removed] = fields.splice(fieldIndex, 1);
|
|
1101
|
+
if (removed?.rowId)
|
|
1102
|
+
rebalanceRow(fields, removed.rowId, kind);
|
|
1103
|
+
return normalizeSections(next, kind);
|
|
1104
|
+
}
|
|
1105
|
+
/** A section deleted; a form keeps one empty section to drop fields into. */
|
|
1106
|
+
function removeSection(layout, sectionIndex, kind) {
|
|
1107
|
+
const next = cloneLayout(layout || {});
|
|
1108
|
+
const sections = sectionsOf(next);
|
|
1109
|
+
if (sectionIndex < 0 || sectionIndex >= sections.length)
|
|
1110
|
+
return next;
|
|
1111
|
+
sections.splice(sectionIndex, 1);
|
|
1112
|
+
if (kind === 'form' && !sections.length)
|
|
1113
|
+
sections.push(newSection(kind));
|
|
1114
|
+
return normalizeSections(next, kind);
|
|
1115
|
+
}
|
|
1116
|
+
function moveSection(layout, from, to) {
|
|
1117
|
+
const next = cloneLayout(layout || {});
|
|
1118
|
+
const sections = sectionsOf(next);
|
|
1119
|
+
if (from < 0 || to < 0 || from >= sections.length || to >= sections.length || from === to)
|
|
1120
|
+
return next;
|
|
1121
|
+
const [section] = sections.splice(from, 1);
|
|
1122
|
+
sections.splice(to, 0, section);
|
|
1123
|
+
return next;
|
|
1124
|
+
}
|
|
1125
|
+
function addSection(layout, kind) {
|
|
1126
|
+
const next = cloneLayout(layout || {});
|
|
1127
|
+
sectionsOf(next).push(newSection(kind));
|
|
1128
|
+
return normalizeSections(next, kind);
|
|
1129
|
+
}
|
|
1130
|
+
function addButton(layout, sectionIndex, kind, caption = 'Button') {
|
|
1131
|
+
const next = cloneLayout(layout || {});
|
|
1132
|
+
const section = sectionsOf(next)[sectionIndex];
|
|
1133
|
+
if (!section)
|
|
1134
|
+
return next;
|
|
1135
|
+
section.formFields = Array.isArray(section.formFields) ? section.formFields : [];
|
|
1136
|
+
section.formFields.push(newButton(kind, caption));
|
|
1137
|
+
return normalizeSections(next, kind);
|
|
1138
|
+
}
|
|
1139
|
+
/** The settings of a section or field changed in the Designer's right panel. */
|
|
1140
|
+
function replaceSection(layout, sectionIndex, section, kind) {
|
|
1141
|
+
const next = cloneLayout(layout || {});
|
|
1142
|
+
const sections = sectionsOf(next);
|
|
1143
|
+
if (sectionIndex < 0 || sectionIndex >= sections.length)
|
|
1144
|
+
return next;
|
|
1145
|
+
sections[sectionIndex] = cloneLayout(section);
|
|
1146
|
+
return normalizeSections(next, kind);
|
|
1147
|
+
}
|
|
1148
|
+
function replaceField(layout, sectionIndex, fieldIndex, field, kind) {
|
|
1149
|
+
const next = cloneLayout(layout || {});
|
|
1150
|
+
const fields = sectionsOf(next)[sectionIndex]?.formFields;
|
|
1151
|
+
if (!Array.isArray(fields) || fieldIndex < 0 || fieldIndex >= fields.length)
|
|
1152
|
+
return next;
|
|
1153
|
+
fields[fieldIndex] = cloneLayout(field);
|
|
1154
|
+
return normalizeSections(next, kind);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// Shuaib 2026-10-26
|
|
1158
|
+
// - new: CardDesigner - drag and drop of a card page in design mode (vl-card): the drop hint under the pointer
|
|
1159
|
+
// (above, below or beside an element of the first card, or inside a horizontal layout), the drop itself and the
|
|
1160
|
+
// element actions (#166)
|
|
1161
|
+
let cardDesignerCount = 0;
|
|
1162
|
+
class CardDesigner {
|
|
1163
|
+
host;
|
|
1164
|
+
hint = null;
|
|
1165
|
+
dragging = false;
|
|
1166
|
+
moving = false;
|
|
1167
|
+
prefix = `vl-card-design-${++cardDesignerCount}`;
|
|
1168
|
+
constructor(host) {
|
|
1169
|
+
this.host = host;
|
|
1170
|
+
}
|
|
1171
|
+
/** The drop list of the card's elements. */
|
|
1172
|
+
listId() {
|
|
1173
|
+
return this.prefix;
|
|
1174
|
+
}
|
|
1175
|
+
/** The drop list of the horizontal layout at index. */
|
|
1176
|
+
innerListId(index) {
|
|
1177
|
+
return `${this.prefix}-${index}`;
|
|
1178
|
+
}
|
|
1179
|
+
/** The card's list and every horizontal layout's list, so an element can go from one into another. */
|
|
1180
|
+
listIds() {
|
|
1181
|
+
const cards = this.host.layout()?.cards || [];
|
|
1182
|
+
return [this.listId(), ...cards.map((c, i) => c?.type === 'HorizontalLayout' ? this.innerListId(i) : '').filter(Boolean)];
|
|
1183
|
+
}
|
|
1184
|
+
dragData(index, parentIndex) {
|
|
1185
|
+
return { vlDesign: 'cardElement', index, parentIndex };
|
|
1186
|
+
}
|
|
1187
|
+
// ---- the hint under the pointer ----
|
|
1188
|
+
rowsOf(list) {
|
|
1189
|
+
return Array.from(list.querySelectorAll('[data-vl-design-element]'))
|
|
1190
|
+
.filter(row => !row.classList.contains('cdk-drag-placeholder') && row.closest('[data-vl-design-list]') === list);
|
|
1191
|
+
}
|
|
1192
|
+
inside(rect, x, y) {
|
|
1193
|
+
return rect.width > 0 && rect.height > 0 && x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
|
|
1194
|
+
}
|
|
1195
|
+
/** The drop spot at a point of the first card: inside a horizontal layout first, else among the card's elements. */
|
|
1196
|
+
spotAt(x, y) {
|
|
1197
|
+
const empty = { type: 'empty', index: null, parentIndex: null, innerIndex: null };
|
|
1198
|
+
if (typeof document === 'undefined')
|
|
1199
|
+
return empty;
|
|
1200
|
+
const cards = this.host.layout()?.cards || [];
|
|
1201
|
+
for (let i = 0; i < cards.length; i++) {
|
|
1202
|
+
if (cards[i]?.type !== 'HorizontalLayout')
|
|
1203
|
+
continue;
|
|
1204
|
+
const inner = document.getElementById(this.innerListId(i));
|
|
1205
|
+
if (!inner || !this.inside(inner.getBoundingClientRect(), x, y))
|
|
1206
|
+
continue;
|
|
1207
|
+
const rows = this.rowsOf(inner);
|
|
1208
|
+
if (!rows.length)
|
|
1209
|
+
return { type: 'empty', index: i, parentIndex: i, innerIndex: null };
|
|
1210
|
+
for (const row of rows) {
|
|
1211
|
+
const rect = row.getBoundingClientRect();
|
|
1212
|
+
if (this.inside(rect, x, y))
|
|
1213
|
+
return { type: dropTypeAt(rect, x, y), index: i, parentIndex: i, innerIndex: Number(row.getAttribute('data-vl-design-element')) };
|
|
1214
|
+
}
|
|
1215
|
+
return { type: 'after', index: i, parentIndex: i, innerIndex: Number(rows[rows.length - 1].getAttribute('data-vl-design-element')) };
|
|
1216
|
+
}
|
|
1217
|
+
const list = document.getElementById(this.listId());
|
|
1218
|
+
if (!list)
|
|
1219
|
+
return empty;
|
|
1220
|
+
const rows = this.rowsOf(list);
|
|
1221
|
+
if (!rows.length)
|
|
1222
|
+
return empty;
|
|
1223
|
+
for (const row of rows) {
|
|
1224
|
+
const rect = row.getBoundingClientRect();
|
|
1225
|
+
if (this.inside(rect, x, y))
|
|
1226
|
+
return { type: dropTypeAt(rect, x, y), index: Number(row.getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
|
|
1227
|
+
}
|
|
1228
|
+
if (y < rows[0].getBoundingClientRect().top)
|
|
1229
|
+
return { type: 'before', index: Number(rows[0].getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
|
|
1230
|
+
return { type: 'after', index: Number(rows[rows.length - 1].getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
|
|
1231
|
+
}
|
|
1232
|
+
setHint(next) {
|
|
1233
|
+
const h = this.hint;
|
|
1234
|
+
if (h && h.type === next.type && h.index === next.index && h.parentIndex === next.parentIndex && h.innerIndex === next.innerIndex)
|
|
1235
|
+
return;
|
|
1236
|
+
this.hint = next;
|
|
1237
|
+
}
|
|
1238
|
+
entered() {
|
|
1239
|
+
this.dragging = true;
|
|
1240
|
+
if (!this.hint)
|
|
1241
|
+
this.hint = { type: 'empty', index: null, parentIndex: null, innerIndex: null };
|
|
1242
|
+
}
|
|
1243
|
+
pointerMove(event) {
|
|
1244
|
+
if (!this.dragging)
|
|
1245
|
+
return;
|
|
1246
|
+
this.setHint(this.spotAt(event.clientX, event.clientY));
|
|
1247
|
+
}
|
|
1248
|
+
exited() {
|
|
1249
|
+
if (this.dragging && !this.moving)
|
|
1250
|
+
this.hint = null;
|
|
1251
|
+
}
|
|
1252
|
+
dragStarted() {
|
|
1253
|
+
this.host.deselect();
|
|
1254
|
+
this.dragging = true;
|
|
1255
|
+
this.moving = true;
|
|
1256
|
+
}
|
|
1257
|
+
dragMoved(event) {
|
|
1258
|
+
const pointer = event.pointerPosition;
|
|
1259
|
+
if (pointer)
|
|
1260
|
+
this.setHint(this.spotAt(pointer.x, pointer.y));
|
|
1261
|
+
}
|
|
1262
|
+
dragEnded() {
|
|
1263
|
+
setTimeout(() => {
|
|
1264
|
+
this.clear();
|
|
1265
|
+
this.host.refresh();
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
clear() {
|
|
1269
|
+
this.hint = null;
|
|
1270
|
+
this.dragging = false;
|
|
1271
|
+
this.moving = false;
|
|
1272
|
+
}
|
|
1273
|
+
/** An empty card list (parentIndex null) or an empty horizontal layout under the pointer. */
|
|
1274
|
+
isEmptyHint(parentIndex) {
|
|
1275
|
+
return this.hint?.type === 'empty' && (this.hint.parentIndex ?? null) === parentIndex;
|
|
1276
|
+
}
|
|
1277
|
+
/** The element the hint is drawn at: a card element (parentIndex null) or an element of a horizontal layout. */
|
|
1278
|
+
isTargetHint(index, parentIndex) {
|
|
1279
|
+
const h = this.hint;
|
|
1280
|
+
if (!h || h.type === 'empty')
|
|
1281
|
+
return false;
|
|
1282
|
+
return parentIndex === null ? h.parentIndex === null && h.index === index : h.parentIndex === parentIndex && h.innerIndex === index;
|
|
1283
|
+
}
|
|
1284
|
+
hintText(texts) {
|
|
1285
|
+
switch (this.hint?.type) {
|
|
1286
|
+
case 'before': return texts.placeAbove;
|
|
1287
|
+
case 'after': return texts.placeBelow;
|
|
1288
|
+
case 'left': return texts.placeLeft;
|
|
1289
|
+
case 'right': return texts.placeRight;
|
|
1290
|
+
default: return texts.dropCardItem;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
// ---- the drop and the actions ----
|
|
1294
|
+
dropped(event, buttonCaption) {
|
|
1295
|
+
const point = event.dropPoint;
|
|
1296
|
+
const spot = this.hint ?? (point ? this.spotAt(point.x, point.y) : { type: 'empty', index: null, parentIndex: null, innerIndex: null });
|
|
1297
|
+
const data = event.item?.data;
|
|
1298
|
+
const layout = this.host.layout();
|
|
1299
|
+
this.clear();
|
|
1300
|
+
if (isPropertyDrop(data)) {
|
|
1301
|
+
this.host.apply(dropCardProperty(layout, data, spot, buttonCaption));
|
|
1302
|
+
}
|
|
1303
|
+
else if (data?.vlDesign === 'cardElement') {
|
|
1304
|
+
this.host.apply(moveCardElement(layout, { index: data.index, parentIndex: data.parentIndex }, spot));
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
addButton(index, parentIndex, caption) {
|
|
1308
|
+
this.host.apply(addCardButton(this.host.layout(), { index, parentIndex }, caption));
|
|
1309
|
+
}
|
|
1310
|
+
remove(index, parentIndex) {
|
|
1311
|
+
this.host.deselect();
|
|
1312
|
+
this.host.apply(removeCardElement(this.host.layout(), { index, parentIndex }));
|
|
1313
|
+
}
|
|
1314
|
+
edit(index, parentIndex) {
|
|
1315
|
+
this.host.select({ kind: 'element', index, parentIndex });
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// Shuaib 2026-10-26
|
|
1320
|
+
// - new: sample records for card and grid in design mode - one value per field of the layout, by the type of its
|
|
1321
|
+
// data object's property; moved here from the Designer's card and grid (#166)
|
|
1322
|
+
/** The fields a layout shows (card elements, inner elements of a horizontal layout, grid columns). */
|
|
1323
|
+
function fieldsOf(nodes) {
|
|
1324
|
+
const fields = [];
|
|
1325
|
+
const visit = (node) => {
|
|
1326
|
+
if (!node || typeof node !== 'object')
|
|
1327
|
+
return;
|
|
1328
|
+
if (Array.isArray(node.elements) && !node.scope?.reference) {
|
|
1329
|
+
node.elements.forEach(visit);
|
|
1330
|
+
return;
|
|
1331
|
+
}
|
|
1332
|
+
if (typeof node.scope?.reference === 'string')
|
|
1333
|
+
fields.push(node);
|
|
1334
|
+
};
|
|
1335
|
+
(nodes || []).forEach(visit);
|
|
1336
|
+
return fields;
|
|
1337
|
+
}
|
|
1338
|
+
function propertyOf(reference, propertySchema) {
|
|
1339
|
+
const parts = reference.replace(/^#\//, '').split('/');
|
|
1340
|
+
return propertySchema?.[parts[0]]?.[parts[parts.length - 1]];
|
|
1341
|
+
}
|
|
1342
|
+
function dayFromToday(index) {
|
|
1343
|
+
const date = new Date();
|
|
1344
|
+
date.setHours(9, 0, 0, 0);
|
|
1345
|
+
date.setDate(date.getDate() + index);
|
|
1346
|
+
return date;
|
|
1347
|
+
}
|
|
1348
|
+
/** A sample value of a property for record number index (0, 1, …). */
|
|
1349
|
+
function sampleValue(type, name, index, node, image) {
|
|
1350
|
+
const t = String(type || 'string').toLowerCase();
|
|
1351
|
+
switch (t) {
|
|
1352
|
+
case 'number':
|
|
1353
|
+
case 'integer':
|
|
1354
|
+
case 'bigdecimal':
|
|
1355
|
+
case 'currency':
|
|
1356
|
+
case 'quantity':
|
|
1357
|
+
return (index + 1) * 10;
|
|
1358
|
+
case 'boolean':
|
|
1359
|
+
case 'checkbox':
|
|
1360
|
+
return index % 2 === 0;
|
|
1361
|
+
case 'date':
|
|
1362
|
+
case 'time':
|
|
1363
|
+
case 'datetime':
|
|
1364
|
+
case 'date&time':
|
|
1365
|
+
case 'date-time':
|
|
1366
|
+
return dayFromToday(index).toISOString();
|
|
1367
|
+
case 'daterange':
|
|
1368
|
+
return [dayFromToday(index).toISOString(), dayFromToday(index + 2).toISOString()];
|
|
1369
|
+
case 'media':
|
|
1370
|
+
return node?.option?.src || image || '';
|
|
1371
|
+
case 'array':
|
|
1372
|
+
return [];
|
|
1373
|
+
case 'object':
|
|
1374
|
+
return {};
|
|
1375
|
+
case 'string':
|
|
1376
|
+
return `${name} ${index + 1}`;
|
|
1377
|
+
default:
|
|
1378
|
+
return `${name}_${index + 1}`;
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* count sample records for the fields of the layout nodes: each field gets a value of its property's type, a
|
|
1383
|
+
* list field (dropdown, radio buttons) the value of its list's entry.
|
|
1384
|
+
*/
|
|
1385
|
+
function sampleRecords(nodes, propertySchema, count, image) {
|
|
1386
|
+
const fields = fieldsOf(nodes);
|
|
1387
|
+
return Array.from({ length: Math.max(0, count) }, (_, index) => {
|
|
1388
|
+
const record = {};
|
|
1389
|
+
for (const field of fields) {
|
|
1390
|
+
const reference = field.scope.reference;
|
|
1391
|
+
const name = reference.split('/').pop() || '';
|
|
1392
|
+
const property = propertyOf(reference, propertySchema);
|
|
1393
|
+
const list = Array.isArray(property?.enum) ? property.enum : null;
|
|
1394
|
+
const entry = list?.length ? list[index % list.length] : undefined;
|
|
1395
|
+
record[name] = list?.length
|
|
1396
|
+
? (entry && typeof entry === 'object' ? entry.value ?? entry.key ?? entry.label : entry)
|
|
1397
|
+
: sampleValue(property?.type, name, index, field, image);
|
|
1398
|
+
}
|
|
1399
|
+
return record;
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
// Shuaib 2026-10-26
|
|
1404
|
+
// - new: <vl-design-bar> - the handles of an element in design mode (drag, add, edit, delete) and <vl-drop-marker>
|
|
1405
|
+
// - where a dragged element would land; one look in every container (#166)
|
|
1406
|
+
const ICONS = { drag: 'pi pi-bars', add: 'pi pi-plus', edit: 'pi pi-pencil', delete: 'pi pi-trash' };
|
|
1407
|
+
/**
|
|
1408
|
+
* The handles of one element. "drag" is the cdkDragHandle of the element it stands in; the others report their
|
|
1409
|
+
* action (act) without the click reaching the element.
|
|
1410
|
+
*/
|
|
1411
|
+
class DesignBarComponent {
|
|
1412
|
+
actions = [];
|
|
1413
|
+
/** the tooltip of each handle */
|
|
1414
|
+
titles = {};
|
|
1415
|
+
act = new EventEmitter();
|
|
1416
|
+
icon(action) {
|
|
1417
|
+
return ICONS[action];
|
|
1418
|
+
}
|
|
1419
|
+
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
|
+
}
|
|
1432
|
+
}`, 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
|
+
}
|
|
1434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, decorators: [{
|
|
1435
|
+
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
|
+
}
|
|
1448
|
+
}`, 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
|
+
}], propDecorators: { actions: [{
|
|
1450
|
+
type: Input
|
|
1451
|
+
}], titles: [{
|
|
1452
|
+
type: Input
|
|
1453
|
+
}], act: [{
|
|
1454
|
+
type: Output
|
|
1455
|
+
}] } });
|
|
1456
|
+
/** Where a dragged element lands: a line above, below, left or right of an element, or a box in an empty place. */
|
|
1457
|
+
class DropMarkerComponent {
|
|
1458
|
+
type = 'empty';
|
|
1459
|
+
text = '';
|
|
1460
|
+
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>
|
|
1466
|
+
}`, 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
|
+
}
|
|
1468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DropMarkerComponent, decorators: [{
|
|
1469
|
+
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>
|
|
1475
|
+
}`, 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
|
+
}], propDecorators: { type: [{
|
|
1477
|
+
type: Input
|
|
1478
|
+
}], text: [{
|
|
1479
|
+
type: Input
|
|
1480
|
+
}] } });
|
|
1481
|
+
|
|
1482
|
+
// Shuaib 2026-10-26
|
|
1483
|
+
// - new: withAppPagination - a page's area as card and grid read it, for an app with app settings: the page bar's
|
|
1484
|
+
// values from the page, else from Main, else the default (paginationFor of the catalog). The same rule as the
|
|
1485
|
+
// app's own (viewdefinition app.ts withAppPagination), here so the Designer's canvas shows the bar the app shows
|
|
1486
|
+
/** The page's area (center) with the page bar it is shown with; unchanged without app settings or without a bar. */
|
|
1487
|
+
function withAppPagination(mainCenter, center) {
|
|
1488
|
+
if (!mainCenter?.appSettings || !center?.pagination)
|
|
1489
|
+
return center;
|
|
1490
|
+
const effective = paginationFor({ center: mainCenter }, { center });
|
|
1491
|
+
const justify = { left: 'flex-start', center: 'center', right: 'flex-end', split: 'space-between' };
|
|
1492
|
+
return {
|
|
1493
|
+
...center,
|
|
1494
|
+
pagination: {
|
|
1495
|
+
...center.pagination,
|
|
1496
|
+
visible: effective.visible,
|
|
1497
|
+
top: effective.placement === 'top',
|
|
1498
|
+
bottom: effective.placement === 'bottom',
|
|
1499
|
+
pageSize: effective.pageSize,
|
|
1500
|
+
defaultPageSize: effective.defaultPageSize,
|
|
1501
|
+
pageSizeOptions: effective.pageSizeOptions,
|
|
1502
|
+
caption: effective.caption,
|
|
1503
|
+
style: { ...(center.pagination.style ?? {}), 'justify-content': justify[effective.align] ?? 'center' },
|
|
1504
|
+
},
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
|
|
478
1508
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
|
|
479
1509
|
// - new: vlRules - a field's validation rules, only from its layout (field/field-model.ts
|
|
480
1510
|
// fieldRules: required, email, minLength, maxLength, pattern, minimum, maximum). Pure: computed
|
|
@@ -6484,7 +7514,7 @@ class PaginationComponent {
|
|
|
6484
7514
|
this.onGoToPage.emit(page);
|
|
6485
7515
|
}
|
|
6486
7516
|
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 });
|
|
6487
|
-
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]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\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)\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\">\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)\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, 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=\"\r\n let size of\r\n itemInfo?.layoutSchema\r\n ?.pagination?.pageSizeOptions ||\r\n [5, 10, 15, 20]\r\n \" [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:
|
|
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]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\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)\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\">\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)\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, 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=\"\r\n let size of\r\n itemInfo?.layoutSchema\r\n ?.pagination?.pageSizeOptions ||\r\n [5, 10, 15, 20]\r\n \" [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 }] });
|
|
6488
7518
|
}
|
|
6489
7519
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
6490
7520
|
type: Component,
|
|
@@ -6965,6 +7995,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
6965
7995
|
}]
|
|
6966
7996
|
}], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1$2.Platform }] });
|
|
6967
7997
|
|
|
7998
|
+
// Shuaib 2026-10-26
|
|
7999
|
+
// - new: design mode (input design, output designChange): the Designer's canvas draws its card page with this
|
|
8000
|
+
// container - sample records (sampleRecords), the page bar as the app shows it (withAppPagination), every element
|
|
8001
|
+
// of the first card with drag, add, edit and delete (CardDesigner), the page header's buttons with edit and
|
|
8002
|
+
// delete; no translation, data or backend list. The device of the Designer's switch decides the cards per row
|
|
8003
|
+
// (deviceMode) (#166)
|
|
6968
8004
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
6969
8005
|
// - change: a data object holds names and types only - the media caption comes from the layout
|
|
6970
8006
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
@@ -7126,6 +8162,39 @@ class CardComponent {
|
|
|
7126
8162
|
onPageChange = new EventEmitter();
|
|
7127
8163
|
paginationMode = 'server';
|
|
7128
8164
|
paginationLoading = false;
|
|
8165
|
+
/** The Designer's canvas: sample records, every element with drag, edit and delete, nothing loaded (design/design.ts). */
|
|
8166
|
+
design = null;
|
|
8167
|
+
/** What was chosen or changed on the Designer's canvas. */
|
|
8168
|
+
designChange = new EventEmitter();
|
|
8169
|
+
/** The texts of the design handles. */
|
|
8170
|
+
dt = designTexts(null);
|
|
8171
|
+
/** How many sample cards the canvas shows (Add card / Delete card). */
|
|
8172
|
+
designCount = 1;
|
|
8173
|
+
/** The page of sample cards the canvas shows. */
|
|
8174
|
+
designPage = 0;
|
|
8175
|
+
designPageSize = 5;
|
|
8176
|
+
/** The sample records, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
|
|
8177
|
+
designAll = [];
|
|
8178
|
+
designInfo = null;
|
|
8179
|
+
designPages = [];
|
|
8180
|
+
/** Drag and drop of the card's elements in design mode. */
|
|
8181
|
+
designer = new CardDesigner({
|
|
8182
|
+
layout: () => this.itemInfo?.layoutSchema,
|
|
8183
|
+
apply: next => {
|
|
8184
|
+
this.itemInfo.layoutSchema = next;
|
|
8185
|
+
this.refreshDesign();
|
|
8186
|
+
this.designChange.emit({ type: 'layout', layoutSchema: next });
|
|
8187
|
+
},
|
|
8188
|
+
select: target => this.designChange.emit({ type: 'select', target }),
|
|
8189
|
+
deselect: () => {
|
|
8190
|
+
if (this.design?.selected)
|
|
8191
|
+
this.designChange.emit({ type: 'deselect' });
|
|
8192
|
+
},
|
|
8193
|
+
refresh: () => this.cdr.markForCheck(),
|
|
8194
|
+
});
|
|
8195
|
+
/** The device the Designer shows the page on. */
|
|
8196
|
+
get designMobile() { return this.design?.device === 'mobile'; }
|
|
8197
|
+
get designTablet() { return this.design?.device === 'tablet'; }
|
|
7129
8198
|
scrollPaginationSentinel;
|
|
7130
8199
|
scrollObserver;
|
|
7131
8200
|
requestedScrollPage = null;
|
|
@@ -7154,6 +8223,15 @@ class CardComponent {
|
|
|
7154
8223
|
this.updateDeviceMode();
|
|
7155
8224
|
}
|
|
7156
8225
|
ngOnChanges(changes) {
|
|
8226
|
+
if (this.design) {
|
|
8227
|
+
// the canvas shows the layout as written with sample records: no translation, no data, no backend list
|
|
8228
|
+
this.dt = designTexts(this.design);
|
|
8229
|
+
if (changes['design'] && !changes['design'].previousValue && this.design.sampleCount)
|
|
8230
|
+
this.designCount = Math.max(1, this.design.sampleCount);
|
|
8231
|
+
this.updateDeviceMode();
|
|
8232
|
+
this.refreshDesign();
|
|
8233
|
+
return;
|
|
8234
|
+
}
|
|
7157
8235
|
// Backend lists of fields with option.autocomplete (any data type, any control).
|
|
7158
8236
|
if (changes['itemInfo'] && this.itemInfo) {
|
|
7159
8237
|
void this.loadRemoteLists([this.itemInfo.layoutSchema, this.itemInfo.header], this.itemInfo.propertySchema);
|
|
@@ -7273,6 +8351,96 @@ class CardComponent {
|
|
|
7273
8351
|
ngAfterViewInit() {
|
|
7274
8352
|
this.setupScrollObserver();
|
|
7275
8353
|
}
|
|
8354
|
+
// ---- design mode ----
|
|
8355
|
+
/** The sample records, the page bar and its pages of the canvas, from the layout as it is now. */
|
|
8356
|
+
refreshDesign() {
|
|
8357
|
+
const layout = this.itemInfo?.layoutSchema || {};
|
|
8358
|
+
const center = withAppPagination(this.design?.main?.center, layout);
|
|
8359
|
+
const bar = center?.pagination || {};
|
|
8360
|
+
this.designPageSize = Number(bar.defaultPageSize) || Number(bar.pageSize) || 5;
|
|
8361
|
+
const samples = sampleRecords(layout.cards || [], this.itemInfo?.propertySchema, layout.cards?.length ? this.designCount : 0, this.design?.sampleImage);
|
|
8362
|
+
// the same records while they stay the same: a click on an element does not draw every card anew
|
|
8363
|
+
if (JSON.stringify(samples) !== JSON.stringify(this.designAll))
|
|
8364
|
+
this.designAll = samples;
|
|
8365
|
+
this.designPages = Array.from({ length: Math.ceil(this.designAll.length / this.designPageSize) }, (_, i) => i);
|
|
8366
|
+
if (this.designPage > this.designPages.length - 1)
|
|
8367
|
+
this.designPage = 0;
|
|
8368
|
+
this.designInfo = { ...this.itemInfo, layoutSchema: center, data: this.designAll };
|
|
8369
|
+
}
|
|
8370
|
+
/** The sample cards of the page shown, the first one with the handles - the same list while nothing changed. */
|
|
8371
|
+
get designRecords() {
|
|
8372
|
+
if (!this.designInfo?.layoutSchema?.pagination?.visible)
|
|
8373
|
+
return this.designAll;
|
|
8374
|
+
const memo = this.recordsMemo;
|
|
8375
|
+
if (memo && memo.all === this.designAll && memo.page === this.designPage && memo.size === this.designPageSize)
|
|
8376
|
+
return memo.records;
|
|
8377
|
+
const start = this.designPage * this.designPageSize;
|
|
8378
|
+
this.recordsMemo = { all: this.designAll, page: this.designPage, size: this.designPageSize, records: this.designAll.slice(start, start + this.designPageSize) };
|
|
8379
|
+
return this.recordsMemo.records;
|
|
8380
|
+
}
|
|
8381
|
+
recordsMemo = null;
|
|
8382
|
+
isSelected(target) {
|
|
8383
|
+
return isTarget(this.design?.selected, target);
|
|
8384
|
+
}
|
|
8385
|
+
/** A card element hidden in the app (the card shows an element only with option.visible). */
|
|
8386
|
+
hiddenInApp(element) {
|
|
8387
|
+
return !element?.option?.visible;
|
|
8388
|
+
}
|
|
8389
|
+
/**
|
|
8390
|
+
* The card's own handles: a button for the page header, the settings of the card layout. The header belongs to
|
|
8391
|
+
* the whole page: its changes are told to the Designer (type header), which keeps and hands it back.
|
|
8392
|
+
*/
|
|
8393
|
+
containerAction(action) {
|
|
8394
|
+
if (action === 'edit') {
|
|
8395
|
+
this.designChange.emit({ type: 'select', target: { kind: 'container' } });
|
|
8396
|
+
}
|
|
8397
|
+
else if (action === 'add') {
|
|
8398
|
+
const added = headerButton();
|
|
8399
|
+
const header = cloneLayout(this.itemInfo?.header || { style: {}, elements: [] });
|
|
8400
|
+
header.elements = [...(header.elements || []), added];
|
|
8401
|
+
this.designChange.emit({ type: 'header', header, added });
|
|
8402
|
+
}
|
|
8403
|
+
}
|
|
8404
|
+
headerAction(action) {
|
|
8405
|
+
if (action === 'edit') {
|
|
8406
|
+
this.designChange.emit({ type: 'select', target: { kind: 'header' } });
|
|
8407
|
+
}
|
|
8408
|
+
else if (action === 'delete') {
|
|
8409
|
+
if (this.design?.selected)
|
|
8410
|
+
this.designChange.emit({ type: 'deselect' });
|
|
8411
|
+
this.designChange.emit({ type: 'header', header: clearHeader(this.itemInfo?.header) });
|
|
8412
|
+
}
|
|
8413
|
+
}
|
|
8414
|
+
headerElementAction(action, index) {
|
|
8415
|
+
if (action === 'edit') {
|
|
8416
|
+
this.designChange.emit({ type: 'select', target: { kind: 'headerElement', index } });
|
|
8417
|
+
}
|
|
8418
|
+
else if (action === 'delete') {
|
|
8419
|
+
if (this.design?.selected)
|
|
8420
|
+
this.designChange.emit({ type: 'deselect' });
|
|
8421
|
+
this.designChange.emit({ type: 'header', header: removeHeaderElement(this.itemInfo?.header, index) });
|
|
8422
|
+
}
|
|
8423
|
+
}
|
|
8424
|
+
elementAction(action, index, parentIndex) {
|
|
8425
|
+
if (action === 'add')
|
|
8426
|
+
this.designer.addButton(index, parentIndex, this.dt.button);
|
|
8427
|
+
else if (action === 'edit')
|
|
8428
|
+
this.designer.edit(index, parentIndex);
|
|
8429
|
+
else if (action === 'delete')
|
|
8430
|
+
this.designer.remove(index, parentIndex);
|
|
8431
|
+
}
|
|
8432
|
+
/** Add card / Delete card: more or fewer sample cards, the layout stays. */
|
|
8433
|
+
cardAction(action) {
|
|
8434
|
+
if (action === 'add')
|
|
8435
|
+
this.designCount++;
|
|
8436
|
+
else if (action === 'delete' && this.designCount > 1)
|
|
8437
|
+
this.designCount--;
|
|
8438
|
+
this.refreshDesign();
|
|
8439
|
+
}
|
|
8440
|
+
designGoToPage(page) {
|
|
8441
|
+
if (page >= 0 && page < this.designPages.length)
|
|
8442
|
+
this.designPage = page;
|
|
8443
|
+
}
|
|
7276
8444
|
getRecordIndex(record) {
|
|
7277
8445
|
if (!Array.isArray(this.itemInfo?.data)) {
|
|
7278
8446
|
return -1;
|
|
@@ -7280,6 +8448,11 @@ class CardComponent {
|
|
|
7280
8448
|
return this.itemInfo.data.indexOf(record);
|
|
7281
8449
|
}
|
|
7282
8450
|
updateDeviceMode() {
|
|
8451
|
+
// the Designer's canvas shows the device of its switch, whatever the size of the Designer's window
|
|
8452
|
+
if (this.design?.device) {
|
|
8453
|
+
this.deviceMode = this.design.device;
|
|
8454
|
+
return;
|
|
8455
|
+
}
|
|
7283
8456
|
if (typeof window === 'undefined') {
|
|
7284
8457
|
this.deviceMode = this.mobileDisplay ? 'mobile' : 'desktop';
|
|
7285
8458
|
return;
|
|
@@ -7666,8 +8839,8 @@ class CardComponent {
|
|
|
7666
8839
|
const property = reference ? propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() ?? ''] : null;
|
|
7667
8840
|
return resolveCustomKeyboardType(field?.option, property);
|
|
7668
8841
|
}
|
|
7669
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, deps: [{ token: UtilityService }, { token: i1$2.Platform }, { token: i1$1.HttpClient }, { token: ConfigService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i5.NzModalService }, { token: NotificationService }, { token: i7.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7670
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CardComponent, isStandalone: true, selector: "vl-card", inputs: { itemInfo: "itemInfo", pageData: "pageData", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", mobileDisplay: "mobileDisplay", scrollPagination: "scrollPagination", pages: "pages", paginationMode: "paginationMode", paginationLoading: "paginationLoading" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange" }, host: { listeners: { "window:resize": "onWindowResize()" } }, viewQueries: [{ propertyName: "scrollPaginationSentinel", first: true, predicate: ["scrollPaginationSentinel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-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<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (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 </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n (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 <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-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}\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: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i15.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i16.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }] });
|
|
8842
|
+
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"] }] });
|
|
7671
8844
|
}
|
|
7672
8845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, decorators: [{
|
|
7673
8846
|
type: Component,
|
|
@@ -7683,8 +8856,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7683
8856
|
PaginationComponent,
|
|
7684
8857
|
MatTooltipModule,
|
|
7685
8858
|
String$1,
|
|
7686
|
-
], standalone: true, template: "<!-- 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<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (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 </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n (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 <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n<ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-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}\n"] }]
|
|
7687
|
-
|
|
8859
|
+
DragDropModule,
|
|
8860
|
+
DesignBarComponent,
|
|
8861
|
+
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"] }]
|
|
8863
|
+
}], 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: [{
|
|
7688
8864
|
type: Input
|
|
7689
8865
|
}], pageData: [{
|
|
7690
8866
|
type: Input
|
|
@@ -7716,6 +8892,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7716
8892
|
type: Input
|
|
7717
8893
|
}], paginationLoading: [{
|
|
7718
8894
|
type: Input
|
|
8895
|
+
}], design: [{
|
|
8896
|
+
type: Input
|
|
8897
|
+
}], designChange: [{
|
|
8898
|
+
type: Output
|
|
8899
|
+
}], designMobile: [{
|
|
8900
|
+
type: HostBinding,
|
|
8901
|
+
args: ['class.vl-design-mobile']
|
|
8902
|
+
}], designTablet: [{
|
|
8903
|
+
type: HostBinding,
|
|
8904
|
+
args: ['class.vl-design-tablet']
|
|
7719
8905
|
}], scrollPaginationSentinel: [{
|
|
7720
8906
|
type: ViewChild,
|
|
7721
8907
|
args: ['scrollPaginationSentinel']
|
|
@@ -7748,6 +8934,179 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7748
8934
|
}]
|
|
7749
8935
|
}] });
|
|
7750
8936
|
|
|
8937
|
+
// Shuaib 2026-10-26
|
|
8938
|
+
// - new: SectionDesigner - drag and drop of a page with sections in design mode, shared by vl-form and vl-model:
|
|
8939
|
+
// the drop hint under the pointer (above, below, beside a field, or into an empty section), the drop itself
|
|
8940
|
+
// (a field moved or a data object's field added) and the section and field actions (#166)
|
|
8941
|
+
let designerCount = 0;
|
|
8942
|
+
class SectionDesigner {
|
|
8943
|
+
kind;
|
|
8944
|
+
host;
|
|
8945
|
+
/** where a drop would land now; null while nothing is dragged over the container */
|
|
8946
|
+
hint = null;
|
|
8947
|
+
dragging = false;
|
|
8948
|
+
dragged = null;
|
|
8949
|
+
/** the ids of this container's drop lists start with it (several containers may be on one page) */
|
|
8950
|
+
prefix = `vl-design-${++designerCount}-`;
|
|
8951
|
+
constructor(kind, host) {
|
|
8952
|
+
this.kind = kind;
|
|
8953
|
+
this.host = host;
|
|
8954
|
+
}
|
|
8955
|
+
listId(sectionIndex) {
|
|
8956
|
+
return `${this.prefix}${sectionIndex}`;
|
|
8957
|
+
}
|
|
8958
|
+
/** Every section list of the container, so a field can go from one section to another. */
|
|
8959
|
+
listIds() {
|
|
8960
|
+
const count = this.host.layout()?.formSections?.length ?? 0;
|
|
8961
|
+
return Array.from({ length: count }, (_, i) => this.listId(i));
|
|
8962
|
+
}
|
|
8963
|
+
sectionOf(id) {
|
|
8964
|
+
if (!id?.startsWith(this.prefix))
|
|
8965
|
+
return null;
|
|
8966
|
+
const index = Number(id.slice(this.prefix.length));
|
|
8967
|
+
return Number.isInteger(index) ? index : null;
|
|
8968
|
+
}
|
|
8969
|
+
dragData(sectionIndex, fieldIndex) {
|
|
8970
|
+
return { vlDesign: 'field', sectionIndex, fieldIndex };
|
|
8971
|
+
}
|
|
8972
|
+
// ---- the hint under the pointer ----
|
|
8973
|
+
/** The drop spot at a point of a section: on a field, above the first, below the last, or into the empty section. */
|
|
8974
|
+
spotAt(x, y, sectionIndex) {
|
|
8975
|
+
const empty = { sectionIndex, type: 'empty', targetIndex: null };
|
|
8976
|
+
const list = typeof document === 'undefined' ? null : document.getElementById(this.listId(sectionIndex));
|
|
8977
|
+
if (!list)
|
|
8978
|
+
return empty;
|
|
8979
|
+
const rows = Array.from(list.querySelectorAll('[data-vl-design-field]'))
|
|
8980
|
+
.filter(row => !row.classList.contains('cdk-drag-placeholder') && row.closest('[data-vl-design-list]') === list);
|
|
8981
|
+
if (!rows.length)
|
|
8982
|
+
return empty;
|
|
8983
|
+
const indexOf = (row) => Number(row.getAttribute('data-vl-design-field'));
|
|
8984
|
+
for (const row of rows) {
|
|
8985
|
+
const rect = row.getBoundingClientRect();
|
|
8986
|
+
if (rect.width <= 0 || rect.height <= 0)
|
|
8987
|
+
continue;
|
|
8988
|
+
if (x < rect.left || x > rect.right || y < rect.top || y > rect.bottom)
|
|
8989
|
+
continue;
|
|
8990
|
+
return { sectionIndex, type: dropTypeAt(rect, x, y), targetIndex: indexOf(row) };
|
|
8991
|
+
}
|
|
8992
|
+
if (y < rows[0].getBoundingClientRect().top)
|
|
8993
|
+
return { sectionIndex, type: 'before', targetIndex: indexOf(rows[0]) };
|
|
8994
|
+
return { sectionIndex, type: 'after', targetIndex: indexOf(rows[rows.length - 1]) };
|
|
8995
|
+
}
|
|
8996
|
+
setHint(next) {
|
|
8997
|
+
const h = this.hint;
|
|
8998
|
+
if (h && h.sectionIndex === next.sectionIndex && h.type === next.type && h.targetIndex === next.targetIndex)
|
|
8999
|
+
return;
|
|
9000
|
+
this.hint = next;
|
|
9001
|
+
}
|
|
9002
|
+
/** A drag came over a section (a field of this container or a data object's field). */
|
|
9003
|
+
entered(sectionIndex) {
|
|
9004
|
+
this.dragging = true;
|
|
9005
|
+
if (!this.hint)
|
|
9006
|
+
this.hint = { sectionIndex, type: 'empty', targetIndex: null };
|
|
9007
|
+
}
|
|
9008
|
+
/** The pointer moves over a section while something is dragged over it. */
|
|
9009
|
+
pointerMove(event, sectionIndex) {
|
|
9010
|
+
if (!this.dragging)
|
|
9011
|
+
return;
|
|
9012
|
+
this.setHint(this.spotAt(event.clientX, event.clientY, sectionIndex));
|
|
9013
|
+
}
|
|
9014
|
+
exited() {
|
|
9015
|
+
if (this.dragging && !this.dragged)
|
|
9016
|
+
this.hint = null;
|
|
9017
|
+
}
|
|
9018
|
+
/** A section is dragged to another place: its settings close, no field hint is shown. */
|
|
9019
|
+
sectionDragStarted() {
|
|
9020
|
+
this.host.deselect();
|
|
9021
|
+
}
|
|
9022
|
+
dragStarted(sectionIndex, fieldIndex) {
|
|
9023
|
+
this.host.deselect();
|
|
9024
|
+
this.dragging = true;
|
|
9025
|
+
this.dragged = { sectionIndex, fieldIndex };
|
|
9026
|
+
this.hint = { sectionIndex, type: 'empty', targetIndex: null };
|
|
9027
|
+
}
|
|
9028
|
+
/** A field of this container moves: the section under the pointer decides. */
|
|
9029
|
+
dragMoved(event) {
|
|
9030
|
+
const pointer = event.pointerPosition;
|
|
9031
|
+
if (!pointer || typeof document === 'undefined')
|
|
9032
|
+
return;
|
|
9033
|
+
const list = document.elementFromPoint(pointer.x, pointer.y)?.closest('[data-vl-design-list]');
|
|
9034
|
+
const section = list ? this.sectionOf(list.id) : null;
|
|
9035
|
+
if (section === null)
|
|
9036
|
+
return;
|
|
9037
|
+
this.setHint(this.spotAt(pointer.x, pointer.y, section));
|
|
9038
|
+
}
|
|
9039
|
+
dragEnded() {
|
|
9040
|
+
setTimeout(() => {
|
|
9041
|
+
this.clear();
|
|
9042
|
+
this.host.refresh();
|
|
9043
|
+
});
|
|
9044
|
+
}
|
|
9045
|
+
clear() {
|
|
9046
|
+
this.hint = null;
|
|
9047
|
+
this.dragging = false;
|
|
9048
|
+
this.dragged = null;
|
|
9049
|
+
}
|
|
9050
|
+
isEmptyHint(sectionIndex) {
|
|
9051
|
+
return this.hint?.sectionIndex === sectionIndex && this.hint.type === 'empty';
|
|
9052
|
+
}
|
|
9053
|
+
isTargetHint(sectionIndex, fieldIndex) {
|
|
9054
|
+
return this.hint?.sectionIndex === sectionIndex && this.hint.targetIndex === fieldIndex && this.hint.type !== 'empty';
|
|
9055
|
+
}
|
|
9056
|
+
hintText(texts) {
|
|
9057
|
+
switch (this.hint?.type) {
|
|
9058
|
+
case 'before': return texts.placeAbove;
|
|
9059
|
+
case 'after': return texts.placeBelow;
|
|
9060
|
+
case 'left': return texts.placeLeft;
|
|
9061
|
+
case 'right': return texts.placeRight;
|
|
9062
|
+
default: return texts.dropHere;
|
|
9063
|
+
}
|
|
9064
|
+
}
|
|
9065
|
+
// ---- the drop ----
|
|
9066
|
+
dropped(event, sectionIndex) {
|
|
9067
|
+
const point = event.dropPoint;
|
|
9068
|
+
const spot = this.hint && this.hint.sectionIndex === sectionIndex
|
|
9069
|
+
? this.hint
|
|
9070
|
+
: point ? this.spotAt(point.x, point.y, sectionIndex) : { sectionIndex, type: 'empty', targetIndex: null };
|
|
9071
|
+
const data = event.item?.data;
|
|
9072
|
+
const layout = this.host.layout();
|
|
9073
|
+
this.clear();
|
|
9074
|
+
if (isPropertyDrop(data)) {
|
|
9075
|
+
this.host.apply(dropProperty(layout, data, spot, this.kind));
|
|
9076
|
+
}
|
|
9077
|
+
else if (data?.vlDesign === 'field') {
|
|
9078
|
+
this.host.apply(moveField(layout, { sectionIndex: data.sectionIndex, fieldIndex: data.fieldIndex }, spot, this.kind));
|
|
9079
|
+
}
|
|
9080
|
+
}
|
|
9081
|
+
// ---- the actions ----
|
|
9082
|
+
/** The sections were reordered (from and to: places in the layout). */
|
|
9083
|
+
sectionMoved(from, to) {
|
|
9084
|
+
this.host.deselect();
|
|
9085
|
+
if (from !== to)
|
|
9086
|
+
this.host.apply(moveSection(this.host.layout(), from, to));
|
|
9087
|
+
}
|
|
9088
|
+
removeField(sectionIndex, fieldIndex) {
|
|
9089
|
+
this.host.deselect();
|
|
9090
|
+
this.host.apply(removeField(this.host.layout(), sectionIndex, fieldIndex, this.kind));
|
|
9091
|
+
}
|
|
9092
|
+
removeSection(sectionIndex) {
|
|
9093
|
+
this.host.deselect();
|
|
9094
|
+
this.host.apply(removeSection(this.host.layout(), sectionIndex, this.kind));
|
|
9095
|
+
}
|
|
9096
|
+
addSection() {
|
|
9097
|
+
this.host.apply(addSection(this.host.layout(), this.kind));
|
|
9098
|
+
}
|
|
9099
|
+
addButton(sectionIndex, caption) {
|
|
9100
|
+
this.host.apply(addButton(this.host.layout(), sectionIndex, this.kind, caption));
|
|
9101
|
+
}
|
|
9102
|
+
editSection(sectionIndex) {
|
|
9103
|
+
this.host.select({ kind: 'section', sectionIndex });
|
|
9104
|
+
}
|
|
9105
|
+
editField(sectionIndex, fieldIndex, part) {
|
|
9106
|
+
this.host.select({ kind: 'field', sectionIndex, fieldIndex, ...(part ? { part } : {}) });
|
|
9107
|
+
}
|
|
9108
|
+
}
|
|
9109
|
+
|
|
7751
9110
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
7752
9111
|
// - new: tabletGridSpan - a section's width on a tablet (768-1023px); without it the desktop width counts
|
|
7753
9112
|
// - new: the layout of a form's sections (user decision 2026-10-24, checkout): gridSpan - a section is 1..12 of the
|
|
@@ -7888,6 +9247,10 @@ function lockHint(option, reason, translations) {
|
|
|
7888
9247
|
return translations?.[text.trim()] || text.trim();
|
|
7889
9248
|
}
|
|
7890
9249
|
|
|
9250
|
+
// Shuaib 2026-10-26
|
|
9251
|
+
// - new: design mode (input design, output designChange): the Designer's canvas draws its form with this container -
|
|
9252
|
+
// every section (conditional ones marked) and field with drag, edit and delete (SectionDesigner), no translation
|
|
9253
|
+
// and no backend list; sectionStickyOf / sectionIndexOf / sectionDropped for the canvas (#166)
|
|
7891
9254
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
7892
9255
|
// - new: sectionTabletSpanOf / stickyTabletSpan - the widths on a tablet (tabletGridSpan)
|
|
7893
9256
|
// - new: sectionSpanOf / sectionStickyOf / sectionShown - the layout of the sections (field/section-layout.ts)
|
|
@@ -8021,8 +9384,39 @@ class FormComponent {
|
|
|
8021
9384
|
checkBoxChangeEvent = new EventEmitter();
|
|
8022
9385
|
/** the hint of a button locked for a missing sign-in was clicked: the app starts its sign-in */
|
|
8023
9386
|
signIn = new EventEmitter();
|
|
9387
|
+
/** The Designer's canvas: every section and field with drag, edit and delete, nothing loaded (design/design.ts). */
|
|
9388
|
+
design = null;
|
|
9389
|
+
/** What was chosen or changed on the Designer's canvas. */
|
|
9390
|
+
designChange = new EventEmitter();
|
|
9391
|
+
/** The texts of the design handles. */
|
|
9392
|
+
dt = designTexts(null);
|
|
9393
|
+
/** Drag and drop of the sections and fields in design mode. */
|
|
9394
|
+
designer = new SectionDesigner('form', {
|
|
9395
|
+
layout: () => this.form?.layoutSchema,
|
|
9396
|
+
apply: next => {
|
|
9397
|
+
this.form.layoutSchema = next;
|
|
9398
|
+
this.designChange.emit({ type: 'layout', layoutSchema: next });
|
|
9399
|
+
},
|
|
9400
|
+
select: target => this.designChange.emit({ type: 'select', target }),
|
|
9401
|
+
deselect: () => {
|
|
9402
|
+
if (this.design?.selected)
|
|
9403
|
+
this.designChange.emit({ type: 'deselect' });
|
|
9404
|
+
},
|
|
9405
|
+
refresh: () => this.cdr.markForCheck(),
|
|
9406
|
+
});
|
|
9407
|
+
cdr = inject(ChangeDetectorRef);
|
|
9408
|
+
/** The device the Designer shows the page on: the form follows it like the app follows the window. */
|
|
9409
|
+
get designMobile() { return this.design?.device === 'mobile'; }
|
|
9410
|
+
get designTablet() { return this.design?.device === 'tablet'; }
|
|
8024
9411
|
ngOnInit() { }
|
|
8025
9412
|
ngOnChanges(changes) {
|
|
9413
|
+
if (this.design) {
|
|
9414
|
+
// the canvas shows the layout as written: no translation, no backend list
|
|
9415
|
+
this.dt = designTexts(this.design);
|
|
9416
|
+
if (changes['form'] && this.form?.layoutSchema)
|
|
9417
|
+
normalizeSections(this.form.layoutSchema, 'form');
|
|
9418
|
+
return;
|
|
9419
|
+
}
|
|
8026
9420
|
// Backend lists of fields with option.autocomplete (any data type, any control).
|
|
8027
9421
|
if (changes['form'] && this.form) {
|
|
8028
9422
|
void this.loadRemoteLists([this.form.layoutSchema], this.form.propertySchema);
|
|
@@ -8165,6 +9559,39 @@ class FormComponent {
|
|
|
8165
9559
|
const spans = this.sectionsIn(true).map(s => s?.gridSpan ? sectionSpan(s) : 0).filter(Boolean);
|
|
8166
9560
|
return spans.length ? Math.max(...spans) : 4;
|
|
8167
9561
|
}
|
|
9562
|
+
/** A section that stays in view while the page scrolls (layout sticky). */
|
|
9563
|
+
sectionStickyOf(formSection) {
|
|
9564
|
+
return sectionSticky(formSection);
|
|
9565
|
+
}
|
|
9566
|
+
/** A section's place in the layout (the canvas shows the sticky ones after the others). */
|
|
9567
|
+
sectionIndexOf(formSection) {
|
|
9568
|
+
return (this.form?.layoutSchema?.formSections || []).indexOf(formSection);
|
|
9569
|
+
}
|
|
9570
|
+
// ---- design mode ----
|
|
9571
|
+
/** Whether the element's settings are open in the Designer (it is marked). */
|
|
9572
|
+
isSelected(target) {
|
|
9573
|
+
return isTarget(this.design?.selected, target);
|
|
9574
|
+
}
|
|
9575
|
+
/** A section dropped at another place of the canvas: the canvas shows the sticky ones last, the layout keeps its order. */
|
|
9576
|
+
sectionDropped(event) {
|
|
9577
|
+
const sections = this.form?.layoutSchema?.formSections || [];
|
|
9578
|
+
const shown = [...this.sectionsIn(false), ...this.sectionsIn(true)];
|
|
9579
|
+
this.designer.sectionMoved(sections.indexOf(event.item.data), sections.indexOf(shown[event.currentIndex]));
|
|
9580
|
+
}
|
|
9581
|
+
sectionAction(action, sectionIndex) {
|
|
9582
|
+
if (action === 'add')
|
|
9583
|
+
this.designer.addButton(sectionIndex, this.dt.button);
|
|
9584
|
+
else if (action === 'edit')
|
|
9585
|
+
this.designer.editSection(sectionIndex);
|
|
9586
|
+
else if (action === 'delete')
|
|
9587
|
+
this.designer.removeSection(sectionIndex);
|
|
9588
|
+
}
|
|
9589
|
+
fieldAction(action, sectionIndex, fieldIndex) {
|
|
9590
|
+
if (action === 'edit')
|
|
9591
|
+
this.designer.editField(sectionIndex, fieldIndex);
|
|
9592
|
+
else if (action === 'delete')
|
|
9593
|
+
this.designer.removeField(sectionIndex, fieldIndex);
|
|
9594
|
+
}
|
|
8168
9595
|
/** A section with visibleWhen is shown only while its field holds the value. */
|
|
8169
9596
|
sectionShown(formSection) {
|
|
8170
9597
|
return sectionVisible(formSection, this.form?.propertySchema);
|
|
@@ -8355,11 +9782,11 @@ class FormComponent {
|
|
|
8355
9782
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
8356
9783
|
}
|
|
8357
9784
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8358
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent", signIn: "signIn" }, usesOnChanges: true, ngImport: i0, template: "<!-- 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<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", 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}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
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" }] });
|
|
8359
9786
|
}
|
|
8360
9787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, decorators: [{
|
|
8361
9788
|
type: Component,
|
|
8362
|
-
args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent], selector: 'vl-form', template: "<!-- 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<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", 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}}\n"] }]
|
|
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"] }]
|
|
8363
9790
|
}], propDecorators: { errorMessages: [{
|
|
8364
9791
|
type: Input
|
|
8365
9792
|
}], creditCardError: [{
|
|
@@ -8376,12 +9803,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
8376
9803
|
type: Output
|
|
8377
9804
|
}], signIn: [{
|
|
8378
9805
|
type: Output
|
|
9806
|
+
}], design: [{
|
|
9807
|
+
type: Input
|
|
9808
|
+
}], designChange: [{
|
|
9809
|
+
type: Output
|
|
9810
|
+
}], designMobile: [{
|
|
9811
|
+
type: HostBinding,
|
|
9812
|
+
args: ['class.vl-design-mobile']
|
|
9813
|
+
}], designTablet: [{
|
|
9814
|
+
type: HostBinding,
|
|
9815
|
+
args: ['class.vl-design-tablet']
|
|
8379
9816
|
}] } });
|
|
8380
9817
|
/** The cache key of a button's hints: its place on the page (reference or caption). */
|
|
8381
9818
|
function vlLockKey(formField) {
|
|
8382
9819
|
return String(formField?.scope?.reference || formField?.label?.caption || '');
|
|
8383
9820
|
}
|
|
8384
9821
|
|
|
9822
|
+
// Shuaib 2026-10-26
|
|
9823
|
+
// - new: the Designer's edits of a grid page: a data object's field dropped on the grid becomes a column, columns
|
|
9824
|
+
// are moved, resized and deleted. Pure: every edit returns a new layout (#166)
|
|
9825
|
+
/** The column a data object's property becomes when it is dropped on the grid: its values, read only. */
|
|
9826
|
+
function columnFromProperty(drop) {
|
|
9827
|
+
return {
|
|
9828
|
+
scope: { reference: `#/${dropObjectName(drop)}/properties/${drop.name}`, style: {} },
|
|
9829
|
+
label: { caption: drop.name, style: {} },
|
|
9830
|
+
option: { sortable: false, visible: true, protected: true },
|
|
9831
|
+
};
|
|
9832
|
+
}
|
|
9833
|
+
function columnsOf(layout) {
|
|
9834
|
+
layout.elements = Array.isArray(layout.elements) ? layout.elements : [];
|
|
9835
|
+
return layout.elements;
|
|
9836
|
+
}
|
|
9837
|
+
/** A data object's field dropped at place index of the columns (at the end when index is out of range). */
|
|
9838
|
+
function dropGridProperty(layout, drop, index) {
|
|
9839
|
+
const next = cloneLayout(layout || {});
|
|
9840
|
+
const columns = columnsOf(next);
|
|
9841
|
+
const at = Number.isInteger(index) && index >= 0 && index <= columns.length ? index : columns.length;
|
|
9842
|
+
columns.splice(at, 0, columnFromProperty(drop));
|
|
9843
|
+
return next;
|
|
9844
|
+
}
|
|
9845
|
+
function moveColumn(layout, from, to) {
|
|
9846
|
+
const next = cloneLayout(layout || {});
|
|
9847
|
+
const columns = columnsOf(next);
|
|
9848
|
+
if (from < 0 || from >= columns.length || to < 0 || to >= columns.length || from === to)
|
|
9849
|
+
return next;
|
|
9850
|
+
const [column] = columns.splice(from, 1);
|
|
9851
|
+
columns.splice(to, 0, column);
|
|
9852
|
+
return next;
|
|
9853
|
+
}
|
|
9854
|
+
function removeColumn(layout, index) {
|
|
9855
|
+
const next = cloneLayout(layout || {});
|
|
9856
|
+
const columns = columnsOf(next);
|
|
9857
|
+
if (index >= 0 && index < columns.length)
|
|
9858
|
+
columns.splice(index, 1);
|
|
9859
|
+
return next;
|
|
9860
|
+
}
|
|
9861
|
+
/** A column's width or height (option.width / option.height, in px) as dragged on its edge. */
|
|
9862
|
+
function resizeColumn(layout, index, size) {
|
|
9863
|
+
const next = cloneLayout(layout || {});
|
|
9864
|
+
const column = columnsOf(next)[index];
|
|
9865
|
+
if (!column)
|
|
9866
|
+
return next;
|
|
9867
|
+
column.option = column.option || {};
|
|
9868
|
+
if (size.width !== undefined)
|
|
9869
|
+
column.option.width = `${Math.max(80, Math.round(size.width))}px`;
|
|
9870
|
+
if (size.height !== undefined)
|
|
9871
|
+
column.option.height = `${Math.max(40, Math.round(size.height))}px`;
|
|
9872
|
+
return next;
|
|
9873
|
+
}
|
|
9874
|
+
/** The settings of a column changed in the Designer's right panel. */
|
|
9875
|
+
function replaceColumn(layout, index, column) {
|
|
9876
|
+
const next = cloneLayout(layout || {});
|
|
9877
|
+
const columns = columnsOf(next);
|
|
9878
|
+
if (index >= 0 && index < columns.length)
|
|
9879
|
+
columns[index] = cloneLayout(column);
|
|
9880
|
+
return next;
|
|
9881
|
+
}
|
|
9882
|
+
|
|
9883
|
+
// Shuaib 2026-10-26
|
|
9884
|
+
// - new: design mode (input design, output designChange): the Designer's canvas draws its grid page with this
|
|
9885
|
+
// container - sample rows, the page bar as the app shows it, every column with drag, edit, delete and resize;
|
|
9886
|
+
// a data object's field dropped on the column heads becomes a column (grid-edit.ts); no translation, data or
|
|
9887
|
+
// backend list (#166)
|
|
9888
|
+
// - new: the search box (layoutSchema.search), the row stripes (layoutSchema.rowStyle) and the column sizes
|
|
9889
|
+
// (option.width / option.height) the Designer's right panel sets - the canvas showed them, the app did not
|
|
8385
9890
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
8386
9891
|
// - change: a data object holds names and types only - the media caption comes from the layout
|
|
8387
9892
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
|
|
@@ -8420,6 +9925,7 @@ function vlLockKey(formField) {
|
|
|
8420
9925
|
// - change: date and time cells use DateTimePickerService like the dialog
|
|
8421
9926
|
// Shuaib 2026-09-24
|
|
8422
9927
|
// - new: isLegacyCheckboxFieldType recognises existing checkbox fields so the grid can render them as boolean.
|
|
9928
|
+
let gridDesignCount = 0;
|
|
8423
9929
|
class GridComponent {
|
|
8424
9930
|
requestService;
|
|
8425
9931
|
utilityService;
|
|
@@ -8466,7 +9972,9 @@ class GridComponent {
|
|
|
8466
9972
|
/** Date and time picker behaviour shared by all containers. */
|
|
8467
9973
|
picker = inject(DateTimePickerService);
|
|
8468
9974
|
host = inject((ElementRef));
|
|
9975
|
+
cdr = inject(ChangeDetectorRef);
|
|
8469
9976
|
ngOnDestroy() {
|
|
9977
|
+
this.stopResize();
|
|
8470
9978
|
this.picker.closeIfWithin(this.host.nativeElement);
|
|
8471
9979
|
this.sideHintObserver?.disconnect();
|
|
8472
9980
|
this.host.nativeElement.removeEventListener('scroll', this.onSideScroll, true);
|
|
@@ -8522,6 +10030,22 @@ class GridComponent {
|
|
|
8522
10030
|
/** "dialog" edit: the app opens the page's dialog with the record (like a card's showModal). */
|
|
8523
10031
|
editRow = new EventEmitter();
|
|
8524
10032
|
gridForm;
|
|
10033
|
+
/** The Designer's canvas: sample rows, every column with drag, edit, delete and resize, nothing loaded (design/design.ts). */
|
|
10034
|
+
design = null;
|
|
10035
|
+
/** What was chosen or changed on the Designer's canvas. */
|
|
10036
|
+
designChange = new EventEmitter();
|
|
10037
|
+
/** The texts of the design handles. */
|
|
10038
|
+
dt = designTexts(null);
|
|
10039
|
+
/** The sample rows, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
|
|
10040
|
+
designAll = [];
|
|
10041
|
+
designInfo = null;
|
|
10042
|
+
designPages = [];
|
|
10043
|
+
designPage = 0;
|
|
10044
|
+
designPageSize = 5;
|
|
10045
|
+
/** The drop list of the column heads (a data object's field dropped on it becomes a column). */
|
|
10046
|
+
designListId = `vl-grid-design-${++gridDesignCount}`;
|
|
10047
|
+
get designMobile() { return this.design?.device === 'mobile'; }
|
|
10048
|
+
get designTablet() { return this.design?.device === 'tablet'; }
|
|
8525
10049
|
/** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
|
|
8526
10050
|
editingRow = null;
|
|
8527
10051
|
rowSchema = {};
|
|
@@ -8567,6 +10091,8 @@ class GridComponent {
|
|
|
8567
10091
|
}
|
|
8568
10092
|
ngAfterViewInit() {
|
|
8569
10093
|
this.startSideHints();
|
|
10094
|
+
if (this.design)
|
|
10095
|
+
return;
|
|
8570
10096
|
this.authenticating();
|
|
8571
10097
|
setTimeout(() => {
|
|
8572
10098
|
if (this.environment && this.environment?.login && this.environment?.login?.type == "oktaAuth") {
|
|
@@ -8579,6 +10105,12 @@ class GridComponent {
|
|
|
8579
10105
|
}, 500);
|
|
8580
10106
|
}
|
|
8581
10107
|
ngOnChanges(changes) {
|
|
10108
|
+
if (this.design) {
|
|
10109
|
+
// the canvas shows the layout as written with sample rows: no translation, no data, no backend list
|
|
10110
|
+
this.dt = designTexts(this.design);
|
|
10111
|
+
this.refreshDesign();
|
|
10112
|
+
return;
|
|
10113
|
+
}
|
|
8582
10114
|
// Backend lists of fields with option.autocomplete (any data type, any control).
|
|
8583
10115
|
if ((changes['tableitemInfo'] || changes['form']) && this.tableitemInfo) {
|
|
8584
10116
|
void this.loadRemoteLists([this.tableitemInfo.layoutSchema, this.form?.layoutSchema], this.form?.propertySchema ?? this.tableitemInfo.propertySchema);
|
|
@@ -8624,9 +10156,160 @@ class GridComponent {
|
|
|
8624
10156
|
}, 500);
|
|
8625
10157
|
}
|
|
8626
10158
|
get gridDisplayData() {
|
|
8627
|
-
return this.filtersApplied
|
|
10159
|
+
return this.searched(this.filtersApplied
|
|
8628
10160
|
? this.filteredTableData
|
|
8629
|
-
: this.tableitemInfo?.data ?? [];
|
|
10161
|
+
: this.tableitemInfo?.data ?? []);
|
|
10162
|
+
}
|
|
10163
|
+
// ---- the search box above the table (layoutSchema.search: visible, left / center / right, placeholder) ----
|
|
10164
|
+
searchText = '';
|
|
10165
|
+
searchMemo = null;
|
|
10166
|
+
get showSearch() {
|
|
10167
|
+
return !!this.tableitemInfo?.layoutSchema?.search?.visible;
|
|
10168
|
+
}
|
|
10169
|
+
get searchPositionClass() {
|
|
10170
|
+
const search = this.tableitemInfo?.layoutSchema?.search;
|
|
10171
|
+
return search?.center ? 'search-center' : search?.right ? 'search-right' : 'search-left';
|
|
10172
|
+
}
|
|
10173
|
+
searchPlaceholder() {
|
|
10174
|
+
const placeholder = this.tableitemInfo?.layoutSchema?.search?.placeholder;
|
|
10175
|
+
return placeholder ? this.t(placeholder) : this.t('Search');
|
|
10176
|
+
}
|
|
10177
|
+
/** The rows holding the searched text in one of their shown columns - the same list while nothing changed. */
|
|
10178
|
+
searched(rows) {
|
|
10179
|
+
const text = this.searchText.trim().toLowerCase();
|
|
10180
|
+
if (!text || !this.showSearch)
|
|
10181
|
+
return rows;
|
|
10182
|
+
const columns = this.tableitemInfo?.layoutSchema?.elements;
|
|
10183
|
+
const memo = this.searchMemo;
|
|
10184
|
+
if (memo && memo.rows === rows && memo.text === text && memo.columns === columns)
|
|
10185
|
+
return memo.result;
|
|
10186
|
+
const fields = visibleFields(columns).filter(c => typeof c?.scope?.reference === 'string').map(c => c.scope.reference.split('/').pop());
|
|
10187
|
+
const result = rows.filter(row => fields.some(f => String(row?.[f] ?? '').toLowerCase().includes(text)));
|
|
10188
|
+
this.searchMemo = { rows, text, columns, result };
|
|
10189
|
+
return result;
|
|
10190
|
+
}
|
|
10191
|
+
// ---- row stripes (layoutSchema.rowStyle: enabled, odd, even) and column sizes (option.width / height) ----
|
|
10192
|
+
/** The style of row number index (0, 1, …): odd and even rows as the page sets them. */
|
|
10193
|
+
rowStyleOf(index) {
|
|
10194
|
+
const rowStyle = this.tableitemInfo?.layoutSchema?.rowStyle;
|
|
10195
|
+
if (!rowStyle?.enabled)
|
|
10196
|
+
return {};
|
|
10197
|
+
return styleParts((index + 1) % 2 === 0 ? rowStyle.even : rowStyle.odd).style;
|
|
10198
|
+
}
|
|
10199
|
+
/** A column's width and height as the page sets them. */
|
|
10200
|
+
columnSize(column) {
|
|
10201
|
+
const option = column?.option || {};
|
|
10202
|
+
return {
|
|
10203
|
+
...(option.width ? { width: option.width, minWidth: option.width } : {}),
|
|
10204
|
+
...(option.height ? { height: option.height } : {}),
|
|
10205
|
+
};
|
|
10206
|
+
}
|
|
10207
|
+
/** A cell: the column's scope style, the row's stripe, the column's size. */
|
|
10208
|
+
cellStyle(column, index) {
|
|
10209
|
+
return { ...this.getStyleWithoutClasses(column?.scope?.style).style, ...this.rowStyleOf(index), ...this.columnSize(column) };
|
|
10210
|
+
}
|
|
10211
|
+
// ---- design mode ----
|
|
10212
|
+
/** The sample rows and the page bar of the canvas, from the layout as it is now. */
|
|
10213
|
+
refreshDesign() {
|
|
10214
|
+
const layout = this.tableitemInfo?.layoutSchema || {};
|
|
10215
|
+
const center = withAppPagination(this.design?.main?.center, layout);
|
|
10216
|
+
const bar = center?.pagination || {};
|
|
10217
|
+
this.designPageSize = Number(bar.defaultPageSize) || Number(bar.pageSize) || this.design?.sampleCount || 5;
|
|
10218
|
+
// one page of sample rows: the page's page size, else as many as the Designer asks for
|
|
10219
|
+
const count = layout.elements?.length ? this.designPageSize : 0;
|
|
10220
|
+
const samples = sampleRecords(layout.elements || [], this.tableitemInfo?.propertySchema, count, this.design?.sampleImage);
|
|
10221
|
+
// the same rows while they stay the same: a click on a column does not draw every row anew
|
|
10222
|
+
if (JSON.stringify(samples) !== JSON.stringify(this.designAll))
|
|
10223
|
+
this.designAll = samples;
|
|
10224
|
+
this.designPages = Array.from({ length: Math.ceil(this.designAll.length / this.designPageSize) }, (_, i) => i);
|
|
10225
|
+
if (this.designPage > this.designPages.length - 1)
|
|
10226
|
+
this.designPage = 0;
|
|
10227
|
+
this.designInfo = { ...this.tableitemInfo, layoutSchema: center, data: this.designAll };
|
|
10228
|
+
}
|
|
10229
|
+
/** The sample rows of the page shown - the same list while nothing changed (the table draws its rows anew otherwise). */
|
|
10230
|
+
get designRows() {
|
|
10231
|
+
const memo = this.rowsMemo;
|
|
10232
|
+
if (memo && memo.all === this.designAll && memo.page === this.designPage && memo.size === this.designPageSize)
|
|
10233
|
+
return memo.rows;
|
|
10234
|
+
const start = this.designPage * this.designPageSize;
|
|
10235
|
+
this.rowsMemo = { all: this.designAll, page: this.designPage, size: this.designPageSize, rows: this.designAll.slice(start, start + this.designPageSize) };
|
|
10236
|
+
return this.rowsMemo.rows;
|
|
10237
|
+
}
|
|
10238
|
+
rowsMemo = null;
|
|
10239
|
+
designGoToPage(page) {
|
|
10240
|
+
if (page >= 0 && page < this.designPages.length)
|
|
10241
|
+
this.designPage = page;
|
|
10242
|
+
}
|
|
10243
|
+
isSelected(target) {
|
|
10244
|
+
return isTarget(this.design?.selected, target);
|
|
10245
|
+
}
|
|
10246
|
+
applyDesign(next) {
|
|
10247
|
+
this.tableitemInfo.layoutSchema = next;
|
|
10248
|
+
this.refreshDesign();
|
|
10249
|
+
this.designChange.emit({ type: 'layout', layoutSchema: next });
|
|
10250
|
+
}
|
|
10251
|
+
selectGrid() {
|
|
10252
|
+
this.designChange.emit({ type: 'select', target: { kind: 'container' } });
|
|
10253
|
+
}
|
|
10254
|
+
columnAction(action, index) {
|
|
10255
|
+
if (action === 'edit') {
|
|
10256
|
+
this.designChange.emit({ type: 'select', target: { kind: 'column', index } });
|
|
10257
|
+
}
|
|
10258
|
+
else if (action === 'delete') {
|
|
10259
|
+
if (this.design?.selected)
|
|
10260
|
+
this.designChange.emit({ type: 'deselect' });
|
|
10261
|
+
this.applyDesign(removeColumn(this.tableitemInfo?.layoutSchema, index));
|
|
10262
|
+
}
|
|
10263
|
+
}
|
|
10264
|
+
/** A column moved along the heads, or a data object's field dropped on them (a new column at that place). */
|
|
10265
|
+
columnDropped(event) {
|
|
10266
|
+
const data = event.item?.data;
|
|
10267
|
+
if (isPropertyDrop(data)) {
|
|
10268
|
+
this.applyDesign(dropGridProperty(this.tableitemInfo?.layoutSchema, data, event.currentIndex));
|
|
10269
|
+
}
|
|
10270
|
+
else if (data?.vlDesign === 'column' && event.previousIndex !== event.currentIndex) {
|
|
10271
|
+
this.applyDesign(moveColumn(this.tableitemInfo?.layoutSchema, event.previousIndex, event.currentIndex));
|
|
10272
|
+
}
|
|
10273
|
+
}
|
|
10274
|
+
columnDragStarted() {
|
|
10275
|
+
if (this.design?.selected)
|
|
10276
|
+
this.designChange.emit({ type: 'deselect' });
|
|
10277
|
+
}
|
|
10278
|
+
resizing = null;
|
|
10279
|
+
/** Dragging a column head's right or lower edge sets its width or height. */
|
|
10280
|
+
startResize(event, index, type) {
|
|
10281
|
+
event.preventDefault();
|
|
10282
|
+
event.stopPropagation();
|
|
10283
|
+
const th = event.target.closest('th');
|
|
10284
|
+
if (!th)
|
|
10285
|
+
return;
|
|
10286
|
+
this.resizing = { index, type, x: event.clientX, y: event.clientY, width: th.offsetWidth, height: th.offsetHeight };
|
|
10287
|
+
document.addEventListener('mousemove', this.onResize);
|
|
10288
|
+
document.addEventListener('mouseup', this.endResize);
|
|
10289
|
+
}
|
|
10290
|
+
onResize = (event) => {
|
|
10291
|
+
const r = this.resizing;
|
|
10292
|
+
const column = r ? this.tableitemInfo?.layoutSchema?.elements?.[r.index] : null;
|
|
10293
|
+
if (!r || !column)
|
|
10294
|
+
return;
|
|
10295
|
+
r.size = r.type === 'width' ? { width: Math.max(80, r.width + event.clientX - r.x) } : { height: Math.max(40, r.height + event.clientY - r.y) };
|
|
10296
|
+
// shown at once; saved when the mouse is let go
|
|
10297
|
+
column.option = { ...(column.option || {}), ...(r.size.width ? { width: `${Math.round(r.size.width)}px` } : { height: `${Math.round(r.size.height)}px` }) };
|
|
10298
|
+
this.cdr.markForCheck();
|
|
10299
|
+
};
|
|
10300
|
+
endResize = () => {
|
|
10301
|
+
const r = this.resizing;
|
|
10302
|
+
this.stopResize();
|
|
10303
|
+
if (r?.size)
|
|
10304
|
+
this.applyDesign(resizeColumn(this.tableitemInfo?.layoutSchema, r.index, r.size));
|
|
10305
|
+
this.cdr.markForCheck();
|
|
10306
|
+
};
|
|
10307
|
+
stopResize() {
|
|
10308
|
+
this.resizing = null;
|
|
10309
|
+
if (typeof document === 'undefined')
|
|
10310
|
+
return;
|
|
10311
|
+
document.removeEventListener('mousemove', this.onResize);
|
|
10312
|
+
document.removeEventListener('mouseup', this.endResize);
|
|
8630
10313
|
}
|
|
8631
10314
|
translateSchema(schema, SelectedLanguage) {
|
|
8632
10315
|
if (schema && typeof schema === 'object') {
|
|
@@ -9178,7 +10861,7 @@ class GridComponent {
|
|
|
9178
10861
|
return this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() || '']?.type ?? '';
|
|
9179
10862
|
}
|
|
9180
10863
|
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 });
|
|
9181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", userInfo: "userInfo", pageData: "pageData" }, outputs: { editRow: "editRow", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, viewQueries: [{ propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-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<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(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 [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes?.[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes?.[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</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<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n {{\r\n (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\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "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: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i7$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i7$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i7$1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i7$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i7$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i7$1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i7$1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i9$1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i11$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i11$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i11$2.NzDropdownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i11$2.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzMenuModule }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
|
|
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" }] });
|
|
9182
10865
|
}
|
|
9183
10866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, decorators: [{
|
|
9184
10867
|
type: Component,
|
|
@@ -9202,7 +10885,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
9202
10885
|
NzMenuModule,
|
|
9203
10886
|
PaginationComponent,
|
|
9204
10887
|
CustomKeyboardDirective,
|
|
9205
|
-
], selector: 'vl-grid', template: "<!-- 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<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(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 [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes?.[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes?.[0]\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes?.[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</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<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes?.[0]\">\r\n {{\r\n (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\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}\n"] }]
|
|
10888
|
+
DragDropModule,
|
|
10889
|
+
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"] }]
|
|
9206
10891
|
}], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4.OktaAuthStateService }], propDecorators: { errorMessages: [{
|
|
9207
10892
|
type: Input
|
|
9208
10893
|
}], environment: [{
|
|
@@ -9234,6 +10919,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
9234
10919
|
}], gridForm: [{
|
|
9235
10920
|
type: ViewChild,
|
|
9236
10921
|
args: ['gridForm']
|
|
10922
|
+
}], design: [{
|
|
10923
|
+
type: Input
|
|
10924
|
+
}], designChange: [{
|
|
10925
|
+
type: Output
|
|
10926
|
+
}], designMobile: [{
|
|
10927
|
+
type: HostBinding,
|
|
10928
|
+
args: ['class.vl-design-mobile']
|
|
10929
|
+
}], designTablet: [{
|
|
10930
|
+
type: HostBinding,
|
|
10931
|
+
args: ['class.vl-design-tablet']
|
|
9237
10932
|
}], onPageChange: [{
|
|
9238
10933
|
type: Output
|
|
9239
10934
|
}], onPageSizeChange: [{
|
|
@@ -9395,7 +11090,7 @@ class HeaderMenuComponent {
|
|
|
9395
11090
|
return items;
|
|
9396
11091
|
}
|
|
9397
11092
|
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 });
|
|
9398
|
-
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-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment stating that this container resolves by field NAME, not by field\r\n type. A correctly typed field with another name renders nothing, silently -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\">\r\n\r\n <!-- @contract decision: resolves by field NAME, not by field type\r\n reality: the switch reads the LAST segment of scope.reference. Only logo, cart and\r\n searchInput render; any other name produces an empty element.\r\n failure: a correctly typed field with a different name renders nothing, silently.\r\n instead: name the field logo, cart or searchInput, or put it in another container -->\r\n <ng-container *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n\r\n <!-- Logo -->\r\n <ng-container *ngSwitchCase=\"'logo'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt || 'Logo'\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Search -->\r\n <ng-container *ngSwitchCase=\"'searchInput'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\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)\" />\r\n\r\n <button *ngIf=\"header.option.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\" [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.caption; else searchTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #searchTextContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Cart -->\r\n <ng-container *ngSwitchCase=\"'cart'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Default Button -->\r\n <ng-container *ngSwitchCase=\"'default'\">\r\n @if (header.option && header.option?.action && (header.option?.action == \"cart\")) {\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n }@else {\r\n <div *ngIf=\"shouldShowDefaultButton(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\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)\">\r\n <ng-container *ngIf=\"!header.label; else buttonTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #buttonTextContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n </ng-container>\r\n</header>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
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-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment stating that this container resolves by field NAME, not by field\r\n type. A correctly typed field with another name renders nothing, silently -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\">\r\n\r\n <!-- @contract decision: resolves by field NAME, not by field type\r\n reality: the switch reads the LAST segment of scope.reference. Only logo, cart and\r\n searchInput render; any other name produces an empty element.\r\n failure: a correctly typed field with a different name renders nothing, silently.\r\n instead: name the field logo, cart or searchInput, or put it in another container -->\r\n <ng-container *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n\r\n <!-- Logo -->\r\n <ng-container *ngSwitchCase=\"'logo'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt || 'Logo'\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Search -->\r\n <ng-container *ngSwitchCase=\"'searchInput'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\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)\" />\r\n\r\n <button *ngIf=\"header.option.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\" [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.caption; else searchTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #searchTextContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Cart -->\r\n <ng-container *ngSwitchCase=\"'cart'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Default Button -->\r\n <ng-container *ngSwitchCase=\"'default'\">\r\n @if (header.option && header.option?.action && (header.option?.action == \"cart\")) {\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n }@else {\r\n <div *ngIf=\"shouldShowDefaultButton(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\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)\">\r\n <ng-container *ngIf=\"!header.label; else buttonTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #buttonTextContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n </ng-container>\r\n</header>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.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: 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" }] });
|
|
9399
11094
|
}
|
|
9400
11095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
|
|
9401
11096
|
type: Component,
|
|
@@ -9465,7 +11160,7 @@ class LogsComponent {
|
|
|
9465
11160
|
this.expandedRow = this.expandedRow === index ? null : index;
|
|
9466
11161
|
}
|
|
9467
11162
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: LogsComponent, deps: [{ token: NetworkLogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9468
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: LogsComponent, isStandalone: true, selector: "vl-logs", ngImport: i0, template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
11163
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: LogsComponent, isStandalone: true, selector: "vl-logs", ngImport: i0, template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.JsonPipe, name: "json" }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }] });
|
|
9469
11164
|
}
|
|
9470
11165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: LogsComponent, decorators: [{
|
|
9471
11166
|
type: Component,
|
|
@@ -9474,6 +11169,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
9474
11169
|
], 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"] }]
|
|
9475
11170
|
}], ctorParameters: () => [{ type: NetworkLogService }] });
|
|
9476
11171
|
|
|
11172
|
+
// Shuaib 2026-10-26
|
|
11173
|
+
// - new: design mode (input design, output designChange): the Designer's canvas draws its dialog with this
|
|
11174
|
+
// container - every field with drag, edit and delete (SectionDesigner), no translation, record or backend list;
|
|
11175
|
+
// dialogRef and dialogConfig are optional (the canvas has no dialog around it) (#166)
|
|
9477
11176
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
9478
11177
|
// - new: lockReasonOf / lockHintOf / showMissing - the hint under a locked button, a click on it shows the missing fields
|
|
9479
11178
|
// - new: isLocked - a button is grey and without click by needsLogin / needsValid of its layout
|
|
@@ -9563,16 +11262,43 @@ class ModelComponent {
|
|
|
9563
11262
|
selectedLanguageInfo = {};
|
|
9564
11263
|
userInfo = {};
|
|
9565
11264
|
setFormDataHandler;
|
|
11265
|
+
/** The Designer's canvas: every field with drag, edit and delete, nothing loaded or sent (design/design.ts). */
|
|
11266
|
+
design = null;
|
|
11267
|
+
/** What was chosen or changed on the Designer's canvas. */
|
|
11268
|
+
designChange = new EventEmitter();
|
|
11269
|
+
/** The texts of the design handles. */
|
|
11270
|
+
dt = designTexts(null);
|
|
11271
|
+
/** Drag and drop of the sections and fields in design mode. */
|
|
11272
|
+
designer = new SectionDesigner('dialog', {
|
|
11273
|
+
layout: () => this.modalItemInfo?.layoutSchema,
|
|
11274
|
+
apply: next => {
|
|
11275
|
+
this.modalItemInfo.layoutSchema = next;
|
|
11276
|
+
this.designChange.emit({ type: 'layout', layoutSchema: next });
|
|
11277
|
+
},
|
|
11278
|
+
select: target => this.designChange.emit({ type: 'select', target }),
|
|
11279
|
+
deselect: () => {
|
|
11280
|
+
if (this.design?.selected)
|
|
11281
|
+
this.designChange.emit({ type: 'deselect' });
|
|
11282
|
+
},
|
|
11283
|
+
refresh: () => this.cdr.markForCheck(),
|
|
11284
|
+
});
|
|
11285
|
+
/** The device the Designer shows the page on: the dialog follows it like the app follows the window. */
|
|
11286
|
+
get designMobile() { return this.design?.device === 'mobile'; }
|
|
11287
|
+
get designTablet() { return this.design?.device === 'tablet'; }
|
|
9566
11288
|
copyLayoutSchema = {};
|
|
9567
11289
|
isLoading = false;
|
|
9568
11290
|
projectLanguage = {};
|
|
9569
|
-
constructor(cdr,
|
|
11291
|
+
constructor(cdr,
|
|
11292
|
+
// none on the Designer's canvas, where the dialog stands in the page
|
|
11293
|
+
dialogRef, dialogConfig, utilityService) {
|
|
9570
11294
|
this.cdr = cdr;
|
|
9571
11295
|
this.dialogRef = dialogRef;
|
|
9572
11296
|
this.dialogConfig = dialogConfig;
|
|
9573
11297
|
this.utilityService = utilityService;
|
|
9574
11298
|
}
|
|
9575
11299
|
ngAfterViewInit() {
|
|
11300
|
+
if (this.design)
|
|
11301
|
+
return;
|
|
9576
11302
|
this.projectLanguage = this.utilityService.currentProjectlanguage$.subscribe((uiLang) => {
|
|
9577
11303
|
console.log('uiLang: ', uiLang);
|
|
9578
11304
|
queueMicrotask(() => {
|
|
@@ -9593,6 +11319,13 @@ class ModelComponent {
|
|
|
9593
11319
|
this.picker.closeIfWithin(this.host.nativeElement);
|
|
9594
11320
|
}
|
|
9595
11321
|
ngOnChanges(changes) {
|
|
11322
|
+
if (this.design) {
|
|
11323
|
+
// the canvas shows the layout as written: no translation, no record, no backend list
|
|
11324
|
+
this.dt = designTexts(this.design);
|
|
11325
|
+
if (changes['modalItemInfo'] && this.modalItemInfo?.layoutSchema)
|
|
11326
|
+
normalizeSections(this.modalItemInfo.layoutSchema, 'dialog');
|
|
11327
|
+
return;
|
|
11328
|
+
}
|
|
9596
11329
|
if (!changes['modalItemInfo'] &&
|
|
9597
11330
|
!changes['selectedLanguageInfo'] &&
|
|
9598
11331
|
!changes['userInfo']) {
|
|
@@ -9622,7 +11355,8 @@ class ModelComponent {
|
|
|
9622
11355
|
return;
|
|
9623
11356
|
}
|
|
9624
11357
|
const translations = this.selectedLanguageInfo?.selectedLanguage;
|
|
9625
|
-
this.dialogConfig
|
|
11358
|
+
if (this.dialogConfig)
|
|
11359
|
+
this.dialogConfig.header = translations?.[titleKey] ?? titleKey;
|
|
9626
11360
|
}
|
|
9627
11361
|
updateLayoutLanguage(schema, translations) {
|
|
9628
11362
|
const cloned = JSON.parse(JSON.stringify(schema));
|
|
@@ -9920,7 +11654,7 @@ class ModelComponent {
|
|
|
9920
11654
|
if (!valid) {
|
|
9921
11655
|
return;
|
|
9922
11656
|
}
|
|
9923
|
-
this.dialogRef
|
|
11657
|
+
this.dialogRef?.close({
|
|
9924
11658
|
option,
|
|
9925
11659
|
action: 'buttonClick',
|
|
9926
11660
|
propertySchema,
|
|
@@ -9975,10 +11709,29 @@ class ModelComponent {
|
|
|
9975
11709
|
return !!form.valid;
|
|
9976
11710
|
}
|
|
9977
11711
|
onCancel() {
|
|
9978
|
-
this.dialogRef
|
|
11712
|
+
this.dialogRef?.close({
|
|
9979
11713
|
action: 'cancel'
|
|
9980
11714
|
});
|
|
9981
11715
|
}
|
|
11716
|
+
// ---- design mode ----
|
|
11717
|
+
/** Whether the element's settings are open in the Designer (it is marked). */
|
|
11718
|
+
isSelected(target) {
|
|
11719
|
+
return isTarget(this.design?.selected, target);
|
|
11720
|
+
}
|
|
11721
|
+
sectionAction(action, sectionIndex) {
|
|
11722
|
+
if (action === 'add')
|
|
11723
|
+
this.designer.addButton(sectionIndex, this.dt.button);
|
|
11724
|
+
else if (action === 'edit')
|
|
11725
|
+
this.designer.editSection(sectionIndex);
|
|
11726
|
+
else if (action === 'delete')
|
|
11727
|
+
this.designer.removeSection(sectionIndex);
|
|
11728
|
+
}
|
|
11729
|
+
fieldAction(action, sectionIndex, fieldIndex) {
|
|
11730
|
+
if (action === 'edit')
|
|
11731
|
+
this.designer.editField(sectionIndex, fieldIndex);
|
|
11732
|
+
else if (action === 'delete')
|
|
11733
|
+
this.designer.removeField(sectionIndex, fieldIndex);
|
|
11734
|
+
}
|
|
9982
11735
|
/**
|
|
9983
11736
|
* A field's message shows once the user typed in it and left it, or after a save attempt - not
|
|
9984
11737
|
* when an empty field was only passed through (the message then pushed the row and its label out
|
|
@@ -9988,8 +11741,8 @@ class ModelComponent {
|
|
|
9988
11741
|
showError(control) {
|
|
9989
11742
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
9990
11743
|
}
|
|
9991
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.DynamicDialogRef }, { token: i1$4.DynamicDialogConfig }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9992
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-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<!-- 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", 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}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
11744
|
+
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" }] });
|
|
9993
11746
|
}
|
|
9994
11747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, decorators: [{
|
|
9995
11748
|
type: Component,
|
|
@@ -9998,8 +11751,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
9998
11751
|
FormsModule,
|
|
9999
11752
|
VisiblePipe,
|
|
10000
11753
|
ControlComponent,
|
|
10001
|
-
], template: "<!-- 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<!-- 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", 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}\n"] }]
|
|
10002
|
-
|
|
11754
|
+
DragDropModule,
|
|
11755
|
+
DesignBarComponent,
|
|
11756
|
+
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"] }]
|
|
11758
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef, decorators: [{
|
|
11759
|
+
type: Optional
|
|
11760
|
+
}] }, { type: i1$4.DynamicDialogConfig, decorators: [{
|
|
11761
|
+
type: Optional
|
|
11762
|
+
}] }, { type: UtilityService }], propDecorators: { errorMessages: [{
|
|
10003
11763
|
type: Input
|
|
10004
11764
|
}], modalItemInfo: [{
|
|
10005
11765
|
type: Input
|
|
@@ -10009,6 +11769,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
10009
11769
|
type: Input
|
|
10010
11770
|
}], setFormDataHandler: [{
|
|
10011
11771
|
type: Input
|
|
11772
|
+
}], design: [{
|
|
11773
|
+
type: Input
|
|
11774
|
+
}], designChange: [{
|
|
11775
|
+
type: Output
|
|
11776
|
+
}], designMobile: [{
|
|
11777
|
+
type: HostBinding,
|
|
11778
|
+
args: ['class.vl-design-mobile']
|
|
11779
|
+
}], designTablet: [{
|
|
11780
|
+
type: HostBinding,
|
|
11781
|
+
args: ['class.vl-design-tablet']
|
|
10012
11782
|
}] } });
|
|
10013
11783
|
|
|
10014
11784
|
class Button {
|
|
@@ -11548,7 +13318,7 @@ class SideMenuComponent {
|
|
|
11548
13318
|
});
|
|
11549
13319
|
}
|
|
11550
13320
|
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 });
|
|
11551
|
-
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: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
|
|
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:
|
|
11552
13322
|
// NG-ZORRO
|
|
11553
13323
|
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:
|
|
11554
13324
|
// PrimeNG
|
|
@@ -12510,5 +14280,5 @@ function termsUser(userInfo) {
|
|
|
12510
14280
|
* Generated bundle index. Do not edit.
|
|
12511
14281
|
*/
|
|
12512
14282
|
|
|
12513
|
-
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DEFAULT_DATE_FORMAT, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, isSignedIn, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, recordOf, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, 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 };
|
|
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 };
|
|
12514
14284
|
//# sourceMappingURL=yomotech-view-toolkit.mjs.map
|