@yomotech/view-toolkit 1.0.45 → 1.0.47

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 i9 from '@angular/common';
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, Input, Directive, EventEmitter, Optional, SkipSelf, ViewChild, Output, Component, inject, ViewChildren, ElementRef, NgZone, ChangeDetectorRef, HostBinding, NgModule, effect, DestroyRef } from '@angular/core';
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$1 from 'primeng/button';
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';
@@ -566,6 +568,1034 @@ function styleParts(styleObject) {
566
568
  return { classes: list.filter((c) => typeof c === 'string' && c.trim()).join(' '), style };
567
569
  }
568
570
 
571
+ // Shuaib 2026-10-26
572
+ // - new: the design mode of the containers (#166). The Designer draws a page with the same containers as the app
573
+ // (vl-form, vl-model, vl-card, vl-grid) and hands them [design]; the container then shows every element of the
574
+ // layout with drag, edit and delete around it, sample records instead of data, and tells the Designer what was
575
+ // chosen or changed (designChange). A new container or control comes to the Designer with the next package.
576
+ const DESIGN_TEXTS = {
577
+ dragSection: 'Drag section',
578
+ addButton: 'Add button',
579
+ editSection: 'Edit section',
580
+ deleteSection: 'Delete section',
581
+ section: 'Section',
582
+ addSection: '+ Add section',
583
+ dragField: 'Drag field',
584
+ editField: 'Edit field',
585
+ deleteField: 'Delete field',
586
+ emptySection: 'Drop fields here or use Object Files to add fields.',
587
+ dropHere: 'Drop field here',
588
+ placeAbove: 'Place above',
589
+ placeBelow: 'Place below',
590
+ placeLeft: 'Place beside left',
591
+ placeRight: 'Place beside right',
592
+ hiddenInApp: 'Hidden in the app',
593
+ edit: 'Edit',
594
+ delete: 'Delete',
595
+ editLayout: 'Edit layout',
596
+ addCard: 'Add card',
597
+ deleteCard: 'Delete card',
598
+ addHeaderButton: 'Add header button',
599
+ editHeader: 'Edit header style',
600
+ clearHeader: 'Clear header',
601
+ editHeaderButton: 'Edit button',
602
+ deleteHeaderButton: 'Delete button',
603
+ emptyCardTitle: 'Pick some properties to generate card',
604
+ emptyCardText: 'Drag properties from the left panel and drop them here.',
605
+ dropCardItem: 'Drop card item here',
606
+ dragColumn: 'Drag column',
607
+ editColumn: 'Edit column',
608
+ deleteColumn: 'Delete column',
609
+ resizeWidth: 'Resize width',
610
+ resizeHeight: 'Resize height',
611
+ editGrid: 'Edit grid',
612
+ emptyGrid: 'Drag properties from the left panel and drop them here to add columns.',
613
+ button: 'Button',
614
+ };
615
+ /** The design texts with the Designer's own over the English ones. */
616
+ function designTexts(design) {
617
+ return { ...DESIGN_TEXTS, ...(design?.texts || {}) };
618
+ }
619
+ /** Whether the target is the element (same kind and place) - the selection mark. */
620
+ function isTarget(selected, target) {
621
+ if (!selected || selected.kind !== target.kind)
622
+ return false;
623
+ const same = (a, b) => (a ?? null) === (b ?? null);
624
+ return same(selected.sectionIndex, target.sectionIndex) && same(selected.fieldIndex, target.fieldIndex)
625
+ && same(selected.index, target.index) && same(selected.parentIndex, target.parentIndex);
626
+ }
627
+ /** A drop from the Designer's data objects (not an element moved inside the container). */
628
+ function isPropertyDrop(data) {
629
+ return !!data && typeof data === 'object' && data.kind === 'object-property' && typeof data.name === 'string';
630
+ }
631
+ /** The data object a dropped property belongs to ("orders.json" -> "orders"). */
632
+ function dropObjectName(drop) {
633
+ return String(drop.objectName || drop.objectNode?.name || '').replace(/\.json$/i, '').trim();
634
+ }
635
+ /** A copy of a layout (layouts are JSON). */
636
+ function cloneLayout(value) {
637
+ return value === undefined ? value : JSON.parse(JSON.stringify(value));
638
+ }
639
+ /** The ids of every drop list of the containers in design mode on the page (the Designer's data objects drop on them). */
640
+ function designDropIds() {
641
+ if (typeof document === 'undefined')
642
+ return [];
643
+ return Array.from(document.querySelectorAll('[data-vl-design-list]')).map(el => el.id).filter(Boolean);
644
+ }
645
+
646
+ // Shuaib 2026-10-26
647
+ // - new: the Designer's edits of a card page: drop a data object's field or move an element above, below or beside
648
+ // another (side by side they form a HorizontalLayout), add buttons, delete elements; the page header's buttons.
649
+ // Moved here from the Designer's own card (LiveForge), so the Designer and vl-card keep one rule (#166). Pure:
650
+ // every edit returns a new layout.
651
+ function horizontalStyle() {
652
+ return { display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '10px', alignItems: 'start', width: '100%', boxSizing: 'border-box' };
653
+ }
654
+ /** A horizontal layout draws its elements in as many equal columns as it has elements. */
655
+ function normalizeHorizontal(layout) {
656
+ layout.style = layout.style || horizontalStyle();
657
+ delete layout.style.classes;
658
+ layout.style.display = layout.style.display || 'grid';
659
+ layout.style.gridTemplateColumns = `repeat(${Math.max(1, layout.elements?.length || 1)}, minmax(0, 1fr))`;
660
+ layout.style.gap = layout.style.gap || '10px';
661
+ layout.style.alignItems = layout.style.alignItems || 'start';
662
+ }
663
+ function horizontalOf(elements) {
664
+ const layout = { type: 'HorizontalLayout', style: horizontalStyle(), elements };
665
+ normalizeHorizontal(layout);
666
+ return layout;
667
+ }
668
+ /** A horizontal layout with one element left becomes that element; an empty one goes. */
669
+ function normalizeRows(cards) {
670
+ for (let i = cards.length - 1; i >= 0; i--) {
671
+ const layout = cards[i];
672
+ if (layout?.type !== 'HorizontalLayout')
673
+ continue;
674
+ layout.elements = Array.isArray(layout.elements) ? layout.elements : [];
675
+ if (layout.elements.length === 0)
676
+ cards.splice(i, 1);
677
+ else if (layout.elements.length === 1)
678
+ cards.splice(i, 1, layout.elements[0]);
679
+ else
680
+ normalizeHorizontal(layout);
681
+ }
682
+ }
683
+ /**
684
+ * The card layout as the Designer keeps it, changed in place: no empty classes on the card styles, the card's
685
+ * columns are drawn by the container (no gridTemplateColumns in its style), no classes on the elements (the right
686
+ * panel sets styles only), horizontal layouts in shape.
687
+ */
688
+ function normalizeCard(layout) {
689
+ if (!layout)
690
+ return layout;
691
+ const emptyClasses = (style) => Array.isArray(style?.classes) && style.classes.every((c) => !String(c ?? '').trim());
692
+ if (emptyClasses(layout.style))
693
+ delete layout.style.classes;
694
+ if (emptyClasses(layout.stylePerCard))
695
+ delete layout.stylePerCard.classes;
696
+ if (layout.style) {
697
+ delete layout.style.gridTemplateColumns;
698
+ delete layout.style['grid-template-columns'];
699
+ }
700
+ const clean = (elements) => {
701
+ for (const element of elements) {
702
+ if (!element || typeof element !== 'object')
703
+ continue;
704
+ if (element.style)
705
+ delete element.style.classes;
706
+ if (element.label?.style)
707
+ delete element.label.style.classes;
708
+ if (element.scope?.style)
709
+ delete element.scope.style.classes;
710
+ if (element.type === 'HorizontalLayout') {
711
+ element.elements = Array.isArray(element.elements) ? element.elements : [];
712
+ clean(element.elements);
713
+ normalizeHorizontal(element);
714
+ }
715
+ }
716
+ };
717
+ layout.cards = Array.isArray(layout.cards) ? layout.cards : [];
718
+ clean(layout.cards);
719
+ normalizeRows(layout.cards);
720
+ return layout;
721
+ }
722
+ /** A button as the Designer adds it to a card. */
723
+ function cardButton(caption = 'Button') {
724
+ return {
725
+ control: 'button',
726
+ icon: '',
727
+ caption,
728
+ style: { border: '1px solid #2563eb', background: '#2563eb', color: '#ffffff', borderRadius: '4px', padding: '8px 12px', cursor: 'pointer' },
729
+ option: {
730
+ visible: true, protected: false, passToken: false, action: null, innerAction: null, storageType: null, key: '',
731
+ data_url: '', deleteMessage: '', params: {}, form: false, modalTitle: '', passData: false, layout_url: '', property_url: [],
732
+ },
733
+ };
734
+ }
735
+ /** The card element a data object's property becomes when it is dropped: its value, read only. */
736
+ function elementFromProperty(drop, caption) {
737
+ if (String(drop?.type ?? '').toLowerCase() === 'button')
738
+ return cardButton(caption);
739
+ return {
740
+ label: { caption: drop?.name || '', style: { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '4px', display: 'block' } },
741
+ scope: { reference: `#/${dropObjectName(drop)}/properties/${drop?.name}`, style: { width: '100%', boxSizing: 'border-box' } },
742
+ option: {
743
+ action: 'get', visible: true, protected: true, link: false, setImageUrl: String(drop?.type ?? '').toLowerCase() === 'media',
744
+ layout_url: '', property_url: [''], data_url: '',
745
+ },
746
+ };
747
+ }
748
+ function takeOut(cards, place) {
749
+ if (place.parentIndex === null || place.parentIndex === undefined) {
750
+ return place.index >= 0 && place.index < cards.length ? cards.splice(place.index, 1)[0] : null;
751
+ }
752
+ const parent = cards[place.parentIndex];
753
+ if (!Array.isArray(parent?.elements) || place.index < 0 || place.index >= parent.elements.length)
754
+ return null;
755
+ return parent.elements.splice(place.index, 1)[0];
756
+ }
757
+ function putTopLevel(cards, element, index, type) {
758
+ if (index === null || index === undefined || !cards[index]) {
759
+ cards.push(element);
760
+ return;
761
+ }
762
+ if (type === 'left' || type === 'right') {
763
+ const target = cards[index];
764
+ if (target.type === 'HorizontalLayout') {
765
+ target.elements = Array.isArray(target.elements) ? target.elements : [];
766
+ if (type === 'left')
767
+ target.elements.unshift(element);
768
+ else
769
+ target.elements.push(element);
770
+ normalizeHorizontal(target);
771
+ return;
772
+ }
773
+ cards.splice(index, 1, horizontalOf(type === 'left' ? [element, target] : [target, element]));
774
+ return;
775
+ }
776
+ cards.splice(type === 'before' ? index : index + 1, 0, element);
777
+ }
778
+ function putInner(cards, element, parentIndex, innerIndex, type) {
779
+ const parent = cards[parentIndex];
780
+ if (parent?.type !== 'HorizontalLayout') {
781
+ putTopLevel(cards, element, parentIndex, 'after');
782
+ return;
783
+ }
784
+ parent.elements = Array.isArray(parent.elements) ? parent.elements : [];
785
+ if (innerIndex === null || innerIndex === undefined || !parent.elements[innerIndex])
786
+ parent.elements.push(element);
787
+ else
788
+ parent.elements.splice(type === 'left' || type === 'before' ? innerIndex : innerIndex + 1, 0, element);
789
+ normalizeHorizontal(parent);
790
+ }
791
+ /**
792
+ * The places of a list shift when an element is taken out before them: the spot is corrected, so the element
793
+ * lands where the hint showed it.
794
+ */
795
+ function shiftSpot(spot, from, cards, countBefore) {
796
+ const next = { ...spot };
797
+ if (from.parentIndex === null) {
798
+ if (next.index !== null && from.index < next.index)
799
+ next.index--;
800
+ if (next.parentIndex !== null && from.index < next.parentIndex)
801
+ next.parentIndex--;
802
+ }
803
+ else if (next.parentIndex === from.parentIndex && next.innerIndex !== null && from.index < next.innerIndex) {
804
+ next.innerIndex--;
805
+ }
806
+ // the horizontal layout the element came from may have become a single element or gone
807
+ if (from.parentIndex !== null && cards.length < countBefore) {
808
+ if (next.index !== null && next.index > from.parentIndex)
809
+ next.index--;
810
+ if (next.parentIndex !== null && next.parentIndex > from.parentIndex)
811
+ next.parentIndex--;
812
+ }
813
+ return next;
814
+ }
815
+ function put(cards, element, spot) {
816
+ if (spot.parentIndex === null) {
817
+ putTopLevel(cards, element, spot.index, spot.type);
818
+ return;
819
+ }
820
+ const parent = cards[spot.parentIndex];
821
+ // above or below inside a horizontal layout means above or below the layout itself
822
+ if (!parent || spot.type === 'before' || spot.type === 'after') {
823
+ putTopLevel(cards, element, spot.parentIndex, spot.type === 'before' ? 'before' : 'after');
824
+ }
825
+ else if (parent.type === 'HorizontalLayout') {
826
+ putInner(cards, element, spot.parentIndex, spot.innerIndex, spot.type);
827
+ }
828
+ else {
829
+ // the horizontal layout became one element when the dragged one left it: beside that element again
830
+ putTopLevel(cards, element, spot.parentIndex, spot.type === 'empty' ? 'after' : spot.type);
831
+ }
832
+ }
833
+ /** A data object's field dropped at the spot. */
834
+ function dropCardProperty(layout, drop, spot, buttonCaption) {
835
+ const next = cloneLayout(layout || {});
836
+ next.cards = Array.isArray(next.cards) ? next.cards : [];
837
+ put(next.cards, elementFromProperty(drop, buttonCaption), spot);
838
+ return normalizeCard(next);
839
+ }
840
+ /** An element moved from its place to the spot. */
841
+ function moveCardElement(layout, from, spot) {
842
+ const next = cloneLayout(layout || {});
843
+ next.cards = Array.isArray(next.cards) ? next.cards : [];
844
+ const cards = next.cards;
845
+ if (from.parentIndex === null && spot.parentIndex === null && spot.index === from.index)
846
+ return next;
847
+ const countBefore = cards.length;
848
+ const element = takeOut(cards, from);
849
+ if (!element)
850
+ return next;
851
+ // a horizontal layout left with one element becomes that element, an empty one goes
852
+ if (from.parentIndex !== null) {
853
+ const parent = cards[from.parentIndex];
854
+ if (parent?.elements?.length === 0)
855
+ cards.splice(from.parentIndex, 1);
856
+ else if (parent?.elements?.length === 1)
857
+ cards.splice(from.parentIndex, 1, parent.elements[0]);
858
+ }
859
+ put(cards, element, shiftSpot(spot, from, cards, countBefore));
860
+ return normalizeCard(next);
861
+ }
862
+ function removeCardElement(layout, place) {
863
+ const next = cloneLayout(layout || {});
864
+ next.cards = Array.isArray(next.cards) ? next.cards : [];
865
+ takeOut(next.cards, place);
866
+ return normalizeCard(next);
867
+ }
868
+ /** A button added after the element (in its horizontal layout when it stands in one). */
869
+ function addCardButton(layout, after, caption) {
870
+ const next = cloneLayout(layout || {});
871
+ next.cards = Array.isArray(next.cards) ? next.cards : [];
872
+ const list = after.parentIndex === null ? next.cards : next.cards[after.parentIndex]?.elements;
873
+ if (!Array.isArray(list))
874
+ return next;
875
+ list.splice(after.index + 1, 0, cardButton(caption));
876
+ return normalizeCard(next);
877
+ }
878
+ /** The settings of a card element changed in the Designer's right panel. */
879
+ function replaceCardElement(layout, place, element) {
880
+ const next = cloneLayout(layout || {});
881
+ next.cards = Array.isArray(next.cards) ? next.cards : [];
882
+ const list = place.parentIndex === null || place.parentIndex === undefined ? next.cards : next.cards[place.parentIndex]?.elements;
883
+ if (!Array.isArray(list) || place.index < 0 || place.index >= list.length)
884
+ return next;
885
+ list[place.index] = cloneLayout(element);
886
+ return normalizeCard(next);
887
+ }
888
+ // ---- the page header the card shows ----
889
+ /** A button as the Designer adds it to the page header (it opens the page's dialog). */
890
+ function headerButton(caption = 'Add') {
891
+ return {
892
+ caption,
893
+ icon: '',
894
+ style: { width: 'auto', minWidth: '110px', maxWidth: '100%', height: '40px', padding: '0 16px', boxSizing: 'border-box' },
895
+ option: { innerAction: 'showModal', visible: true, modalTitle: 'Record Working Time', protected: false, layout_url: '', property_url: [] },
896
+ };
897
+ }
898
+ function removeHeaderElement(header, index) {
899
+ const next = cloneLayout(header || {});
900
+ next.elements = Array.isArray(next.elements) ? next.elements : [];
901
+ if (index >= 0 && index < next.elements.length)
902
+ next.elements.splice(index, 1);
903
+ return next;
904
+ }
905
+ function clearHeader(header) {
906
+ return { ...cloneLayout(header || {}), elements: [] };
907
+ }
908
+
909
+ // Shuaib 2026-10-26
910
+ // - new: the Designer's edits of a page with sections (form and dialog): drop a data object's field, move a field
911
+ // beside / above / below another (rows of up to four fields share the 12 columns), add and delete fields,
912
+ // buttons and sections. Moved here from the Designer's own form and dialog (LiveForge), so the Designer and the
913
+ // containers keep one rule (#166). Pure: every edit returns a new layout.
914
+ // - change: a field placed beside another keeps its label position in the dialog too (field.layout); the
915
+ // Designer's form kept it since 2026-10-24, its dialog still set it from the width
916
+ const GRID_COLUMNS = 12;
917
+ const MAX_FIELDS_PER_ROW = 4;
918
+ /** The upper quarter of a field puts the drop above, the lower quarter below, the middle beside it (left or right half). */
919
+ function dropTypeAt(rect, x, y) {
920
+ const relY = y - rect.top;
921
+ if (relY <= rect.height * 0.25)
922
+ return 'before';
923
+ if (relY >= rect.height * 0.75)
924
+ return 'after';
925
+ return x - rect.left <= rect.width / 2 ? 'left' : 'right';
926
+ }
927
+ function rowId() {
928
+ return `row_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
929
+ }
930
+ /** How many of the section's 12 columns a field takes (gridSpan, else its style's "span N", else by its label position). */
931
+ function fieldSpan(field) {
932
+ let span = Number(field?.gridSpan);
933
+ if (!span) {
934
+ const gridColumn = field?.style?.gridColumn || field?.style?.['grid-column'];
935
+ const match = typeof gridColumn === 'string' ? gridColumn.match(/span\s+(\d+)/) : null;
936
+ span = match ? Number(match[1]) : 0;
937
+ }
938
+ if (!span)
939
+ span = field?.layout === 'horizontal' ? 6 : GRID_COLUMNS;
940
+ return Math.max(1, Math.min(GRID_COLUMNS, span));
941
+ }
942
+ /** Gives a field its width; the label position stays as chosen, only a field without one gets it from the width. */
943
+ function setSpan(field, span, kind) {
944
+ const safe = Math.max(1, Math.min(GRID_COLUMNS, span));
945
+ field.gridSpan = safe;
946
+ field.layout = field.layout || (safe === GRID_COLUMNS ? 'vertical' : 'horizontal');
947
+ field.style = { ...(field.style || {}), gridColumn: `span ${safe}`, width: '100%', boxSizing: 'border-box' };
948
+ if (kind === 'dialog')
949
+ field.style.minWidth = '0';
950
+ if (kind === 'form')
951
+ delete field.style.classes;
952
+ for (const key of ['flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flex-grow', 'flex-shrink', 'flex-basis'])
953
+ delete field.style[key];
954
+ }
955
+ function fullWidth(field, kind) {
956
+ field.rowId = rowId();
957
+ setSpan(field, GRID_COLUMNS, kind);
958
+ return field;
959
+ }
960
+ /** The fields of one row share the 12 columns (at most four; more go to rows of their own). */
961
+ function rebalanceRow(fields, id, kind) {
962
+ const row = fields.filter(field => field?.rowId === id);
963
+ if (!row.length)
964
+ return;
965
+ if (row.length === 1) {
966
+ setSpan(row[0], GRID_COLUMNS, kind);
967
+ return;
968
+ }
969
+ const span = Math.floor(GRID_COLUMNS / Math.min(row.length, MAX_FIELDS_PER_ROW));
970
+ row.forEach((field, index) => {
971
+ if (index < MAX_FIELDS_PER_ROW) {
972
+ field.rowId = id;
973
+ setSpan(field, span, kind);
974
+ }
975
+ else {
976
+ fullWidth(field, kind);
977
+ }
978
+ });
979
+ }
980
+ function insertFullRow(fields, field, targetIndex, position, kind) {
981
+ fullWidth(field, kind);
982
+ if (targetIndex === null || !fields[targetIndex]) {
983
+ fields.push(field);
984
+ return;
985
+ }
986
+ const target = fields[targetIndex].rowId;
987
+ if (!target) {
988
+ fields.splice(position === 'before' ? targetIndex : targetIndex + 1, 0, field);
989
+ return;
990
+ }
991
+ if (position === 'before') {
992
+ const first = fields.findIndex(f => f?.rowId === target);
993
+ fields.splice(first >= 0 ? first : targetIndex, 0, field);
994
+ return;
995
+ }
996
+ let last = -1;
997
+ fields.forEach((f, index) => { if (f?.rowId === target)
998
+ last = index; });
999
+ fields.splice(last >= 0 ? last + 1 : targetIndex + 1, 0, field);
1000
+ }
1001
+ function insertSameRow(fields, field, targetIndex, side, kind) {
1002
+ const target = fields[targetIndex];
1003
+ if (!target)
1004
+ return;
1005
+ const id = target.rowId || (target.rowId = rowId());
1006
+ if (fields.filter(f => f?.rowId === id).length >= MAX_FIELDS_PER_ROW) {
1007
+ insertFullRow(fields, field, targetIndex, 'after', kind);
1008
+ return;
1009
+ }
1010
+ field.rowId = id;
1011
+ fields.splice(side === 'left' ? targetIndex : targetIndex + 1, 0, field);
1012
+ rebalanceRow(fields, id, kind);
1013
+ }
1014
+ /** Puts a field into a section's fields at the drop spot. */
1015
+ function insertField(fields, field, spot, kind) {
1016
+ if ((spot.type === 'left' || spot.type === 'right') && spot.targetIndex !== null && fields[spot.targetIndex]) {
1017
+ insertSameRow(fields, field, spot.targetIndex, spot.type, kind);
1018
+ return;
1019
+ }
1020
+ insertFullRow(fields, field, spot.targetIndex, spot.type === 'before' ? 'before' : spot.type === 'after' ? 'after' : 'empty', kind);
1021
+ }
1022
+ // ---- what a new section, button and field look like ----
1023
+ function sectionLayout() {
1024
+ return { mode: 'auto-grid', desktopColumns: 12, tabletColumns: 6, mobileColumns: 1, gap: '10px', mobileStack: true };
1025
+ }
1026
+ function formLabelStyle() {
1027
+ return { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '6px', display: 'block' };
1028
+ }
1029
+ function formWrapperStyle() {
1030
+ return {
1031
+ gridColumn: 'span 12', width: '100%', boxSizing: 'border-box', padding: '12px', borderRadius: '4px',
1032
+ border: '1px solid #ececf5', background: '#ffffff', margin: '0', boxShadow: '0 8px 18px rgba(16, 24, 40, 0.04)',
1033
+ };
1034
+ }
1035
+ function inputStyle() {
1036
+ return { width: '100%', padding: '10px 12px', borderRadius: '4px', border: '1px solid #e5e7eb', background: '#ffffff', outline: 'none' };
1037
+ }
1038
+ /** An empty section as the Designer adds it. */
1039
+ function newSection(kind) {
1040
+ const body = { padding: '14px', borderRadius: '4px', border: '1px solid #e7e8ef', background: '#ffffff', marginBottom: '14px', boxShadow: '0 8px 18px rgba(16, 24, 40, 0.04)' };
1041
+ const label = { fontSize: '15px', fontWeight: '700', color: '#111827' };
1042
+ if (kind === 'dialog') {
1043
+ return { label: { caption: '', style: { classes: ['lf-section-title'], ...label } }, style: { classes: ['lf-section-body'], ...body }, formFields: [] };
1044
+ }
1045
+ return { label: { caption: '', style: label }, layout: sectionLayout(), style: body, responsiveStyle: { tablet: {}, mobile: {} }, formFields: [] };
1046
+ }
1047
+ /** A button as the Designer adds it to a section. */
1048
+ function newButton(kind, caption = 'Button') {
1049
+ if (kind === 'dialog') {
1050
+ return fullWidth({ label: { caption, style: {} }, option: { innerAction: 'submit' }, style: { gridColumn: 'span 12', width: '100%' }, layout: 'vertical' }, kind);
1051
+ }
1052
+ return { label: { caption, style: formLabelStyle() }, option: {}, required: false, style: formWrapperStyle(), layout: 'vertical', gridSpan: 12, rowId: rowId() };
1053
+ }
1054
+ /** The field a data object's property becomes when it is dropped (label: the property's name, changed afterwards). */
1055
+ function fieldFromProperty(drop, kind) {
1056
+ if (String(drop?.type ?? '').toLowerCase() === 'button')
1057
+ return newButton(kind, drop.caption || 'Button');
1058
+ const reference = `#/${dropObjectName(drop)}/properties/${drop.name}`;
1059
+ if (kind === 'dialog') {
1060
+ return {
1061
+ label: { caption: drop.name, style: { fontSize: '13px', fontWeight: '700', color: '#374151', marginBottom: '6px', display: 'block' } },
1062
+ option: { protected: false, required: false, disabled: false },
1063
+ required: false,
1064
+ scope: { reference, style: inputStyle() },
1065
+ validation: { style: { color: '#ef4444', fontSize: '12px', marginTop: '4px' } },
1066
+ style: { gridColumn: 'span 12' },
1067
+ layout: 'vertical',
1068
+ };
1069
+ }
1070
+ return {
1071
+ label: { caption: drop.name, style: formLabelStyle() },
1072
+ option: {},
1073
+ required: false,
1074
+ scope: { reference, style: { ...inputStyle(), boxSizing: 'border-box' } },
1075
+ style: formWrapperStyle(),
1076
+ layout: 'vertical',
1077
+ gridSpan: 12,
1078
+ rowId: rowId(),
1079
+ };
1080
+ }
1081
+ // ---- the layout kept in shape ----
1082
+ /**
1083
+ * The layout as the Designer keeps it, changed in place: every section has its fields list; in a form the
1084
+ * classes go (the right panel sets styles only), the section's grid is drawn by the container (no display or
1085
+ * columns in its style) and every field belongs to a row.
1086
+ */
1087
+ function normalizeSections(layout, kind) {
1088
+ if (!layout)
1089
+ return layout;
1090
+ const sections = layout.formSections;
1091
+ if (kind === 'dialog') {
1092
+ if (Array.isArray(sections))
1093
+ sections.forEach((section) => { if (!Array.isArray(section.formFields))
1094
+ section.formFields = []; });
1095
+ return layout;
1096
+ }
1097
+ layout.style = layout.style || {};
1098
+ delete layout.style.classes;
1099
+ if (!Array.isArray(sections))
1100
+ return layout;
1101
+ for (const section of sections) {
1102
+ section.label = section.label || {};
1103
+ section.label.style = section.label.style || {};
1104
+ delete section.label.style.classes;
1105
+ section.layout = section.layout || sectionLayout();
1106
+ section.responsiveStyle = section.responsiveStyle || { tablet: {}, mobile: {} };
1107
+ section.style = section.style || {};
1108
+ for (const key of ['classes', 'display', 'gridTemplateColumns', 'grid-template-columns', 'alignItems', 'align-items', 'flex', 'flexWrap', 'flexDirection', 'flex-wrap', 'flex-direction']) {
1109
+ delete section.style[key];
1110
+ }
1111
+ if (!Array.isArray(section.formFields))
1112
+ section.formFields = [];
1113
+ normalizeFields(section.formFields);
1114
+ }
1115
+ return layout;
1116
+ }
1117
+ function normalizeFields(fields) {
1118
+ let activeRow = '';
1119
+ let activeSpan = 0;
1120
+ for (const field of fields) {
1121
+ field.style = field.style || {};
1122
+ delete field.style.classes;
1123
+ field.label = field.label || {};
1124
+ field.label.style = field.label.style || {};
1125
+ delete field.label.style.classes;
1126
+ if (field.scope) {
1127
+ field.scope.style = field.scope.style || {};
1128
+ delete field.scope.style.classes;
1129
+ }
1130
+ if (field.validation?.style)
1131
+ delete field.validation.style.classes;
1132
+ const span = fieldSpan(field);
1133
+ if (!field.rowId) {
1134
+ if (span === GRID_COLUMNS || !activeRow || activeSpan + span > GRID_COLUMNS) {
1135
+ activeRow = rowId();
1136
+ activeSpan = 0;
1137
+ }
1138
+ field.rowId = activeRow;
1139
+ activeSpan += span;
1140
+ }
1141
+ setSpan(field, span, 'form');
1142
+ }
1143
+ for (const id of new Set(fields.map(field => field.rowId).filter(Boolean)))
1144
+ rebalanceRow(fields, id, 'form');
1145
+ }
1146
+ // ---- the edits: each returns the new layout ----
1147
+ function sectionsOf(layout) {
1148
+ layout.formSections = Array.isArray(layout.formSections) ? layout.formSections : [];
1149
+ return layout.formSections;
1150
+ }
1151
+ /** A data object's field dropped at the spot. */
1152
+ function dropProperty(layout, drop, spot, kind) {
1153
+ const next = cloneLayout(layout || {});
1154
+ const section = sectionsOf(next)[spot.sectionIndex];
1155
+ if (!section)
1156
+ return next;
1157
+ section.formFields = Array.isArray(section.formFields) ? section.formFields : [];
1158
+ insertField(section.formFields, fieldFromProperty(drop, kind), spot, kind);
1159
+ return normalizeSections(next, kind);
1160
+ }
1161
+ /** A field moved from its place to the spot (same or another section). */
1162
+ function moveField(layout, from, spot, kind) {
1163
+ const next = cloneLayout(layout || {});
1164
+ const sections = sectionsOf(next);
1165
+ const source = sections[from.sectionIndex]?.formFields;
1166
+ const target = sections[spot.sectionIndex]?.formFields;
1167
+ if (!Array.isArray(source) || !Array.isArray(target))
1168
+ return next;
1169
+ const field = source[from.fieldIndex];
1170
+ if (!field)
1171
+ return next;
1172
+ const same = source === target;
1173
+ // dropped beside itself: nothing to do
1174
+ if (same && spot.targetIndex === from.fieldIndex && (spot.type === 'left' || spot.type === 'right'))
1175
+ return next;
1176
+ const oldRow = field.rowId;
1177
+ source.splice(from.fieldIndex, 1);
1178
+ let targetIndex = spot.targetIndex;
1179
+ if (same && targetIndex !== null && from.fieldIndex < targetIndex)
1180
+ targetIndex--;
1181
+ insertField(target, field, { type: spot.type, targetIndex }, kind);
1182
+ if (oldRow)
1183
+ rebalanceRow(source, oldRow, kind);
1184
+ return normalizeSections(next, kind);
1185
+ }
1186
+ function removeField(layout, sectionIndex, fieldIndex, kind) {
1187
+ const next = cloneLayout(layout || {});
1188
+ const fields = sectionsOf(next)[sectionIndex]?.formFields;
1189
+ if (!Array.isArray(fields) || fieldIndex < 0 || fieldIndex >= fields.length)
1190
+ return next;
1191
+ const [removed] = fields.splice(fieldIndex, 1);
1192
+ if (removed?.rowId)
1193
+ rebalanceRow(fields, removed.rowId, kind);
1194
+ return normalizeSections(next, kind);
1195
+ }
1196
+ /** A section deleted; a form keeps one empty section to drop fields into. */
1197
+ function removeSection(layout, sectionIndex, kind) {
1198
+ const next = cloneLayout(layout || {});
1199
+ const sections = sectionsOf(next);
1200
+ if (sectionIndex < 0 || sectionIndex >= sections.length)
1201
+ return next;
1202
+ sections.splice(sectionIndex, 1);
1203
+ if (kind === 'form' && !sections.length)
1204
+ sections.push(newSection(kind));
1205
+ return normalizeSections(next, kind);
1206
+ }
1207
+ function moveSection(layout, from, to) {
1208
+ const next = cloneLayout(layout || {});
1209
+ const sections = sectionsOf(next);
1210
+ if (from < 0 || to < 0 || from >= sections.length || to >= sections.length || from === to)
1211
+ return next;
1212
+ const [section] = sections.splice(from, 1);
1213
+ sections.splice(to, 0, section);
1214
+ return next;
1215
+ }
1216
+ function addSection(layout, kind) {
1217
+ const next = cloneLayout(layout || {});
1218
+ sectionsOf(next).push(newSection(kind));
1219
+ return normalizeSections(next, kind);
1220
+ }
1221
+ function addButton(layout, sectionIndex, kind, caption = 'Button') {
1222
+ const next = cloneLayout(layout || {});
1223
+ const section = sectionsOf(next)[sectionIndex];
1224
+ if (!section)
1225
+ return next;
1226
+ section.formFields = Array.isArray(section.formFields) ? section.formFields : [];
1227
+ section.formFields.push(newButton(kind, caption));
1228
+ return normalizeSections(next, kind);
1229
+ }
1230
+ /** The settings of a section or field changed in the Designer's right panel. */
1231
+ function replaceSection(layout, sectionIndex, section, kind) {
1232
+ const next = cloneLayout(layout || {});
1233
+ const sections = sectionsOf(next);
1234
+ if (sectionIndex < 0 || sectionIndex >= sections.length)
1235
+ return next;
1236
+ sections[sectionIndex] = cloneLayout(section);
1237
+ return normalizeSections(next, kind);
1238
+ }
1239
+ function replaceField(layout, sectionIndex, fieldIndex, field, kind) {
1240
+ const next = cloneLayout(layout || {});
1241
+ const fields = sectionsOf(next)[sectionIndex]?.formFields;
1242
+ if (!Array.isArray(fields) || fieldIndex < 0 || fieldIndex >= fields.length)
1243
+ return next;
1244
+ fields[fieldIndex] = cloneLayout(field);
1245
+ return normalizeSections(next, kind);
1246
+ }
1247
+
1248
+ // Shuaib 2026-10-26
1249
+ // - new: CardDesigner - drag and drop of a card page in design mode (vl-card): the drop hint under the pointer
1250
+ // (above, below or beside an element of the first card, or inside a horizontal layout), the drop itself and the
1251
+ // element actions (#166)
1252
+ let cardDesignerCount = 0;
1253
+ class CardDesigner {
1254
+ host;
1255
+ hint = null;
1256
+ dragging = false;
1257
+ moving = false;
1258
+ prefix = `vl-card-design-${++cardDesignerCount}`;
1259
+ constructor(host) {
1260
+ this.host = host;
1261
+ }
1262
+ /** The drop list of the card's elements. */
1263
+ listId() {
1264
+ return this.prefix;
1265
+ }
1266
+ /** The drop list of the horizontal layout at index. */
1267
+ innerListId(index) {
1268
+ return `${this.prefix}-${index}`;
1269
+ }
1270
+ /** The card's list and every horizontal layout's list, so an element can go from one into another. */
1271
+ listIds() {
1272
+ const cards = this.host.layout()?.cards || [];
1273
+ return [this.listId(), ...cards.map((c, i) => c?.type === 'HorizontalLayout' ? this.innerListId(i) : '').filter(Boolean)];
1274
+ }
1275
+ dragData(index, parentIndex) {
1276
+ return { vlDesign: 'cardElement', index, parentIndex };
1277
+ }
1278
+ // ---- the hint under the pointer ----
1279
+ rowsOf(list) {
1280
+ return Array.from(list.querySelectorAll('[data-vl-design-element]'))
1281
+ .filter(row => !row.classList.contains('cdk-drag-placeholder') && row.closest('[data-vl-design-list]') === list);
1282
+ }
1283
+ inside(rect, x, y) {
1284
+ return rect.width > 0 && rect.height > 0 && x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
1285
+ }
1286
+ /** The drop spot at a point of the first card: inside a horizontal layout first, else among the card's elements. */
1287
+ spotAt(x, y) {
1288
+ const empty = { type: 'empty', index: null, parentIndex: null, innerIndex: null };
1289
+ if (typeof document === 'undefined')
1290
+ return empty;
1291
+ const cards = this.host.layout()?.cards || [];
1292
+ for (let i = 0; i < cards.length; i++) {
1293
+ if (cards[i]?.type !== 'HorizontalLayout')
1294
+ continue;
1295
+ const inner = document.getElementById(this.innerListId(i));
1296
+ if (!inner || !this.inside(inner.getBoundingClientRect(), x, y))
1297
+ continue;
1298
+ const rows = this.rowsOf(inner);
1299
+ if (!rows.length)
1300
+ return { type: 'empty', index: i, parentIndex: i, innerIndex: null };
1301
+ for (const row of rows) {
1302
+ const rect = row.getBoundingClientRect();
1303
+ if (this.inside(rect, x, y))
1304
+ return { type: dropTypeAt(rect, x, y), index: i, parentIndex: i, innerIndex: Number(row.getAttribute('data-vl-design-element')) };
1305
+ }
1306
+ return { type: 'after', index: i, parentIndex: i, innerIndex: Number(rows[rows.length - 1].getAttribute('data-vl-design-element')) };
1307
+ }
1308
+ const list = document.getElementById(this.listId());
1309
+ if (!list)
1310
+ return empty;
1311
+ const rows = this.rowsOf(list);
1312
+ if (!rows.length)
1313
+ return empty;
1314
+ for (const row of rows) {
1315
+ const rect = row.getBoundingClientRect();
1316
+ if (this.inside(rect, x, y))
1317
+ return { type: dropTypeAt(rect, x, y), index: Number(row.getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
1318
+ }
1319
+ if (y < rows[0].getBoundingClientRect().top)
1320
+ return { type: 'before', index: Number(rows[0].getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
1321
+ return { type: 'after', index: Number(rows[rows.length - 1].getAttribute('data-vl-design-element')), parentIndex: null, innerIndex: null };
1322
+ }
1323
+ setHint(next) {
1324
+ const h = this.hint;
1325
+ if (h && h.type === next.type && h.index === next.index && h.parentIndex === next.parentIndex && h.innerIndex === next.innerIndex)
1326
+ return;
1327
+ this.hint = next;
1328
+ }
1329
+ entered() {
1330
+ this.dragging = true;
1331
+ if (!this.hint)
1332
+ this.hint = { type: 'empty', index: null, parentIndex: null, innerIndex: null };
1333
+ }
1334
+ pointerMove(event) {
1335
+ if (!this.dragging)
1336
+ return;
1337
+ this.setHint(this.spotAt(event.clientX, event.clientY));
1338
+ }
1339
+ exited() {
1340
+ if (this.dragging && !this.moving)
1341
+ this.hint = null;
1342
+ }
1343
+ dragStarted() {
1344
+ this.host.deselect();
1345
+ this.dragging = true;
1346
+ this.moving = true;
1347
+ }
1348
+ dragMoved(event) {
1349
+ const pointer = event.pointerPosition;
1350
+ if (pointer)
1351
+ this.setHint(this.spotAt(pointer.x, pointer.y));
1352
+ }
1353
+ dragEnded() {
1354
+ setTimeout(() => {
1355
+ this.clear();
1356
+ this.host.refresh();
1357
+ });
1358
+ }
1359
+ clear() {
1360
+ this.hint = null;
1361
+ this.dragging = false;
1362
+ this.moving = false;
1363
+ }
1364
+ /** An empty card list (parentIndex null) or an empty horizontal layout under the pointer. */
1365
+ isEmptyHint(parentIndex) {
1366
+ return this.hint?.type === 'empty' && (this.hint.parentIndex ?? null) === parentIndex;
1367
+ }
1368
+ /** The element the hint is drawn at: a card element (parentIndex null) or an element of a horizontal layout. */
1369
+ isTargetHint(index, parentIndex) {
1370
+ const h = this.hint;
1371
+ if (!h || h.type === 'empty')
1372
+ return false;
1373
+ return parentIndex === null ? h.parentIndex === null && h.index === index : h.parentIndex === parentIndex && h.innerIndex === index;
1374
+ }
1375
+ hintText(texts) {
1376
+ switch (this.hint?.type) {
1377
+ case 'before': return texts.placeAbove;
1378
+ case 'after': return texts.placeBelow;
1379
+ case 'left': return texts.placeLeft;
1380
+ case 'right': return texts.placeRight;
1381
+ default: return texts.dropCardItem;
1382
+ }
1383
+ }
1384
+ // ---- the drop and the actions ----
1385
+ dropped(event, buttonCaption) {
1386
+ const point = event.dropPoint;
1387
+ const spot = this.hint ?? (point ? this.spotAt(point.x, point.y) : { type: 'empty', index: null, parentIndex: null, innerIndex: null });
1388
+ const data = event.item?.data;
1389
+ const layout = this.host.layout();
1390
+ this.clear();
1391
+ if (isPropertyDrop(data)) {
1392
+ this.host.apply(dropCardProperty(layout, data, spot, buttonCaption));
1393
+ }
1394
+ else if (data?.vlDesign === 'cardElement') {
1395
+ this.host.apply(moveCardElement(layout, { index: data.index, parentIndex: data.parentIndex }, spot));
1396
+ }
1397
+ }
1398
+ addButton(index, parentIndex, caption) {
1399
+ this.host.apply(addCardButton(this.host.layout(), { index, parentIndex }, caption));
1400
+ }
1401
+ remove(index, parentIndex) {
1402
+ this.host.deselect();
1403
+ this.host.apply(removeCardElement(this.host.layout(), { index, parentIndex }));
1404
+ }
1405
+ edit(index, parentIndex) {
1406
+ this.host.select({ kind: 'element', index, parentIndex });
1407
+ }
1408
+ }
1409
+
1410
+ // Shuaib 2026-10-26
1411
+ // - new: sample records for card and grid in design mode - one value per field of the layout, by the type of its
1412
+ // data object's property; moved here from the Designer's card and grid (#166)
1413
+ /** The fields a layout shows (card elements, inner elements of a horizontal layout, grid columns). */
1414
+ function fieldsOf(nodes) {
1415
+ const fields = [];
1416
+ const visit = (node) => {
1417
+ if (!node || typeof node !== 'object')
1418
+ return;
1419
+ if (Array.isArray(node.elements) && !node.scope?.reference) {
1420
+ node.elements.forEach(visit);
1421
+ return;
1422
+ }
1423
+ if (typeof node.scope?.reference === 'string')
1424
+ fields.push(node);
1425
+ };
1426
+ (nodes || []).forEach(visit);
1427
+ return fields;
1428
+ }
1429
+ function propertyOf(reference, propertySchema) {
1430
+ const parts = reference.replace(/^#\//, '').split('/');
1431
+ return propertySchema?.[parts[0]]?.[parts[parts.length - 1]];
1432
+ }
1433
+ function dayFromToday(index) {
1434
+ const date = new Date();
1435
+ date.setHours(9, 0, 0, 0);
1436
+ date.setDate(date.getDate() + index);
1437
+ return date;
1438
+ }
1439
+ /** A sample value of a property for record number index (0, 1, …). */
1440
+ function sampleValue(type, name, index, node, image) {
1441
+ const t = String(type || 'string').toLowerCase();
1442
+ switch (t) {
1443
+ case 'number':
1444
+ case 'integer':
1445
+ case 'bigdecimal':
1446
+ case 'currency':
1447
+ case 'quantity':
1448
+ return (index + 1) * 10;
1449
+ case 'boolean':
1450
+ case 'checkbox':
1451
+ return index % 2 === 0;
1452
+ case 'date':
1453
+ case 'time':
1454
+ case 'datetime':
1455
+ case 'date&time':
1456
+ case 'date-time':
1457
+ return dayFromToday(index).toISOString();
1458
+ case 'daterange':
1459
+ return [dayFromToday(index).toISOString(), dayFromToday(index + 2).toISOString()];
1460
+ case 'media':
1461
+ return node?.option?.src || image || '';
1462
+ case 'array':
1463
+ return [];
1464
+ case 'object':
1465
+ return {};
1466
+ case 'string':
1467
+ return `${name} ${index + 1}`;
1468
+ default:
1469
+ return `${name}_${index + 1}`;
1470
+ }
1471
+ }
1472
+ /**
1473
+ * count sample records for the fields of the layout nodes: each field gets a value of its property's type, a
1474
+ * list field (dropdown, radio buttons) the value of its list's entry.
1475
+ */
1476
+ function sampleRecords(nodes, propertySchema, count, image) {
1477
+ const fields = fieldsOf(nodes);
1478
+ return Array.from({ length: Math.max(0, count) }, (_, index) => {
1479
+ const record = {};
1480
+ for (const field of fields) {
1481
+ const reference = field.scope.reference;
1482
+ const name = reference.split('/').pop() || '';
1483
+ const property = propertyOf(reference, propertySchema);
1484
+ const list = Array.isArray(property?.enum) ? property.enum : null;
1485
+ const entry = list?.length ? list[index % list.length] : undefined;
1486
+ record[name] = list?.length
1487
+ ? (entry && typeof entry === 'object' ? entry.value ?? entry.key ?? entry.label : entry)
1488
+ : sampleValue(property?.type, name, index, field, image);
1489
+ }
1490
+ return record;
1491
+ });
1492
+ }
1493
+
1494
+ // Shuaib 2026-10-26
1495
+ // - new: <vl-design-bar> - the handles of an element in design mode (drag, add, edit, delete) and <vl-drop-marker>
1496
+ // - where a dragged element would land; one look in every container (#166)
1497
+ const ICONS = { drag: 'pi pi-bars', add: 'pi pi-plus', edit: 'pi pi-pencil', delete: 'pi pi-trash' };
1498
+ /**
1499
+ * The handles of one element. "drag" is the cdkDragHandle of the element it stands in; the others report their
1500
+ * action (act) without the click reaching the element.
1501
+ */
1502
+ class DesignBarComponent {
1503
+ actions = [];
1504
+ /** the tooltip of each handle */
1505
+ titles = {};
1506
+ act = new EventEmitter();
1507
+ icon(action) {
1508
+ return ICONS[action];
1509
+ }
1510
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DesignBarComponent, isStandalone: true, selector: "vl-design-bar", inputs: { actions: "actions", titles: "titles" }, outputs: { act: "act" }, ngImport: i0, template: `
1512
+ @for (action of actions; track action) {
1513
+ @if (action === 'drag') {
1514
+ <button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
1515
+ [attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
1516
+ (click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
1517
+ } @else {
1518
+ <button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
1519
+ [attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
1520
+ (mousedown)="$event.stopPropagation()"
1521
+ (click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
1522
+ }
1523
+ }`, isInline: true, styles: [":host{display:inline-flex;gap:4px;align-items:center}.vl-design-bar__btn{width:26px;height:26px;min-width:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:6px;background:#fff;color:#344054;font-size:12px;cursor:pointer;box-shadow:0 1px 2px #10182814}.vl-design-bar__btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}.vl-design-bar__btn--danger:hover{border-color:#dc2626;color:#dc2626;background:#fef2f2}.vl-design-bar__btn--drag{cursor:grab}.vl-design-bar__btn--drag:active{cursor:grabbing}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1524
+ }
1525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, decorators: [{
1526
+ type: Component,
1527
+ args: [{ selector: 'vl-design-bar', standalone: true, imports: [DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
1528
+ @for (action of actions; track action) {
1529
+ @if (action === 'drag') {
1530
+ <button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
1531
+ [attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
1532
+ (click)="$event.stopPropagation(); $event.preventDefault()"><i [class]="icon(action)"></i></button>
1533
+ } @else {
1534
+ <button type="button" class="vl-design-bar__btn" [class.vl-design-bar__btn--danger]="action === 'delete'"
1535
+ [attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
1536
+ (mousedown)="$event.stopPropagation()"
1537
+ (click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
1538
+ }
1539
+ }`, styles: [":host{display:inline-flex;gap:4px;align-items:center}.vl-design-bar__btn{width:26px;height:26px;min-width:26px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:6px;background:#fff;color:#344054;font-size:12px;cursor:pointer;box-shadow:0 1px 2px #10182814}.vl-design-bar__btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}.vl-design-bar__btn--danger:hover{border-color:#dc2626;color:#dc2626;background:#fef2f2}.vl-design-bar__btn--drag{cursor:grab}.vl-design-bar__btn--drag:active{cursor:grabbing}\n"] }]
1540
+ }], propDecorators: { actions: [{
1541
+ type: Input
1542
+ }], titles: [{
1543
+ type: Input
1544
+ }], act: [{
1545
+ type: Output
1546
+ }] } });
1547
+ /** Where a dragged element lands: a line above, below, left or right of an element, or a box in an empty place. */
1548
+ class DropMarkerComponent {
1549
+ type = 'empty';
1550
+ text = '';
1551
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DropMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1552
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: DropMarkerComponent, isStandalone: true, selector: "vl-drop-marker", inputs: { type: "type", text: "text" }, ngImport: i0, template: `
1553
+ @if (type === 'empty') {
1554
+ <div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
1555
+ } @else {
1556
+ <div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
1557
+ }`, isInline: true, styles: [":host{display:contents}.vl-drop-marker__box{grid-column:1 / -1;min-height:56px;display:flex;gap:8px;align-items:center;justify-content:center;border:2px dashed #2563eb;border-radius:8px;background:#2563eb0f;color:#1d4ed8;font-size:13px;font-weight:600;pointer-events:none}.vl-drop-marker__line{position:absolute;z-index:30;background:#2563eb;border-radius:3px;pointer-events:none}.vl-drop-marker__line span{position:absolute;white-space:nowrap;background:#2563eb;color:#fff;font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px}.vl-drop-marker__line--before{left:0;right:0;top:-3px;height:4px}.vl-drop-marker__line--after{left:0;right:0;bottom:-3px;height:4px}.vl-drop-marker__line--left{top:0;bottom:0;left:-3px;width:4px}.vl-drop-marker__line--right{top:0;bottom:0;right:-3px;width:4px}.vl-drop-marker__line--before span,.vl-drop-marker__line--after span{left:50%;transform:translate(-50%,-50%);top:50%}.vl-drop-marker__line--left span{left:8px;top:50%;transform:translateY(-50%)}.vl-drop-marker__line--right span{right:8px;top:50%;transform:translateY(-50%)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1558
+ }
1559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DropMarkerComponent, decorators: [{
1560
+ type: Component,
1561
+ args: [{ selector: 'vl-drop-marker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
1562
+ @if (type === 'empty') {
1563
+ <div class="vl-drop-marker__box"><i class="pi pi-plus-circle"></i><span>{{ text }}</span></div>
1564
+ } @else {
1565
+ <div [class]="'vl-drop-marker__line vl-drop-marker__line--' + type"><span>{{ text }}</span></div>
1566
+ }`, styles: [":host{display:contents}.vl-drop-marker__box{grid-column:1 / -1;min-height:56px;display:flex;gap:8px;align-items:center;justify-content:center;border:2px dashed #2563eb;border-radius:8px;background:#2563eb0f;color:#1d4ed8;font-size:13px;font-weight:600;pointer-events:none}.vl-drop-marker__line{position:absolute;z-index:30;background:#2563eb;border-radius:3px;pointer-events:none}.vl-drop-marker__line span{position:absolute;white-space:nowrap;background:#2563eb;color:#fff;font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px}.vl-drop-marker__line--before{left:0;right:0;top:-3px;height:4px}.vl-drop-marker__line--after{left:0;right:0;bottom:-3px;height:4px}.vl-drop-marker__line--left{top:0;bottom:0;left:-3px;width:4px}.vl-drop-marker__line--right{top:0;bottom:0;right:-3px;width:4px}.vl-drop-marker__line--before span,.vl-drop-marker__line--after span{left:50%;transform:translate(-50%,-50%);top:50%}.vl-drop-marker__line--left span{left:8px;top:50%;transform:translateY(-50%)}.vl-drop-marker__line--right span{right:8px;top:50%;transform:translateY(-50%)}\n"] }]
1567
+ }], propDecorators: { type: [{
1568
+ type: Input
1569
+ }], text: [{
1570
+ type: Input
1571
+ }] } });
1572
+
1573
+ // Shuaib 2026-10-26
1574
+ // - new: withAppPagination - a page's area as card and grid read it, for an app with app settings: the page bar's
1575
+ // values from the page, else from Main, else the default (paginationFor of the catalog). The same rule as the
1576
+ // app's own (viewdefinition app.ts withAppPagination), here so the Designer's canvas shows the bar the app shows
1577
+ /** The page's area (center) with the page bar it is shown with; unchanged without app settings or without a bar. */
1578
+ function withAppPagination(mainCenter, center) {
1579
+ if (!mainCenter?.appSettings || !center?.pagination)
1580
+ return center;
1581
+ const effective = paginationFor({ center: mainCenter }, { center });
1582
+ const justify = { left: 'flex-start', center: 'center', right: 'flex-end', split: 'space-between' };
1583
+ return {
1584
+ ...center,
1585
+ pagination: {
1586
+ ...center.pagination,
1587
+ visible: effective.visible,
1588
+ top: effective.placement === 'top',
1589
+ bottom: effective.placement === 'bottom',
1590
+ pageSize: effective.pageSize,
1591
+ defaultPageSize: effective.defaultPageSize,
1592
+ pageSizeOptions: effective.pageSizeOptions,
1593
+ caption: effective.caption,
1594
+ style: { ...(center.pagination.style ?? {}), 'justify-content': justify[effective.align] ?? 'center' },
1595
+ },
1596
+ };
1597
+ }
1598
+
569
1599
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
570
1600
  // - new: vlRules - a field's validation rules, only from its layout (field/field-model.ts
571
1601
  // fieldRules: required, email, minLength, maxLength, pattern, minimum, maximum). Pure: computed
@@ -6691,7 +7721,7 @@ class PaginationComponent {
6691
7721
  this.onGoToPage.emit(page);
6692
7722
  }
6693
7723
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PaginationComponent, deps: [{ token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Component });
6694
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: PaginationComponent, isStandalone: true, selector: "vl-pagination", inputs: { itemInfo: "itemInfo", pageSize: "pageSize", currentPage: "currentPage", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { pageSizeChange: "pageSizeChange", onGoToPage: "onGoToPage" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: the page items carry classes (vl-page, --active, --disabled, --step) so the app's style.css can style them;\r\n the size choice offers the size in use too (sizeOptions) - it showed empty when the backend paged by 6 -->\r\n<div [ngStyle]=\"paginationStyle\" [class]=\"paginationClasses\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\" class=\"vl-page\" [class.vl-page--active]=\"page === currentPage\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\" class=\"vl-page vl-page--summary\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"let size of sizeOptions()\" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>", styles: [":host{display:block;width:100%;min-width:0;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: 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.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 }] });
7724
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: PaginationComponent, isStandalone: true, selector: "vl-pagination", inputs: { itemInfo: "itemInfo", pageSize: "pageSize", currentPage: "currentPage", selectedLanguageInfo: "selectedLanguageInfo", pages: "pages" }, outputs: { pageSizeChange: "pageSizeChange", onGoToPage: "onGoToPage" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: the page items carry classes (vl-page, --active, --disabled, --step) so the app's style.css can style them;\r\n the size choice offers the size in use too (sizeOptions) - it showed empty when the backend paged by 6 -->\r\n<div [ngStyle]=\"paginationStyle\" [class]=\"paginationClasses\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === 0\">\r\n \u00AB\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\" class=\"vl-page\" [class.vl-page--active]=\"page === currentPage\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === pages.length - 1)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"currentPage === pages.length - 1\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\u00AB\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isFirstPage\">\r\n \u00AB\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\" class=\"vl-page vl-page--summary\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\" class=\"vl-page vl-page--step\" [class.vl-page--disabled]=\"isLastPage\">\r\n \u00BB\u00BB\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"let size of sizeOptions()\" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>", styles: [":host{display:block;width:100%;min-width:0;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PlatformModule }] });
6695
7725
  }
6696
7726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PaginationComponent, decorators: [{
6697
7727
  type: Component,
@@ -7095,6 +8125,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7095
8125
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
7096
8126
  // - fix: a card row with classes gets no display/width on the element - the class decides (it could never win)
7097
8127
  // - fix: classNames / getStyleWithoutClasses give every class of a style, not only the first (a text gave its first letter)
8128
+ // Shuaib 2026-10-26
8129
+ // - new: design mode (input design, output designChange): the Designer's canvas draws its card page with this
8130
+ // container - sample records (sampleRecords), the page bar as the app shows it (withAppPagination), every element
8131
+ // of the first card with drag, add, edit and delete (CardDesigner), the page header's buttons with edit and
8132
+ // delete; no translation, data or backend list. The device of the Designer's switch decides the cards per row
8133
+ // (deviceMode) (#166)
7098
8134
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
7099
8135
  // - change: a data object holds names and types only - the media caption comes from the layout
7100
8136
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
@@ -7257,6 +8293,39 @@ class CardComponent {
7257
8293
  onPageChange = new EventEmitter();
7258
8294
  paginationMode = 'server';
7259
8295
  paginationLoading = false;
8296
+ /** The Designer's canvas: sample records, every element with drag, edit and delete, nothing loaded (design/design.ts). */
8297
+ design = null;
8298
+ /** What was chosen or changed on the Designer's canvas. */
8299
+ designChange = new EventEmitter();
8300
+ /** The texts of the design handles. */
8301
+ dt = designTexts(null);
8302
+ /** How many sample cards the canvas shows (Add card / Delete card). */
8303
+ designCount = 1;
8304
+ /** The page of sample cards the canvas shows. */
8305
+ designPage = 0;
8306
+ designPageSize = 5;
8307
+ /** The sample records, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
8308
+ designAll = [];
8309
+ designInfo = null;
8310
+ designPages = [];
8311
+ /** Drag and drop of the card's elements in design mode. */
8312
+ designer = new CardDesigner({
8313
+ layout: () => this.itemInfo?.layoutSchema,
8314
+ apply: next => {
8315
+ this.itemInfo.layoutSchema = next;
8316
+ this.refreshDesign();
8317
+ this.designChange.emit({ type: 'layout', layoutSchema: next });
8318
+ },
8319
+ select: target => this.designChange.emit({ type: 'select', target }),
8320
+ deselect: () => {
8321
+ if (this.design?.selected)
8322
+ this.designChange.emit({ type: 'deselect' });
8323
+ },
8324
+ refresh: () => this.cdr.markForCheck(),
8325
+ });
8326
+ /** The device the Designer shows the page on. */
8327
+ get designMobile() { return this.design?.device === 'mobile'; }
8328
+ get designTablet() { return this.design?.device === 'tablet'; }
7260
8329
  scrollPaginationSentinel;
7261
8330
  scrollObserver;
7262
8331
  requestedScrollPage = null;
@@ -7287,6 +8356,15 @@ class CardComponent {
7287
8356
  /** The layout this card wrote last (translated) - any other is a new page's layout. */
7288
8357
  translatedLayout = null;
7289
8358
  ngOnChanges(changes) {
8359
+ if (this.design) {
8360
+ // the canvas shows the layout as written with sample records: no translation, no data, no backend list
8361
+ this.dt = designTexts(this.design);
8362
+ if (changes['design'] && !changes['design'].previousValue && this.design.sampleCount)
8363
+ this.designCount = Math.max(1, this.design.sampleCount);
8364
+ this.updateDeviceMode();
8365
+ this.refreshDesign();
8366
+ return;
8367
+ }
7290
8368
  // Backend lists of fields with option.autocomplete (any data type, any control).
7291
8369
  if (changes['itemInfo'] && this.itemInfo) {
7292
8370
  void this.loadRemoteLists([this.itemInfo.layoutSchema, this.itemInfo.header], this.itemInfo.propertySchema);
@@ -7413,6 +8491,96 @@ class CardComponent {
7413
8491
  ngAfterViewInit() {
7414
8492
  this.setupScrollObserver();
7415
8493
  }
8494
+ // ---- design mode ----
8495
+ /** The sample records, the page bar and its pages of the canvas, from the layout as it is now. */
8496
+ refreshDesign() {
8497
+ const layout = this.itemInfo?.layoutSchema || {};
8498
+ const center = withAppPagination(this.design?.main?.center, layout);
8499
+ const bar = center?.pagination || {};
8500
+ this.designPageSize = Number(bar.defaultPageSize) || Number(bar.pageSize) || 5;
8501
+ const samples = sampleRecords(layout.cards || [], this.itemInfo?.propertySchema, layout.cards?.length ? this.designCount : 0, this.design?.sampleImage);
8502
+ // the same records while they stay the same: a click on an element does not draw every card anew
8503
+ if (JSON.stringify(samples) !== JSON.stringify(this.designAll))
8504
+ this.designAll = samples;
8505
+ this.designPages = Array.from({ length: Math.ceil(this.designAll.length / this.designPageSize) }, (_, i) => i);
8506
+ if (this.designPage > this.designPages.length - 1)
8507
+ this.designPage = 0;
8508
+ this.designInfo = { ...this.itemInfo, layoutSchema: center, data: this.designAll };
8509
+ }
8510
+ /** The sample cards of the page shown, the first one with the handles - the same list while nothing changed. */
8511
+ get designRecords() {
8512
+ if (!this.designInfo?.layoutSchema?.pagination?.visible)
8513
+ return this.designAll;
8514
+ const memo = this.recordsMemo;
8515
+ if (memo && memo.all === this.designAll && memo.page === this.designPage && memo.size === this.designPageSize)
8516
+ return memo.records;
8517
+ const start = this.designPage * this.designPageSize;
8518
+ this.recordsMemo = { all: this.designAll, page: this.designPage, size: this.designPageSize, records: this.designAll.slice(start, start + this.designPageSize) };
8519
+ return this.recordsMemo.records;
8520
+ }
8521
+ recordsMemo = null;
8522
+ isSelected(target) {
8523
+ return isTarget(this.design?.selected, target);
8524
+ }
8525
+ /** A card element hidden in the app (the card shows an element only with option.visible). */
8526
+ hiddenInApp(element) {
8527
+ return !element?.option?.visible;
8528
+ }
8529
+ /**
8530
+ * The card's own handles: a button for the page header, the settings of the card layout. The header belongs to
8531
+ * the whole page: its changes are told to the Designer (type header), which keeps and hands it back.
8532
+ */
8533
+ containerAction(action) {
8534
+ if (action === 'edit') {
8535
+ this.designChange.emit({ type: 'select', target: { kind: 'container' } });
8536
+ }
8537
+ else if (action === 'add') {
8538
+ const added = headerButton();
8539
+ const header = cloneLayout(this.itemInfo?.header || { style: {}, elements: [] });
8540
+ header.elements = [...(header.elements || []), added];
8541
+ this.designChange.emit({ type: 'header', header, added });
8542
+ }
8543
+ }
8544
+ headerAction(action) {
8545
+ if (action === 'edit') {
8546
+ this.designChange.emit({ type: 'select', target: { kind: 'header' } });
8547
+ }
8548
+ else if (action === 'delete') {
8549
+ if (this.design?.selected)
8550
+ this.designChange.emit({ type: 'deselect' });
8551
+ this.designChange.emit({ type: 'header', header: clearHeader(this.itemInfo?.header) });
8552
+ }
8553
+ }
8554
+ headerElementAction(action, index) {
8555
+ if (action === 'edit') {
8556
+ this.designChange.emit({ type: 'select', target: { kind: 'headerElement', index } });
8557
+ }
8558
+ else if (action === 'delete') {
8559
+ if (this.design?.selected)
8560
+ this.designChange.emit({ type: 'deselect' });
8561
+ this.designChange.emit({ type: 'header', header: removeHeaderElement(this.itemInfo?.header, index) });
8562
+ }
8563
+ }
8564
+ elementAction(action, index, parentIndex) {
8565
+ if (action === 'add')
8566
+ this.designer.addButton(index, parentIndex, this.dt.button);
8567
+ else if (action === 'edit')
8568
+ this.designer.edit(index, parentIndex);
8569
+ else if (action === 'delete')
8570
+ this.designer.remove(index, parentIndex);
8571
+ }
8572
+ /** Add card / Delete card: more or fewer sample cards, the layout stays. */
8573
+ cardAction(action) {
8574
+ if (action === 'add')
8575
+ this.designCount++;
8576
+ else if (action === 'delete' && this.designCount > 1)
8577
+ this.designCount--;
8578
+ this.refreshDesign();
8579
+ }
8580
+ designGoToPage(page) {
8581
+ if (page >= 0 && page < this.designPages.length)
8582
+ this.designPage = page;
8583
+ }
7416
8584
  getRecordIndex(record) {
7417
8585
  if (!Array.isArray(this.itemInfo?.data)) {
7418
8586
  return -1;
@@ -7420,6 +8588,11 @@ class CardComponent {
7420
8588
  return this.itemInfo.data.indexOf(record);
7421
8589
  }
7422
8590
  updateDeviceMode() {
8591
+ // the Designer's canvas shows the device of its switch, whatever the size of the Designer's window
8592
+ if (this.design?.device) {
8593
+ this.deviceMode = this.design.device;
8594
+ return;
8595
+ }
7423
8596
  if (typeof window === 'undefined') {
7424
8597
  this.deviceMode = this.mobileDisplay ? 'mobile' : 'desktop';
7425
8598
  return;
@@ -7813,8 +8986,8 @@ class CardComponent {
7813
8986
  const property = reference ? propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() ?? ''] : null;
7814
8987
  return resolveCustomKeyboardType(field?.option, property);
7815
8988
  }
7816
- 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 });
7817
- 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-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- 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 !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [attr.data-vl-path]=\"vlFieldPath(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"classNames(element.label?.style)\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"classNames(element?.scope?.style) || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </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]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.caption || '')\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n\r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"(element.option?.customDisplayFormat || 'yyyy-MM-dd')\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- 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"] }] });
8989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, deps: [{ token: UtilityService }, { token: i1$2.Platform }, { token: i1$1.HttpClient }, { token: ConfigService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i5$1.NzModalService }, { token: NotificationService }, { token: i7.OAuthService }, { token: RequestService }], target: i0.ɵɵFactoryTarget.Component });
8990
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CardComponent, isStandalone: true, selector: "vl-card", inputs: { itemInfo: "itemInfo", pageData: "pageData", currentPage: "currentPage", pageSize: "pageSize", selectedLanguageInfo: "selectedLanguageInfo", mobileDisplay: "mobileDisplay", scrollPagination: "scrollPagination", pages: "pages", paginationMode: "paginationMode", paginationLoading: "paginationLoading", design: "design" }, outputs: { cardButtonClick: "cardButtonClick", cardHeaderButtonClick: "cardHeaderButtonClick", linkDetails: "linkDetails", imageDetails: "imageDetails", onPageSizeChange: "onPageSizeChange", onPageChange: "onPageChange", designChange: "designChange" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollPaginationSentinel", first: true, predicate: ["scrollPaginationSentinel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21\r\n - change: the loader also shows while the page's PageData loads or sends (A4)\r\n - fix: a grid page draws no card area - an empty gap stood between filter fields and table -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n @if (design) {\r\n <!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n <div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- Loader Spinner -->\r\n \r\n <div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n </div>\r\n <div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [attr.data-vl-path]=\"vlFieldPath(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n \r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n </div>\r\n }\r\n <!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n <ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-template>\r\n <!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n <ng-template #headerElement let-element=\"element\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n \r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n \r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"classNames(element.label?.style)\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n \r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"classNames(element?.scope?.style) || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n \r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n <ng-template #cardBody let-record=\"record\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- the card page's footer -->\r\n <ng-template #cardFooter>\r\n <div [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n \r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.caption || '')\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n \r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"(element.option?.customDisplayFormat || 'yyyy-MM-dd')\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n </ng-template>\r\n ", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-grid-item>div{margin-left:auto;margin-right:auto}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "component", type: DateTimeControl, selector: "vl-datetime", inputs: ["field", "target", "property", "kind", "value", "readonly", "keyboard", "saveTried", "errorMessages", "translations", "inputStyle", "inputClass"], outputs: ["changed", "opened"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i14.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i15.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzInline", "nzAllowClear", "nzAutoFocus", "nzDisabled", "nzInputReadOnly", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: PaginationComponent, selector: "vl-pagination", inputs: ["itemInfo", "pageSize", "currentPage", "selectedLanguageInfo", "pages"], outputs: ["pageSizeChange", "onGoToPage"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i16.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: String$1, selector: "vl-string", inputs: ["formField", "modalItemInfo"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }] });
7818
8991
  }
7819
8992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, decorators: [{
7820
8993
  type: Component,
@@ -7830,8 +9003,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7830
9003
  PaginationComponent,
7831
9004
  MatTooltipModule,
7832
9005
  String$1,
7833
- ], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- 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 !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [attr.data-vl-path]=\"vlFieldPath(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"classNames(element.label?.style)\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"classNames(element?.scope?.style) || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </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]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.caption || '')\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n\r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"(element.option?.customDisplayFormat || 'yyyy-MM-dd')\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- 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"] }]
7834
- }], ctorParameters: () => [{ type: UtilityService }, { type: i1$2.Platform }, { type: i1$1.HttpClient }, { type: ConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i5.NzModalService }, { type: NotificationService }, { type: i7.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
9006
+ DragDropModule,
9007
+ DesignBarComponent,
9008
+ DropMarkerComponent,
9009
+ ], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - fix: the page bar above the cards is hidden while the list pages by scrolling, like the one below (luv2shop\r\n Mouse pad showed \"2 / 5\" while scrolling) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its card page here - the same header, cards, elements,\r\n footer and page bar as the app, with sample records and drag, add, edit and delete around each element\r\n - change: the header's button, one card and the footer stand in templates (headerElement, cardBody,\r\n cardFooter) that the app and the canvas share; the app draws the same as before -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21\r\n - change: the loader also shows while the page's PageData loads or sends (A4)\r\n - fix: a grid page draws no card area - an empty gap stood between filter fields and table -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the card's fields (top level and in a horizontal layout) show the record's value through the\r\n shared <vl-control> in display mode instead of four switch blocks over types and controls (#166)\r\n - change: every field shows its value read only - a combobox, autocomplete or drop-down in a card was\r\n an input writing into the property schema; a text, date or time that was not locked showed only\r\n its label; an autocomplete showed only with a currency format; the period showed nothing\r\n - change: the value is styled by scope.style only (it was on the wrapper and on the value) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: locked fields through the read-only building blocks (password as dots, radio text, the\r\n record's tick), numbers with their label (#166, tests F8-F11)\r\n - fix: a text field (textInput) that is not locked shows its value; only the label showed (#166)\r\n - new: a value with date and time is shown with its time (cardDateKind) (#166 E5)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the date filter is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - new: spinner/slider shown with vl-number instead of \"not Implemented yet\" (#166 step 4.4)\r\n - new: radiobutton shown with vl-radio (caption of the chosen value) (#166 step 4.4)\r\n - new: switch shown with vl-switch (locked, caption) instead of \"not supported\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea shown with vl-textarea (line breaks kept) instead of \"not supported\" (#166 step 4.4)\r\n - new: password shown with vl-password (dots, eye) instead of \"not supported\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract the card's fields are drawn by <vl-control mode=\"display\"> (controls/control.ts): every\r\n type shows the record's value read only, the period (dateRange) included. Header and footer keep\r\n their own blocks (date filter, buttons). -->\r\n\r\n @if (design) {\r\n <!-- design mode (the Designer's canvas): the page header, the cards with sample records, the footer and the page bar\r\n as the app shows them. The first card carries the handles: every element - hidden ones faded - with drag, add,\r\n edit and delete; a data object's field dropped on it becomes an element. A click on an element opens its\r\n settings -->\r\n <div class=\"vl-card-runtime vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['add', 'edit']\" [titles]=\"{ add: dt.addHeaderButton, edit: dt.editLayout }\"\r\n (act)=\"containerAction($event)\"></vl-design-bar>\r\n </div>\r\n @if (designInfo?.layoutSchema?.pagination?.visible && designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n @if (itemInfo?.header?.elements?.length) {\r\n <div [ngStyle]=\"getHeaderStyle()\" [class]=\"'vl-d-item ' + getStyleWithoutClasses(itemInfo?.header?.style).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'header' })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeader, delete: dt.clearHeader }\" (act)=\"headerAction($event)\"></vl-design-bar>\r\n @for (element of itemInfo.header.elements; track $index; let c = $index) {\r\n <div [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"'vl-d-item ' + getStyleWithoutClasses(element?.wrapperStyle).classes\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'headerElement', index: c })\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['edit', 'delete']\"\r\n [titles]=\"{ edit: dt.editHeaderButton, delete: dt.deleteHeaderButton }\"\r\n (act)=\"headerElementAction($event, c)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(element)\" (click)=\"headerElementAction('edit', c)\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n @if (itemInfo?.layoutSchema?.container !== 'grid') {\r\n @if (!itemInfo?.layoutSchema?.cards?.length) {\r\n <div class=\"vl-d-empty vl-d-card-empty\" [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else {\r\n <div>\r\n <i class=\"pi pi-clone vl-d-card-empty__icon\"></i>\r\n <div class=\"vl-d-card-empty__title\">{{ dt.emptyCardTitle }}</div>\r\n <div>{{ dt.emptyCardText }}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.style).classes\">\r\n @for (record of designRecords; track $index; let k = $index) {\r\n <div class=\"card-grid-item vl-d-item\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"designAll.length > 1 ? ['add', 'delete'] : ['add']\"\r\n [titles]=\"{ add: dt.addCard, delete: dt.deleteCard }\" (act)=\"cardAction($event)\"></vl-design-bar>\r\n @if (k === 0 && designPage === 0) {\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\"\r\n [id]=\"designer.listId()\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"itemInfo.layoutSchema.cards\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(null)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (layout of itemInfo.layoutSchema.cards; track $index; let li = $index) {\r\n <div [attr.data-vl-design-element]=\"li\"\r\n [ngStyle]=\"layout?.type === 'HorizontalLayout' ? {} : getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"'card-layout-item vl-d-item ' + (layout?.type === 'HorizontalLayout' ? '' : getStyleWithoutClasses(layout?.style).classes)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: li, parentIndex: null })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(li, null)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(li, null)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, li, null)\"></vl-design-bar>\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div [class]=\"'card-horizontal-layout ' + getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\"\r\n [id]=\"designer.innerListId(li)\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"layout.elements || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event)\" (cdkDropListEntered)=\"designer.entered()\"\r\n (cdkDropListExited)=\"designer.exited()\" (cdkDropListDropped)=\"designer.dropped($event, dt.button)\">\r\n @if (designer.isEmptyHint(li)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n @for (inner of layout.elements || []; track $index; let ii = $index) {\r\n <div class=\"vl-d-item\" [attr.data-vl-design-element]=\"ii\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'element', index: ii, parentIndex: li })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(ii, li)\"\r\n (cdkDragStarted)=\"designer.dragStarted()\" (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(ii, li)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['add', 'edit', 'delete']\"\r\n [titles]=\"{ add: dt.addButton, edit: dt.edit, delete: dt.delete }\"\r\n (act)=\"elementAction($event, ii, li)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(inner)\" (click)=\"designer.edit(ii, li)\">\r\n @if (hiddenInApp(inner)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: inner, record: record, inner: true }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"hiddenInApp(layout)\" (click)=\"designer.edit(li, null)\">\r\n @if (hiddenInApp(layout)) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- the other sample cards are drawn like the app's -->\r\n <div class=\"vl-d-body\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n @if (itemInfo?.footer?.elements && designAll.length) {\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n }\r\n @if (designAll.length && designInfo?.layoutSchema?.pagination?.visible && !designInfo?.layoutSchema?.pagination?.top) {\r\n <div class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"designInfo\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"designPageSize\" [currentPage]=\"designPage\" [pages]=\"designPages\"\r\n (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <!-- Loader Spinner -->\r\n \r\n <div *ngIf=\"isLoading || pageData?.loading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n </div>\r\n <div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [attr.data-vl-field]=\"vlFieldKey(element)\"\r\n [attr.data-vl-path]=\"vlFieldPath(element)\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container *ngTemplateOutlet=\"headerElement; context: { element: element }\"></ng-container>\r\n </div>\r\n </div>\r\n <!-- a grid page (container grid): the card draws only the header, the app shows vl-grid below (A4) -->\r\n <div *ngIf=\"itemInfo?.layoutSchema?.container !== 'grid'\" class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\">\r\n <ng-container *ngTemplateOutlet=\"cardBody; context: { record: record }\"></ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\">\r\n <ng-container *ngTemplateOutlet=\"cardFooter\"></ng-container>\r\n </ng-container>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n \r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n </div>\r\n }\r\n <!-- one element of a card: a field shows the record's value through the shared <vl-control> in display\r\n mode; an element without a property is a button. A field the layout does not mark visible is hidden -->\r\n <ng-template #cardElement let-element=\"element\" let-record=\"record\" let-inner=\"inner\">\r\n @if (element?.scope?.reference) {\r\n <div [ngClass]=\"[element?.option?.visible ? 'card-field-wrapper' : 'hidden', inner ? getStyleWithoutClasses(element?.style).classes : '']\"\r\n [ngStyle]=\"inner ? getStyleWithoutClasses(element?.style).style : {}\">\r\n <vl-control mode=\"display\" [field]=\"element\" [record]=\"record\"\r\n [propertySchema]=\"itemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[element.scope.reference]\"\r\n (linkClicked)=\"showLinkDetails(element.option, record)\"\r\n (mediaClicked)=\"showImageDetails(element.option, record)\">\r\n </vl-control>\r\n </div>\r\n } @else if (inner) {\r\n <div>\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"getHorizontalLayoutTooltip(element)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option?.visible ? element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes : 'hidden'\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <span class=\"schema-btn-content\">\r\n <i *ngIf=\"showButtonIcon(element)\" nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n <span *ngIf=\"showButtonCaption(element)\">{{ element.caption }}</span>\r\n <span *ngIf=\"!showButtonIcon(element) && !showButtonCaption(element)\">Button</span>\r\n </span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div [class]=\"element.option?.visible ? 'row' : 'hidden'\">\r\n <button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element?.style).classes\"\r\n (click)=\"invokeButtonClick(element, record, getRecordIndex(record))\">\r\n <ng-container *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>{{ element.caption }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-template>\r\n <!-- a button or date filter of the page header the card shows (the app and the Designer's canvas) -->\r\n <ng-template #headerElement let-element=\"element\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n \r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n \r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"classNames(element.label?.style)\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n \r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"classNames(element?.style)\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n <vl-datetime kind=\"date\" [field]=\"element\" [target]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]\"\r\n [keyboard]=\"keyboardTypeFor(element, itemInfo.propertySchema)\"\r\n [inputClass]=\"classNames(element?.scope?.style) || ''\" [inputStyle]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n (changed)=\"dateChangeEvent(element, $event)\"></vl-datetime>\r\n </div>\r\n </div>\r\n \r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\" [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <!-- one card: its elements, a horizontal layout's side by side (the app and the canvas' other sample cards) -->\r\n <ng-template #cardBody let-record=\"record\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n @if (!layout?.scope?.reference && layout?.type === 'HorizontalLayout') {\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(layout?.style).classes\"\r\n [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: innerLayout, record: record, inner: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"cardElement; context: { element: layout, record: record, inner: false }\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- the card page's footer -->\r\n <ng-template #cardFooter>\r\n <div [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n \r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">\r\n <h5>{{\r\n (element.label?.value || element.label?.caption || '')\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"classNames(element?.label?.style)\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n (element.label?.value || element.label?.caption || '')\r\n }}</label>\r\n \r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"(element.option?.customDisplayFormat || 'yyyy-MM-dd')\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button [attr.data-vl-action]=\"vlAction(element?.option)\" [attr.data-vl-writes]=\"vlWrites(element?.option)\"\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n </ng-template>\r\n ", styles: [":host{display:block;width:100%;min-width:0}.vl-card-runtime{min-width:0;box-sizing:border-box}.card-responsive-grid{width:100%;min-width:0;box-sizing:border-box}.scroll-pagination-sentinel{width:100%;height:1px}.card-grid-item,.card-layout-item,.card-horizontal-layout,.card-field-wrapper{width:100%;min-width:0;box-sizing:border-box}.card-grid-item>div{margin-left:auto;margin-right:auto}.card-field-wrapper{overflow-wrap:anywhere}.card-field-wrapper p,.card-field-wrapper h3{margin:0;min-width:0}.card-layout-item img{display:block;max-width:100%;height:auto}.card-layout-item button{max-width:100%;box-sizing:border-box}.schema-btn-content{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0}.hidden{display:none!important}.card-pagination-wrapper{width:100%;min-width:0;box-sizing:border-box;padding:0 10px}.vl-d-body.vl-d-hidden .hidden{display:revert!important}.vl-d-card-empty{min-height:160px;flex-direction:column;gap:4px}.vl-d-card-empty__icon{font-size:28px;color:#94a3b8;margin-bottom:6px}.vl-d-card-empty__title{font-weight:600;color:#334155}.card-grid-item.vl-d-item{padding-top:4px}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
9010
+ }], ctorParameters: () => [{ type: UtilityService }, { type: i1$2.Platform }, { type: i1$1.HttpClient }, { type: ConfigService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i5$1.NzModalService }, { type: NotificationService }, { type: i7.OAuthService }, { type: RequestService }], propDecorators: { itemInfo: [{
7835
9011
  type: Input
7836
9012
  }], pageData: [{
7837
9013
  type: Input
@@ -7863,6 +9039,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7863
9039
  type: Input
7864
9040
  }], paginationLoading: [{
7865
9041
  type: Input
9042
+ }], design: [{
9043
+ type: Input
9044
+ }], designChange: [{
9045
+ type: Output
9046
+ }], designMobile: [{
9047
+ type: HostBinding,
9048
+ args: ['class.vl-design-mobile']
9049
+ }], designTablet: [{
9050
+ type: HostBinding,
9051
+ args: ['class.vl-design-tablet']
7866
9052
  }], scrollPaginationSentinel: [{
7867
9053
  type: ViewChild,
7868
9054
  args: ['scrollPaginationSentinel']
@@ -7895,6 +9081,179 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
7895
9081
  }]
7896
9082
  }] });
7897
9083
 
9084
+ // Shuaib 2026-10-26
9085
+ // - new: SectionDesigner - drag and drop of a page with sections in design mode, shared by vl-form and vl-model:
9086
+ // the drop hint under the pointer (above, below, beside a field, or into an empty section), the drop itself
9087
+ // (a field moved or a data object's field added) and the section and field actions (#166)
9088
+ let designerCount = 0;
9089
+ class SectionDesigner {
9090
+ kind;
9091
+ host;
9092
+ /** where a drop would land now; null while nothing is dragged over the container */
9093
+ hint = null;
9094
+ dragging = false;
9095
+ dragged = null;
9096
+ /** the ids of this container's drop lists start with it (several containers may be on one page) */
9097
+ prefix = `vl-design-${++designerCount}-`;
9098
+ constructor(kind, host) {
9099
+ this.kind = kind;
9100
+ this.host = host;
9101
+ }
9102
+ listId(sectionIndex) {
9103
+ return `${this.prefix}${sectionIndex}`;
9104
+ }
9105
+ /** Every section list of the container, so a field can go from one section to another. */
9106
+ listIds() {
9107
+ const count = this.host.layout()?.formSections?.length ?? 0;
9108
+ return Array.from({ length: count }, (_, i) => this.listId(i));
9109
+ }
9110
+ sectionOf(id) {
9111
+ if (!id?.startsWith(this.prefix))
9112
+ return null;
9113
+ const index = Number(id.slice(this.prefix.length));
9114
+ return Number.isInteger(index) ? index : null;
9115
+ }
9116
+ dragData(sectionIndex, fieldIndex) {
9117
+ return { vlDesign: 'field', sectionIndex, fieldIndex };
9118
+ }
9119
+ // ---- the hint under the pointer ----
9120
+ /** The drop spot at a point of a section: on a field, above the first, below the last, or into the empty section. */
9121
+ spotAt(x, y, sectionIndex) {
9122
+ const empty = { sectionIndex, type: 'empty', targetIndex: null };
9123
+ const list = typeof document === 'undefined' ? null : document.getElementById(this.listId(sectionIndex));
9124
+ if (!list)
9125
+ return empty;
9126
+ const rows = Array.from(list.querySelectorAll('[data-vl-design-field]'))
9127
+ .filter(row => !row.classList.contains('cdk-drag-placeholder') && row.closest('[data-vl-design-list]') === list);
9128
+ if (!rows.length)
9129
+ return empty;
9130
+ const indexOf = (row) => Number(row.getAttribute('data-vl-design-field'));
9131
+ for (const row of rows) {
9132
+ const rect = row.getBoundingClientRect();
9133
+ if (rect.width <= 0 || rect.height <= 0)
9134
+ continue;
9135
+ if (x < rect.left || x > rect.right || y < rect.top || y > rect.bottom)
9136
+ continue;
9137
+ return { sectionIndex, type: dropTypeAt(rect, x, y), targetIndex: indexOf(row) };
9138
+ }
9139
+ if (y < rows[0].getBoundingClientRect().top)
9140
+ return { sectionIndex, type: 'before', targetIndex: indexOf(rows[0]) };
9141
+ return { sectionIndex, type: 'after', targetIndex: indexOf(rows[rows.length - 1]) };
9142
+ }
9143
+ setHint(next) {
9144
+ const h = this.hint;
9145
+ if (h && h.sectionIndex === next.sectionIndex && h.type === next.type && h.targetIndex === next.targetIndex)
9146
+ return;
9147
+ this.hint = next;
9148
+ }
9149
+ /** A drag came over a section (a field of this container or a data object's field). */
9150
+ entered(sectionIndex) {
9151
+ this.dragging = true;
9152
+ if (!this.hint)
9153
+ this.hint = { sectionIndex, type: 'empty', targetIndex: null };
9154
+ }
9155
+ /** The pointer moves over a section while something is dragged over it. */
9156
+ pointerMove(event, sectionIndex) {
9157
+ if (!this.dragging)
9158
+ return;
9159
+ this.setHint(this.spotAt(event.clientX, event.clientY, sectionIndex));
9160
+ }
9161
+ exited() {
9162
+ if (this.dragging && !this.dragged)
9163
+ this.hint = null;
9164
+ }
9165
+ /** A section is dragged to another place: its settings close, no field hint is shown. */
9166
+ sectionDragStarted() {
9167
+ this.host.deselect();
9168
+ }
9169
+ dragStarted(sectionIndex, fieldIndex) {
9170
+ this.host.deselect();
9171
+ this.dragging = true;
9172
+ this.dragged = { sectionIndex, fieldIndex };
9173
+ this.hint = { sectionIndex, type: 'empty', targetIndex: null };
9174
+ }
9175
+ /** A field of this container moves: the section under the pointer decides. */
9176
+ dragMoved(event) {
9177
+ const pointer = event.pointerPosition;
9178
+ if (!pointer || typeof document === 'undefined')
9179
+ return;
9180
+ const list = document.elementFromPoint(pointer.x, pointer.y)?.closest('[data-vl-design-list]');
9181
+ const section = list ? this.sectionOf(list.id) : null;
9182
+ if (section === null)
9183
+ return;
9184
+ this.setHint(this.spotAt(pointer.x, pointer.y, section));
9185
+ }
9186
+ dragEnded() {
9187
+ setTimeout(() => {
9188
+ this.clear();
9189
+ this.host.refresh();
9190
+ });
9191
+ }
9192
+ clear() {
9193
+ this.hint = null;
9194
+ this.dragging = false;
9195
+ this.dragged = null;
9196
+ }
9197
+ isEmptyHint(sectionIndex) {
9198
+ return this.hint?.sectionIndex === sectionIndex && this.hint.type === 'empty';
9199
+ }
9200
+ isTargetHint(sectionIndex, fieldIndex) {
9201
+ return this.hint?.sectionIndex === sectionIndex && this.hint.targetIndex === fieldIndex && this.hint.type !== 'empty';
9202
+ }
9203
+ hintText(texts) {
9204
+ switch (this.hint?.type) {
9205
+ case 'before': return texts.placeAbove;
9206
+ case 'after': return texts.placeBelow;
9207
+ case 'left': return texts.placeLeft;
9208
+ case 'right': return texts.placeRight;
9209
+ default: return texts.dropHere;
9210
+ }
9211
+ }
9212
+ // ---- the drop ----
9213
+ dropped(event, sectionIndex) {
9214
+ const point = event.dropPoint;
9215
+ const spot = this.hint && this.hint.sectionIndex === sectionIndex
9216
+ ? this.hint
9217
+ : point ? this.spotAt(point.x, point.y, sectionIndex) : { sectionIndex, type: 'empty', targetIndex: null };
9218
+ const data = event.item?.data;
9219
+ const layout = this.host.layout();
9220
+ this.clear();
9221
+ if (isPropertyDrop(data)) {
9222
+ this.host.apply(dropProperty(layout, data, spot, this.kind));
9223
+ }
9224
+ else if (data?.vlDesign === 'field') {
9225
+ this.host.apply(moveField(layout, { sectionIndex: data.sectionIndex, fieldIndex: data.fieldIndex }, spot, this.kind));
9226
+ }
9227
+ }
9228
+ // ---- the actions ----
9229
+ /** The sections were reordered (from and to: places in the layout). */
9230
+ sectionMoved(from, to) {
9231
+ this.host.deselect();
9232
+ if (from !== to)
9233
+ this.host.apply(moveSection(this.host.layout(), from, to));
9234
+ }
9235
+ removeField(sectionIndex, fieldIndex) {
9236
+ this.host.deselect();
9237
+ this.host.apply(removeField(this.host.layout(), sectionIndex, fieldIndex, this.kind));
9238
+ }
9239
+ removeSection(sectionIndex) {
9240
+ this.host.deselect();
9241
+ this.host.apply(removeSection(this.host.layout(), sectionIndex, this.kind));
9242
+ }
9243
+ addSection() {
9244
+ this.host.apply(addSection(this.host.layout(), this.kind));
9245
+ }
9246
+ addButton(sectionIndex, caption) {
9247
+ this.host.apply(addButton(this.host.layout(), sectionIndex, this.kind, caption));
9248
+ }
9249
+ editSection(sectionIndex) {
9250
+ this.host.select({ kind: 'section', sectionIndex });
9251
+ }
9252
+ editField(sectionIndex, fieldIndex, part) {
9253
+ this.host.select({ kind: 'field', sectionIndex, fieldIndex, ...(part ? { part } : {}) });
9254
+ }
9255
+ }
9256
+
7898
9257
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
7899
9258
  // - new: tabletGridSpan - a section's width on a tablet (768-1023px); without it the desktop width counts
7900
9259
  // - new: the layout of a form's sections (user decision 2026-10-24, checkout): gridSpan - a section is 1..12 of the
@@ -8037,6 +9396,10 @@ function lockHint(option, reason, translations) {
8037
9396
 
8038
9397
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
8039
9398
  // - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
9399
+ // Shuaib 2026-10-26
9400
+ // - new: design mode (input design, output designChange): the Designer's canvas draws its form with this container -
9401
+ // every section (conditional ones marked) and field with drag, edit and delete (SectionDesigner), no translation
9402
+ // and no backend list; sectionStickyOf / sectionIndexOf / sectionDropped for the canvas (#166)
8040
9403
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
8041
9404
  // - new: sectionTabletSpanOf / stickyTabletSpan - the widths on a tablet (tabletGridSpan)
8042
9405
  // - new: sectionSpanOf / sectionStickyOf / sectionShown - the layout of the sections (field/section-layout.ts)
@@ -8171,8 +9534,39 @@ class FormComponent {
8171
9534
  checkBoxChangeEvent = new EventEmitter();
8172
9535
  /** the hint of a button locked for a missing sign-in was clicked: the app starts its sign-in */
8173
9536
  signIn = new EventEmitter();
9537
+ /** The Designer's canvas: every section and field with drag, edit and delete, nothing loaded (design/design.ts). */
9538
+ design = null;
9539
+ /** What was chosen or changed on the Designer's canvas. */
9540
+ designChange = new EventEmitter();
9541
+ /** The texts of the design handles. */
9542
+ dt = designTexts(null);
9543
+ /** Drag and drop of the sections and fields in design mode. */
9544
+ designer = new SectionDesigner('form', {
9545
+ layout: () => this.form?.layoutSchema,
9546
+ apply: next => {
9547
+ this.form.layoutSchema = next;
9548
+ this.designChange.emit({ type: 'layout', layoutSchema: next });
9549
+ },
9550
+ select: target => this.designChange.emit({ type: 'select', target }),
9551
+ deselect: () => {
9552
+ if (this.design?.selected)
9553
+ this.designChange.emit({ type: 'deselect' });
9554
+ },
9555
+ refresh: () => this.cdr.markForCheck(),
9556
+ });
9557
+ cdr = inject(ChangeDetectorRef);
9558
+ /** The device the Designer shows the page on: the form follows it like the app follows the window. */
9559
+ get designMobile() { return this.design?.device === 'mobile'; }
9560
+ get designTablet() { return this.design?.device === 'tablet'; }
8174
9561
  ngOnInit() { }
8175
9562
  ngOnChanges(changes) {
9563
+ if (this.design) {
9564
+ // the canvas shows the layout as written: no translation, no backend list
9565
+ this.dt = designTexts(this.design);
9566
+ if (changes['form'] && this.form?.layoutSchema)
9567
+ normalizeSections(this.form.layoutSchema, 'form');
9568
+ return;
9569
+ }
8176
9570
  // Backend lists of fields with option.autocomplete (any data type, any control).
8177
9571
  if (changes['form'] && this.form) {
8178
9572
  void this.loadRemoteLists([this.form.layoutSchema], this.form.propertySchema);
@@ -8315,6 +9709,39 @@ class FormComponent {
8315
9709
  const spans = this.sectionsIn(true).map(s => s?.gridSpan ? sectionSpan(s) : 0).filter(Boolean);
8316
9710
  return spans.length ? Math.max(...spans) : 4;
8317
9711
  }
9712
+ /** A section that stays in view while the page scrolls (layout sticky). */
9713
+ sectionStickyOf(formSection) {
9714
+ return sectionSticky(formSection);
9715
+ }
9716
+ /** A section's place in the layout (the canvas shows the sticky ones after the others). */
9717
+ sectionIndexOf(formSection) {
9718
+ return (this.form?.layoutSchema?.formSections || []).indexOf(formSection);
9719
+ }
9720
+ // ---- design mode ----
9721
+ /** Whether the element's settings are open in the Designer (it is marked). */
9722
+ isSelected(target) {
9723
+ return isTarget(this.design?.selected, target);
9724
+ }
9725
+ /** A section dropped at another place of the canvas: the canvas shows the sticky ones last, the layout keeps its order. */
9726
+ sectionDropped(event) {
9727
+ const sections = this.form?.layoutSchema?.formSections || [];
9728
+ const shown = [...this.sectionsIn(false), ...this.sectionsIn(true)];
9729
+ this.designer.sectionMoved(sections.indexOf(event.item.data), sections.indexOf(shown[event.currentIndex]));
9730
+ }
9731
+ sectionAction(action, sectionIndex) {
9732
+ if (action === 'add')
9733
+ this.designer.addButton(sectionIndex, this.dt.button);
9734
+ else if (action === 'edit')
9735
+ this.designer.editSection(sectionIndex);
9736
+ else if (action === 'delete')
9737
+ this.designer.removeSection(sectionIndex);
9738
+ }
9739
+ fieldAction(action, sectionIndex, fieldIndex) {
9740
+ if (action === 'edit')
9741
+ this.designer.editField(sectionIndex, fieldIndex);
9742
+ else if (action === 'delete')
9743
+ this.designer.removeField(sectionIndex, fieldIndex);
9744
+ }
8318
9745
  /** A section with visibleWhen is shown only while its field holds the value. */
8319
9746
  sectionShown(formSection) {
8320
9747
  return sectionVisible(formSection, this.form?.propertySchema);
@@ -8505,11 +9932,11 @@ class FormComponent {
8505
9932
  return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
8506
9933
  }
8507
9934
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8508
- 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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n", 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" }] });
9935
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: FormComponent, isStandalone: true, selector: "vl-form", inputs: { errorMessages: "errorMessages", creditCardError: "creditCardError", form: "form", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", design: "design" }, outputs: { formButtonClick: "formButtonClick", checkBoxChangeEvent: "checkBoxChangeEvent", signIn: "signIn", designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\r\n over types and controls in this template - the same building block as the dialog (#166)\r\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\r\n and drop-down put scope.style around label and input); all classes of a style count\r\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\r\n password, text area, media were still editable; a protected field shows label and value -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\r\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - change: the text field is the one vl-textbox (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\r\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\r\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\r\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\r\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection?.label?.caption || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\r\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
8509
9936
  }
8510
9937
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, decorators: [{
8511
9938
  type: Component,
8512
- 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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n", 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"] }]
9939
+ args: [{ standalone: true, imports: [CommonModule, FormsModule, VisiblePipe, ControlComponent, DragDropModule, DesignBarComponent, DropMarkerComponent], selector: 'vl-form', template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its form here - the same section cards, widths, sticky\r\n column, field wrappers and <vl-control> as the app, with drag, edit and delete around each element; the app's\r\n markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: sections side by side (gridSpan), the sticky ones as one column at the right, visibleWhen\r\n - change: lockHints (every reason, the missing fields as links), goToField; space under the last section\r\n - new: a locked button shows its hint, a click shows the missing fields (showMissing), the hint of a missing\r\n sign-in asks the app to sign in (signIn)\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (field-row--locked) - the blue\r\n of the field style stayed around the grey button\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> (controls/control.ts) instead of the switch\r\n over types and controls in this template - the same building block as the dialog (#166)\r\n - change: scope.style is the input of every control (the drop-down took the field's style, check box\r\n and drop-down put scope.style around label and input); all classes of a style count\r\n - change: option.protected makes every control read only - check box, switch, radio, drop-down,\r\n password, text area, media were still editable; a protected field shows label and value -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) -\r\n numbers and the period showed no label; a text field's control dropdown/switch/checkbox is used (#166, tests F2-F4)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - change: the text field is the one vl-textbox (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) (#166 step 4.4)\r\n - new: a Boolean with control switch uses vl-switch (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea instead of a one-line field (#166 step 4.4)\r\n - change: password with vl-password, the same field and eye as in dialog and card (#166 step 4.4)\r\n - change: validation rules only from the layout (vlRules: required, email, min/max length, pattern,\r\n minimum/maximum), messages via fieldMessage; number fields checked too (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n@if (design) {\r\n<!-- design mode (the Designer's canvas): every section in the layout's widths, the sticky ones as the column at the\r\n right, a conditional one marked; every field - hidden ones faded - with drag, edit and delete. A field is\r\n drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"form-renderer vl-d-root\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form (submit)=\"$event.preventDefault()\" cdkDropList cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"form?.layoutSchema?.formSections || []\"\r\n [cdkDropListDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n (cdkDropListDropped)=\"sectionDropped($event)\">\r\n <ng-template #designSection let-formSection let-si=\"index\">\r\n <div class=\"section-card vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [cdkDragDisabled]=\"(form?.layoutSchema?.formSections?.length || 0) <= 1\"\r\n [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\"\r\n [class.vl-d-section--sticky]=\"sectionStickyOf(formSection)\"\r\n [class.vl-d-section--conditional]=\"!!formSection?.visibleWhen\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"section-header vl-d-section-head\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection?.label?.caption || dt.section + ' ' + (si + 1) }}\r\n </div>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n\r\n <div class=\"section-body\" [id]=\"designer.listId(si)\" data-vl-design-list\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div class=\"field-row vl-d-item\" [attr.data-vl-design-field]=\"fi\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"form\" buttonType=\"button\"\r\n [creditCardError]=\"creditCardError\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngTemplateOutlet=\"designSection; context: { $implicit: formSection, index: sectionIndexOf(formSection) }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form #formRef=\"ngForm\" *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <!-- the sections stand in the form's 12 columns, gridSpan wide; the sticky ones together form a column at the\r\n right that stays in view (on a phone it stands at the end); visibleWhen shows a section only while its\r\n field holds the value (a hidden section's fields do not count) -->\r\n <ng-template #sectionTpl let-formSection>\r\n <div class=\"section-card\" [style.--vl-section-span]=\"sectionSpanOf(formSection)\"\r\n [style.--vl-section-span-tablet]=\"sectionTabletSpanOf(formSection)\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid; label, input and button are drawn by\r\n the shared <vl-control>. The button is a submit button, so Enter in a field presses it -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"field-row\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.field-row--locked]=\"isLocked(formField, formRef)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"form.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"form\"\r\n buttonType=\"submit\"\r\n [locked]=\"isLocked(formField, formRef)\"\r\n [lockHints]=\"lockHintsOf(formField, formRef)\"\r\n (lockedClick)=\"showMissing(formRef)\"\r\n (signIn)=\"signIn.emit()\"\r\n [list]=\"remoteData[formField.scope?.reference]\"\r\n [listLoading]=\"remoteLoading[formField.scope?.reference]\"\r\n [creditCardError]=\"creditCardError\"\r\n (toggled)=\"setformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, form.propertySchema)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngFor=\"let formSection of sectionsIn(false)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <div *ngIf=\"sectionsIn(true).length\" class=\"sticky-column\" [style.--vl-section-span]=\"stickySpan()\"\r\n [style.--vl-section-span-tablet]=\"stickyTabletSpan()\"\r\n [class.sticky-column--stack-tablet]=\"stickyTabletSpan() === 12\">\r\n <ng-container *ngFor=\"let formSection of sectionsIn(true)\">\r\n <ng-container *ngIf=\"sectionShown(formSection)\">\r\n <ng-container *ngTemplateOutlet=\"sectionTpl; context: { $implicit: formSection }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.form-renderer{width:100%;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:12px}.section-card{border:1px solid #e5e7eb;border-radius:var(--radius-sm, 8px);padding:12px;margin-bottom:12px;background:#fff;box-sizing:border-box}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:600}.section-title{font-size:14px;color:#0f172a}.section-body{position:relative;width:100%;min-height:78px;box-sizing:border-box}.field-row{position:relative;min-width:0;width:100%;box-sizing:border-box}.field-row input,.field-row select,.field-row nz-select,.field-row textarea,.field-row button{max-width:100%;box-sizing:border-box}@media(max-width:768px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:span 1!important}}@media(min-width:769px)and (max-width:1024px){.section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}.field-row{grid-column:span 6!important}}:host-context(.mobile-frame) .section-body,:host-context(.device-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host-context(.mobile-frame) .field-row,:host-context(.device-mobile) .field-row{grid-column:span 1!important}:host-context(.tablet-frame) .section-body,:host-context(.device-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host-context(.tablet-frame) .field-row,:host-context(.device-tablet) .field-row{grid-column:span 6!important}.field-row--locked{background:transparent!important;box-shadow:none!important;height:auto!important}form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:16px;align-items:start;padding-bottom:32px}.section-card{grid-column:span var(--vl-section-span, 12);min-width:0}.sticky-column .section-card{grid-column:auto}.sticky-column{grid-column:span var(--vl-section-span, 4) / -1;grid-row:1 / span 40;align-self:start;position:sticky;top:12px;z-index:2;min-width:0}@media(min-width:768px)and (max-width:1023px){.section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}.sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}.sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}@media(max-width:767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}}:host(.vl-design-tablet) .section-body{grid-template-columns:repeat(6,minmax(0,1fr))!important}:host(.vl-design-tablet) .field-row{grid-column:span 6!important}:host(.vl-design-tablet) .section-card{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 12))}:host(.vl-design-tablet) .sticky-column{grid-column:span var(--vl-section-span-tablet, var(--vl-section-span, 4)) / -1}:host(.vl-design-tablet) .sticky-column.sticky-column--stack-tablet{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-mobile) .section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}:host(.vl-design-mobile) .field-row{grid-column:span 1!important}:host(.vl-design-mobile) .section-card,:host(.vl-design-mobile) .sticky-column{grid-column:1 / -1;grid-row:auto;position:static}:host(.vl-design-tablet) .sticky-column .section-card,:host(.vl-design-mobile) .sticky-column .section-card{grid-column:auto}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
8513
9940
  }], propDecorators: { errorMessages: [{
8514
9941
  type: Input
8515
9942
  }], creditCardError: [{
@@ -8526,12 +9953,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
8526
9953
  type: Output
8527
9954
  }], signIn: [{
8528
9955
  type: Output
9956
+ }], design: [{
9957
+ type: Input
9958
+ }], designChange: [{
9959
+ type: Output
9960
+ }], designMobile: [{
9961
+ type: HostBinding,
9962
+ args: ['class.vl-design-mobile']
9963
+ }], designTablet: [{
9964
+ type: HostBinding,
9965
+ args: ['class.vl-design-tablet']
8529
9966
  }] } });
8530
9967
  /** The cache key of a button's hints: its place on the page (reference or caption). */
8531
9968
  function vlLockKey(formField) {
8532
9969
  return String(formField?.scope?.reference || formField?.label?.caption || '');
8533
9970
  }
8534
9971
 
9972
+ // Shuaib 2026-10-26
9973
+ // - new: the Designer's edits of a grid page: a data object's field dropped on the grid becomes a column, columns
9974
+ // are moved, resized and deleted. Pure: every edit returns a new layout (#166)
9975
+ /** The column a data object's property becomes when it is dropped on the grid: its values, read only. */
9976
+ function columnFromProperty(drop) {
9977
+ return {
9978
+ scope: { reference: `#/${dropObjectName(drop)}/properties/${drop.name}`, style: {} },
9979
+ label: { caption: drop.name, style: {} },
9980
+ option: { sortable: false, visible: true, protected: true },
9981
+ };
9982
+ }
9983
+ function columnsOf(layout) {
9984
+ layout.elements = Array.isArray(layout.elements) ? layout.elements : [];
9985
+ return layout.elements;
9986
+ }
9987
+ /** A data object's field dropped at place index of the columns (at the end when index is out of range). */
9988
+ function dropGridProperty(layout, drop, index) {
9989
+ const next = cloneLayout(layout || {});
9990
+ const columns = columnsOf(next);
9991
+ const at = Number.isInteger(index) && index >= 0 && index <= columns.length ? index : columns.length;
9992
+ columns.splice(at, 0, columnFromProperty(drop));
9993
+ return next;
9994
+ }
9995
+ function moveColumn(layout, from, to) {
9996
+ const next = cloneLayout(layout || {});
9997
+ const columns = columnsOf(next);
9998
+ if (from < 0 || from >= columns.length || to < 0 || to >= columns.length || from === to)
9999
+ return next;
10000
+ const [column] = columns.splice(from, 1);
10001
+ columns.splice(to, 0, column);
10002
+ return next;
10003
+ }
10004
+ function removeColumn(layout, index) {
10005
+ const next = cloneLayout(layout || {});
10006
+ const columns = columnsOf(next);
10007
+ if (index >= 0 && index < columns.length)
10008
+ columns.splice(index, 1);
10009
+ return next;
10010
+ }
10011
+ /** A column's width or height (option.width / option.height, in px) as dragged on its edge. */
10012
+ function resizeColumn(layout, index, size) {
10013
+ const next = cloneLayout(layout || {});
10014
+ const column = columnsOf(next)[index];
10015
+ if (!column)
10016
+ return next;
10017
+ column.option = column.option || {};
10018
+ if (size.width !== undefined)
10019
+ column.option.width = `${Math.max(80, Math.round(size.width))}px`;
10020
+ if (size.height !== undefined)
10021
+ column.option.height = `${Math.max(40, Math.round(size.height))}px`;
10022
+ return next;
10023
+ }
10024
+ /** The settings of a column changed in the Designer's right panel. */
10025
+ function replaceColumn(layout, index, column) {
10026
+ const next = cloneLayout(layout || {});
10027
+ const columns = columnsOf(next);
10028
+ if (index >= 0 && index < columns.length)
10029
+ columns[index] = cloneLayout(column);
10030
+ return next;
10031
+ }
10032
+
8535
10033
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
8536
10034
  // - new: scrollPagination - the table's end in view asks for its next page, like the cards (a backend table showed
8537
10035
  // only its first page: luv2shop Coffee Mugs List 5 of 13)
@@ -8542,6 +10040,13 @@ function vlLockKey(formField) {
8542
10040
  // - fix: classNames / getStyleWithoutClasses give every class of a style, not only the first (a text gave its first letter)
8543
10041
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25
8544
10042
  // - change: the grid's call hands its option on - the proxy follows option.proxy / the Configuration
10043
+ // Shuaib 2026-10-26
10044
+ // - new: design mode (input design, output designChange): the Designer's canvas draws its grid page with this
10045
+ // container - sample rows, the page bar as the app shows it, every column with drag, edit, delete and resize;
10046
+ // a data object's field dropped on the column heads becomes a column (grid-edit.ts); no translation, data or
10047
+ // backend list (#166)
10048
+ // - new: the search box (layoutSchema.search), the row stripes (layoutSchema.rowStyle) and the column sizes
10049
+ // (option.width / option.height) the Designer's right panel sets - the canvas showed them, the app did not
8545
10050
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
8546
10051
  // - change: a data object holds names and types only - the media caption comes from the layout
8547
10052
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22
@@ -8580,6 +10085,7 @@ function vlLockKey(formField) {
8580
10085
  // - change: date and time cells use DateTimePickerService like the dialog
8581
10086
  // Shuaib 2026-09-24
8582
10087
  // - new: isLegacyCheckboxFieldType recognises existing checkbox fields so the grid can render them as boolean.
10088
+ let gridDesignCount = 0;
8583
10089
  class GridComponent {
8584
10090
  requestService;
8585
10091
  utilityService;
@@ -8627,14 +10133,6 @@ class GridComponent {
8627
10133
  picker = inject(DateTimePickerService);
8628
10134
  host = inject((ElementRef));
8629
10135
  cdr = inject(ChangeDetectorRef);
8630
- /**
8631
- * The style of a row's cell from its column (scope.style) - without display: the cell stays a table cell. An image's
8632
- * display: block on the cell took it out of the table and every column moved one to the left (luv2shop Coffee Mugs).
8633
- */
8634
- cellStyle(col) {
8635
- const { display, ...rest } = this.getStyleWithoutClasses(col?.scope?.style).style ?? {};
8636
- return rest;
8637
- }
8638
10136
  /** Watches the element under the table; in view (with 250px ahead) it asks for the next page. */
8639
10137
  observeEnd(el) {
8640
10138
  this.endObserver?.disconnect();
@@ -8654,6 +10152,7 @@ class GridComponent {
8654
10152
  }
8655
10153
  ngOnDestroy() {
8656
10154
  this.endObserver?.disconnect();
10155
+ this.stopResize();
8657
10156
  this.picker.closeIfWithin(this.host.nativeElement);
8658
10157
  this.sideHintObserver?.disconnect();
8659
10158
  this.host.nativeElement.removeEventListener('scroll', this.onSideScroll, true);
@@ -8715,6 +10214,22 @@ class GridComponent {
8715
10214
  /** "dialog" edit: the app opens the page's dialog with the record (like a card's showModal). */
8716
10215
  editRow = new EventEmitter();
8717
10216
  gridForm;
10217
+ /** The Designer's canvas: sample rows, every column with drag, edit, delete and resize, nothing loaded (design/design.ts). */
10218
+ design = null;
10219
+ /** What was chosen or changed on the Designer's canvas. */
10220
+ designChange = new EventEmitter();
10221
+ /** The texts of the design handles. */
10222
+ dt = designTexts(null);
10223
+ /** The sample rows, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
10224
+ designAll = [];
10225
+ designInfo = null;
10226
+ designPages = [];
10227
+ designPage = 0;
10228
+ designPageSize = 5;
10229
+ /** The drop list of the column heads (a data object's field dropped on it becomes a column). */
10230
+ designListId = `vl-grid-design-${++gridDesignCount}`;
10231
+ get designMobile() { return this.design?.device === 'mobile'; }
10232
+ get designTablet() { return this.design?.device === 'tablet'; }
8718
10233
  /** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
8719
10234
  editingRow = null;
8720
10235
  rowSchema = {};
@@ -8760,6 +10275,8 @@ class GridComponent {
8760
10275
  }
8761
10276
  ngAfterViewInit() {
8762
10277
  this.startSideHints();
10278
+ if (this.design)
10279
+ return;
8763
10280
  this.authenticating();
8764
10281
  setTimeout(() => {
8765
10282
  if (this.environment && this.environment?.login && this.environment?.login?.type == "oktaAuth") {
@@ -8772,6 +10289,12 @@ class GridComponent {
8772
10289
  }, 500);
8773
10290
  }
8774
10291
  ngOnChanges(changes) {
10292
+ if (this.design) {
10293
+ // the canvas shows the layout as written with sample rows: no translation, no data, no backend list
10294
+ this.dt = designTexts(this.design);
10295
+ this.refreshDesign();
10296
+ return;
10297
+ }
8775
10298
  // a page was added: watching anew asks again while the end is still in view (a short list loads to its end)
8776
10299
  // (also when new rows came: an early ask before the list had loaded was lost and blocked the next one)
8777
10300
  if ((changes['currentPage'] || changes['tableitemInfo'] || changes['pages']) && this.endElement) {
@@ -8823,9 +10346,166 @@ class GridComponent {
8823
10346
  }, 500);
8824
10347
  }
8825
10348
  get gridDisplayData() {
8826
- return this.filtersApplied
10349
+ return this.searched(this.filtersApplied
8827
10350
  ? this.filteredTableData
8828
- : this.tableitemInfo?.data ?? [];
10351
+ : this.tableitemInfo?.data ?? []);
10352
+ }
10353
+ // ---- the search box above the table (layoutSchema.search: visible, left / center / right, placeholder) ----
10354
+ searchText = '';
10355
+ searchMemo = null;
10356
+ get showSearch() {
10357
+ return !!this.tableitemInfo?.layoutSchema?.search?.visible;
10358
+ }
10359
+ get searchPositionClass() {
10360
+ const search = this.tableitemInfo?.layoutSchema?.search;
10361
+ return search?.center ? 'search-center' : search?.right ? 'search-right' : 'search-left';
10362
+ }
10363
+ searchPlaceholder() {
10364
+ const placeholder = this.tableitemInfo?.layoutSchema?.search?.placeholder;
10365
+ return placeholder ? this.t(placeholder) : this.t('Search');
10366
+ }
10367
+ /** The rows holding the searched text in one of their shown columns - the same list while nothing changed. */
10368
+ searched(rows) {
10369
+ const text = this.searchText.trim().toLowerCase();
10370
+ if (!text || !this.showSearch)
10371
+ return rows;
10372
+ const columns = this.tableitemInfo?.layoutSchema?.elements;
10373
+ const memo = this.searchMemo;
10374
+ if (memo && memo.rows === rows && memo.text === text && memo.columns === columns)
10375
+ return memo.result;
10376
+ const fields = visibleFields(columns).filter(c => typeof c?.scope?.reference === 'string').map(c => c.scope.reference.split('/').pop());
10377
+ const result = rows.filter(row => fields.some(f => String(row?.[f] ?? '').toLowerCase().includes(text)));
10378
+ this.searchMemo = { rows, text, columns, result };
10379
+ return result;
10380
+ }
10381
+ // ---- row stripes (layoutSchema.rowStyle: enabled, odd, even) and column sizes (option.width / height) ----
10382
+ /** The style of row number index (0, 1, …): odd and even rows as the page sets them. */
10383
+ rowStyleOf(index) {
10384
+ const rowStyle = this.tableitemInfo?.layoutSchema?.rowStyle;
10385
+ if (!rowStyle?.enabled)
10386
+ return {};
10387
+ return styleParts((index + 1) % 2 === 0 ? rowStyle.even : rowStyle.odd).style;
10388
+ }
10389
+ /** A column's width and height as the page sets them. */
10390
+ columnSize(column) {
10391
+ const option = column?.option || {};
10392
+ return {
10393
+ ...(option.width ? { width: option.width, minWidth: option.width } : {}),
10394
+ ...(option.height ? { height: option.height } : {}),
10395
+ };
10396
+ }
10397
+ /** A cell: the column's scope style, the row's stripe, the column's size. */
10398
+ cellStyle(column, index) {
10399
+ // A column or stripe must not take its cell out of the table's layout.
10400
+ const { display, ...style } = {
10401
+ ...this.getStyleWithoutClasses(column?.scope?.style).style,
10402
+ ...this.rowStyleOf(index),
10403
+ ...this.columnSize(column),
10404
+ };
10405
+ return style;
10406
+ }
10407
+ // ---- design mode ----
10408
+ /** The sample rows and the page bar of the canvas, from the layout as it is now. */
10409
+ refreshDesign() {
10410
+ const layout = this.tableitemInfo?.layoutSchema || {};
10411
+ const center = withAppPagination(this.design?.main?.center, layout);
10412
+ const bar = center?.pagination || {};
10413
+ this.designPageSize = Number(bar.defaultPageSize) || Number(bar.pageSize) || this.design?.sampleCount || 5;
10414
+ // one page of sample rows: the page's page size, else as many as the Designer asks for
10415
+ const count = layout.elements?.length ? this.designPageSize : 0;
10416
+ const samples = sampleRecords(layout.elements || [], this.tableitemInfo?.propertySchema, count, this.design?.sampleImage);
10417
+ // the same rows while they stay the same: a click on a column does not draw every row anew
10418
+ if (JSON.stringify(samples) !== JSON.stringify(this.designAll))
10419
+ this.designAll = samples;
10420
+ this.designPages = Array.from({ length: Math.ceil(this.designAll.length / this.designPageSize) }, (_, i) => i);
10421
+ if (this.designPage > this.designPages.length - 1)
10422
+ this.designPage = 0;
10423
+ this.designInfo = { ...this.tableitemInfo, layoutSchema: center, data: this.designAll };
10424
+ }
10425
+ /** The sample rows of the page shown - the same list while nothing changed (the table draws its rows anew otherwise). */
10426
+ get designRows() {
10427
+ const memo = this.rowsMemo;
10428
+ if (memo && memo.all === this.designAll && memo.page === this.designPage && memo.size === this.designPageSize)
10429
+ return memo.rows;
10430
+ const start = this.designPage * this.designPageSize;
10431
+ this.rowsMemo = { all: this.designAll, page: this.designPage, size: this.designPageSize, rows: this.designAll.slice(start, start + this.designPageSize) };
10432
+ return this.rowsMemo.rows;
10433
+ }
10434
+ rowsMemo = null;
10435
+ designGoToPage(page) {
10436
+ if (page >= 0 && page < this.designPages.length)
10437
+ this.designPage = page;
10438
+ }
10439
+ isSelected(target) {
10440
+ return isTarget(this.design?.selected, target);
10441
+ }
10442
+ applyDesign(next) {
10443
+ this.tableitemInfo.layoutSchema = next;
10444
+ this.refreshDesign();
10445
+ this.designChange.emit({ type: 'layout', layoutSchema: next });
10446
+ }
10447
+ selectGrid() {
10448
+ this.designChange.emit({ type: 'select', target: { kind: 'container' } });
10449
+ }
10450
+ columnAction(action, index) {
10451
+ if (action === 'edit') {
10452
+ this.designChange.emit({ type: 'select', target: { kind: 'column', index } });
10453
+ }
10454
+ else if (action === 'delete') {
10455
+ if (this.design?.selected)
10456
+ this.designChange.emit({ type: 'deselect' });
10457
+ this.applyDesign(removeColumn(this.tableitemInfo?.layoutSchema, index));
10458
+ }
10459
+ }
10460
+ /** A column moved along the heads, or a data object's field dropped on them (a new column at that place). */
10461
+ columnDropped(event) {
10462
+ const data = event.item?.data;
10463
+ if (isPropertyDrop(data)) {
10464
+ this.applyDesign(dropGridProperty(this.tableitemInfo?.layoutSchema, data, event.currentIndex));
10465
+ }
10466
+ else if (data?.vlDesign === 'column' && event.previousIndex !== event.currentIndex) {
10467
+ this.applyDesign(moveColumn(this.tableitemInfo?.layoutSchema, event.previousIndex, event.currentIndex));
10468
+ }
10469
+ }
10470
+ columnDragStarted() {
10471
+ if (this.design?.selected)
10472
+ this.designChange.emit({ type: 'deselect' });
10473
+ }
10474
+ resizing = null;
10475
+ /** Dragging a column head's right or lower edge sets its width or height. */
10476
+ startResize(event, index, type) {
10477
+ event.preventDefault();
10478
+ event.stopPropagation();
10479
+ const th = event.target.closest('th');
10480
+ if (!th)
10481
+ return;
10482
+ this.resizing = { index, type, x: event.clientX, y: event.clientY, width: th.offsetWidth, height: th.offsetHeight };
10483
+ document.addEventListener('mousemove', this.onResize);
10484
+ document.addEventListener('mouseup', this.endResize);
10485
+ }
10486
+ onResize = (event) => {
10487
+ const r = this.resizing;
10488
+ const column = r ? this.tableitemInfo?.layoutSchema?.elements?.[r.index] : null;
10489
+ if (!r || !column)
10490
+ return;
10491
+ 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) };
10492
+ // shown at once; saved when the mouse is let go
10493
+ column.option = { ...(column.option || {}), ...(r.size.width ? { width: `${Math.round(r.size.width)}px` } : { height: `${Math.round(r.size.height)}px` }) };
10494
+ this.cdr.markForCheck();
10495
+ };
10496
+ endResize = () => {
10497
+ const r = this.resizing;
10498
+ this.stopResize();
10499
+ if (r?.size)
10500
+ this.applyDesign(resizeColumn(this.tableitemInfo?.layoutSchema, r.index, r.size));
10501
+ this.cdr.markForCheck();
10502
+ };
10503
+ stopResize() {
10504
+ this.resizing = null;
10505
+ if (typeof document === 'undefined')
10506
+ return;
10507
+ document.removeEventListener('mousemove', this.onResize);
10508
+ document.removeEventListener('mouseup', this.endResize);
8829
10509
  }
8830
10510
  translateSchema(schema, SelectedLanguage) {
8831
10511
  if (schema && typeof schema === 'object') {
@@ -9384,7 +11064,7 @@ class GridComponent {
9384
11064
  return this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() || '']?.type ?? '';
9385
11065
  }
9386
11066
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, deps: [{ token: RequestService }, { token: UtilityService }, { token: NotificationService }, { token: i4.OktaAuthStateService }], target: i0.ɵɵFactoryTarget.Component });
9387
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", scrollPagination: "scrollPagination", userInfo: "userInfo", pageData: "pageData" }, outputs: { editRow: "editRow", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, viewQueries: [{ propertyName: "scrollSentinel", first: true, predicate: ["scrollSentinel"], descendants: true }, { propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- 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 && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- 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 [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col)\"\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]=\"classNames(col.option?.save?.style)\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"classNames(col.option?.delete?.style)\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"classNames(tableField.scope?.style) ?? ''\"></vl-number>\r\n </div>\r\n\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- scrolling: the end of the table asks for the next page -->\r\n@if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", 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" }] });
11067
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", scrollPagination: "scrollPagination", userInfo: "userInfo", pageData: "pageData", design: "design" }, outputs: { editRow: "editRow", designChange: "designChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollSentinel", first: true, predicate: ["scrollSentinel"], descendants: true }, { propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib, 2026-10-27\r\n - change: grid search takes project CSS classes from search.style / boxStyle / inputStyle / iconStyle /\r\n buttonStyle; the app and design canvas share this template. Search/filter behavior stays the same.\r\n - fix: the clear action is a keyboard-accessible button with a translated accessible name. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - change: the delete icon of a row goes through deleteRow (PageData for a browser list, A4)\r\n - new: editing as the page sets it (layoutSchema.edit.mode): \"row\" - pencil, the unlocked cells of\r\n that row become <vl-control mode=\"edit\"> (every type, checked like the dialog), \u2713 saves, \u2715 cancels;\r\n \"dialog\" - pencil opens the page's dialog with the record; without edit the grid is read only.\r\n The old inputs that wrote text, number and check box cells into the row without saving are gone\r\n - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\r\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\r\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\r\n columns stayed empty\r\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\r\n the check box of the row, action columns, buttons, the footer\r\n - change: a locked check box is shown read only; it could be ticked\r\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: the footer's number field is the one vl-number (#166 step 4.4)\r\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\r\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\r\n shared controls, cells read only and compact (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n @if (design) {\r\n <!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n <div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>&#9998;</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n </div>\r\n <div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n \r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n \r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n \r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n \r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n \r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n \r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n \r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n \r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n \r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n \r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n \r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n \r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n \r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"[searchPositionClass, classNames(tableitemInfo?.layoutSchema?.search?.style)]\">\r\n <div class=\"grid-search-box\" [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.boxStyle)\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\" aria-hidden=\"true\"\r\n [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.iconStyle)\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.inputStyle)\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <button *ngIf=\"searchText\" type=\"button\" class=\"grid-search-clear\"\r\n [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.buttonStyle)\"\r\n [attr.aria-label]=\"t('Clear search')\" (click)=\"searchText = ''\">\r\n <span nz-icon nzType=\"close-circle\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n <ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"classNames(col.option?.save?.style)\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"classNames(col.option?.delete?.style)\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n \r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </ng-template>\r\n <!-- the table's footer -->\r\n <ng-template #gridFooter>\r\n <div class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n \r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"classNames(tableField.scope?.style) ?? ''\"></vl-number>\r\n </div>\r\n \r\n </span>\r\n </div>\r\n \r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n ", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}.grid-toolbar{width:100%;display:flex}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.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" }] });
9388
11068
  }
9389
11069
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, decorators: [{
9390
11070
  type: Component,
@@ -9408,7 +11088,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
9408
11088
  NzMenuModule,
9409
11089
  PaginationComponent,
9410
11090
  CustomKeyboardDirective,
9411
- ], selector: 'vl-grid', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- 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 && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <!-- 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 [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col)\"\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]=\"classNames(col.option?.save?.style)\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"classNames(col.option?.delete?.style)\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"classNames(tableField.scope?.style) ?? ''\"></vl-number>\r\n </div>\r\n\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- scrolling: the end of the table asks for the next page -->\r\n@if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n", 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"] }]
11091
+ DragDropModule,
11092
+ DesignBarComponent,
11093
+ ], selector: 'vl-grid', template: "<!-- Shuaib, 2026-10-27\r\n - change: grid search takes project CSS classes from search.style / boxStyle / inputStyle / iconStyle /\r\n buttonStyle; the app and design canvas share this template. Search/filter behavior stays the same.\r\n - fix: the clear action is a keyboard-accessible button with a translated accessible name. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the end of the table asks for the next page when it pages by scrolling (scrollSentinel)\r\n - fix: the page bar is hidden while the table pages by scrolling, like the cards (hotel Reservations)\r\n - fix: the page bar follows pagination.visible (Show pagination off in the editor) - it showed anyway\r\n - fix: \"no records\" only once loading is done - it showed while the rows were on their way (luv2shop Orders)\r\n - fix: a cell stays a table cell (cellStyle) - display: block of an image column pushed every column one to the left -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: every class of a style is set (classNames), not only the first -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - fix: the column filter is no part of the row form (ngModelOptions standalone) - without a name Angular stopped\r\n the whole grid with NG01352 (hotel Reservations stayed empty) -->\r\n<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its grid page here - the same table, cells, footer and\r\n page bar as the app, with sample rows; columns with drag, edit, delete and resize; a data object's field\r\n dropped on the heads becomes a column\r\n - new: the search box (layoutSchema.search), row stripes (layoutSchema.rowStyle) and column sizes\r\n (option.width / option.height) the Designer sets\r\n - change: a cell and the footer stand in templates (gridCell, gridFooter) that the app and the canvas share -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - change: caption and date pattern from the layout - a data object holds names and types only -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - change: the delete icon of a row goes through deleteRow (PageData for a browser list, A4)\r\n - new: editing as the page sets it (layoutSchema.edit.mode): \"row\" - pencil, the unlocked cells of\r\n that row become <vl-control mode=\"edit\"> (every type, checked like the dialog), \u2713 saves, \u2715 cancels;\r\n \"dialog\" - pencil opens the page's dialog with the record; without edit the grid is read only.\r\n The old inputs that wrote text, number and check box cells into the row without saving are gone\r\n - fix: the table takes its style from its page (layoutSchema.style); the menu or header option's style\r\n is the style of that button - luv2shop's cart table got the cart pill's max-width 90px -->\r\n<!-- Shuaib 2026-10-20\r\n - change: the cells that show a value are drawn by the shared <vl-control> in display mode (#166):\r\n the row's value of every type, read only - date, time, drop-down, autocomplete and period cells\r\n were inputs bound to the form's property (the same value in every row); integer and bigdecimal\r\n columns stayed empty\r\n - kept: unlocked text and number cells (typed in, saved by the action column), quantity +/-, multiply,\r\n the check box of the row, action columns, buttons, the footer\r\n - change: a locked check box is shown read only; it could be ticked\r\n - fix: action icons, button and footer labels read style.classes?.[0]; a style without classes (the Designer's default {}) threw -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: date and time in one value (type datetime or control dateTimepicker): field and display (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: the footer's number field is the one vl-number (#166 step 4.4)\r\n - change: the footer's text field is the one vl-textbox (#166 step 4.4)\r\n - change: cells and footer follow the layout's control (password, textArea, switch, combobox) with the\r\n shared controls, cells read only and compact (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - change: footer fields: rules only from the layout (vlRules) and the message of the first error (#166 step 4.6)\r\n - change: fields/columns with option.visible false are left out (vlVisible, #166)\r\n - change: every input field gets the toolkit keyboard of its field/attribute (keyboardTypeFor, #166)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n @if (design) {\r\n <!-- design mode (the Designer's canvas): the table with sample rows, the search box, footer and page bar as the app\r\n shows them; every column - hidden ones faded - with drag, edit, delete and its edges to resize; a data object's\r\n field dropped on the column heads becomes a column there. A click on a head opens the column's settings -->\r\n <div class=\"reservation-container vl-d-root\">\r\n <div class=\"vl-d-container-bar\">\r\n <vl-design-bar [actions]=\"['edit']\" [titles]=\"{ edit: dt.editGrid }\" (act)=\"selectGrid()\"></vl-design-bar>\r\n </div>\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n @if (!tableitemInfo?.layoutSchema?.elements?.length) {\r\n <div class=\"vl-d-empty vl-d-grid-empty\" [id]=\"designListId\" data-vl-design-list\r\n cdkDropList [cdkDropListData]=\"[]\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n {{ dt.emptyGrid }}\r\n </div>\r\n } @else {\r\n <nz-table #designTable [nzData]=\"designRows\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\"\r\n [nzShowPagination]=\"false\" [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\">\r\n <thead>\r\n <tr [id]=\"designListId\" data-vl-design-list cdkDropList cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"tableitemInfo.layoutSchema.elements\" (cdkDropListDropped)=\"columnDropped($event)\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index; let ci = $index) {\r\n <th class=\"vl-d-th vl-d-item\" cdkDrag cdkDragLockAxis=\"x\" [cdkDragData]=\"{ vlDesign: 'column', index: ci }\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [class.vl-d-hidden]=\"column?.option?.visible === false\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'column', index: ci })\"\r\n (cdkDragStarted)=\"columnDragStarted()\" (click)=\"columnAction('edit', ci)\">\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragColumn, edit: dt.editColumn, delete: dt.deleteColumn }\"\r\n (act)=\"columnAction($event, ci)\"></vl-design-bar>\r\n @if (column?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n {{ column?.label?.caption }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>&#9998;</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n </div>\r\n <div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <ng-container *ngIf=\"showSearch\"><ng-container *ngTemplateOutlet=\"gridSearch\"></ng-container></ng-container>\r\n <!-- the controls of the row being edited join this form, so \u2713 checks them like the dialog does -->\r\n <form #gridForm=\"ngForm\" (ngSubmit)=\"saveRow()\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(tableitemInfo?.layoutSchema?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [ngStyle]=\"columnSize(column)\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \"\r\n [class.grid-cell--editing]=\"editingRow && editableCol(column)\"\r\n [class.grid-cell--wide]=\"editingRow && editableCol(column) && wideEditCell(column)\">\r\n \r\n {{ column?.label?.caption }}\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n \r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n \r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n class=\"grid-filter-cell\">\r\n \r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n \r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" vlCustomKeyboard=\"string\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n \r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n \r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n \r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n \r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n \r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n \r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n \r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: a cell shows the row's value through <vl-control mode=\"display\">\r\n reality: every type is shown (integer, bigdecimal and the credit card stayed empty before);\r\n unlocked text and number cells, quantity, multiply and the check box keep their own\r\n blocks, because they write into the row.\r\n \r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\" [ngStyle]=\"rowStyleOf(i)\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [style]=\"cellStyle(col, i)\"\r\n [class.grid-cell--editing]=\"cellEditing(col, data)\"\r\n [class.grid-cell--wide]=\"cellEditing(col, data) && wideEditCell(col)\">\r\n <!-- a column without property: action icons or a button. Unlocked text and number cells\r\n are typed in (the row is saved by the action column), a check box ticks the row; every\r\n other cell shows the row's value through the shared <vl-control> in display mode -->\r\n @if (cellEditing(col, data)) {\r\n <!-- inside the form: the controls of the row being edited join it, so \u2713 checks them -->\r\n <vl-control mode=\"edit\" [field]=\"col\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">&#10003;</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">&#10005;</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">&#9998;</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"[searchPositionClass, classNames(tableitemInfo?.layoutSchema?.search?.style)]\">\r\n <div class=\"grid-search-box\" [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.boxStyle)\">\r\n <span nz-icon nzType=\"search\" class=\"grid-search-icon\" aria-hidden=\"true\"\r\n [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.iconStyle)\"></span>\r\n <input type=\"text\" class=\"grid-search-input\" [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.inputStyle)\" vlCustomKeyboard=\"string\" [placeholder]=\"searchPlaceholder()\"\r\n [ngModel]=\"searchText\" (ngModelChange)=\"searchText = $event\" [ngModelOptions]=\"{ standalone: true }\" />\r\n <button *ngIf=\"searchText\" type=\"button\" class=\"grid-search-clear\"\r\n [ngClass]=\"classNames(tableitemInfo?.layoutSchema?.search?.buttonStyle)\"\r\n [attr.aria-label]=\"t('Clear search')\" (click)=\"searchText = ''\">\r\n <span nz-icon nzType=\"close-circle\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <!-- one cell that is not edited: action icons or a button, quantity, a product, or the row's value (the app and the\r\n canvas); the cell of the row being edited stays in the app's form above -->\r\n <ng-template #gridCell let-col=\"col\" let-data=\"data\" let-i=\"i\">\r\n @if (!col?.scope?.reference) {\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"classNames(col.option?.save?.style)\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"classNames(col.option?.delete?.style)\"\r\n (click)=\"deleteRow(col.option?.delete, data)\"></span>\r\n \r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n } @else if (cellType(col) === 'quantity') {\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n } @else if (cellType(col) === 'number' && col.option?.innerAction?.action == 'multiply') {\r\n <span>{{ (data[col.option?.innerAction?.from] * data[col.option?.innerAction?.to]) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col\" [record]=\"data\"\r\n [propertySchema]=\"tableitemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [styleValue]=\"false\" [compact]=\"true\"\r\n (linkClicked)=\"showLinkDetails(col.option, data)\"\r\n (mediaClicked)=\"invokeTableImageClick(col, data)\">\r\n </vl-control>\r\n }\r\n </ng-template>\r\n <!-- the table's footer -->\r\n <ng-template #gridFooter>\r\n <div class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\">\r\n <!-- the layout's control decides (#166 step 4.4): the shared controls, editable -->\r\n @switch (cellControl(tableField)) {\r\n @case ('password') {\r\n <vl-password [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-password>\r\n }\r\n @case ('textArea') {\r\n <vl-textarea [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-textarea>\r\n }\r\n @case ('switch') {\r\n <vl-switch [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField)\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-switch>\r\n }\r\n @case ('radiobutton') {\r\n <vl-radio [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [type]=\"propertyType(tableField) === 'boolean' ? 'boolean' : 'string'\"\r\n [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-radio>\r\n }\r\n @case ('combobox') {\r\n <vl-autocomplete [field]=\"tableField\" [target]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [combobox]=\"true\"\r\n [list]=\"remoteData[tableField.scope?.reference]\" [loading]=\"false\"\r\n [keyboard]=\"keyboardTypeFor(tableField, tableitemInfo.propertySchema)\" [saveTried]=\"false\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-autocomplete>\r\n }\r\n @default {\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n \r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n {{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-textbox [formField]=\"tableField\" [modalItemInfo]=\"tableitemInfo\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"></vl-textbox>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">\r\n <h5>{{\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }} <vl-number style=\"display:inline-block\" [field]=\"tableField\" [readonly]=\"true\" [value]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]?.value\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)]?.[tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\" [translations]=\"selectedLanguageInfo?.selectedLanguage\"></vl-number>\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"classNames(tableField?.label?.style)\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n (tableField.label?.value || tableField.label?.caption || '')\r\n }}</label>\r\n <vl-number [field]=\"tableField\" [target]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [property]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]\" [row]=\"form.propertySchema[getScope(tableField.scope?.reference)]\"\r\n [type]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type || 'number'\"\r\n [keyboard]=\"keyboardTypeFor(tableField, form.propertySchema)\" [saveTried]=\"false\"\r\n [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [translations]=\"selectedLanguageInfo?.selectedLanguage\"\r\n [inputStyle]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [inputClass]=\"classNames(tableField.scope?.style) ?? ''\"></vl-number>\r\n </div>\r\n \r\n </span>\r\n </div>\r\n \r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n ", styles: [".grid-filter-row th{padding:8px;vertical-align:middle;background:#fafafa}.grid-filter-cell{min-width:150px}.grid-filter-input-wrapper{display:flex;align-items:stretch;width:100%}.grid-filter-input{width:100%;min-width:0;min-height:34px;padding:5px 8px;border:1px solid #d9d9d9;border-right:0;border-radius:4px 0 0 4px;outline:none}.grid-filter-input:focus{border-color:#1677ff}.grid-filter-operator-button,.grid-filter-clear-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px;padding:0;cursor:pointer;background:#fff;border:1px solid #d9d9d9}.grid-filter-operator-button{color:#595959;border-radius:0 4px 4px 0}.grid-filter-operator-button:hover,.grid-filter-operator-button--active{color:#1677ff;border-color:#1677ff}.grid-filter-clear-button{margin-left:5px;color:#ff4d4f;border-radius:4px}.grid-filter-clear-button:hover{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.grid-filter-operator-menu{min-width:190px}:host ::ng-deep .ant-table-content.has-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 36px),transparent)}:host ::ng-deep .ant-table-content.has-more-left.has-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 36px),transparent)}::ng-deep :where(.grid-edit-cell){width:1%;white-space:nowrap;text-align:center}::ng-deep :where(.grid-edit-btn){min-width:32px;height:32px;margin:0 2px;border:1px solid #d1d5db;border-radius:4px;background:#fff;cursor:pointer;font-size:15px;line-height:1}::ng-deep :where(.grid-edit-btn--save){border-color:#16a34a;background:#16a34a;color:#fff}::ng-deep :where(.grid-edit-btn:disabled){opacity:.4;cursor:default}::ng-deep :where(.grid-cell--editing){min-width:160px}::ng-deep :where(.grid-cell--wide){min-width:240px}.grid-cell--editing ::ng-deep vl-control,.grid-cell--editing ::ng-deep vl-textbox input,.grid-cell--editing ::ng-deep vl-password input,.grid-cell--editing ::ng-deep vl-textarea textarea,.grid-cell--editing ::ng-deep .ant-picker,.grid-cell--editing ::ng-deep .ant-select{display:block;width:100%!important;max-width:100%;box-sizing:border-box}.grid-toolbar{width:100%;display:flex}.grid-toolbar.search-left{justify-content:flex-start}.grid-toolbar.search-center{justify-content:center}.grid-toolbar.search-right{justify-content:flex-end}.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"] }]
9412
11094
  }], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4.OktaAuthStateService }], propDecorators: { errorMessages: [{
9413
11095
  type: Input
9414
11096
  }], environment: [{
@@ -9445,6 +11127,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
9445
11127
  }], gridForm: [{
9446
11128
  type: ViewChild,
9447
11129
  args: ['gridForm']
11130
+ }], design: [{
11131
+ type: Input
11132
+ }], designChange: [{
11133
+ type: Output
11134
+ }], designMobile: [{
11135
+ type: HostBinding,
11136
+ args: ['class.vl-design-mobile']
11137
+ }], designTablet: [{
11138
+ type: HostBinding,
11139
+ args: ['class.vl-design-tablet']
9448
11140
  }], onPageChange: [{
9449
11141
  type: Output
9450
11142
  }], onPageSizeChange: [{
@@ -9654,7 +11346,7 @@ class HeaderMenuComponent {
9654
11346
  return items;
9655
11347
  }
9656
11348
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: i4.OktaAuthStateService }, { token: RequestService }, { token: UtilityService }, { token: Couchdb }, { token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Component });
9657
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: HeaderMenuComponent, isStandalone: true, selector: "vl-header-menu", inputs: { headerItems: "headerItems", headerLayout: "headerLayout", environment: "environment", tenantName: "tenantName", projectSeleted: "projectSeleted", userInfo: "userInfo", cartInfo: "cartInfo" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the cart carries data-vl-action=\"cart\" for the test runners (step cart)\r\n - change: the header is a free container (OFFENE-PUNKTE 117, user: \"any elements - why should I prescribe it to\r\n the customer\"). An element is drawn by its kind (kindOf: control image, text, button, search, cart, user,\r\n group), no longer by a fixed field name; a group holds elements of its own, so any arrangement is possible.\r\n Older headers (scope.reference logo / searchInput, control or action cart, a plain button) are read as\r\n image / search / cart / button. Every part takes its style and its classes (style.classes) - the classes\r\n were left out before, a header could not be styled from style.css -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: headerItems }\"></ng-container>\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements>\r\n <ng-container *ngFor=\"let header of elements\">\r\n @if (isShown(header)) {\r\n @switch (kindOf(header)) {\r\n\r\n <!-- Image (a logo) -->\r\n @case ('image') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <img [src]=\"header.option?.src\" [alt]=\"header.alt || header.label?.caption || ''\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n </div>\r\n }\r\n\r\n <!-- Text -->\r\n @case ('text') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n </div>\r\n }\r\n\r\n <!-- Search: field and magnifier -->\r\n @case ('search') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <input #search type=\"text\" [placeholder]=\"header.option?.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n <button *ngIf=\"header.option?.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!captionOf(header); else searchCaption\">\r\n <i nz-icon [nzType]=\"header.icon || 'search'\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #searchCaption>{{ captionOf(header) }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Cart: total, quantity, icon -->\r\n @case ('cart') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n data-vl-action=\"cart\" data-vl-writes=\"false\" (click)=\"invokeShowtableContent(header.option)\">\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n </div>\r\n }\r\n\r\n <!-- User: the signed-in name and sign out, or sign in -->\r\n @case ('user') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n @if (signedIn()) {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ userName() }}</span>\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'logout' })\" data-vl-action=\"logout\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signOutText || 'Sign out' }}\r\n </button>\r\n } @else {\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'login' })\" data-vl-action=\"login\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signInText || 'Sign in' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Group: elements of its own, side by side or as its classes say -->\r\n @case ('group') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [] }\"></ng-container>\r\n </div>\r\n }\r\n\r\n <!-- Button (a link to a page, sign in / out, any menu action) -->\r\n @default {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\" [attr.data-vl-action]=\"vlAction(header.option)\" [attr.data-vl-writes]=\"vlWrites(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n @if (header.icon) {<i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>}\r\n @if (captionOf(header)) {<span>{{ captionOf(header) }}</span>}\r\n </button>\r\n </div>\r\n }\r\n }\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: 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: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i9.CurrencyPipe, name: "currency" }] });
11349
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: HeaderMenuComponent, isStandalone: true, selector: "vl-header-menu", inputs: { headerItems: "headerItems", headerLayout: "headerLayout", environment: "environment", tenantName: "tenantName", projectSeleted: "projectSeleted", userInfo: "userInfo", cartInfo: "cartInfo" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26\r\n - new: the cart carries data-vl-action=\"cart\" for the test runners (step cart)\r\n - change: the header is a free container (OFFENE-PUNKTE 117, user: \"any elements - why should I prescribe it to\r\n the customer\"). An element is drawn by its kind (kindOf: control image, text, button, search, cart, user,\r\n group), no longer by a fixed field name; a group holds elements of its own, so any arrangement is possible.\r\n Older headers (scope.reference logo / searchInput, control or action cart, a plain button) are read as\r\n image / search / cart / button. Every part takes its style and its classes (style.classes) - the classes\r\n were left out before, a header could not be styled from style.css -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: headerItems }\"></ng-container>\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements>\r\n <ng-container *ngFor=\"let header of elements\">\r\n @if (isShown(header)) {\r\n @switch (kindOf(header)) {\r\n\r\n <!-- Image (a logo) -->\r\n @case ('image') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <img [src]=\"header.option?.src\" [alt]=\"header.alt || header.label?.caption || ''\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n </div>\r\n }\r\n\r\n <!-- Text -->\r\n @case ('text') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n </div>\r\n }\r\n\r\n <!-- Search: field and magnifier -->\r\n @case ('search') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <input #search type=\"text\" [placeholder]=\"header.option?.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n <button *ngIf=\"header.option?.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!captionOf(header); else searchCaption\">\r\n <i nz-icon [nzType]=\"header.icon || 'search'\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #searchCaption>{{ captionOf(header) }}</ng-template>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Cart: total, quantity, icon -->\r\n @case ('cart') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n data-vl-action=\"cart\" data-vl-writes=\"false\" (click)=\"invokeShowtableContent(header.option)\">\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n </div>\r\n }\r\n\r\n <!-- User: the signed-in name and sign out, or sign in -->\r\n @case ('user') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n @if (signedIn()) {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ userName() }}</span>\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'logout' })\" data-vl-action=\"logout\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signOutText || 'Sign out' }}\r\n </button>\r\n } @else {\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick({ action: 'login' })\" data-vl-action=\"login\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n {{ header.option?.signInText || 'Sign in' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Group: elements of its own, side by side or as its classes say -->\r\n @case ('group') {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [] }\"></ng-container>\r\n </div>\r\n }\r\n\r\n <!-- Button (a link to a page, sign in / out, any menu action) -->\r\n @default {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\">\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\" [attr.data-vl-action]=\"vlAction(header.option)\" [attr.data-vl-writes]=\"vlWrites(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\" [ngClass]=\"classNames(header?.buttonStyle)\">\r\n @if (header.icon) {<i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>}\r\n @if (captionOf(header)) {<span>{{ captionOf(header) }}</span>}\r\n </button>\r\n </div>\r\n }\r\n }\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }] });
9658
11350
  }
9659
11351
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
9660
11352
  type: Component,
@@ -9726,7 +11418,7 @@ class LogsComponent {
9726
11418
  this.expandedRow = this.expandedRow === index ? null : index;
9727
11419
  }
9728
11420
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: LogsComponent, deps: [{ token: NetworkLogService }], target: i0.ɵɵFactoryTarget.Component });
9729
- 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: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i9.JsonPipe, name: "json" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
11421
+ 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" }] });
9730
11422
  }
