@yomotech/view-toolkit 1.0.47 → 1.0.50
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 +28 -4
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +1651 -670
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +20 -3
- package/types/yomotech-view-toolkit.d.ts +357 -30
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
2
|
+
// - new: CARD_LAYOUTS / cardLayoutOf - the card field in one, two or three rows (option.cardLayout, OFFENE-PUNKTE 103)
|
|
1
3
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24
|
|
2
4
|
// - new: controlChoicesFor - the controls a field can be switched to in the Designer (plain text also as check box,
|
|
3
5
|
// switch, radio buttons, dropdown); the editor keeps no list of its own (review of Shuaib's c157aa5c)
|
|
@@ -279,6 +281,17 @@ const PLACEHOLDER_CONTROLS = [
|
|
|
279
281
|
'textInput', 'textArea', 'password', 'email', 'dropdown', 'combobox', 'autocomplete',
|
|
280
282
|
'spinner', 'datepicker', 'timepicker', 'dateTimepicker', 'dateRangepicker', 'multiselect',
|
|
281
283
|
];
|
|
284
|
+
/**
|
|
285
|
+
* How the card field (creditCard) lays out its parts (option.cardLayout): oneRow - Stripe's single line (card number,
|
|
286
|
+
* MM / YY, CVC; the default), twoRows - the number alone, below it expiry and CVC side by side, threeRows - all three
|
|
287
|
+
* below each other. A phone cut the single line off (OFFENE-PUNKTE 103).
|
|
288
|
+
*/
|
|
289
|
+
const CARD_LAYOUTS = ['oneRow', 'twoRows', 'threeRows'];
|
|
290
|
+
/** The card field's layout, oneRow when the layout names none or an unknown one. */
|
|
291
|
+
function cardLayoutOf(option) {
|
|
292
|
+
const value = option?.cardLayout;
|
|
293
|
+
return CARD_LAYOUTS.includes(value) ? value : 'oneRow';
|
|
294
|
+
}
|
|
282
295
|
/** The toolkit keyboards a field can ask for (option.keyboardType). */
|
|
283
296
|
const KEYBOARD_TYPES = ['string', 'alpha', 'numeric', 'email', 'date', 'time'];
|
|
284
297
|
/** keyboardType values that keep the device's system keyboard. */
|
|
@@ -617,6 +630,10 @@ function validateSettings(schema, fallback, option, context) {
|
|
|
617
630
|
value.forEach(v => validateValue(v, `${name} item`, schema.items?.type || 'string', true));
|
|
618
631
|
}
|
|
619
632
|
};
|
|
633
|
+
if (option.cardLayout !== undefined) {
|
|
634
|
+
fail(!CARD_LAYOUTS.includes(option.cardLayout), 'Choose one, two or three rows for the card field.');
|
|
635
|
+
fail(!!c && c !== 'creditCard', 'Only the card field has a card layout.');
|
|
636
|
+
}
|
|
620
637
|
if (option.keyboardType !== undefined) {
|
|
621
638
|
fail(![...KEYBOARD_TYPES, ...SYSTEM_KEYBOARDS].includes(option.keyboardType), 'Choose a supported keyboard.');
|
|
622
639
|
fail(!!c && !KEYBOARD_CONTROLS.includes(c), 'This control has no keyboard.');
|
|
@@ -635,6 +652,11 @@ function assertFieldSettings(schema, fallback, option, context) {
|
|
|
635
652
|
throw new Error('Invalid field layout: ' + errors.join(' '));
|
|
636
653
|
}
|
|
637
654
|
|
|
655
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
656
|
+
// - new: expect cardRows - the card field's rows (1-3), none of its parts wider than the field (OFFENE-PUNKTE 103)
|
|
657
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-29
|
|
658
|
+
// - new: type … at: n - the n-th input of a field (the end of a period)
|
|
659
|
+
// - new: expect checked / unchecked - whether a check box or switch is on, also read-only on a card or grid row
|
|
638
660
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-26
|
|
639
661
|
// - new: the app's test data (.liveforge/test-data.json, TEST_DATA_FILE): steps name its values as {{data.customer.firstName}};
|
|
640
662
|
// withTestData puts them in before a run (both runners), testDataRefs lists them, checkTestFlow(flow, data) reports
|
|
@@ -663,7 +685,7 @@ const ORIENTATIONS = ['portrait', 'landscape'];
|
|
|
663
685
|
const STEP_KINDS = ['open', 'menu', 'tap', 'type', 'pick', 'press', 'scroll', 'openRecord', 'close', 'cart', 'rotate', 'device', 'wait', 'expect'];
|
|
664
686
|
/** What an expect step can check - one of them per step. */
|
|
665
687
|
const EXPECT_KINDS = ['value', 'shows', 'keyboard', 'list', 'message', 'visible', 'hidden', 'locked', 'blocked', 'inFrame',
|
|
666
|
-
'page', 'records', 'recordsAtLeast', 'samePlace', 'cartCount', 'toast'];
|
|
688
|
+
'page', 'records', 'recordsAtLeast', 'samePlace', 'cartCount', 'toast', 'checked', 'unchecked', 'cardRows'];
|
|
667
689
|
/** What has to stay inside the page frame (safe areas, top gap). */
|
|
668
690
|
const FRAME_PARTS = ['keyboard', 'dialog', 'calendar', 'list', 'menu'];
|
|
669
691
|
const LIST_STATES = ['open', 'closed'];
|
|
@@ -706,7 +728,7 @@ function stepKind(step) {
|
|
|
706
728
|
const text = (v) => typeof v === 'string' && v.trim().length > 0;
|
|
707
729
|
/** The problems of a flow; an empty list means it can run. */
|
|
708
730
|
/** Step and check keys that hold a number. */
|
|
709
|
-
const NUMBER_KEYS = new Set(['scroll', 'openRecord', 'wait', 'records', 'recordsAtLeast', 'cartCount']);
|
|
731
|
+
const NUMBER_KEYS = new Set(['scroll', 'openRecord', 'wait', 'records', 'recordsAtLeast', 'cartCount', 'cardRows']);
|
|
710
732
|
/** {{data.customer.firstName}} - a value of the test data; anything else in braces is no test data. */
|
|
711
733
|
const DATA_REF = /\{\{\s*([^}]*?)\s*\}\}/g;
|
|
712
734
|
function stringsOf(node, out = []) {
|
|
@@ -892,12 +914,14 @@ function checkExpect(e, n, add) {
|
|
|
892
914
|
add('stepNameMissing', n, { kind });
|
|
893
915
|
if (kind === 'inFrame' && !FRAME_PARTS.includes(e.inFrame))
|
|
894
916
|
add('unknownFramePart', n, { part: String(e.inFrame) });
|
|
895
|
-
if ((kind === 'page' || kind === 'toast') && !text(e[kind]))
|
|
917
|
+
if ((kind === 'page' || kind === 'toast' || kind === 'checked' || kind === 'unchecked') && !text(e[kind]))
|
|
896
918
|
add('stepNameMissing', n, { kind });
|
|
897
919
|
if ((kind === 'records' || kind === 'recordsAtLeast') && !(Number.isInteger(e[kind]) && e[kind] >= 0))
|
|
898
920
|
add('countNotNumber', n, { kind });
|
|
899
921
|
if (kind === 'samePlace' && e.samePlace !== true)
|
|
900
922
|
add('notTrue', n, { kind });
|
|
923
|
+
if (kind === 'cardRows' && !(Number.isInteger(e.cardRows) && e.cardRows >= 1 && e.cardRows <= 3))
|
|
924
|
+
add('countNotNumber', n, { kind });
|
|
901
925
|
if (kind === 'cartCount' && !(Number.isInteger(e.cartCount) && e.cartCount >= 0) && !/^[+-]\d+$/.test(String(e.cartCount)))
|
|
902
926
|
add('countNotNumber', n, { kind });
|
|
903
927
|
}
|
|
@@ -1441,5 +1465,5 @@ function appSettingsMenu(menu, center, context = {}) {
|
|
|
1441
1465
|
* Generated bundle index. Do not edit.
|
|
1442
1466
|
*/
|
|
1443
1467
|
|
|
1444
|
-
export { APP_SETTINGS, APP_SETTINGS_PATH, APP_SETTING_BLOCKS, BASIC_TYPES, CONTROLS, CONTROL_TYPES, DATA_FORMATS, DATA_OBJECT_KEYS, DATA_OBJECT_NAME_PLACES, DATA_OBJECT_PLACES, DEFAULT_DEVICES, DISPLAY_FORMATS, DOCUMENT_KINDS, EXPECT_KINDS, FRAME_PARTS, KEYBOARD_CONTROLS, KEYBOARD_TYPES, LIST_STATES, LOGIN_FLAGS, LOGIN_METHODS, LOGIN_STORAGES, LOGIN_WHEN, MENU_DECIDED_BY, MENU_ENTRY_KINDS, MENU_SWITCHABLE, NUMBER_STYLES, ORIENTATIONS, PAGINATION_ALIGNS, PAGINATION_PLACEMENTS, PAGINATION_TYPES, PLACEHOLDER_CONTROLS, RESULTS_DIR, RESULTS_KEEP, SETTING_MENU_TEXTS, START_PAGE_KEYS, START_PAGE_PATH, STEP_KINDS, SYSTEM_KEYBOARDS, TEMPORAL_TRANSFER, TERMS_DOCUMENTS, TESTS_DIR, TEST_DATA_FILE, TEST_DEVICES, TYPE_ALIASES, appSettingsMenu, assertFieldSettings, baseType, basicType, canonicalControl, checkAppSettings, checkPagePagination, checkTestFlow, clone, controlChoicesFor, controlsFor, dataSettings, defaultKeyboard, displaySettings, effectiveControl, effectiveFormat, flowDevices, keyboardFor, languageName, loginMethod, normalizeFormat, pageOf, paginationFor, parseDevice, readAppSettings, renameDataObject, resolveProperty, resultsToDelete, rolesOf, rulesFor, startPage, startPageFor, stepKind, temporalPart, testDataRefs, validateSettings, validationSettings, withTestData };
|
|
1468
|
+
export { APP_SETTINGS, APP_SETTINGS_PATH, APP_SETTING_BLOCKS, BASIC_TYPES, CARD_LAYOUTS, CONTROLS, CONTROL_TYPES, DATA_FORMATS, DATA_OBJECT_KEYS, DATA_OBJECT_NAME_PLACES, DATA_OBJECT_PLACES, DEFAULT_DEVICES, DISPLAY_FORMATS, DOCUMENT_KINDS, EXPECT_KINDS, FRAME_PARTS, KEYBOARD_CONTROLS, KEYBOARD_TYPES, LIST_STATES, LOGIN_FLAGS, LOGIN_METHODS, LOGIN_STORAGES, LOGIN_WHEN, MENU_DECIDED_BY, MENU_ENTRY_KINDS, MENU_SWITCHABLE, NUMBER_STYLES, ORIENTATIONS, PAGINATION_ALIGNS, PAGINATION_PLACEMENTS, PAGINATION_TYPES, PLACEHOLDER_CONTROLS, RESULTS_DIR, RESULTS_KEEP, SETTING_MENU_TEXTS, START_PAGE_KEYS, START_PAGE_PATH, STEP_KINDS, SYSTEM_KEYBOARDS, TEMPORAL_TRANSFER, TERMS_DOCUMENTS, TESTS_DIR, TEST_DATA_FILE, TEST_DEVICES, TYPE_ALIASES, appSettingsMenu, assertFieldSettings, baseType, basicType, canonicalControl, cardLayoutOf, checkAppSettings, checkPagePagination, checkTestFlow, clone, controlChoicesFor, controlsFor, dataSettings, defaultKeyboard, displaySettings, effectiveControl, effectiveFormat, flowDevices, keyboardFor, languageName, loginMethod, normalizeFormat, pageOf, paginationFor, parseDevice, readAppSettings, renameDataObject, resolveProperty, resultsToDelete, rolesOf, rulesFor, startPage, startPageFor, stepKind, temporalPart, testDataRefs, validateSettings, validationSettings, withTestData };
|
|
1445
1469
|
//# sourceMappingURL=yomotech-view-toolkit-catalog.mjs.map
|