@yomotech/view-toolkit 1.0.45 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yomotech/view-toolkit",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^21.0.0",
6
6
  "@angular/common": "^21.0.0",
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, ElementRef, ChangeDetectorRef, NgZone, SimpleChanges, OnInit, OnChanges, AfterViewInit, OnDestroy, Injector, PipeTransform } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
+ import { CdkDragMove, CdkDragDrop } from '@angular/cdk/drag-drop';
4
5
  import * as rxjs from 'rxjs';
5
6
  import { Platform } from '@angular/cdk/platform';
6
7
  import { HttpClient, HttpHeaders } from '@angular/common/http';
@@ -92,6 +93,239 @@ declare function testAction(option: any): string | null;
92
93
  */
93
94
  declare function testWrites(option: any): 'true' | 'false';
94
95
 
96
+ /** The device the Designer shows the page on (its Desktop / Tablet / Mobile switch). */
97
+ type DesignDevice = 'desktop' | 'tablet' | 'mobile';
98
+ /** What the Designer hands a container in design mode. Without it the container is the app's container. */
99
+ interface VlDesign {
100
+ /** the element whose settings are open in the Designer - shown marked */
101
+ selected?: DesignTarget | null;
102
+ /** the device the page is shown on; the containers that choose by the window (card columns) follow it */
103
+ device?: DesignDevice;
104
+ /** texts of the design handles in the Designer's language; English for every text not given */
105
+ texts?: Partial<DesignTexts>;
106
+ /** how many sample records card and grid show (the page's page size when not given) */
107
+ sampleCount?: number;
108
+ /** the picture a media field shows in a sample record */
109
+ sampleImage?: string;
110
+ /** the project's Main layout - the page bar of card and grid takes its values where the page has none */
111
+ main?: any;
112
+ }
113
+ /** One element of a layout the Designer can open the settings of. */
114
+ interface DesignTarget {
115
+ /**
116
+ * container: the layout itself (card, grid); section / field: a section and its field (form, dialog);
117
+ * element: a card element, parentIndex the horizontal layout holding it; header / headerElement: the card's
118
+ * header and one of its buttons; column: a grid column
119
+ */
120
+ kind: 'container' | 'section' | 'field' | 'element' | 'header' | 'headerElement' | 'column';
121
+ sectionIndex?: number;
122
+ fieldIndex?: number;
123
+ index?: number;
124
+ parentIndex?: number | null;
125
+ /** the part that was clicked: the field itself (input) or its edit button (none) */
126
+ part?: 'input';
127
+ }
128
+ /** What a container in design mode tells the Designer. */
129
+ type DesignEvent =
130
+ /** an element was chosen: the Designer opens its settings */
131
+ {
132
+ type: 'select';
133
+ target: DesignTarget;
134
+ }
135
+ /** nothing is chosen any more (a drag started) */
136
+ | {
137
+ type: 'deselect';
138
+ }
139
+ /** the container's layout changed (drop, move, add, delete): the Designer saves it */
140
+ | {
141
+ type: 'layout';
142
+ layoutSchema: any;
143
+ }
144
+ /**
145
+ * the page header the card shows changed (it belongs to the whole page: the Designer keeps it and hands it back
146
+ * in itemInfo.header); added: the button that was added to it
147
+ */
148
+ | {
149
+ type: 'header';
150
+ header: any;
151
+ added?: any;
152
+ };
153
+ /** A field dragged from the Designer's data objects onto a container. */
154
+ interface DesignPropertyDrop {
155
+ kind: 'object-property';
156
+ objectName?: string;
157
+ objectNode?: {
158
+ name?: string;
159
+ };
160
+ name: string;
161
+ type?: string;
162
+ }
163
+ /** The texts of the design handles. */
164
+ interface DesignTexts {
165
+ dragSection: string;
166
+ addButton: string;
167
+ editSection: string;
168
+ deleteSection: string;
169
+ section: string;
170
+ addSection: string;
171
+ dragField: string;
172
+ editField: string;
173
+ deleteField: string;
174
+ emptySection: string;
175
+ dropHere: string;
176
+ placeAbove: string;
177
+ placeBelow: string;
178
+ placeLeft: string;
179
+ placeRight: string;
180
+ hiddenInApp: string;
181
+ edit: string;
182
+ delete: string;
183
+ editLayout: string;
184
+ addCard: string;
185
+ deleteCard: string;
186
+ addHeaderButton: string;
187
+ editHeader: string;
188
+ clearHeader: string;
189
+ editHeaderButton: string;
190
+ deleteHeaderButton: string;
191
+ emptyCardTitle: string;
192
+ emptyCardText: string;
193
+ dropCardItem: string;
194
+ dragColumn: string;
195
+ editColumn: string;
196
+ deleteColumn: string;
197
+ resizeWidth: string;
198
+ resizeHeight: string;
199
+ editGrid: string;
200
+ emptyGrid: string;
201
+ button: string;
202
+ }
203
+ declare const DESIGN_TEXTS: DesignTexts;
204
+ /** The design texts with the Designer's own over the English ones. */
205
+ declare function designTexts(design: VlDesign | null | undefined): DesignTexts;
206
+ /** Whether the target is the element (same kind and place) - the selection mark. */
207
+ declare function isTarget(selected: DesignTarget | null | undefined, target: DesignTarget): boolean;
208
+ /** A drop from the Designer's data objects (not an element moved inside the container). */
209
+ declare function isPropertyDrop(data: any): data is DesignPropertyDrop;
210
+ /** The data object a dropped property belongs to ("orders.json" -> "orders"). */
211
+ declare function dropObjectName(drop: DesignPropertyDrop): string;
212
+ /** A copy of a layout (layouts are JSON). */
213
+ declare function cloneLayout<T>(value: T): T;
214
+ /** The ids of every drop list of the containers in design mode on the page (the Designer's data objects drop on them). */
215
+ declare function designDropIds(): string[];
216
+
217
+ type CardDropType = 'before' | 'after' | 'left' | 'right' | 'empty';
218
+ /** Where a dragged element lands: at a card element (index), or inside the horizontal layout parentIndex at innerIndex. */
219
+ interface CardDropSpot {
220
+ type: CardDropType;
221
+ /** the card element the drop is placed at; null: at the end */
222
+ index: number | null;
223
+ /** the horizontal layout the drop goes into; null: the card's own list */
224
+ parentIndex: number | null;
225
+ innerIndex: number | null;
226
+ }
227
+ /** An element of the card's list (parentIndex null) or of a horizontal layout in it. */
228
+ interface CardPlace {
229
+ index: number;
230
+ parentIndex: number | null;
231
+ }
232
+ /**
233
+ * The card layout as the Designer keeps it, changed in place: no empty classes on the card styles, the card's
234
+ * columns are drawn by the container (no gridTemplateColumns in its style), no classes on the elements (the right
235
+ * panel sets styles only), horizontal layouts in shape.
236
+ */
237
+ declare function normalizeCard(layout: any): any;
238
+ /** A button as the Designer adds it to a card. */
239
+ declare function cardButton(caption?: string): any;
240
+ /** The card element a data object's property becomes when it is dropped: its value, read only. */
241
+ declare function elementFromProperty(drop: DesignPropertyDrop, caption?: string): any;
242
+ /** A data object's field dropped at the spot. */
243
+ declare function dropCardProperty(layout: any, drop: DesignPropertyDrop, spot: CardDropSpot, buttonCaption?: string): any;
244
+ /** An element moved from its place to the spot. */
245
+ declare function moveCardElement(layout: any, from: CardPlace, spot: CardDropSpot): any;
246
+ declare function removeCardElement(layout: any, place: CardPlace): any;
247
+ /** A button added after the element (in its horizontal layout when it stands in one). */
248
+ declare function addCardButton(layout: any, after: CardPlace, caption?: string): any;
249
+ /** The settings of a card element changed in the Designer's right panel. */
250
+ declare function replaceCardElement(layout: any, place: CardPlace, element: any): any;
251
+ /** A button as the Designer adds it to the page header (it opens the page's dialog). */
252
+ declare function headerButton(caption?: string): any;
253
+ declare function removeHeaderElement(header: any, index: number): any;
254
+ declare function clearHeader(header: any): any;
255
+
256
+ interface CardDesignerHost {
257
+ layout(): any;
258
+ apply(next: any): void;
259
+ select(target: DesignTarget): void;
260
+ deselect(): void;
261
+ /** the view is drawn again (the apps run without zone.js: a change after a timer is not seen otherwise) */
262
+ refresh(): void;
263
+ }
264
+ /** The data an element carries while it is dragged inside the card. */
265
+ interface CardDragData {
266
+ vlDesign: 'cardElement';
267
+ index: number;
268
+ parentIndex: number | null;
269
+ }
270
+ declare class CardDesigner {
271
+ private readonly host;
272
+ hint: CardDropSpot | null;
273
+ private dragging;
274
+ private moving;
275
+ readonly prefix: string;
276
+ constructor(host: CardDesignerHost);
277
+ /** The drop list of the card's elements. */
278
+ listId(): string;
279
+ /** The drop list of the horizontal layout at index. */
280
+ innerListId(index: number): string;
281
+ /** The card's list and every horizontal layout's list, so an element can go from one into another. */
282
+ listIds(): string[];
283
+ dragData(index: number, parentIndex: number | null): CardDragData;
284
+ private rowsOf;
285
+ private inside;
286
+ /** The drop spot at a point of the first card: inside a horizontal layout first, else among the card's elements. */
287
+ spotAt(x: number, y: number): CardDropSpot;
288
+ private setHint;
289
+ entered(): void;
290
+ pointerMove(event: MouseEvent): void;
291
+ exited(): void;
292
+ dragStarted(): void;
293
+ dragMoved(event: CdkDragMove<any>): void;
294
+ dragEnded(): void;
295
+ clear(): void;
296
+ /** An empty card list (parentIndex null) or an empty horizontal layout under the pointer. */
297
+ isEmptyHint(parentIndex: number | null): boolean;
298
+ /** The element the hint is drawn at: a card element (parentIndex null) or an element of a horizontal layout. */
299
+ isTargetHint(index: number, parentIndex: number | null): boolean;
300
+ hintText(texts: DesignTexts): string;
301
+ dropped(event: CdkDragDrop<any>, buttonCaption?: string): void;
302
+ addButton(index: number, parentIndex: number | null, caption?: string): void;
303
+ remove(index: number, parentIndex: number | null): void;
304
+ edit(index: number, parentIndex: number | null): void;
305
+ }
306
+
307
+ type DesignAction = 'drag' | 'add' | 'edit' | 'delete';
308
+ /**
309
+ * The handles of one element. "drag" is the cdkDragHandle of the element it stands in; the others report their
310
+ * action (act) without the click reaching the element.
311
+ */
312
+ declare class DesignBarComponent {
313
+ actions: DesignAction[];
314
+ /** the tooltip of each handle */
315
+ titles: Partial<Record<DesignAction, string>>;
316
+ act: EventEmitter<DesignAction>;
317
+ icon(action: DesignAction): string;
318
+ static ɵfac: i0.ɵɵFactoryDeclaration<DesignBarComponent, never>;
319
+ static ɵcmp: i0.ɵɵComponentDeclaration<DesignBarComponent, "vl-design-bar", never, { "actions": { "alias": "actions"; "required": false; }; "titles": { "alias": "titles"; "required": false; }; }, { "act": "act"; }, never, never, true, never>;
320
+ }
321
+ /** Where a dragged element lands: a line above, below, left or right of an element, or a box in an empty place. */
322
+ declare class DropMarkerComponent {
323
+ type: 'before' | 'after' | 'left' | 'right' | 'empty';
324
+ text: string;
325
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropMarkerComponent, never>;
326
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropMarkerComponent, "vl-drop-marker", never, { "type": { "alias": "type"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
327
+ }
328
+
95
329
  type CustomKeyboardType = 'email' | 'numeric' | 'alpha' | 'string' | 'date' | 'time';
96
330
  declare function normalizeCustomKeyboardType(value: unknown): CustomKeyboardType | null;
97
331
  /**
@@ -759,6 +993,26 @@ declare class CardComponent {
759
993
  onPageChange: EventEmitter<any>;
760
994
  paginationMode: 'client' | 'server';
761
995
  paginationLoading: boolean;
996
+ /** The Designer's canvas: sample records, every element with drag, edit and delete, nothing loaded (design/design.ts). */
997
+ design: VlDesign | null;
998
+ /** What was chosen or changed on the Designer's canvas. */
999
+ designChange: EventEmitter<DesignEvent>;
1000
+ /** The texts of the design handles. */
1001
+ dt: DesignTexts;
1002
+ /** How many sample cards the canvas shows (Add card / Delete card). */
1003
+ designCount: number;
1004
+ /** The page of sample cards the canvas shows. */
1005
+ designPage: number;
1006
+ designPageSize: number;
1007
+ /** The sample records, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
1008
+ designAll: any[];
1009
+ designInfo: any;
1010
+ designPages: number[];
1011
+ /** Drag and drop of the card's elements in design mode. */
1012
+ readonly designer: CardDesigner;
1013
+ /** The device the Designer shows the page on. */
1014
+ get designMobile(): boolean;
1015
+ get designTablet(): boolean;
762
1016
  scrollPaginationSentinel?: ElementRef<HTMLElement>;
763
1017
  private scrollObserver?;
764
1018
  private requestedScrollPage;
@@ -782,6 +1036,25 @@ declare class CardComponent {
782
1036
  private destroyScrollObserver;
783
1037
  ngOnDestroy(): void;
784
1038
  ngAfterViewInit(): void;
1039
+ /** The sample records, the page bar and its pages of the canvas, from the layout as it is now. */
1040
+ refreshDesign(): void;
1041
+ /** The sample cards of the page shown, the first one with the handles - the same list while nothing changed. */
1042
+ get designRecords(): any[];
1043
+ private recordsMemo;
1044
+ isSelected(target: DesignTarget): boolean;
1045
+ /** A card element hidden in the app (the card shows an element only with option.visible). */
1046
+ hiddenInApp(element: any): boolean;
1047
+ /**
1048
+ * The card's own handles: a button for the page header, the settings of the card layout. The header belongs to
1049
+ * the whole page: its changes are told to the Designer (type header), which keeps and hands it back.
1050
+ */
1051
+ containerAction(action: DesignAction): void;
1052
+ headerAction(action: DesignAction): void;
1053
+ headerElementAction(action: DesignAction, index: number): void;
1054
+ elementAction(action: DesignAction, index: number, parentIndex: number | null): void;
1055
+ /** Add card / Delete card: more or fewer sample cards, the layout stays. */
1056
+ cardAction(action: DesignAction): void;
1057
+ designGoToPage(page: number): void;
785
1058
  getRecordIndex(record: any): number;
786
1059
  private updateDeviceMode;
787
1060
  private safeUpdate;
@@ -833,7 +1106,120 @@ declare class CardComponent {
833
1106
  */
834
1107
  keyboardTypeFor(field: any, propertySchema: any): CustomKeyboardType | null;
835
1108
  static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
836
- static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vl-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "mobileDisplay": { "alias": "mobileDisplay"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "paginationMode": { "alias": "paginationMode"; "required": false; }; "paginationLoading": { "alias": "paginationLoading"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange"; }, never, never, true, never>;
1109
+ static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vl-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "mobileDisplay": { "alias": "mobileDisplay"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "paginationMode": { "alias": "paginationMode"; "required": false; }; "paginationLoading": { "alias": "paginationLoading"; "required": false; }; "design": { "alias": "design"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange"; "designChange": "designChange"; }, never, never, true, never>;
1110
+ }
1111
+
1112
+ /** form: vl-form; dialog: vl-model. Both lay out formSections with formFields. */
1113
+ type SectionKind = 'form' | 'dialog';
1114
+ /** Where a dragged field lands: above or below a field (its own row), beside it (its row), or in an empty section. */
1115
+ type DropType = 'before' | 'after' | 'left' | 'right' | 'empty';
1116
+ interface DropSpot {
1117
+ sectionIndex: number;
1118
+ type: DropType;
1119
+ /** the field the drop is placed at; null: at the end of the section */
1120
+ targetIndex: number | null;
1121
+ }
1122
+ declare const GRID_COLUMNS = 12;
1123
+ declare const MAX_FIELDS_PER_ROW = 4;
1124
+ /** The upper quarter of a field puts the drop above, the lower quarter below, the middle beside it (left or right half). */
1125
+ declare function dropTypeAt(rect: {
1126
+ left: number;
1127
+ top: number;
1128
+ width: number;
1129
+ height: number;
1130
+ }, x: number, y: number): DropType;
1131
+ /** How many of the section's 12 columns a field takes (gridSpan, else its style's "span N", else by its label position). */
1132
+ declare function fieldSpan(field: any): number;
1133
+ /** The fields of one row share the 12 columns (at most four; more go to rows of their own). */
1134
+ declare function rebalanceRow(fields: any[], id: string, kind: SectionKind): void;
1135
+ /** Puts a field into a section's fields at the drop spot. */
1136
+ declare function insertField(fields: any[], field: any, spot: Pick<DropSpot, 'type' | 'targetIndex'>, kind: SectionKind): void;
1137
+ /** An empty section as the Designer adds it. */
1138
+ declare function newSection(kind: SectionKind): any;
1139
+ /** A button as the Designer adds it to a section. */
1140
+ declare function newButton(kind: SectionKind, caption?: string): any;
1141
+ /** The field a data object's property becomes when it is dropped (label: the property's name, changed afterwards). */
1142
+ declare function fieldFromProperty(drop: DesignPropertyDrop, kind: SectionKind): any;
1143
+ /**
1144
+ * The layout as the Designer keeps it, changed in place: every section has its fields list; in a form the
1145
+ * classes go (the right panel sets styles only), the section's grid is drawn by the container (no display or
1146
+ * columns in its style) and every field belongs to a row.
1147
+ */
1148
+ declare function normalizeSections(layout: any, kind: SectionKind): any;
1149
+ /** A data object's field dropped at the spot. */
1150
+ declare function dropProperty(layout: any, drop: DesignPropertyDrop, spot: DropSpot, kind: SectionKind): any;
1151
+ /** A field moved from its place to the spot (same or another section). */
1152
+ declare function moveField(layout: any, from: {
1153
+ sectionIndex: number;
1154
+ fieldIndex: number;
1155
+ }, spot: DropSpot, kind: SectionKind): any;
1156
+ declare function removeField(layout: any, sectionIndex: number, fieldIndex: number, kind: SectionKind): any;
1157
+ /** A section deleted; a form keeps one empty section to drop fields into. */
1158
+ declare function removeSection(layout: any, sectionIndex: number, kind: SectionKind): any;
1159
+ declare function moveSection(layout: any, from: number, to: number): any;
1160
+ declare function addSection(layout: any, kind: SectionKind): any;
1161
+ declare function addButton(layout: any, sectionIndex: number, kind: SectionKind, caption?: string): any;
1162
+ /** The settings of a section or field changed in the Designer's right panel. */
1163
+ declare function replaceSection(layout: any, sectionIndex: number, section: any, kind: SectionKind): any;
1164
+ declare function replaceField(layout: any, sectionIndex: number, fieldIndex: number, field: any, kind: SectionKind): any;
1165
+
1166
+ /** What the container gives the designer: its layout, how a new layout is taken over, and what is told to the Designer. */
1167
+ interface SectionDesignerHost {
1168
+ layout(): any;
1169
+ apply(next: any): void;
1170
+ select(target: DesignTarget): void;
1171
+ deselect(): void;
1172
+ /** the view is drawn again (the apps run without zone.js: a change after a timer is not seen otherwise) */
1173
+ refresh(): void;
1174
+ }
1175
+ /** The data a field carries while it is dragged inside its container. */
1176
+ interface SectionDragData {
1177
+ vlDesign: 'field';
1178
+ sectionIndex: number;
1179
+ fieldIndex: number;
1180
+ }
1181
+ declare class SectionDesigner {
1182
+ private readonly kind;
1183
+ private readonly host;
1184
+ /** where a drop would land now; null while nothing is dragged over the container */
1185
+ hint: DropSpot | null;
1186
+ private dragging;
1187
+ private dragged;
1188
+ /** the ids of this container's drop lists start with it (several containers may be on one page) */
1189
+ readonly prefix: string;
1190
+ constructor(kind: SectionKind, host: SectionDesignerHost);
1191
+ listId(sectionIndex: number): string;
1192
+ /** Every section list of the container, so a field can go from one section to another. */
1193
+ listIds(): string[];
1194
+ private sectionOf;
1195
+ dragData(sectionIndex: number, fieldIndex: number): SectionDragData;
1196
+ /** The drop spot at a point of a section: on a field, above the first, below the last, or into the empty section. */
1197
+ spotAt(x: number, y: number, sectionIndex: number): DropSpot;
1198
+ private setHint;
1199
+ /** A drag came over a section (a field of this container or a data object's field). */
1200
+ entered(sectionIndex: number): void;
1201
+ /** The pointer moves over a section while something is dragged over it. */
1202
+ pointerMove(event: MouseEvent, sectionIndex: number): void;
1203
+ exited(): void;
1204
+ /** A section is dragged to another place: its settings close, no field hint is shown. */
1205
+ sectionDragStarted(): void;
1206
+ dragStarted(sectionIndex: number, fieldIndex: number): void;
1207
+ /** A field of this container moves: the section under the pointer decides. */
1208
+ dragMoved(event: CdkDragMove<any>): void;
1209
+ dragEnded(): void;
1210
+ clear(): void;
1211
+ isEmptyHint(sectionIndex: number): boolean;
1212
+ isTargetHint(sectionIndex: number, fieldIndex: number): boolean;
1213
+ hintText(texts: DesignTexts): string;
1214
+ dropped(event: CdkDragDrop<any>, sectionIndex: number): void;
1215
+ /** The sections were reordered (from and to: places in the layout). */
1216
+ sectionMoved(from: number, to: number): void;
1217
+ removeField(sectionIndex: number, fieldIndex: number): void;
1218
+ removeSection(sectionIndex: number): void;
1219
+ addSection(): void;
1220
+ addButton(sectionIndex: number, caption?: string): void;
1221
+ editSection(sectionIndex: number): void;
1222
+ editField(sectionIndex: number, fieldIndex: number, part?: 'input'): void;
837
1223
  }
838
1224
 
839
1225
  /**
@@ -911,6 +1297,18 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
911
1297
  checkBoxChangeEvent: EventEmitter<any>;
912
1298
  /** the hint of a button locked for a missing sign-in was clicked: the app starts its sign-in */
913
1299
  signIn: EventEmitter<void>;
1300
+ /** The Designer's canvas: every section and field with drag, edit and delete, nothing loaded (design/design.ts). */
1301
+ design: VlDesign | null;
1302
+ /** What was chosen or changed on the Designer's canvas. */
1303
+ designChange: EventEmitter<DesignEvent>;
1304
+ /** The texts of the design handles. */
1305
+ dt: DesignTexts;
1306
+ /** Drag and drop of the sections and fields in design mode. */
1307
+ readonly designer: SectionDesigner;
1308
+ private readonly cdr;
1309
+ /** The device the Designer shows the page on: the form follows it like the app follows the window. */
1310
+ get designMobile(): boolean;
1311
+ get designTablet(): boolean;
914
1312
  ngOnInit(): void;
915
1313
  ngOnChanges(changes: SimpleChanges): void;
916
1314
  ngAfterViewInit(): void;
@@ -932,6 +1330,16 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
932
1330
  private sectionSplit;
933
1331
  /** The width of the sticky column: the widest of its sections (gridSpan), 4 when none says. */
934
1332
  stickySpan(): number;
1333
+ /** A section that stays in view while the page scrolls (layout sticky). */
1334
+ sectionStickyOf(formSection: any): boolean;
1335
+ /** A section's place in the layout (the canvas shows the sticky ones after the others). */
1336
+ sectionIndexOf(formSection: any): number;
1337
+ /** Whether the element's settings are open in the Designer (it is marked). */
1338
+ isSelected(target: DesignTarget): boolean;
1339
+ /** A section dropped at another place of the canvas: the canvas shows the sticky ones last, the layout keeps its order. */
1340
+ sectionDropped(event: CdkDragDrop<any>): void;
1341
+ sectionAction(action: DesignAction, sectionIndex: number): void;
1342
+ fieldAction(action: DesignAction, sectionIndex: number, fieldIndex: number): void;
935
1343
  /** A section with visibleWhen is shown only while its field holds the value. */
936
1344
  sectionShown(formSection: any): boolean;
937
1345
  getSectionBodyStyle(formSection: any): any;
@@ -970,7 +1378,7 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
970
1378
  saveTried: boolean;
971
1379
  showError(control: any): boolean;
972
1380
  static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
973
- static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vl-form", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; "form": { "alias": "form"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, { "formButtonClick": "formButtonClick"; "checkBoxChangeEvent": "checkBoxChangeEvent"; "signIn": "signIn"; }, never, never, true, never>;
1381
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vl-form", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; "form": { "alias": "form"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "design": { "alias": "design"; "required": false; }; }, { "formButtonClick": "formButtonClick"; "checkBoxChangeEvent": "checkBoxChangeEvent"; "signIn": "signIn"; "designChange": "designChange"; }, never, never, true, never>;
974
1382
  }
975
1383
 
976
1384
  interface GridColumnFilterState {
@@ -995,11 +1403,6 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
995
1403
  readonly picker: DateTimePickerService;
996
1404
  private readonly host;
997
1405
  private readonly cdr;
998
- /**
999
- * The style of a row's cell from its column (scope.style) - without display: the cell stays a table cell. An image's
1000
- * display: block on the cell took it out of the table and every column moved one to the left (luv2shop Coffee Mugs).
1001
- */
1002
- cellStyle(col: any): any;
1003
1406
  /** Watches the element under the table; in view (with 250px ahead) it asks for the next page. */
1004
1407
  private observeEnd;
1005
1408
  ngOnDestroy(): void;
@@ -1040,6 +1443,22 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
1040
1443
  recordIndex: number;
1041
1444
  }>;
1042
1445
  gridForm?: NgForm;
1446
+ /** The Designer's canvas: sample rows, every column with drag, edit, delete and resize, nothing loaded (design/design.ts). */
1447
+ design: VlDesign | null;
1448
+ /** What was chosen or changed on the Designer's canvas. */
1449
+ designChange: EventEmitter<DesignEvent>;
1450
+ /** The texts of the design handles. */
1451
+ dt: DesignTexts;
1452
+ /** The sample rows, the area with its page bar and the pages of the canvas, renewed when the layout changes. */
1453
+ designAll: any[];
1454
+ designInfo: any;
1455
+ designPages: number[];
1456
+ designPage: number;
1457
+ designPageSize: number;
1458
+ /** The drop list of the column heads (a data object's field dropped on it becomes a column). */
1459
+ readonly designListId: string;
1460
+ get designMobile(): boolean;
1461
+ get designTablet(): boolean;
1043
1462
  /** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
1044
1463
  editingRow: any;
1045
1464
  rowSchema: any;
@@ -1063,6 +1482,38 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
1063
1482
  ngAfterViewInit(): void;
1064
1483
  ngOnChanges(changes: SimpleChanges): void;
1065
1484
  get gridDisplayData(): any[];
1485
+ searchText: string;
1486
+ private searchMemo;
1487
+ get showSearch(): boolean;
1488
+ get searchPositionClass(): string;
1489
+ searchPlaceholder(): string;
1490
+ /** The rows holding the searched text in one of their shown columns - the same list while nothing changed. */
1491
+ private searched;
1492
+ /** The style of row number index (0, 1, …): odd and even rows as the page sets them. */
1493
+ rowStyleOf(index: number): Record<string, any>;
1494
+ /** A column's width and height as the page sets them. */
1495
+ columnSize(column: any): Record<string, any>;
1496
+ /** A cell: the column's scope style, the row's stripe, the column's size. */
1497
+ cellStyle(column: any, index: number): Record<string, any>;
1498
+ /** The sample rows and the page bar of the canvas, from the layout as it is now. */
1499
+ refreshDesign(): void;
1500
+ /** The sample rows of the page shown - the same list while nothing changed (the table draws its rows anew otherwise). */
1501
+ get designRows(): any[];
1502
+ private rowsMemo;
1503
+ designGoToPage(page: number): void;
1504
+ isSelected(target: DesignTarget): boolean;
1505
+ private applyDesign;
1506
+ selectGrid(): void;
1507
+ columnAction(action: DesignAction, index: number): void;
1508
+ /** A column moved along the heads, or a data object's field dropped on them (a new column at that place). */
1509
+ columnDropped(event: CdkDragDrop<any>): void;
1510
+ columnDragStarted(): void;
1511
+ private resizing;
1512
+ /** Dragging a column head's right or lower edge sets its width or height. */
1513
+ startResize(event: MouseEvent, index: number, type: 'width' | 'height'): void;
1514
+ private onResize;
1515
+ private endResize;
1516
+ private stopResize;
1066
1517
  translateSchema(schema: any, SelectedLanguage: any): any;
1067
1518
  getScope(scope: any): string;
1068
1519
  /** Every class of a style as one class string (array or text) - only the first was set before. */
@@ -1160,7 +1611,7 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
1160
1611
  /** The DTO type of a column as the data object declares it ("string", "quantity" ...). */
1161
1612
  cellType(col: any): string;
1162
1613
  static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
1163
- static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vl-grid", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "tableitemInfo": { "alias": "tableitemInfo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isTableDataLoad": { "alias": "isTableDataLoad"; "required": false; }; "currenTableOptions": { "alias": "currenTableOptions"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; }, { "editRow": "editRow"; "onPageChange": "onPageChange"; "onPageSizeChange": "onPageSizeChange"; "onGridScroll": "onGridScroll"; "showGridLink": "showGridLink"; "gridButtonClick": "gridButtonClick"; "gridIncreamentClick": "gridIncreamentClick"; "gridDecreamentClick": "gridDecreamentClick"; "gridImgClick": "gridImgClick"; }, never, never, true, never>;
1614
+ static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vl-grid", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "tableitemInfo": { "alias": "tableitemInfo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isTableDataLoad": { "alias": "isTableDataLoad"; "required": false; }; "currenTableOptions": { "alias": "currenTableOptions"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; "design": { "alias": "design"; "required": false; }; }, { "editRow": "editRow"; "designChange": "designChange"; "onPageChange": "onPageChange"; "onPageSizeChange": "onPageSizeChange"; "onGridScroll": "onGridScroll"; "showGridLink": "showGridLink"; "gridButtonClick": "gridButtonClick"; "gridIncreamentClick": "gridIncreamentClick"; "gridDecreamentClick": "gridDecreamentClick"; "gridImgClick": "gridImgClick"; }, never, never, true, never>;
1164
1615
  }
1165
1616
 
1166
1617
  declare class HeaderMenuComponent implements AfterViewInit {
@@ -1253,6 +1704,17 @@ declare class ModelComponent implements OnChanges, OnDestroy {
1253
1704
  selectedLanguageInfo: any;
1254
1705
  userInfo: any;
1255
1706
  setFormDataHandler?: () => void | Promise<void>;
1707
+ /** The Designer's canvas: every field with drag, edit and delete, nothing loaded or sent (design/design.ts). */
1708
+ design: VlDesign | null;
1709
+ /** What was chosen or changed on the Designer's canvas. */
1710
+ designChange: EventEmitter<DesignEvent>;
1711
+ /** The texts of the design handles. */
1712
+ dt: DesignTexts;
1713
+ /** Drag and drop of the sections and fields in design mode. */
1714
+ readonly designer: SectionDesigner;
1715
+ /** The device the Designer shows the page on: the dialog follows it like the app follows the window. */
1716
+ get designMobile(): boolean;
1717
+ get designTablet(): boolean;
1256
1718
  copyLayoutSchema: any;
1257
1719
  isLoading: boolean;
1258
1720
  projectLanguage: any;
@@ -1309,6 +1771,10 @@ declare class ModelComponent implements OnChanges, OnDestroy {
1309
1771
  showMissing(form: NgForm | null): void;
1310
1772
  checkValidty(form: NgForm): boolean;
1311
1773
  onCancel(): void;
1774
+ /** Whether the element's settings are open in the Designer (it is marked). */
1775
+ isSelected(target: DesignTarget): boolean;
1776
+ sectionAction(action: DesignAction, sectionIndex: number): void;
1777
+ fieldAction(action: DesignAction, sectionIndex: number, fieldIndex: number): void;
1312
1778
  /**
1313
1779
  * A field's message shows once the user typed in it and left it, or after a save attempt - not
1314
1780
  * when an empty field was only passed through (the message then pushed the row and its label out
@@ -1316,8 +1782,8 @@ declare class ModelComponent implements OnChanges, OnDestroy {
1316
1782
  */
1317
1783
  saveTried: boolean;
1318
1784
  showError(control: any): boolean;
1319
- static ɵfac: i0.ɵɵFactoryDeclaration<ModelComponent, never>;
1320
- static ɵcmp: i0.ɵɵComponentDeclaration<ModelComponent, "vl-model", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "modalItemInfo": { "alias": "modalItemInfo"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "setFormDataHandler": { "alias": "setFormDataHandler"; "required": false; }; }, {}, never, never, true, never>;
1785
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModelComponent, [null, { optional: true; }, { optional: true; }, null]>;
1786
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModelComponent, "vl-model", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "modalItemInfo": { "alias": "modalItemInfo"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "setFormDataHandler": { "alias": "setFormDataHandler"; "required": false; }; "design": { "alias": "design"; "required": false; }; }, { "designChange": "designChange"; }, never, never, true, never>;
1321
1787
  }
1322
1788
 
1323
1789
  declare class PaginationComponent implements OnInit {
@@ -2657,5 +3123,30 @@ declare function backendTermsState(answer: any, stamp: string): {
2657
3123
  /** The user the acceptance belongs to: e-mail, user name or subject of the sign-in. */
2658
3124
  declare function termsUser(userInfo: any): string;
2659
3125
 
2660
- export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, isSignedIn, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, proxyFor, recordOf, recordsFrom, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
2661
- export type { BackendCall, CallContext, ControlKind, CustomKeyboardTarget, CustomKeyboardType, DataSource, FieldKind, FieldModel, FieldRules, LockHint, LockReason, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, PageDataDeps, RequestTimeoutMessages, StagedReadOptions, StorageKind, TermsAcceptance, TermsDialogDocument, TermsSettings };
3126
+ /** The page's area (center) with the page bar it is shown with; unchanged without app settings or without a bar. */
3127
+ declare function withAppPagination(mainCenter: any, center: any): any;
3128
+
3129
+ /** The column a data object's property becomes when it is dropped on the grid: its values, read only. */
3130
+ declare function columnFromProperty(drop: DesignPropertyDrop): any;
3131
+ /** A data object's field dropped at place index of the columns (at the end when index is out of range). */
3132
+ declare function dropGridProperty(layout: any, drop: DesignPropertyDrop, index: number): any;
3133
+ declare function moveColumn(layout: any, from: number, to: number): any;
3134
+ declare function removeColumn(layout: any, index: number): any;
3135
+ /** A column's width or height (option.width / option.height, in px) as dragged on its edge. */
3136
+ declare function resizeColumn(layout: any, index: number, size: {
3137
+ width?: number;
3138
+ height?: number;
3139
+ }): any;
3140
+ /** The settings of a column changed in the Designer's right panel. */
3141
+ declare function replaceColumn(layout: any, index: number, column: any): any;
3142
+
3143
+ /** A sample value of a property for record number index (0, 1, …). */
3144
+ declare function sampleValue(type: string | undefined, name: string, index: number, node?: any, image?: string): any;
3145
+ /**
3146
+ * count sample records for the fields of the layout nodes: each field gets a value of its property's type, a
3147
+ * list field (dropdown, radio buttons) the value of its list's entry.
3148
+ */
3149
+ declare function sampleRecords(nodes: any[], propertySchema: any, count: number, image?: string): any[];
3150
+
3151
+ export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, cardButton, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, designDropIds, designTexts, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillPlaceholders, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, headerButton, inputFormatHint, insertField, isBrowserSource, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, moveCardElement, moveColumn, moveField, moveSection, newButton, newSection, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, replaceCardElement, replaceColumn, replaceField, replaceSection, resizeColumn, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sampleRecords, sampleValue, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline, withAppPagination };
3152
+ export type { BackendCall, CallContext, CardDesignerHost, CardDragData, CardDropSpot, CardDropType, CardPlace, ControlKind, CustomKeyboardTarget, CustomKeyboardType, DataSource, DesignAction, DesignDevice, DesignEvent, DesignPropertyDrop, DesignTarget, DesignTexts, DropSpot, DropType, FieldKind, FieldModel, FieldRules, LockHint, LockReason, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, PageDataDeps, RequestTimeoutMessages, SectionDesignerHost, SectionDragData, SectionKind, StagedReadOptions, StorageKind, TermsAcceptance, TermsDialogDocument, TermsSettings, VlDesign };