9731
11423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: LogsComponent, decorators: [{
9732
11424
  type: Component,
@@ -9737,6 +11429,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
9737
11429
 
9738
11430
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
9739
11431
  // - new: data-vl-path = the field's DTO name and key (shipping.street) - unique where a key stands in two DTOs (OFFENE-PUNKTE 114)
11432
+ // Shuaib 2026-10-26
11433
+ // - new: design mode (input design, output designChange): the Designer's canvas draws its dialog with this
11434
+ // container - every field with drag, edit and delete (SectionDesigner), no translation, record or backend list;
11435
+ // dialogRef and dialogConfig are optional (the canvas has no dialog around it) (#166)
9740
11436
  // Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
9741
11437
  // - new: lockReasonOf / lockHintOf / showMissing - the hint under a locked button, a click on it shows the missing fields
9742
11438
  // - new: isLocked - a button is grey and without click by needsLogin / needsValid of its layout
@@ -9827,16 +11523,43 @@ class ModelComponent {
9827
11523
  selectedLanguageInfo = {};
9828
11524
  userInfo = {};
9829
11525
  setFormDataHandler;
11526
+ /** The Designer's canvas: every field with drag, edit and delete, nothing loaded or sent (design/design.ts). */
11527
+ design = null;
11528
+ /** What was chosen or changed on the Designer's canvas. */
11529
+ designChange = new EventEmitter();
11530
+ /** The texts of the design handles. */
11531
+ dt = designTexts(null);
11532
+ /** Drag and drop of the sections and fields in design mode. */
11533
+ designer = new SectionDesigner('dialog', {
11534
+ layout: () => this.modalItemInfo?.layoutSchema,
11535
+ apply: next => {
11536
+ this.modalItemInfo.layoutSchema = next;
11537
+ this.designChange.emit({ type: 'layout', layoutSchema: next });
11538
+ },
11539
+ select: target => this.designChange.emit({ type: 'select', target }),
11540
+ deselect: () => {
11541
+ if (this.design?.selected)
11542
+ this.designChange.emit({ type: 'deselect' });
11543
+ },
11544
+ refresh: () => this.cdr.markForCheck(),
11545
+ });
11546
+ /** The device the Designer shows the page on: the dialog follows it like the app follows the window. */
11547
+ get designMobile() { return this.design?.device === 'mobile'; }
11548
+ get designTablet() { return this.design?.device === 'tablet'; }
9830
11549
  copyLayoutSchema = {};
9831
11550
  isLoading = false;
9832
11551
  projectLanguage = {};
9833
- constructor(cdr, dialogRef, dialogConfig, utilityService) {
11552
+ constructor(cdr,
11553
+ // none on the Designer's canvas, where the dialog stands in the page
11554
+ dialogRef, dialogConfig, utilityService) {
9834
11555
  this.cdr = cdr;
9835
11556
  this.dialogRef = dialogRef;
9836
11557
  this.dialogConfig = dialogConfig;
9837
11558
  this.utilityService = utilityService;
9838
11559
  }
9839
11560
  ngAfterViewInit() {
11561
+ if (this.design)
11562
+ return;
9840
11563
  this.projectLanguage = this.utilityService.currentProjectlanguage$.subscribe((uiLang) => {
9841
11564
  console.log('uiLang: ', uiLang);
9842
11565
  queueMicrotask(() => {
@@ -9857,6 +11580,13 @@ class ModelComponent {
9857
11580
  this.picker.closeIfWithin(this.host.nativeElement);
9858
11581
  }
9859
11582
  ngOnChanges(changes) {
11583
+ if (this.design) {
11584
+ // the canvas shows the layout as written: no translation, no record, no backend list
11585
+ this.dt = designTexts(this.design);
11586
+ if (changes['modalItemInfo'] && this.modalItemInfo?.layoutSchema)
11587
+ normalizeSections(this.modalItemInfo.layoutSchema, 'dialog');
11588
+ return;
11589
+ }
9860
11590
  if (!changes['modalItemInfo'] &&
9861
11591
  !changes['selectedLanguageInfo'] &&
9862
11592
  !changes['userInfo']) {
@@ -9886,7 +11616,8 @@ class ModelComponent {
9886
11616
  return;
9887
11617
  }
9888
11618
  const translations = this.selectedLanguageInfo?.selectedLanguage;
9889
- this.dialogConfig.header = translations?.[titleKey] ?? titleKey;
11619
+ if (this.dialogConfig)
11620
+ this.dialogConfig.header = translations?.[titleKey] ?? titleKey;
9890
11621
  }
9891
11622
  updateLayoutLanguage(schema, translations) {
9892
11623
  const cloned = JSON.parse(JSON.stringify(schema));
@@ -10184,7 +11915,7 @@ class ModelComponent {
10184
11915
  if (!valid) {
10185
11916
  return;
10186
11917
  }
10187
- this.dialogRef.close({
11918
+ this.dialogRef?.close({
10188
11919
  option,
10189
11920
  action: 'buttonClick',
10190
11921
  propertySchema,
@@ -10239,10 +11970,29 @@ class ModelComponent {
10239
11970
  return !!form.valid;
10240
11971
  }
10241
11972
  onCancel() {
10242
- this.dialogRef.close({
11973
+ this.dialogRef?.close({
10243
11974
  action: 'cancel'
10244
11975
  });
10245
11976
  }
11977
+ // ---- design mode ----
11978
+ /** Whether the element's settings are open in the Designer (it is marked). */
11979
+ isSelected(target) {
11980
+ return isTarget(this.design?.selected, target);
11981
+ }
11982
+ sectionAction(action, sectionIndex) {
11983
+ if (action === 'add')
11984
+ this.designer.addButton(sectionIndex, this.dt.button);
11985
+ else if (action === 'edit')
11986
+ this.designer.editSection(sectionIndex);
11987
+ else if (action === 'delete')
11988
+ this.designer.removeSection(sectionIndex);
11989
+ }
11990
+ fieldAction(action, sectionIndex, fieldIndex) {
11991
+ if (action === 'edit')
11992
+ this.designer.editField(sectionIndex, fieldIndex);
11993
+ else if (action === 'delete')
11994
+ this.designer.removeField(sectionIndex, fieldIndex);
11995
+ }
10246
11996
  /**
10247
11997
  * A field's message shows once the user typed in it and left it, or after a save attempt - not
10248
11998
  * when an empty field was only passed through (the message then pushed the row and its label out
@@ -10252,8 +12002,8 @@ class ModelComponent {
10252
12002
  showError(control) {
10253
12003
  return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
10254
12004
  }
10255
- 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 });
10256
- 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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", 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" }] });
12005
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.DynamicDialogRef, optional: true }, { token: i1$4.DynamicDialogConfig, optional: true }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Component });
12006
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: ModelComponent, isStandalone: true, selector: "vl-model", inputs: { errorMessages: "errorMessages", modalItemInfo: "modalItemInfo", selectedLanguageInfo: "selectedLanguageInfo", userInfo: "userInfo", setFormDataHandler: "setFormDataHandler", design: "design" }, outputs: { designChange: "designChange" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - new: class vl-dialog-field on every field - on a phone each field takes the whole width with its\r\n label above (model.component.css), whatever columns the page sets for tablet and desktop -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"vl-dialog-field\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n}\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}@media(max-width:599px){.vl-dialog-field{grid-column:1 / -1!important}.vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ControlComponent, selector: "vl-control", inputs: ["field", "propertySchema", "selectedLanguageInfo", "errorMessages", "saveTried", "container", "buttonType", "locked", "lockHints", "mode", "record", "hideLabel", "styleValue", "compact", "list", "listLoading", "creditCardError"], outputs: ["picked", "changed", "opened", "toggled", "linkClicked", "mediaClicked", "buttonClick", "lockedClick", "signIn"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: DesignBarComponent, selector: "vl-design-bar", inputs: ["actions", "titles"], outputs: ["act"] }, { kind: "component", type: DropMarkerComponent, selector: "vl-drop-marker", inputs: ["type", "text"] }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
10257
12007
  }
10258
12008
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, decorators: [{
10259
12009
  type: Component,
@@ -10262,8 +12012,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
10262
12012
  FormsModule,
10263
12013
  VisiblePipe,
10264
12014
  ControlComponent,
10265
- ], 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 [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", 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"] }]
10266
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef }, { type: i1$4.DynamicDialogConfig }, { type: UtilityService }], propDecorators: { errorMessages: [{
12015
+ DragDropModule,
12016
+ DesignBarComponent,
12017
+ DropMarkerComponent,
12018
+ ], template: "<!-- Shuaib 2026-10-26\r\n - new: design mode (design): the Designer's canvas draws its dialog here - the same sections, field wrappers and\r\n <vl-control> as the app, with drag, edit and delete around each element; the app's markup below is unchanged -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n - new: a locked button shows its hint (in a dialog without the sign-in link), a click shows the missing fields\r\n - change: the wrapper of a locked button drops the layout's colour and shadow (vl-dialog-field--locked)\r\n - new: a button is locked by needsLogin / needsValid of its layout (isLocked, field/button-lock.ts) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-22\r\n - new: class vl-dialog-field on every field - on a phone each field takes the whole width with its\r\n label above (model.component.css), whatever columns the page sets for tablet and desktop -->\r\n<!-- Shuaib 2026-10-20\r\n - change: every field is drawn by the shared <vl-control> instead of a switch over types and\r\n controls in this template (#166)\r\n - change: follows the Designer's modal layout: the field's style is its wrapper, scope.style is the\r\n input of every control (dropdown, number and period took the wrapper's style before), all classes\r\n of a style count\r\n - change: a protected field shows its label and value read only; a protected text showed only the\r\n data object's caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - fix: a text field with the control email (or any other text control) is drawn as the text field;\r\n it was not drawn at all (#166, test F6)\r\n - fix: every field label by getLabel (label.value, the layout's label.caption, then the DTO caption) (#166, test F3)\r\n - new: date and time in one field (type datetime or control dateTimepicker) with vl-datetime (#166 E5)\r\n - new: the control dateRangepicker shows the period like the type dateRange (#166 E4)\r\n - change: protected numbers and amounts are shown by vl-number (currency, percent, unit) (#166 step 4.8)\r\n - change: media fields are the one vl-media (#166 step 4.4)\r\n - change: the period is the one vl-daterange instead of nz-range-picker (#166 step 4.4)\r\n - change: every date and time picker is the one vl-datetime (#166 step 4.4)\r\n - change: every drop-down is the one vl-dropdown (#166 step 4.4)\r\n - change: check boxes with vl-checkbox (#166 step 4.4)\r\n - change: numbers with vl-number (plain, spinner, slider) (#166 step 4.4)\r\n - new: radiobutton with vl-radio (text and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: switch with vl-switch (string flag and Boolean) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: every selection list (autocomplete, combobox) is the one vl-autocomplete (#166 step 4.4)\r\n - new: combobox = the autocomplete list, values outside the list only with allowCustom (#166 step 4.4)\r\n - new: textArea with vl-textarea (rows, new-line key) instead of \"not supported yet\" (#166 step 4.4)\r\n - new: password with vl-password (hidden, eye) instead of \"not supported yet\" (#166 step 4.4)\r\n - change: placeholders from the layout first (vlPlaceholder with the field's option, #166)\r\n - new: date and time fields: input pattern, hint and display in the app language, year with four digits (vlDateFormat, vlDateHint, vlDateText - services/date-display.ts, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n@if (design) {\r\n<!-- design mode (the Designer's canvas): every field of the layout - hidden ones faded - with drag, edit and delete;\r\n a field is drawn by the same <vl-control> as below, shown and not typed in; a click opens its settings -->\r\n<div class=\"vl-d-root\" [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"'vl-d-root ' + styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form (submit)=\"$event.preventDefault()\">\r\n <div cdkDropList [cdkDropListData]=\"modalItemInfo?.layoutSchema?.formSections || []\"\r\n (cdkDropListDropped)=\"designer.sectionMoved($event.previousIndex, $event.currentIndex)\">\r\n @for (formSection of modalItemInfo?.layoutSchema?.formSections || []; track $index; let si = $index) {\r\n <div class=\"vl-d-section\" cdkDrag [cdkDragData]=\"formSection\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'section', sectionIndex: si })\"\r\n (cdkDragStarted)=\"designer.sectionDragStarted()\">\r\n <div class=\"vl-d-section-head\">\r\n <span class=\"vl-d-section-name\">{{ formSection?.label?.caption ? '' : dt.section + ' ' + (si + 1) }}</span>\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'add', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragSection, add: dt.addButton, edit: dt.editSection, delete: dt.deleteSection }\"\r\n (act)=\"sectionAction($event, si)\"></vl-design-bar>\r\n </div>\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div [id]=\"designer.listId(si)\" data-vl-design-list\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\"\r\n cdkDropList [cdkDropListData]=\"formSection.formFields || []\" [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListConnectedTo]=\"designer.listIds()\"\r\n (mousemove)=\"designer.pointerMove($event, si)\"\r\n (cdkDropListEntered)=\"designer.entered(si)\"\r\n (cdkDropListExited)=\"designer.exited()\"\r\n (cdkDropListDropped)=\"designer.dropped($event, si)\">\r\n @if (designer.isEmptyHint(si)) {\r\n <vl-drop-marker type=\"empty\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n } @else if (!formSection.formFields?.length) {\r\n <div class=\"vl-d-empty\">{{ dt.emptySection }}</div>\r\n }\r\n @for (formField of formSection.formFields || []; track $index; let fi = $index) {\r\n <div [class]=\"'vl-dialog-field vl-d-item ' + styleOf(formField?.style).classes\"\r\n [attr.data-vl-design-field]=\"fi\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class.vl-d-item--selected]=\"isSelected({ kind: 'field', sectionIndex: si, fieldIndex: fi })\"\r\n cdkDrag [cdkDragData]=\"designer.dragData(si, fi)\"\r\n (cdkDragStarted)=\"designer.dragStarted(si, fi)\"\r\n (cdkDragMoved)=\"designer.dragMoved($event)\"\r\n (cdkDragEnded)=\"designer.dragEnded()\">\r\n @if (designer.isTargetHint(si, fi)) {\r\n <vl-drop-marker [type]=\"designer.hint!.type\" [text]=\"designer.hintText(dt)\"></vl-drop-marker>\r\n }\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{ drag: dt.dragField, edit: dt.editField, delete: dt.deleteField }\"\r\n (act)=\"fieldAction($event, si, fi)\"></vl-design-bar>\r\n <div class=\"vl-d-body\" [class.vl-d-hidden]=\"formField?.option?.visible === false\"\r\n (click)=\"designer.editField(si, fi, 'input')\">\r\n @if (formField?.option?.visible === false) { <span class=\"vl-d-hidden-tag\">{{ dt.hiddenInApp }}</span> }\r\n <vl-control [field]=\"formField\" [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" container=\"dialog\"></vl-control>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n <div class=\"vl-d-add\">\r\n <button type=\"button\" class=\"vl-d-add-btn\" (click)=\"designer.addSection()\">{{ dt.addSection }}</button>\r\n </div>\r\n</div>\r\n} @else {\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [ngStyle]=\"styleOf(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"styleOf(modalItemInfo?.layoutSchema?.style).classes\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"styleOf(formSection?.label?.style).classes\"\r\n [ngStyle]=\"styleOf(formSection?.label?.style).style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"styleOf(formSection?.style).classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <!-- the field's style is its wrapper in the section grid (gridColumn \"span N\"), as in\r\n the Designer; label, input and button are drawn by <vl-control> -->\r\n <div *ngFor=\"let formField of formSection.formFields | vlVisible\" class=\"vl-dialog-field\"\r\n [attr.data-vl-field]=\"vlFieldKey(formField)\"\r\n [attr.data-vl-path]=\"vlFieldPath(formField)\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"'vl-dialog-field ' + styleOf(formField?.style).classes\"\r\n [class.vl-dialog-field--locked]=\"isLocked(formField, dynamicForm)\">\r\n <vl-control [field]=\"formField\"\r\n [propertySchema]=\"modalItemInfo.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"saveTried\"\r\n container=\"dialog\"\r\n [locked]=\"isLocked(formField, dynamicForm)\"\r\n [lockHints]=\"lockHintsOf(formField, dynamicForm)\"\r\n (lockedClick)=\"showMissing(dynamicForm)\"\r\n (picked)=\"autocompSelectEvent($event, formField)\"\r\n (changed)=\"handleRules(formField, $event)\"\r\n (opened)=\"onTimePanelShow(formField)\"\r\n (toggled)=\"invokeSetformData()\"\r\n (buttonClick)=\"invokeFormBtnClick($event, modalItemInfo.propertySchema, dynamicForm)\">\r\n </vl-control>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n}\r\n", styles: [":host ::ng-deep .custom-datepicker .p-datepicker-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-datepicker .p-datepicker-input{border-radius:4px}::ng-deep .p-autocomplete-list{background-color:#fff}:host ::ng-deep .custom-autocomplete{display:flex;width:100%}:host ::ng-deep .custom-autocomplete .p-autocomplete-input{flex:1;width:100%;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;background:transparent!important}:host ::ng-deep .custom-autocomplete .p-autocomplete-dropdown{height:100%;border-radius:4px}:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus,:host ::ng-deep .custom-autocomplete .p-autocomplete-input:focus-visible,:host ::ng-deep .custom-autocomplete .p-inputtext:enabled:focus{border:none!important;outline:none!important;box-shadow:none!important}.responsive-modal-grid{width:100%;min-width:0;box-sizing:border-box}:host{display:block;container-type:inline-size}.responsive-modal-field [style*=grid-template-columns]{align-items:start!important}.responsive-modal-field [style*=grid-template-columns]>:first-child{padding-top:10px}@container (max-width: 660px){.responsive-modal-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px!important}.responsive-modal-field{grid-column:1 / -1!important;width:100%!important;max-width:none!important;min-width:0!important}.responsive-modal-action:nth-last-child(2){grid-column:1 / span 6!important}.responsive-modal-action:last-child{grid-column:7 / span 6!important}.responsive-modal-action{width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important;box-sizing:border-box!important}.responsive-modal-action button{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}}:host{--modal-field-focus-color: var(--p-primary-color, #10b981);--modal-field-focus-shadow: 0 0 0 2px rgba(16, 185, 129, .16)}:host ::ng-deep input:not([type=checkbox]):not(:disabled):focus,:host ::ng-deep textarea:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-autocomplete:focus-within .p-autocomplete-input{border:none!important;outline:none!important;box-shadow:none!important}:host ::ng-deep select:not(:disabled):focus{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .ant-select-focused:not(.ant-select-disabled) .ant-select-selector,:host ::ng-deep nz-select:not(.ant-select-disabled):focus-within .ant-select-selector{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .p-select:not(.p-disabled).p-focus,:host ::ng-deep .p-select:not(.p-disabled):focus-within,:host ::ng-deep .p-dropdown:not(.p-disabled).p-focus,:host ::ng-deep .p-dropdown:not(.p-disabled):focus-within{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep .custom-datepicker:focus-within .p-datepicker-input{border-color:var(--modal-field-focus-color)!important;outline:none!important;box-shadow:var(--modal-field-focus-shadow)!important}:host ::ng-deep input:disabled,:host ::ng-deep textarea:disabled,:host ::ng-deep select:disabled,:host ::ng-deep .p-disabled,:host ::ng-deep .ant-select-disabled .ant-select-selector{box-shadow:none!important}@media(max-width:599px){.vl-dialog-field{grid-column:1 / -1!important}.vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}.vl-dialog-field--locked{background:transparent!important;box-shadow:none!important;height:auto!important}:host(.vl-design-mobile) .vl-dialog-field{grid-column:1 / -1!important}:host(.vl-design-mobile) .vl-dialog-field ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}\n", ".vl-d-root{position:relative;min-height:40px}.vl-d-bar{position:absolute;top:-13px;right:8px;z-index:20;opacity:0;visibility:hidden;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}.vl-d-item{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:3px;transition:outline-color .12s ease,box-shadow .12s ease}.vl-d-item:hover{outline-color:#93c5fd}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{opacity:1;visibility:visible;transform:translateY(0)}.vl-d-item--selected{outline:2px solid #3b82f6;outline-offset:3px;box-shadow:0 0 0 5px #3b82f614}.vl-d-item--target{outline-color:#2563eb}.vl-d-section{position:relative;min-width:0;border-radius:6px;outline:1px dashed transparent;outline-offset:4px}.vl-d-section:hover{outline-color:#c7d2fe}.vl-d-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin-bottom:6px}.vl-d-section-head .vl-d-bar{position:static;opacity:0;visibility:hidden;transform:none}.vl-d-section:hover>.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible}.vl-d-section-name{font-size:12px;font-weight:600;color:#64748b}.vl-d-section--sticky{border-left:3px solid #6366f1;padding-left:6px}.vl-d-section--conditional{outline-style:dashed;outline-color:#a5b4fc}.vl-d-body{cursor:pointer;min-width:0}.vl-d-body>*{pointer-events:none}.vl-d-hidden{opacity:.5;outline:1px dashed #94a3b8;outline-offset:2px}.vl-d-hidden-tag{display:inline-block;float:right;margin-bottom:2px;font-size:.7rem;color:#475569;background:#e2e8f0;border-radius:4px;padding:0 .4rem}.vl-d-empty{grid-column:1 / -1;min-height:56px;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #cbd5e1;border-radius:8px;color:#64748b;font-size:13px;text-align:center;background:#f8fafc}.vl-d-add{display:flex;justify-content:center;padding:10px 0 4px}.vl-d-add-btn{border:1px dashed #93c5fd;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:600;cursor:pointer}.vl-d-add-btn:hover{background:#dbeafe}.vl-d-container-bar{display:flex;justify-content:flex-end;gap:4px;margin-bottom:8px}.cdk-drag-preview.vl-d-item,.cdk-drag-preview.vl-d-section{box-shadow:0 12px 28px #0f172a2e;border-radius:8px;background:#fff;opacity:.95}.cdk-drag-placeholder.vl-d-item,.cdk-drag-placeholder.vl-d-section{opacity:.35}.cdk-drag-animating{transition:transform .2s cubic-bezier(0,0,.2,1)}@media(max-width:768px){.vl-d-bar,.vl-d-section-head .vl-d-bar{opacity:1;visibility:visible;transform:none}}@media(prefers-reduced-motion:reduce){.vl-d-bar,.vl-d-item{transition:none}}\n"] }]
12019
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef, decorators: [{
12020
+ type: Optional
12021
+ }] }, { type: i1$4.DynamicDialogConfig, decorators: [{
12022
+ type: Optional
12023
+ }] }, { type: UtilityService }], propDecorators: { errorMessages: [{
10267
12024
  type: Input
10268
12025
  }], modalItemInfo: [{
10269
12026
  type: Input
@@ -10273,6 +12030,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
10273
12030
  type: Input
10274
12031
  }], setFormDataHandler: [{
10275
12032
  type: Input
12033
+ }], design: [{
12034
+ type: Input
12035
+ }], designChange: [{
12036
+ type: Output
12037
+ }], designMobile: [{
12038
+ type: HostBinding,
12039
+ args: ['class.vl-design-mobile']
12040
+ }], designTablet: [{
12041
+ type: HostBinding,
12042
+ args: ['class.vl-design-tablet']
10276
12043
  }] } });
10277
12044
 
10278
12045
  class Button {
@@ -11861,7 +13628,7 @@ class SideMenuComponent {
11861
13628
  });
11862
13629
  }
11863
13630
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: SideMenuComponent, deps: [{ token: i1$5.NzI18nService }, { token: MobileKeycloakService }, { token: Couchdb }, { token: i7.OAuthService }, { token: i1$2.Platform }, { token: RequestService }, { token: UtilityService }, { token: i1$4.DialogService }, { token: NotificationService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
11864
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo", startLanguages: "startLanguages", mainCenter: "mainCenter" }, outputs: { languageChange: "languageChange", invokeMenu: "invokeMenu", menuToggle: "menuToggle", invokeProject: "invokeProject", errorMessage: "errorMessage", deleteProject: "deleteProject", paginationType: "paginationType" }, host: { listeners: { "window:resize": "onResizeMobileMode()", "document:click": "onDocumentClick($event)" }, properties: { "class.sidemenu-mobile": "this.mobileMode" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: an entry's visibility by itemHidden (sign-in and option.role); the name line only for a name from the token -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20\r\n - new: a fourth footer row \"App\" with the export of the app (appVersionInfo.appRelease, issue #57) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\" *ngIf=\"loginedUserInfo.nameFromToken !== false\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"itemHidden(item) ? 'hidden' : ''\">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"itemHidden(item, true) ? 'hidden' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n <!-- the app's own export (issue #57): \"Export 2 \u00B7 41908dd \u00B7 20.10.2026\", only when it has one -->\r\n @if (appVersionInfo.appRelease) {\r\n <div class=\"app-version-footer__item app-version-footer__release\" [title]=\"appVersionInfo.appRelease\">\r\n <span class=\"app-version-footer__label\">App</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appRelease }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-version-footer__release{grid-column:1 / -1}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: 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:
13631
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo", startLanguages: "startLanguages", mainCenter: "mainCenter" }, outputs: { languageChange: "languageChange", invokeMenu: "invokeMenu", menuToggle: "menuToggle", invokeProject: "invokeProject", errorMessage: "errorMessage", deleteProject: "deleteProject", paginationType: "paginationType" }, host: { listeners: { "window:resize": "onResizeMobileMode()", "document:click": "onDocumentClick($event)" }, properties: { "class.sidemenu-mobile": "this.mobileMode" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-25\r\n - change: an entry's visibility by itemHidden (sign-in and option.role); the name line only for a name from the token -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-20\r\n - new: a fourth footer row \"App\" with the export of the app (appVersionInfo.appRelease, issue #57) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\" *ngIf=\"loginedUserInfo.nameFromToken !== false\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"itemHidden(item) ? 'hidden' : ''\">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"itemHidden(item, true) ? 'hidden' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n <!-- the app's own export (issue #57): \"Export 2 \u00B7 41908dd \u00B7 20.10.2026\", only when it has one -->\r\n @if (appVersionInfo.appRelease) {\r\n <div class=\"app-version-footer__item app-version-footer__release\" [title]=\"appVersionInfo.appRelease\">\r\n <span class=\"app-version-footer__label\">App</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appRelease }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24 - a text document of Terms & Conditions -->\r\n@if (termsDocument) {\r\n<vl-terms-dialog [documents]=\"termsDocument\" [translations]=\"lastMenuTranslations\" (closed)=\"termsDocument = null\"></vl-terms-dialog>\r\n}\r\n", styles: [":host{position:relative;display:block;flex:0 0 auto;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease}.left-wrap.sidemenu{position:relative;width:250px;height:100%;min-height:0;overflow:visible;transition:width .3s ease,transform .3s ease}.side-menu{position:relative;display:flex;flex-direction:column;width:250px;height:100%;min-height:0;color:#fff;background-color:#0d1b2a;overflow:hidden;transition:width .3s ease,box-shadow .3s ease}:host:has(.left-wrap.sidemenu.collapsed){width:64px}.left-wrap.sidemenu.collapsed,.left-wrap.sidemenu.collapsed .side-menu{width:64px}.menu-separator{flex:0 0 auto;height:1px;margin:15px 12px 6px;background-color:#ffffff26;border:0;list-style:none}.user-profile{flex:0 0 auto;padding:20px 10px 16px;margin-top:40px;text-align:center;border-bottom:1px solid rgba(255,255,255,.1);overflow:hidden;transition:padding .25s ease,margin .25s ease,opacity .25s ease,max-height .25s ease}.user-profile .avatar{display:block;width:64px;height:64px;margin:0 auto 8px;object-fit:cover;border:2px solid #ffffff;border-radius:50%;transition:width .25s ease,height .25s ease,margin .25s ease}.user-profile .details{min-width:0;overflow:hidden;transition:opacity .2s ease}.user-profile .name{color:#fff;font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-profile .email{margin:2px 0 8px;color:#aaa;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:break-word}.user-profile .actions{display:flex;align-items:center;justify-content:center;gap:6px}.user-profile .actions button{margin:0;color:#fff}.left-wrap.sidemenu.collapsed .user-profile{padding:12px 8px}.left-wrap.sidemenu.collapsed .user-profile .avatar{width:40px;height:40px;margin-bottom:0}.left-wrap.sidemenu.collapsed .user-profile .details,.left-wrap.sidemenu.collapsed .user-profile .name,.left-wrap.sidemenu.collapsed .user-profile .email,.left-wrap.sidemenu.collapsed .user-profile .actions{display:none}.side-menu ul[nz-menu]{flex:1 1 auto;width:100%;min-height:0;margin:0;padding:4px 0 8px;overflow-x:hidden;overflow-y:auto;background-color:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;scroll-behavior:smooth}.side-menu ul[nz-menu]::-webkit-scrollbar{width:6px}.side-menu ul[nz-menu]::-webkit-scrollbar-track{background:transparent}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb{background-color:#ffffff47;border-radius:999px}.side-menu ul[nz-menu]::-webkit-scrollbar-thumb:hover{background-color:#ffffff6b}.menu-row{display:flex;align-items:center;width:100%;min-width:0}.menu-text{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delete-icon{flex:0 0 auto;margin-left:auto;color:#ffffffb3;cursor:pointer;transition:color .18s ease,transform .18s ease}.delete-icon:hover{color:#ff7875;transform:scale(1.08)}.projects{position:static;flex:0 0 auto;width:100%;margin-top:auto;background-color:#0d1b2a}.side-toggle-handle{position:absolute;top:24px;right:-14px;z-index:10000;display:flex;align-items:center;justify-content:center;width:28px;height:48px;padding:0;color:#fff;background-color:#0d1b2a;border:0;border-radius:0 6px 6px 0;box-shadow:2px 0 6px #00000040;cursor:pointer;transform:translateY(-50%);transition:background-color .2s ease,box-shadow .2s ease}.side-toggle-handle:hover{background-color:#142a40;box-shadow:3px 0 9px #0000004d}.side-toggle-handle:focus-visible{outline:3px solid rgba(24,144,255,.45);outline-offset:2px}.side-toggle-handle span{color:#fff;font-size:14px;line-height:1;transition:transform .25s ease}.collapse-btn{position:absolute;top:8px;right:8px;z-index:10001}:host(:not(.sidemenu-mobile)) .left-wrap.sidemenu.collapsed:hover{transform:translate(0)}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed{width:64px!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title{display:flex!important;align-items:center!important;justify-content:center!important;width:45px!important;height:32px!important;margin-inline:0!important;padding-inline:0!important;overflow:hidden!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-title-content,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-text,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .delete-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-submenu-arrow{display:none!important;width:0!important;min-width:0!important;max-width:0!important;margin:0!important;padding:0!important;visibility:hidden!important;overflow:hidden!important;text-overflow:clip!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-item>.anticon,:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title>.anticon{display:inline-flex!important;flex:0 0 auto;align-items:center;justify-content:center;width:auto!important;min-width:18px;margin:0!important;padding:0!important;color:inherit;font-size:18px;line-height:1;visibility:visible!important}:host(:not(.sidemenu-mobile)) ::ng-deep .ant-menu.ant-menu-inline-collapsed .menu-row{display:contents}:host(.sidemenu-mobile){position:absolute;top:0;bottom:0;left:0;z-index:9999;width:250px;height:100%}:host(.sidemenu-mobile):has(.left-wrap.sidemenu.collapsed){width:0}:host(.sidemenu-mobile) .left-wrap.sidemenu{width:250px;height:100%}:host(.sidemenu-mobile) .side-menu,:host(.sidemenu-mobile) .side-menu.open{width:250px;height:100%;box-shadow:8px 0 22px #0000003d}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed{width:250px;transform:translate(-250px)}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-menu{width:250px;box-shadow:none}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .side-toggle-handle{right:-28px}:host(.sidemenu-mobile) .side-toggle-handle{top:0;right:0;padding:0;transform:none!important}:host(.sidemenu-mobile) .collapse-btn{top:8px;right:8px}:host(.sidemenu-mobile) .user-profile{margin-top:40px}:host(.sidemenu-mobile) .user-profile .avatar{width:48px;height:48px}:host(.sidemenu-mobile) .left-wrap.sidemenu.collapsed .user-profile{max-height:0;padding:0;margin:0;opacity:0;overflow:hidden;border-bottom:0}@media(prefers-reduced-motion:reduce){:host,.left-wrap.sidemenu,.side-menu,.user-profile,.user-profile .avatar,.side-toggle-handle,.side-toggle-handle span{transition:none}.side-menu ul[nz-menu]{scroll-behavior:auto}}.app-version-footer{flex-shrink:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);color:#ffffffa6;font-size:11px;line-height:1.4;text-align:center}.app-version-footer__item{display:flex;flex-direction:column;min-width:0}.app-version-footer__label{font-size:10px;opacity:.7}.app-version-footer__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-version-footer__release{grid-column:1 / -1}.pagination-check{position:absolute;top:50%;right:42px;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PlatformModule }, { kind: "ngmodule", type:
11865
13632
  // NG-ZORRO
11866
13633
  NzMenuModule }, { kind: "directive", type: i11$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i11$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i11$1.NzSubMenuComponent, selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzTriggerSubMenuAction", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i11.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i13$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i12.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i13.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type:
11867
13634
  // PrimeNG
@@ -12917,5 +14684,5 @@ function termsUser(userInfo) {
12917
14684
  * Generated bundle index. Do not edit.
12918
14685
  */
12919
14686
 
12920
- export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, 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, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, isSignedIn, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, proxyFor, recordOf, recordsFrom, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
14687
+ export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, cardButton, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, designDropIds, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, headerButton, inputFormatHint, insertField, isBrowserSource, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, newButton, newSection, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, replaceCardElement, replaceColumn, replaceField, replaceSection, resizeColumn, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline, withAppPagination };
12921
14688
  //# sourceMappingURL=yomotech-view-toolkit.mjs.map