@yomotech/view-toolkit 1.0.50 → 1.0.52

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.
@@ -147,6 +147,11 @@ interface DesignDeleteRequest {
147
147
  remove: () => boolean;
148
148
  }
149
149
  type DesignEvent = DesignDeleteRequest
150
+ /** "+" was pressed: the Designer adds an element there (its dialog) - a menu entry at the top or into a folder */
151
+ | {
152
+ type: 'add';
153
+ target: DesignTarget;
154
+ }
150
155
  /** an element was chosen: the Designer opens its settings */
151
156
  | {
152
157
  type: 'select';
@@ -219,6 +224,10 @@ interface DesignTexts {
219
224
  editGrid: string;
220
225
  emptyGrid: string;
221
226
  button: string;
227
+ addMenuEntry: string;
228
+ userName: string;
229
+ addMenuChild: string;
230
+ emptyHeader: string;
222
231
  }
223
232
  declare const DESIGN_TEXTS: DesignTexts;
224
233
  /** The design texts with the Designer's own over the English ones. */
@@ -253,6 +262,13 @@ interface CardPlace {
253
262
  }
254
263
  /** How many columns a grid-template-columns names: "repeat(3, 34px)" three, "minmax(0, 1fr) repeat(3, 34px)" four. */
255
264
  declare function gridColumnCount(template: unknown): number;
265
+ /**
266
+ * A horizontal layout draws its elements in equal columns - unless its columns already fit its elements: widths
267
+ * set for them ("minmax(0, 1fr) repeat(3, 34px)": the order number wide, three narrow buttons) stay. Every edit of the
268
+ * card set them back to equal columns, which squeezed tm's order number (2026-10-28).
269
+ */
270
+ /** The most equal columns a row of a card gets; more elements wrap to the next line. */
271
+ declare const MAX_ROW_COLUMNS = 4;
256
272
  /**
257
273
  * The card layout as the Designer keeps it, changed in place: no empty classes on the card styles, the card's
258
274
  * columns are drawn by the container (no gridTemplateColumns in its style), no classes on the elements (the right
@@ -725,6 +741,15 @@ declare class CustomKeyboardService {
725
741
  * in custom-keyboard.component.css (#166, OFFENE-PUNKTE 43).
726
742
  */
727
743
  private markActiveField;
744
+ /**
745
+ * The key at the bottom right the field asks for (Designer: option.enterKey, data-vl-enter-key on the field or
746
+ * around it): done (default), search, next.
747
+ */
748
+ enterKey(): 'done' | 'search' | 'next';
749
+ /** Search: the field gets Enter (keydown, keyup - as a device's Search key sends it), its action runs, then the keyboard closes. */
750
+ submit(): void;
751
+ /** Next: on to the next field that can be typed in (same form or dialog, in reading order); none - the keyboard closes. */
752
+ next(): void;
728
753
  close(option?: {
729
754
  blurTarget?: boolean;
730
755
  restoreAccessoryBar?: boolean;
@@ -882,6 +907,8 @@ interface DataSource {
882
907
  /** older Designer versions: localStorage: true / sessionStorage: true instead of storageType */
883
908
  localStorage?: boolean;
884
909
  sessionStorage?: boolean;
910
+ /** with storageType database: the page starts empty and loads once every filter field has a value */
911
+ loadOnFilter?: boolean;
885
912
  }
886
913
  type StorageKind = 'localstorage' | 'sessionstorage' | 'filter' | 'database' | '';
887
914
  /** The kind of a data source, lowercase - "localStorage" of older Designer versions counts as "localstorage". */
@@ -922,10 +949,14 @@ interface PageDataDeps {
922
949
  sendBackend(option: any, records: any[], extra: any): Promise<any>;
923
950
  /** The question before deleting; true = delete. */
924
951
  confirmDelete(button: any): Promise<boolean>;
925
- /** A message to the user, by text key (saveFailed, deleteFailed, loadFailed). */
926
- failed(key: string, error: unknown): void;
927
- /** After sending: how many records the backend took and how many it refused (optional). */
928
- sent?(result: SendResult): void;
952
+ /** A message to the user, by text key (saveFailed, deleteFailed, loadFailed); text: the page's / button's own
953
+ * errorMessage, shown instead of the key's text when set. */
954
+ failed(key: string, error: unknown, text?: string): void;
955
+ /** After sending: how many records the backend took and how many it refused; option: the button (its
956
+ * successMessage) (optional). */
957
+ sent?(result: SendResult, option?: any): void;
958
+ /** A hint to the user, e.g. the page's emptyMessage when a backend load found nothing (optional). */
959
+ notice?(text: string): void;
929
960
  /** Dates of browser records back to Date objects (optional). */
930
961
  restoreDates?(records: any[]): any[];
931
962
  /** The app's own work on records just loaded from the backend, e.g. pictures from Media (optional). */
@@ -1156,6 +1187,10 @@ declare class CardComponent {
1156
1187
  classes: string;
1157
1188
  style: Record<string, any>;
1158
1189
  };
1190
+ /** The cards of a row equally high, their buttons at the bottom (center.option.alignRows, catalog alignRowsOf). */
1191
+ alignRows(): boolean;
1192
+ /** An element of the card that holds buttons (a button, or a row with one) - it goes to the bottom of an aligned card. */
1193
+ isActionLayout(layout: any): boolean;
1159
1194
  getCardContainerStyle(): Record<string, any>;
1160
1195
  getSingleCardStyle(): Record<string, any>;
1161
1196
  getHeaderStyle(): Record<string, any>;
@@ -1517,6 +1552,10 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
1517
1552
  }>;
1518
1553
  gridForm?: NgForm;
1519
1554
  /** The Designer's canvas: sample rows, every column with drag, edit, delete and resize, nothing loaded (design/design.ts). */
1555
+ readonly vlFieldKey: typeof testFieldKey;
1556
+ readonly vlFieldPath: typeof testFieldPath;
1557
+ readonly vlAction: typeof testAction;
1558
+ readonly vlWrites: typeof testWrites;
1520
1559
  get designTranslations(): Readonly<Record<string, string>> | undefined;
1521
1560
  design: VlDesign | null;
1522
1561
  /** What was chosen or changed on the Designer's canvas. */
@@ -1598,7 +1637,13 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
1598
1637
  };
1599
1638
  onScrollEvent(event: any): void;
1600
1639
  showLinkDetails(option: any, data: any): void;
1640
+ /** A text of the layout in the app's language - its key in the language file, else as written. */
1641
+ private inLanguage;
1642
+ /** The empty list's text (layoutSchema.noRecordMessage) in the app's language. */
1643
+ get noRecordText(): string;
1601
1644
  invokeGridBtnClick(option: any, propertySchema: any): void;
1645
+ /** A row's button: its record goes along, like a card's button (add to cart, open, dialog …). */
1646
+ invokeRowBtnClick(option: any, record: any): void;
1602
1647
  /**
1603
1648
  * An action icon of a row (save / delete of an action column) calls its address. The address is filled per click
1604
1649
  * from the layout ({{field}} = the row's field) - the layout's own option stays as it is (it was overwritten, a
@@ -1696,6 +1741,11 @@ declare class HeaderMenuComponent implements AfterViewInit {
1696
1741
  private platform;
1697
1742
  /** Marks for the app's test runner (#166): field key and button action. */
1698
1743
  readonly vlFieldKey: typeof testFieldKey;
1744
+ readonly vlFieldPath: typeof testFieldPath;
1745
+ /** The search field's key at the bottom right (Designer: option.enterKey) - Search unless set otherwise. */
1746
+ searchEnterKey(element: any): string;
1747
+ /** The search field's keyboard by the rule of every field: its keyboardType, else a text field's (user 2026-10-31). */
1748
+ searchKeyboard(element: any): string | null;
1699
1749
  readonly vlAction: typeof testAction;
1700
1750
  readonly vlWrites: typeof testWrites;
1701
1751
  isLogined: boolean;
@@ -2079,9 +2129,26 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
2079
2129
  designSelected(path: number[]): boolean;
2080
2130
  selectDesignEntry(path: number[], event?: Event): void;
2081
2131
  selectDesignMenu(): void;
2132
+ designMenuSelected(): boolean;
2133
+ /** the canvas menu folded like the app's (its handle) */
2134
+ designCollapsed: boolean;
2135
+ private designOpenPaths;
2136
+ designOpen(path: number[]): boolean;
2137
+ designFold(path: number[], open: boolean): void;
2138
+ designNode(path: number[]): any;
2139
+ /** the app has a sign-in (Main's app settings: at the start or at any time) - only then the app shows a user */
2140
+ designSignIn(): boolean;
2141
+ /** the menu's own logout entry (top level) - the app shows it as the sign-out beside the user */
2142
+ designLogoutPath(): number[] | null;
2143
+ /** "+": the Designer adds an entry at the top ([]) or into the folder of path */
2144
+ designAdd(path: number[]): void;
2082
2145
  menuText(item: any): string;
2146
+ /** The inline menu's indent of a level, as nz-menu gives it in the app (24px per level). */
2147
+ designIndent(parent: number[]): number;
2083
2148
  menuClasses(style: any): string;
2084
2149
  menuStyle(style: any): Record<string, any>;
2150
+ /** The area's style without its widths: the area (Main's left) is already that wide, the menu fills it. */
2151
+ designRootStyle(): Record<string, any>;
2085
2152
  private refreshDesignMenu;
2086
2153
  private applyDesignMenu;
2087
2154
  designEntryAction(action: DesignAction, path: number[]): void;
@@ -2102,6 +2169,12 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
2102
2169
  private rawMenuItems;
2103
2170
  /** The codes of the project's language files ("en", "de") for the entry Languages. */
2104
2171
  private projectLanguages;
2172
+ /** The page a menu entry opens as tests name it ("pages/sidemenu/books/layout_schema.json" -> "sidemenu/books"). */
2173
+ vlPage(item: any): string | null;
2174
+ /** The language codes the project has (its languages/<code>.json) - the test runner runs a flow in each. */
2175
+ languageCodes(): string[];
2176
+ /** The language shown now ("de"). */
2177
+ currentLanguageCode(): string;
2105
2178
  /** Set once the user picks a language in the menu - the start language then no longer applies. */
2106
2179
  private languageChosenByUser;
2107
2180
  languageChange: EventEmitter<any>;
@@ -3081,6 +3154,11 @@ declare class CheckboxControl {
3081
3154
  errorMessages: any;
3082
3155
  translations: Record<string, string> | null;
3083
3156
  inputStyle: any;
3157
+ /**
3158
+ * The input style without its widths: a field's "width: 100%" made the box as wide as the row and squeezed the
3159
+ * caption to a letter per line (tm-test Controls Dialog); a check box keeps its own size.
3160
+ */
3161
+ get boxStyle(): any;
3084
3162
  toggled: EventEmitter<any>;
3085
3163
  private control?;
3086
3164
  private get option();
@@ -3241,6 +3319,11 @@ declare class ControlComponent implements OnChanges {
3241
3319
  */
3242
3320
  get hostFieldKey(): string | null;
3243
3321
  get hostFieldPath(): string | null;
3322
+ /** A shown text ends with … after the field's maxLines (Designer: Lines at most) - only where it is shown in a list. */
3323
+ get clamped(): boolean;
3324
+ get maxLines(): string | null;
3325
+ /** The key at the bottom right of the app keyboard (Designer: option.enterKey) - the keyboard reads it here. */
3326
+ get hostEnterKey(): string | null;
3244
3327
  /** display mode: the record whose value is shown (record[name]) */
3245
3328
  record: any;
3246
3329
  /** no label (a grid cell: the column's heading is the label) */
@@ -3475,5 +3558,5 @@ declare class DesignTextPipe implements PipeTransform {
3475
3558
  static ɵpipe: i0.ɵɵPipeDeclaration<DesignTextPipe, "vlDesignText", true>;
3476
3559
  }
3477
3560
 
3478
- 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, 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 };
3561
+ 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 };
3479
3562
  export type { AddonFiles, AddonLimits, AddonManifest, AddonTestResult, BackendCall, CallContext, CardDesignerHost, CardDragData, CardDropSpot, CardDropType, CardPlace, ControlKind, CustomKeyboardTarget, CustomKeyboardType, DataSource, DesignAction, DesignDeleteRequest, DesignDevice, DesignEvent, DesignPropertyDrop, DesignTarget, DesignTexts, DesignTranslations, DropSpot, DropType, FieldKind, FieldModel, FieldRules, LockHint, LockReason, LockState, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, PageDataDeps, RequestTimeoutMessages, SectionDesignerHost, SectionDragData, SectionKind, SendResult, StagedReadOptions, StorageKind, TermsAcceptance, TermsDialogDocument, TermsSettings, TreeKey, VlDesign };