@yomotech/view-toolkit 1.0.52 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/yomotech-view-toolkit-catalog.mjs +533 -41
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +854 -254
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +3 -2
- package/types/yomotech-view-toolkit-catalog.d.ts +201 -52
- package/types/yomotech-view-toolkit.d.ts +172 -17
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i9 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, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, Injectable, HostListener, Directive, Optional, SkipSelf, ViewChild, inject, ViewChildren, HostBinding, ElementRef, NgZone, ChangeDetectorRef, NgModule, effect, DestroyRef } from '@angular/core';
|
|
5
|
-
import { effectiveControl, keyboardFor, BROWSER_STORAGES, OLD_STORAGES, paginationFor, startPageFor, START_PAGE_KEYS, cardLayoutOf, maxLinesOf, enterKeyFor, methodOf, waitsForFilter, translateCaptions, alignRowsOf, successMessageOf, readAppSettings, appSettingsMenu } from '@yomotech/view-toolkit/catalog';
|
|
4
|
+
import { Pipe, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, Injectable, HostListener, Directive, Optional, SkipSelf, ViewChild, inject, ApplicationRef, EnvironmentInjector, createComponent, ViewChildren, HostBinding, ElementRef, NgZone, ChangeDetectorRef, NgModule, effect, DestroyRef } from '@angular/core';
|
|
5
|
+
import { effectiveControl, keyboardFor, styleValue, actionName, BROWSER_STORAGES, OLD_STORAGES, cssStyle, paginationFor, startPageFor, START_PAGE_KEYS, cardLayoutOf, stripeTestPaymentMethod, actionParams, maxLinesOf, enterKeyFor, methodOf, waitsForFilter, translateCaptions, alignRowsOf, successMessageOf, readAppSettings, appSettingsMenu } from '@yomotech/view-toolkit/catalog';
|
|
6
6
|
import * as catalog from '@yomotech/view-toolkit/catalog';
|
|
7
7
|
export { catalog as FieldCatalog };
|
|
8
8
|
import * as i15 from '@angular/cdk/drag-drop';
|
|
@@ -208,6 +208,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
208
208
|
args: [{ name: 'vlDesignText', standalone: true, pure: true }]
|
|
209
209
|
}] });
|
|
210
210
|
|
|
211
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
212
|
+
// - new: display style iso (layout displayFormat "iso", OFFENE-PUNKTE 80): the field shows and takes its date as
|
|
213
|
+
// 2026-10-30 in every language - input, calendar, card, table; with a time the time is 24 hours (14:00)
|
|
211
214
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
212
215
|
// - fix: shapeTimeText takes AM / PM typed anywhere after the digits (typedMeridiem) - on a laptop PM could not be typed;
|
|
213
216
|
// parseTimeText - a typed time as hours and minutes
|
|
@@ -229,6 +232,10 @@ function setDateLanguage(languageCode) {
|
|
|
229
232
|
dateLanguage = languageCode.slice(0, 2).toLowerCase();
|
|
230
233
|
}
|
|
231
234
|
}
|
|
235
|
+
/** Display style iso (layout displayFormat): the date as 2026-10-30 and its time as 24 hours in every language. */
|
|
236
|
+
function isIsoDate(option) {
|
|
237
|
+
return option?.displayFormat === 'iso';
|
|
238
|
+
}
|
|
232
239
|
function currentDateLanguage() {
|
|
233
240
|
return dateLanguage;
|
|
234
241
|
}
|
|
@@ -263,6 +270,9 @@ function dateInputPattern(option, property, languageCode = dateLanguage) {
|
|
|
263
270
|
if (option?.displayFormat === 'custom' && typeof option?.customDisplayFormat === 'string' && option.customDisplayFormat) {
|
|
264
271
|
return primeDatePattern(option.customDisplayFormat);
|
|
265
272
|
}
|
|
273
|
+
// display style iso: 2026-10-30 in every language
|
|
274
|
+
if (isIsoDate(option))
|
|
275
|
+
return 'yy-mm-dd';
|
|
266
276
|
return languageDatePattern(languageCode);
|
|
267
277
|
}
|
|
268
278
|
/**
|
|
@@ -329,6 +339,13 @@ function displayDateValue(value, kind, option, languageCode = dateLanguage) {
|
|
|
329
339
|
const two = (n) => String(n).padStart(2, '0');
|
|
330
340
|
day = primeDatePattern(option.customDisplayFormat).replace(/yy|y|mm|m|dd|d/g, token => token === 'yy' ? year : token === 'y' ? year.slice(2) : token[0] === 'm' ? two(date.getMonth() + 1) : two(date.getDate()));
|
|
331
341
|
}
|
|
342
|
+
else if (isIsoDate(option)) {
|
|
343
|
+
// display style iso: 2026-10-30 and 14:00 in every language
|
|
344
|
+
const two = (n) => String(n).padStart(2, '0');
|
|
345
|
+
day = `${year}-${two(date.getMonth() + 1)}-${two(date.getDate())}`;
|
|
346
|
+
if (kind === 'datetime')
|
|
347
|
+
return `${day} ${two(date.getHours())}:${two(date.getMinutes())}`;
|
|
348
|
+
}
|
|
332
349
|
else if (style === 'short') {
|
|
333
350
|
day = numeric;
|
|
334
351
|
}
|
|
@@ -459,6 +476,11 @@ function toggleMeridiem(text) {
|
|
|
459
476
|
return time ? `${time} ${now === 'PM' ? 'AM' : 'PM'}` : time;
|
|
460
477
|
}
|
|
461
478
|
|
|
479
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
480
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
481
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
482
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
483
|
+
// - change: layoutStyle grid columns and alignment read in both spellings (styleValue)
|
|
462
484
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
463
485
|
// - change: testWrites reads the storages from the action catalog (no own list)
|
|
464
486
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
@@ -608,8 +630,8 @@ function fieldInnerLayoutStyle(formField, container = 'dialog') {
|
|
|
608
630
|
// the layout's layoutStyle wins here too (it was dropped in the form); rem grows with the font (OFFENE-PUNKTE 45)
|
|
609
631
|
? {
|
|
610
632
|
display: 'grid',
|
|
611
|
-
gridTemplateColumns: layoutStyle
|
|
612
|
-
alignItems: layoutStyle
|
|
633
|
+
gridTemplateColumns: styleValue(layoutStyle, 'grid-template-columns') || 'minmax(7rem, 30%) minmax(0, 1fr)',
|
|
634
|
+
alignItems: styleValue(layoutStyle, 'align-items') || 'center',
|
|
613
635
|
gap: layoutStyle.gap || '10px',
|
|
614
636
|
...layoutStyle,
|
|
615
637
|
}
|
|
@@ -620,8 +642,8 @@ function fieldInnerLayoutStyle(formField, container = 'dialog') {
|
|
|
620
642
|
if (formField?.layout === 'horizontal') {
|
|
621
643
|
return {
|
|
622
644
|
display: 'grid',
|
|
623
|
-
gridTemplateColumns: layoutStyle
|
|
624
|
-
alignItems: layoutStyle
|
|
645
|
+
gridTemplateColumns: styleValue(layoutStyle, 'grid-template-columns') || '5rem minmax(0, 1fr)',
|
|
646
|
+
alignItems: styleValue(layoutStyle, 'align-items') || 'center',
|
|
625
647
|
gap: layoutStyle.gap || '10px',
|
|
626
648
|
width: '100%',
|
|
627
649
|
minWidth: '0',
|
|
@@ -659,7 +681,7 @@ function testFieldPath(field) {
|
|
|
659
681
|
return parts.length > 1 ? parts.join('.') : null;
|
|
660
682
|
}
|
|
661
683
|
function testAction(option) {
|
|
662
|
-
return option
|
|
684
|
+
return actionName(option) || null;
|
|
663
685
|
}
|
|
664
686
|
/**
|
|
665
687
|
* Whether a button writes real data: to the backend (storageType database - the card's disk icon,
|
|
@@ -671,13 +693,16 @@ function testWrites(option) {
|
|
|
671
693
|
// the browser storages and the old "filter" (a backend list loaded on its filter, read only) - from the catalog
|
|
672
694
|
&& ![...BROWSER_STORAGES, ...Object.keys(OLD_STORAGES)].includes(String(option?.storageType ?? '').toLowerCase());
|
|
673
695
|
const writes = option?.storageType === 'database'
|
|
674
|
-
|
|
675
|
-
||
|
|
676
|
-
|
|
677
|
-
|
|
696
|
+
// a save into a browser list stays on the device (PageData.keep)
|
|
697
|
+
|| (actionName(option) === 'save' && !BROWSER_STORAGES.includes(String(option?.storageType ?? '').toLowerCase()))
|
|
698
|
+
|| ['delete', 'saveAll'].includes(actionName(option))
|
|
699
|
+
// a submit that sends to the backend (luv2shop's Purchase: submit, data_url checkout/purchase)
|
|
700
|
+
|| (actionName(option) === 'submit' && toBackend);
|
|
678
701
|
return writes ? 'true' : 'false';
|
|
679
702
|
}
|
|
680
703
|
|
|
704
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
705
|
+
// - new: wrapperStyleOf - a button's look no longer draws a second box around it (point 184)
|
|
681
706
|
// Shuaib 2026-10-20
|
|
682
707
|
// - new: controlKind - which building block draws a field of a layout, the one rule for every
|
|
683
708
|
// container instead of a switch in each; the same decision as the Designer's modal canvas
|
|
@@ -737,6 +762,13 @@ function controlKind(field, property) {
|
|
|
737
762
|
return 'datetime';
|
|
738
763
|
return ['number', 'integer', 'bigdecimal', 'decimal'].includes(type) ? 'number' : 'text';
|
|
739
764
|
}
|
|
765
|
+
const BUTTON_LOOK = /^(padding|border|background|color|boxShadow|font|cursor|outline|text|letterSpacing)/;
|
|
766
|
+
/** The wrapper of a field keeps the layout's style; a button's look stays on the button, not around it too. */
|
|
767
|
+
function wrapperStyleOf(field, style) {
|
|
768
|
+
if (field?.scope?.reference)
|
|
769
|
+
return style;
|
|
770
|
+
return Object.fromEntries(Object.entries(style).filter(([key]) => !BUTTON_LOOK.test(key)));
|
|
771
|
+
}
|
|
740
772
|
/**
|
|
741
773
|
* A style object of the layout split into its classes and its CSS: { classes: ['a', 'b'], color }
|
|
742
774
|
* -> { classes: 'a b', style: { color } }. Every class counts, not only the first.
|
|
@@ -750,6 +782,10 @@ function styleParts(styleObject) {
|
|
|
750
782
|
return { classes: list.filter((c) => typeof c === 'string' && c.trim()).join(' '), style };
|
|
751
783
|
}
|
|
752
784
|
|
|
785
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-03
|
|
786
|
+
// - fix: a row that is not a grid (display flex) gets no grid columns on a save - the card stays as it was
|
|
787
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
788
|
+
// - change: styles are written in CSS spelling (font-size, grid-column - style-keys of the catalog) and read in both
|
|
753
789
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30
|
|
754
790
|
// - change: a row gets at most 4 equal columns, more elements wrap to its next line (MAX_ROW_COLUMNS)
|
|
755
791
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
@@ -761,7 +797,7 @@ function styleParts(styleObject) {
|
|
|
761
797
|
// Moved here from the Designer's own card (LiveForge), so the Designer and vl-card keep one rule (#166). Pure:
|
|
762
798
|
// every edit returns a new layout.
|
|
763
799
|
function horizontalStyle() {
|
|
764
|
-
return { display: 'grid',
|
|
800
|
+
return { display: 'grid', 'grid-template-columns': 'repeat(2, minmax(0, 1fr))', gap: '10px', 'align-items': 'start', width: '100%', 'box-sizing': 'border-box' };
|
|
765
801
|
}
|
|
766
802
|
/** How many columns a grid-template-columns names: "repeat(3, 34px)" three, "minmax(0, 1fr) repeat(3, 34px)" four. */
|
|
767
803
|
function gridColumnCount(template) {
|
|
@@ -788,18 +824,24 @@ function normalizeHorizontal(layout) {
|
|
|
788
824
|
layout.style = layout.style || horizontalStyle();
|
|
789
825
|
delete layout.style.classes;
|
|
790
826
|
layout.style.display = layout.style.display || 'grid';
|
|
827
|
+
// a row laid out by the app itself (flex - price and button apart) keeps its look: no grid columns are written into
|
|
828
|
+
// it on a save (they changed a luv2shop card row nobody touched, user 2026-11-03)
|
|
829
|
+
if (layout.style.display !== 'grid')
|
|
830
|
+
return;
|
|
791
831
|
const count = Math.max(1, layout.elements?.length || 1);
|
|
792
832
|
// at most MAX_ROW_COLUMNS equal columns - more elements wrap to the next line of the row; 20 fields in one row
|
|
793
833
|
// made 20 columns a letter wide (tm-test Controls List, 2026-10-30). Own widths that fit the elements stay.
|
|
794
834
|
const want = Math.min(count, MAX_ROW_COLUMNS);
|
|
795
|
-
|
|
835
|
+
// CSS spelling (style-keys); a camelCase one from before is read and replaced
|
|
836
|
+
layout.style = cssStyle(layout.style);
|
|
837
|
+
const columns = layout.style['grid-template-columns'];
|
|
796
838
|
const equal = typeof columns === 'string' && /^\s*repeat\(\s*\d+\s*,\s*minmax\(0,\s*1fr\)\s*\)\s*$/.test(columns);
|
|
797
839
|
const have = gridColumnCount(columns);
|
|
798
840
|
if ((have !== count && have !== want) || (equal && have !== want)) {
|
|
799
|
-
layout.style
|
|
841
|
+
layout.style['grid-template-columns'] = `repeat(${want}, minmax(0, 1fr))`;
|
|
800
842
|
}
|
|
801
843
|
layout.style.gap = layout.style.gap || '10px';
|
|
802
|
-
layout.style
|
|
844
|
+
layout.style['align-items'] = layout.style['align-items'] || 'start';
|
|
803
845
|
}
|
|
804
846
|
function horizontalOf(elements) {
|
|
805
847
|
const layout = { type: 'HorizontalLayout', style: horizontalStyle(), elements };
|
|
@@ -866,7 +908,7 @@ function cardButton(caption = 'Button') {
|
|
|
866
908
|
control: 'button',
|
|
867
909
|
icon: '',
|
|
868
910
|
caption,
|
|
869
|
-
style: { border: '1px solid #2563eb', background: '#2563eb', color: '#ffffff',
|
|
911
|
+
style: { border: '1px solid #2563eb', background: '#2563eb', color: '#ffffff', 'border-radius': '4px', padding: '8px 12px', cursor: 'pointer' },
|
|
870
912
|
option: {
|
|
871
913
|
visible: true, protected: false, passToken: false, action: null, innerAction: null, storageType: null, key: '',
|
|
872
914
|
data_url: '', deleteMessage: '', params: {}, form: false, modalTitle: '', passData: false, layout_url: '', property_url: [],
|
|
@@ -878,8 +920,8 @@ function elementFromProperty(drop, caption) {
|
|
|
878
920
|
if (String(drop?.type ?? '').toLowerCase() === 'button')
|
|
879
921
|
return cardButton(caption);
|
|
880
922
|
return {
|
|
881
|
-
label: { caption: drop?.name || '', style: {
|
|
882
|
-
scope: { reference: `#/${dropObjectName(drop)}/properties/${drop?.name}`, style: { width: '100%',
|
|
923
|
+
label: { caption: drop?.name || '', style: { 'font-size': '13px', 'font-weight': '700', color: '#374151', 'margin-bottom': '4px', display: 'block' } },
|
|
924
|
+
scope: { reference: `#/${dropObjectName(drop)}/properties/${drop?.name}`, style: { width: '100%', 'box-sizing': 'border-box' } },
|
|
883
925
|
option: {
|
|
884
926
|
action: 'get', visible: true, protected: true, link: false, setImageUrl: String(drop?.type ?? '').toLowerCase() === 'media',
|
|
885
927
|
layout_url: '', property_url: [''], data_url: '',
|
|
@@ -1032,7 +1074,7 @@ function headerButton(caption = 'Add') {
|
|
|
1032
1074
|
return {
|
|
1033
1075
|
caption,
|
|
1034
1076
|
icon: '',
|
|
1035
|
-
style: { width: 'auto',
|
|
1077
|
+
style: { width: 'auto', 'min-width': '110px', 'max-width': '100%', height: '40px', padding: '0 16px', 'box-sizing': 'border-box' },
|
|
1036
1078
|
option: { innerAction: 'showModal', visible: true, modalTitle: 'Record Working Time', protected: false, layout_url: '', property_url: [] },
|
|
1037
1079
|
};
|
|
1038
1080
|
}
|
|
@@ -1047,6 +1089,8 @@ function clearHeader(header) {
|
|
|
1047
1089
|
return { ...cloneLayout(header || {}), elements: [] };
|
|
1048
1090
|
}
|
|
1049
1091
|
|
|
1092
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
1093
|
+
// - change: styles are written in CSS spelling (font-size, grid-column - style-keys of the catalog) and read in both
|
|
1050
1094
|
// Shuaib 2026-10-26
|
|
1051
1095
|
// - new: the Designer's edits of a page with sections (form and dialog): drop a data object's field, move a field
|
|
1052
1096
|
// beside / above / below another (rows of up to four fields share the 12 columns), add and delete fields,
|
|
@@ -1072,7 +1116,7 @@ function rowId() {
|
|
|
1072
1116
|
function fieldSpan(field) {
|
|
1073
1117
|
let span = Number(field?.gridSpan);
|
|
1074
1118
|
if (!span) {
|
|
1075
|
-
const gridColumn = field?.style
|
|
1119
|
+
const gridColumn = styleValue(field?.style, 'grid-column');
|
|
1076
1120
|
const match = typeof gridColumn === 'string' ? gridColumn.match(/span\s+(\d+)/) : null;
|
|
1077
1121
|
span = match ? Number(match[1]) : 0;
|
|
1078
1122
|
}
|
|
@@ -1085,9 +1129,10 @@ function setSpan(field, span, kind) {
|
|
|
1085
1129
|
const safe = Math.max(1, Math.min(GRID_COLUMNS, span));
|
|
1086
1130
|
field.gridSpan = safe;
|
|
1087
1131
|
field.layout = field.layout || (safe === GRID_COLUMNS ? 'vertical' : 'horizontal');
|
|
1088
|
-
|
|
1132
|
+
// CSS spelling; the same property written camelCase goes (cssStyle keeps the later one)
|
|
1133
|
+
field.style = cssStyle({ ...(field.style || {}), 'grid-column': `span ${safe}`, width: '100%', 'box-sizing': 'border-box' });
|
|
1089
1134
|
if (kind === 'dialog')
|
|
1090
|
-
field.style
|
|
1135
|
+
field.style['min-width'] = '0';
|
|
1091
1136
|
if (kind === 'form')
|
|
1092
1137
|
delete field.style.classes;
|
|
1093
1138
|
for (const key of ['flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flex-grow', 'flex-shrink', 'flex-basis'])
|
|
@@ -1165,21 +1210,21 @@ function sectionLayout() {
|
|
|
1165
1210
|
return { mode: 'auto-grid', desktopColumns: 12, tabletColumns: 6, mobileColumns: 1, gap: '10px', mobileStack: true };
|
|
1166
1211
|
}
|
|
1167
1212
|
function formLabelStyle() {
|
|
1168
|
-
return {
|
|
1213
|
+
return { 'font-size': '13px', 'font-weight': '700', color: '#374151', 'margin-bottom': '6px', display: 'block' };
|
|
1169
1214
|
}
|
|
1170
1215
|
function formWrapperStyle() {
|
|
1171
1216
|
return {
|
|
1172
|
-
|
|
1173
|
-
border: '1px solid #ececf5', background: '#ffffff', margin: '0',
|
|
1217
|
+
'grid-column': 'span 12', width: '100%', 'box-sizing': 'border-box', padding: '12px', 'border-radius': '4px',
|
|
1218
|
+
border: '1px solid #ececf5', background: '#ffffff', margin: '0', 'box-shadow': '0 8px 18px rgba(16, 24, 40, 0.04)',
|
|
1174
1219
|
};
|
|
1175
1220
|
}
|
|
1176
1221
|
function inputStyle() {
|
|
1177
|
-
return { width: '100%', padding: '10px 12px',
|
|
1222
|
+
return { width: '100%', padding: '10px 12px', 'border-radius': '4px', border: '1px solid #e5e7eb', background: '#ffffff', outline: 'none' };
|
|
1178
1223
|
}
|
|
1179
1224
|
/** An empty section as the Designer adds it. */
|
|
1180
1225
|
function newSection(kind) {
|
|
1181
|
-
const body = { padding: '14px',
|
|
1182
|
-
const label = {
|
|
1226
|
+
const body = { padding: '14px', 'border-radius': '4px', border: '1px solid #e7e8ef', background: '#ffffff', 'margin-bottom': '14px', 'box-shadow': '0 8px 18px rgba(16, 24, 40, 0.04)' };
|
|
1227
|
+
const label = { 'font-size': '15px', 'font-weight': '700', color: '#111827' };
|
|
1183
1228
|
if (kind === 'dialog') {
|
|
1184
1229
|
return { label: { caption: '', style: { classes: ['lf-section-title'], ...label } }, style: { classes: ['lf-section-body'], ...body }, formFields: [] };
|
|
1185
1230
|
}
|
|
@@ -1188,7 +1233,7 @@ function newSection(kind) {
|
|
|
1188
1233
|
/** A button as the Designer adds it to a section. */
|
|
1189
1234
|
function newButton(kind, caption = 'Button') {
|
|
1190
1235
|
if (kind === 'dialog') {
|
|
1191
|
-
return fullWidth({ label: { caption, style: {} }, option: { innerAction: 'submit' }, style: {
|
|
1236
|
+
return fullWidth({ label: { caption, style: {} }, option: { innerAction: 'submit' }, style: { 'grid-column': 'span 12', width: '100%' }, layout: 'vertical' }, kind);
|
|
1192
1237
|
}
|
|
1193
1238
|
return { label: { caption, style: formLabelStyle() }, option: {}, required: false, style: formWrapperStyle(), layout: 'vertical', gridSpan: 12, rowId: rowId() };
|
|
1194
1239
|
}
|
|
@@ -1199,12 +1244,12 @@ function fieldFromProperty(drop, kind) {
|
|
|
1199
1244
|
const reference = `#/${dropObjectName(drop)}/properties/${drop.name}`;
|
|
1200
1245
|
if (kind === 'dialog') {
|
|
1201
1246
|
return {
|
|
1202
|
-
label: { caption: drop.name, style: {
|
|
1247
|
+
label: { caption: drop.name, style: { 'font-size': '13px', 'font-weight': '700', color: '#374151', 'margin-bottom': '6px', display: 'block' } },
|
|
1203
1248
|
option: { protected: false, required: false, disabled: false },
|
|
1204
1249
|
required: false,
|
|
1205
1250
|
scope: { reference, style: inputStyle() },
|
|
1206
|
-
validation: { style: { color: '#ef4444',
|
|
1207
|
-
style: {
|
|
1251
|
+
validation: { style: { color: '#ef4444', 'font-size': '12px', 'margin-top': '4px' } },
|
|
1252
|
+
style: { 'grid-column': 'span 12' },
|
|
1208
1253
|
layout: 'vertical',
|
|
1209
1254
|
};
|
|
1210
1255
|
}
|
|
@@ -1212,7 +1257,7 @@ function fieldFromProperty(drop, kind) {
|
|
|
1212
1257
|
label: { caption: drop.name, style: formLabelStyle() },
|
|
1213
1258
|
option: {},
|
|
1214
1259
|
required: false,
|
|
1215
|
-
scope: { reference, style: { ...inputStyle(),
|
|
1260
|
+
scope: { reference, style: { ...inputStyle(), 'box-sizing': 'border-box' } },
|
|
1216
1261
|
style: formWrapperStyle(),
|
|
1217
1262
|
layout: 'vertical',
|
|
1218
1263
|
gridSpan: 12,
|
|
@@ -1640,10 +1685,14 @@ function sampleRecords(nodes, propertySchema, count, image) {
|
|
|
1640
1685
|
});
|
|
1641
1686
|
}
|
|
1642
1687
|
|
|
1688
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
1689
|
+
// - change: the handles always in one order - drag, data, edit, add, delete; what is not needed is left out (user)
|
|
1643
1690
|
// Shuaib 2026-10-26
|
|
1644
1691
|
// - new: <vl-design-bar> - the handles of an element in design mode (drag, add, edit, delete) and <vl-drop-marker>
|
|
1645
1692
|
// - where a dragged element would land; one look in every container (#166)
|
|
1646
|
-
const ICONS = { drag: 'pi pi-bars', add: 'pi pi-plus', edit: 'pi pi-pencil', delete: 'pi pi-trash' };
|
|
1693
|
+
const ICONS = { drag: 'pi pi-bars', add: 'pi pi-plus', data: 'pi pi-database', edit: 'pi pi-pencil', delete: 'pi pi-trash' };
|
|
1694
|
+
/** One order everywhere (user 2026-11-02): drag handle, data, edit, add, delete - what an element does not need is left out. */
|
|
1695
|
+
const ORDER = ['drag', 'data', 'edit', 'add', 'delete'];
|
|
1647
1696
|
/**
|
|
1648
1697
|
* The handles of one element. "drag" is the cdkDragHandle of the element it stands in; the others report their
|
|
1649
1698
|
* action (act) without the click reaching the element.
|
|
@@ -1653,12 +1702,16 @@ class DesignBarComponent {
|
|
|
1653
1702
|
/** the tooltip of each handle */
|
|
1654
1703
|
titles = {};
|
|
1655
1704
|
act = new EventEmitter();
|
|
1705
|
+
/** The handles in the one order, whatever order a container names them in. */
|
|
1706
|
+
get ordered() {
|
|
1707
|
+
return ORDER.filter((a) => this.actions.includes(a));
|
|
1708
|
+
}
|
|
1656
1709
|
icon(action) {
|
|
1657
1710
|
return ICONS[action];
|
|
1658
1711
|
}
|
|
1659
1712
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1660
1713
|
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: `
|
|
1661
|
-
@for (action of
|
|
1714
|
+
@for (action of ordered; track action) {
|
|
1662
1715
|
@if (action === 'drag') {
|
|
1663
1716
|
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1664
1717
|
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
@@ -1669,12 +1722,12 @@ class DesignBarComponent {
|
|
|
1669
1722
|
(mousedown)="$event.stopPropagation()"
|
|
1670
1723
|
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1671
1724
|
}
|
|
1672
|
-
}`, 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: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1725
|
+
}`, 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;margin:0}.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: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1673
1726
|
}
|
|
1674
1727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: DesignBarComponent, decorators: [{
|
|
1675
1728
|
type: Component,
|
|
1676
1729
|
args: [{ selector: 'vl-design-bar', standalone: true, imports: [DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1677
|
-
@for (action of
|
|
1730
|
+
@for (action of ordered; track action) {
|
|
1678
1731
|
@if (action === 'drag') {
|
|
1679
1732
|
<button type="button" class="vl-design-bar__btn vl-design-bar__btn--drag" cdkDragHandle
|
|
1680
1733
|
[attr.title]="titles[action] || null" [attr.aria-label]="titles[action] || null"
|
|
@@ -1685,7 +1738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
1685
1738
|
(mousedown)="$event.stopPropagation()"
|
|
1686
1739
|
(click)="$event.stopPropagation(); $event.preventDefault(); act.emit(action)"><i [class]="icon(action)"></i></button>
|
|
1687
1740
|
}
|
|
1688
|
-
}`, 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"] }]
|
|
1741
|
+
}`, 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;margin:0}.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"] }]
|
|
1689
1742
|
}], propDecorators: { actions: [{
|
|
1690
1743
|
type: Input
|
|
1691
1744
|
}], titles: [{
|
|
@@ -1745,6 +1798,62 @@ function withAppPagination(mainCenter, center) {
|
|
|
1745
1798
|
};
|
|
1746
1799
|
}
|
|
1747
1800
|
|
|
1801
|
+
// Shuaib 2026-10-21
|
|
1802
|
+
// - new: what a list (card, grid) shows for a field, the one rule for <vl-control mode="display">:
|
|
1803
|
+
// the value the record stores - never the property's default, which belongs only to a new record
|
|
1804
|
+
// in the dialog (an empty status showed "beantragt") -, "--" for an empty value, a date or time as
|
|
1805
|
+
// text, a selection as the caption of the chosen entry (also used by vl-dropdown). No Angular, so
|
|
1806
|
+
// it can be tested with node --test (#166)
|
|
1807
|
+
/** What a list shows for an empty value. */
|
|
1808
|
+
const EMPTY_TEXT = '--';
|
|
1809
|
+
function isEmptyValue(value) {
|
|
1810
|
+
return value === null || value === undefined || value === '';
|
|
1811
|
+
}
|
|
1812
|
+
/** The value of a field in a record ("#/workOrder/properties/status" -> record.status), as stored. */
|
|
1813
|
+
function displayValue(field, record) {
|
|
1814
|
+
const { name } = splitReference(field?.scope?.reference);
|
|
1815
|
+
return name ? record?.[name] : undefined;
|
|
1816
|
+
}
|
|
1817
|
+
/** A plain value as text: "--" when empty. */
|
|
1818
|
+
function displayText(value) {
|
|
1819
|
+
return isEmptyValue(value) ? EMPTY_TEXT : String(value);
|
|
1820
|
+
}
|
|
1821
|
+
/** A date, time or date and time as text in the app language (services/date-display.ts); "--" when empty. */
|
|
1822
|
+
function displayDateText(value, kind, option) {
|
|
1823
|
+
if (isEmptyValue(value)) {
|
|
1824
|
+
return EMPTY_TEXT;
|
|
1825
|
+
}
|
|
1826
|
+
const text = displayDateValue(value, kind, option);
|
|
1827
|
+
return isEmptyValue(text) ? EMPTY_TEXT : String(text);
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* The entries of a selection: the Designer's allowed values with their labels
|
|
1831
|
+
* (option.fieldData.validation.enum, option.labels), or the field's list (the property's data, from
|
|
1832
|
+
* option.autocomplete) read with optionLabel / optionValue (the Designer writes optionlabel /
|
|
1833
|
+
* optionvalue - both are read).
|
|
1834
|
+
*/
|
|
1835
|
+
function selectionEntries(option, items, translations) {
|
|
1836
|
+
const o = option ?? {};
|
|
1837
|
+
const values = o.fieldData?.validation?.enum;
|
|
1838
|
+
const source = Array.isArray(values) && values.length ? values : items;
|
|
1839
|
+
const labelKey = o.optionLabel ?? o.optionlabel ?? 'label';
|
|
1840
|
+
const valueKey = o.optionValue ?? o.optionvalue ?? 'value';
|
|
1841
|
+
const caption = (key) => {
|
|
1842
|
+
const text = o.labels?.[String(key)];
|
|
1843
|
+
return typeof text === 'string' && text ? translations?.[text] || text : String(key);
|
|
1844
|
+
};
|
|
1845
|
+
return (source ?? []).map((item) => item !== null && typeof item === 'object'
|
|
1846
|
+
? { label: String(item[labelKey] ?? item[valueKey] ?? ''), value: item[valueKey] ?? item }
|
|
1847
|
+
: { label: caption(item), value: item });
|
|
1848
|
+
}
|
|
1849
|
+
/** The caption of the chosen entry; the value itself when no entry has it; "--" when empty. */
|
|
1850
|
+
function selectionCaption(entries, value) {
|
|
1851
|
+
if (isEmptyValue(value)) {
|
|
1852
|
+
return EMPTY_TEXT;
|
|
1853
|
+
}
|
|
1854
|
+
return entries.find(e => e.value === value || String(e.value) === String(value))?.label ?? String(value);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1748
1857
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
|
|
1749
1858
|
// - new: vlRules - a field's validation rules, only from its layout (field/field-model.ts
|
|
1750
1859
|
// fieldRules: required, email, minLength, maxLength, pattern, minimum, maximum). Pure: computed
|
|
@@ -2100,6 +2209,12 @@ function installOptionFullText() {
|
|
|
2100
2209
|
}, true);
|
|
2101
2210
|
}
|
|
2102
2211
|
|
|
2212
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
2213
|
+
// - new: paste - the clipboard's text into the field at the cursor (the field is read-only for the system keyboard, so
|
|
2214
|
+
// nothing could be pasted; OFFENE-PUNKTE 18), checked like typed text
|
|
2215
|
+
// - new: a field on a page (not in a dialog) moves above the keyboard too - the area the page scrolls in gets room at
|
|
2216
|
+
// its foot while the keyboard is open, and stands as before when it closes (luv2shop checkout on the phone: Street
|
|
2217
|
+
// lay under the keyboard)
|
|
2103
2218
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01
|
|
2104
2219
|
// - new: enterKey / submit / next - the key at the bottom right as set in the Designer (done, search, next)
|
|
2105
2220
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
@@ -2222,6 +2337,15 @@ function safeAreaRight() {
|
|
|
2222
2337
|
probe.remove();
|
|
2223
2338
|
return inset;
|
|
2224
2339
|
}
|
|
2340
|
+
/** The area an element scrolls in: the nearest ancestor that scrolls vertically, else the page itself. */
|
|
2341
|
+
function scrollParentOf(element) {
|
|
2342
|
+
for (let node = element.parentElement; node; node = node.parentElement) {
|
|
2343
|
+
const overflow = getComputedStyle(node).overflowY;
|
|
2344
|
+
if ((overflow === 'auto' || overflow === 'scroll') && node.scrollHeight > node.clientHeight)
|
|
2345
|
+
return node;
|
|
2346
|
+
}
|
|
2347
|
+
return document.scrollingElement || document.documentElement;
|
|
2348
|
+
}
|
|
2225
2349
|
class CustomKeyboardService {
|
|
2226
2350
|
openingSuspendedUntil = 0;
|
|
2227
2351
|
tapsTracked = false;
|
|
@@ -2504,7 +2628,11 @@ class CustomKeyboardService {
|
|
|
2504
2628
|
scrollTargetAboveKeyboard() {
|
|
2505
2629
|
const target = this.activeSession()?.target;
|
|
2506
2630
|
const content = target?.closest('.p-dialog-content');
|
|
2507
|
-
if (!target
|
|
2631
|
+
if (!target) {
|
|
2632
|
+
return;
|
|
2633
|
+
}
|
|
2634
|
+
if (!content) {
|
|
2635
|
+
this.pageFieldAboveKeyboard(target);
|
|
2508
2636
|
return;
|
|
2509
2637
|
}
|
|
2510
2638
|
const spacing = 12;
|
|
@@ -2517,6 +2645,41 @@ class CustomKeyboardService {
|
|
|
2517
2645
|
content.scrollTop -= area.top + spacing - field.top;
|
|
2518
2646
|
}
|
|
2519
2647
|
}
|
|
2648
|
+
/** The area a page scrolls in while the keyboard is open: its own bottom padding, how far it was moved. */
|
|
2649
|
+
pageRoom = null;
|
|
2650
|
+
/**
|
|
2651
|
+
* A field on a page: the area the page scrolls in gets room at its foot (the keyboard's height) and is moved just
|
|
2652
|
+
* far enough that the field stands above the keyboard. A field already above it does not move.
|
|
2653
|
+
*/
|
|
2654
|
+
pageFieldAboveKeyboard(target) {
|
|
2655
|
+
const keyboard = document.querySelector('[data-vl-custom-keyboard]');
|
|
2656
|
+
if (!keyboard || document.body.classList.contains(SIDE_DOCK_CLASS))
|
|
2657
|
+
return;
|
|
2658
|
+
const spacing = 12;
|
|
2659
|
+
const keyboardTop = keyboard.getBoundingClientRect().top;
|
|
2660
|
+
const field = (target.closest('.picker-field') ?? target).getBoundingClientRect();
|
|
2661
|
+
const missing = field.bottom - (keyboardTop - spacing);
|
|
2662
|
+
if (missing <= 0)
|
|
2663
|
+
return;
|
|
2664
|
+
if (!this.pageRoom) {
|
|
2665
|
+
const scroller = scrollParentOf(target);
|
|
2666
|
+
const padded = scroller === document.scrollingElement ? document.body : scroller;
|
|
2667
|
+
this.pageRoom = { scroller, padded, padding: padded.style.paddingBottom, moved: 0 };
|
|
2668
|
+
padded.style.paddingBottom = `${Math.ceil(keyboard.getBoundingClientRect().height) + spacing}px`;
|
|
2669
|
+
}
|
|
2670
|
+
const before = this.pageRoom.scroller.scrollTop;
|
|
2671
|
+
this.pageRoom.scroller.scrollTop += missing;
|
|
2672
|
+
this.pageRoom.moved += this.pageRoom.scroller.scrollTop - before;
|
|
2673
|
+
}
|
|
2674
|
+
/** The keyboard closed: the page's area loses the room and stands where it stood before. */
|
|
2675
|
+
releasePageRoom() {
|
|
2676
|
+
const room = this.pageRoom;
|
|
2677
|
+
if (!room)
|
|
2678
|
+
return;
|
|
2679
|
+
this.pageRoom = null;
|
|
2680
|
+
room.padded.style.paddingBottom = room.padding;
|
|
2681
|
+
room.scroller.scrollTop -= room.moved;
|
|
2682
|
+
}
|
|
2520
2683
|
canProcessKeyboardAction() {
|
|
2521
2684
|
return (!this.interactionBlocked() &&
|
|
2522
2685
|
this.activeSession() !== null);
|
|
@@ -2546,6 +2709,28 @@ class CustomKeyboardService {
|
|
|
2546
2709
|
}
|
|
2547
2710
|
this.updateTarget(target, nextValue, start + character.length);
|
|
2548
2711
|
}
|
|
2712
|
+
/**
|
|
2713
|
+
* The clipboard's text into the field at the cursor - the field is read-only while the keyboard is open (no system
|
|
2714
|
+
* keyboard), so the browser's own paste does not reach it. The tap on the key is the person's own action, so the
|
|
2715
|
+
* browser lets the clipboard be read (some ask first). Typed rules apply (insert); a refused read changes nothing.
|
|
2716
|
+
*/
|
|
2717
|
+
async paste() {
|
|
2718
|
+
if (!this.canProcessKeyboardAction())
|
|
2719
|
+
return;
|
|
2720
|
+
let text = '';
|
|
2721
|
+
try {
|
|
2722
|
+
text = await navigator.clipboard.readText();
|
|
2723
|
+
}
|
|
2724
|
+
catch {
|
|
2725
|
+
return;
|
|
2726
|
+
}
|
|
2727
|
+
if (!text)
|
|
2728
|
+
return;
|
|
2729
|
+
const session = this.activeSession();
|
|
2730
|
+
// one line unless the field takes several
|
|
2731
|
+
const single = session?.target?.tagName !== 'TEXTAREA';
|
|
2732
|
+
this.insert(single ? text.replace(/\s*[\r\n]+\s*/g, ' ') : text);
|
|
2733
|
+
}
|
|
2549
2734
|
backspace() {
|
|
2550
2735
|
if (!this.canProcessKeyboardAction()) {
|
|
2551
2736
|
return;
|
|
@@ -2635,6 +2820,9 @@ class CustomKeyboardService {
|
|
|
2635
2820
|
target.removeEventListener('blur', this.activeTargetBlurHandler);
|
|
2636
2821
|
this.markActiveField(target, false);
|
|
2637
2822
|
this.activeSession.set(null);
|
|
2823
|
+
// a page's field: the room at its foot goes again, unless the keyboard moves on to the next field
|
|
2824
|
+
if (!keepBottomArea)
|
|
2825
|
+
this.releasePageRoom();
|
|
2638
2826
|
if (this.interactionUnlockTimer !== null) {
|
|
2639
2827
|
window.clearTimeout(this.interactionUnlockTimer);
|
|
2640
2828
|
this.interactionUnlockTimer = null;
|
|
@@ -3303,6 +3491,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
3303
3491
|
args: ['focusin', ['$event']]
|
|
3304
3492
|
}] } });
|
|
3305
3493
|
|
|
3494
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
3495
|
+
// - fix: read only (card, grid) a value shows its caption (option.labels, the list's entry) - a combobox showed "red", not "Red"
|
|
3306
3496
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
3307
3497
|
// - fix: a chosen entry stores its value (autocomplete.response.value), not the whole entry (tm-test: Order # "[object Object]")
|
|
3308
3498
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-19
|
|
@@ -3465,7 +3655,8 @@ class Autocomplete {
|
|
|
3465
3655
|
return '--';
|
|
3466
3656
|
if (typeof value === 'object')
|
|
3467
3657
|
return `${value[this.optionLabel] ?? value[this.key] ?? ''}` || '--';
|
|
3468
|
-
|
|
3658
|
+
// the caption of the allowed value (option.labels) or of the list's entry, as a drop-down shows it
|
|
3659
|
+
return selectionCaption(selectionEntries(this.field?.option, this.list, this.translations), value);
|
|
3469
3660
|
}
|
|
3470
3661
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: Autocomplete, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3471
3662
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: Autocomplete, isStandalone: true, selector: "vl-autocomplete", inputs: { field: "field", target: "target", value: "value", readonly: "readonly", list: "list", loading: "loading", combobox: "combobox", keyboard: "keyboard", saveTried: "saveTried", errorMessages: "errorMessages", translations: "translations", inputStyle: "inputStyle", inputClass: "inputClass" }, outputs: { picked: "picked" }, viewQueries: [{ propertyName: "control", first: true, predicate: ["ac"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: AutoComplete, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28\r\n - fix: the field keeps the chosen entry's value (changed), not the entry -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - change: the one selection list of the library (autocomplete and combobox), #166 step 4.4\r\n 2026-10-19: the open list stays inside the page frame (fitList, test F15) -->\r\n<ng-container *ngIf=\"!readonly; else shownText\">\r\n <p-autocomplete #ac=\"ngModel\" [name]=\"field?.scope?.reference\" styleClass=\"custom-autocomplete\"\r\n [ngModel]=\"target.value\" (ngModelChange)=\"changed($event)\"\r\n [suggestions]=\"suggestions\" (completeMethod)=\"complete($event)\"\r\n [emptyMessage]=\"emptyText\" [showEmptyMessage]=\"true\" [dropdown]=\"true\"\r\n [forceSelection]=\"forceSelection\" [optionLabel]=\"optionLabel\"\r\n [required]=\"(field | vlRules).required\" [disabled]=\"field?.option?.disabled\"\r\n [placeholder]=\"placeholder()\" [vlCustomKeyboard]=\"keyboard\"\r\n [style]=\"inputStyle\" [class]=\"inputClass\" (onShow)=\"fitList()\">\r\n </p-autocomplete>\r\n <p class=\"text-danger vl-autocomplete__error\" *ngIf=\"showError()\">{{ message() }}</p>\r\n</ng-container>\r\n<ng-template #shownText>\r\n <span class=\"vl-autocomplete__text\">{{ shown(value) }}</span>\r\n</ng-template>\r\n", styles: [":host{display:block;min-width:0}:host ::ng-deep :where(.custom-autocomplete){border:1px solid var(--p-inputtext-border-color, #cbd5e1);border-radius:var(--p-inputtext-border-radius, 6px);background:var(--p-inputtext-background, #fff);min-height:2.5rem}::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}\n"], dependencies: [{ 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: AutoCompleteModule }, { kind: "component", type: i2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: RulesPipe, name: "vlRules" }], viewProviders: [{ provide: ControlContainer, useFactory: (form) => form, deps: [[new Optional(), new SkipSelf(), NgForm]] }] });
|
|
@@ -4037,6 +4228,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
4037
4228
|
}]
|
|
4038
4229
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }] });
|
|
4039
4230
|
|
|
4231
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
4232
|
+
// - change: convertToDailyLogs is gone - time recording's bookings are the app's add-on (OFFENE-PUNKTE 91)
|
|
4233
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
4234
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
4235
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
4236
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
4237
|
+
// - fix: cartValue - an empty cart's quantity and total price are 0, not empty
|
|
4238
|
+
// - new: dependent choice lists - a dropdown's data_url may name fields of the form ({{form.shipping.country.code}}: a
|
|
4239
|
+
// chosen option's field); it loads with their values and anew when they change, a choice no longer offered is
|
|
4240
|
+
// cleared, nothing loads while a named field is empty (refreshDependentDropdowns; luv2shop's states by country)
|
|
4241
|
+
// - new: useTestCard - a test run pays with Stripe's test payment method of a test card (catalog
|
|
4242
|
+
// stripeTestPaymentMethod): nobody can type into Stripe's frame; only with a test key, the card counts as whole
|
|
4040
4243
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
4041
4244
|
// - new: the card field in two or three rows (option.cardLayout): Stripe's cardNumber, cardExpiry and cardCvc; whole
|
|
4042
4245
|
// when every part is, paid with the card number (OFFENE-PUNKTE 103)
|
|
@@ -4095,11 +4298,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
4095
4298
|
// in a modal and stayed empty in a form
|
|
4096
4299
|
// - new: a @contract comment documenting that the toolkit utility, side menu,
|
|
4097
4300
|
// and ViewDefinition runtime handle keycloak, oktaAuth, and jwtToken.
|
|
4301
|
+
/** A data_url that names fields of the form ({{form.x}}) - it depends on them. */
|
|
4302
|
+
function dependsOnForm(url) {
|
|
4303
|
+
return typeof url === 'string' && /{{\s*form\./.test(url);
|
|
4304
|
+
}
|
|
4305
|
+
/** Every {{form.x}} of the address has a value in the context (an empty one loads nothing). */
|
|
4306
|
+
function formValuesGiven(url, context) {
|
|
4307
|
+
const paths = [...String(url).matchAll(/{{\s*form\.([^}|]+?)\s*(\|[^}]*)?}}/g)].map((m) => m[1].trim());
|
|
4308
|
+
return paths.every((path) => {
|
|
4309
|
+
const value = path.split('.').reduce((acc, key) => (acc == null ? undefined : acc[key]), context.form);
|
|
4310
|
+
return value != null && String(value) !== '';
|
|
4311
|
+
});
|
|
4312
|
+
}
|
|
4098
4313
|
class UtilityService {
|
|
4099
4314
|
platform;
|
|
4100
4315
|
requestService;
|
|
4101
4316
|
stripe = null;
|
|
4102
4317
|
cardElement = null;
|
|
4318
|
+
/** the Stripe key of the card field the page mounted - a test card is taken only with a test key */
|
|
4319
|
+
stripeKey = '';
|
|
4320
|
+
/** a test run's Stripe test payment method (useTestCard) - paid with instead of the card frame */
|
|
4321
|
+
testPaymentMethod = null;
|
|
4103
4322
|
/** Stripe says the card field holds a whole card (number, date, CVC) - a signal, so a locked button follows it */
|
|
4104
4323
|
cardComplete = signal(false, ...(ngDevMode ? [{ debugName: "cardComplete" }] : /* istanbul ignore next */ []));
|
|
4105
4324
|
constructor(platform, requestService) {
|
|
@@ -4276,7 +4495,8 @@ class UtilityService {
|
|
|
4276
4495
|
/** A field's start value from the cart: {{cart.quantity}} / {{cart.totalPrice}} - older {{quantity}} / {{totalPrice}} too. */
|
|
4277
4496
|
cartValue(text, cartInfo) {
|
|
4278
4497
|
const m = /\{\{\s*(?:cart\.)?(quantity|totalPrice)\s*\}\}/.exec(String(text ?? ''));
|
|
4279
|
-
|
|
4498
|
+
// an empty cart holds 0 - quantity and price showed nothing (a00 on the phone: "" instead of "0")
|
|
4499
|
+
return m ? cartInfo?.[m[1]] ?? 0 : undefined;
|
|
4280
4500
|
}
|
|
4281
4501
|
getTotalQuantity(tableitemInfo) {
|
|
4282
4502
|
let quantity = 0;
|
|
@@ -4424,7 +4644,9 @@ class UtilityService {
|
|
|
4424
4644
|
}
|
|
4425
4645
|
});
|
|
4426
4646
|
});
|
|
4647
|
+
this.testPaymentMethod = null;
|
|
4427
4648
|
if (cardField) {
|
|
4649
|
+
this.stripeKey = String(environment.stripePublishableKey || '');
|
|
4428
4650
|
this.stripe = await loadStripe(environment.stripePublishableKey);
|
|
4429
4651
|
const elements = this.stripe.elements();
|
|
4430
4652
|
this.cardComplete.set(false);
|
|
@@ -4468,16 +4690,33 @@ class UtilityService {
|
|
|
4468
4690
|
}));
|
|
4469
4691
|
return required && !this.cardComplete();
|
|
4470
4692
|
}
|
|
4693
|
+
/**
|
|
4694
|
+
* A test run's card: the card number of the test data ("4242 4242 4242 4242") becomes Stripe's test payment method
|
|
4695
|
+
* for it - nobody can type into Stripe's own frame. Only with a test key and a Stripe test card; the card then
|
|
4696
|
+
* counts as whole. ok false with the reason otherwise.
|
|
4697
|
+
*/
|
|
4698
|
+
useTestCard(cardNumber) {
|
|
4699
|
+
if (!this.stripe)
|
|
4700
|
+
return { ok: false, error: 'the page has no card field' };
|
|
4701
|
+
const method = stripeTestPaymentMethod(cardNumber, this.stripeKey);
|
|
4702
|
+
if (!method) {
|
|
4703
|
+
return { ok: false, error: /^pk_test_/.test(this.stripeKey) ? `${cardNumber} is no Stripe test card` : 'a test card is only taken with a Stripe test key (pk_test_)' };
|
|
4704
|
+
}
|
|
4705
|
+
this.testPaymentMethod = method;
|
|
4706
|
+
this.cardComplete.set(true);
|
|
4707
|
+
return { ok: true };
|
|
4708
|
+
}
|
|
4471
4709
|
/**
|
|
4472
4710
|
* Pays a payment intent with the card field of the page. ok false with the reason in error when the
|
|
4473
4711
|
* field is not there yet or Stripe refuses the card; the card data never leaves Stripe's own frame.
|
|
4474
4712
|
*/
|
|
4475
4713
|
async confirmCardPayment(clientSecret, billingDetails = {}) {
|
|
4476
|
-
if (!this.stripe || !this.cardElement) {
|
|
4714
|
+
if (!this.stripe || (!this.cardElement && !this.testPaymentMethod)) {
|
|
4477
4715
|
return { ok: false, error: 'The card field is not ready.' };
|
|
4478
4716
|
}
|
|
4717
|
+
// a test run's Stripe test payment method (useTestCard), else the card the person typed into Stripe's frame
|
|
4479
4718
|
const result = await this.stripe.confirmCardPayment(clientSecret, {
|
|
4480
|
-
payment_method: { card: this.cardElement, billing_details: billingDetails },
|
|
4719
|
+
payment_method: this.testPaymentMethod ?? { card: this.cardElement, billing_details: billingDetails },
|
|
4481
4720
|
});
|
|
4482
4721
|
if (result.error) {
|
|
4483
4722
|
return { ok: false, error: result.error.message };
|
|
@@ -4495,9 +4734,10 @@ class UtilityService {
|
|
|
4495
4734
|
if (!field)
|
|
4496
4735
|
continue;
|
|
4497
4736
|
// Checkbox logic with copy action
|
|
4498
|
-
if ((field.type === 'boolean' || field.type === 'checkbox') && formField.option
|
|
4499
|
-
const
|
|
4500
|
-
const
|
|
4737
|
+
if ((field.type === 'boolean' || field.type === 'checkbox') && actionName(formField.option, 'field') === 'copy') {
|
|
4738
|
+
const { from, to } = actionParams(formField.option, 'field');
|
|
4739
|
+
const fromSchema = form.propertySchema[from];
|
|
4740
|
+
const toSchema = form.propertySchema[to];
|
|
4501
4741
|
const keys = Object.keys(fromSchema);
|
|
4502
4742
|
keys.forEach((key) => {
|
|
4503
4743
|
if (toSchema[key]) {
|
|
@@ -4506,8 +4746,8 @@ class UtilityService {
|
|
|
4506
4746
|
}
|
|
4507
4747
|
});
|
|
4508
4748
|
}
|
|
4509
|
-
// Dropdown logic (async data fetching)
|
|
4510
|
-
if (field.type === 'dropdown' && formField.option?.data_url) {
|
|
4749
|
+
// Dropdown logic (async data fetching) - one naming fields of the form loads after them (below)
|
|
4750
|
+
if (field.type === 'dropdown' && formField.option?.data_url && !dependsOnForm(formField.option.data_url)) {
|
|
4511
4751
|
try {
|
|
4512
4752
|
const res = await lastValueFrom(this.requestService.getInfo(environment.apiUrl + formField.option.data_url, formField.option));
|
|
4513
4753
|
const key = Object.keys(res._embedded || {})[0];
|
|
@@ -4529,6 +4769,92 @@ class UtilityService {
|
|
|
4529
4769
|
}
|
|
4530
4770
|
}
|
|
4531
4771
|
}
|
|
4772
|
+
// the dropdowns that name fields of the form load with the values just set
|
|
4773
|
+
this.formEnvironment = environment;
|
|
4774
|
+
await this.refreshDependentDropdowns(form);
|
|
4775
|
+
}
|
|
4776
|
+
/** The environment of the form loaded last - its dependent dropdowns load from env.apiUrl. */
|
|
4777
|
+
formEnvironment = null;
|
|
4778
|
+
/** A dependent dropdown's address loading now - one call per address at a time. */
|
|
4779
|
+
dependentLoading = new Set();
|
|
4780
|
+
/**
|
|
4781
|
+
* The values of the form for its placeholders: {{form.<group>.<field>}}. A dropdown's value is its chosen option, so
|
|
4782
|
+
* {{form.shipping.country.code}} names a field of it; on its own it reads as the chosen value.
|
|
4783
|
+
*/
|
|
4784
|
+
formPlaceholderContext(form) {
|
|
4785
|
+
const out = {};
|
|
4786
|
+
for (const section of form?.layoutSchema?.formSections || []) {
|
|
4787
|
+
for (const formField of section?.formFields || []) {
|
|
4788
|
+
const reference = formField?.scope?.reference;
|
|
4789
|
+
if (typeof reference !== 'string')
|
|
4790
|
+
continue;
|
|
4791
|
+
const group = this.getScope(reference);
|
|
4792
|
+
const key = reference.split('/').pop();
|
|
4793
|
+
const field = form?.propertySchema?.[group]?.[key];
|
|
4794
|
+
if (!field)
|
|
4795
|
+
continue;
|
|
4796
|
+
let value = field.value;
|
|
4797
|
+
if (Array.isArray(field.data) && value != null && value !== '') {
|
|
4798
|
+
const valueKey = formField.option?.optionValue ?? formField.option?.optionvalue ?? 'value';
|
|
4799
|
+
const chosen = field.data.find((o) => String(o?.[valueKey] ?? o) === String(value));
|
|
4800
|
+
if (chosen && typeof chosen === 'object') {
|
|
4801
|
+
const shown = value;
|
|
4802
|
+
value = Object.assign(Object.create({ toString: () => String(shown) }), chosen);
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
(out[group] ??= {})[key] = value;
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
return out;
|
|
4809
|
+
}
|
|
4810
|
+
/**
|
|
4811
|
+
* The dropdowns whose data_url names fields of the form: loaded with the values of now when the address changed;
|
|
4812
|
+
* a field still empty loads nothing (an empty list), a choice the new list no longer offers is cleared. Called after
|
|
4813
|
+
* the form loaded and on every change of the form (FormComponent.ngDoCheck) - cheap when nothing changed.
|
|
4814
|
+
*/
|
|
4815
|
+
async refreshDependentDropdowns(form) {
|
|
4816
|
+
const env = this.formEnvironment;
|
|
4817
|
+
if (!env || !form?.layoutSchema?.formSections)
|
|
4818
|
+
return;
|
|
4819
|
+
const context = { form: this.formPlaceholderContext(form) };
|
|
4820
|
+
for (const section of form.layoutSchema.formSections) {
|
|
4821
|
+
for (const formField of section?.formFields || []) {
|
|
4822
|
+
const template = formField?.option?.data_url;
|
|
4823
|
+
if (!dependsOnForm(template))
|
|
4824
|
+
continue;
|
|
4825
|
+
const reference = formField.scope.reference;
|
|
4826
|
+
const field = form.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop()];
|
|
4827
|
+
if (!field || field.type !== 'dropdown')
|
|
4828
|
+
continue;
|
|
4829
|
+
const url = fillPlaceholders(template, context, true);
|
|
4830
|
+
if (field.loadedFrom === url || this.dependentLoading.has(reference + url))
|
|
4831
|
+
continue;
|
|
4832
|
+
field.loadedFrom = url;
|
|
4833
|
+
const valueKey = formField.option?.optionValue ?? formField.option?.optionvalue ?? 'value';
|
|
4834
|
+
const keep = (data) => {
|
|
4835
|
+
field.data = data;
|
|
4836
|
+
if (field.value != null && field.value !== '' && !data.some((o) => String(o?.[valueKey] ?? o) === String(field.value)))
|
|
4837
|
+
field.value = null;
|
|
4838
|
+
};
|
|
4839
|
+
if (!formValuesGiven(template, context)) {
|
|
4840
|
+
keep([]);
|
|
4841
|
+
continue;
|
|
4842
|
+
}
|
|
4843
|
+
this.dependentLoading.add(reference + url);
|
|
4844
|
+
try {
|
|
4845
|
+
const res = await lastValueFrom(this.requestService.getInfo(env.apiUrl + url, formField.option));
|
|
4846
|
+
const listKey = Object.keys(res?._embedded || {})[0];
|
|
4847
|
+
keep(listKey ? res._embedded[listKey] : Array.isArray(res) ? res : []);
|
|
4848
|
+
}
|
|
4849
|
+
catch (err) {
|
|
4850
|
+
console.error('Failed to load dependent dropdown data', err);
|
|
4851
|
+
field.loadedFrom = null;
|
|
4852
|
+
}
|
|
4853
|
+
finally {
|
|
4854
|
+
this.dependentLoading.delete(reference + url);
|
|
4855
|
+
}
|
|
4856
|
+
}
|
|
4857
|
+
}
|
|
4532
4858
|
}
|
|
4533
4859
|
// set date in localstorage
|
|
4534
4860
|
normalizeDatesForStorage(obj) {
|
|
@@ -4578,100 +4904,6 @@ class UtilityService {
|
|
|
4578
4904
|
parseLocalISODate(value) {
|
|
4579
4905
|
return parseStorageDate(value);
|
|
4580
4906
|
}
|
|
4581
|
-
// savecard conversion
|
|
4582
|
-
convertToDailyLogs(cardOrCards) {
|
|
4583
|
-
// Normalize input to array
|
|
4584
|
-
const cards = Array.isArray(cardOrCards) ? cardOrCards : [cardOrCards];
|
|
4585
|
-
const results = [];
|
|
4586
|
-
for (const card of cards) {
|
|
4587
|
-
const fromDate = new Date(card.fromDate);
|
|
4588
|
-
const toDate = new Date(card.toDate);
|
|
4589
|
-
const fromTime = new Date(card.workDayTimeFrom);
|
|
4590
|
-
const toTime = new Date(card.workDayTimeTo);
|
|
4591
|
-
// Normalize dates to midnight
|
|
4592
|
-
const startDay = new Date(fromDate);
|
|
4593
|
-
startDay.setHours(0, 0, 0, 0);
|
|
4594
|
-
const endDay = new Date(toDate);
|
|
4595
|
-
endDay.setHours(0, 0, 0, 0);
|
|
4596
|
-
let currentDay = new Date(startDay);
|
|
4597
|
-
while (currentDay <= endDay) {
|
|
4598
|
-
const isFirstDay = this.isSameDay(currentDay, fromDate);
|
|
4599
|
-
const isLastDay = this.isSameDay(currentDay, toDate);
|
|
4600
|
-
const isSameDay = isFirstDay && isLastDay;
|
|
4601
|
-
let workFrom;
|
|
4602
|
-
let workTo;
|
|
4603
|
-
// SAME DAY
|
|
4604
|
-
if (isSameDay) {
|
|
4605
|
-
workFrom = this.applyTimeToDay(currentDay, fromTime);
|
|
4606
|
-
workTo = this.applyTimeToDay(currentDay, toTime);
|
|
4607
|
-
}
|
|
4608
|
-
// FIRST DAY
|
|
4609
|
-
else if (isFirstDay) {
|
|
4610
|
-
workFrom = this.applyTimeToDay(currentDay, fromTime);
|
|
4611
|
-
workTo = this.endOfDay(currentDay);
|
|
4612
|
-
}
|
|
4613
|
-
// LAST DAY
|
|
4614
|
-
else if (isLastDay) {
|
|
4615
|
-
workFrom = this.startOfDay(currentDay);
|
|
4616
|
-
workTo = this.applyTimeToDay(currentDay, toTime);
|
|
4617
|
-
}
|
|
4618
|
-
// MIDDLE DAY
|
|
4619
|
-
else {
|
|
4620
|
-
workFrom = this.startOfDay(currentDay);
|
|
4621
|
-
workTo = this.endOfDay(currentDay);
|
|
4622
|
-
}
|
|
4623
|
-
results.push({
|
|
4624
|
-
comment: card.comments || "",
|
|
4625
|
-
onCallDuty: false,
|
|
4626
|
-
timeCredit: false,
|
|
4627
|
-
workDay: this.toLocalISO(currentDay, 0, 0),
|
|
4628
|
-
workDayTimeFrom: this.toLocalISO(workFrom),
|
|
4629
|
-
workDayTimeTo: this.toLocalISO(workTo),
|
|
4630
|
-
workOrderNo: card.workOrderNo,
|
|
4631
|
-
workType: "A"
|
|
4632
|
-
});
|
|
4633
|
-
currentDay.setDate(currentDay.getDate() + 1);
|
|
4634
|
-
}
|
|
4635
|
-
}
|
|
4636
|
-
return results;
|
|
4637
|
-
}
|
|
4638
|
-
applyTimeToDay(day, time) {
|
|
4639
|
-
const d = new Date(day);
|
|
4640
|
-
d.setHours(time.getHours(), time.getMinutes(), 0, 0);
|
|
4641
|
-
return d;
|
|
4642
|
-
}
|
|
4643
|
-
startOfDay(d) {
|
|
4644
|
-
const x = new Date(d);
|
|
4645
|
-
x.setHours(0, 0, 0, 0);
|
|
4646
|
-
return x;
|
|
4647
|
-
}
|
|
4648
|
-
endOfDay(d) {
|
|
4649
|
-
const x = new Date(d);
|
|
4650
|
-
x.setHours(23, 59, 0, 0);
|
|
4651
|
-
return x;
|
|
4652
|
-
}
|
|
4653
|
-
isSameDay(a, b) {
|
|
4654
|
-
return (a.getFullYear() === b.getFullYear() &&
|
|
4655
|
-
a.getMonth() === b.getMonth() &&
|
|
4656
|
-
a.getDate() === b.getDate());
|
|
4657
|
-
}
|
|
4658
|
-
toLocalISO(date, hour, minute) {
|
|
4659
|
-
const d = new Date(date);
|
|
4660
|
-
if (hour !== undefined && minute !== undefined) {
|
|
4661
|
-
d.setHours(hour, minute, 0, 0);
|
|
4662
|
-
}
|
|
4663
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
4664
|
-
const year = d.getFullYear();
|
|
4665
|
-
const month = pad(d.getMonth() + 1);
|
|
4666
|
-
const day = pad(d.getDate());
|
|
4667
|
-
const hrs = pad(d.getHours());
|
|
4668
|
-
const mins = pad(d.getMinutes());
|
|
4669
|
-
const offset = -d.getTimezoneOffset();
|
|
4670
|
-
const sign = offset >= 0 ? '+' : '-';
|
|
4671
|
-
const offH = pad(Math.floor(Math.abs(offset) / 60));
|
|
4672
|
-
const offM = pad(Math.abs(offset) % 60);
|
|
4673
|
-
return `${year}-${month}-${day}T${hrs}:${mins}:00${sign}${offH}:${offM}`;
|
|
4674
|
-
}
|
|
4675
4907
|
getMediaSrc(file) {
|
|
4676
4908
|
if (!file)
|
|
4677
4909
|
return '';
|
|
@@ -5270,6 +5502,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
5270
5502
|
}]
|
|
5271
5503
|
}], ctorParameters: () => [{ type: CustomKeyboardService }] });
|
|
5272
5504
|
|
|
5505
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
5506
|
+
// - new: a date with time in display style iso keeps 24 hours in every language; data-vl-date-iso marks the field
|
|
5273
5507
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
5274
5508
|
// - fix: date and time in one field: the calendar stays open after the day, so the time can be set (it closed and
|
|
5275
5509
|
// the time stood on "now"); a tap beside it closes it (OFFENE-PUNKTE 47)
|
|
@@ -5315,8 +5549,15 @@ class DateTimeControl {
|
|
|
5315
5549
|
pattern() {
|
|
5316
5550
|
return dateInputPattern(this.field?.option, this.property ?? this.target);
|
|
5317
5551
|
}
|
|
5552
|
+
/** Display style iso: the date as 2026-10-30 in every language (a test types year, month, day - data-vl-date-iso) */
|
|
5553
|
+
isIso() {
|
|
5554
|
+
return this.kind !== 'time' && isIsoDate(this.field?.option);
|
|
5555
|
+
}
|
|
5318
5556
|
/** "12" (en, AM/PM) or "24" - by the app language */
|
|
5319
5557
|
hourFormat() {
|
|
5558
|
+
// a date with time in display style iso keeps 24 hours in every language
|
|
5559
|
+
if (this.kind === 'datetime' && isIsoDate(this.field?.option))
|
|
5560
|
+
return '24';
|
|
5320
5561
|
return timeHourFormat();
|
|
5321
5562
|
}
|
|
5322
5563
|
placeholder() {
|
|
@@ -5389,6 +5630,7 @@ class DateTimeControl {
|
|
|
5389
5630
|
[hideOnDateTimeSelect]="kind !== 'datetime'"
|
|
5390
5631
|
[attr.data-vl-time-12]="kind === 'time' && hourFormat() === '12' ? '' : null"
|
|
5391
5632
|
[dateFormat]="pattern()" [attr.data-vl-date-format]="kind === 'date' ? pattern() : null"
|
|
5633
|
+
[attr.data-vl-date-iso]="isIso() ? '' : null"
|
|
5392
5634
|
[showIcon]="false" [showOnFocus]="false" appendTo="body" [autoZIndex]="true" [baseZIndex]="10000"
|
|
5393
5635
|
[panelStyleClass]="kind === 'time' ? picker.timePanelClass : picker.datePanelClass"
|
|
5394
5636
|
[motionOptions]="kind === 'time' ? undefined : picker.dockedMotion"
|
|
@@ -5426,6 +5668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
5426
5668
|
[hideOnDateTimeSelect]="kind !== 'datetime'"
|
|
5427
5669
|
[attr.data-vl-time-12]="kind === 'time' && hourFormat() === '12' ? '' : null"
|
|
5428
5670
|
[dateFormat]="pattern()" [attr.data-vl-date-format]="kind === 'date' ? pattern() : null"
|
|
5671
|
+
[attr.data-vl-date-iso]="isIso() ? '' : null"
|
|
5429
5672
|
[showIcon]="false" [showOnFocus]="false" appendTo="body" [autoZIndex]="true" [baseZIndex]="10000"
|
|
5430
5673
|
[panelStyleClass]="kind === 'time' ? picker.timePanelClass : picker.datePanelClass"
|
|
5431
5674
|
[motionOptions]="kind === 'time' ? undefined : picker.dockedMotion"
|
|
@@ -5599,62 +5842,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
5599
5842
|
type: Output
|
|
5600
5843
|
}] } });
|
|
5601
5844
|
|
|
5602
|
-
// Shuaib 2026-10-21
|
|
5603
|
-
// - new: what a list (card, grid) shows for a field, the one rule for <vl-control mode="display">:
|
|
5604
|
-
// the value the record stores - never the property's default, which belongs only to a new record
|
|
5605
|
-
// in the dialog (an empty status showed "beantragt") -, "--" for an empty value, a date or time as
|
|
5606
|
-
// text, a selection as the caption of the chosen entry (also used by vl-dropdown). No Angular, so
|
|
5607
|
-
// it can be tested with node --test (#166)
|
|
5608
|
-
/** What a list shows for an empty value. */
|
|
5609
|
-
const EMPTY_TEXT = '--';
|
|
5610
|
-
function isEmptyValue(value) {
|
|
5611
|
-
return value === null || value === undefined || value === '';
|
|
5612
|
-
}
|
|
5613
|
-
/** The value of a field in a record ("#/workOrder/properties/status" -> record.status), as stored. */
|
|
5614
|
-
function displayValue(field, record) {
|
|
5615
|
-
const { name } = splitReference(field?.scope?.reference);
|
|
5616
|
-
return name ? record?.[name] : undefined;
|
|
5617
|
-
}
|
|
5618
|
-
/** A plain value as text: "--" when empty. */
|
|
5619
|
-
function displayText(value) {
|
|
5620
|
-
return isEmptyValue(value) ? EMPTY_TEXT : String(value);
|
|
5621
|
-
}
|
|
5622
|
-
/** A date, time or date and time as text in the app language (services/date-display.ts); "--" when empty. */
|
|
5623
|
-
function displayDateText(value, kind, option) {
|
|
5624
|
-
if (isEmptyValue(value)) {
|
|
5625
|
-
return EMPTY_TEXT;
|
|
5626
|
-
}
|
|
5627
|
-
const text = displayDateValue(value, kind, option);
|
|
5628
|
-
return isEmptyValue(text) ? EMPTY_TEXT : String(text);
|
|
5629
|
-
}
|
|
5630
|
-
/**
|
|
5631
|
-
* The entries of a selection: the Designer's allowed values with their labels
|
|
5632
|
-
* (option.fieldData.validation.enum, option.labels), or the field's list (the property's data, from
|
|
5633
|
-
* option.autocomplete) read with optionLabel / optionValue (the Designer writes optionlabel /
|
|
5634
|
-
* optionvalue - both are read).
|
|
5635
|
-
*/
|
|
5636
|
-
function selectionEntries(option, items, translations) {
|
|
5637
|
-
const o = option ?? {};
|
|
5638
|
-
const values = o.fieldData?.validation?.enum;
|
|
5639
|
-
const source = Array.isArray(values) && values.length ? values : items;
|
|
5640
|
-
const labelKey = o.optionLabel ?? o.optionlabel ?? 'label';
|
|
5641
|
-
const valueKey = o.optionValue ?? o.optionvalue ?? 'value';
|
|
5642
|
-
const caption = (key) => {
|
|
5643
|
-
const text = o.labels?.[String(key)];
|
|
5644
|
-
return typeof text === 'string' && text ? translations?.[text] || text : String(key);
|
|
5645
|
-
};
|
|
5646
|
-
return (source ?? []).map((item) => item !== null && typeof item === 'object'
|
|
5647
|
-
? { label: String(item[labelKey] ?? item[valueKey] ?? ''), value: item[valueKey] ?? item }
|
|
5648
|
-
: { label: caption(item), value: item });
|
|
5649
|
-
}
|
|
5650
|
-
/** The caption of the chosen entry; the value itself when no entry has it; "--" when empty. */
|
|
5651
|
-
function selectionCaption(entries, value) {
|
|
5652
|
-
if (isEmptyValue(value)) {
|
|
5653
|
-
return EMPTY_TEXT;
|
|
5654
|
-
}
|
|
5655
|
-
return entries.find(e => e.value === value || String(e.value) === String(value))?.label ?? String(value);
|
|
5656
|
-
}
|
|
5657
|
-
|
|
5658
5845
|
// Shuaib 2026-10-21
|
|
5659
5846
|
// - change: entries and the shown caption come from controls/display-value.ts (selectionEntries,
|
|
5660
5847
|
// selectionCaption), the rule the lists use too; unchanged behaviour (#166)
|
|
@@ -5759,6 +5946,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
5759
5946
|
args: ['dd']
|
|
5760
5947
|
}] } });
|
|
5761
5948
|
|
|
5949
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
5950
|
+
// - new: vl-pdf-viewer - a PDF shown inside the app, the same on laptop, tablet and phone: drawn by pdf.js, so it
|
|
5951
|
+
// depends neither on the browser's PDF plugin (an embedded PDF stays blank on Android) nor on leaving the app
|
|
5952
|
+
// for a new tab (point 185). A layer of its own above everything, so it opens from a dialog, a menu or a field.
|
|
5953
|
+
// The app ships the worker as assets/pdfjs/pdf.worker.min.mjs; pdf.js itself loads on the first PDF.
|
|
5954
|
+
const MIN_ZOOM = 0.5;
|
|
5955
|
+
const MAX_ZOOM = 3;
|
|
5956
|
+
/** The bytes of a base64 text. */
|
|
5957
|
+
function bytesOfBase64(text) {
|
|
5958
|
+
const binary = atob(String(text).replace(/^data:[^,]*,/, ''));
|
|
5959
|
+
const bytes = new Uint8Array(binary.length);
|
|
5960
|
+
for (let i = 0; i < binary.length; i++)
|
|
5961
|
+
bytes[i] = binary.charCodeAt(i);
|
|
5962
|
+
return bytes;
|
|
5963
|
+
}
|
|
5964
|
+
/** The next zoom step, within the limits. */
|
|
5965
|
+
function nextZoom(zoom, step) {
|
|
5966
|
+
return Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, Math.round((zoom + step) * 100) / 100));
|
|
5967
|
+
}
|
|
5968
|
+
async function pdfBytes(source) {
|
|
5969
|
+
const url = source.url;
|
|
5970
|
+
if (/^https?:/i.test(url) && isNativeMobile()) {
|
|
5971
|
+
// native HTTP on the devices: no CORS, the same way as every backend call
|
|
5972
|
+
const answer = await CapacitorHttp.request({ url, method: 'GET', responseType: 'blob' });
|
|
5973
|
+
if (answer.status >= 400)
|
|
5974
|
+
throw new Error(`${answer.status}`);
|
|
5975
|
+
return bytesOfBase64(answer.data);
|
|
5976
|
+
}
|
|
5977
|
+
const address = /^https?:/i.test(url) ? backendUrl(url, proxyFor(source.option ?? {})) : url;
|
|
5978
|
+
const response = await fetch(address);
|
|
5979
|
+
if (!response.ok)
|
|
5980
|
+
throw new Error(`${response.status}`);
|
|
5981
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
5982
|
+
}
|
|
5983
|
+
class PdfViewerComponent {
|
|
5984
|
+
source = { url: '' };
|
|
5985
|
+
area;
|
|
5986
|
+
/** set by the service: takes the layer away */
|
|
5987
|
+
closed = () => { };
|
|
5988
|
+
pages = signal([], ...(ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []));
|
|
5989
|
+
problem = signal(false, ...(ngDevMode ? [{ debugName: "problem" }] : /* istanbul ignore next */ []));
|
|
5990
|
+
doc = null;
|
|
5991
|
+
zoom = 1;
|
|
5992
|
+
observer = null;
|
|
5993
|
+
drawn = new Map();
|
|
5994
|
+
async ngOnInit() {
|
|
5995
|
+
try {
|
|
5996
|
+
const pdfjs = await import('pdfjs-dist/legacy/build/pdf.mjs');
|
|
5997
|
+
pdfjs.GlobalWorkerOptions.workerSrc = new URL('assets/pdfjs/pdf.worker.min.mjs', document.baseURI).href;
|
|
5998
|
+
this.doc = await pdfjs.getDocument({ data: await pdfBytes(this.source) }).promise;
|
|
5999
|
+
this.pages.set(Array.from({ length: this.doc.numPages }, (_, i) => i + 1));
|
|
6000
|
+
// the canvases stand after the next drawing
|
|
6001
|
+
requestAnimationFrame(() => void this.prepare());
|
|
6002
|
+
}
|
|
6003
|
+
catch (error) {
|
|
6004
|
+
console.error('The PDF could not be shown', error);
|
|
6005
|
+
this.problem.set(true);
|
|
6006
|
+
}
|
|
6007
|
+
}
|
|
6008
|
+
ngOnDestroy() {
|
|
6009
|
+
this.observer?.disconnect();
|
|
6010
|
+
void this.doc?.destroy?.();
|
|
6011
|
+
}
|
|
6012
|
+
t(key, english) {
|
|
6013
|
+
return this.source.translations?.[key] || english;
|
|
6014
|
+
}
|
|
6015
|
+
close() {
|
|
6016
|
+
this.closed();
|
|
6017
|
+
}
|
|
6018
|
+
onEscape() {
|
|
6019
|
+
this.close();
|
|
6020
|
+
}
|
|
6021
|
+
zoomBy(step) {
|
|
6022
|
+
this.zoom = nextZoom(this.zoom, step);
|
|
6023
|
+
this.drawn.clear();
|
|
6024
|
+
void this.prepare();
|
|
6025
|
+
}
|
|
6026
|
+
canvases() {
|
|
6027
|
+
return Array.from(this.area?.nativeElement.querySelectorAll('canvas') ?? []);
|
|
6028
|
+
}
|
|
6029
|
+
/** Every page gets a size at once (the scroll bar is right), its content when it comes into view. */
|
|
6030
|
+
async prepare() {
|
|
6031
|
+
this.observer?.disconnect();
|
|
6032
|
+
const area = this.area?.nativeElement;
|
|
6033
|
+
if (!area)
|
|
6034
|
+
return;
|
|
6035
|
+
this.observer = new IntersectionObserver(entries => {
|
|
6036
|
+
for (const entry of entries) {
|
|
6037
|
+
if (entry.isIntersecting)
|
|
6038
|
+
void this.draw(entry.target);
|
|
6039
|
+
}
|
|
6040
|
+
}, { root: area, rootMargin: '600px 0px' });
|
|
6041
|
+
// the size of the first page for all: asking every page first took seconds in a long document; a page of
|
|
6042
|
+
// another size takes its own when it is drawn
|
|
6043
|
+
const size = this.sizeOf(await this.doc.getPage(1));
|
|
6044
|
+
for (const canvas of this.canvases()) {
|
|
6045
|
+
canvas.style.width = `${size.width}px`;
|
|
6046
|
+
canvas.style.height = `${size.height}px`;
|
|
6047
|
+
this.observer.observe(canvas);
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
6050
|
+
/** The page as wide as the area, times the zoom. */
|
|
6051
|
+
sizeOf(page) {
|
|
6052
|
+
const natural = page.getViewport({ scale: 1 });
|
|
6053
|
+
const room = (this.area?.nativeElement.clientWidth ?? natural.width) - 16;
|
|
6054
|
+
const scale = (room / natural.width) * this.zoom;
|
|
6055
|
+
return { width: natural.width * scale, height: natural.height * scale, scale };
|
|
6056
|
+
}
|
|
6057
|
+
async draw(canvas) {
|
|
6058
|
+
const number = Number(canvas.dataset['page']);
|
|
6059
|
+
if (this.drawn.get(number) === this.zoom)
|
|
6060
|
+
return;
|
|
6061
|
+
this.drawn.set(number, this.zoom);
|
|
6062
|
+
const page = await this.doc.getPage(number);
|
|
6063
|
+
const ratio = Math.min(window.devicePixelRatio || 1, 2);
|
|
6064
|
+
const size = this.sizeOf(page);
|
|
6065
|
+
const viewport = page.getViewport({ scale: size.scale * ratio });
|
|
6066
|
+
canvas.style.width = `${size.width}px`;
|
|
6067
|
+
canvas.style.height = `${size.height}px`;
|
|
6068
|
+
canvas.width = viewport.width;
|
|
6069
|
+
canvas.height = viewport.height;
|
|
6070
|
+
await page.render({ canvas, canvasContext: canvas.getContext('2d'), viewport }).promise;
|
|
6071
|
+
}
|
|
6072
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PdfViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: PdfViewerComponent, isStandalone: true, selector: "vl-pdf-viewer", inputs: { source: "source" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "area", first: true, predicate: ["pagesArea"], descendants: true }], ngImport: i0, template: `
|
|
6074
|
+
<div class="vl-pdf" role="dialog" aria-modal="true" [attr.aria-label]="source.title || 'PDF'">
|
|
6075
|
+
<div class="vl-pdf__bar">
|
|
6076
|
+
<span class="vl-pdf__title">{{ source.title || 'PDF' }}</span>
|
|
6077
|
+
@if (pages().length) {
|
|
6078
|
+
<span class="vl-pdf__count">{{ pages().length }} {{ t('pdfPages', 'pages') }}</span>
|
|
6079
|
+
<button type="button" class="vl-pdf__btn" [attr.aria-label]="t('pdfZoomOut', 'Smaller')" (click)="zoomBy(-0.25)">−</button>
|
|
6080
|
+
<button type="button" class="vl-pdf__btn" [attr.aria-label]="t('pdfZoomIn', 'Larger')" (click)="zoomBy(0.25)">+</button>
|
|
6081
|
+
}
|
|
6082
|
+
<button type="button" class="vl-pdf__btn" data-vl-action="closePdf" [attr.aria-label]="t('pdfClose', 'Close')" (click)="close()">×</button>
|
|
6083
|
+
</div>
|
|
6084
|
+
<div class="vl-pdf__pages" #pagesArea>
|
|
6085
|
+
@if (problem()) {
|
|
6086
|
+
<p class="vl-pdf__note vl-pdf__note--failed">{{ t('pdfFailed', 'The PDF could not be loaded.') }}</p>
|
|
6087
|
+
} @else if (!pages().length) {
|
|
6088
|
+
<p class="vl-pdf__note">{{ t('pdfLoading', 'Loading…') }}</p>
|
|
6089
|
+
}
|
|
6090
|
+
@for (page of pages(); track page) {
|
|
6091
|
+
<canvas class="vl-pdf__page" [attr.data-page]="page"></canvas>
|
|
6092
|
+
}
|
|
6093
|
+
</div>
|
|
6094
|
+
</div>`, isInline: true, styles: [".vl-pdf{position:fixed;inset:0;z-index:100000;display:flex;flex-direction:column;background:#525659;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.vl-pdf__bar{display:flex;align-items:center;gap:8px;min-height:48px;padding:4px 12px;background:#fff;box-sizing:border-box}.vl-pdf__title{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600}.vl-pdf__count{color:#6b7280;font-size:13px;white-space:nowrap}.vl-pdf__btn{width:40px;height:40px;border:1px solid #d1d5db;border-radius:4px;background:#fff;font-size:20px;line-height:1;cursor:pointer}.vl-pdf__pages{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:8px;box-sizing:border-box;text-align:center}.vl-pdf__page{display:block;margin:0 auto 8px;background:#fff}.vl-pdf__note{color:#fff;margin-top:24px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6095
|
+
}
|
|
6096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PdfViewerComponent, decorators: [{
|
|
6097
|
+
type: Component,
|
|
6098
|
+
args: [{ selector: 'vl-pdf-viewer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
6099
|
+
<div class="vl-pdf" role="dialog" aria-modal="true" [attr.aria-label]="source.title || 'PDF'">
|
|
6100
|
+
<div class="vl-pdf__bar">
|
|
6101
|
+
<span class="vl-pdf__title">{{ source.title || 'PDF' }}</span>
|
|
6102
|
+
@if (pages().length) {
|
|
6103
|
+
<span class="vl-pdf__count">{{ pages().length }} {{ t('pdfPages', 'pages') }}</span>
|
|
6104
|
+
<button type="button" class="vl-pdf__btn" [attr.aria-label]="t('pdfZoomOut', 'Smaller')" (click)="zoomBy(-0.25)">−</button>
|
|
6105
|
+
<button type="button" class="vl-pdf__btn" [attr.aria-label]="t('pdfZoomIn', 'Larger')" (click)="zoomBy(0.25)">+</button>
|
|
6106
|
+
}
|
|
6107
|
+
<button type="button" class="vl-pdf__btn" data-vl-action="closePdf" [attr.aria-label]="t('pdfClose', 'Close')" (click)="close()">×</button>
|
|
6108
|
+
</div>
|
|
6109
|
+
<div class="vl-pdf__pages" #pagesArea>
|
|
6110
|
+
@if (problem()) {
|
|
6111
|
+
<p class="vl-pdf__note vl-pdf__note--failed">{{ t('pdfFailed', 'The PDF could not be loaded.') }}</p>
|
|
6112
|
+
} @else if (!pages().length) {
|
|
6113
|
+
<p class="vl-pdf__note">{{ t('pdfLoading', 'Loading…') }}</p>
|
|
6114
|
+
}
|
|
6115
|
+
@for (page of pages(); track page) {
|
|
6116
|
+
<canvas class="vl-pdf__page" [attr.data-page]="page"></canvas>
|
|
6117
|
+
}
|
|
6118
|
+
</div>
|
|
6119
|
+
</div>`, styles: [".vl-pdf{position:fixed;inset:0;z-index:100000;display:flex;flex-direction:column;background:#525659;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.vl-pdf__bar{display:flex;align-items:center;gap:8px;min-height:48px;padding:4px 12px;background:#fff;box-sizing:border-box}.vl-pdf__title{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600}.vl-pdf__count{color:#6b7280;font-size:13px;white-space:nowrap}.vl-pdf__btn{width:40px;height:40px;border:1px solid #d1d5db;border-radius:4px;background:#fff;font-size:20px;line-height:1;cursor:pointer}.vl-pdf__pages{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:8px;box-sizing:border-box;text-align:center}.vl-pdf__page{display:block;margin:0 auto 8px;background:#fff}.vl-pdf__note{color:#fff;margin-top:24px}\n"] }]
|
|
6120
|
+
}], propDecorators: { source: [{
|
|
6121
|
+
type: Input
|
|
6122
|
+
}], area: [{
|
|
6123
|
+
type: ViewChild,
|
|
6124
|
+
args: ['pagesArea']
|
|
6125
|
+
}], onEscape: [{
|
|
6126
|
+
type: HostListener,
|
|
6127
|
+
args: ['document:keydown.escape']
|
|
6128
|
+
}] } });
|
|
6129
|
+
/** Opens a PDF inside the app. */
|
|
6130
|
+
class PdfViewerService {
|
|
6131
|
+
app = inject(ApplicationRef);
|
|
6132
|
+
injector = inject(EnvironmentInjector);
|
|
6133
|
+
open(source) {
|
|
6134
|
+
const viewer = createComponent(PdfViewerComponent, { environmentInjector: this.injector });
|
|
6135
|
+
viewer.setInput('source', source);
|
|
6136
|
+
viewer.instance.closed = () => {
|
|
6137
|
+
this.app.detachView(viewer.hostView);
|
|
6138
|
+
viewer.destroy();
|
|
6139
|
+
};
|
|
6140
|
+
this.app.attachView(viewer.hostView);
|
|
6141
|
+
document.body.appendChild(viewer.location.nativeElement);
|
|
6142
|
+
}
|
|
6143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PdfViewerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6144
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PdfViewerService, providedIn: 'root' });
|
|
6145
|
+
}
|
|
6146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PdfViewerService, decorators: [{
|
|
6147
|
+
type: Injectable,
|
|
6148
|
+
args: [{ providedIn: 'root' }]
|
|
6149
|
+
}] });
|
|
6150
|
+
|
|
5762
6151
|
class NotificationService {
|
|
5763
6152
|
toastr;
|
|
5764
6153
|
constructor(toastr) {
|
|
@@ -6472,6 +6861,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
6472
6861
|
}]
|
|
6473
6862
|
}], ctorParameters: () => [{ type: Couchdb }] });
|
|
6474
6863
|
|
|
6864
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
6865
|
+
// - change: a PDF opens in the app's viewer (vl-pdf-viewer) - an embedded one stayed blank on Android (point 185)
|
|
6475
6866
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
6476
6867
|
// - change: a data object holds names and types only - the start file is the layout's default (option.fieldData.default), the caption the layout's
|
|
6477
6868
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18
|
|
@@ -6520,6 +6911,7 @@ function mediaKind(source, ...names) {
|
|
|
6520
6911
|
}
|
|
6521
6912
|
class MediaControl {
|
|
6522
6913
|
sanitizer = inject(DomSanitizer);
|
|
6914
|
+
pdfViewer = inject(PdfViewerService);
|
|
6523
6915
|
trustedCache = new Map();
|
|
6524
6916
|
field;
|
|
6525
6917
|
/** the field's value: a URL, a file name of the project's Media/, or a data: URL */
|
|
@@ -6592,8 +6984,7 @@ class MediaControl {
|
|
|
6592
6984
|
}
|
|
6593
6985
|
@case ('pdf') {
|
|
6594
6986
|
<ng-container *ngIf="(src | vlMedia | async) as url">
|
|
6595
|
-
<
|
|
6596
|
-
<a class="vl-media__link" [href]="url" target="_blank" rel="noopener noreferrer">Open PDF — {{ label() }}</a>
|
|
6987
|
+
<button type="button" class="vl-media__link" (click)="pdfViewer.open({ url: url, title: label(), option: { proxy: false } })">Open PDF — {{ label() }}</button>
|
|
6597
6988
|
</ng-container>
|
|
6598
6989
|
}
|
|
6599
6990
|
@case ('file') {
|
|
@@ -6607,7 +6998,7 @@ class MediaControl {
|
|
|
6607
6998
|
}
|
|
6608
6999
|
</ng-template>
|
|
6609
7000
|
</ng-container>
|
|
6610
|
-
`, isInline: true, styles: [":host{display:block;min-width:0;max-width:100%}.vl-media__item{max-width:100%}.vl-
|
|
7001
|
+
`, isInline: true, styles: [":host{display:block;min-width:0;max-width:100%}.vl-media__item{max-width:100%}.vl-media__link{display:inline-block;margin-top:4px;overflow-wrap:anywhere}.vl-media__symbol{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid #cbd5e1;border-radius:6px;background:#fff;padding:4px 8px;cursor:pointer}.vl-media__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vl-media__veil{position:fixed;inset:0;z-index:11000;background:#0f172a8c;display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.vl-media__large{position:relative;background:#fff;border-radius:8px;padding:40px 12px 12px;width:min(100%,52rem);max-height:100%;overflow:auto;box-sizing:border-box}.vl-media__large video,.vl-media__large audio{width:100%}.vl-media__close{position:absolute;top:6px;right:6px;width:2rem;height:2rem;border:0;background:transparent;cursor:pointer;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: MediaSourcePipe, name: "vlMedia" }] });
|
|
6611
7002
|
}
|
|
6612
7003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: MediaControl, decorators: [{
|
|
6613
7004
|
type: Component,
|
|
@@ -6643,8 +7034,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
6643
7034
|
}
|
|
6644
7035
|
@case ('pdf') {
|
|
6645
7036
|
<ng-container *ngIf="(src | vlMedia | async) as url">
|
|
6646
|
-
<
|
|
6647
|
-
<a class="vl-media__link" [href]="url" target="_blank" rel="noopener noreferrer">Open PDF — {{ label() }}</a>
|
|
7037
|
+
<button type="button" class="vl-media__link" (click)="pdfViewer.open({ url: url, title: label(), option: { proxy: false } })">Open PDF — {{ label() }}</button>
|
|
6648
7038
|
</ng-container>
|
|
6649
7039
|
}
|
|
6650
7040
|
@case ('file') {
|
|
@@ -6658,7 +7048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
6658
7048
|
}
|
|
6659
7049
|
</ng-template>
|
|
6660
7050
|
</ng-container>
|
|
6661
|
-
`, styles: [":host{display:block;min-width:0;max-width:100%}.vl-media__item{max-width:100%}.vl-
|
|
7051
|
+
`, styles: [":host{display:block;min-width:0;max-width:100%}.vl-media__item{max-width:100%}.vl-media__link{display:inline-block;margin-top:4px;overflow-wrap:anywhere}.vl-media__symbol{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid #cbd5e1;border-radius:6px;background:#fff;padding:4px 8px;cursor:pointer}.vl-media__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vl-media__veil{position:fixed;inset:0;z-index:11000;background:#0f172a8c;display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.vl-media__large{position:relative;background:#fff;border-radius:8px;padding:40px 12px 12px;width:min(100%,52rem);max-height:100%;overflow:auto;box-sizing:border-box}.vl-media__large video,.vl-media__large audio{width:100%}.vl-media__close{position:absolute;top:6px;right:6px;width:2rem;height:2rem;border:0;background:transparent;cursor:pointer;font-size:1rem}\n"] }]
|
|
6662
7052
|
}], propDecorators: { field: [{
|
|
6663
7053
|
type: Input
|
|
6664
7054
|
}], value: [{
|
|
@@ -7486,6 +7876,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
7486
7876
|
type: Output
|
|
7487
7877
|
}] } });
|
|
7488
7878
|
|
|
7879
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
7880
|
+
// - new: a locked field still holding its fixed start text shows it in the app's language (shownSchema) - only shown
|
|
7489
7881
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01
|
|
7490
7882
|
// - new: maxLines - a shown text ends with … after n lines (option.maxLines)
|
|
7491
7883
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01
|
|
@@ -7649,7 +8041,22 @@ class ControlComponent {
|
|
|
7649
8041
|
this.kind = 'time';
|
|
7650
8042
|
}
|
|
7651
8043
|
this.keyboard = resolveCustomKeyboardType(this.field?.option, this.property);
|
|
7652
|
-
this.textboxInfo = { propertySchema: this.
|
|
8044
|
+
this.textboxInfo = { propertySchema: this.shownSchema() };
|
|
8045
|
+
}
|
|
8046
|
+
/**
|
|
8047
|
+
* The values the text input shows. A locked field still holding its fixed start text (option.fieldData.default, e.g.
|
|
8048
|
+
* "FREE") shows that text in the language of the app when the language has it (de "FREI") - only shown: what the
|
|
8049
|
+
* form sends stays the stored value (luv2shop's Shipping on the checkout, 2026-11-02).
|
|
8050
|
+
*/
|
|
8051
|
+
shownSchema() {
|
|
8052
|
+
const schema = this.propertySchema || {};
|
|
8053
|
+
const fixed = this.field?.option?.fieldData?.default;
|
|
8054
|
+
const locked = this.mode !== 'display' && (this.field?.option?.protected === true || this.field?.option?.disabled === true);
|
|
8055
|
+
const shown = typeof fixed === 'string' ? this.translations?.[fixed] : undefined;
|
|
8056
|
+
if (!locked || !shown || shown === fixed || this.property?.value !== fixed)
|
|
8057
|
+
return schema;
|
|
8058
|
+
const { scope, name } = splitReference(this.field?.scope?.reference);
|
|
8059
|
+
return { ...schema, [scope]: { ...schema[scope], [name]: { ...schema[scope]?.[name], value: shown } } };
|
|
7653
8060
|
}
|
|
7654
8061
|
get display() {
|
|
7655
8062
|
return this.mode === 'display';
|
|
@@ -8262,6 +8669,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
8262
8669
|
}]
|
|
8263
8670
|
}] });
|
|
8264
8671
|
|
|
8672
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
8673
|
+
// - new: toggleRecord - a card button keeps its record in a browser list, a second click takes it out
|
|
8265
8674
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30
|
|
8266
8675
|
// - new: storageType database with loadOnFilter: true is a filter page (starts empty, loads once every filter field
|
|
8267
8676
|
// has a value) - "filter" is no storage of its own, the records come from the backend; storageType "filter" of
|
|
@@ -8287,6 +8696,23 @@ function storageKind(source) {
|
|
|
8287
8696
|
return 'sessionstorage';
|
|
8288
8697
|
return '';
|
|
8289
8698
|
}
|
|
8699
|
+
/**
|
|
8700
|
+
* The list after a button that keeps one record: the record comes first; with key, a record of the same key
|
|
8701
|
+
* value goes out instead (added: false). max: the oldest fall off the end.
|
|
8702
|
+
*/
|
|
8703
|
+
function toggleRecord(records, record, key, max) {
|
|
8704
|
+
const same = (entry) => !!key && record?.[key] != null && entry?.[key] === record[key];
|
|
8705
|
+
if (records.some(same))
|
|
8706
|
+
return { records: records.filter(entry => !same(entry)), added: false };
|
|
8707
|
+
const limit = Number(max);
|
|
8708
|
+
const kept = [record, ...records];
|
|
8709
|
+
return { records: limit > 0 ? kept.slice(0, limit) : kept, added: true };
|
|
8710
|
+
}
|
|
8711
|
+
/** The web address a button opens: the field option.propertyKey of the record, only http(s). */
|
|
8712
|
+
function linkOfRecord(option, record) {
|
|
8713
|
+
const url = String(record?.[option?.propertyKey] ?? '').trim();
|
|
8714
|
+
return /^https?:\/\//i.test(url) ? url : null;
|
|
8715
|
+
}
|
|
8290
8716
|
/** True when the records of the source live in the browser (local or session storage). */
|
|
8291
8717
|
function isBrowserSource(source) {
|
|
8292
8718
|
const kind = storageKind(source);
|
|
@@ -8503,6 +8929,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
8503
8929
|
}]
|
|
8504
8930
|
}], ctorParameters: () => [{ type: Couchdb }, { type: UtilityService }, { type: i1$2.Platform }] });
|
|
8505
8931
|
|
|
8932
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
8933
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
8934
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
8935
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
8936
|
+
// - new: listEnd - the scroll sentinel marks the list's end (data-vl-list-end) for tests
|
|
8506
8937
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01
|
|
8507
8938
|
// - new: alignRows / isActionLayout - the cards of a row equally high, buttons at the bottom (center.option.alignRows)
|
|
8508
8939
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
@@ -8780,6 +9211,10 @@ class CardComponent {
|
|
|
8780
9211
|
this.requestedScrollPage = nextPage;
|
|
8781
9212
|
this.onPageChange.emit(nextPage);
|
|
8782
9213
|
}
|
|
9214
|
+
/** No further page to load - the list's end marks itself for tests (data-vl-list-end). */
|
|
9215
|
+
listEnd() {
|
|
9216
|
+
return !this.hasNextScrollPage();
|
|
9217
|
+
}
|
|
8783
9218
|
hasNextScrollPage() {
|
|
8784
9219
|
return (Array.isArray(this.pages) &&
|
|
8785
9220
|
this.pages.length > 0 &&
|
|
@@ -9015,8 +9450,12 @@ class CardComponent {
|
|
|
9015
9450
|
}
|
|
9016
9451
|
this.onPageChange.emit(page);
|
|
9017
9452
|
}
|
|
9453
|
+
/** What an element does (action catalog) - for the template. */
|
|
9454
|
+
actionOf(option) {
|
|
9455
|
+
return actionName(option);
|
|
9456
|
+
}
|
|
9018
9457
|
invokeOnCardHeader(element) {
|
|
9019
|
-
if (element
|
|
9458
|
+
if (actionName(element?.option) === "saveAll") {
|
|
9020
9459
|
this.saveAllData(element.option);
|
|
9021
9460
|
}
|
|
9022
9461
|
else {
|
|
@@ -9026,14 +9465,17 @@ class CardComponent {
|
|
|
9026
9465
|
invokeOnCardFooter(element) {
|
|
9027
9466
|
// this.cardHeaderButtonClick.emit(element);
|
|
9028
9467
|
}
|
|
9029
|
-
/** Delete (asks first) and save
|
|
9468
|
+
/** Delete (asks first) and save (backend, or a browser list) go to the page's data; anything else to the app. */
|
|
9030
9469
|
async invokeButtonClick(layout, record, recordIndex) {
|
|
9031
|
-
if (layout?.option
|
|
9470
|
+
if (actionName(layout?.option) === 'delete' && storageKind(layout?.option) === 'localstorage') {
|
|
9032
9471
|
await this.pageData?.remove(recordIndex, layout);
|
|
9033
9472
|
}
|
|
9034
|
-
else if (layout?.option
|
|
9473
|
+
else if (actionName(layout?.option) === 'save' && storageKind(layout?.option) === 'database') {
|
|
9035
9474
|
await this.pageData?.send(layout, recordIndex);
|
|
9036
9475
|
}
|
|
9476
|
+
else if (actionName(layout?.option) === 'save' && isBrowserSource(layout?.option)) {
|
|
9477
|
+
await this.pageData?.keep(layout, record);
|
|
9478
|
+
}
|
|
9037
9479
|
else {
|
|
9038
9480
|
this.cardButtonClick.emit({ layout: layout, record: record, recordIndex: recordIndex });
|
|
9039
9481
|
}
|
|
@@ -9271,7 +9713,7 @@ class CardComponent {
|
|
|
9271
9713
|
return resolveCustomKeyboardType(field?.option, property);
|
|
9272
9714
|
}
|
|
9273
9715
|
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 });
|
|
9274
|
-
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-11-01\r\n - new: aligned rows (center.option.alignRows): vl-cards--aligned, vl-card-body, card-layout-item--action -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: date fields carry data-vl-field and data-vl-path like the other fields -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the date fields of the card page's header and footer are drawn by <vl-control> like form and dialog;\r\n the buttons there keep their own markup (icon or caption) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28\r\n - new: a waiting record the backend refused shows the reason above it (vl-record__send-error, OFFENE-PUNKTE 131) -->\r\n<!-- 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 + (alignRows() ? ' vl-cards--aligned' : '')\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\"\r\n [class.vl-record--send-error]=\"!!record?._vlSendError\">\r\n <!-- a waiting record the backend refused: the reason, until it is sent (OFFENE-PUNKTE 131); the look\r\n comes from the app's classes (vl-record--send-error, vl-record__send-error) -->\r\n <p *ngIf=\"record?._vlSendError\" class=\"vl-record__send-error\" role=\"alert\">\u26A0 {{ sendErrorText(record) }}</p>\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}\r\n </span>\r\n </div>\r\n \r\n <!-- a date filter: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}</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]=\"'vl-card-body ' + getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [class.card-layout-item--action]=\"isActionLayout(layout)\" [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 <!-- a date field: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}\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: [".vl-cards--aligned>.card-grid-item{display:flex;flex-direction:column}.vl-cards--aligned>.card-grid-item>.vl-card-body{flex:1 1 auto;display:flex;flex-direction:column}.vl-cards--aligned .vl-card-body>:not(.card-layout-item--action)+.card-layout-item--action{margin-top:auto}: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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: "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: "ngmodule", type: NzIconModule }, { kind: "directive", type: i10.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i13.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "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: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }] });
|
|
9716
|
+
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-11-02\r\n - change: an element's handles in the order pencil, plus, bin (user) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: what an element does comes from the action catalog (actionName / menuAction / calcOf) - older forms mean the same -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the list's end marks itself (data-vl-list-end) when no further page exists - a test's scroll stops there -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01\r\n - new: aligned rows (center.option.alignRows): vl-cards--aligned, vl-card-body, card-layout-item--action -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: date fields carry data-vl-field and data-vl-path like the other fields -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the date fields of the card page's header and footer are drawn by <vl-control> like form and dialog;\r\n the buttons there keep their own markup (icon or caption) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28\r\n - new: a waiting record the backend refused shows the reason above it (vl-record__send-error, OFFENE-PUNKTE 131) -->\r\n<!-- 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]=\"['edit', 'add', '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]=\"['edit', 'add', '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]=\"actionOf(element.option) === '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 + (alignRows() ? ' vl-cards--aligned' : '')\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\"\r\n [class.vl-record--send-error]=\"!!record?._vlSendError\">\r\n <!-- a waiting record the backend refused: the reason, until it is sent (OFFENE-PUNKTE 131); the look\r\n comes from the app's classes (vl-record--send-error, vl-record__send-error) -->\r\n <p *ngIf=\"record?._vlSendError\" class=\"vl-record__send-error\" role=\"alert\">\u26A0 {{ sendErrorText(record) }}</p>\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\" [attr.data-vl-list-end]=\"listEnd() ? 'true' : null\">\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}\r\n </span>\r\n </div>\r\n \r\n <!-- a date filter: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}</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]=\"'vl-card-body ' + getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [class.card-layout-item--action]=\"isActionLayout(layout)\" [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 <!-- a date field: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}\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: [".vl-cards--aligned>.card-grid-item{display:flex;flex-direction:column}.vl-cards--aligned>.card-grid-item>.vl-card-body{flex:1 1 auto;display:flex;flex-direction:column}.vl-cards--aligned .vl-card-body>:not(.card-layout-item--action)+.card-layout-item--action{margin-top:auto}: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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform: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: "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: "ngmodule", type: NzIconModule }, { kind: "directive", type: i10.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i13.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "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: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }] });
|
|
9275
9717
|
}
|
|
9276
9718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CardComponent, decorators: [{
|
|
9277
9719
|
type: Component,
|
|
@@ -9290,7 +9732,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
9290
9732
|
DragDropModule,
|
|
9291
9733
|
DesignBarComponent,
|
|
9292
9734
|
DropMarkerComponent,
|
|
9293
|
-
], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01\r\n - new: aligned rows (center.option.alignRows): vl-cards--aligned, vl-card-body, card-layout-item--action -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: date fields carry data-vl-field and data-vl-path like the other fields -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the date fields of the card page's header and footer are drawn by <vl-control> like form and dialog;\r\n the buttons there keep their own markup (icon or caption) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28\r\n - new: a waiting record the backend refused shows the reason above it (vl-record__send-error, OFFENE-PUNKTE 131) -->\r\n<!-- 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 + (alignRows() ? ' vl-cards--aligned' : '')\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\"\r\n [class.vl-record--send-error]=\"!!record?._vlSendError\">\r\n <!-- a waiting record the backend refused: the reason, until it is sent (OFFENE-PUNKTE 131); the look\r\n comes from the app's classes (vl-record--send-error, vl-record__send-error) -->\r\n <p *ngIf=\"record?._vlSendError\" class=\"vl-record__send-error\" role=\"alert\">\u26A0 {{ sendErrorText(record) }}</p>\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}\r\n </span>\r\n </div>\r\n \r\n <!-- a date filter: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}</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]=\"'vl-card-body ' + getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [class.card-layout-item--action]=\"isActionLayout(layout)\" [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 <!-- a date field: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}\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: [".vl-cards--aligned>.card-grid-item{display:flex;flex-direction:column}.vl-cards--aligned>.card-grid-item>.vl-card-body{flex:1 1 auto;display:flex;flex-direction:column}.vl-cards--aligned .vl-card-body>:not(.card-layout-item--action)+.card-layout-item--action{margin-top:auto}: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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
9735
|
+
], standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: an element's handles in the order pencil, plus, bin (user) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: what an element does comes from the action catalog (actionName / menuAction / calcOf) - older forms mean the same -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the list's end marks itself (data-vl-list-end) when no further page exists - a test's scroll stops there -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01\r\n - new: aligned rows (center.option.alignRows): vl-cards--aligned, vl-card-body, card-layout-item--action -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: date fields carry data-vl-field and data-vl-path like the other fields -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the date fields of the card page's header and footer are drawn by <vl-control> like form and dialog;\r\n the buttons there keep their own markup (icon or caption) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28\r\n - new: a waiting record the backend refused shows the reason above it (vl-record__send-error, OFFENE-PUNKTE 131) -->\r\n<!-- 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]=\"['edit', 'add', '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]=\"['edit', 'add', '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]=\"actionOf(element.option) === '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 + (alignRows() ? ' vl-cards--aligned' : '')\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\" [attr.data-vl-record]=\"k\"\r\n [class.vl-record--send-error]=\"!!record?._vlSendError\">\r\n <!-- a waiting record the backend refused: the reason, until it is sent (OFFENE-PUNKTE 131); the look\r\n comes from the app's classes (vl-record--send-error, vl-record__send-error) -->\r\n <p *ngIf=\"record?._vlSendError\" class=\"vl-record__send-error\" role=\"alert\">\u26A0 {{ sendErrorText(record) }}</p>\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\" [attr.data-vl-list-end]=\"listEnd() ? 'true' : null\">\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}</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 | vlDesignText:designTranslations }}\r\n </span>\r\n </div>\r\n \r\n <!-- a date filter: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}</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]=\"'vl-card-body ' + getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [class.card-layout-item--action]=\"isActionLayout(layout)\" [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 <!-- a date field: the shared <vl-control> like form and dialog (protected = locked input) -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\" [attr.data-vl-field]=\"vlFieldKey(element)\" [attr.data-vl-path]=\"vlFieldPath(element)\">\r\n <vl-control [field]=\"element | vlDesignField:designTranslations\" [propertySchema]=\"itemInfo.propertySchema\" [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n container=\"form\" (changed)=\"dateChangeEvent(element, $event)\"></vl-control>\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 | vlDesignText:designTranslations }}\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: [".vl-cards--aligned>.card-grid-item{display:flex;flex-direction:column}.vl-cards--aligned>.card-grid-item>.vl-card-body{flex:1 1 auto;display:flex;flex-direction:column}.vl-cards--aligned .vl-card-body>:not(.card-layout-item--action)+.card-layout-item--action{margin-top:auto}: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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
9294
9736
|
}], 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: [{
|
|
9295
9737
|
type: Input
|
|
9296
9738
|
}], pageData: [{
|
|
@@ -9702,6 +10144,9 @@ function sectionVisible(section, propertySchema) {
|
|
|
9702
10144
|
return String(value ?? '') === String(condition.value ?? '');
|
|
9703
10145
|
}
|
|
9704
10146
|
|
|
10147
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
10148
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
10149
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
9705
10150
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
9706
10151
|
// - new: a button that sends its form (submit / save) is locked while a required field is empty - with or without
|
|
9707
10152
|
// needsValid; needsValid adds the other rules and the whole card (OFFENE-PUNKTE 121: hotel saved an empty room)
|
|
@@ -9783,7 +10228,7 @@ function lockReasons(option, state) {
|
|
|
9783
10228
|
}
|
|
9784
10229
|
/** A button that sends its form's fields - submit or save; it never sends an empty required field. */
|
|
9785
10230
|
function sendsForm(option) {
|
|
9786
|
-
return ['submit', 'save'].includes(
|
|
10231
|
+
return ['submit', 'save'].includes(actionName(option));
|
|
9787
10232
|
}
|
|
9788
10233
|
/** Whether a button is locked: needsLogin without a signed-in user, needsValid with a broken rule. */
|
|
9789
10234
|
function buttonLocked(option, state) {
|
|
@@ -9801,6 +10246,10 @@ function lockHint(option, reason, translations) {
|
|
|
9801
10246
|
return translations?.[text.trim()] || text.trim();
|
|
9802
10247
|
}
|
|
9803
10248
|
|
|
10249
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
10250
|
+
// - change: a section's grid columns and alignment read in both spellings (styleValue - CSS spelling since 2026-11-02)
|
|
10251
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
10252
|
+
// - new: ngDoCheck - a change of the form reloads a dropdown whose data_url names fields of it (UtilityService)
|
|
9804
10253
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
9805
10254
|
// - change: the layout's texts through translateCaptions (catalog) - one way for every container; a button's own
|
|
9806
10255
|
// caption, tooltips and dialog titles too, every switch from the written texts
|
|
@@ -10080,17 +10529,17 @@ class FormComponent {
|
|
|
10080
10529
|
const schemaStyle = this.getStyleWithoutClasses(formSection?.style).style;
|
|
10081
10530
|
return {
|
|
10082
10531
|
display: schemaStyle?.display || 'grid',
|
|
10083
|
-
gridTemplateColumns: schemaStyle
|
|
10532
|
+
gridTemplateColumns: styleValue(schemaStyle, 'grid-template-columns') ||
|
|
10084
10533
|
`repeat(${layout?.desktopColumns || 12}, minmax(0, 1fr))`,
|
|
10085
10534
|
gap: schemaStyle?.gap || layout?.gap || '10px',
|
|
10086
|
-
alignItems: schemaStyle
|
|
10535
|
+
alignItems: styleValue(schemaStyle, 'align-items') || 'start',
|
|
10087
10536
|
width: '100%',
|
|
10088
10537
|
boxSizing: 'border-box',
|
|
10089
10538
|
...schemaStyle,
|
|
10090
10539
|
};
|
|
10091
10540
|
}
|
|
10092
10541
|
getFieldWrapperStyle(formField) {
|
|
10093
|
-
const schemaStyle = this.getStyleWithoutClasses(formField?.style).style;
|
|
10542
|
+
const schemaStyle = wrapperStyleOf(formField, this.getStyleWithoutClasses(formField?.style).style);
|
|
10094
10543
|
return {
|
|
10095
10544
|
minWidth: 0,
|
|
10096
10545
|
width: '100%',
|
|
@@ -10202,6 +10651,11 @@ class FormComponent {
|
|
|
10202
10651
|
propertySchema,
|
|
10203
10652
|
});
|
|
10204
10653
|
}
|
|
10654
|
+
/** A change of the form may change the address of a dependent dropdown ({{form.x}} in its data_url). */
|
|
10655
|
+
ngDoCheck() {
|
|
10656
|
+
if (this.form?.layoutSchema)
|
|
10657
|
+
void this.utility.refreshDependentDropdowns(this.form);
|
|
10658
|
+
}
|
|
10205
10659
|
setformData() {
|
|
10206
10660
|
this.checkBoxChangeEvent.emit(this.form?.propertySchema);
|
|
10207
10661
|
}
|
|
@@ -10282,11 +10736,11 @@ class FormComponent {
|
|
|
10282
10736
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
10283
10737
|
}
|
|
10284
10738
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10285
|
-
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-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations) || 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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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}.form-renderer{container-type:inline-size;container-name:vl-form}.section-card{container-type:inline-size;container-name:vl-section}@container vl-section (max-width: 559px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:1 / -1!important}.field-row ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}@container vl-form (max-width: 767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
10739
|
+
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-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations) || 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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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}.form-renderer{container-type:inline-size;container-name:vl-form}.section-card{container-type:inline-size;container-name:vl-section}@container vl-section (max-width: 559px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:1 / -1!important}.field-row ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}@container vl-form (max-width: 767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
10286
10740
|
}
|
|
10287
10741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: FormComponent, decorators: [{
|
|
10288
10742
|
type: Component,
|
|
10289
|
-
args: [{ standalone: true, imports: [DesignFieldPipe, DesignTextPipe, CommonModule, FormsModule, VisiblePipe, ControlComponent, DragDropModule, DesignBarComponent, DropMarkerComponent], selector: 'vl-form', template: "<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations) || 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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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}.form-renderer{container-type:inline-size;container-name:vl-form}.section-card{container-type:inline-size;container-name:vl-section}@container vl-section (max-width: 559px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:1 / -1!important}.field-row ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}@container vl-form (max-width: 767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
10743
|
+
args: [{ standalone: true, imports: [DesignFieldPipe, DesignTextPipe, CommonModule, FormsModule, VisiblePipe, ControlComponent, DragDropModule, DesignBarComponent, DropMarkerComponent], selector: 'vl-form', template: "<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations) || 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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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}.form-renderer{container-type:inline-size;container-name:vl-form}.section-card{container-type:inline-size;container-name:vl-section}@container vl-section (max-width: 559px){.section-body{grid-template-columns:repeat(1,minmax(0,1fr))!important}.field-row{grid-column:1 / -1!important}.field-row ::ng-deep .vl-control__inner{grid-template-columns:minmax(0,1fr)!important}}@container vl-form (max-width: 767px){.section-card,.sticky-column{grid-column:1 / -1;grid-row:auto;position:static}.sticky-column .section-card{grid-column:auto}}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
10290
10744
|
}], propDecorators: { errorMessages: [{
|
|
10291
10745
|
type: Input
|
|
10292
10746
|
}], creditCardError: [{
|
|
@@ -10380,6 +10834,13 @@ function replaceColumn(layout, index, column) {
|
|
|
10380
10834
|
return next;
|
|
10381
10835
|
}
|
|
10382
10836
|
|
|
10837
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
10838
|
+
// - new: an action icon with a browser storage keeps the row's record in that list (point 183)
|
|
10839
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
10840
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
10841
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
10842
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
10843
|
+
// - new: listEnd - the scroll sentinel marks the list's end (data-vl-list-end) for tests
|
|
10383
10844
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
10384
10845
|
// - fix: texts through translateCaptions (from the written texts); column titles translated at once and drawn -
|
|
10385
10846
|
// in a timer without zone.js they stayed English
|
|
@@ -10444,6 +10905,10 @@ class GridComponent {
|
|
|
10444
10905
|
picker = inject(DateTimePickerService);
|
|
10445
10906
|
host = inject((ElementRef));
|
|
10446
10907
|
cdr = inject(ChangeDetectorRef);
|
|
10908
|
+
/** No further page to load - the list's end marks itself for tests (data-vl-list-end). */
|
|
10909
|
+
listEnd() {
|
|
10910
|
+
return Number(this.currentPage) + 1 >= (this.pages?.length ?? 0);
|
|
10911
|
+
}
|
|
10447
10912
|
/** Watches the element under the table; in view (with 250px ahead) it asks for the next page. */
|
|
10448
10913
|
observeEnd(el) {
|
|
10449
10914
|
this.endObserver?.disconnect();
|
|
@@ -10531,6 +10996,10 @@ class GridComponent {
|
|
|
10531
10996
|
vlFieldPath = testFieldPath;
|
|
10532
10997
|
vlAction = testAction;
|
|
10533
10998
|
vlWrites = testWrites;
|
|
10999
|
+
/** A row's save icon writes real data unless it keeps the row in a browser list. */
|
|
11000
|
+
rowWrites(option) {
|
|
11001
|
+
return isBrowserSource(option) ? 'false' : 'true';
|
|
11002
|
+
}
|
|
10534
11003
|
get designTranslations() { return this.design?.translations; }
|
|
10535
11004
|
design = null;
|
|
10536
11005
|
/** What was chosen or changed on the Designer's canvas. */
|
|
@@ -10886,6 +11355,11 @@ class GridComponent {
|
|
|
10886
11355
|
* "APPROVED", also when rejecting).
|
|
10887
11356
|
*/
|
|
10888
11357
|
upsertAction(option, data) {
|
|
11358
|
+
// a browser list: the row's record goes in or out, like a card button (PageData.keep)
|
|
11359
|
+
if (isBrowserSource(option)) {
|
|
11360
|
+
void this.pageData?.keep(option, data);
|
|
11361
|
+
return;
|
|
11362
|
+
}
|
|
10889
11363
|
const url = String(option?.data_url ?? '').replace(/{{\s*(.*?)\s*}}/g, (all, field) => data?.[field] !== undefined && data?.[field] !== null ? encodeURIComponent(String(data[field])) : all);
|
|
10890
11364
|
const baseUrl = this.environment?.apiUrl + url;
|
|
10891
11365
|
// the method and the message from the action catalog: any method (default GET), successMessage or the older
|
|
@@ -11383,12 +11857,30 @@ class GridComponent {
|
|
|
11383
11857
|
return type === 'boolean' || type === 'checkbox' ? 'boolean' : 'flag';
|
|
11384
11858
|
}
|
|
11385
11859
|
/** The DTO type of a column as the data object declares it ("string", "quantity" ...). */
|
|
11860
|
+
/** A column that shows a value calculated from fields of the row (innerAction calculate, older { action: multiply }). */
|
|
11861
|
+
isCalculated(col) {
|
|
11862
|
+
return actionName(col?.option, 'column') === 'calculate';
|
|
11863
|
+
}
|
|
11864
|
+
/** The calculated value of a row: the operator over the named fields (multiply when none is named). */
|
|
11865
|
+
calculatedValue(col, row) {
|
|
11866
|
+
const { operator, fields } = actionParams(col?.option, 'column');
|
|
11867
|
+
const values = (Array.isArray(fields) ? fields : []).map((name) => Number(row?.[name]) || 0);
|
|
11868
|
+
if (!values.length)
|
|
11869
|
+
return 0;
|
|
11870
|
+
const [first, ...rest] = values;
|
|
11871
|
+
switch (operator) {
|
|
11872
|
+
case 'add': return rest.reduce((a, b) => a + b, first);
|
|
11873
|
+
case 'subtract': return rest.reduce((a, b) => a - b, first);
|
|
11874
|
+
case 'divide': return rest.reduce((a, b) => (b ? a / b : 0), first);
|
|
11875
|
+
default: return rest.reduce((a, b) => a * b, first);
|
|
11876
|
+
}
|
|
11877
|
+
}
|
|
11386
11878
|
cellType(col) {
|
|
11387
11879
|
const reference = col?.scope?.reference || '';
|
|
11388
11880
|
return this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop() || '']?.type ?? '';
|
|
11389
11881
|
}
|
|
11390
11882
|
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 });
|
|
11391
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", scrollPagination: "scrollPagination", userInfo: "userInfo", pageData: "pageData", design: "design" }, outputs: { editRow: "editRow", designChange: "designChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollSentinel", first: true, predicate: ["scrollSentinel"], descendants: true }, { propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: test marks like the other containers - a row is a record (data-vl-record), a cell and a footer field carry\r\n data-vl-field and data-vl-path, a column button data-vl-action / data-vl-writes, the action icons save / delete -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the table's footer draws its fields and buttons by <vl-control> like form and dialog (one pattern) -->\r\n<!-- 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\" (click)=\"selectGrid()\">\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 [nzScroll]=\"{ x: 'max-content' }\" [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)=\"$event.stopPropagation(); 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 | vlDesignText:designTranslations }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ noRecordText }}\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 | vlDesignText:designTranslations }}\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)\" data-vl-record>\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(col)\" [attr.data-vl-path]=\"vlFieldPath(col)\"\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 | vlDesignField:designTranslations\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">✎</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"[searchPositionClass, 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)\" data-vl-action=\"save\" data-vl-writes=\"true\"\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)\" data-vl-action=\"delete\" data-vl-writes=\"true\"\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 [attr.data-vl-action]=\"vlAction(col.option)\" [attr.data-vl-writes]=\"vlWrites(col.option)\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeRowBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 <!-- every footer field and button is drawn by the shared <vl-control>, like the form and the dialog: the\r\n same controls, protected = a locked input, no * on it, start values, rules (it had its own switch\r\n for text and number with its own protected text - user 2026-10-29: the same pattern everywhere) -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(tableField)\" [attr.data-vl-path]=\"vlFieldPath(tableField)\">\r\n <vl-control [field]=\"tableField | vlDesignField:designTranslations\" [propertySchema]=\"tableitemInfo?.propertySchema ?? form?.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [saveTried]=\"false\" container=\"form\" buttonType=\"button\"\r\n [list]=\"remoteData[tableField.scope?.reference]\"\r\n (buttonClick)=\"invokeGridBtnClick($event, tableitemInfo.propertySchema)\">\r\n </vl-control>\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: "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.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: i10.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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
|
|
11883
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: GridComponent, isStandalone: true, selector: "vl-grid", inputs: { errorMessages: "errorMessages", environment: "environment", selectedLanguageInfo: "selectedLanguageInfo", tableitemInfo: "tableitemInfo", form: "form", isTableDataLoad: "isTableDataLoad", currenTableOptions: "currenTableOptions", projectSeleted: "projectSeleted", pageSize: "pageSize", currentPage: "currentPage", pages: "pages", scrollPagination: "scrollPagination", userInfo: "userInfo", pageData: "pageData", design: "design" }, outputs: { editRow: "editRow", designChange: "designChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange", onGridScroll: "onGridScroll", showGridLink: "showGridLink", gridButtonClick: "gridButtonClick", gridIncreamentClick: "gridIncreamentClick", gridDecreamentClick: "gridDecreamentClick", gridImgClick: "gridImgClick" }, host: { properties: { "class.vl-design-mobile": "this.designMobile", "class.vl-design-tablet": "this.designTablet" } }, viewQueries: [{ propertyName: "scrollSentinel", first: true, predicate: ["scrollSentinel"], descendants: true }, { propertyName: "gridForm", first: true, predicate: ["gridForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: a calculated column (innerAction calculate, older { action: multiply }) through isCalculated / calculatedValue -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the list's end marks itself (data-vl-list-end) when no further page exists - a test's scroll stops there -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: test marks like the other containers - a row is a record (data-vl-record), a cell and a footer field carry\r\n data-vl-field and data-vl-path, a column button data-vl-action / data-vl-writes, the action icons save / delete -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the table's footer draws its fields and buttons by <vl-control> like form and dialog (one pattern) -->\r\n<!-- 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\" (click)=\"selectGrid()\">\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 [nzScroll]=\"{ x: 'max-content' }\" [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)=\"$event.stopPropagation(); 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 | vlDesignText:designTranslations }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ noRecordText }}\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 | vlDesignText:designTranslations }}\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)\" data-vl-record>\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(col)\" [attr.data-vl-path]=\"vlFieldPath(col)\"\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 | vlDesignField:designTranslations\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">✎</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\" [attr.data-vl-list-end]=\"listEnd() ? 'true' : null\"></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)\" data-vl-action=\"save\" [attr.data-vl-writes]=\"rowWrites(col.option?.save)\"\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)\" data-vl-action=\"delete\" data-vl-writes=\"true\"\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 [attr.data-vl-action]=\"vlAction(col.option)\" [attr.data-vl-writes]=\"vlWrites(col.option)\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeRowBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption | vlDesignText:designTranslations }}\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' && isCalculated(col)) {\r\n <span>{{ calculatedValue(col, data) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col | vlDesignField:designTranslations\" [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 <!-- every footer field and button is drawn by the shared <vl-control>, like the form and the dialog: the\r\n same controls, protected = a locked input, no * on it, start values, rules (it had its own switch\r\n for text and number with its own protected text - user 2026-10-29: the same pattern everywhere) -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(tableField)\" [attr.data-vl-path]=\"vlFieldPath(tableField)\">\r\n <vl-control [field]=\"tableField | vlDesignField:designTranslations\" [propertySchema]=\"tableitemInfo?.propertySchema ?? form?.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [saveTried]=\"false\" container=\"form\" buttonType=\"button\"\r\n [list]=\"remoteData[tableField.scope?.reference]\"\r\n (buttonClick)=\"invokeGridBtnClick($event, tableitemInfo.propertySchema)\">\r\n </vl-control>\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform: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: "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.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: i10.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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }] });
|
|
11392
11884
|
}
|
|
11393
11885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: GridComponent, decorators: [{
|
|
11394
11886
|
type: Component,
|
|
@@ -11414,7 +11906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
11414
11906
|
CustomKeyboardDirective,
|
|
11415
11907
|
DragDropModule,
|
|
11416
11908
|
DesignBarComponent,
|
|
11417
|
-
], selector: 'vl-grid', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: test marks like the other containers - a row is a record (data-vl-record), a cell and a footer field carry\r\n data-vl-field and data-vl-path, a column button data-vl-action / data-vl-writes, the action icons save / delete -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the table's footer draws its fields and buttons by <vl-control> like form and dialog (one pattern) -->\r\n<!-- 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\" (click)=\"selectGrid()\">\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 [nzScroll]=\"{ x: 'max-content' }\" [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)=\"$event.stopPropagation(); 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 | vlDesignText:designTranslations }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ noRecordText }}\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 | vlDesignText:designTranslations }}\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)\" data-vl-record>\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(col)\" [attr.data-vl-path]=\"vlFieldPath(col)\"\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 | vlDesignField:designTranslations\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">✎</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\"></div>}\r\n \r\n <!-- bottom pagination on grid -->\r\n <div\r\n *ngIf=\"tableitemInfo.data?.length && tableitemInfo?.layoutSchema?.pagination?.visible !== false && !scrollPagination && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n }\r\n <!-- the search box above the table (layoutSchema.search) -->\r\n <ng-template #gridSearch>\r\n <div class=\"grid-toolbar\" [ngClass]=\"[searchPositionClass, 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)\" data-vl-action=\"save\" data-vl-writes=\"true\"\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)\" data-vl-action=\"delete\" data-vl-writes=\"true\"\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 [attr.data-vl-action]=\"vlAction(col.option)\" [attr.data-vl-writes]=\"vlWrites(col.option)\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeRowBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 <!-- every footer field and button is drawn by the shared <vl-control>, like the form and the dialog: the\r\n same controls, protected = a locked input, no * on it, start values, rules (it had its own switch\r\n for text and number with its own protected text - user 2026-10-29: the same pattern everywhere) -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(tableField)\" [attr.data-vl-path]=\"vlFieldPath(tableField)\">\r\n <vl-control [field]=\"tableField | vlDesignField:designTranslations\" [propertySchema]=\"tableitemInfo?.propertySchema ?? form?.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [saveTried]=\"false\" container=\"form\" buttonType=\"button\"\r\n [list]=\"remoteData[tableField.scope?.reference]\"\r\n (buttonClick)=\"invokeGridBtnClick($event, tableitemInfo.propertySchema)\">\r\n </vl-control>\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
11909
|
+
], selector: 'vl-grid', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: a calculated column (innerAction calculate, older { action: multiply }) through isCalculated / calculatedValue -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the list's end marks itself (data-vl-list-end) when no further page exists - a test's scroll stops there -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - fix: test marks like the other containers - a row is a record (data-vl-record), a cell and a footer field carry\r\n data-vl-field and data-vl-path, a column button data-vl-action / data-vl-writes, the action icons save / delete -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29\r\n - change: the table's footer draws its fields and buttons by <vl-control> like form and dialog (one pattern) -->\r\n<!-- 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\" (click)=\"selectGrid()\">\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 [nzScroll]=\"{ x: 'max-content' }\" [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)=\"$event.stopPropagation(); 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 | vlDesignText:designTranslations }}\r\n <span class=\"vl-d-resize vl-d-resize--width\" [attr.title]=\"dt.resizeWidth\"\r\n (mousedown)=\"startResize($event, ci, 'width')\" (click)=\"$event.stopPropagation()\"></span>\r\n <span class=\"vl-d-resize vl-d-resize--height\" [attr.title]=\"dt.resizeHeight\"\r\n (mousedown)=\"startResize($event, ci, 'height')\" (click)=\"$event.stopPropagation()\"></span>\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n @for (column of tableitemInfo.layoutSchema.elements; track $index) {\r\n <th class=\"grid-filter-cell\" [class.vl-d-hidden]=\"column?.option?.visible === false\">\r\n @if (column?.option?.filter?.filtering === true && column?.scope?.reference) {\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\" disabled [placeholder]=\"getColumnFilterPlaceholder(column)\" />\r\n <button type=\"button\" class=\"grid-filter-operator-button\" disabled><span nz-icon nzType=\"filter\"></span></button>\r\n </div>\r\n }\r\n </th>\r\n }\r\n <th *ngIf=\"canEdit\" class=\"grid-edit-cell\"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (data of designTable.data; track $index; let i = $index) {\r\n <tr [ngStyle]=\"rowStyleOf(i)\">\r\n @for (col of tableitemInfo.layoutSchema.elements; track $index) {\r\n <td [style]=\"cellStyle(col, i)\" [class.vl-d-hidden]=\"col?.option?.visible === false\">\r\n <div class=\"vl-d-body vl-d-cell\">\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n </div>\r\n </td>\r\n }\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n <button type=\"button\" class=\"grid-edit-btn\" disabled>✎</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n }\r\n @if (tableitemInfo?.footer?.formFields && designAll.length) {\r\n <div class=\"vl-d-body\"><ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container></div>\r\n }\r\n @if (designAll.length && !designInfo?.layoutSchema?.pagination?.top && designInfo?.layoutSchema?.pagination?.bottom) {\r\n <div>\r\n <vl-pagination [itemInfo]=\"designInfo\" [pageSize]=\"designPageSize\" [currentPage]=\"designPage\"\r\n [pages]=\"designPages\" (onGoToPage)=\"designGoToPage($event)\"></vl-pagination>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <div *ngIf=\"!tableitemInfo.data?.length && !isTableDataLoad && !pageData?.loading\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ noRecordText }}\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 | vlDesignText:designTranslations }}\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)\" data-vl-record>\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(col)\" [attr.data-vl-path]=\"vlFieldPath(col)\"\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 | vlDesignField:designTranslations\" [propertySchema]=\"rowSchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"errorMessages\"\r\n [saveTried]=\"rowSaveTried\" [list]=\"remoteData[col.scope.reference]\"\r\n [hideLabel]=\"true\" [compact]=\"true\">\r\n </vl-control>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"gridCell; context: { col: col, data: data, i: i }\"></ng-container>\r\n }\r\n </td>\r\n <!-- edit: pencil, or \u2713 save / \u2715 cancel on the row being edited (layoutSchema.edit) -->\r\n <td *ngIf=\"canEdit\" class=\"grid-edit-cell\">\r\n @if (editingRow === data) {\r\n <button type=\"submit\" class=\"grid-edit-btn grid-edit-btn--save\" [attr.aria-label]=\"t('Save')\"\r\n data-vl-action=\"saveRow\">✓</button>\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Cancel')\"\r\n data-vl-action=\"cancelRow\" (click)=\"cancelEdit()\">✕</button>\r\n } @else {\r\n <button type=\"button\" class=\"grid-edit-btn\" [attr.aria-label]=\"t('Edit')\" [disabled]=\"editingRow\"\r\n data-vl-action=\"editRow\" (click)=\"startEdit(data)\">✎</button>\r\n }\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n </form>\r\n </div>\r\n \r\n <!-- table footer -->\r\n <ng-container *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\">\r\n <ng-container *ngTemplateOutlet=\"gridFooter\"></ng-container>\r\n </ng-container>\r\n \r\n <!-- scrolling: the end of the runtime table asks for the next page -->\r\n @if (scrollPagination) {<div #scrollSentinel class=\"scroll-pagination-sentinel\" aria-hidden=\"true\" [attr.data-vl-list-end]=\"listEnd() ? 'true' : null\"></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)\" data-vl-action=\"save\" [attr.data-vl-writes]=\"rowWrites(col.option?.save)\"\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)\" data-vl-action=\"delete\" data-vl-writes=\"true\"\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 [attr.data-vl-action]=\"vlAction(col.option)\" [attr.data-vl-writes]=\"vlWrites(col.option)\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeRowBtnClick(col.option, data)\"\r\n [class]=\"classNames(col?.label?.style)\">\r\n {{ col.label?.caption | vlDesignText:designTranslations }}\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' && isCalculated(col)) {\r\n <span>{{ calculatedValue(col, data) | number:'1.2-2' }}</span>\r\n } @else {\r\n <vl-control mode=\"display\" [field]=\"col | vlDesignField:designTranslations\" [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 <!-- every footer field and button is drawn by the shared <vl-control>, like the form and the dialog: the\r\n same controls, protected = a locked input, no * on it, start values, rules (it had its own switch\r\n for text and number with its own protected text - user 2026-10-29: the same pattern everywhere) -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields | vlVisible\"\r\n [attr.data-vl-field]=\"vlFieldKey(tableField)\" [attr.data-vl-path]=\"vlFieldPath(tableField)\">\r\n <vl-control [field]=\"tableField | vlDesignField:designTranslations\" [propertySchema]=\"tableitemInfo?.propertySchema ?? form?.propertySchema\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [errorMessages]=\"selectedLanguageInfo?.errorMessages || errorMessages\"\r\n [saveTried]=\"false\" container=\"form\" buttonType=\"button\"\r\n [list]=\"remoteData[tableField.scope?.reference]\"\r\n (buttonClick)=\"invokeGridBtnClick($event, tableitemInfo.propertySchema)\">\r\n </vl-control>\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
11418
11910
|
}], ctorParameters: () => [{ type: RequestService }, { type: UtilityService }, { type: NotificationService }, { type: i4.OktaAuthStateService }], propDecorators: { errorMessages: [{
|
|
11419
11911
|
type: Input
|
|
11420
11912
|
}], environment: [{
|
|
@@ -11540,6 +12032,9 @@ function moveTreeNode(items, from, parent, destinationIndex, key) {
|
|
|
11540
12032
|
return next;
|
|
11541
12033
|
}
|
|
11542
12034
|
|
|
12035
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
12036
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
12037
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
11543
12038
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-01
|
|
11544
12039
|
// - change: the search field's key at the bottom right comes from its setting (enterKey, default search)
|
|
11545
12040
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
@@ -11740,7 +12235,7 @@ class HeaderMenuComponent {
|
|
|
11740
12235
|
return 'image';
|
|
11741
12236
|
if (name === 'searchInput')
|
|
11742
12237
|
return 'search';
|
|
11743
|
-
if (header?.option
|
|
12238
|
+
if (actionName(header?.option, 'menu') === 'cart')
|
|
11744
12239
|
return 'cart';
|
|
11745
12240
|
return 'button';
|
|
11746
12241
|
}
|
|
@@ -11809,14 +12304,14 @@ class HeaderMenuComponent {
|
|
|
11809
12304
|
return items;
|
|
11810
12305
|
}
|
|
11811
12306
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: i4.OktaAuthStateService, optional: true }, { token: RequestService }, { token: UtilityService }, { token: Couchdb }, { token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
11812
|
-
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", pageTitle: "pageTitle", cartInfo: "cartInfo", design: "design" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems", designChange: "designChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: canvas: no pencil on the header - a click on it chooses it -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: one element template draws the app and canvas, including nested groups, classes and page title.\r\n - new: design handles select/move/request deletion by path; runtime actions stay inactive in design mode. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - change: without a currency the cart shows the plain sum - no fixed USD (OFFENE-PUNKTE 116 F) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - new: element kind title (the page shown) (OFFENE-PUNKTE 118) -->\r\n<!-- 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<!-- Existing runtime contract: image/text/title/button/search/cart/user/group, legacy field-name aliases,\r\n data-vl-action/writes markers, project styles, currency and sign-in rules remain supported. -->\r\n<header *ngIf=\"shownItems.length > 0 || design\" [ngStyle]=\"design && !shownItems.length ? {} : getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\"\r\n [class.vl-d-root]=\"!!design\" cdkDropList [cdkDropListDisabled]=\"!design\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId([])\" [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"listIds()\" (cdkDropListDropped)=\"elementDropped($event, [])\"\r\n (click)=\"selectHeader()\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: shownItems, parent: [] }\"></ng-container>\r\n @if (design && !shownItems.length) { <span class=\"vl-d-empty-hint\">{{ dt.emptyHeader }}</span> }\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements let-parent=\"parent\">\r\n <ng-container *ngFor=\"let header of elements; let index = index\">\r\n @if (isShown(header)) {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n [class.vl-d-item]=\"!!design\" [class.vl-d-item--selected]=\"!!design && chosen(path(parent, index))\"\r\n [class.vl-d-hidden]=\"!!design && header?.option?.visible === false\"\r\n cdkDrag [cdkDragDisabled]=\"!design\" [cdkDragData]=\"{vlDesign: 'headerElement', path: path(parent, index)}\"\r\n cdkDropList [cdkDropListDisabled]=\"!design || kindOf(header) !== 'group'\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId(path(parent, index))\" [cdkDropListData]=\"path(parent, index)\" [cdkDropListConnectedTo]=\"listIds()\"\r\n (cdkDropListDropped)=\"elementDropped($event, path(parent, index))\"\r\n [attr.data-vl-field]=\"vlFieldKey(header)\" [attr.data-vl-path]=\"vlFieldPath(header)\"\r\n [attr.data-vl-action]=\"kindOf(header) === 'cart' ? 'cart' : null\"\r\n [attr.data-vl-writes]=\"kindOf(header) === 'cart' ? 'false' : null\"\r\n (click)=\"elementClicked(header, path(parent, index), $event)\"\r\n [attr.data-vl-design-path]=\"design ? path(parent, index).join('.') : null\">\r\n @if (design) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"elementAction($event, path(parent, index))\"></vl-design-bar>\r\n }\r\n @switch (kindOf(header)) {\r\n @case ('image') {\r\n <img [src]=\"pictureOf(header)\" [alt]=\"text(header.alt || header.label?.caption || '')\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n }\r\n @case ('text') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n }\r\n @case ('title') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ text(pageTitle) }}</span>\r\n }\r\n @case ('search') {\r\n <input #search type=\"text\" [readOnly]=\"!!design\" [placeholder]=\"text(header.option?.placeholder ?? '')\"\r\n [vlCustomKeyboard]=\"design ? null : searchKeyboard(header)\" [attr.data-vl-enter-key]=\"searchEnterKey(header)\"\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\" (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 }\r\n @case ('cart') {\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ header.option?.currency ? (cartInfo.totalPrice | currency : header.option.currency) : (cartInfo.totalPrice | number : '1.2-2') }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">{{ cartInfo.quantity }}</span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n }\r\n @case ('user') {\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)\">{{ text(header.option?.signOutText || 'Sign out') }}</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)\">{{ text(header.option?.signInText || 'Sign in') }}</button>\r\n }\r\n }\r\n @case ('group') {\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [], parent: path(parent, index) }\"></ng-container>\r\n }\r\n @default {\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 }\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["header.vl-d-root>.vl-d-container-bar{position:absolute;top:50%;right:4px;margin:0;transform:translateY(-50%);z-index:5}header.vl-d-root{min-height:28px}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: NzIconModule }, { kind: "directive", type: i10.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }, { kind: "pipe", type: i9.CurrencyPipe, name: "currency" }] });
|
|
12307
|
+
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", pageTitle: "pageTitle", cartInfo: "cartInfo", design: "design" }, outputs: { buttonClick: "buttonClick", showTableContent: "showTableContent", searchItems: "searchItems", designChange: "designChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: canvas: no pencil on the header - a click on it chooses it -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: one element template draws the app and canvas, including nested groups, classes and page title.\r\n - new: design handles select/move/request deletion by path; runtime actions stay inactive in design mode. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - change: without a currency the cart shows the plain sum - no fixed USD (OFFENE-PUNKTE 116 F) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - new: element kind title (the page shown) (OFFENE-PUNKTE 118) -->\r\n<!-- 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<!-- Existing runtime contract: image/text/title/button/search/cart/user/group, legacy field-name aliases,\r\n data-vl-action/writes markers, project styles, currency and sign-in rules remain supported. -->\r\n<header *ngIf=\"shownItems.length > 0 || design\" [ngStyle]=\"design && !shownItems.length ? {} : getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\"\r\n [class.vl-d-root]=\"!!design\" cdkDropList [cdkDropListDisabled]=\"!design\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId([])\" [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"listIds()\" (cdkDropListDropped)=\"elementDropped($event, [])\"\r\n (click)=\"selectHeader()\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: shownItems, parent: [] }\"></ng-container>\r\n @if (design && !shownItems.length) { <span class=\"vl-d-empty-hint\">{{ dt.emptyHeader }}</span> }\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements let-parent=\"parent\">\r\n <ng-container *ngFor=\"let header of elements; let index = index\">\r\n @if (isShown(header)) {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n [class.vl-d-item]=\"!!design\" [class.vl-d-item--selected]=\"!!design && chosen(path(parent, index))\"\r\n [class.vl-d-hidden]=\"!!design && header?.option?.visible === false\"\r\n cdkDrag [cdkDragDisabled]=\"!design\" [cdkDragData]=\"{vlDesign: 'headerElement', path: path(parent, index)}\"\r\n cdkDropList [cdkDropListDisabled]=\"!design || kindOf(header) !== 'group'\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId(path(parent, index))\" [cdkDropListData]=\"path(parent, index)\" [cdkDropListConnectedTo]=\"listIds()\"\r\n (cdkDropListDropped)=\"elementDropped($event, path(parent, index))\"\r\n [attr.data-vl-field]=\"vlFieldKey(header)\" [attr.data-vl-path]=\"vlFieldPath(header)\"\r\n [attr.data-vl-action]=\"kindOf(header) === 'cart' ? 'cart' : null\"\r\n [attr.data-vl-writes]=\"kindOf(header) === 'cart' ? 'false' : null\"\r\n (click)=\"elementClicked(header, path(parent, index), $event)\"\r\n [attr.data-vl-design-path]=\"design ? path(parent, index).join('.') : null\">\r\n @if (design) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"elementAction($event, path(parent, index))\"></vl-design-bar>\r\n }\r\n @switch (kindOf(header)) {\r\n @case ('image') {\r\n <img [src]=\"pictureOf(header)\" [alt]=\"text(header.alt || header.label?.caption || '')\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n }\r\n @case ('text') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n }\r\n @case ('title') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ text(pageTitle) }}</span>\r\n }\r\n @case ('search') {\r\n <input #search type=\"text\" [readOnly]=\"!!design\" [placeholder]=\"text(header.option?.placeholder ?? '')\"\r\n [vlCustomKeyboard]=\"design ? null : searchKeyboard(header)\" [attr.data-vl-enter-key]=\"searchEnterKey(header)\"\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\" (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 }\r\n @case ('cart') {\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ header.option?.currency ? (cartInfo.totalPrice | currency : header.option.currency) : (cartInfo.totalPrice | number : '1.2-2') }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">{{ cartInfo.quantity }}</span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n }\r\n @case ('user') {\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)\">{{ text(header.option?.signOutText || 'Sign out') }}</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)\">{{ text(header.option?.signInText || 'Sign in') }}</button>\r\n }\r\n }\r\n @case ('group') {\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [], parent: path(parent, index) }\"></ng-container>\r\n }\r\n @default {\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 }\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["header.vl-d-root>.vl-d-container-bar{position:absolute;top:50%;right:4px;margin:0;transform:translateY(-50%);z-index:5}header.vl-d-root{min-height:28px}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\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: NzIconModule }, { kind: "directive", type: i10.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: "directive", type: CustomKeyboardDirective, selector: "[vlCustomKeyboard]", inputs: ["vlCustomKeyboard"] }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }, { kind: "pipe", type: i9.CurrencyPipe, name: "currency" }] });
|
|
11813
12308
|
}
|
|
11814
12309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
|
|
11815
12310
|
type: Component,
|
|
11816
12311
|
args: [{ standalone: true, imports: [
|
|
11817
12312
|
CommonModule,
|
|
11818
12313
|
NzIconModule, DragDropModule, DesignBarComponent, CustomKeyboardDirective
|
|
11819
|
-
], selector: 'vl-header-menu', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: canvas: no pencil on the header - a click on it chooses it -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: one element template draws the app and canvas, including nested groups, classes and page title.\r\n - new: design handles select/move/request deletion by path; runtime actions stay inactive in design mode. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - change: without a currency the cart shows the plain sum - no fixed USD (OFFENE-PUNKTE 116 F) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - new: element kind title (the page shown) (OFFENE-PUNKTE 118) -->\r\n<!-- 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<!-- Existing runtime contract: image/text/title/button/search/cart/user/group, legacy field-name aliases,\r\n data-vl-action/writes markers, project styles, currency and sign-in rules remain supported. -->\r\n<header *ngIf=\"shownItems.length > 0 || design\" [ngStyle]=\"design && !shownItems.length ? {} : getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\"\r\n [class.vl-d-root]=\"!!design\" cdkDropList [cdkDropListDisabled]=\"!design\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId([])\" [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"listIds()\" (cdkDropListDropped)=\"elementDropped($event, [])\"\r\n (click)=\"selectHeader()\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: shownItems, parent: [] }\"></ng-container>\r\n @if (design && !shownItems.length) { <span class=\"vl-d-empty-hint\">{{ dt.emptyHeader }}</span> }\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements let-parent=\"parent\">\r\n <ng-container *ngFor=\"let header of elements; let index = index\">\r\n @if (isShown(header)) {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n [class.vl-d-item]=\"!!design\" [class.vl-d-item--selected]=\"!!design && chosen(path(parent, index))\"\r\n [class.vl-d-hidden]=\"!!design && header?.option?.visible === false\"\r\n cdkDrag [cdkDragDisabled]=\"!design\" [cdkDragData]=\"{vlDesign: 'headerElement', path: path(parent, index)}\"\r\n cdkDropList [cdkDropListDisabled]=\"!design || kindOf(header) !== 'group'\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId(path(parent, index))\" [cdkDropListData]=\"path(parent, index)\" [cdkDropListConnectedTo]=\"listIds()\"\r\n (cdkDropListDropped)=\"elementDropped($event, path(parent, index))\"\r\n [attr.data-vl-field]=\"vlFieldKey(header)\" [attr.data-vl-path]=\"vlFieldPath(header)\"\r\n [attr.data-vl-action]=\"kindOf(header) === 'cart' ? 'cart' : null\"\r\n [attr.data-vl-writes]=\"kindOf(header) === 'cart' ? 'false' : null\"\r\n (click)=\"elementClicked(header, path(parent, index), $event)\"\r\n [attr.data-vl-design-path]=\"design ? path(parent, index).join('.') : null\">\r\n @if (design) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"elementAction($event, path(parent, index))\"></vl-design-bar>\r\n }\r\n @switch (kindOf(header)) {\r\n @case ('image') {\r\n <img [src]=\"pictureOf(header)\" [alt]=\"text(header.alt || header.label?.caption || '')\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n }\r\n @case ('text') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n }\r\n @case ('title') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ text(pageTitle) }}</span>\r\n }\r\n @case ('search') {\r\n <input #search type=\"text\" [readOnly]=\"!!design\" [placeholder]=\"text(header.option?.placeholder ?? '')\"\r\n [vlCustomKeyboard]=\"design ? null : searchKeyboard(header)\" [attr.data-vl-enter-key]=\"searchEnterKey(header)\"\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\" (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 }\r\n @case ('cart') {\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ header.option?.currency ? (cartInfo.totalPrice | currency : header.option.currency) : (cartInfo.totalPrice | number : '1.2-2') }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">{{ cartInfo.quantity }}</span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n }\r\n @case ('user') {\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)\">{{ text(header.option?.signOutText || 'Sign out') }}</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)\">{{ text(header.option?.signInText || 'Sign in') }}</button>\r\n }\r\n }\r\n @case ('group') {\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [], parent: path(parent, index) }\"></ng-container>\r\n }\r\n @default {\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 }\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["header.vl-d-root>.vl-d-container-bar{position:absolute;top:50%;right:4px;margin:0;transform:translateY(-50%);z-index:5}header.vl-d-root{min-height:28px}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
12314
|
+
], selector: 'vl-header-menu', template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: canvas: no pencil on the header - a click on it chooses it -->\r\n<!-- Shuaib, 2026-10-30\r\n - change: one element template draws the app and canvas, including nested groups, classes and page title.\r\n - new: design handles select/move/request deletion by path; runtime actions stay inactive in design mode. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - change: without a currency the cart shows the plain sum - no fixed USD (OFFENE-PUNKTE 116 F) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-27\r\n - new: element kind title (the page shown) (OFFENE-PUNKTE 118) -->\r\n<!-- 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<!-- Existing runtime contract: image/text/title/button/search/cart/user/group, legacy field-name aliases,\r\n data-vl-action/writes markers, project styles, currency and sign-in rules remain supported. -->\r\n<header *ngIf=\"shownItems.length > 0 || design\" [ngStyle]=\"design && !shownItems.length ? {} : getStyle(headerLayout?.style)\" [ngClass]=\"classNames(headerLayout?.style)\"\r\n [class.vl-d-root]=\"!!design\" cdkDropList [cdkDropListDisabled]=\"!design\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId([])\" [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"listIds()\" (cdkDropListDropped)=\"elementDropped($event, [])\"\r\n (click)=\"selectHeader()\">\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: shownItems, parent: [] }\"></ng-container>\r\n @if (design && !shownItems.length) { <span class=\"vl-d-empty-hint\">{{ dt.emptyHeader }}</span> }\r\n</header>\r\n\r\n<ng-template #elementsTpl let-elements let-parent=\"parent\">\r\n <ng-container *ngFor=\"let header of elements; let index = index\">\r\n @if (isShown(header)) {\r\n <div [ngStyle]=\"getStyle(header?.option?.style)\" [ngClass]=\"classNames(header?.option?.style)\"\r\n [class.vl-d-item]=\"!!design\" [class.vl-d-item--selected]=\"!!design && chosen(path(parent, index))\"\r\n [class.vl-d-hidden]=\"!!design && header?.option?.visible === false\"\r\n cdkDrag [cdkDragDisabled]=\"!design\" [cdkDragData]=\"{vlDesign: 'headerElement', path: path(parent, index)}\"\r\n cdkDropList [cdkDropListDisabled]=\"!design || kindOf(header) !== 'group'\" cdkDropListOrientation=\"mixed\"\r\n [id]=\"listId(path(parent, index))\" [cdkDropListData]=\"path(parent, index)\" [cdkDropListConnectedTo]=\"listIds()\"\r\n (cdkDropListDropped)=\"elementDropped($event, path(parent, index))\"\r\n [attr.data-vl-field]=\"vlFieldKey(header)\" [attr.data-vl-path]=\"vlFieldPath(header)\"\r\n [attr.data-vl-action]=\"kindOf(header) === 'cart' ? 'cart' : null\"\r\n [attr.data-vl-writes]=\"kindOf(header) === 'cart' ? 'false' : null\"\r\n (click)=\"elementClicked(header, path(parent, index), $event)\"\r\n [attr.data-vl-design-path]=\"design ? path(parent, index).join('.') : null\">\r\n @if (design) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"elementAction($event, path(parent, index))\"></vl-design-bar>\r\n }\r\n @switch (kindOf(header)) {\r\n @case ('image') {\r\n <img [src]=\"pictureOf(header)\" [alt]=\"text(header.alt || header.label?.caption || '')\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" [ngClass]=\"classNames(header?.scope?.style)\" />\r\n }\r\n @case ('text') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ captionOf(header) }}</span>\r\n }\r\n @case ('title') {\r\n <span [ngStyle]=\"getStyle(header?.label?.style)\" [ngClass]=\"classNames(header?.label?.style)\">{{ text(pageTitle) }}</span>\r\n }\r\n @case ('search') {\r\n <input #search type=\"text\" [readOnly]=\"!!design\" [placeholder]=\"text(header.option?.placeholder ?? '')\"\r\n [vlCustomKeyboard]=\"design ? null : searchKeyboard(header)\" [attr.data-vl-enter-key]=\"searchEnterKey(header)\"\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\" (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 }\r\n @case ('cart') {\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\" [ngClass]=\"classNames(header?.priceStyle)\">\r\n {{ header.option?.currency ? (cartInfo.totalPrice | currency : header.option.currency) : (cartInfo.totalPrice | number : '1.2-2') }}\r\n </span>\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\" [ngClass]=\"classNames(header?.quantityStyle)\">{{ cartInfo.quantity }}</span>\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\" [ngClass]=\"classNames(header?.iconStyle)\"></i>\r\n }\r\n @case ('user') {\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)\">{{ text(header.option?.signOutText || 'Sign out') }}</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)\">{{ text(header.option?.signInText || 'Sign in') }}</button>\r\n }\r\n }\r\n @case ('group') {\r\n <ng-container *ngTemplateOutlet=\"elementsTpl; context: { $implicit: header.elements || [], parent: path(parent, index) }\"></ng-container>\r\n }\r\n @default {\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 }\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["header.vl-d-root>.vl-d-container-bar{position:absolute;top:50%;right:4px;margin:0;transform:translateY(-50%);z-index:5}header.vl-d-root{min-height:28px}\n", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
11820
12315
|
}], ctorParameters: () => [{ type: i4.OktaAuthStateService, decorators: [{
|
|
11821
12316
|
type: Optional
|
|
11822
12317
|
}] }, { type: RequestService }, { type: UtilityService }, { type: Couchdb }, { type: i1$2.Platform }], propDecorators: { headerItems: [{
|
|
@@ -11898,6 +12393,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
11898
12393
|
], selector: 'vl-logs', template: "<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>", styles: [".network-log-wrapper{padding:12px}.network-log-table{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:900px}thead th{background:#06b6d4;color:#fff;padding:8px;text-align:left;position:sticky;top:0;z-index:2}tbody td{padding:8px;border-bottom:1px solid #e5e7eb}.log-row{cursor:pointer}.log-row:hover{background:#f1f5f9}.details-row{background:#f8fafc}.method{padding:2px 8px;border-radius:4px;font-weight:600;font-size:11px;color:#fff}.method.get{background:#16a34a}.method.post{background:#2563eb}.method.put{background:#d97706}.method.delete{background:#dc2626}td.error{color:#dc2626;font-weight:700}.ellipsis{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.details-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.detail-block{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:10px}.detail-block h4{margin:0 0 6px;font-size:14px;color:#0f172a}pre{background:#020617;color:#e5e7eb;padding:8px;border-radius:6px;max-height:260px;overflow:auto;font-size:12px;white-space:pre-wrap;word-break:break-word}@media(max-width:768px){table{min-width:100%;font-size:12px}.ellipsis{max-width:140px}.details-container{grid-template-columns:1fr}pre{max-height:200px}}\n"] }]
|
|
11899
12394
|
}], ctorParameters: () => [{ type: NetworkLogService }] });
|
|
11900
12395
|
|
|
12396
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
12397
|
+
// - fix: a dialog of read-only fields can be saved - its form is DISABLED, form.valid was false; a button's look stays off its wrapper; openUrl (point 184)
|
|
12398
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
12399
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
12400
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
11901
12401
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31
|
|
11902
12402
|
// - change: the layout's texts through translateCaptions (catalog) - one way for every container; a button's own
|
|
11903
12403
|
// caption, tooltips and dialog titles too, every switch from the written texts
|
|
@@ -11912,6 +12412,7 @@ class ModelComponent {
|
|
|
11912
12412
|
dialogRef;
|
|
11913
12413
|
dialogConfig;
|
|
11914
12414
|
utilityService;
|
|
12415
|
+
pdfViewer = inject(PdfViewerService);
|
|
11915
12416
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
11916
12417
|
vlFieldKey = testFieldKey;
|
|
11917
12418
|
vlFieldPath = testFieldPath;
|
|
@@ -12180,7 +12681,7 @@ class ModelComponent {
|
|
|
12180
12681
|
getFieldWrapperStyle(formField) {
|
|
12181
12682
|
const { style } = styleParts(formField?.style);
|
|
12182
12683
|
return {
|
|
12183
|
-
...style,
|
|
12684
|
+
...wrapperStyleOf(formField, style),
|
|
12184
12685
|
gridColumn: style['gridColumn'] || style['grid-column'] || `span ${formField?.gridSpan || 12}`,
|
|
12185
12686
|
width: style['width'] || '100%',
|
|
12186
12687
|
minWidth: style['minWidth'] || style['min-width'] || '0',
|
|
@@ -12299,11 +12800,17 @@ class ModelComponent {
|
|
|
12299
12800
|
void this.setFormDataHandler?.();
|
|
12300
12801
|
}
|
|
12301
12802
|
invokeFormBtnClick(option, propertySchema, form) {
|
|
12302
|
-
if (option
|
|
12803
|
+
if (actionName(option) === 'cancel') {
|
|
12303
12804
|
this.onCancel();
|
|
12304
12805
|
return;
|
|
12305
12806
|
}
|
|
12306
|
-
if (option
|
|
12807
|
+
if (actionName(option) === 'openPdf') {
|
|
12808
|
+
const url = linkOfRecord(option, recordOf(propertySchema));
|
|
12809
|
+
if (url)
|
|
12810
|
+
this.pdfViewer.open({ url, title: String(recordOf(propertySchema)?.['title'] ?? ''), option, translations: this.selectedLanguageInfo?.selectedLanguage });
|
|
12811
|
+
return;
|
|
12812
|
+
}
|
|
12813
|
+
if (actionName(option) === 'submit') {
|
|
12307
12814
|
const valid = this.checkValidty(form);
|
|
12308
12815
|
if (!valid) {
|
|
12309
12816
|
return;
|
|
@@ -12323,13 +12830,13 @@ class ModelComponent {
|
|
|
12323
12830
|
}
|
|
12324
12831
|
/** Why a button is locked: 'login' (needsLogin, nobody signed in) or 'valid' (needsValid, a field rule broken). */
|
|
12325
12832
|
lockReasonOf(formField, form) {
|
|
12326
|
-
return lockReason(formField?.option, { signedIn: isSignedIn(this.userInfo), valid: !!form
|
|
12833
|
+
return lockReason(formField?.option, { signedIn: isSignedIn(this.userInfo), valid: !!form && !form.invalid, requiredFilled: requiredFilled(form) });
|
|
12327
12834
|
}
|
|
12328
12835
|
/** Under a locked button: the fields hint (a dialog has no sign-in link), the same list while nothing changed. */
|
|
12329
12836
|
lockHintsOf(formField, form) {
|
|
12330
12837
|
const option = formField?.option;
|
|
12331
12838
|
const translations = this.selectedLanguageInfo?.selectedLanguage;
|
|
12332
|
-
const hints = lockReasons(option, { signedIn: isSignedIn(this.userInfo), valid: !!form
|
|
12839
|
+
const hints = lockReasons(option, { signedIn: isSignedIn(this.userInfo), valid: !!form && !form.invalid, requiredFilled: requiredFilled(form) })
|
|
12333
12840
|
.map(reason => ({ reason, text: lockHint(option, reason, translations) }));
|
|
12334
12841
|
const id = String(formField?.scope?.reference || formField?.label?.caption || '');
|
|
12335
12842
|
const key = JSON.stringify(hints);
|
|
@@ -12351,6 +12858,10 @@ class ModelComponent {
|
|
|
12351
12858
|
input?.focus({ preventScroll: true });
|
|
12352
12859
|
});
|
|
12353
12860
|
}
|
|
12861
|
+
/** A PDF button without an address in the record: nothing to show, the button stays away. */
|
|
12862
|
+
noPdf(formField) {
|
|
12863
|
+
return actionName(formField?.option) === 'openPdf' && !linkOfRecord(formField.option, recordOf(this.modalItemInfo?.propertySchema));
|
|
12864
|
+
}
|
|
12354
12865
|
checkValidty(form) {
|
|
12355
12866
|
if (!form) {
|
|
12356
12867
|
return false;
|
|
@@ -12360,7 +12871,8 @@ class ModelComponent {
|
|
|
12360
12871
|
control.markAsTouched();
|
|
12361
12872
|
control.updateValueAndValidity();
|
|
12362
12873
|
});
|
|
12363
|
-
|
|
12874
|
+
// not invalid, rather than valid: a dialog of read-only fields is DISABLED as a whole, never VALID
|
|
12875
|
+
return !form.invalid;
|
|
12364
12876
|
}
|
|
12365
12877
|
onCancel() {
|
|
12366
12878
|
this.dialogRef?.close({
|
|
@@ -12396,7 +12908,7 @@ class ModelComponent {
|
|
|
12396
12908
|
return !!control?.invalid && ((!!control.dirty && !!control.touched) || this.saveTried);
|
|
12397
12909
|
}
|
|
12398
12910
|
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 });
|
|
12399
|
-
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-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
12911
|
+
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-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 [hidden]=\"noPdf(formField)\"\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 | vlDesignField:designTranslations\"\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i15.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: i15.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: DesignFieldPipe, name: "vlDesignField" }, { kind: "pipe", type: DesignTextPipe, name: "vlDesignText" }, { kind: "pipe", type: VisiblePipe, name: "vlVisible" }] });
|
|
12400
12912
|
}
|
|
12401
12913
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ModelComponent, decorators: [{
|
|
12402
12914
|
type: Component,
|
|
@@ -12408,7 +12920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
12408
12920
|
DragDropModule,
|
|
12409
12921
|
DesignBarComponent,
|
|
12410
12922
|
DropMarkerComponent,
|
|
12411
|
-
], template: "<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\"\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
12923
|
+
], template: "<!-- Shuaib, 2026-10-30\r\n - change: design-mode field captions/placeholders use the app dictionary on display copies only. -->\r\n<!-- 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 | vlDesignText:designTranslations }}\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 | vlDesignField:designTranslations\" [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 | vlDesignText:designTranslations }}\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 [hidden]=\"noPdf(formField)\"\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 | vlDesignField:designTranslations\"\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-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
12412
12924
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.DynamicDialogRef, decorators: [{
|
|
12413
12925
|
type: Optional
|
|
12414
12926
|
}] }, { type: i1$4.DynamicDialogConfig, decorators: [{
|
|
@@ -12526,11 +13038,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
12526
13038
|
args: [{ selector: 'vl-time', standalone: true, template: "<p>time works!</p>\r\n" }]
|
|
12527
13039
|
}] });
|
|
12528
13040
|
|
|
13041
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
13042
|
+
// - change: a PDF document opens in the app's viewer (point 185)
|
|
12529
13043
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
12530
13044
|
// - new: <vl-terms-dialog> - a document of Terms & Conditions to read (Close), or the terms to confirm before the
|
|
12531
13045
|
// sign-in (Accept / Decline, imprint and privacy reachable from it). Texts come from the app's language
|
|
12532
13046
|
// (fixed texts Accept, Decline, Close, termsConfirm …), English when the language has none
|
|
12533
13047
|
class TermsDialog {
|
|
13048
|
+
pdfViewer = inject(PdfViewerService);
|
|
12534
13049
|
/** the documents; to confirm, the terms (agb) come first, imprint and privacy as links */
|
|
12535
13050
|
set documents(docs) {
|
|
12536
13051
|
this.docs = docs || [];
|
|
@@ -12553,6 +13068,10 @@ class TermsDialog {
|
|
|
12553
13068
|
show(doc) {
|
|
12554
13069
|
if (!doc)
|
|
12555
13070
|
return;
|
|
13071
|
+
if (doc.kind === 'pdf') {
|
|
13072
|
+
this.pdfViewer.open({ url: doc.value, title: String(doc.title ?? ''), option: { proxy: false }, translations: this.translations });
|
|
13073
|
+
return;
|
|
13074
|
+
}
|
|
12556
13075
|
if (doc.kind !== 'text') {
|
|
12557
13076
|
window.open(doc.value, '_blank', 'noopener');
|
|
12558
13077
|
return;
|
|
@@ -12998,6 +13517,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
12998
13517
|
}]
|
|
12999
13518
|
}], ctorParameters: () => [{ type: ConfigService }, { type: i1$1.HttpClient }, { type: UtilityService }, { type: i1$2.Platform }, { type: MobileOidcService }] });
|
|
13000
13519
|
|
|
13520
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
13521
|
+
// - change: the PDF of Terms & Conditions opens in the app's viewer, not in a new tab (point 185)
|
|
13522
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02
|
|
13523
|
+
// - change: what an element does is asked of the action catalog (actionName) - action = backend, innerAction = app;
|
|
13524
|
+
// older forms (button "get", innerAction saveAll/submit, copy/multiply objects) mean the same (OFFENE-PUNKTE 105/145)
|
|
13001
13525
|
// Shuaib, 2026-10-30
|
|
13002
13526
|
// - new: nested side-menu design mode uses library menu rendering and generated app-setting entries.
|
|
13003
13527
|
// - change: path-based move/edit/delete events preserve the saved menu; generated entries are preview-only.
|
|
@@ -13014,6 +13538,7 @@ class SideMenuComponent {
|
|
|
13014
13538
|
dialogService;
|
|
13015
13539
|
notificationService;
|
|
13016
13540
|
injector;
|
|
13541
|
+
pdfViewer = inject(PdfViewerService);
|
|
13017
13542
|
isCollapsed = false;
|
|
13018
13543
|
isMobile = false;
|
|
13019
13544
|
projectsLayoutSchema;
|
|
@@ -13074,7 +13599,7 @@ class SideMenuComponent {
|
|
|
13074
13599
|
}
|
|
13075
13600
|
/** the menu's own logout entry (top level) - the app shows it as the sign-out beside the user */
|
|
13076
13601
|
designLogoutPath() {
|
|
13077
|
-
const index = (this.menuItems || []).findIndex((item) => item
|
|
13602
|
+
const index = (this.menuItems || []).findIndex((item) => this.menuAction(item) === 'logout');
|
|
13078
13603
|
return index < 0 ? null : [index];
|
|
13079
13604
|
}
|
|
13080
13605
|
/** "+": the Designer adds an entry at the top ([]) or into the folder of path */
|
|
@@ -13082,10 +13607,14 @@ class SideMenuComponent {
|
|
|
13082
13607
|
if (this.design)
|
|
13083
13608
|
this.designChange.emit({ type: 'add', target: { kind: 'menuEntry', path: [...path] } });
|
|
13084
13609
|
}
|
|
13610
|
+
/** What a menu entry does (action catalog): '' opens its page; login, logout, cart. */
|
|
13611
|
+
menuAction(item) {
|
|
13612
|
+
return actionName(item?.option, 'menu');
|
|
13613
|
+
}
|
|
13085
13614
|
menuText(item) {
|
|
13086
13615
|
const text = designText(item?.label?.caption ?? '', this.design?.translations);
|
|
13087
13616
|
// the app shows the sign-out beside the user's name, not as an entry - on the canvas it needs a name to be found
|
|
13088
|
-
return text || (item
|
|
13617
|
+
return text || (this.menuAction(item) === 'logout' ? 'Logout' : '');
|
|
13089
13618
|
}
|
|
13090
13619
|
/** The inline menu's indent of a level, as nz-menu gives it in the app (24px per level). */
|
|
13091
13620
|
designIndent(parent) { return 24 * (parent.length + 1); }
|
|
@@ -13750,7 +14279,7 @@ class SideMenuComponent {
|
|
|
13750
14279
|
/** The menu entry with action 'logout', at any depth of the menu. */
|
|
13751
14280
|
findLogoutMenu(items) {
|
|
13752
14281
|
for (const item of items ?? []) {
|
|
13753
|
-
if (item
|
|
14282
|
+
if (this.menuAction(item) === 'logout') {
|
|
13754
14283
|
return item;
|
|
13755
14284
|
}
|
|
13756
14285
|
const inSubmenu = this.findLogoutMenu(item?.submenu);
|
|
@@ -13959,7 +14488,7 @@ class SideMenuComponent {
|
|
|
13959
14488
|
this.notificationService.warning('Project Version Not Apply');
|
|
13960
14489
|
return;
|
|
13961
14490
|
}
|
|
13962
|
-
if (option
|
|
14491
|
+
if (actionName(option, 'menu') === 'login' &&
|
|
13963
14492
|
this.environment?.login?.type ===
|
|
13964
14493
|
'keycloak') {
|
|
13965
14494
|
if (this.isNativeMobile()) {
|
|
@@ -14013,8 +14542,7 @@ class SideMenuComponent {
|
|
|
14013
14542
|
try {
|
|
14014
14543
|
const path = document.value.startsWith('Media/') ? document.value : `Media/${document.value}`;
|
|
14015
14544
|
const src = await this.couchdbService.getImageSrcFromCouchDb(`${this.tenantName}_${this.projectSeleted}`, path);
|
|
14016
|
-
|
|
14017
|
-
window.open(url, '_blank', 'noopener');
|
|
14545
|
+
this.pdfViewer.open({ url: src, title: document.value, option: { proxy: false } });
|
|
14018
14546
|
}
|
|
14019
14547
|
catch (error) {
|
|
14020
14548
|
console.error('The PDF of Terms & Conditions could not be opened', error);
|
|
@@ -14124,7 +14652,7 @@ class SideMenuComponent {
|
|
|
14124
14652
|
});
|
|
14125
14653
|
}
|
|
14126
14654
|
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 });
|
|
14127
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { design: "design", menuLayout: "menuLayout", menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo", startLanguages: "startLanguages", mainCenter: "mainCenter" }, outputs: { designChange: "designChange", 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.mobileClass", "class.vl-menu-design": "this.menuDesignClass" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a menu entry that opens a page carries data-vl-page (its folder under pages/) - the same in every language,\r\n tests find an entry by it, not by its translated caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: built like the app: the user's place at the top with the sign-out (the logout entry), folders start\r\n closed, own entries show their grip, the app's own Setting entries are paler\r\n - change: no own edit row - a click on the menu's free space chooses it; \"+\" (hover text) adds an entry, a\r\n folder's \"+\" adds into it; the menu folds with the app's handle and every folder opens and closes\r\n - fix: entries indented by their level like the app (all stood at 24px); a sign-out entry without caption shows\r\n \"Logout\" on the canvas (it was an empty line)\r\n - fix: the canvas menu fills its area - the area's width (20% on the canvas) shrank it a second time to 50px -->\r\n<!-- Shuaib, 2026-10-30\r\n - new: recursive design menu shows saved and generated entries with path-based handles; navigation is inert.\r\n Generated settings are selectable, not draggable/deletable; the editor changes them through Main settings. -->\r\n@if (design) {\r\n<div class=\"vl-d-root vl-d-item\" [ngClass]=\"menuClasses(menuLayout?.style)\" [ngStyle]=\"designRootStyle()\"\r\n [class.vl-d-item--selected]=\"designMenuSelected()\" [style.width]=\"designCollapsed ? 'fit-content' : null\" (click)=\"selectDesignMenu()\">\r\n <!-- the same fold handle as the app; a click on the menu's free space chooses the menu, \"+\" adds an entry -->\r\n <div class=\"side-toggle-handle\" [class.collapsed]=\"designCollapsed\" (click)=\"$event.stopPropagation(); designCollapsed = !designCollapsed\">\r\n <span nz-icon [nzType]=\"designCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <!-- where the app shows the signed-in user and the sign-out: a placeholder; its sign-out symbol is the menu's\r\n logout entry (the app shows no logout line in the menu) -->\r\n @if (designSignIn()) {\r\n <div class=\"user-profile vl-menu-design-user\" [class.collapsed]=\"designCollapsed\">\r\n <span class=\"avatar vl-menu-design-avatar\" nz-icon nzType=\"user\"></span>\r\n @if (!designCollapsed) {\r\n <div class=\"details\">\r\n <div class=\"name\">{{ dt.userName }}</div>\r\n @if (designLogoutPath(); as path) {\r\n <button type=\"button\" class=\"vl-menu-design-logout\" [title]=\"menuText(designNode(path))\" (click)=\"selectDesignEntry(path, $event)\">\r\n <span nz-icon nzType=\"logout\"></span></button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"designCollapsed\" cdkDropList [id]=\"designListId([])\"\r\n [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designListIds()\" (cdkDropListDropped)=\"designEntryDropped($event, [])\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: designMenu, parent: []}\"></ng-container>\r\n<ng-template #designEntries let-items let-parent=\"parent\">\r\n @for (item of items; track $index; let index = $index) {\r\n @if (item?.option?.action === 'logout') {\r\n <!-- shown as the sign-out of the user above, like the app -->\r\n } @else if (item.submenu) {\r\n <li nz-submenu [nzOpen]=\"designOpen(designPath(parent, index))\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" (nzOpenChange)=\"designFold(designPath(parent, index), $event)\"\r\n [nzTitle]=\"designTitle\" [nzPaddingLeft]=\"designIndent(parent)\"\r\n cdkDrag [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\">\r\n <ul cdkDropList [id]=\"designListId(designPath(parent, index))\" [cdkDropListData]=\"designPath(parent, index)\"\r\n [cdkDropListDisabled]=\"!designEditable(designPath(parent, index))\" [cdkDropListConnectedTo]=\"designListIds()\"\r\n (cdkDropListDropped)=\"designEntryDropped($event, designPath(parent, index))\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: item.submenu, parent: designPath(parent, index)}\"></ng-container>\r\n </ul>\r\n </li>\r\n } @else {\r\n <li nz-menu-item class=\"vl-d-item\" [nzPaddingLeft]=\"designIndent(parent)\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" cdkDrag\r\n [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\"\r\n (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </li>\r\n }\r\n <ng-template #designTitle>\r\n <span class=\"vl-d-item\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-template #designLabel>\r\n @if (designEditable(designPath(parent, index))) { <span class=\"vl-menu-design-grip\" aria-hidden=\"true\">\u22EE\u22EE</span> }\r\n <span *ngIf=\"item.icon\" nz-icon [nzType]=\"item.icon\"></span>\r\n <span [ngClass]=\"menuClasses(item?.label?.style)\" [ngStyle]=\"menuStyle(item?.label?.style)\">{{ menuText(item) }}</span>\r\n @if (designEditable(designPath(parent, index))) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"item.submenu ? ['drag', 'add', 'edit', 'delete'] : ['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, add: dt.addMenuChild, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"designEntryAction($event, designPath(parent, index))\"></vl-design-bar>\r\n }\r\n </ng-template>\r\n }\r\n</ng-template>\r\n </ul>\r\n <!-- \"+\" at the end of the menu: a new entry at the top level (hover text) -->\r\n <button type=\"button\" class=\"vl-menu-design-add\" [title]=\"dt.addMenuEntry\" [attr.aria-label]=\"dt.addMenuEntry\"\r\n (click)=\"$event.stopPropagation(); designAdd([])\"><i class=\"pi pi-plus\" aria-hidden=\"true\"></i></button>\r\n</div>\r\n} @else {\r\n<!-- 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 [attr.data-vl-page]=\"vlPage(item)\"\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\" [attr.data-vl-page]=\"vlPage(child)\"\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 [attr.data-vl-page]=\"vlPage(subChild)\">\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\r\n}\r\n", styles: [":host(.vl-menu-design){width:100%;max-width:100%;min-width:0;height:100%}:host(.vl-menu-design)>.vl-d-root{min-height:100%;background:#001529;display:flow-root}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{position:static;margin-left:auto;flex:none;transform:none;display:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content,:host(.vl-menu-design) ::ng-deep span.vl-d-item{display:flex;align-items:center;gap:4px;min-width:0;width:100%;outline:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content>span:not(.vl-menu-design-grip):not([nz-icon]){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}:host(.vl-menu-design) ::ng-deep li{position:relative}:host(.vl-menu-design) ::ng-deep li.ant-menu-item:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .vl-d-item--selected>.ant-menu-title-content .vl-d-bar{display:inline-flex;opacity:1;visibility:visible;transform:none}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{zoom:.8}:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title{position:relative}:host(.vl-menu-design) .vl-menu-design-add{display:flex;align-items:center;justify-content:center;width:100%;height:40px;margin:0;border:1px dashed rgba(255,255,255,.35);border-radius:6px;background:#001529;color:#ffffffbf;cursor:pointer}:host(.vl-menu-design) .vl-menu-design-add:hover{color:#fff;border-color:#fff}:host(.vl-menu-design) .vl-menu-design-generated{opacity:.6}:host(.vl-menu-design) .vl-menu-design-grip{color:#ffffff73;margin-right:6px;letter-spacing:-3px;cursor:grab}:host(.vl-menu-design) .vl-menu-design-user{background:#001529}:host(.vl-menu-design) .vl-menu-design-avatar{display:inline-flex;align-items:center;justify-content:center;font-size:26px;color:#fff;background:#ffffff1f}:host(.vl-menu-design) .vl-menu-design-logout{margin-top:4px;border:0;background:none;color:#fff;cursor:pointer;padding:0}: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", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\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: PlatformModule }, { kind: "ngmodule", type:
|
|
14655
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: SideMenuComponent, isStandalone: true, selector: "vl-side-menu", inputs: { design: "design", menuLayout: "menuLayout", menuItems: "menuItems", userInfo: "userInfo", settings: "settings", projects: "projects", tenantName: "tenantName", environment: "environment", projectSeleted: "projectSeleted", appVersionInfo: "appVersionInfo", startLanguages: "startLanguages", mainCenter: "mainCenter" }, outputs: { designChange: "designChange", 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.mobileClass", "class.vl-menu-design": "this.menuDesignClass" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: what an element does comes from the action catalog (actionName / menuAction / calcOf) - older forms mean the same -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the user's actions (the sign-out) carry data-vl-action - the tests' step signOut finds the sign-out by it -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a menu entry that opens a page carries data-vl-page (its folder under pages/) - the same in every language,\r\n tests find an entry by it, not by its translated caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: built like the app: the user's place at the top with the sign-out (the logout entry), folders start\r\n closed, own entries show their grip, the app's own Setting entries are paler\r\n - change: no own edit row - a click on the menu's free space chooses it; \"+\" (hover text) adds an entry, a\r\n folder's \"+\" adds into it; the menu folds with the app's handle and every folder opens and closes\r\n - fix: entries indented by their level like the app (all stood at 24px); a sign-out entry without caption shows\r\n \"Logout\" on the canvas (it was an empty line)\r\n - fix: the canvas menu fills its area - the area's width (20% on the canvas) shrank it a second time to 50px -->\r\n<!-- Shuaib, 2026-10-30\r\n - new: recursive design menu shows saved and generated entries with path-based handles; navigation is inert.\r\n Generated settings are selectable, not draggable/deletable; the editor changes them through Main settings. -->\r\n@if (design) {\r\n<div class=\"vl-d-root vl-d-item\" [ngClass]=\"menuClasses(menuLayout?.style)\" [ngStyle]=\"designRootStyle()\"\r\n [class.vl-d-item--selected]=\"designMenuSelected()\" [style.width]=\"designCollapsed ? 'fit-content' : null\" (click)=\"selectDesignMenu()\">\r\n <!-- the same fold handle as the app; a click on the menu's free space chooses the menu, \"+\" adds an entry -->\r\n <div class=\"side-toggle-handle\" [class.collapsed]=\"designCollapsed\" (click)=\"$event.stopPropagation(); designCollapsed = !designCollapsed\">\r\n <span nz-icon [nzType]=\"designCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <!-- where the app shows the signed-in user and the sign-out: a placeholder; its sign-out symbol is the menu's\r\n logout entry (the app shows no logout line in the menu) -->\r\n @if (designSignIn()) {\r\n <div class=\"user-profile vl-menu-design-user\" [class.collapsed]=\"designCollapsed\">\r\n <span class=\"avatar vl-menu-design-avatar\" nz-icon nzType=\"user\"></span>\r\n @if (!designCollapsed) {\r\n <div class=\"details\">\r\n <div class=\"name\">{{ dt.userName }}</div>\r\n @if (designLogoutPath(); as path) {\r\n <button type=\"button\" class=\"vl-menu-design-logout\" [title]=\"menuText(designNode(path))\" (click)=\"selectDesignEntry(path, $event)\">\r\n <span nz-icon nzType=\"logout\"></span></button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"designCollapsed\" cdkDropList [id]=\"designListId([])\"\r\n [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designListIds()\" (cdkDropListDropped)=\"designEntryDropped($event, [])\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: designMenu, parent: []}\"></ng-container>\r\n<ng-template #designEntries let-items let-parent=\"parent\">\r\n @for (item of items; track $index; let index = $index) {\r\n @if (menuAction(item) === 'logout') {\r\n <!-- shown as the sign-out of the user above, like the app -->\r\n } @else if (item.submenu) {\r\n <li nz-submenu [nzOpen]=\"designOpen(designPath(parent, index))\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" (nzOpenChange)=\"designFold(designPath(parent, index), $event)\"\r\n [nzTitle]=\"designTitle\" [nzPaddingLeft]=\"designIndent(parent)\"\r\n cdkDrag [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\">\r\n <ul cdkDropList [id]=\"designListId(designPath(parent, index))\" [cdkDropListData]=\"designPath(parent, index)\"\r\n [cdkDropListDisabled]=\"!designEditable(designPath(parent, index))\" [cdkDropListConnectedTo]=\"designListIds()\"\r\n (cdkDropListDropped)=\"designEntryDropped($event, designPath(parent, index))\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: item.submenu, parent: designPath(parent, index)}\"></ng-container>\r\n </ul>\r\n </li>\r\n } @else {\r\n <li nz-menu-item class=\"vl-d-item\" [nzPaddingLeft]=\"designIndent(parent)\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" cdkDrag\r\n [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\"\r\n (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </li>\r\n }\r\n <ng-template #designTitle>\r\n <span class=\"vl-d-item\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-template #designLabel>\r\n @if (designEditable(designPath(parent, index))) { <span class=\"vl-menu-design-grip\" aria-hidden=\"true\">\u22EE\u22EE</span> }\r\n <span *ngIf=\"item.icon\" nz-icon [nzType]=\"item.icon\"></span>\r\n <span [ngClass]=\"menuClasses(item?.label?.style)\" [ngStyle]=\"menuStyle(item?.label?.style)\">{{ menuText(item) }}</span>\r\n @if (designEditable(designPath(parent, index))) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"item.submenu ? ['drag', 'add', 'edit', 'delete'] : ['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, add: dt.addMenuChild, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"designEntryAction($event, designPath(parent, index))\"></vl-design-bar>\r\n }\r\n </ng-template>\r\n }\r\n</ng-template>\r\n </ul>\r\n <!-- \"+\" at the end of the menu: a new entry at the top level (hover text) -->\r\n <button type=\"button\" class=\"vl-menu-design-add\" [title]=\"dt.addMenuEntry\" [attr.aria-label]=\"dt.addMenuEntry\"\r\n (click)=\"$event.stopPropagation(); designAdd([])\"><i class=\"pi pi-plus\" aria-hidden=\"true\"></i></button>\r\n</div>\r\n} @else {\r\n<!-- 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\" [attr.data-vl-action]=\"menuAction(action) || null\"\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 && menuAction(item) !== 'logout'; else submenu\">\r\n <span\r\n [class]=\"itemHidden(item) ? 'hidden' : ''\">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip [attr.data-vl-page]=\"vlPage(item)\"\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=\"menuAction(item) !== '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\" [attr.data-vl-page]=\"vlPage(child)\"\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 [attr.data-vl-page]=\"vlPage(subChild)\">\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\r\n}\r\n", styles: [":host(.vl-menu-design){width:100%;max-width:100%;min-width:0;height:100%}:host(.vl-menu-design)>.vl-d-root{min-height:100%;background:#001529;display:flow-root}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{position:static;margin-left:auto;flex:none;transform:none;display:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content,:host(.vl-menu-design) ::ng-deep span.vl-d-item{display:flex;align-items:center;gap:4px;min-width:0;width:100%;outline:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content>span:not(.vl-menu-design-grip):not([nz-icon]){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}:host(.vl-menu-design) ::ng-deep li{position:relative}:host(.vl-menu-design) ::ng-deep li.ant-menu-item:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .vl-d-item--selected>.ant-menu-title-content .vl-d-bar{display:inline-flex;opacity:1;visibility:visible;transform:none}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{zoom:.8}:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title{position:relative}:host(.vl-menu-design) .vl-menu-design-add{display:flex;align-items:center;justify-content:center;width:100%;height:40px;margin:0;border:1px dashed rgba(255,255,255,.35);border-radius:6px;background:#001529;color:#ffffffbf;cursor:pointer}:host(.vl-menu-design) .vl-menu-design-add:hover{color:#fff;border-color:#fff}:host(.vl-menu-design) .vl-menu-design-generated{opacity:.6}:host(.vl-menu-design) .vl-menu-design-grip{color:#ffffff73;margin-right:6px;letter-spacing:-3px;cursor:grab}:host(.vl-menu-design) .vl-menu-design-user{background:#001529}:host(.vl-menu-design) .vl-menu-design-avatar{display:inline-flex;align-items:center;justify-content:center;font-size:26px;color:#fff;background:#ffffff1f}:host(.vl-menu-design) .vl-menu-design-logout{margin-top:4px;border:0;background:none;color:#fff;cursor:pointer;padding:0}: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", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\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: PlatformModule }, { kind: "ngmodule", type:
|
|
14128
14656
|
// NG-ZORRO
|
|
14129
14657
|
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: i10.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: i11.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i12.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type:
|
|
14130
14658
|
// PrimeNG
|
|
@@ -14143,7 +14671,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
14143
14671
|
// PrimeNG
|
|
14144
14672
|
DynamicDialogModule,
|
|
14145
14673
|
TermsDialog, DragDropModule, DesignBarComponent
|
|
14146
|
-
], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a menu entry that opens a page carries data-vl-page (its folder under pages/) - the same in every language,\r\n tests find an entry by it, not by its translated caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: built like the app: the user's place at the top with the sign-out (the logout entry), folders start\r\n closed, own entries show their grip, the app's own Setting entries are paler\r\n - change: no own edit row - a click on the menu's free space chooses it; \"+\" (hover text) adds an entry, a\r\n folder's \"+\" adds into it; the menu folds with the app's handle and every folder opens and closes\r\n - fix: entries indented by their level like the app (all stood at 24px); a sign-out entry without caption shows\r\n \"Logout\" on the canvas (it was an empty line)\r\n - fix: the canvas menu fills its area - the area's width (20% on the canvas) shrank it a second time to 50px -->\r\n<!-- Shuaib, 2026-10-30\r\n - new: recursive design menu shows saved and generated entries with path-based handles; navigation is inert.\r\n Generated settings are selectable, not draggable/deletable; the editor changes them through Main settings. -->\r\n@if (design) {\r\n<div class=\"vl-d-root vl-d-item\" [ngClass]=\"menuClasses(menuLayout?.style)\" [ngStyle]=\"designRootStyle()\"\r\n [class.vl-d-item--selected]=\"designMenuSelected()\" [style.width]=\"designCollapsed ? 'fit-content' : null\" (click)=\"selectDesignMenu()\">\r\n <!-- the same fold handle as the app; a click on the menu's free space chooses the menu, \"+\" adds an entry -->\r\n <div class=\"side-toggle-handle\" [class.collapsed]=\"designCollapsed\" (click)=\"$event.stopPropagation(); designCollapsed = !designCollapsed\">\r\n <span nz-icon [nzType]=\"designCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <!-- where the app shows the signed-in user and the sign-out: a placeholder; its sign-out symbol is the menu's\r\n logout entry (the app shows no logout line in the menu) -->\r\n @if (designSignIn()) {\r\n <div class=\"user-profile vl-menu-design-user\" [class.collapsed]=\"designCollapsed\">\r\n <span class=\"avatar vl-menu-design-avatar\" nz-icon nzType=\"user\"></span>\r\n @if (!designCollapsed) {\r\n <div class=\"details\">\r\n <div class=\"name\">{{ dt.userName }}</div>\r\n @if (designLogoutPath(); as path) {\r\n <button type=\"button\" class=\"vl-menu-design-logout\" [title]=\"menuText(designNode(path))\" (click)=\"selectDesignEntry(path, $event)\">\r\n <span nz-icon nzType=\"logout\"></span></button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"designCollapsed\" cdkDropList [id]=\"designListId([])\"\r\n [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designListIds()\" (cdkDropListDropped)=\"designEntryDropped($event, [])\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: designMenu, parent: []}\"></ng-container>\r\n<ng-template #designEntries let-items let-parent=\"parent\">\r\n @for (item of items; track $index; let index = $index) {\r\n @if (item?.option?.action === 'logout') {\r\n <!-- shown as the sign-out of the user above, like the app -->\r\n } @else if (item.submenu) {\r\n <li nz-submenu [nzOpen]=\"designOpen(designPath(parent, index))\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" (nzOpenChange)=\"designFold(designPath(parent, index), $event)\"\r\n [nzTitle]=\"designTitle\" [nzPaddingLeft]=\"designIndent(parent)\"\r\n cdkDrag [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\">\r\n <ul cdkDropList [id]=\"designListId(designPath(parent, index))\" [cdkDropListData]=\"designPath(parent, index)\"\r\n [cdkDropListDisabled]=\"!designEditable(designPath(parent, index))\" [cdkDropListConnectedTo]=\"designListIds()\"\r\n (cdkDropListDropped)=\"designEntryDropped($event, designPath(parent, index))\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: item.submenu, parent: designPath(parent, index)}\"></ng-container>\r\n </ul>\r\n </li>\r\n } @else {\r\n <li nz-menu-item class=\"vl-d-item\" [nzPaddingLeft]=\"designIndent(parent)\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" cdkDrag\r\n [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\"\r\n (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </li>\r\n }\r\n <ng-template #designTitle>\r\n <span class=\"vl-d-item\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-template #designLabel>\r\n @if (designEditable(designPath(parent, index))) { <span class=\"vl-menu-design-grip\" aria-hidden=\"true\">\u22EE\u22EE</span> }\r\n <span *ngIf=\"item.icon\" nz-icon [nzType]=\"item.icon\"></span>\r\n <span [ngClass]=\"menuClasses(item?.label?.style)\" [ngStyle]=\"menuStyle(item?.label?.style)\">{{ menuText(item) }}</span>\r\n @if (designEditable(designPath(parent, index))) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"item.submenu ? ['drag', 'add', 'edit', 'delete'] : ['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, add: dt.addMenuChild, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"designEntryAction($event, designPath(parent, index))\"></vl-design-bar>\r\n }\r\n </ng-template>\r\n }\r\n</ng-template>\r\n </ul>\r\n <!-- \"+\" at the end of the menu: a new entry at the top level (hover text) -->\r\n <button type=\"button\" class=\"vl-menu-design-add\" [title]=\"dt.addMenuEntry\" [attr.aria-label]=\"dt.addMenuEntry\"\r\n (click)=\"$event.stopPropagation(); designAdd([])\"><i class=\"pi pi-plus\" aria-hidden=\"true\"></i></button>\r\n</div>\r\n} @else {\r\n<!-- 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 [attr.data-vl-page]=\"vlPage(item)\"\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\" [attr.data-vl-page]=\"vlPage(child)\"\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 [attr.data-vl-page]=\"vlPage(subChild)\">\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\r\n}\r\n", styles: [":host(.vl-menu-design){width:100%;max-width:100%;min-width:0;height:100%}:host(.vl-menu-design)>.vl-d-root{min-height:100%;background:#001529;display:flow-root}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{position:static;margin-left:auto;flex:none;transform:none;display:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content,:host(.vl-menu-design) ::ng-deep span.vl-d-item{display:flex;align-items:center;gap:4px;min-width:0;width:100%;outline:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content>span:not(.vl-menu-design-grip):not([nz-icon]){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}:host(.vl-menu-design) ::ng-deep li{position:relative}:host(.vl-menu-design) ::ng-deep li.ant-menu-item:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .vl-d-item--selected>.ant-menu-title-content .vl-d-bar{display:inline-flex;opacity:1;visibility:visible;transform:none}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{zoom:.8}:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title{position:relative}:host(.vl-menu-design) .vl-menu-design-add{display:flex;align-items:center;justify-content:center;width:100%;height:40px;margin:0;border:1px dashed rgba(255,255,255,.35);border-radius:6px;background:#001529;color:#ffffffbf;cursor:pointer}:host(.vl-menu-design) .vl-menu-design-add:hover{color:#fff;border-color:#fff}:host(.vl-menu-design) .vl-menu-design-generated{opacity:.6}:host(.vl-menu-design) .vl-menu-design-grip{color:#ffffff73;margin-right:6px;letter-spacing:-3px;cursor:grab}:host(.vl-menu-design) .vl-menu-design-user{background:#001529}:host(.vl-menu-design) .vl-menu-design-avatar{display:inline-flex;align-items:center;justify-content:center;font-size:26px;color:#fff;background:#ffffff1f}:host(.vl-menu-design) .vl-menu-design-logout{margin-top:4px;border:0;background:none;color:#fff;cursor:pointer;padding:0}: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", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}\n"] }]
|
|
14674
|
+
], template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - change: what an element does comes from the action catalog (actionName / menuAction / calcOf) - older forms mean the same -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: the user's actions (the sign-out) carry data-vl-action - the tests' step signOut finds the sign-out by it -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a menu entry that opens a page carries data-vl-page (its folder under pages/) - the same in every language,\r\n tests find an entry by it, not by its translated caption -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30\r\n - change: built like the app: the user's place at the top with the sign-out (the logout entry), folders start\r\n closed, own entries show their grip, the app's own Setting entries are paler\r\n - change: no own edit row - a click on the menu's free space chooses it; \"+\" (hover text) adds an entry, a\r\n folder's \"+\" adds into it; the menu folds with the app's handle and every folder opens and closes\r\n - fix: entries indented by their level like the app (all stood at 24px); a sign-out entry without caption shows\r\n \"Logout\" on the canvas (it was an empty line)\r\n - fix: the canvas menu fills its area - the area's width (20% on the canvas) shrank it a second time to 50px -->\r\n<!-- Shuaib, 2026-10-30\r\n - new: recursive design menu shows saved and generated entries with path-based handles; navigation is inert.\r\n Generated settings are selectable, not draggable/deletable; the editor changes them through Main settings. -->\r\n@if (design) {\r\n<div class=\"vl-d-root vl-d-item\" [ngClass]=\"menuClasses(menuLayout?.style)\" [ngStyle]=\"designRootStyle()\"\r\n [class.vl-d-item--selected]=\"designMenuSelected()\" [style.width]=\"designCollapsed ? 'fit-content' : null\" (click)=\"selectDesignMenu()\">\r\n <!-- the same fold handle as the app; a click on the menu's free space chooses the menu, \"+\" adds an entry -->\r\n <div class=\"side-toggle-handle\" [class.collapsed]=\"designCollapsed\" (click)=\"$event.stopPropagation(); designCollapsed = !designCollapsed\">\r\n <span nz-icon [nzType]=\"designCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <!-- where the app shows the signed-in user and the sign-out: a placeholder; its sign-out symbol is the menu's\r\n logout entry (the app shows no logout line in the menu) -->\r\n @if (designSignIn()) {\r\n <div class=\"user-profile vl-menu-design-user\" [class.collapsed]=\"designCollapsed\">\r\n <span class=\"avatar vl-menu-design-avatar\" nz-icon nzType=\"user\"></span>\r\n @if (!designCollapsed) {\r\n <div class=\"details\">\r\n <div class=\"name\">{{ dt.userName }}</div>\r\n @if (designLogoutPath(); as path) {\r\n <button type=\"button\" class=\"vl-menu-design-logout\" [title]=\"menuText(designNode(path))\" (click)=\"selectDesignEntry(path, $event)\">\r\n <span nz-icon nzType=\"logout\"></span></button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\" [nzInlineCollapsed]=\"designCollapsed\" cdkDropList [id]=\"designListId([])\"\r\n [cdkDropListData]=\"[]\" [cdkDropListConnectedTo]=\"designListIds()\" (cdkDropListDropped)=\"designEntryDropped($event, [])\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: designMenu, parent: []}\"></ng-container>\r\n<ng-template #designEntries let-items let-parent=\"parent\">\r\n @for (item of items; track $index; let index = $index) {\r\n @if (menuAction(item) === 'logout') {\r\n <!-- shown as the sign-out of the user above, like the app -->\r\n } @else if (item.submenu) {\r\n <li nz-submenu [nzOpen]=\"designOpen(designPath(parent, index))\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" (nzOpenChange)=\"designFold(designPath(parent, index), $event)\"\r\n [nzTitle]=\"designTitle\" [nzPaddingLeft]=\"designIndent(parent)\"\r\n cdkDrag [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\">\r\n <ul cdkDropList [id]=\"designListId(designPath(parent, index))\" [cdkDropListData]=\"designPath(parent, index)\"\r\n [cdkDropListDisabled]=\"!designEditable(designPath(parent, index))\" [cdkDropListConnectedTo]=\"designListIds()\"\r\n (cdkDropListDropped)=\"designEntryDropped($event, designPath(parent, index))\">\r\n <ng-container *ngTemplateOutlet=\"designEntries; context: {$implicit: item.submenu, parent: designPath(parent, index)}\"></ng-container>\r\n </ul>\r\n </li>\r\n } @else {\r\n <li nz-menu-item class=\"vl-d-item\" [nzPaddingLeft]=\"designIndent(parent)\" [class.vl-menu-design-generated]=\"!designEditable(designPath(parent, index))\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" cdkDrag\r\n [cdkDragDisabled]=\"!designEditable(designPath(parent, index))\"\r\n [cdkDragData]=\"{vlDesign: 'menuEntry', path: designPath(parent, index)}\"\r\n (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </li>\r\n }\r\n <ng-template #designTitle>\r\n <span class=\"vl-d-item\" [class.vl-d-item--selected]=\"designSelected(designPath(parent, index))\"\r\n [class.vl-d-hidden]=\"item?.option?.visible === false\" (click)=\"selectDesignEntry(designPath(parent, index), $event)\">\r\n <ng-container *ngTemplateOutlet=\"designLabel\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-template #designLabel>\r\n @if (designEditable(designPath(parent, index))) { <span class=\"vl-menu-design-grip\" aria-hidden=\"true\">\u22EE\u22EE</span> }\r\n <span *ngIf=\"item.icon\" nz-icon [nzType]=\"item.icon\"></span>\r\n <span [ngClass]=\"menuClasses(item?.label?.style)\" [ngStyle]=\"menuStyle(item?.label?.style)\">{{ menuText(item) }}</span>\r\n @if (designEditable(designPath(parent, index))) {\r\n <vl-design-bar class=\"vl-d-bar\" [actions]=\"item.submenu ? ['drag', 'add', 'edit', 'delete'] : ['drag', 'edit', 'delete']\"\r\n [titles]=\"{drag: dt.dragField, add: dt.addMenuChild, edit: dt.edit, delete: dt.delete}\"\r\n (act)=\"designEntryAction($event, designPath(parent, index))\"></vl-design-bar>\r\n }\r\n </ng-template>\r\n }\r\n</ng-template>\r\n </ul>\r\n <!-- \"+\" at the end of the menu: a new entry at the top level (hover text) -->\r\n <button type=\"button\" class=\"vl-menu-design-add\" [title]=\"dt.addMenuEntry\" [attr.aria-label]=\"dt.addMenuEntry\"\r\n (click)=\"$event.stopPropagation(); designAdd([])\"><i class=\"pi pi-plus\" aria-hidden=\"true\"></i></button>\r\n</div>\r\n} @else {\r\n<!-- 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\" [attr.data-vl-action]=\"menuAction(action) || null\"\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 && menuAction(item) !== 'logout'; else submenu\">\r\n <span\r\n [class]=\"itemHidden(item) ? 'hidden' : ''\">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip [attr.data-vl-page]=\"vlPage(item)\"\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=\"menuAction(item) !== '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\" [attr.data-vl-page]=\"vlPage(child)\"\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 [attr.data-vl-page]=\"vlPage(subChild)\">\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\r\n}\r\n", styles: [":host(.vl-menu-design){width:100%;max-width:100%;min-width:0;height:100%}:host(.vl-menu-design)>.vl-d-root{min-height:100%;background:#001529;display:flow-root}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{position:static;margin-left:auto;flex:none;transform:none;display:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content,:host(.vl-menu-design) ::ng-deep span.vl-d-item{display:flex;align-items:center;gap:4px;min-width:0;width:100%;outline:none}:host(.vl-menu-design) ::ng-deep .ant-menu-title-content>span:not(.vl-menu-design-grip):not([nz-icon]){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}:host(.vl-menu-design) ::ng-deep li{position:relative}:host(.vl-menu-design) ::ng-deep li.ant-menu-item:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title:hover .vl-d-bar,:host(.vl-menu-design) ::ng-deep .vl-d-item--selected>.ant-menu-title-content .vl-d-bar{display:inline-flex;opacity:1;visibility:visible;transform:none}:host(.vl-menu-design) ::ng-deep li .vl-d-bar{zoom:.8}:host(.vl-menu-design) ::ng-deep .ant-menu-submenu-title{position:relative}:host(.vl-menu-design) .vl-menu-design-add{display:flex;align-items:center;justify-content:center;width:100%;height:40px;margin:0;border:1px dashed rgba(255,255,255,.35);border-radius:6px;background:#001529;color:#ffffffbf;cursor:pointer}:host(.vl-menu-design) .vl-menu-design-add:hover{color:#fff;border-color:#fff}:host(.vl-menu-design) .vl-menu-design-generated{opacity:.6}:host(.vl-menu-design) .vl-menu-design-grip{color:#ffffff73;margin-right:6px;letter-spacing:-3px;cursor:grab}:host(.vl-menu-design) .vl-menu-design-user{background:#001529}:host(.vl-menu-design) .vl-menu-design-avatar{display:inline-flex;align-items:center;justify-content:center;font-size:26px;color:#fff;background:#ffffff1f}:host(.vl-menu-design) .vl-menu-design-logout{margin-top:4px;border:0;background:none;color:#fff;cursor:pointer;padding:0}: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", ".vl-d-root{position:relative;min-width:0;max-width:100%;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}}.vl-d-empty-hint{display:block;width:100%;color:#64748b;font-size:12px;padding:4px 8px 4px 22px}.vl-d-bar{box-sizing:border-box;height:fit-content;min-height:0;padding:1px;border-radius:7px;border:1.5px solid #2563eb;background:#fff;line-height:0}.vl-d-item:has(.vl-d-item)>.vl-d-bar,.vl-d-section-head .vl-d-bar{border:1.5px dashed #b45309}.vl-d-bar{top:0;left:50%;right:auto;transform:translate(-50%,calc(-80% + 2px))}.vl-d-item:hover>.vl-d-bar,.vl-d-item--selected>.vl-d-bar{transform:translate(-50%,-80%)}.vl-d-item:has(.vl-d-item)>.vl-d-bar{top:-3px;transform:translate(-50%,calc(-50% + 2px))}.vl-d-item:has(.vl-d-item):hover>.vl-d-bar,.vl-d-item--selected:has(.vl-d-item)>.vl-d-bar{transform:translate(-50%,-50%)}.vl-d-section-head .vl-d-bar{position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%);z-index:20}th.vl-d-item>.vl-d-bar{top:3px;transform:translate(-50%,2px)}th.vl-d-item:hover>.vl-d-bar,th.vl-d-item.vl-d-item--selected>.vl-d-bar{transform:translate(-50%)}.vl-d-bar{width:max-content}vl-side-menu .vl-d-item>.vl-d-bar,vl-side-menu .vl-d-item:hover>.vl-d-bar,vl-side-menu .vl-d-item.vl-d-item--selected>.vl-d-bar{top:50%;left:auto;right:8px;transform:translateY(-50%)}header .vl-d-item>.vl-d-bar,header .vl-d-item:hover>.vl-d-bar,header .vl-d-item.vl-d-item--selected>.vl-d-bar{top:2px;left:auto;right:2px;transform:none}\n"] }]
|
|
14147
14675
|
}], ctorParameters: () => [{ type: i1$5.NzI18nService }, { type: MobileKeycloakService }, { type: Couchdb }, { type: i7.OAuthService }, { type: i1$2.Platform }, { type: RequestService }, { type: UtilityService }, { type: i1$4.DialogService }, { type: NotificationService }, { type: i0.Injector }], propDecorators: { design: [{
|
|
14148
14676
|
type: Input
|
|
14149
14677
|
}], menuLayout: [{
|
|
@@ -14592,11 +15120,11 @@ class CustomKeyboardComponent {
|
|
|
14592
15120
|
this.symbols.update(value => !value);
|
|
14593
15121
|
}
|
|
14594
15122
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CustomKeyboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14595
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CustomKeyboardComponent, isStandalone: true, selector: "vl-custom-keyboard", ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a search field gets a Search key instead of Done (the same place and look) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: an AM/PM key on the keyboard of a 12-hour time field (#166 step 4.9) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: a new-line key on the text keyboard of a multi-line field (textArea, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n\r\n @if (multiLine) {\r\n <!-- new line: only in a multi-line field (textArea), #166 step 4.4 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__newline\"\r\n aria-label=\"New line\" title=\"New line\" (click)=\"enterNewLine()\">\r\n <i class=\"pi pi-arrow-down-left\"></i>\r\n </button>\r\n }\r\n }\r\n\r\n @if (session.type === 'time' && keyboard.twelveHours(session.target)) {\r\n <!-- AM/PM: a time field typed with 12 hours (English), #166 step 4.9 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__meridiem\"\r\n aria-label=\"AM or PM\" title=\"AM/PM\" (click)=\"keyboard.toggleMeridiem()\">AM/PM</button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <!-- the key at the bottom right, as set in the Designer (enterKey): Done, Search or Next - same place and look -->\r\n @switch (keyboard.enterKey()) {\r\n @case ('search') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Search\"\r\n title=\"Search\" data-vl-key=\"search\" (click)=\"keyboard.submit()\">\r\n <i class=\"pi pi-search\"></i>\r\n </button>\r\n }\r\n @case ('next') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Next\"\r\n title=\"Next\" data-vl-key=\"next\" (click)=\"keyboard.next()\">\r\n <i class=\"pi pi-arrow-right\"></i>\r\n </button>\r\n }\r\n @default {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" data-vl-key=\"done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n }\r\n }\r\n </div>\r\n</section>\r\n}\r\n", styles: [":host{display:contents}.custom-keyboard{position:fixed;right:0;bottom:0;left:0;z-index:200000;display:block;width:100%;max-height:min(52dvh,390px);padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff));box-shadow:0 -6px 20px #0f172a38;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}.custom-keyboard__row{display:flex;justify-content:center;gap:4px;width:100%;margin-bottom:6px}.custom-keyboard__key{display:flex;flex:1 1 0;width:auto;max-width:52px;min-width:0;height:42px;align-items:center;justify-content:center;padding:0;color:#111827;font-size:16px;font-weight:700;line-height:1;background:#fff;border:1px solid #d1d5db;border-radius:5px;box-shadow:0 1px 2px #0f172a47;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__key:active{background:#e6f4ff;transform:scale(.96)}.custom-keyboard--numeric .custom-keyboard__key{max-width:92px;height:46px;font-size:18px}.custom-keyboard__actions{display:grid;grid-template-columns:46px minmax(90px,1fr) 46px 54px;gap:6px;width:100%;margin-top:4px;padding:0 4px}.custom-keyboard__actions--compact{grid-template-columns:minmax(52px,1fr) minmax(52px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:46px 54px minmax(70px,1fr) 46px 54px}.custom-keyboard__action-button{display:flex;width:100%;min-width:0;height:42px;align-items:center;justify-content:center;padding:0 8px;color:#172033;font-size:15px;font-weight:700;line-height:1;border:0;border-radius:6px;box-shadow:0 1px 2px #0f172a40;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__action-button i{font-size:17px;line-height:1;pointer-events:none}.custom-keyboard__action-button:active{transform:scale(.96)}.custom-keyboard__shift{color:#172033;background:#aeb6c2}.custom-keyboard__shift.active{color:#fff;background:#64748b}.custom-keyboard__space{color:#172033;background:#fff}.custom-keyboard__delete{color:#172033;background:#aeb6c2}.custom-keyboard__done{color:#fff;background:#1890ff}.custom-keyboard__page{color:#172033;font-size:14px;background:#aeb6c2}.custom-keyboard__shift:disabled{opacity:.45}.custom-keyboard__key:focus-visible,.custom-keyboard__action-button:focus-visible{outline:3px solid rgba(24,144,255,.35);outline-offset:1px}@media(max-height:650px){.custom-keyboard{max-height:58dvh;padding-top:6px}.custom-keyboard__row{gap:3px;margin-bottom:4px}.custom-keyboard__key{height:35px;font-size:14px}.custom-keyboard--numeric .custom-keyboard__key{height:38px;font-size:16px}.custom-keyboard__action-button{height:36px}}@media(max-width:360px){.custom-keyboard{padding-right:4px;padding-left:4px}.custom-keyboard__row{gap:3px}.custom-keyboard__key{font-size:14px}.custom-keyboard__actions{grid-template-columns:42px minmax(70px,1fr) 42px 48px;gap:4px;padding-right:2px;padding-left:2px}.custom-keyboard__actions--compact{grid-template-columns:minmax(48px,1fr) minmax(48px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:40px 48px minmax(56px,1fr) 40px 46px}}.custom-keyboard--opening .custom-keyboard__key,.custom-keyboard--opening .custom-keyboard__action-button{pointer-events:none}.custom-keyboard--opening{cursor:default}::ng-deep .p-overlay:has(.p-autocomplete-overlay),::ng-deep .p-overlay:has(.p-select-overlay){width:0!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-option,::ng-deep .p-select-overlay .p-select-option{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-list-container,::ng-deep .p-select-overlay .p-select-list-container{overflow-x:hidden!important}::ng-deep .vl-option-full-text{position:fixed;z-index:2147483000;transform:translateY(-100%);padding:8px 10px;border-radius:8px;background:#1f2328;color:#fff;font-size:14px;line-height:1.4;box-shadow:0 6px 18px #1f232840;pointer-events:none;white-space:normal}::ng-deep .p-datepicker-panel.model-datepicker-panel--docked,::ng-deep .model-datepicker-panel--docked{position:fixed!important;background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff))!important;inset:auto 0 0!important;width:100%!important;min-width:100%!important;max-width:100%!important;max-height:min(52dvh,420px)!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overflow-y:auto!important;transform:none!important;border-radius:12px 12px 0 0!important;box-shadow:0 -6px 20px #0f172a38!important;box-sizing:border-box!important}::ng-deep .model-timepicker-panel.p-datepicker-panel:not(.model-datepicker-panel--docked){width:auto!important;min-width:0!important;padding:4px 8px!important;border-radius:8px!important}::ng-deep .model-timepicker-panel .p-datepicker-time-picker{gap:4px!important;padding:0!important;border:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker{gap:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker span,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker span,::ng-deep .model-timepicker-panel .p-datepicker-separator{font-size:1rem!important;line-height:1.2!important}::ng-deep .model-timepicker-panel .p-datepicker-increment-button,::ng-deep .model-timepicker-panel .p-datepicker-decrement-button{width:2rem!important;height:1.75rem!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked{inset:0 0 0 auto!important;width:var(--vl-side-dock-width, 50vw)!important;min-width:0!important;max-width:var(--vl-side-dock-width, 50vw)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-top:env(safe-area-inset-top,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;border-left:1px solid #e5e7eb!important;box-shadow:-6px 0 20px #0f172a2e!important}.custom-keyboard__key{height:clamp(26px,5.2dvh,42px)}.custom-keyboard--numeric .custom-keyboard__key{height:clamp(28px,5.6dvh,46px)}.custom-keyboard__action-button{height:clamp(28px,5.2dvh,42px)}.custom-keyboard__row{margin-bottom:clamp(3px,.8dvh,6px)}::ng-deep body.vl-side-dock .custom-keyboard{inset:0 0 0 auto;width:var(--vl-side-dock-width, 50vw);max-height:none;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start;padding-top:env(safe-area-inset-top,0px);padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:-6px 0 20px #0f172a2e}.custom-keyboard,::ng-deep .model-datepicker-panel--docked{border-top-left-radius:var(--p-dialog-border-radius, 12px)!important;border-top-right-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden}::ng-deep .model-datepicker-panel--docked .p-datepicker-header{padding-top:clamp(2px,.6dvh,8px)!important;padding-bottom:clamp(2px,.6dvh,8px)!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day-cell,::ng-deep .model-datepicker-panel--docked .p-datepicker-weekday-cell{padding:1px!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day{width:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important;height:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked,::ng-deep body.vl-side-dock .custom-keyboard{top:var(--vl-side-dock-top, max(8px, env(safe-area-inset-top, 0px)))!important;bottom:var(--vl-side-dock-bottom, max(8px, env(safe-area-inset-bottom, 0px)))!important;right:max(8px,env(safe-area-inset-right,0px))!important;left:auto!important;width:calc(var(--vl-side-dock-width, 50vw) - max(8px,env(safe-area-inset-right,0px)))!important;max-width:none!important;height:auto!important;max-height:none!important;padding-top:6px!important;padding-right:6px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body.vl-custom-keyboard-open .custom-keyboard,::ng-deep body.vl-custom-keyboard-open .model-datepicker-panel--docked{left:var(--vl-dock-left, 0px)!important;right:var(--vl-dock-right, 0px)!important;width:auto!important;min-width:0!important;max-width:none!important;bottom:var(--vl-dock-bottom-gap)!important;padding-bottom:8px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body{--vl-dock-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px))}::ng-deep .vl-field-active,::ng-deep .picker-field--active input{border-color:var(--modal-field-focus-color, var(--p-primary-color, #10b981))!important;box-shadow:0 0 0 .2rem color-mix(in srgb,var(--modal-field-focus-color, var(--p-primary-color, #10b981)) 30%,transparent)!important;outline:none!important}\n"] });
|
|
15123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: CustomKeyboardComponent, isStandalone: true, selector: "vl-custom-keyboard", ngImport: i0, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: a paste key for text fields (OFFENE-PUNKTE 18) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a search field gets a Search key instead of Done (the same place and look) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: an AM/PM key on the keyboard of a 12-hour time field (#166 step 4.9) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: a new-line key on the text keyboard of a multi-line field (textArea, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n\r\n @if (multiLine) {\r\n <!-- new line: only in a multi-line field (textArea), #166 step 4.4 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__newline\"\r\n aria-label=\"New line\" title=\"New line\" (click)=\"enterNewLine()\">\r\n <i class=\"pi pi-arrow-down-left\"></i>\r\n </button>\r\n }\r\n }\r\n\r\n @if (session.type === 'time' && keyboard.twelveHours(session.target)) {\r\n <!-- AM/PM: a time field typed with 12 hours (English), #166 step 4.9 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__meridiem\"\r\n aria-label=\"AM or PM\" title=\"AM/PM\" (click)=\"keyboard.toggleMeridiem()\">AM/PM</button>\r\n }\r\n\r\n @if (session.type === 'alpha' || session.type === 'string') {\r\n <!-- paste: the clipboard's text at the cursor (the field is read-only for the system keyboard), OFFENE-PUNKTE 18 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__paste\"\r\n aria-label=\"Paste\" title=\"Paste\" (click)=\"keyboard.paste()\">\r\n <i class=\"pi pi-clipboard\"></i>\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <!-- the key at the bottom right, as set in the Designer (enterKey): Done, Search or Next - same place and look -->\r\n @switch (keyboard.enterKey()) {\r\n @case ('search') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Search\"\r\n title=\"Search\" data-vl-key=\"search\" (click)=\"keyboard.submit()\">\r\n <i class=\"pi pi-search\"></i>\r\n </button>\r\n }\r\n @case ('next') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Next\"\r\n title=\"Next\" data-vl-key=\"next\" (click)=\"keyboard.next()\">\r\n <i class=\"pi pi-arrow-right\"></i>\r\n </button>\r\n }\r\n @default {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" data-vl-key=\"done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n }\r\n }\r\n </div>\r\n</section>\r\n}\r\n", styles: [":host{display:contents}.custom-keyboard{position:fixed;right:0;bottom:0;left:0;z-index:200000;display:block;width:100%;max-height:min(52dvh,390px);padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff));box-shadow:0 -6px 20px #0f172a38;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}.custom-keyboard__row{display:flex;justify-content:center;gap:4px;width:100%;margin-bottom:6px}.custom-keyboard__key{display:flex;flex:1 1 0;width:auto;max-width:52px;min-width:0;height:42px;align-items:center;justify-content:center;padding:0;color:#111827;font-size:16px;font-weight:700;line-height:1;background:#fff;border:1px solid #d1d5db;border-radius:5px;box-shadow:0 1px 2px #0f172a47;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__key:active{background:#e6f4ff;transform:scale(.96)}.custom-keyboard--numeric .custom-keyboard__key{max-width:92px;height:46px;font-size:18px}.custom-keyboard__actions{display:grid;grid-template-columns:46px minmax(90px,1fr) 46px 46px 54px;grid-auto-flow:column;grid-auto-columns:46px;gap:6px;width:100%;margin-top:4px;padding:0 4px}.custom-keyboard__actions--compact{grid-template-columns:minmax(52px,1fr) minmax(52px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:46px 54px minmax(70px,1fr) 46px 46px 54px}.custom-keyboard__action-button{display:flex;width:100%;min-width:0;height:42px;align-items:center;justify-content:center;padding:0 8px;color:#172033;font-size:15px;font-weight:700;line-height:1;border:0;border-radius:6px;box-shadow:0 1px 2px #0f172a40;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__action-button i{font-size:17px;line-height:1;pointer-events:none}.custom-keyboard__action-button:active{transform:scale(.96)}.custom-keyboard__shift{color:#172033;background:#aeb6c2}.custom-keyboard__shift.active{color:#fff;background:#64748b}.custom-keyboard__space{color:#172033;background:#fff}.custom-keyboard__delete{color:#172033;background:#aeb6c2}.custom-keyboard__done{color:#fff;background:#1890ff}.custom-keyboard__page{color:#172033;font-size:14px;background:#aeb6c2}.custom-keyboard__shift:disabled{opacity:.45}.custom-keyboard__key:focus-visible,.custom-keyboard__action-button:focus-visible{outline:3px solid rgba(24,144,255,.35);outline-offset:1px}@media(max-height:650px){.custom-keyboard{max-height:58dvh;padding-top:6px}.custom-keyboard__row{gap:3px;margin-bottom:4px}.custom-keyboard__key{height:35px;font-size:14px}.custom-keyboard--numeric .custom-keyboard__key{height:38px;font-size:16px}.custom-keyboard__action-button{height:36px}}@media(max-width:360px){.custom-keyboard{padding-right:4px;padding-left:4px}.custom-keyboard__row{gap:3px}.custom-keyboard__key{font-size:14px}.custom-keyboard__actions{grid-template-columns:42px minmax(70px,1fr) 40px 42px 48px;grid-auto-columns:40px;gap:4px;padding-right:2px;padding-left:2px}.custom-keyboard__actions--compact{grid-template-columns:minmax(48px,1fr) minmax(48px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:40px 48px minmax(56px,1fr) 38px 40px 46px}}.custom-keyboard--opening .custom-keyboard__key,.custom-keyboard--opening .custom-keyboard__action-button{pointer-events:none}.custom-keyboard--opening{cursor:default}::ng-deep .p-overlay:has(.p-autocomplete-overlay),::ng-deep .p-overlay:has(.p-select-overlay){width:0!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-option,::ng-deep .p-select-overlay .p-select-option{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-list-container,::ng-deep .p-select-overlay .p-select-list-container{overflow-x:hidden!important}::ng-deep .vl-option-full-text{position:fixed;z-index:2147483000;transform:translateY(-100%);padding:8px 10px;border-radius:8px;background:#1f2328;color:#fff;font-size:14px;line-height:1.4;box-shadow:0 6px 18px #1f232840;pointer-events:none;white-space:normal}::ng-deep .p-datepicker-panel.model-datepicker-panel--docked,::ng-deep .model-datepicker-panel--docked{position:fixed!important;background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff))!important;inset:auto 0 0!important;width:100%!important;min-width:100%!important;max-width:100%!important;max-height:min(52dvh,420px)!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overflow-y:auto!important;transform:none!important;border-radius:12px 12px 0 0!important;box-shadow:0 -6px 20px #0f172a38!important;box-sizing:border-box!important}::ng-deep .model-timepicker-panel.p-datepicker-panel:not(.model-datepicker-panel--docked){width:auto!important;min-width:0!important;padding:4px 8px!important;border-radius:8px!important}::ng-deep .model-timepicker-panel .p-datepicker-time-picker{gap:4px!important;padding:0!important;border:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker{gap:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker span,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker span,::ng-deep .model-timepicker-panel .p-datepicker-separator{font-size:1rem!important;line-height:1.2!important}::ng-deep .model-timepicker-panel .p-datepicker-increment-button,::ng-deep .model-timepicker-panel .p-datepicker-decrement-button{width:2rem!important;height:1.75rem!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked{inset:0 0 0 auto!important;width:var(--vl-side-dock-width, 50vw)!important;min-width:0!important;max-width:var(--vl-side-dock-width, 50vw)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-top:env(safe-area-inset-top,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;border-left:1px solid #e5e7eb!important;box-shadow:-6px 0 20px #0f172a2e!important}.custom-keyboard__key{height:clamp(26px,5.2dvh,42px)}.custom-keyboard--numeric .custom-keyboard__key{height:clamp(28px,5.6dvh,46px)}.custom-keyboard__action-button{height:clamp(28px,5.2dvh,42px)}.custom-keyboard__row{margin-bottom:clamp(3px,.8dvh,6px)}::ng-deep body.vl-side-dock .custom-keyboard{inset:0 0 0 auto;width:var(--vl-side-dock-width, 50vw);max-height:none;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start;padding-top:env(safe-area-inset-top,0px);padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:-6px 0 20px #0f172a2e}.custom-keyboard,::ng-deep .model-datepicker-panel--docked{border-top-left-radius:var(--p-dialog-border-radius, 12px)!important;border-top-right-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden}::ng-deep .model-datepicker-panel--docked .p-datepicker-header{padding-top:clamp(2px,.6dvh,8px)!important;padding-bottom:clamp(2px,.6dvh,8px)!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day-cell,::ng-deep .model-datepicker-panel--docked .p-datepicker-weekday-cell{padding:1px!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day{width:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important;height:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked,::ng-deep body.vl-side-dock .custom-keyboard{top:var(--vl-side-dock-top, max(8px, env(safe-area-inset-top, 0px)))!important;bottom:var(--vl-side-dock-bottom, max(8px, env(safe-area-inset-bottom, 0px)))!important;right:max(8px,env(safe-area-inset-right,0px))!important;left:auto!important;width:calc(var(--vl-side-dock-width, 50vw) - max(8px,env(safe-area-inset-right,0px)))!important;max-width:none!important;height:auto!important;max-height:none!important;padding-top:6px!important;padding-right:6px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body.vl-custom-keyboard-open .custom-keyboard,::ng-deep body.vl-custom-keyboard-open .model-datepicker-panel--docked{left:var(--vl-dock-left, 0px)!important;right:var(--vl-dock-right, 0px)!important;width:auto!important;min-width:0!important;max-width:none!important;bottom:var(--vl-dock-bottom-gap)!important;padding-bottom:8px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body{--vl-dock-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px))}::ng-deep .vl-field-active,::ng-deep .picker-field--active input{border-color:var(--modal-field-focus-color, var(--p-primary-color, #10b981))!important;box-shadow:0 0 0 .2rem color-mix(in srgb,var(--modal-field-focus-color, var(--p-primary-color, #10b981)) 30%,transparent)!important;outline:none!important}\n"] });
|
|
14596
15124
|
}
|
|
14597
15125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: CustomKeyboardComponent, decorators: [{
|
|
14598
15126
|
type: Component,
|
|
14599
|
-
args: [{ selector: 'vl-custom-keyboard', standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a search field gets a Search key instead of Done (the same place and look) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: an AM/PM key on the keyboard of a 12-hour time field (#166 step 4.9) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: a new-line key on the text keyboard of a multi-line field (textArea, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n\r\n @if (multiLine) {\r\n <!-- new line: only in a multi-line field (textArea), #166 step 4.4 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__newline\"\r\n aria-label=\"New line\" title=\"New line\" (click)=\"enterNewLine()\">\r\n <i class=\"pi pi-arrow-down-left\"></i>\r\n </button>\r\n }\r\n }\r\n\r\n @if (session.type === 'time' && keyboard.twelveHours(session.target)) {\r\n <!-- AM/PM: a time field typed with 12 hours (English), #166 step 4.9 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__meridiem\"\r\n aria-label=\"AM or PM\" title=\"AM/PM\" (click)=\"keyboard.toggleMeridiem()\">AM/PM</button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <!-- the key at the bottom right, as set in the Designer (enterKey): Done, Search or Next - same place and look -->\r\n @switch (keyboard.enterKey()) {\r\n @case ('search') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Search\"\r\n title=\"Search\" data-vl-key=\"search\" (click)=\"keyboard.submit()\">\r\n <i class=\"pi pi-search\"></i>\r\n </button>\r\n }\r\n @case ('next') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Next\"\r\n title=\"Next\" data-vl-key=\"next\" (click)=\"keyboard.next()\">\r\n <i class=\"pi pi-arrow-right\"></i>\r\n </button>\r\n }\r\n @default {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" data-vl-key=\"done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n }\r\n }\r\n </div>\r\n</section>\r\n}\r\n", styles: [":host{display:contents}.custom-keyboard{position:fixed;right:0;bottom:0;left:0;z-index:200000;display:block;width:100%;max-height:min(52dvh,390px);padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff));box-shadow:0 -6px 20px #0f172a38;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}.custom-keyboard__row{display:flex;justify-content:center;gap:4px;width:100%;margin-bottom:6px}.custom-keyboard__key{display:flex;flex:1 1 0;width:auto;max-width:52px;min-width:0;height:42px;align-items:center;justify-content:center;padding:0;color:#111827;font-size:16px;font-weight:700;line-height:1;background:#fff;border:1px solid #d1d5db;border-radius:5px;box-shadow:0 1px 2px #0f172a47;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__key:active{background:#e6f4ff;transform:scale(.96)}.custom-keyboard--numeric .custom-keyboard__key{max-width:92px;height:46px;font-size:18px}.custom-keyboard__actions{display:grid;grid-template-columns:46px minmax(90px,1fr) 46px 54px;gap:6px;width:100%;margin-top:4px;padding:0 4px}.custom-keyboard__actions--compact{grid-template-columns:minmax(52px,1fr) minmax(52px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:46px 54px minmax(70px,1fr) 46px 54px}.custom-keyboard__action-button{display:flex;width:100%;min-width:0;height:42px;align-items:center;justify-content:center;padding:0 8px;color:#172033;font-size:15px;font-weight:700;line-height:1;border:0;border-radius:6px;box-shadow:0 1px 2px #0f172a40;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__action-button i{font-size:17px;line-height:1;pointer-events:none}.custom-keyboard__action-button:active{transform:scale(.96)}.custom-keyboard__shift{color:#172033;background:#aeb6c2}.custom-keyboard__shift.active{color:#fff;background:#64748b}.custom-keyboard__space{color:#172033;background:#fff}.custom-keyboard__delete{color:#172033;background:#aeb6c2}.custom-keyboard__done{color:#fff;background:#1890ff}.custom-keyboard__page{color:#172033;font-size:14px;background:#aeb6c2}.custom-keyboard__shift:disabled{opacity:.45}.custom-keyboard__key:focus-visible,.custom-keyboard__action-button:focus-visible{outline:3px solid rgba(24,144,255,.35);outline-offset:1px}@media(max-height:650px){.custom-keyboard{max-height:58dvh;padding-top:6px}.custom-keyboard__row{gap:3px;margin-bottom:4px}.custom-keyboard__key{height:35px;font-size:14px}.custom-keyboard--numeric .custom-keyboard__key{height:38px;font-size:16px}.custom-keyboard__action-button{height:36px}}@media(max-width:360px){.custom-keyboard{padding-right:4px;padding-left:4px}.custom-keyboard__row{gap:3px}.custom-keyboard__key{font-size:14px}.custom-keyboard__actions{grid-template-columns:42px minmax(70px,1fr) 42px 48px;gap:4px;padding-right:2px;padding-left:2px}.custom-keyboard__actions--compact{grid-template-columns:minmax(48px,1fr) minmax(48px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:40px 48px minmax(56px,1fr) 40px 46px}}.custom-keyboard--opening .custom-keyboard__key,.custom-keyboard--opening .custom-keyboard__action-button{pointer-events:none}.custom-keyboard--opening{cursor:default}::ng-deep .p-overlay:has(.p-autocomplete-overlay),::ng-deep .p-overlay:has(.p-select-overlay){width:0!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-option,::ng-deep .p-select-overlay .p-select-option{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-list-container,::ng-deep .p-select-overlay .p-select-list-container{overflow-x:hidden!important}::ng-deep .vl-option-full-text{position:fixed;z-index:2147483000;transform:translateY(-100%);padding:8px 10px;border-radius:8px;background:#1f2328;color:#fff;font-size:14px;line-height:1.4;box-shadow:0 6px 18px #1f232840;pointer-events:none;white-space:normal}::ng-deep .p-datepicker-panel.model-datepicker-panel--docked,::ng-deep .model-datepicker-panel--docked{position:fixed!important;background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff))!important;inset:auto 0 0!important;width:100%!important;min-width:100%!important;max-width:100%!important;max-height:min(52dvh,420px)!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overflow-y:auto!important;transform:none!important;border-radius:12px 12px 0 0!important;box-shadow:0 -6px 20px #0f172a38!important;box-sizing:border-box!important}::ng-deep .model-timepicker-panel.p-datepicker-panel:not(.model-datepicker-panel--docked){width:auto!important;min-width:0!important;padding:4px 8px!important;border-radius:8px!important}::ng-deep .model-timepicker-panel .p-datepicker-time-picker{gap:4px!important;padding:0!important;border:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker{gap:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker span,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker span,::ng-deep .model-timepicker-panel .p-datepicker-separator{font-size:1rem!important;line-height:1.2!important}::ng-deep .model-timepicker-panel .p-datepicker-increment-button,::ng-deep .model-timepicker-panel .p-datepicker-decrement-button{width:2rem!important;height:1.75rem!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked{inset:0 0 0 auto!important;width:var(--vl-side-dock-width, 50vw)!important;min-width:0!important;max-width:var(--vl-side-dock-width, 50vw)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-top:env(safe-area-inset-top,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;border-left:1px solid #e5e7eb!important;box-shadow:-6px 0 20px #0f172a2e!important}.custom-keyboard__key{height:clamp(26px,5.2dvh,42px)}.custom-keyboard--numeric .custom-keyboard__key{height:clamp(28px,5.6dvh,46px)}.custom-keyboard__action-button{height:clamp(28px,5.2dvh,42px)}.custom-keyboard__row{margin-bottom:clamp(3px,.8dvh,6px)}::ng-deep body.vl-side-dock .custom-keyboard{inset:0 0 0 auto;width:var(--vl-side-dock-width, 50vw);max-height:none;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start;padding-top:env(safe-area-inset-top,0px);padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:-6px 0 20px #0f172a2e}.custom-keyboard,::ng-deep .model-datepicker-panel--docked{border-top-left-radius:var(--p-dialog-border-radius, 12px)!important;border-top-right-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden}::ng-deep .model-datepicker-panel--docked .p-datepicker-header{padding-top:clamp(2px,.6dvh,8px)!important;padding-bottom:clamp(2px,.6dvh,8px)!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day-cell,::ng-deep .model-datepicker-panel--docked .p-datepicker-weekday-cell{padding:1px!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day{width:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important;height:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked,::ng-deep body.vl-side-dock .custom-keyboard{top:var(--vl-side-dock-top, max(8px, env(safe-area-inset-top, 0px)))!important;bottom:var(--vl-side-dock-bottom, max(8px, env(safe-area-inset-bottom, 0px)))!important;right:max(8px,env(safe-area-inset-right,0px))!important;left:auto!important;width:calc(var(--vl-side-dock-width, 50vw) - max(8px,env(safe-area-inset-right,0px)))!important;max-width:none!important;height:auto!important;max-height:none!important;padding-top:6px!important;padding-right:6px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body.vl-custom-keyboard-open .custom-keyboard,::ng-deep body.vl-custom-keyboard-open .model-datepicker-panel--docked{left:var(--vl-dock-left, 0px)!important;right:var(--vl-dock-right, 0px)!important;width:auto!important;min-width:0!important;max-width:none!important;bottom:var(--vl-dock-bottom-gap)!important;padding-bottom:8px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body{--vl-dock-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px))}::ng-deep .vl-field-active,::ng-deep .picker-field--active input{border-color:var(--modal-field-focus-color, var(--p-primary-color, #10b981))!important;box-shadow:0 0 0 .2rem color-mix(in srgb,var(--modal-field-focus-color, var(--p-primary-color, #10b981)) 30%,transparent)!important;outline:none!important}\n"] }]
|
|
15127
|
+
args: [{ selector: 'vl-custom-keyboard', standalone: true, template: "<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-02\r\n - new: a paste key for text fields (OFFENE-PUNKTE 18) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-31\r\n - new: a search field gets a Search key instead of Done (the same place and look) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: an AM/PM key on the keyboard of a 12-hour time field (#166 step 4.9) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n - new: a new-line key on the text keyboard of a multi-line field (textArea, #166) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n\r\n @if (multiLine) {\r\n <!-- new line: only in a multi-line field (textArea), #166 step 4.4 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__newline\"\r\n aria-label=\"New line\" title=\"New line\" (click)=\"enterNewLine()\">\r\n <i class=\"pi pi-arrow-down-left\"></i>\r\n </button>\r\n }\r\n }\r\n\r\n @if (session.type === 'time' && keyboard.twelveHours(session.target)) {\r\n <!-- AM/PM: a time field typed with 12 hours (English), #166 step 4.9 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__meridiem\"\r\n aria-label=\"AM or PM\" title=\"AM/PM\" (click)=\"keyboard.toggleMeridiem()\">AM/PM</button>\r\n }\r\n\r\n @if (session.type === 'alpha' || session.type === 'string') {\r\n <!-- paste: the clipboard's text at the cursor (the field is read-only for the system keyboard), OFFENE-PUNKTE 18 -->\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__paste\"\r\n aria-label=\"Paste\" title=\"Paste\" (click)=\"keyboard.paste()\">\r\n <i class=\"pi pi-clipboard\"></i>\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <!-- the key at the bottom right, as set in the Designer (enterKey): Done, Search or Next - same place and look -->\r\n @switch (keyboard.enterKey()) {\r\n @case ('search') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Search\"\r\n title=\"Search\" data-vl-key=\"search\" (click)=\"keyboard.submit()\">\r\n <i class=\"pi pi-search\"></i>\r\n </button>\r\n }\r\n @case ('next') {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Next\"\r\n title=\"Next\" data-vl-key=\"next\" (click)=\"keyboard.next()\">\r\n <i class=\"pi pi-arrow-right\"></i>\r\n </button>\r\n }\r\n @default {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" data-vl-key=\"done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n }\r\n }\r\n </div>\r\n</section>\r\n}\r\n", styles: [":host{display:contents}.custom-keyboard{position:fixed;right:0;bottom:0;left:0;z-index:200000;display:block;width:100%;max-height:min(52dvh,390px);padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff));box-shadow:0 -6px 20px #0f172a38;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-overflow-scrolling:touch}.custom-keyboard__row{display:flex;justify-content:center;gap:4px;width:100%;margin-bottom:6px}.custom-keyboard__key{display:flex;flex:1 1 0;width:auto;max-width:52px;min-width:0;height:42px;align-items:center;justify-content:center;padding:0;color:#111827;font-size:16px;font-weight:700;line-height:1;background:#fff;border:1px solid #d1d5db;border-radius:5px;box-shadow:0 1px 2px #0f172a47;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__key:active{background:#e6f4ff;transform:scale(.96)}.custom-keyboard--numeric .custom-keyboard__key{max-width:92px;height:46px;font-size:18px}.custom-keyboard__actions{display:grid;grid-template-columns:46px minmax(90px,1fr) 46px 46px 54px;grid-auto-flow:column;grid-auto-columns:46px;gap:6px;width:100%;margin-top:4px;padding:0 4px}.custom-keyboard__actions--compact{grid-template-columns:minmax(52px,1fr) minmax(52px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:46px 54px minmax(70px,1fr) 46px 46px 54px}.custom-keyboard__action-button{display:flex;width:100%;min-width:0;height:42px;align-items:center;justify-content:center;padding:0 8px;color:#172033;font-size:15px;font-weight:700;line-height:1;border:0;border-radius:6px;box-shadow:0 1px 2px #0f172a40;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation;transition:transform 80ms ease,background-color 80ms ease}.custom-keyboard__action-button i{font-size:17px;line-height:1;pointer-events:none}.custom-keyboard__action-button:active{transform:scale(.96)}.custom-keyboard__shift{color:#172033;background:#aeb6c2}.custom-keyboard__shift.active{color:#fff;background:#64748b}.custom-keyboard__space{color:#172033;background:#fff}.custom-keyboard__delete{color:#172033;background:#aeb6c2}.custom-keyboard__done{color:#fff;background:#1890ff}.custom-keyboard__page{color:#172033;font-size:14px;background:#aeb6c2}.custom-keyboard__shift:disabled{opacity:.45}.custom-keyboard__key:focus-visible,.custom-keyboard__action-button:focus-visible{outline:3px solid rgba(24,144,255,.35);outline-offset:1px}@media(max-height:650px){.custom-keyboard{max-height:58dvh;padding-top:6px}.custom-keyboard__row{gap:3px;margin-bottom:4px}.custom-keyboard__key{height:35px;font-size:14px}.custom-keyboard--numeric .custom-keyboard__key{height:38px;font-size:16px}.custom-keyboard__action-button{height:36px}}@media(max-width:360px){.custom-keyboard{padding-right:4px;padding-left:4px}.custom-keyboard__row{gap:3px}.custom-keyboard__key{font-size:14px}.custom-keyboard__actions{grid-template-columns:42px minmax(70px,1fr) 40px 42px 48px;grid-auto-columns:40px;gap:4px;padding-right:2px;padding-left:2px}.custom-keyboard__actions--compact{grid-template-columns:minmax(48px,1fr) minmax(48px,1fr)}.custom-keyboard__actions--symbols{grid-template-columns:40px 48px minmax(56px,1fr) 38px 40px 46px}}.custom-keyboard--opening .custom-keyboard__key,.custom-keyboard--opening .custom-keyboard__action-button{pointer-events:none}.custom-keyboard--opening{cursor:default}::ng-deep .p-overlay:has(.p-autocomplete-overlay),::ng-deep .p-overlay:has(.p-select-overlay){width:0!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-option,::ng-deep .p-select-overlay .p-select-option{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}::ng-deep .p-autocomplete-overlay .p-autocomplete-list-container,::ng-deep .p-select-overlay .p-select-list-container{overflow-x:hidden!important}::ng-deep .vl-option-full-text{position:fixed;z-index:2147483000;transform:translateY(-100%);padding:8px 10px;border-radius:8px;background:#1f2328;color:#fff;font-size:14px;line-height:1.4;box-shadow:0 6px 18px #1f232840;pointer-events:none;white-space:normal}::ng-deep .p-datepicker-panel.model-datepicker-panel--docked,::ng-deep .model-datepicker-panel--docked{position:fixed!important;background:var(--vl-keyboard-background, var(--vl-page-background, #ffffff))!important;inset:auto 0 0!important;width:100%!important;min-width:100%!important;max-width:100%!important;max-height:min(52dvh,420px)!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overflow-y:auto!important;transform:none!important;border-radius:12px 12px 0 0!important;box-shadow:0 -6px 20px #0f172a38!important;box-sizing:border-box!important}::ng-deep .model-timepicker-panel.p-datepicker-panel:not(.model-datepicker-panel--docked){width:auto!important;min-width:0!important;padding:4px 8px!important;border-radius:8px!important}::ng-deep .model-timepicker-panel .p-datepicker-time-picker{gap:4px!important;padding:0!important;border:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker{gap:0!important}::ng-deep .model-timepicker-panel .p-datepicker-hour-picker span,::ng-deep .model-timepicker-panel .p-datepicker-minute-picker span,::ng-deep .model-timepicker-panel .p-datepicker-separator{font-size:1rem!important;line-height:1.2!important}::ng-deep .model-timepicker-panel .p-datepicker-increment-button,::ng-deep .model-timepicker-panel .p-datepicker-decrement-button{width:2rem!important;height:1.75rem!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked{inset:0 0 0 auto!important;width:var(--vl-side-dock-width, 50vw)!important;min-width:0!important;max-width:var(--vl-side-dock-width, 50vw)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-top:env(safe-area-inset-top,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;border-left:1px solid #e5e7eb!important;box-shadow:-6px 0 20px #0f172a2e!important}.custom-keyboard__key{height:clamp(26px,5.2dvh,42px)}.custom-keyboard--numeric .custom-keyboard__key{height:clamp(28px,5.6dvh,46px)}.custom-keyboard__action-button{height:clamp(28px,5.2dvh,42px)}.custom-keyboard__row{margin-bottom:clamp(3px,.8dvh,6px)}::ng-deep body.vl-side-dock .custom-keyboard{inset:0 0 0 auto;width:var(--vl-side-dock-width, 50vw);max-height:none;height:100dvh;display:flex;flex-direction:column;justify-content:flex-start;padding-top:env(safe-area-inset-top,0px);padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:-6px 0 20px #0f172a2e}.custom-keyboard,::ng-deep .model-datepicker-panel--docked{border-top-left-radius:var(--p-dialog-border-radius, 12px)!important;border-top-right-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden}::ng-deep .model-datepicker-panel--docked .p-datepicker-header{padding-top:clamp(2px,.6dvh,8px)!important;padding-bottom:clamp(2px,.6dvh,8px)!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day-cell,::ng-deep .model-datepicker-panel--docked .p-datepicker-weekday-cell{padding:1px!important}::ng-deep .model-datepicker-panel--docked .p-datepicker-day{width:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important;height:var(--vl-day-size, clamp(28px, 4.4dvh, 40px))!important}::ng-deep body.vl-side-dock .model-datepicker-panel--docked,::ng-deep body.vl-side-dock .custom-keyboard{top:var(--vl-side-dock-top, max(8px, env(safe-area-inset-top, 0px)))!important;bottom:var(--vl-side-dock-bottom, max(8px, env(safe-area-inset-bottom, 0px)))!important;right:max(8px,env(safe-area-inset-right,0px))!important;left:auto!important;width:calc(var(--vl-side-dock-width, 50vw) - max(8px,env(safe-area-inset-right,0px)))!important;max-width:none!important;height:auto!important;max-height:none!important;padding-top:6px!important;padding-right:6px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;overflow:hidden!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body.vl-custom-keyboard-open .custom-keyboard,::ng-deep body.vl-custom-keyboard-open .model-datepicker-panel--docked{left:var(--vl-dock-left, 0px)!important;right:var(--vl-dock-right, 0px)!important;width:auto!important;min-width:0!important;max-width:none!important;bottom:var(--vl-dock-bottom-gap)!important;padding-bottom:8px!important;border-radius:var(--p-dialog-border-radius, 12px)!important;box-shadow:var(--p-dialog-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1))!important}::ng-deep body{--vl-dock-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px))}::ng-deep .vl-field-active,::ng-deep .picker-field--active input{border-color:var(--modal-field-focus-color, var(--p-primary-color, #10b981))!important;box-shadow:0 0 0 .2rem color-mix(in srgb,var(--modal-field-focus-color, var(--p-primary-color, #10b981)) 30%,transparent)!important;outline:none!important}\n"] }]
|
|
14600
15128
|
}], ctorParameters: () => [] });
|
|
14601
15129
|
|
|
14602
15130
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-21
|
|
@@ -14663,6 +15191,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
14663
15191
|
args: [{ providedIn: 'root' }]
|
|
14664
15192
|
}], ctorParameters: () => [{ type: UtilityService }] });
|
|
14665
15193
|
|
|
15194
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
15195
|
+
// - new: routeOf - which route of addon.json an address means; a route's answer may carry a notice for the user
|
|
14666
15196
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
14667
15197
|
// - new: the rules the app holds an add-on to (OFFENE-PUNKTE 92, addonApi 1): what a transform and a route must give
|
|
14668
15198
|
// back, which hosts its http may call, its limits - checked in the app, so a wrong answer is a message, no crash
|
|
@@ -14703,7 +15233,25 @@ function checkTransformResult(name, result, limits) {
|
|
|
14703
15233
|
}
|
|
14704
15234
|
return answerTooBig(name, result, limits) ?? { records: result };
|
|
14705
15235
|
}
|
|
14706
|
-
/**
|
|
15236
|
+
/**
|
|
15237
|
+
* The route of an address: its path against addon.json routes, the longest declared path first, so "/a/b" can have
|
|
15238
|
+
* its own handler beside "/a". The query is the handler's. An address with a host is never a route.
|
|
15239
|
+
*/
|
|
15240
|
+
function routeOf(url, routes) {
|
|
15241
|
+
const text = String(url ?? '').trim();
|
|
15242
|
+
if (!text || !routes || /^[a-z][a-z0-9+.-]*:/i.test(text))
|
|
15243
|
+
return null;
|
|
15244
|
+
const [rawPath, rawQuery = ''] = text.split('?');
|
|
15245
|
+
const path = `/${rawPath.replace(/^\/+/, '')}`;
|
|
15246
|
+
const route = Object.keys(routes)
|
|
15247
|
+
.sort((a, b) => b.length - a.length)
|
|
15248
|
+
.find(key => {
|
|
15249
|
+
const declared = `/${key.replace(/^\/+/, '')}`;
|
|
15250
|
+
return path === declared || path.startsWith(`${declared}/`);
|
|
15251
|
+
});
|
|
15252
|
+
return route === undefined ? null : { route, query: Object.fromEntries(new URLSearchParams(rawQuery)) };
|
|
15253
|
+
}
|
|
15254
|
+
/** What a route gave back, checked: { items, total, notice } or a list; else the reason. notice: a hint for the user. */
|
|
14707
15255
|
function checkRouteResult(path, result, limits) {
|
|
14708
15256
|
const items = Array.isArray(result) ? result : result?.items;
|
|
14709
15257
|
if (!Array.isArray(items))
|
|
@@ -14711,7 +15259,8 @@ function checkRouteResult(path, result, limits) {
|
|
|
14711
15259
|
if (items.length > limits.maxRecords)
|
|
14712
15260
|
return { problem: `The add-on route ${path} gave back ${items.length} records - at most ${limits.maxRecords}.` };
|
|
14713
15261
|
const total = Number.isFinite(Number(result?.total)) ? Number(result.total) : items.length;
|
|
14714
|
-
|
|
15262
|
+
const notice = typeof result?.notice === 'string' && result.notice.trim() ? { notice: result.notice.trim() } : {};
|
|
15263
|
+
return answerTooBig(path, items, limits) ?? { answer: { items, total, ...notice } };
|
|
14715
15264
|
}
|
|
14716
15265
|
function answerTooBig(name, value, limits) {
|
|
14717
15266
|
let size = 0;
|
|
@@ -14845,6 +15394,8 @@ function linkAddonModules(files, entry, makeUrl) {
|
|
|
14845
15394
|
return link(entry);
|
|
14846
15395
|
}
|
|
14847
15396
|
|
|
15397
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
15398
|
+
// - new: answerFor - a page's load reaches the add-on's route; route() had no caller (point 182)
|
|
14848
15399
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
14849
15400
|
// - new: AddonHostService - runs the project's add-on in the app (preview, simulation and the mobile app alike) in a
|
|
14850
15401
|
// Web Worker (OFFENE-PUNKTE 92): the add-on sees no page, no storage, no sign-in, no token; it gets messages in and
|
|
@@ -14907,6 +15458,7 @@ class AddonHostService {
|
|
|
14907
15458
|
urls = [];
|
|
14908
15459
|
calls = new Map();
|
|
14909
15460
|
seq = 0;
|
|
15461
|
+
routes = null;
|
|
14910
15462
|
upstreamLeft = 0;
|
|
14911
15463
|
/**
|
|
14912
15464
|
* The project whose add-on runs (its database, "<tenant>_<project>"), and the values a host "{{name}}" of
|
|
@@ -14934,6 +15486,27 @@ class AddonHostService {
|
|
|
14934
15486
|
throw new Error(checked.problem);
|
|
14935
15487
|
return checked.records;
|
|
14936
15488
|
}
|
|
15489
|
+
/**
|
|
15490
|
+
* The add-on's answer for an address of addon.json routes, null when no route means it: the page then loads from
|
|
15491
|
+
* its backend. page: the runtime's page number, from 0 - the add-on counts from 1. In the shape of a backend page
|
|
15492
|
+
* (totalElements, size), so the page reads it like any other answer.
|
|
15493
|
+
*/
|
|
15494
|
+
async answerFor(url, pageNumber = 0, size = 20) {
|
|
15495
|
+
if (!this.dbName)
|
|
15496
|
+
return null;
|
|
15497
|
+
const found = routeOf(url, await this.routeTable());
|
|
15498
|
+
if (!found)
|
|
15499
|
+
return null;
|
|
15500
|
+
const answer = await this.route(found.route, found.query, Number(pageNumber) + 1, size);
|
|
15501
|
+
return { ...answer, totalElements: answer.total, size };
|
|
15502
|
+
}
|
|
15503
|
+
/** The routes of addon.json, read once per project; an app without add-on has none. */
|
|
15504
|
+
routeTable() {
|
|
15505
|
+
this.routes ??= this.couchdb.getFileContentFromCouchDb(this.dbName, 'addon/addon.json')
|
|
15506
|
+
.then((manifest) => manifest?.routes ?? {})
|
|
15507
|
+
.catch(() => ({}));
|
|
15508
|
+
return this.routes;
|
|
15509
|
+
}
|
|
14937
15510
|
/** Data of the add-on's route (addon.json routes, GET): { items, total }. */
|
|
14938
15511
|
async route(path, query, page = 1, size = 20) {
|
|
14939
15512
|
const addon = await this.prepare();
|
|
@@ -15086,6 +15659,7 @@ class AddonHostService {
|
|
|
15086
15659
|
for (const url of this.urls.splice(0))
|
|
15087
15660
|
URL.revokeObjectURL(url);
|
|
15088
15661
|
this.prepared = null;
|
|
15662
|
+
this.routes = null;
|
|
15089
15663
|
}
|
|
15090
15664
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: AddonHostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15091
15665
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: AddonHostService, providedIn: 'root' });
|
|
@@ -15237,6 +15811,10 @@ async function runAddonTests(files, timeoutMs = 15000) {
|
|
|
15237
15811
|
return results;
|
|
15238
15812
|
}
|
|
15239
15813
|
|
|
15814
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
15815
|
+
// - change: no named conversion of an app in the library any more, a conversion is the add-on's (OFFENE-PUNKTE 91)
|
|
15816
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
15817
|
+
// - new: loadData asks the add-on first for an address of addon.json routes (point 182)
|
|
15240
15818
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
15241
15819
|
// - change: a refused call names the backend's own reason after the status, when the answer gives one (131)
|
|
15242
15820
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-28
|
|
@@ -15252,9 +15830,6 @@ async function runAddonTests(files, timeoutMs = 15000) {
|
|
|
15252
15830
|
// token when the option says passToken, on the devices directly, in the web through the app's own
|
|
15253
15831
|
// origin (backendUrl), under the waiting rule of every request. saveData / loadData replace the
|
|
15254
15832
|
// fixed P5 time-recording calls of card and request service (A2)
|
|
15255
|
-
const TRANSFORMS = {
|
|
15256
|
-
dailyLogs: (records, utility) => records.flatMap(record => utility.convertToDailyLogs(record) || []),
|
|
15257
|
-
};
|
|
15258
15833
|
class BackendCallService {
|
|
15259
15834
|
remoteLists = inject(RemoteListService);
|
|
15260
15835
|
utilityService = inject(UtilityService);
|
|
@@ -15269,16 +15844,10 @@ class BackendCallService {
|
|
|
15269
15844
|
? await this.utilityService.getLocalStorage('KeycloakInfo')
|
|
15270
15845
|
: await this.utilityService.getLocalStorage('loginedUser');
|
|
15271
15846
|
}
|
|
15272
|
-
/**
|
|
15273
|
-
* The records after the option's conversion: "addon:<name>" runs the project's add-on (addon.json transforms,
|
|
15274
|
-
* OFFENE-PUNKTE 92), another name a conversion of the library; unknown names change nothing.
|
|
15275
|
-
*/
|
|
15847
|
+
/** The records after the option's conversion: "addon:<name>" runs the project's add-on (addon.json transforms). */
|
|
15276
15848
|
async transform(option, records) {
|
|
15277
15849
|
const name = String(option?.transform ?? '').trim();
|
|
15278
|
-
|
|
15279
|
-
return this.addons.transform(name.slice('addon:'.length).trim(), records, option?.transformParams ?? {});
|
|
15280
|
-
const convert = name ? TRANSFORMS[name] : undefined;
|
|
15281
|
-
return convert ? convert(records, this.utilityService) : records;
|
|
15850
|
+
return name.startsWith('addon:') ? this.addons.transform(name.slice('addon:'.length).trim(), records, option?.transformParams) : records;
|
|
15282
15851
|
}
|
|
15283
15852
|
/** Sends the records to the option's backend; true on success. */
|
|
15284
15853
|
async saveData(option, records, extra = {}) {
|
|
@@ -15292,6 +15861,11 @@ class BackendCallService {
|
|
|
15292
15861
|
async loadData(option, extra = {}) {
|
|
15293
15862
|
// the app's own user when it gives one (Okta, JWT, Keycloak alike), else the stored sign-in
|
|
15294
15863
|
const userInfo = extra.userInfo ?? await this.currentUser();
|
|
15864
|
+
// an address of addon.json routes is the add-on's: it answers, no backend is asked - and no fallback to one
|
|
15865
|
+
const address = String(resolveTemplate(String(option?.data_url ?? ''), { ...extra, userInfo }) ?? '').trim();
|
|
15866
|
+
const fromAddon = await this.addons.answerFor(address, Number(extra['pageNumber'] ?? 0), Number(extra['pageSize'] ?? 20));
|
|
15867
|
+
if (fromAddon)
|
|
15868
|
+
return fromAddon;
|
|
15295
15869
|
// loading reads: GET unless the page names its method (a filter page with a body: POST)
|
|
15296
15870
|
const call = buildBackendCall({ ...option, method: option?.method || 'GET' }, { ...extra, userInfo });
|
|
15297
15871
|
if (!call)
|
|
@@ -15331,6 +15905,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImpor
|
|
|
15331
15905
|
args: [{ providedIn: 'root' }]
|
|
15332
15906
|
}] });
|
|
15333
15907
|
|
|
15908
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
15909
|
+
// - new: the answer's notice (an add-on's hint: a source did not answer) goes to deps.notice (point 182)
|
|
15910
|
+
// - new: keep - a card button with a browser storage keeps its record in that list, a second click takes it out
|
|
15911
|
+
// (option.key, option.maxRecords; successMessage / deleteMessage)
|
|
15334
15912
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-30
|
|
15335
15913
|
// - new: errorMessage of the page or button replaces the fixed text of loadFailed / saveFailed / deleteFailed
|
|
15336
15914
|
// (deps.failed gets it); emptyMessage of the page is shown (deps.notice) when a fresh backend load found
|
|
@@ -15414,6 +15992,8 @@ class PageData {
|
|
|
15414
15992
|
pageCount = 0;
|
|
15415
15993
|
totalItems = 0;
|
|
15416
15994
|
loading = false;
|
|
15995
|
+
/** the last load of the backend failed (a test tells an empty list from a broken one) */
|
|
15996
|
+
loadFailed = false;
|
|
15417
15997
|
filter = {};
|
|
15418
15998
|
/** The last backend answer as it came (its paging fields). */
|
|
15419
15999
|
lastAnswer = null;
|
|
@@ -15601,6 +16181,22 @@ class PageData {
|
|
|
15601
16181
|
this.setLoading(false);
|
|
15602
16182
|
}
|
|
15603
16183
|
}
|
|
16184
|
+
/** A button with a browser storage: its record goes into the button's list, or out again (toggleRecord). */
|
|
16185
|
+
async keep(button, record) {
|
|
16186
|
+
const option = button?.option ?? button;
|
|
16187
|
+
const { records, added } = toggleRecord(await this.deps.readRecords(option), withoutMarks(record), option?.key, option?.maxRecords);
|
|
16188
|
+
if (!(await this.deps.writeRecords(option, records))) {
|
|
16189
|
+
this.deps.failed('saveFailed', new Error(`The list ${option?.data_url} could not be written.`), messageOf(option, 'errorMessage'));
|
|
16190
|
+
return false;
|
|
16191
|
+
}
|
|
16192
|
+
if (this.source?.data_url === option?.data_url)
|
|
16193
|
+
await this.load();
|
|
16194
|
+
if (added)
|
|
16195
|
+
this.deps.sent?.({ sent: 1, failed: 0 }, option);
|
|
16196
|
+
else if (option?.deleteMessage)
|
|
16197
|
+
this.deps.notice?.(option.deleteMessage);
|
|
16198
|
+
return true;
|
|
16199
|
+
}
|
|
15604
16200
|
// ---- inside ----
|
|
15605
16201
|
/** Filter fields are the keys set by setFilter; a filter page loads only when none is empty. */
|
|
15606
16202
|
filterComplete() {
|
|
@@ -15613,6 +16209,7 @@ class PageData {
|
|
|
15613
16209
|
const filter = {};
|
|
15614
16210
|
for (const [key, value] of Object.entries(this.filter))
|
|
15615
16211
|
filter[key] = this.filterValue(value);
|
|
16212
|
+
this.loadFailed = false;
|
|
15616
16213
|
const data = await this.deps.loadBackend(this.source, { filter, pageNumber: this.page, pageSize: this.pageSize });
|
|
15617
16214
|
// a fresh load started meanwhile: this answer is old
|
|
15618
16215
|
if (generation !== this.generation)
|
|
@@ -15634,12 +16231,15 @@ class PageData {
|
|
|
15634
16231
|
this.totalItems = Number(data?.totalElements ?? data?.page?.totalElements ?? this.records.length);
|
|
15635
16232
|
this.pageCount = Number(data?.totalPages ?? data?.page?.totalPages ?? Math.ceil(this.totalItems / this.pageSize)) || 0;
|
|
15636
16233
|
}
|
|
16234
|
+
if (!append && data?.notice)
|
|
16235
|
+
this.deps.notice?.(String(data.notice));
|
|
15637
16236
|
// nothing found: the page's own hint (a filter range without bookings) - a fresh load only, not scrolling
|
|
15638
16237
|
const empty = messageOf(this.source, 'emptyMessage');
|
|
15639
16238
|
if (!append && !records.length && empty)
|
|
15640
16239
|
this.deps.notice?.(empty);
|
|
15641
16240
|
}
|
|
15642
16241
|
catch (error) {
|
|
16242
|
+
this.loadFailed = true;
|
|
15643
16243
|
this.deps.failed('loadFailed', error, messageOf(this.source, 'errorMessage'));
|
|
15644
16244
|
this.setRecords([]);
|
|
15645
16245
|
}
|
|
@@ -15786,5 +16386,5 @@ function termsUser(userInfo) {
|
|
|
15786
16386
|
* Generated bundle index. Do not edit.
|
|
15787
16387
|
*/
|
|
15788
16388
|
|
|
15789
|
-
export { ADDON_API_VERSION, ADDON_TEST_KIT, AddonHostService, 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, DesignFieldPipe, DesignTextPipe, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MAX_ROW_COLUMNS, 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, SEND_ERROR_KEY, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, addonHostAllowed, addonImports, addonLimits, addonManifestProblem, applyLayoutDefaults, backendTermsState, backendUrl, blankComments, buildBackendCall, buttonLocked, cardButton, checkRouteResult, checkTransformResult, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, designDropIds, designField, designText, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillFromUser, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, gridColumnCount, hasBackendCall, headerButton, inputFormatHint, insertField, isAddonCode, isAddonTestFile, isBrowserSource, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, linkAddonModules, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, moveTreeNode, newButton, newSection, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, parseTimeText, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, removeTreeNode, replaceCardElement, replaceColumn, replaceField, replaceSection, replaceTreeNode, requestDesignDelete, resizeColumn, resolveAddonPath, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, runAddonTests, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, sendErrorText, sendsForm, 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, transformHandler, treeNode, treePaths, typedMeridiem, typedToStored, usesTwelveHours, validTreePath, visibleFields, whenOnline, withAppPagination, withoutMarks };
|
|
16389
|
+
export { ADDON_API_VERSION, ADDON_TEST_KIT, AddonHostService, 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, DesignFieldPipe, DesignTextPipe, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MAX_ROW_COLUMNS, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PdfViewerComponent, PdfViewerService, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SEND_ERROR_KEY, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, addonHostAllowed, addonImports, addonLimits, addonManifestProblem, applyLayoutDefaults, backendTermsState, backendUrl, blankComments, buildBackendCall, buttonLocked, bytesOfBase64, cardButton, checkRouteResult, checkTransformResult, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, dependsOnForm, designDropIds, designField, designText, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillFromUser, fillPlaceholders, fixedTimeText, formValuesGiven, formatDate, formatDates, fromStorageValue, gridColumnCount, hasBackendCall, headerButton, inputFormatHint, insertField, isAddonCode, isAddonTestFile, isBrowserSource, isIsoDate, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, linkAddonModules, linkOfRecord, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, moveTreeNode, newButton, newSection, nextZoom, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, parseTimeText, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, removeTreeNode, replaceCardElement, replaceColumn, replaceField, replaceSection, replaceTreeNode, requestDesignDelete, resizeColumn, resolveAddonPath, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, routeOf, ruleMessage, runAddonTests, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, sendErrorText, sendsForm, 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, toggleRecord, toolkitKeyboardActive, transformHandler, treeNode, treePaths, typedMeridiem, typedToStored, usesTwelveHours, validTreePath, visibleFields, whenOnline, withAppPagination, withoutMarks, wrapperStyleOf };
|
|
15790
16390
|
//# sourceMappingURL=yomotech-view-toolkit.mjs.map
|