@yomotech/view-toolkit 1.0.41 → 1.0.43
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 +659 -1
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +1772 -476
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +205 -2
- package/types/yomotech-view-toolkit.d.ts +487 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yomotech-view-toolkit-catalog.mjs","sources":["../../../projects/view-toolkit/catalog/src/field-catalog.ts","../../../projects/view-toolkit/catalog/src/test-flow.ts","../../../projects/view-toolkit/catalog/src/public-api.ts","../../../projects/view-toolkit/catalog/src/yomotech-view-toolkit-catalog.ts"],"sourcesContent":["// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n// - new: the period - type dateRange (stored [from, to]) with its control dateRangepicker, the date\r\n// keyboard, placeholder and the date display settings (#166 E4)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-17\r\n// - new: the field catalog - the ONE place that says which controls exist, which data they fit,\r\n// which settings they offer, how dates/times/decimals/currencies are encoded and how a field\r\n// layout is checked. The Designer, the renderer, the AI contract (capabilities.json, schemas,\r\n// validator, prompt) are to read it from here instead of keeping their own copies (CONTROLS-PLAN.md,\r\n// step 1, #165).\r\n// Taken over unchanged from the Designer's field-settings.ts (shuaib, the most complete rules so\r\n// far) - so the Designer behaves exactly as before once it reads them from here - plus:\r\n// - basicType: the aliases of the data types (image -> media, checkbox -> boolean, date&time ->\r\n// datetime, decimal -> bigdecimal), from the developer's field-policy.ts (12248aef, reverted)\r\n// - placeholder for every control a value is typed or chosen in (before: textInput, textArea,\r\n// password, dropdown, combobox only)\r\n// - the keyboard: option.keyboardType per field (string, alpha, numeric, email, date, time; native\r\n// or none keep the system keyboard); without one the control's default, then the data type's\r\n// It only describes and checks; nothing renders from it yet (step 2).\r\n// - change 2026-10-18: effectiveControl - the control the app really uses when option.control is\r\n// missing (most fields of TM, Paperfeed, Luv2shop, Hotel): the old switches (password, email,\r\n// timeOnly), DTO types that are a control themselves (dropdown, creditCard, quantity), then the\r\n// data type. A date with its own pattern (format \"yy-mm-dd\") stays a date. The old option.keyboard\r\n// counts when keyboardType is missing (#166)\r\n\r\n/** Pure policy shared by inspectors and layout validation. No DTO mutation. */\r\nexport type Bag = Record<string, any>;\r\nexport interface Setting { key: string; label: string; kind: 'text' | 'number' | 'select' | 'json'; values?: string[]; hint?: string; }\r\nexport const clone = <T>(value: T): T => JSON.parse(JSON.stringify(value));\r\nconst own = (o: Bag, k: string) => Object.prototype.hasOwnProperty.call(o, k);\r\nexport function resolveProperty(root: Bag | any, reference: string): Bag {\r\n const parts = (reference || '').replace(/^#\\/?/, '').split('/').filter(Boolean).map(p => p.replace(/~1/g, '/').replace(/~0/g, '~'));\r\n let node: any = root;\r\n for (const part of parts) node = node?.[part] ?? node?.properties?.[part];\r\n if (node?.type) return node;\r\n const name = parts[parts.length - 1];\r\n const objectName: any = parts.find(p => p !== 'properties');\r\n return root?.[objectName]?.[name] ?? root?.[objectName]?.properties?.[name] ?? root?.properties?.[name] ?? {};\r\n}\r\nexport function normalizeFormat(value: string): string {\r\n return ({ date: 'iso-date', time: 'iso-time', 'date-time': 'iso-datetime', datetime: 'iso-datetime', 'date&time': 'iso-datetime', bigdecimal: 'decimal' } as Bag)[String(value).toLowerCase()] || value || '';\r\n}\r\nexport function baseType(schema: Bag | any, fallback: string): string {\r\n const t = String(schema.type || fallback || '').toLowerCase();\r\n if (t === 'dropdown') return 'string';\r\n if (t === 'quantity') return 'integer';\r\n return ['date', 'time', 'datetime', 'date-time', 'date&time'].includes(t) ? 'string' : ['decimal', 'bigdecimal'].includes(t) ? 'string' : t;\r\n}\r\nexport function effectiveFormat(schema: Bag | any, fallback: string, data: Bag | any): string {\r\n const semantic = String(schema.type || fallback || '').toLowerCase();\r\n const temporal = ['date', 'time', 'datetime', 'date-time', 'date&time', 'decimal', 'bigdecimal'].includes(semantic);\r\n const declared = normalizeFormat(schema.format || data.format || '');\r\n // A date with its own display pattern (format \"yy-mm-dd\") is still a date.\r\n if (temporal && declared && !(DATA_FORMATS as readonly string[]).includes(declared)) return normalizeFormat(semantic);\r\n return declared || (temporal ? normalizeFormat(semantic) : '');\r\n}\r\nexport function rulesFor(schema: Bag | any, data: Bag | any): Bag {\r\n // The document's array enum is an item enum, unlike JSON Schema's whole-array enum.\r\n const source = schema.type === 'array' ? { ...schema, enum: schema.items?.enum } : schema;\r\n const rules = { ...(data.validation || {}) };\r\n for (const k of ['enum', 'pattern', 'minLength', 'maxLength', 'minimum', 'maximum', 'multipleOf', 'minItems', 'maxItems', 'uniqueItems']) {\r\n if (source[k] !== undefined) rules[k] = source[k];\r\n }\r\n return rules;\r\n}\r\nexport function controlsFor(schema: Bag, fallback: string, option: Bag | any): { value: string; label: string }[] {\r\n const d = option.fieldData || {}, t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, d), r: any = rulesFor(schema, d);\r\n let values: string[] = [];\r\n const declared = String(schema[\"type\"] || fallback || '').toLowerCase();\r\n if (declared === 'creditcard') values = ['creditCard'];\r\n else if (declared === 'quantity') values = ['quantity', 'spinner', 'textInput'];\r\n else if (declared === 'dropdown') values = ['dropdown', 'combobox', 'autocomplete', 'radiobutton'];\r\n // a period from - to, stored as the pair [from, to] (#166 E4)\r\n else if (declared === 'daterange') values = ['dateRangepicker'];\r\n else if (f === 'flag' || t === 'boolean') values = ['checkbox', 'switch', 'radiobutton'];\r\n else if (f === 'iso-date') values = ['datepicker', 'textInput'];\r\n else if (f === 'iso-time') values = ['timepicker', 'textInput'];\r\n else if (f === 'iso-datetime') values = ['dateTimepicker', 'textInput'];\r\n else if (f === 'decimal') values = ['textInput', 'spinner'];\r\n else if (t === 'array') values = ['picklist', 'multiselect'];\r\n else if (r.enum) values = ['dropdown', 'radiobutton', 'combobox', 'autocomplete'];\r\n else if (t === 'string') values = ['textInput', 'textArea', 'password', 'combobox', 'autocomplete', 'email'];\r\n else if (t === 'integer' || t === 'number') values = ['textInput', 'spinner', 'slider'];\r\n if (values.length) values.push('output');\r\n const labels: Bag = { textInput: 'Text field', textArea: 'Text area', dateTimepicker: 'Date and time picker', dateRangepicker: 'Date range picker', radiobutton: 'Radio buttons', datepicker: 'Date picker', timepicker: 'Time picker', output: 'Read-only output', creditCard: 'Credit card', quantity: 'Quantity' };\r\n return values.map(value => ({ value, label: labels[value] || value[0].toUpperCase() + value.slice(1) }));\r\n}\r\nexport const canonicalControl = (c: string) => ({ textfield: 'textInput', textarea: 'textArea', radioButton: 'radiobutton', datetimepicker: 'dateTimepicker', daterangepicker: 'dateRangepicker', date: 'datepicker', time: 'timepicker' } as Bag)[c] || c;\r\n\r\n// ---------------------------------------------------------------------------------------------\r\n// Data types, controls, placeholder and keyboard\r\n// ---------------------------------------------------------------------------------------------\r\n\r\n/** The data types of a property after its aliases. */\r\nexport const BASIC_TYPES = ['string', 'number', 'integer', 'bigdecimal', 'boolean', 'date', 'time', 'datetime', 'dateRange', 'media', 'array'] as const;\r\n\r\n/** Older or other names of a data type and the type they mean. */\r\nexport const TYPE_ALIASES: Bag = { daterange: 'dateRange', image: 'media', checkbox: 'boolean', 'date-time': 'datetime', 'date&time': 'datetime', decimal: 'bigdecimal' };\r\n\r\n/** The data type of a property, aliases resolved (\"image\" -> \"media\"). */\r\nexport function basicType(property: Bag | any): string {\r\n const value = String(property?.type || 'string').toLowerCase();\r\n return TYPE_ALIASES[value] || value;\r\n}\r\n\r\n/** Every control the Designer offers (option.control), with the name it is shown under. */\r\nexport const CONTROLS: Bag = {\r\n textInput: 'Text field', textArea: 'Text area', password: 'Password', email: 'Email',\r\n combobox: 'Combobox', autocomplete: 'Autocomplete', dropdown: 'Dropdown',\r\n checkbox: 'Checkbox', switch: 'Switch', radiobutton: 'Radio buttons',\r\n spinner: 'Spinner', slider: 'Slider',\r\n datepicker: 'Date picker', timepicker: 'Time picker', dateTimepicker: 'Date and time picker',\r\n dateRangepicker: 'Date range picker',\r\n picklist: 'Picklist', multiselect: 'Multiselect', output: 'Read-only output',\r\n creditCard: 'Credit card', quantity: 'Quantity',\r\n};\r\n\r\n/** DTO types that name their control themselves (older projects). */\r\nexport const CONTROL_TYPES: Bag = { dropdown: 'dropdown', creditcard: 'creditCard', quantity: 'quantity' };\r\n\r\n/**\r\n * The control a field is shown with: option.control; without one what the app uses - an old switch\r\n * (password, email, timeOnly), a DTO type that is a control (dropdown, creditCard, quantity), else\r\n * the first control that fits the data (date -> datepicker, boolean -> checkbox, text -> textInput).\r\n * '' when nothing fits (media, objects).\r\n */\r\nexport function effectiveControl(option: Bag | any, schema: Bag | any = {}, fallback = ''): string {\r\n const o = option || {};\r\n if (o.control) return canonicalControl(o.control);\r\n const allowed = controlsFor(schema || {}, fallback, o).map(c => c.value);\r\n const legacy = o.password ? 'password' : o.email ? 'email' : o.timeOnly ? 'timepicker' : '';\r\n if (legacy && allowed.includes(legacy)) return legacy;\r\n const own = CONTROL_TYPES[String(schema?.type || fallback || '').toLowerCase()];\r\n if (own) return own;\r\n return allowed.find(c => c !== 'output') || '';\r\n}\r\n\r\n/** Controls a value is typed or chosen in - they take a placeholder. */\r\nexport const PLACEHOLDER_CONTROLS: string[] = [\r\n 'textInput', 'textArea', 'password', 'email', 'dropdown', 'combobox', 'autocomplete',\r\n 'spinner', 'datepicker', 'timepicker', 'dateTimepicker', 'dateRangepicker', 'multiselect',\r\n];\r\n\r\n/** The toolkit keyboards a field can ask for (option.keyboardType). */\r\nexport const KEYBOARD_TYPES = ['string', 'alpha', 'numeric', 'email', 'date', 'time'] as const;\r\n/** keyboardType values that keep the device's system keyboard. */\r\nexport const SYSTEM_KEYBOARDS = ['native', 'none'] as const;\r\n\r\n/** Controls a keyboard is chosen for. */\r\nexport const KEYBOARD_CONTROLS: string[] = [\r\n 'textInput', 'textArea', 'password', 'email', 'combobox', 'autocomplete',\r\n 'spinner', 'datepicker', 'timepicker', 'dateTimepicker', 'dateRangepicker', 'quantity',\r\n];\r\n\r\n/** The keyboard a control brings when the field names none (as the Designer preselects it). */\r\nexport function defaultKeyboard(control: string, schema: Bag | any = {}, fallback = '', data: Bag | any = {}): string {\r\n const c = canonicalControl(control), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, data);\r\n if (c === 'email') return 'email';\r\n if (c === 'timepicker') return 'time';\r\n if (['datepicker', 'dateTimepicker', 'dateRangepicker'].includes(c)) return 'date';\r\n if (['textArea', 'password', 'combobox', 'autocomplete'].includes(c)) return 'string';\r\n if (f === 'iso-time') return 'time';\r\n if (['iso-date', 'iso-datetime'].includes(f)) return 'date';\r\n if (['spinner', 'quantity'].includes(c) || ['number', 'integer'].includes(t) || f === 'decimal') return 'numeric';\r\n return 'string';\r\n}\r\n\r\n/**\r\n * The keyboard of a field: its keyboardType; native/none (and a password without one) keep the\r\n * system keyboard (null); without keyboardType the control's default; without a control the data\r\n * type's (date, time, number/integer, string, email format). The per-type keyboards are only the\r\n * fallback.\r\n */\r\nexport function keyboardFor(option: Bag | any, property: Bag | any = {}): string | null {\r\n const explicit = option?.keyboardType ?? option?.keyboard;\r\n if ((SYSTEM_KEYBOARDS as readonly string[]).includes(explicit)) return null;\r\n if ((KEYBOARD_TYPES as readonly string[]).includes(explicit)) return explicit;\r\n const control = canonicalControl(option?.control || '');\r\n if (control === 'password' || option?.password) return null;\r\n if (control && KEYBOARD_CONTROLS.includes(control)) return defaultKeyboard(control, property, '', option?.fieldData || {});\r\n if (option?.email || property?.format === 'email') return 'email';\r\n switch (basicType(property)) {\r\n case 'date': return 'date';\r\n case 'time': return 'time';\r\n case 'number': case 'integer': case 'bigdecimal': return 'numeric';\r\n case 'string': return 'string';\r\n default: return null;\r\n }\r\n}\r\n\r\n// ---------------------------------------------------------------------------------------------\r\n// Date and time: type = what is shown and entered, storage = how the value travels\r\n// (CONTROLS-PLAN.md C1, decided 2026-10-18). Descriptive only - the renderer reads it in step 3+.\r\n// ---------------------------------------------------------------------------------------------\r\n\r\n/** What a date/time property shows and takes: date and time stay separate fields. */\r\nexport type TemporalPart = 'date' | 'time' | 'datetime';\r\n\r\n/** The part of a date/time a property shows and takes (DTO type date / time / date&time), else null. */\r\nexport function temporalPart(property: Bag | any): TemporalPart | null {\r\n const t = basicType(property);\r\n return t === 'date' || t === 'time' || t === 'datetime' ? t : null;\r\n}\r\n\r\n/**\r\n * How date and time values travel - the same for every project:\r\n * - every value is a string (JSON has no date type); the app turns it into a date for showing and\r\n * back into a string for sending, steered by the DTO type alone\r\n * - read: ISO, date and time, a value without timezone is local wall time; Z or an offset is\r\n * dropped (wall time) - P5W1 sends 2025-11-04T16:30:00\r\n * - send: ISO with the device's offset, 2026-10-18T08:00:00+02:00 (the daily split of the time\r\n * recording, convertToDailyLogs, stays as it is)\r\n * - shown and typed: the app language, year with four digits (de 18.10.2026, time 08:05);\r\n * lists: displayFormat short / medium (default) / long / custom\r\n */\r\nexport const TEMPORAL_TRANSFER = {\r\n read: 'iso, local wall time, offset dropped',\r\n send: 'iso with local offset',\r\n show: 'app language, four-digit year',\r\n listStyles: ['short', 'medium', 'long', 'custom'],\r\n listDefault: 'medium',\r\n} as const;\r\n\r\n/** The encodings a field can declare (option.fieldData.format). */\r\nexport const DATA_FORMATS = ['iso-date', 'iso-time', 'iso-datetime', 'flag', 'decimal'] as const;\r\n/** How a date or time is shown (option.displayFormat). */\r\nexport const DISPLAY_FORMATS = ['short', 'medium', 'long', 'custom'] as const;\r\n/** How a number is shown (option.numberStyle). */\r\nexport const NUMBER_STYLES = ['decimal', 'currency', 'percent'] as const;\r\nconst setting = (key: string, label: string, kind: Setting['kind'] = 'text', values?: string[], hint?: string): Setting => ({ key, label, kind, values, hint });\r\nconst yesNo = (key: string, label: string) => setting(key, label, 'select', ['true', 'false']);\r\nexport function displaySettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const c = canonicalControl(option.control), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {}), r = rulesFor(schema, option.fieldData || {});\r\n const result = [yesNo('readonly', 'Read only'), setting('messages', 'Validation messages', 'json', undefined, 'JSON object: validation rule names mapped to messages or translation keys.')];\r\n if (PLACEHOLDER_CONTROLS.includes(c)) result.push(setting('placeholder', 'Placeholder'));\r\n if (c === 'textInput') result.push(setting('mask', 'Input mask'));\r\n if (c === 'textArea') result.push(setting('rows', 'Visible rows', 'number'));\r\n if (['spinner', 'slider'].includes(c)) result.push(setting('step', 'Step', 'number'));\r\n if (c === 'slider') result.push(yesNo('showValue', 'Show slider value'));\r\n if (['checkbox','switch'].includes(c)) result.push(setting('labelPosition', 'Label position', 'select', ['left', 'right']));\r\n if (c === 'switch') result.push(setting('labelOn', 'On label'), setting('labelOff', 'Off label'));\r\n if (['checkbox', 'switch', 'radiobutton'].includes(c) && t === 'boolean') result.push(setting('checkedBooleanValue', 'Value represented by the active state', 'select', ['true', 'false'], 'Stores a Boolean. Choose false to invert the visual state; this does not change the DTO type.'));\r\n if (['checkbox', 'switch', 'radiobutton'].includes(c) && f === 'flag') result.push(setting('checkedValue', 'Active value'), setting('uncheckedValue', 'Inactive value'));\r\n if (['radiobutton', 'dropdown', 'combobox', 'autocomplete', 'picklist', 'multiselect'].includes(c)) result.push(setting('labels', 'Value labels', 'json', undefined, 'JSON object mapping allowed stored values to captions or translation keys.'));\r\n if (c === 'radiobutton') result.push(setting('orientation', 'Orientation', 'select', ['horizontal', 'vertical']));\r\n if (c === 'combobox') result.push(yesNo('allowCustom', 'Allow values outside the list'));\r\n if (c === 'autocomplete') result.push(setting('source', 'Suggestion source URL'), setting('minChars', 'Minimum characters', 'number'));\r\n if (c === 'picklist') result.push(yesNo('sortable', 'Allow item reordering'));\r\n if (c === 'multiselect') result.push(setting('maxVisible', 'Visible selected items', 'number'));\r\n if ((['iso-date', 'iso-time', 'iso-datetime'].includes(f) && ['textInput', 'datepicker', 'timepicker', 'dateTimepicker', 'output'].includes(c)) || c === 'dateRangepicker') {\r\n result.push(setting('displayFormat', 'Display style', 'select', ['short', 'medium', 'long', 'custom']));\r\n if (option.displayFormat === 'custom') result.push(setting('customDisplayFormat', 'Fixed display pattern', 'text', undefined, 'Use only when every locale must show the same pattern.'));\r\n result.push(setting('displayTimezone', 'Display timezone', 'text', undefined, 'local, UTC, or an IANA timezone such as Asia/Karachi.'));\r\n }\r\n if ((['integer', 'number'].includes(t) || f === 'decimal') && ['textInput', 'spinner', 'slider', 'output'].includes(c)) {\r\n result.push(setting('numberStyle', 'Number style', 'select', ['decimal', 'currency', 'percent']), yesNo('grouping', 'Group digits'));\r\n if (!option.numberStyle || option.numberStyle === 'decimal') result.push(setting('decimals', 'Displayed decimal places', 'number'));\r\n result.push(setting('unit', 'Standard unit', 'text', undefined, 'An Intl unit identifier, for example kilogram or liter.'), setting('unitLabel', 'Custom unit translation key'));\r\n }\r\n if (c === 'dropdown') result.push(setting('optionlabel', 'Response label field'), setting('optionvalue', 'Response value field'));\r\n return result;\r\n}\r\nexport function dataSettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {});\r\n const result: Setting[] = [];\r\n if (['integer', 'number'].includes(t) || f === 'decimal') {\r\n result.push(setting('currency', 'Fixed currency code', 'text', undefined, 'ISO currency code. Independent of the user locale.'), setting('currencyField', 'Currency property reference'));\r\n if (t === 'integer') result.push(yesNo('minorUnits', 'Store in currency minor units'));\r\n }\r\n return result;\r\n}\r\nexport function validationSettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {});\r\n const result = [setting('enum', 'Allowed values', 'json', undefined, t === 'array' ? 'JSON array of allowed item values.' : 'JSON array; preserve each value’s data type.')];\r\n if (t === 'string') result.push(setting('minLength', 'Minimum length', 'number'), setting('maxLength', 'Maximum length', 'number'), setting('pattern', 'Validation pattern'));\r\n if (['integer', 'number'].includes(t) || f === 'decimal') result.push(setting('minimum', 'Minimum value', f === 'decimal' ? 'text' : 'number'), setting('maximum', 'Maximum value', f === 'decimal' ? 'text' : 'number'), setting('multipleOf', 'Value increment', f === 'decimal' ? 'text' : 'number'));\r\n if (t === 'array') result.push(setting('minItems', 'Minimum items', 'number'), setting('maxItems', 'Maximum items', 'number'), yesNo('uniqueItems', 'Require unique items'));\r\n return result;\r\n}\r\nfunction decimalParts(value: any): [bigint, number] | null {\r\n const m = /^(-?)(\\d+)(?:\\.(\\d+))?$/.exec(String(value));\r\n return m ? [BigInt((m[1] || '') + m[2] + (m[3] || '')), (m[3] || '').length] : null;\r\n}\r\nfunction decimalPair(a: any, b: any): [bigint, bigint] | null {\r\n const x = decimalParts(a), y = decimalParts(b); if (!x || !y) return null;\r\n const scale = Math.max(x[1], y[1]); return [x[0] * 10n ** BigInt(scale - x[1]), y[0] * 10n ** BigInt(scale - y[1])];\r\n}\r\nfunction validDate(v: string): boolean {\r\n const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(v); if (!m) return false;\r\n const year = +m[1], month = +m[2], day = +m[3];\r\n const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\r\n return month >= 1 && month <= 12 && day >= 1 && day <= [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];\r\n}\r\nfunction validTime(v: string): boolean {\r\n const m = /^(\\d{2}):(\\d{2}):(\\d{2})(?:\\.\\d+)?(Z|[+-](\\d{2}):(\\d{2}))$/.exec(v);\r\n return !!m && +m[1] < 24 && +m[2] < 60 && +m[3] < 60 && (!m[5] || (+m[5] < 24 && +m[6] < 60));\r\n}\r\nexport function validateSettings(schema: Bag | any, fallback: string, option: Bag | any, context?: { propertySchema: Bag; reference: string; allowPendingValues?: boolean }): string[] {\r\n const errors: string[] = [], d = option.fieldData || {}, r: any = rulesFor(schema, d), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, d), c = canonicalControl(option.control);\r\n const fail = (condition: boolean, message: string) => { if (condition) errors.push(message); };\r\n fail(!t, 'The property type could not be resolved. Provide propertySchema or propertyType.');\r\n fail(d.format !== undefined && !['iso-date', 'iso-time', 'iso-datetime', 'flag', 'decimal'].includes(d.format), 'Choose a supported data meaning.');\r\n fail(['iso-date', 'iso-time', 'iso-datetime', 'flag'].includes(f) && t !== 'string', 'Date, time, and flag formats require a string property.');\r\n fail(f === 'decimal' && !['string', 'number'].includes(t), 'Exact decimal format requires string or number.');\r\n fail(!!schema.format && !!d.format && normalizeFormat(schema.format) !== normalizeFormat(d.format), 'The format conflicts with the property schema.');\r\n for (const k of Object.keys(d.validation || {})) {\r\n const source = t === 'array' && k === 'enum' ? schema.items?.enum : schema[k];\r\n fail(source !== undefined && JSON.stringify(source) !== JSON.stringify(d.validation[k]), `${k} conflicts with the property schema; keep the source constraint.`);\r\n }\r\n const pendingDropdown = context?.allowPendingValues && c === 'dropdown' && t === 'string' && !f && r.enum === undefined;\r\n fail(!pendingDropdown && !controlsFor(schema, fallback, option).some(x => x.value === c), 'Select a control compatible with the effective data type.');\r\n fail(!!r.pattern && t !== 'string', 'Patterns are only supported for strings.');\r\n try { if (r.pattern) new RegExp(r.pattern); } catch { errors.push('The validation pattern is not a valid regular expression.'); }\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) fail(r[k] !== undefined && !(['integer', 'number'].includes(t) || f === 'decimal'), `${k} requires a numeric or decimal property.`);\r\n for (const k of ['minLength', 'maxLength']) fail(r[k] !== undefined && t !== 'string', `${k} requires a string property.`);\r\n for (const k of ['minItems', 'maxItems', 'uniqueItems']) fail(r[k] !== undefined && t !== 'array', `${k} requires an array property.`);\r\n for (const k of ['minLength', 'maxLength', 'minItems', 'maxItems']) fail(r[k] !== undefined && (!Number.isInteger(r[k]) || r[k] < 0), `${k} must be a nonnegative integer.`);\r\n for (const [a, b] of [['minLength', 'maxLength'], ['minItems', 'maxItems']]) fail(r[a] !== undefined && r[b] !== undefined && r[a] > r[b], `${a} cannot exceed ${b}.`);\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) if (r[k] !== undefined) fail(f === 'decimal' ? !decimalParts(r[k]) : typeof r[k] !== 'number' || !Number.isFinite(r[k]), `${k} must be a valid numeric value.`);\r\n if (r.minimum !== undefined && r.maximum !== undefined) { const pair = decimalPair(r.minimum, r.maximum); fail(pair ? pair[0] > pair[1] : r.minimum > r.maximum, 'Minimum cannot exceed maximum.'); }\r\n if (r.multipleOf !== undefined) { const p = decimalParts(r.multipleOf); fail(!p || p[0] <= 0n, 'Value increment must be greater than zero.'); }\r\n if (r.enum !== undefined) {\r\n fail(!Array.isArray(r.enum) || !r.enum.length, 'Allowed values must be a nonempty JSON array.');\r\n if (Array.isArray(r.enum)) {\r\n fail(new Set(r.enum.map((v: any) => JSON.stringify(v))).size !== r.enum.length, 'Allowed values must not contain duplicates.');\r\n const et = t === 'array' ? schema.items?.type || 'string' : t;\r\n fail(r.enum.some((v: any) => et === 'integer' ? !Number.isInteger(v) : et === 'array' ? !Array.isArray(v) : typeof v !== et), 'Allowed values must match the property or item type.');\r\n }\r\n }\r\n fail(c === 'combobox' && !!r.enum && option.allowCustom === true, 'Custom values cannot be enabled for an enum.');\r\n fail(!!d.currency && !!d.currencyField, 'Choose a fixed currency OR a currency property, not both.');\r\n fail(option.numberStyle === 'currency' && !d.currency && !d.currencyField, 'Currency display requires a currency code or currency property.');\r\n fail(d.minorUnits === true && (t !== 'integer' || (!d.currency && !d.currencyField)), 'Minor units require integer storage and a currency.');\r\n fail(option.numberStyle !== 'decimal' && !!option.numberStyle && option.decimals !== undefined, 'Decimal places apply only to decimal display; currency precision comes from the currency.');\r\n fail(!!option.unit && !!option.unitLabel, 'Choose a standard unit OR a custom unit translation key.');\r\n if (d.currency) {\r\n const currencies: string[] | undefined = (Intl as any).supportedValuesOf?.('currency');\r\n fail(!/^[A-Z]{3}$/.test(d.currency) || (!!currencies && !currencies.includes(d.currency)), 'Choose a supported uppercase ISO currency code.');\r\n }\r\n if (d.currencyField && context?.propertySchema) {\r\n const siblingRef = context.reference.slice(0, context.reference.lastIndexOf('/') + 1) + String(d.currencyField).replace(/~/g, '~0').replace(/\\//g, '~1');\r\n const currencyProperty: any = resolveProperty(context.propertySchema, String(d.currencyField).includes('/') ? d.currencyField : siblingRef);\r\n fail(currencyProperty.type !== 'string', 'The currency property must exist in the property schema and have string storage.');\r\n }\r\n fail(option.checkedBooleanValue !== undefined && typeof option.checkedBooleanValue !== 'boolean', 'The active Boolean value must be true or false.');\r\n for (const k of ['required', 'readonly', 'allowCustom', 'showValue', 'grouping']) fail(option[k] !== undefined && typeof option[k] !== 'boolean', `${k} must be a Boolean.`);\r\n for (const k of ['minorUnits']) fail(d[k] !== undefined && typeof d[k] !== 'boolean', `${k} must be a Boolean.`);\r\n fail(r.uniqueItems !== undefined && typeof r.uniqueItems !== 'boolean', 'uniqueItems must be a Boolean.');\r\n if (option.unit) { try { new Intl.NumberFormat('en', { style: 'unit', unit: option.unit }); } catch { errors.push('The standard unit is not supported by Intl.'); } }\r\n if (option.displayTimezone && option.displayTimezone !== 'local') { try { new Intl.DateTimeFormat('en', { timeZone: option.displayTimezone }); } catch { errors.push('Enter a valid display timezone.'); } }\r\n fail(option.displayFormat === 'custom' && !option.customDisplayFormat, 'Enter a fixed display pattern.');\r\n for (const k of ['rows', 'maxVisible', 'step']) fail(option[k] !== undefined && (typeof option[k] !== 'number' || !Number.isFinite(option[k]) || option[k] <= 0), `${k} must be greater than zero.`);\r\n for (const k of ['rows', 'maxVisible', 'minChars', 'decimals']) fail(option[k] !== undefined && (!Number.isInteger(option[k]) || option[k] < 0), `${k} must be a nonnegative integer.`);\r\n fail(t === 'integer' && option.step !== undefined && !Number.isInteger(option.step), 'Integer controls require a whole-number step.');\r\n if (f === 'flag') {\r\n fail(!Array.isArray(r.enum) || r.enum.length !== 2, 'A flag requires exactly two allowed string values.');\r\n fail(option.checkedValue === undefined || option.uncheckedValue === undefined || option.checkedValue === option.uncheckedValue, 'Set different active and inactive flag values.');\r\n if (Array.isArray(r.enum)) for (const k of ['checkedValue', 'uncheckedValue']) fail(!r.enum.includes(option[k]), `${k} must exist in the allowed values.`);\r\n }\r\n if (option.labels !== undefined) {\r\n fail(!option.labels || typeof option.labels !== 'object' || Array.isArray(option.labels), 'Value labels must be a JSON object.');\r\n if (option.labels && typeof option.labels === 'object') fail(Object.values(option.labels).some(v => typeof v !== 'string'), 'Label captions must be strings.');\r\n const values = t === 'boolean' ? [true, false] : r.enum;\r\n if (values && option.labels) fail(Object.keys(option.labels).some(k => !values.some((v: any) => String(v) === k)), 'Every label key must match an allowed value.');\r\n }\r\n if (option.messages && typeof option.messages === 'object') fail(Object.values(option.messages).some(v => typeof v !== 'string'), 'Validation messages must contain string captions or translation keys.');\r\n for (const [key, values] of [['labelPosition', ['left', 'right']], ['orientation', ['horizontal', 'vertical']], ['numberStyle', ['decimal', 'currency', 'percent']]] as [string, string[]][]) fail(option[key] !== undefined && !values.includes(option[key]), `Choose a supported ${key}.`);\r\n fail(option.messages !== undefined && (!option.messages || typeof option.messages !== 'object' || Array.isArray(option.messages)), 'Validation messages must be a JSON object.');\r\n const allowed = new Set(displaySettings(schema, fallback, option).map(s => s.key));\r\n for (const k of ['placeholder', 'rows', 'mask', 'step', 'showValue', 'labelPosition', 'labelOn', 'labelOff', 'orientation', 'allowCustom', 'source', 'minChars', 'labels', 'maxVisible', 'displayFormat', 'displayTimezone', 'customDisplayFormat', 'numberStyle', 'decimals', 'grouping', 'unit', 'unitLabel', 'checkedValue', 'uncheckedValue', 'checkedBooleanValue']) fail(option[k] !== undefined && !allowed.has(k), `${k} is not applicable to this control and data meaning.`);\r\n for (const k of ['currency', 'currencyField', 'minorUnits']) fail(d[k] !== undefined && !dataSettings(schema, fallback, option).some(s => s.key === k), `${k} requires the appropriate numeric type.`);\r\n const validateValue = (value: any, name: string, valueType: string, item = false) => {\r\n fail(valueType === 'integer' ? !Number.isInteger(value) : valueType === 'array' ? !Array.isArray(value) : typeof value !== valueType, `${name} must match ${valueType} storage.`);\r\n if (Array.isArray(r.enum) && !r.enum.some((v: any) => JSON.stringify(v) === JSON.stringify(value))) fail(valueType !== 'array', `${name} is outside the allowed values.`);\r\n if (valueType === 'string') {\r\n const v = String(value);\r\n if (!item) {\r\n fail(f === 'iso-date' && !validDate(v), `${name} must be an existing ISO date.`);\r\n fail(f === 'iso-time' && !validTime(v), `${name} must be an ISO time with timezone.`);\r\n const parts = v.split('T');\r\n fail(f === 'iso-datetime' && (parts.length !== 2 || !validDate(parts[0]) || !validTime(parts[1])), `${name} must be an ISO date and time with timezone.`);\r\n fail(r.minLength !== undefined && [...v].length < r.minLength, `${name} is too short.`);\r\n fail(r.maxLength !== undefined && [...v].length > r.maxLength, `${name} is too long.`);\r\n try { if (r.pattern) fail(!new RegExp(r.pattern).test(v), `${name} does not match the pattern.`); } catch { }\r\n }\r\n }\r\n if (!item && (['integer', 'number'].includes(valueType) || f === 'decimal')) {\r\n fail(valueType !== 'string' && !Number.isFinite(value), `${name} must be finite.`);\r\n fail(f === 'decimal' && !decimalParts(value), `${name} must be a plain decimal value.`);\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) if (r[k] !== undefined) { const p = decimalPair(value, r[k]); if (p) fail(k === 'minimum' ? p[0] < p[1] : k === 'maximum' ? p[0] > p[1] : p[1] !== 0n && p[0] % p[1] !== 0n, `${name} violates ${k}.`); }\r\n }\r\n if (valueType === 'array' && Array.isArray(value)) {\r\n fail(r.minItems !== undefined && value.length < r.minItems, `${name} has too few items.`);\r\n fail(r.maxItems !== undefined && value.length > r.maxItems, `${name} has too many items.`);\r\n fail(r.uniqueItems === true && new Set(value.map(v => JSON.stringify(v))).size !== value.length, `${name} contains duplicate items.`);\r\n value.forEach(v => validateValue(v, `${name} item`, schema.items?.type || 'string', true));\r\n }\r\n };\r\n if (option.keyboardType !== undefined) {\r\n fail(![...KEYBOARD_TYPES, ...SYSTEM_KEYBOARDS].includes(option.keyboardType), 'Choose a supported keyboard.');\r\n fail(!!c && !KEYBOARD_CONTROLS.includes(c), 'This control has no keyboard.');\r\n }\r\n if (own(d, 'default') && own(schema, 'default')) fail(JSON.stringify(d.default) !== JSON.stringify(schema.default), 'Default conflicts with the property schema.');\r\n const defaultValue = own(schema, 'default') ? schema.default : d.default;\r\n if (own(schema, 'default') || own(d, 'default')) validateValue(defaultValue, 'Default value', t);\r\n return [...new Set(errors)];\r\n}\r\n\r\n/** Call before activating a saved field layout; throws rather than warning. */\r\nexport function assertFieldSettings(schema: Bag, fallback: string, option: Bag, context?: { propertySchema: Bag; reference: string; allowPendingValues?: boolean }): void {\r\n const errors = validateSettings(schema, fallback, option, context);\r\n if (errors.length) throw new Error('Invalid field layout: ' + errors.join(' '));\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-19\r\n// - new: the format of an app's test flows (#166). Every app brings its own test suite in its hidden\r\n// system folder .liveforge/tests/ - one JSON file per flow. The same steps are run by the test\r\n// runner inside the app (Designer preview, \"Run tests\") and by viewdefinition-e2e on simulators.\r\n// Pages and fields are named by their name in the project (page folder, field key), never by a\r\n// caption - a test runs in every language. Buttons by their action (Save, Add, Delete).\r\n// A flow that writes real data says so (\"books\": true) and only runs after an explicit confirmation.\r\n// checkTestFlow returns codes with parameters, the editor translates them.\r\n// - new: a run can be stopped (FlowResult.stopped, TestRun.stopped)\r\n// - new: expect blocked - a writing button is there and the flow may not press it\r\n\r\nexport const TESTS_DIR = '.liveforge/tests';\r\nexport const RESULTS_DIR = '.liveforge/results';\r\n\r\nexport const TEST_DEVICES = ['phone', 'tablet', 'laptop', 'desktop'] as const;\r\nexport const ORIENTATIONS = ['portrait', 'landscape'] as const;\r\nexport const STEP_KINDS = ['open', 'tap', 'type', 'pick', 'press', 'rotate', 'device', 'wait', 'expect'] as const;\r\n/** What an expect step can check - one of them per step. */\r\nexport const EXPECT_KINDS = ['value', 'shows', 'keyboard', 'list', 'message', 'visible', 'hidden', 'locked', 'blocked', 'inFrame'] as const;\r\n/** What has to stay inside the page frame (safe areas, top gap). */\r\nexport const FRAME_PARTS = ['keyboard', 'dialog', 'calendar', 'list', 'menu'] as const;\r\nexport const LIST_STATES = ['open', 'closed'] as const;\r\n\r\nexport type TestDevice = typeof TEST_DEVICES[number];\r\nexport type Orientation = typeof ORIENTATIONS[number];\r\n\r\nexport interface TestExpect {\r\n field?: string;\r\n /** stored value of the field */\r\n value?: unknown;\r\n /** text the field shows (formatted: \"12,34 €\", \"01:00 PM\") */\r\n shows?: string;\r\n /** keyboard type that is open (string, alpha, numeric, email, date, time) or \"none\" */\r\n keyboard?: string;\r\n list?: typeof LIST_STATES[number];\r\n /** message key of a check (required, minLength, dateOrder …) */\r\n message?: string;\r\n visible?: string;\r\n hidden?: string;\r\n locked?: string;\r\n /** a button that writes real data is there and this flow may not press it (the runner's lock) */\r\n blocked?: string;\r\n inFrame?: typeof FRAME_PARTS[number];\r\n}\r\n\r\nexport interface TestStep {\r\n open?: string;\r\n tap?: string;\r\n type?: string;\r\n into?: string;\r\n pick?: string;\r\n in?: string;\r\n press?: string;\r\n rotate?: Orientation;\r\n device?: string;\r\n /** milliseconds */\r\n wait?: number;\r\n expect?: TestExpect;\r\n}\r\n\r\nexport interface TestFlow {\r\n name: string;\r\n description?: string;\r\n /** writes real data - runs only after an explicit confirmation */\r\n books?: boolean;\r\n /** \"phone\", \"tablet:landscape\" … - without orientation portrait; none means phone and tablet */\r\n devices?: string[];\r\n steps: TestStep[];\r\n}\r\n\r\nexport interface TestProblem {\r\n code: string;\r\n step?: number;\r\n params?: Record<string, string>;\r\n}\r\n\r\n/** One step's outcome in a run. image: screenshot of a failed step (data URL or file in results). */\r\nexport interface StepResult {\r\n step: number;\r\n ok: boolean;\r\n reason?: string;\r\n image?: string;\r\n}\r\n\r\nexport interface FlowResult {\r\n file: string;\r\n name: string;\r\n device: string;\r\n ok: boolean;\r\n skipped?: 'books';\r\n /** stopped by the person (\"Stop\") after this flow's last step in steps */\r\n stopped?: boolean;\r\n steps: StepResult[];\r\n}\r\n\r\n/** One run, stored as .liveforge/results/<date-time>.json (the backend keeps the latest runs). */\r\nexport interface TestRun {\r\n project: string;\r\n tenant: string;\r\n startedAt: string;\r\n finishedAt?: string;\r\n /** the person stopped the run - flows after it did not run */\r\n stopped?: boolean;\r\n flows: FlowResult[];\r\n}\r\n\r\nexport const DEFAULT_DEVICES = ['phone', 'tablet'];\r\n\r\n/**\r\n * How many runs the backend keeps in .liveforge/results - defaults, the project configuration can\r\n * change them: at most `max` runs; while they together are bigger than `maxBytes` (mostly images of\r\n * failed steps) the oldest go, but `min` runs always stay. Results are not exported.\r\n */\r\nexport const RESULTS_KEEP = { max: 10, min: 5, maxBytes: 20 * 1024 * 1024 };\r\n\r\n/** The runs to delete, oldest first; runs: name (sortable by date-time) and size in bytes. */\r\nexport function resultsToDelete(runs: { name: string; size: number }[], keep = RESULTS_KEEP): string[] {\r\n const sorted = [...runs].sort((a, b) => a.name.localeCompare(b.name));\r\n const gone: string[] = [];\r\n let total = sorted.reduce((sum, r) => sum + r.size, 0);\r\n while (sorted.length > keep.min && (sorted.length > keep.max || total > keep.maxBytes)) {\r\n const old = sorted.shift()!;\r\n total -= old.size;\r\n gone.push(old.name);\r\n }\r\n return gone;\r\n}\r\n\r\n/** \"tablet:landscape\" → { device: 'tablet', orientation: 'landscape' }; null when unknown. */\r\nexport function parseDevice(text: string): { device: TestDevice; orientation: Orientation } | null {\r\n const [device, orientation = 'portrait'] = String(text || '').split(':');\r\n if (!(TEST_DEVICES as readonly string[]).includes(device)) return null;\r\n if (!(ORIENTATIONS as readonly string[]).includes(orientation)) return null;\r\n return { device: device as TestDevice, orientation: orientation as Orientation };\r\n}\r\n\r\n/** The devices a flow runs on. */\r\nexport function flowDevices(flow: TestFlow): string[] {\r\n return flow.devices?.length ? flow.devices : DEFAULT_DEVICES;\r\n}\r\n\r\n/** The kind of a step - the first step key it has. */\r\nexport function stepKind(step: TestStep): string | null {\r\n return (STEP_KINDS as readonly string[]).find((k) => step && Object.prototype.hasOwnProperty.call(step, k)) || null;\r\n}\r\n\r\nconst text = (v: unknown) => typeof v === 'string' && v.trim().length > 0;\r\n\r\n/** The problems of a flow; an empty list means it can run. */\r\nexport function checkTestFlow(flow: any): TestProblem[] {\r\n const problems: TestProblem[] = [];\r\n const add = (code: string, step?: number, params?: Record<string, string>) => problems.push({ code, step, params });\r\n if (!flow || typeof flow !== 'object' || Array.isArray(flow)) return [{ code: 'notAnObject' }];\r\n if (!text(flow.name)) add('nameMissing');\r\n if (flow.books !== undefined && typeof flow.books !== 'boolean') add('booksNotBoolean');\r\n if (flow.devices !== undefined) {\r\n if (!Array.isArray(flow.devices)) add('devicesNotList');\r\n else flow.devices.filter((d: string) => !parseDevice(d)).forEach((d: string) => add('unknownDevice', undefined, { device: String(d) }));\r\n }\r\n if (!Array.isArray(flow.steps) || !flow.steps.length) {\r\n add('stepsMissing');\r\n return problems;\r\n }\r\n flow.steps.forEach((step: any, i: number) => {\r\n const n = i + 1;\r\n if (!step || typeof step !== 'object' || Array.isArray(step)) { add('stepNotAnObject', n); return; }\r\n const kinds = (STEP_KINDS as readonly string[]).filter((k) => k in step);\r\n if (kinds.length !== 1) { add(kinds.length ? 'stepSeveralKinds' : 'stepUnknown', n, { keys: Object.keys(step).join(', ') }); return; }\r\n const kind = kinds[0];\r\n switch (kind) {\r\n case 'open': case 'tap': case 'press':\r\n if (!text(step[kind])) add('stepNameMissing', n, { kind });\r\n break;\r\n case 'type':\r\n if (typeof step.type !== 'string') add('typeNotText', n);\r\n if (!text(step.into)) add('intoMissing', n);\r\n break;\r\n case 'pick':\r\n if (!text(step.pick)) add('stepNameMissing', n, { kind });\r\n if (!text(step.in)) add('inMissing', n);\r\n break;\r\n case 'rotate':\r\n if (!(ORIENTATIONS as readonly string[]).includes(step.rotate)) add('unknownOrientation', n, { orientation: String(step.rotate) });\r\n break;\r\n case 'device':\r\n if (!parseDevice(step.device)) add('unknownDevice', n, { device: String(step.device) });\r\n break;\r\n case 'wait':\r\n if (typeof step.wait !== 'number' || step.wait < 0 || step.wait > 60000) add('waitOutOfRange', n);\r\n break;\r\n case 'expect':\r\n checkExpect(step.expect, n, add);\r\n break;\r\n }\r\n });\r\n return problems;\r\n}\r\n\r\nfunction checkExpect(e: any, n: number, add: (code: string, step?: number, params?: Record<string, string>) => void) {\r\n if (!e || typeof e !== 'object' || Array.isArray(e)) { add('expectNotAnObject', n); return; }\r\n const kinds = (EXPECT_KINDS as readonly string[]).filter((k) => k in e);\r\n if (kinds.length !== 1) { add(kinds.length ? 'expectSeveralKinds' : 'expectUnknown', n, { keys: Object.keys(e).join(', ') }); return; }\r\n const kind = kinds[0];\r\n if ((kind === 'value' || kind === 'shows') && !text(e.field)) add('fieldMissing', n, { kind });\r\n if (kind === 'shows' && typeof e.shows !== 'string') add('showsNotText', n);\r\n if (kind === 'keyboard' && !text(e.keyboard)) add('keyboardMissing', n);\r\n if (kind === 'list' && !(LIST_STATES as readonly string[]).includes(e.list)) add('unknownListState', n, { list: String(e.list) });\r\n if (kind === 'message' && !text(e.message)) add('messageMissing', n);\r\n if ((kind === 'visible' || kind === 'hidden' || kind === 'locked' || kind === 'blocked') && !text(e[kind])) add('stepNameMissing', n, { kind });\r\n if (kind === 'inFrame' && !(FRAME_PARTS as readonly string[]).includes(e.inFrame)) add('unknownFramePart', n, { part: String(e.inFrame) });\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-19\r\n// - new: the test flow format of an app's .liveforge/tests (#166)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n// - new: @yomotech/view-toolkit/catalog - the field catalog without Angular, for the Designer,\r\n// node tests and the AI contract tools (#166)\r\nexport * from './field-catalog';\r\nexport * from './test-flow';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAC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AAK,UAAU,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;AAAE,QAAA,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACvE,IAAA,IAAI,IAAI,KAAK,MAAM,IAAI,CAAE,WAAiC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAAE,QAAA,GAAG,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;IACjI,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;AAAE,QAAA,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACpE,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;AAC/I,IAAA,IAAI,IAAI,KAAK,SAAS,IAAI,CAAE,WAAiC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;AAAE,QAAA,GAAG,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;AAC5I;;AClNA;AACA;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yomotech-view-toolkit-catalog.mjs","sources":["../../../projects/view-toolkit/catalog/src/field-catalog.ts","../../../projects/view-toolkit/catalog/src/test-flow.ts","../../../projects/view-toolkit/catalog/src/app-settings-catalog.ts","../../../projects/view-toolkit/catalog/src/public-api.ts","../../../projects/view-toolkit/catalog/src/yomotech-view-toolkit-catalog.ts"],"sourcesContent":["// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n// - new: controlChoicesFor - the controls a field can be switched to in the Designer (plain text also as check box,\r\n// switch, radio buttons, dropdown); the editor keeps no list of its own (review of Shuaib's c157aa5c)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-24\r\n// - new: DATA_OBJECT_NAME_PLACES / renameDataObject - where a page names a data object, a rename changes all\r\n// - new: DATA_OBJECT_KEYS / DATA_OBJECT_PLACES - a data object holds names and types; where the rest is set\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n// - new: the period - type dateRange (stored [from, to]) with its control dateRangepicker, the date\r\n// keyboard, placeholder and the date display settings (#166 E4)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-17\r\n// - new: the field catalog - the ONE place that says which controls exist, which data they fit,\r\n// which settings they offer, how dates/times/decimals/currencies are encoded and how a field\r\n// layout is checked. The Designer, the renderer, the AI contract (capabilities.json, schemas,\r\n// validator, prompt) are to read it from here instead of keeping their own copies (CONTROLS-PLAN.md,\r\n// step 1, #165).\r\n// Taken over unchanged from the Designer's field-settings.ts (shuaib, the most complete rules so\r\n// far) - so the Designer behaves exactly as before once it reads them from here - plus:\r\n// - basicType: the aliases of the data types (image -> media, checkbox -> boolean, date&time ->\r\n// datetime, decimal -> bigdecimal), from the developer's field-policy.ts (12248aef, reverted)\r\n// - placeholder for every control a value is typed or chosen in (before: textInput, textArea,\r\n// password, dropdown, combobox only)\r\n// - the keyboard: option.keyboardType per field (string, alpha, numeric, email, date, time; native\r\n// or none keep the system keyboard); without one the control's default, then the data type's\r\n// It only describes and checks; nothing renders from it yet (step 2).\r\n// - change 2026-10-18: effectiveControl - the control the app really uses when option.control is\r\n// missing (most fields of TM, Paperfeed, Luv2shop, Hotel): the old switches (password, email,\r\n// timeOnly), DTO types that are a control themselves (dropdown, creditCard, quantity), then the\r\n// data type. A date with its own pattern (format \"yy-mm-dd\") stays a date. The old option.keyboard\r\n// counts when keyboardType is missing (#166)\r\n\r\n/** Pure policy shared by inspectors and layout validation. No DTO mutation. */\r\nexport type Bag = Record<string, any>;\r\nexport interface Setting { key: string; label: string; kind: 'text' | 'number' | 'select' | 'json'; values?: string[]; hint?: string; }\r\nexport const clone = <T>(value: T): T => JSON.parse(JSON.stringify(value));\r\nconst own = (o: Bag, k: string) => Object.prototype.hasOwnProperty.call(o, k);\r\nexport function resolveProperty(root: Bag | any, reference: string): Bag {\r\n const parts = (reference || '').replace(/^#\\/?/, '').split('/').filter(Boolean).map(p => p.replace(/~1/g, '/').replace(/~0/g, '~'));\r\n let node: any = root;\r\n for (const part of parts) node = node?.[part] ?? node?.properties?.[part];\r\n if (node?.type) return node;\r\n const name = parts[parts.length - 1];\r\n const objectName: any = parts.find(p => p !== 'properties');\r\n return root?.[objectName]?.[name] ?? root?.[objectName]?.properties?.[name] ?? root?.properties?.[name] ?? {};\r\n}\r\nexport function normalizeFormat(value: string): string {\r\n return ({ date: 'iso-date', time: 'iso-time', 'date-time': 'iso-datetime', datetime: 'iso-datetime', 'date&time': 'iso-datetime', bigdecimal: 'decimal' } as Bag)[String(value).toLowerCase()] || value || '';\r\n}\r\nexport function baseType(schema: Bag | any, fallback: string): string {\r\n const t = String(schema.type || fallback || '').toLowerCase();\r\n if (t === 'dropdown') return 'string';\r\n if (t === 'quantity') return 'integer';\r\n return ['date', 'time', 'datetime', 'date-time', 'date&time'].includes(t) ? 'string' : ['decimal', 'bigdecimal'].includes(t) ? 'string' : t;\r\n}\r\nexport function effectiveFormat(schema: Bag | any, fallback: string, data: Bag | any): string {\r\n const semantic = String(schema.type || fallback || '').toLowerCase();\r\n const temporal = ['date', 'time', 'datetime', 'date-time', 'date&time', 'decimal', 'bigdecimal'].includes(semantic);\r\n const declared = normalizeFormat(schema.format || data.format || '');\r\n // A date with its own display pattern (format \"yy-mm-dd\") is still a date.\r\n if (temporal && declared && !(DATA_FORMATS as readonly string[]).includes(declared)) return normalizeFormat(semantic);\r\n return declared || (temporal ? normalizeFormat(semantic) : '');\r\n}\r\nexport function rulesFor(schema: Bag | any, data: Bag | any): Bag {\r\n // The document's array enum is an item enum, unlike JSON Schema's whole-array enum.\r\n const source = schema.type === 'array' ? { ...schema, enum: schema.items?.enum } : schema;\r\n const rules = { ...(data.validation || {}) };\r\n for (const k of ['enum', 'pattern', 'minLength', 'maxLength', 'minimum', 'maximum', 'multipleOf', 'minItems', 'maxItems', 'uniqueItems']) {\r\n if (source[k] !== undefined) rules[k] = source[k];\r\n }\r\n return rules;\r\n}\r\nexport function controlsFor(schema: Bag, fallback: string, option: Bag | any): { value: string; label: string }[] {\r\n const d = option.fieldData || {}, t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, d), r: any = rulesFor(schema, d);\r\n let values: string[] = [];\r\n const declared = String(schema[\"type\"] || fallback || '').toLowerCase();\r\n if (declared === 'creditcard') values = ['creditCard'];\r\n else if (declared === 'quantity') values = ['quantity', 'spinner', 'textInput'];\r\n else if (declared === 'dropdown') values = ['dropdown', 'combobox', 'autocomplete', 'radiobutton'];\r\n // a period from - to, stored as the pair [from, to] (#166 E4)\r\n else if (declared === 'daterange') values = ['dateRangepicker'];\r\n else if (f === 'flag' || t === 'boolean') values = ['checkbox', 'switch', 'radiobutton'];\r\n else if (f === 'iso-date') values = ['datepicker', 'textInput'];\r\n else if (f === 'iso-time') values = ['timepicker', 'textInput'];\r\n else if (f === 'iso-datetime') values = ['dateTimepicker', 'textInput'];\r\n else if (f === 'decimal') values = ['textInput', 'spinner'];\r\n else if (t === 'array') values = ['picklist', 'multiselect'];\r\n else if (r.enum) values = ['dropdown', 'radiobutton', 'combobox', 'autocomplete'];\r\n else if (t === 'string') values = ['textInput', 'textArea', 'password', 'combobox', 'autocomplete', 'email'];\r\n else if (t === 'integer' || t === 'number') values = ['textInput', 'spinner', 'slider'];\r\n if (values.length) values.push('output');\r\n const labels: Bag = { textInput: 'Text field', textArea: 'Text area', dateTimepicker: 'Date and time picker', dateRangepicker: 'Date range picker', radiobutton: 'Radio buttons', datepicker: 'Date picker', timepicker: 'Time picker', output: 'Read-only output', creditCard: 'Credit card', quantity: 'Quantity' };\r\n return values.map(value => ({ value, label: labels[value] || value[0].toUpperCase() + value.slice(1) }));\r\n}\r\n/**\r\n * The controls a field can be switched to in the Designer (decision 2026-10-24: the editor keeps no list of its\r\n * own): those that fit now (controlsFor) and those that fit once the field is set up for them - a plain text as\r\n * check box or switch (it then becomes a two-state flag) or as radio buttons or dropdown (it then needs its\r\n * values); a list of two texts as check box or switch. \"Read-only output\" is no choice here - read only is set\r\n * with protected.\r\n */\r\nexport function controlChoicesFor(schema: Bag, fallback: string, option: Bag | any): { value: string; label: string }[] {\r\n const s = schema || {};\r\n const declared = String(s[\"type\"] || fallback || '').toLowerCase();\r\n const plainText = declared === 'string' && baseType(s, fallback) === 'string' && !effectiveFormat(s, fallback, {});\r\n const fieldData = { ...((option || {}).fieldData || {}) };\r\n if (plainText) delete fieldData.format; // the choices of the field itself, not of a choice already made\r\n const choices = controlsFor(s, fallback, { ...(option || {}), fieldData }).filter(c => c.value !== 'output');\r\n const add = (...values: string[]) => {\r\n for (const value of values) if (!choices.some(c => c.value === value)) choices.push(controlLabel(value));\r\n };\r\n if (plainText && Array.isArray(s[\"enum\"])) {\r\n if (s[\"enum\"].length === 2 && s[\"enum\"].every((v: any) => typeof v === 'string')) add('checkbox', 'switch');\r\n } else if (plainText) {\r\n add('checkbox', 'switch', 'radiobutton', 'dropdown');\r\n }\r\n return choices;\r\n}\r\n\r\n/** A control with its label as the catalog names it. */\r\nfunction controlLabel(value: string): { value: string; label: string } {\r\n const labels: Bag = { textInput: 'Text field', textArea: 'Text area', dateTimepicker: 'Date and time picker', dateRangepicker: 'Date range picker', radiobutton: 'Radio buttons', datepicker: 'Date picker', timepicker: 'Time picker', output: 'Read-only output', creditCard: 'Credit card', quantity: 'Quantity' };\r\n return { value, label: labels[value] || value[0].toUpperCase() + value.slice(1) };\r\n}\r\n\r\nexport const canonicalControl = (c: string) => ({ textfield: 'textInput', textarea: 'textArea', radioButton: 'radiobutton', datetimepicker: 'dateTimepicker', daterangepicker: 'dateRangepicker', date: 'datepicker', time: 'timepicker' } as Bag)[c] || c;\r\n\r\n// ---------------------------------------------------------------------------------------------\r\n// Data types, controls, placeholder and keyboard\r\n// ---------------------------------------------------------------------------------------------\r\n\r\n/** The data types of a property after its aliases. */\r\n/**\r\n * A data object (objects/*.json) holds names and types only (decision 2026-10-24): each property has\r\n * just these keys. Everything else is set on the layout field - DATA_OBJECT_PLACES says where.\r\n */\r\nexport const DATA_OBJECT_KEYS = ['type'] as const;\r\n\r\n/** Where what older data objects carried is set now: on the layout field that shows the property. */\r\nexport const DATA_OBJECT_PLACES: Bag = {\r\n caption: 'label.caption',\r\n placeholder: 'option.placeholder',\r\n tooltip: 'option.tooltip',\r\n required: 'option.required',\r\n validation: 'option.required, option.fieldData.validation (minLength, maxLength, pattern, minimum, maximum)',\r\n value: 'option.fieldData.default (start value; a placeholder such as {{quantity}} or {{id}} too)',\r\n default: 'option.fieldData.default',\r\n data: 'option.fieldData.validation.enum and option.labels (a fixed list of choices)',\r\n loginUser: 'option.fromUser (the placeholder is taken from the signed-in user)',\r\n currency: 'option.numberStyle \"currency\" and option.fieldData.currency',\r\n decimalPoint: 'option.decimals',\r\n format: 'option.displayFormat \"custom\" and option.customDisplayFormat (a date pattern)',\r\n};\r\n\r\n/**\r\n * Where a page names a data object (objects/<name>.json) - a rename has to change every one of them,\r\n * the Designer's rename and the AI contract use this list. The app's test flows name fields by their\r\n * property alone, without the data object.\r\n */\r\nexport const DATA_OBJECT_NAME_PLACES: Bag = {\r\n 'scope.reference': 'a field or column: #/<name>/properties/<property>',\r\n 'option.property_url': 'the data objects a page loads: objects/<name>.json (one text or a list)',\r\n 'option.propertyKey': 'the data object a sign-in or register form sends',\r\n 'option.innerAction.from / to': 'the data objects of a calculation such as copy ({ action, from, to })',\r\n};\r\n\r\n/**\r\n * Renames the data object oldName to newName at every place of DATA_OBJECT_NAME_PLACES inside a page\r\n * layout (changed in place). Returns how many values were changed.\r\n */\r\nexport function renameDataObject(layout: any, oldName: string, newName: string): number {\r\n if (!oldName || !newName || oldName === newName) return 0;\r\n const file = `objects/${oldName}.json`;\r\n const fileNew = `objects/${newName}.json`;\r\n const refOld = `#/${oldName}/`;\r\n let changed = 0;\r\n const renameFile = (value: string) => value.endsWith(file) && (value === file || value.endsWith('/' + file))\r\n ? value.slice(0, value.length - file.length) + fileNew : value;\r\n const walk = (node: any): void => {\r\n if (Array.isArray(node)) { node.forEach(walk); return; }\r\n if (!node || typeof node !== 'object') return;\r\n for (const key of Object.keys(node)) {\r\n const value = node[key];\r\n if (key === 'reference' && typeof value === 'string' && value.startsWith(refOld)) {\r\n node[key] = `#/${newName}/` + value.slice(refOld.length); changed++;\r\n } else if (key === 'property_url' && typeof value === 'string' && renameFile(value) !== value) {\r\n node[key] = renameFile(value); changed++;\r\n } else if (key === 'property_url' && Array.isArray(value)) {\r\n value.forEach((item, i) => {\r\n if (typeof item === 'string' && renameFile(item) !== item) { value[i] = renameFile(item); changed++; }\r\n });\r\n } else if (key === 'propertyKey' && value === oldName) {\r\n node[key] = newName; changed++;\r\n } else if ((key === 'innerAction' || key === 'action') && value && typeof value === 'object' && !Array.isArray(value)) {\r\n for (const end of ['from', 'to']) if (value[end] === oldName) { value[end] = newName; changed++; }\r\n walk(value);\r\n } else {\r\n walk(value);\r\n }\r\n }\r\n };\r\n walk(layout);\r\n return changed;\r\n}\r\n\r\nexport const BASIC_TYPES = ['string', 'number', 'integer', 'bigdecimal', 'boolean', 'date', 'time', 'datetime', 'dateRange', 'media', 'array'] as const;\r\n\r\n/** Older or other names of a data type and the type they mean. */\r\nexport const TYPE_ALIASES: Bag = { daterange: 'dateRange', image: 'media', checkbox: 'boolean', 'date-time': 'datetime', 'date&time': 'datetime', decimal: 'bigdecimal' };\r\n\r\n/** The data type of a property, aliases resolved (\"image\" -> \"media\"). */\r\nexport function basicType(property: Bag | any): string {\r\n const value = String(property?.type || 'string').toLowerCase();\r\n return TYPE_ALIASES[value] || value;\r\n}\r\n\r\n/** Every control the Designer offers (option.control), with the name it is shown under. */\r\nexport const CONTROLS: Bag = {\r\n textInput: 'Text field', textArea: 'Text area', password: 'Password', email: 'Email',\r\n combobox: 'Combobox', autocomplete: 'Autocomplete', dropdown: 'Dropdown',\r\n checkbox: 'Checkbox', switch: 'Switch', radiobutton: 'Radio buttons',\r\n spinner: 'Spinner', slider: 'Slider',\r\n datepicker: 'Date picker', timepicker: 'Time picker', dateTimepicker: 'Date and time picker',\r\n dateRangepicker: 'Date range picker',\r\n picklist: 'Picklist', multiselect: 'Multiselect', output: 'Read-only output',\r\n creditCard: 'Credit card', quantity: 'Quantity',\r\n};\r\n\r\n/** DTO types that name their control themselves (older projects). */\r\nexport const CONTROL_TYPES: Bag = { dropdown: 'dropdown', creditcard: 'creditCard', quantity: 'quantity' };\r\n\r\n/**\r\n * The control a field is shown with: option.control; without one what the app uses - an old switch\r\n * (password, email, timeOnly), a DTO type that is a control (dropdown, creditCard, quantity), else\r\n * the first control that fits the data (date -> datepicker, boolean -> checkbox, text -> textInput).\r\n * '' when nothing fits (media, objects).\r\n */\r\nexport function effectiveControl(option: Bag | any, schema: Bag | any = {}, fallback = ''): string {\r\n const o = option || {};\r\n if (o.control) return canonicalControl(o.control);\r\n const allowed = controlsFor(schema || {}, fallback, o).map(c => c.value);\r\n const legacy = o.password ? 'password' : o.email ? 'email' : o.timeOnly ? 'timepicker' : '';\r\n if (legacy && allowed.includes(legacy)) return legacy;\r\n const own = CONTROL_TYPES[String(schema?.type || fallback || '').toLowerCase()];\r\n if (own) return own;\r\n return allowed.find(c => c !== 'output') || '';\r\n}\r\n\r\n/** Controls a value is typed or chosen in - they take a placeholder. */\r\nexport const PLACEHOLDER_CONTROLS: string[] = [\r\n 'textInput', 'textArea', 'password', 'email', 'dropdown', 'combobox', 'autocomplete',\r\n 'spinner', 'datepicker', 'timepicker', 'dateTimepicker', 'dateRangepicker', 'multiselect',\r\n];\r\n\r\n/** The toolkit keyboards a field can ask for (option.keyboardType). */\r\nexport const KEYBOARD_TYPES = ['string', 'alpha', 'numeric', 'email', 'date', 'time'] as const;\r\n/** keyboardType values that keep the device's system keyboard. */\r\nexport const SYSTEM_KEYBOARDS = ['native', 'none'] as const;\r\n\r\n/** Controls a keyboard is chosen for. */\r\nexport const KEYBOARD_CONTROLS: string[] = [\r\n 'textInput', 'textArea', 'password', 'email', 'combobox', 'autocomplete',\r\n 'spinner', 'datepicker', 'timepicker', 'dateTimepicker', 'dateRangepicker', 'quantity',\r\n];\r\n\r\n/** The keyboard a control brings when the field names none (as the Designer preselects it). */\r\nexport function defaultKeyboard(control: string, schema: Bag | any = {}, fallback = '', data: Bag | any = {}): string {\r\n const c = canonicalControl(control), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, data);\r\n if (c === 'email') return 'email';\r\n if (c === 'timepicker') return 'time';\r\n if (['datepicker', 'dateTimepicker', 'dateRangepicker'].includes(c)) return 'date';\r\n if (['textArea', 'password', 'combobox', 'autocomplete'].includes(c)) return 'string';\r\n if (f === 'iso-time') return 'time';\r\n if (['iso-date', 'iso-datetime'].includes(f)) return 'date';\r\n if (['spinner', 'quantity'].includes(c) || ['number', 'integer'].includes(t) || f === 'decimal') return 'numeric';\r\n return 'string';\r\n}\r\n\r\n/**\r\n * The keyboard of a field: its keyboardType; native/none (and a password without one) keep the\r\n * system keyboard (null); without keyboardType the control's default; without a control the data\r\n * type's (date, time, number/integer, string, email format). The per-type keyboards are only the\r\n * fallback.\r\n */\r\nexport function keyboardFor(option: Bag | any, property: Bag | any = {}): string | null {\r\n const explicit = option?.keyboardType ?? option?.keyboard;\r\n if ((SYSTEM_KEYBOARDS as readonly string[]).includes(explicit)) return null;\r\n if ((KEYBOARD_TYPES as readonly string[]).includes(explicit)) return explicit;\r\n const control = canonicalControl(option?.control || '');\r\n if (control === 'password' || option?.password) return null;\r\n if (control && KEYBOARD_CONTROLS.includes(control)) return defaultKeyboard(control, property, '', option?.fieldData || {});\r\n if (option?.email || property?.format === 'email') return 'email';\r\n switch (basicType(property)) {\r\n case 'date': return 'date';\r\n case 'time': return 'time';\r\n case 'number': case 'integer': case 'bigdecimal': return 'numeric';\r\n case 'string': return 'string';\r\n default: return null;\r\n }\r\n}\r\n\r\n// ---------------------------------------------------------------------------------------------\r\n// Date and time: type = what is shown and entered, storage = how the value travels\r\n// (CONTROLS-PLAN.md C1, decided 2026-10-18). Descriptive only - the renderer reads it in step 3+.\r\n// ---------------------------------------------------------------------------------------------\r\n\r\n/** What a date/time property shows and takes: date and time stay separate fields. */\r\nexport type TemporalPart = 'date' | 'time' | 'datetime';\r\n\r\n/** The part of a date/time a property shows and takes (DTO type date / time / date&time), else null. */\r\nexport function temporalPart(property: Bag | any): TemporalPart | null {\r\n const t = basicType(property);\r\n return t === 'date' || t === 'time' || t === 'datetime' ? t : null;\r\n}\r\n\r\n/**\r\n * How date and time values travel - the same for every project:\r\n * - every value is a string (JSON has no date type); the app turns it into a date for showing and\r\n * back into a string for sending, steered by the DTO type alone\r\n * - read: ISO, date and time, a value without timezone is local wall time; Z or an offset is\r\n * dropped (wall time) - P5W1 sends 2025-11-04T16:30:00\r\n * - send: ISO with the device's offset, 2026-10-18T08:00:00+02:00 (the daily split of the time\r\n * recording, convertToDailyLogs, stays as it is)\r\n * - shown and typed: the app language, year with four digits (de 18.10.2026, time 08:05);\r\n * lists: displayFormat short / medium (default) / long / custom\r\n */\r\nexport const TEMPORAL_TRANSFER = {\r\n read: 'iso, local wall time, offset dropped',\r\n send: 'iso with local offset',\r\n show: 'app language, four-digit year',\r\n listStyles: ['short', 'medium', 'long', 'custom'],\r\n listDefault: 'medium',\r\n} as const;\r\n\r\n/** The encodings a field can declare (option.fieldData.format). */\r\nexport const DATA_FORMATS = ['iso-date', 'iso-time', 'iso-datetime', 'flag', 'decimal'] as const;\r\n/** How a date or time is shown (option.displayFormat). */\r\nexport const DISPLAY_FORMATS = ['short', 'medium', 'long', 'custom'] as const;\r\n/** How a number is shown (option.numberStyle). */\r\nexport const NUMBER_STYLES = ['decimal', 'currency', 'percent'] as const;\r\nconst setting = (key: string, label: string, kind: Setting['kind'] = 'text', values?: string[], hint?: string): Setting => ({ key, label, kind, values, hint });\r\nconst yesNo = (key: string, label: string) => setting(key, label, 'select', ['true', 'false']);\r\nexport function displaySettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const c = canonicalControl(option.control), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {}), r = rulesFor(schema, option.fieldData || {});\r\n const result = [yesNo('readonly', 'Read only'), setting('messages', 'Validation messages', 'json', undefined, 'JSON object: validation rule names mapped to messages or translation keys.')];\r\n if (PLACEHOLDER_CONTROLS.includes(c)) result.push(setting('placeholder', 'Placeholder'));\r\n if (c === 'textInput') result.push(setting('mask', 'Input mask'));\r\n if (c === 'textArea') result.push(setting('rows', 'Visible rows', 'number'));\r\n if (['spinner', 'slider'].includes(c)) result.push(setting('step', 'Step', 'number'));\r\n if (c === 'slider') result.push(yesNo('showValue', 'Show slider value'));\r\n if (['checkbox','switch'].includes(c)) result.push(setting('labelPosition', 'Label position', 'select', ['left', 'right']));\r\n if (c === 'switch') result.push(setting('labelOn', 'On label'), setting('labelOff', 'Off label'));\r\n if (['checkbox', 'switch', 'radiobutton'].includes(c) && t === 'boolean') result.push(setting('checkedBooleanValue', 'Value represented by the active state', 'select', ['true', 'false'], 'Stores a Boolean. Choose false to invert the visual state; this does not change the DTO type.'));\r\n if (['checkbox', 'switch', 'radiobutton'].includes(c) && f === 'flag') result.push(setting('checkedValue', 'Active value'), setting('uncheckedValue', 'Inactive value'));\r\n if (['radiobutton', 'dropdown', 'combobox', 'autocomplete', 'picklist', 'multiselect'].includes(c)) result.push(setting('labels', 'Value labels', 'json', undefined, 'JSON object mapping allowed stored values to captions or translation keys.'));\r\n if (c === 'radiobutton') result.push(setting('orientation', 'Orientation', 'select', ['horizontal', 'vertical']));\r\n if (c === 'combobox') result.push(yesNo('allowCustom', 'Allow values outside the list'));\r\n if (c === 'autocomplete') result.push(setting('source', 'Suggestion source URL'), setting('minChars', 'Minimum characters', 'number'));\r\n if (c === 'picklist') result.push(yesNo('sortable', 'Allow item reordering'));\r\n if (c === 'multiselect') result.push(setting('maxVisible', 'Visible selected items', 'number'));\r\n if ((['iso-date', 'iso-time', 'iso-datetime'].includes(f) && ['textInput', 'datepicker', 'timepicker', 'dateTimepicker', 'output'].includes(c)) || c === 'dateRangepicker') {\r\n result.push(setting('displayFormat', 'Display style', 'select', ['short', 'medium', 'long', 'custom']));\r\n if (option.displayFormat === 'custom') result.push(setting('customDisplayFormat', 'Fixed display pattern', 'text', undefined, 'Use only when every locale must show the same pattern.'));\r\n result.push(setting('displayTimezone', 'Display timezone', 'text', undefined, 'local, UTC, or an IANA timezone such as Asia/Karachi.'));\r\n }\r\n if ((['integer', 'number'].includes(t) || f === 'decimal') && ['textInput', 'spinner', 'slider', 'output'].includes(c)) {\r\n result.push(setting('numberStyle', 'Number style', 'select', ['decimal', 'currency', 'percent']), yesNo('grouping', 'Group digits'));\r\n if (!option.numberStyle || option.numberStyle === 'decimal') result.push(setting('decimals', 'Displayed decimal places', 'number'));\r\n result.push(setting('unit', 'Standard unit', 'text', undefined, 'An Intl unit identifier, for example kilogram or liter.'), setting('unitLabel', 'Custom unit translation key'));\r\n }\r\n if (c === 'dropdown') result.push(setting('optionlabel', 'Response label field'), setting('optionvalue', 'Response value field'));\r\n return result;\r\n}\r\nexport function dataSettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {});\r\n const result: Setting[] = [];\r\n if (['integer', 'number'].includes(t) || f === 'decimal') {\r\n result.push(setting('currency', 'Fixed currency code', 'text', undefined, 'ISO currency code. Independent of the user locale.'), setting('currencyField', 'Currency property reference'));\r\n if (t === 'integer') result.push(yesNo('minorUnits', 'Store in currency minor units'));\r\n }\r\n return result;\r\n}\r\nexport function validationSettings(schema: Bag, fallback: string, option: Bag | any): Setting[] {\r\n const t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, option.fieldData || {});\r\n const result = [setting('enum', 'Allowed values', 'json', undefined, t === 'array' ? 'JSON array of allowed item values.' : 'JSON array; preserve each value’s data type.')];\r\n if (t === 'string') result.push(setting('minLength', 'Minimum length', 'number'), setting('maxLength', 'Maximum length', 'number'), setting('pattern', 'Validation pattern'));\r\n if (['integer', 'number'].includes(t) || f === 'decimal') result.push(setting('minimum', 'Minimum value', f === 'decimal' ? 'text' : 'number'), setting('maximum', 'Maximum value', f === 'decimal' ? 'text' : 'number'), setting('multipleOf', 'Value increment', f === 'decimal' ? 'text' : 'number'));\r\n if (t === 'array') result.push(setting('minItems', 'Minimum items', 'number'), setting('maxItems', 'Maximum items', 'number'), yesNo('uniqueItems', 'Require unique items'));\r\n return result;\r\n}\r\nfunction decimalParts(value: any): [bigint, number] | null {\r\n const m = /^(-?)(\\d+)(?:\\.(\\d+))?$/.exec(String(value));\r\n return m ? [BigInt((m[1] || '') + m[2] + (m[3] || '')), (m[3] || '').length] : null;\r\n}\r\nfunction decimalPair(a: any, b: any): [bigint, bigint] | null {\r\n const x = decimalParts(a), y = decimalParts(b); if (!x || !y) return null;\r\n const scale = Math.max(x[1], y[1]); return [x[0] * 10n ** BigInt(scale - x[1]), y[0] * 10n ** BigInt(scale - y[1])];\r\n}\r\nfunction validDate(v: string): boolean {\r\n const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(v); if (!m) return false;\r\n const year = +m[1], month = +m[2], day = +m[3];\r\n const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\r\n return month >= 1 && month <= 12 && day >= 1 && day <= [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];\r\n}\r\nfunction validTime(v: string): boolean {\r\n const m = /^(\\d{2}):(\\d{2}):(\\d{2})(?:\\.\\d+)?(Z|[+-](\\d{2}):(\\d{2}))$/.exec(v);\r\n return !!m && +m[1] < 24 && +m[2] < 60 && +m[3] < 60 && (!m[5] || (+m[5] < 24 && +m[6] < 60));\r\n}\r\nexport function validateSettings(schema: Bag | any, fallback: string, option: Bag | any, context?: { propertySchema: Bag; reference: string; allowPendingValues?: boolean }): string[] {\r\n const errors: string[] = [], d = option.fieldData || {}, r: any = rulesFor(schema, d), t = baseType(schema, fallback), f = effectiveFormat(schema, fallback, d), c = canonicalControl(option.control);\r\n const fail = (condition: boolean, message: string) => { if (condition) errors.push(message); };\r\n fail(!t, 'The property type could not be resolved. Provide propertySchema or propertyType.');\r\n fail(d.format !== undefined && !['iso-date', 'iso-time', 'iso-datetime', 'flag', 'decimal'].includes(d.format), 'Choose a supported data meaning.');\r\n fail(['iso-date', 'iso-time', 'iso-datetime', 'flag'].includes(f) && t !== 'string', 'Date, time, and flag formats require a string property.');\r\n fail(f === 'decimal' && !['string', 'number'].includes(t), 'Exact decimal format requires string or number.');\r\n fail(!!schema.format && !!d.format && normalizeFormat(schema.format) !== normalizeFormat(d.format), 'The format conflicts with the property schema.');\r\n for (const k of Object.keys(d.validation || {})) {\r\n const source = t === 'array' && k === 'enum' ? schema.items?.enum : schema[k];\r\n fail(source !== undefined && JSON.stringify(source) !== JSON.stringify(d.validation[k]), `${k} conflicts with the property schema; keep the source constraint.`);\r\n }\r\n const pendingDropdown = context?.allowPendingValues && c === 'dropdown' && t === 'string' && !f && r.enum === undefined;\r\n fail(!pendingDropdown && !controlsFor(schema, fallback, option).some(x => x.value === c), 'Select a control compatible with the effective data type.');\r\n fail(!!r.pattern && t !== 'string', 'Patterns are only supported for strings.');\r\n try { if (r.pattern) new RegExp(r.pattern); } catch { errors.push('The validation pattern is not a valid regular expression.'); }\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) fail(r[k] !== undefined && !(['integer', 'number'].includes(t) || f === 'decimal'), `${k} requires a numeric or decimal property.`);\r\n for (const k of ['minLength', 'maxLength']) fail(r[k] !== undefined && t !== 'string', `${k} requires a string property.`);\r\n for (const k of ['minItems', 'maxItems', 'uniqueItems']) fail(r[k] !== undefined && t !== 'array', `${k} requires an array property.`);\r\n for (const k of ['minLength', 'maxLength', 'minItems', 'maxItems']) fail(r[k] !== undefined && (!Number.isInteger(r[k]) || r[k] < 0), `${k} must be a nonnegative integer.`);\r\n for (const [a, b] of [['minLength', 'maxLength'], ['minItems', 'maxItems']]) fail(r[a] !== undefined && r[b] !== undefined && r[a] > r[b], `${a} cannot exceed ${b}.`);\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) if (r[k] !== undefined) fail(f === 'decimal' ? !decimalParts(r[k]) : typeof r[k] !== 'number' || !Number.isFinite(r[k]), `${k} must be a valid numeric value.`);\r\n if (r.minimum !== undefined && r.maximum !== undefined) { const pair = decimalPair(r.minimum, r.maximum); fail(pair ? pair[0] > pair[1] : r.minimum > r.maximum, 'Minimum cannot exceed maximum.'); }\r\n if (r.multipleOf !== undefined) { const p = decimalParts(r.multipleOf); fail(!p || p[0] <= 0n, 'Value increment must be greater than zero.'); }\r\n if (r.enum !== undefined) {\r\n fail(!Array.isArray(r.enum) || !r.enum.length, 'Allowed values must be a nonempty JSON array.');\r\n if (Array.isArray(r.enum)) {\r\n fail(new Set(r.enum.map((v: any) => JSON.stringify(v))).size !== r.enum.length, 'Allowed values must not contain duplicates.');\r\n const et = t === 'array' ? schema.items?.type || 'string' : t;\r\n fail(r.enum.some((v: any) => et === 'integer' ? !Number.isInteger(v) : et === 'array' ? !Array.isArray(v) : typeof v !== et), 'Allowed values must match the property or item type.');\r\n }\r\n }\r\n fail(c === 'combobox' && !!r.enum && option.allowCustom === true, 'Custom values cannot be enabled for an enum.');\r\n fail(!!d.currency && !!d.currencyField, 'Choose a fixed currency OR a currency property, not both.');\r\n fail(option.numberStyle === 'currency' && !d.currency && !d.currencyField, 'Currency display requires a currency code or currency property.');\r\n fail(d.minorUnits === true && (t !== 'integer' || (!d.currency && !d.currencyField)), 'Minor units require integer storage and a currency.');\r\n fail(option.numberStyle !== 'decimal' && !!option.numberStyle && option.decimals !== undefined, 'Decimal places apply only to decimal display; currency precision comes from the currency.');\r\n fail(!!option.unit && !!option.unitLabel, 'Choose a standard unit OR a custom unit translation key.');\r\n if (d.currency) {\r\n const currencies: string[] | undefined = (Intl as any).supportedValuesOf?.('currency');\r\n fail(!/^[A-Z]{3}$/.test(d.currency) || (!!currencies && !currencies.includes(d.currency)), 'Choose a supported uppercase ISO currency code.');\r\n }\r\n if (d.currencyField && context?.propertySchema) {\r\n const siblingRef = context.reference.slice(0, context.reference.lastIndexOf('/') + 1) + String(d.currencyField).replace(/~/g, '~0').replace(/\\//g, '~1');\r\n const currencyProperty: any = resolveProperty(context.propertySchema, String(d.currencyField).includes('/') ? d.currencyField : siblingRef);\r\n fail(currencyProperty.type !== 'string', 'The currency property must exist in the property schema and have string storage.');\r\n }\r\n fail(option.checkedBooleanValue !== undefined && typeof option.checkedBooleanValue !== 'boolean', 'The active Boolean value must be true or false.');\r\n for (const k of ['required', 'readonly', 'allowCustom', 'showValue', 'grouping']) fail(option[k] !== undefined && typeof option[k] !== 'boolean', `${k} must be a Boolean.`);\r\n for (const k of ['minorUnits']) fail(d[k] !== undefined && typeof d[k] !== 'boolean', `${k} must be a Boolean.`);\r\n fail(r.uniqueItems !== undefined && typeof r.uniqueItems !== 'boolean', 'uniqueItems must be a Boolean.');\r\n if (option.unit) { try { new Intl.NumberFormat('en', { style: 'unit', unit: option.unit }); } catch { errors.push('The standard unit is not supported by Intl.'); } }\r\n if (option.displayTimezone && option.displayTimezone !== 'local') { try { new Intl.DateTimeFormat('en', { timeZone: option.displayTimezone }); } catch { errors.push('Enter a valid display timezone.'); } }\r\n fail(option.displayFormat === 'custom' && !option.customDisplayFormat, 'Enter a fixed display pattern.');\r\n for (const k of ['rows', 'maxVisible', 'step']) fail(option[k] !== undefined && (typeof option[k] !== 'number' || !Number.isFinite(option[k]) || option[k] <= 0), `${k} must be greater than zero.`);\r\n for (const k of ['rows', 'maxVisible', 'minChars', 'decimals']) fail(option[k] !== undefined && (!Number.isInteger(option[k]) || option[k] < 0), `${k} must be a nonnegative integer.`);\r\n fail(t === 'integer' && option.step !== undefined && !Number.isInteger(option.step), 'Integer controls require a whole-number step.');\r\n if (f === 'flag') {\r\n fail(!Array.isArray(r.enum) || r.enum.length !== 2, 'A flag requires exactly two allowed string values.');\r\n fail(option.checkedValue === undefined || option.uncheckedValue === undefined || option.checkedValue === option.uncheckedValue, 'Set different active and inactive flag values.');\r\n if (Array.isArray(r.enum)) for (const k of ['checkedValue', 'uncheckedValue']) fail(!r.enum.includes(option[k]), `${k} must exist in the allowed values.`);\r\n }\r\n if (option.labels !== undefined) {\r\n fail(!option.labels || typeof option.labels !== 'object' || Array.isArray(option.labels), 'Value labels must be a JSON object.');\r\n if (option.labels && typeof option.labels === 'object') fail(Object.values(option.labels).some(v => typeof v !== 'string'), 'Label captions must be strings.');\r\n const values = t === 'boolean' ? [true, false] : r.enum;\r\n if (values && option.labels) fail(Object.keys(option.labels).some(k => !values.some((v: any) => String(v) === k)), 'Every label key must match an allowed value.');\r\n }\r\n if (option.messages && typeof option.messages === 'object') fail(Object.values(option.messages).some(v => typeof v !== 'string'), 'Validation messages must contain string captions or translation keys.');\r\n for (const [key, values] of [['labelPosition', ['left', 'right']], ['orientation', ['horizontal', 'vertical']], ['numberStyle', ['decimal', 'currency', 'percent']]] as [string, string[]][]) fail(option[key] !== undefined && !values.includes(option[key]), `Choose a supported ${key}.`);\r\n fail(option.messages !== undefined && (!option.messages || typeof option.messages !== 'object' || Array.isArray(option.messages)), 'Validation messages must be a JSON object.');\r\n const allowed = new Set(displaySettings(schema, fallback, option).map(s => s.key));\r\n for (const k of ['placeholder', 'rows', 'mask', 'step', 'showValue', 'labelPosition', 'labelOn', 'labelOff', 'orientation', 'allowCustom', 'source', 'minChars', 'labels', 'maxVisible', 'displayFormat', 'displayTimezone', 'customDisplayFormat', 'numberStyle', 'decimals', 'grouping', 'unit', 'unitLabel', 'checkedValue', 'uncheckedValue', 'checkedBooleanValue']) fail(option[k] !== undefined && !allowed.has(k), `${k} is not applicable to this control and data meaning.`);\r\n for (const k of ['currency', 'currencyField', 'minorUnits']) fail(d[k] !== undefined && !dataSettings(schema, fallback, option).some(s => s.key === k), `${k} requires the appropriate numeric type.`);\r\n const validateValue = (value: any, name: string, valueType: string, item = false) => {\r\n fail(valueType === 'integer' ? !Number.isInteger(value) : valueType === 'array' ? !Array.isArray(value) : typeof value !== valueType, `${name} must match ${valueType} storage.`);\r\n if (Array.isArray(r.enum) && !r.enum.some((v: any) => JSON.stringify(v) === JSON.stringify(value))) fail(valueType !== 'array', `${name} is outside the allowed values.`);\r\n if (valueType === 'string') {\r\n const v = String(value);\r\n if (!item) {\r\n fail(f === 'iso-date' && !validDate(v), `${name} must be an existing ISO date.`);\r\n fail(f === 'iso-time' && !validTime(v), `${name} must be an ISO time with timezone.`);\r\n const parts = v.split('T');\r\n fail(f === 'iso-datetime' && (parts.length !== 2 || !validDate(parts[0]) || !validTime(parts[1])), `${name} must be an ISO date and time with timezone.`);\r\n fail(r.minLength !== undefined && [...v].length < r.minLength, `${name} is too short.`);\r\n fail(r.maxLength !== undefined && [...v].length > r.maxLength, `${name} is too long.`);\r\n try { if (r.pattern) fail(!new RegExp(r.pattern).test(v), `${name} does not match the pattern.`); } catch { }\r\n }\r\n }\r\n if (!item && (['integer', 'number'].includes(valueType) || f === 'decimal')) {\r\n fail(valueType !== 'string' && !Number.isFinite(value), `${name} must be finite.`);\r\n fail(f === 'decimal' && !decimalParts(value), `${name} must be a plain decimal value.`);\r\n for (const k of ['minimum', 'maximum', 'multipleOf']) if (r[k] !== undefined) { const p = decimalPair(value, r[k]); if (p) fail(k === 'minimum' ? p[0] < p[1] : k === 'maximum' ? p[0] > p[1] : p[1] !== 0n && p[0] % p[1] !== 0n, `${name} violates ${k}.`); }\r\n }\r\n if (valueType === 'array' && Array.isArray(value)) {\r\n fail(r.minItems !== undefined && value.length < r.minItems, `${name} has too few items.`);\r\n fail(r.maxItems !== undefined && value.length > r.maxItems, `${name} has too many items.`);\r\n fail(r.uniqueItems === true && new Set(value.map(v => JSON.stringify(v))).size !== value.length, `${name} contains duplicate items.`);\r\n value.forEach(v => validateValue(v, `${name} item`, schema.items?.type || 'string', true));\r\n }\r\n };\r\n if (option.keyboardType !== undefined) {\r\n fail(![...KEYBOARD_TYPES, ...SYSTEM_KEYBOARDS].includes(option.keyboardType), 'Choose a supported keyboard.');\r\n fail(!!c && !KEYBOARD_CONTROLS.includes(c), 'This control has no keyboard.');\r\n }\r\n if (own(d, 'default') && own(schema, 'default')) fail(JSON.stringify(d.default) !== JSON.stringify(schema.default), 'Default conflicts with the property schema.');\r\n const defaultValue = own(schema, 'default') ? schema.default : d.default;\r\n if (own(schema, 'default') || own(d, 'default')) validateValue(defaultValue, 'Default value', t);\r\n return [...new Set(errors)];\r\n}\r\n\r\n/** Call before activating a saved field layout; throws rather than warning. */\r\nexport function assertFieldSettings(schema: Bag, fallback: string, option: Bag, context?: { propertySchema: Bag; reference: string; allowPendingValues?: boolean }): void {\r\n const errors = validateSettings(schema, fallback, option, context);\r\n if (errors.length) throw new Error('Invalid field layout: ' + errors.join(' '));\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-19\r\n// - new: the format of an app's test flows (#166). Every app brings its own test suite in its hidden\r\n// system folder .liveforge/tests/ - one JSON file per flow. The same steps are run by the test\r\n// runner inside the app (Designer preview, \"Run tests\") and by viewdefinition-e2e on simulators.\r\n// Pages and fields are named by their name in the project (page folder, field key), never by a\r\n// caption - a test runs in every language. Buttons by their action (Save, Add, Delete).\r\n// A flow that writes real data says so (\"books\": true) and only runs after an explicit confirmation.\r\n// checkTestFlow returns codes with parameters, the editor translates them.\r\n// - new: a run can be stopped (FlowResult.stopped, TestRun.stopped)\r\n// - new: expect blocked - a writing button is there and the flow may not press it\r\n\r\nexport const TESTS_DIR = '.liveforge/tests';\r\nexport const RESULTS_DIR = '.liveforge/results';\r\n\r\nexport const TEST_DEVICES = ['phone', 'tablet', 'laptop', 'desktop'] as const;\r\nexport const ORIENTATIONS = ['portrait', 'landscape'] as const;\r\nexport const STEP_KINDS = ['open', 'tap', 'type', 'pick', 'press', 'rotate', 'device', 'wait', 'expect'] as const;\r\n/** What an expect step can check - one of them per step. */\r\nexport const EXPECT_KINDS = ['value', 'shows', 'keyboard', 'list', 'message', 'visible', 'hidden', 'locked', 'blocked', 'inFrame'] as const;\r\n/** What has to stay inside the page frame (safe areas, top gap). */\r\nexport const FRAME_PARTS = ['keyboard', 'dialog', 'calendar', 'list', 'menu'] as const;\r\nexport const LIST_STATES = ['open', 'closed'] as const;\r\n\r\nexport type TestDevice = typeof TEST_DEVICES[number];\r\nexport type Orientation = typeof ORIENTATIONS[number];\r\n\r\nexport interface TestExpect {\r\n field?: string;\r\n /** stored value of the field */\r\n value?: unknown;\r\n /** text the field shows (formatted: \"12,34 €\", \"01:00 PM\") */\r\n shows?: string;\r\n /** keyboard type that is open (string, alpha, numeric, email, date, time) or \"none\" */\r\n keyboard?: string;\r\n list?: typeof LIST_STATES[number];\r\n /** message key of a check (required, minLength, dateOrder …) */\r\n message?: string;\r\n visible?: string;\r\n hidden?: string;\r\n locked?: string;\r\n /** a button that writes real data is there and this flow may not press it (the runner's lock) */\r\n blocked?: string;\r\n inFrame?: typeof FRAME_PARTS[number];\r\n}\r\n\r\nexport interface TestStep {\r\n open?: string;\r\n tap?: string;\r\n type?: string;\r\n into?: string;\r\n pick?: string;\r\n in?: string;\r\n press?: string;\r\n rotate?: Orientation;\r\n device?: string;\r\n /** milliseconds */\r\n wait?: number;\r\n expect?: TestExpect;\r\n}\r\n\r\nexport interface TestFlow {\r\n name: string;\r\n description?: string;\r\n /** writes real data - runs only after an explicit confirmation */\r\n books?: boolean;\r\n /** \"phone\", \"tablet:landscape\" … - without orientation portrait; none means phone and tablet */\r\n devices?: string[];\r\n steps: TestStep[];\r\n}\r\n\r\nexport interface TestProblem {\r\n code: string;\r\n step?: number;\r\n params?: Record<string, string>;\r\n}\r\n\r\n/** One step's outcome in a run. image: screenshot of a failed step (data URL or file in results). */\r\nexport interface StepResult {\r\n step: number;\r\n ok: boolean;\r\n reason?: string;\r\n image?: string;\r\n}\r\n\r\nexport interface FlowResult {\r\n file: string;\r\n name: string;\r\n device: string;\r\n ok: boolean;\r\n skipped?: 'books';\r\n /** stopped by the person (\"Stop\") after this flow's last step in steps */\r\n stopped?: boolean;\r\n steps: StepResult[];\r\n}\r\n\r\n/** One run, stored as .liveforge/results/<date-time>.json (the backend keeps the latest runs). */\r\nexport interface TestRun {\r\n project: string;\r\n tenant: string;\r\n startedAt: string;\r\n finishedAt?: string;\r\n /** the person stopped the run - flows after it did not run */\r\n stopped?: boolean;\r\n flows: FlowResult[];\r\n}\r\n\r\nexport const DEFAULT_DEVICES = ['phone', 'tablet'];\r\n\r\n/**\r\n * How many runs the backend keeps in .liveforge/results - defaults, the project configuration can\r\n * change them: at most `max` runs; while they together are bigger than `maxBytes` (mostly images of\r\n * failed steps) the oldest go, but `min` runs always stay. Results are not exported.\r\n */\r\nexport const RESULTS_KEEP = { max: 10, min: 5, maxBytes: 20 * 1024 * 1024 };\r\n\r\n/** The runs to delete, oldest first; runs: name (sortable by date-time) and size in bytes. */\r\nexport function resultsToDelete(runs: { name: string; size: number }[], keep = RESULTS_KEEP): string[] {\r\n const sorted = [...runs].sort((a, b) => a.name.localeCompare(b.name));\r\n const gone: string[] = [];\r\n let total = sorted.reduce((sum, r) => sum + r.size, 0);\r\n while (sorted.length > keep.min && (sorted.length > keep.max || total > keep.maxBytes)) {\r\n const old = sorted.shift()!;\r\n total -= old.size;\r\n gone.push(old.name);\r\n }\r\n return gone;\r\n}\r\n\r\n/** \"tablet:landscape\" → { device: 'tablet', orientation: 'landscape' }; null when unknown. */\r\nexport function parseDevice(text: string): { device: TestDevice; orientation: Orientation } | null {\r\n const [device, orientation = 'portrait'] = String(text || '').split(':');\r\n if (!(TEST_DEVICES as readonly string[]).includes(device)) return null;\r\n if (!(ORIENTATIONS as readonly string[]).includes(orientation)) return null;\r\n return { device: device as TestDevice, orientation: orientation as Orientation };\r\n}\r\n\r\n/** The devices a flow runs on. */\r\nexport function flowDevices(flow: TestFlow): string[] {\r\n return flow.devices?.length ? flow.devices : DEFAULT_DEVICES;\r\n}\r\n\r\n/** The kind of a step - the first step key it has. */\r\nexport function stepKind(step: TestStep): string | null {\r\n return (STEP_KINDS as readonly string[]).find((k) => step && Object.prototype.hasOwnProperty.call(step, k)) || null;\r\n}\r\n\r\nconst text = (v: unknown) => typeof v === 'string' && v.trim().length > 0;\r\n\r\n/** The problems of a flow; an empty list means it can run. */\r\nexport function checkTestFlow(flow: any): TestProblem[] {\r\n const problems: TestProblem[] = [];\r\n const add = (code: string, step?: number, params?: Record<string, string>) => problems.push({ code, step, params });\r\n if (!flow || typeof flow !== 'object' || Array.isArray(flow)) return [{ code: 'notAnObject' }];\r\n if (!text(flow.name)) add('nameMissing');\r\n if (flow.books !== undefined && typeof flow.books !== 'boolean') add('booksNotBoolean');\r\n if (flow.devices !== undefined) {\r\n if (!Array.isArray(flow.devices)) add('devicesNotList');\r\n else flow.devices.filter((d: string) => !parseDevice(d)).forEach((d: string) => add('unknownDevice', undefined, { device: String(d) }));\r\n }\r\n if (!Array.isArray(flow.steps) || !flow.steps.length) {\r\n add('stepsMissing');\r\n return problems;\r\n }\r\n flow.steps.forEach((step: any, i: number) => {\r\n const n = i + 1;\r\n if (!step || typeof step !== 'object' || Array.isArray(step)) { add('stepNotAnObject', n); return; }\r\n const kinds = (STEP_KINDS as readonly string[]).filter((k) => k in step);\r\n if (kinds.length !== 1) { add(kinds.length ? 'stepSeveralKinds' : 'stepUnknown', n, { keys: Object.keys(step).join(', ') }); return; }\r\n const kind = kinds[0];\r\n switch (kind) {\r\n case 'open': case 'tap': case 'press':\r\n if (!text(step[kind])) add('stepNameMissing', n, { kind });\r\n break;\r\n case 'type':\r\n if (typeof step.type !== 'string') add('typeNotText', n);\r\n if (!text(step.into)) add('intoMissing', n);\r\n break;\r\n case 'pick':\r\n if (!text(step.pick)) add('stepNameMissing', n, { kind });\r\n if (!text(step.in)) add('inMissing', n);\r\n break;\r\n case 'rotate':\r\n if (!(ORIENTATIONS as readonly string[]).includes(step.rotate)) add('unknownOrientation', n, { orientation: String(step.rotate) });\r\n break;\r\n case 'device':\r\n if (!parseDevice(step.device)) add('unknownDevice', n, { device: String(step.device) });\r\n break;\r\n case 'wait':\r\n if (typeof step.wait !== 'number' || step.wait < 0 || step.wait > 60000) add('waitOutOfRange', n);\r\n break;\r\n case 'expect':\r\n checkExpect(step.expect, n, add);\r\n break;\r\n }\r\n });\r\n return problems;\r\n}\r\n\r\nfunction checkExpect(e: any, n: number, add: (code: string, step?: number, params?: Record<string, string>) => void) {\r\n if (!e || typeof e !== 'object' || Array.isArray(e)) { add('expectNotAnObject', n); return; }\r\n const kinds = (EXPECT_KINDS as readonly string[]).filter((k) => k in e);\r\n if (kinds.length !== 1) { add(kinds.length ? 'expectSeveralKinds' : 'expectUnknown', n, { keys: Object.keys(e).join(', ') }); return; }\r\n const kind = kinds[0];\r\n if ((kind === 'value' || kind === 'shows') && !text(e.field)) add('fieldMissing', n, { kind });\r\n if (kind === 'shows' && typeof e.shows !== 'string') add('showsNotText', n);\r\n if (kind === 'keyboard' && !text(e.keyboard)) add('keyboardMissing', n);\r\n if (kind === 'list' && !(LIST_STATES as readonly string[]).includes(e.list)) add('unknownListState', n, { list: String(e.list) });\r\n if (kind === 'message' && !text(e.message)) add('messageMissing', n);\r\n if ((kind === 'visible' || kind === 'hidden' || kind === 'locked' || kind === 'blocked') && !text(e[kind])) add('stepNameMissing', n, { kind });\r\n if (kind === 'inFrame' && !(FRAME_PARTS as readonly string[]).includes(e.inFrame)) add('unknownFramePart', n, { part: String(e.inFrame) });\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-23\r\n// - new: start page, roles and storage of the sign-in (OFFENE-PUNKTE 109): the start page is center.option\r\n// and holds for every sign-in setting; a role may have its own start page (login.roles, in the\r\n// Designer's order), without one - or an unknown role - the general start page holds. roleKey says where\r\n// the role stands: a field of the sign-in answer (JWT) or a claim of the token (Keycloak\r\n// \"realm_access.roles\", Okta \"groups\"); several roles: the first role in login.roles that the user has.\r\n// loginPage is the page before the sign-in (hotel: the sign-in form), no role. storage: localStorage\r\n// (stay signed in) or sessionStorage (signed out when the app closes). login written as a plain string\r\n// ('optional', the first form) is still read.\r\n// - new: pagination for the whole app with the page overriding single values (decision 2026-10-23):\r\n// placement (top | bottom), align (left | center | right | split), defaultPageSize, pageSizeOptions,\r\n// pageSize (offer the size choice). paginationFor(main, page): page, then Main, then the default; the old\r\n// page keys top / bottom / position are read until the apps are converted\r\n// - new: startPage, startPageFor, rolesOf, paginationFor\r\n// - change: a language entry has no icon (flag is not registered in the app, and a flag is no language)\r\n// - new: appSettings.menu (decision 2026-10-24, \"variant 3\"): the setting entries stay automatic, but Main\r\n// decides the folder's caption (menu.caption, default \"Setting\", a text of the app) and every entry's order\r\n// and on/off (menu.entries, MENU_ENTRY_KINDS), and an entry's own caption instead of its fixed text; on/off\r\n// only for Home, Languages, Project Version - Login, Pagination Type and Terms are decided in their own\r\n// building block (MENU_SWITCHABLE, MENU_DECIDED_BY: one place per decision);\r\n// appSettingsMenu follows it\r\n// - new: appSettingsMenu - the entries the library adds to the side menu by itself (OFFENE-PUNKTE 106/108):\r\n// Home, Project Version, Languages (more than one), Login (sign-in at any time, not signed in), Pagination\r\n// Type (the user may choose), Terms & Conditions (switched on) - into the top-level folder \"Setting\", or a\r\n// folder \"Setting\" at the end. Captions are the English keys the language files translate\r\n// - new: pagination.caption, the label beside the size choice, for the whole app and per page (the page's own wins)\r\n// - change: the default type of a list is scroll (decision of the user 2026-10-23)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-23\r\n// - new: the app settings catalog - the ONE place that says which app-wide settings an app has, which\r\n// values they take, their defaults and where they stand in the Main layout (main/layout_schema.json),\r\n// like the field catalog for the fields (#166, OFFENE-PUNKTE 106/108). The Designer (Main: Login,\r\n// Pagination, Terms & Conditions), the runtime and the AI contract (capabilities.json, validator) are to\r\n// read it from here instead of keeping their own copies. No Angular, no texts - the Designer keeps its\r\n// texts under these keys.\r\n// Taken over from the Designer's app-settings.store.ts (shuaib 56615e0 / 4627a44):\r\n// - center.appSettings: login, pagination, terms\r\n// - the sign-in method comes from the Configuration (environment.login.type) and writes its flag into\r\n// center.option (keycloakLogin / oktaLogin / jwtLogin) when the sign-in is required at the start\r\n// It only describes, reads and checks; nothing renders from it yet.\r\n\r\nimport type { Bag } from './field-catalog';\r\n\r\n/** The building blocks of the app settings in Main, in the order they are shown. */\r\nexport const APP_SETTING_BLOCKS = ['startPage', 'login', 'pagination', 'terms', 'menu'] as const;\r\n\r\n/** The entries the library may add to the side menu, in their default order (appSettings.menu.entries). */\r\nexport const MENU_ENTRY_KINDS = ['home', 'languages', 'login', 'paginationType', 'terms', 'projectVersion'] as const;\r\nexport type MenuEntryKind = typeof MENU_ENTRY_KINDS[number];\r\n/**\r\n * The entries Main switches on or off in the menu settings. The others are decided where they belong - one\r\n * place per decision: Login by login.when (at any time), Pagination Type by pagination.userChoice, Terms &\r\n * Conditions by terms.enabled; their \"on\" in menu.entries is not read.\r\n */\r\nexport const MENU_SWITCHABLE: readonly MenuEntryKind[] = ['home', 'languages', 'projectVersion'];\r\n/** Where the other entries are decided: the building block of the app settings. */\r\nexport const MENU_DECIDED_BY: Partial<Record<MenuEntryKind, AppSettingBlock>> = { login: 'login', paginationType: 'pagination', terms: 'terms' };\r\nexport type AppSettingBlock = typeof APP_SETTING_BLOCKS[number];\r\n\r\n/** When the user signs in: never, at any time (menu entry), required at the start. */\r\nexport const LOGIN_WHEN = ['none', 'optional', 'start'] as const;\r\nexport type LoginWhen = typeof LOGIN_WHEN[number];\r\n\r\n/** Where the sign-in answer is kept: stay signed in, or signed out when the app closes. */\r\nexport const LOGIN_STORAGES = ['localStorage', 'sessionStorage'] as const;\r\nexport type LoginStorage = typeof LOGIN_STORAGES[number];\r\n\r\n/** The sign-in methods of the Configuration (environment.login.type) and the flag each writes into center.option. */\r\nexport const LOGIN_METHODS: Record<string, { method: 'keycloak' | 'okta' | 'jwt'; flag: string }> = {\r\n keycloak: { method: 'keycloak', flag: 'keycloakLogin' },\r\n oktaAuth: { method: 'okta', flag: 'oktaLogin' },\r\n jwtToken: { method: 'jwt', flag: 'jwtLogin' },\r\n};\r\n\r\n/** All flags a sign-in at the start may set in center.option. */\r\nexport const LOGIN_FLAGS: string[] = Object.values(LOGIN_METHODS).map(m => m.flag);\r\n\r\n/** The keys of center.option that describe a page (the start page, a role's page, the page before the sign-in). */\r\nexport const START_PAGE_KEYS = [\r\n 'action', 'visible', 'layout_url', 'property_url', 'data_url', 'dataKey', 'storageType',\r\n 'protected', 'setImageUrl', 'passToken', 'form', 'card', 'grid', 'modal',\r\n] as const;\r\n\r\n/** How a list pages: page by page with a bar, or loading the next page while scrolling. */\r\nexport const PAGINATION_TYPES = ['numbered', 'scroll'] as const;\r\nexport type PaginationType = typeof PAGINATION_TYPES[number];\r\n/** Where the page bar stands and how it is aligned. */\r\nexport const PAGINATION_PLACEMENTS = ['top', 'bottom'] as const;\r\nexport const PAGINATION_ALIGNS = ['left', 'center', 'right', 'split'] as const;\r\nexport type PaginationPlacement = typeof PAGINATION_PLACEMENTS[number];\r\nexport type PaginationAlign = typeof PAGINATION_ALIGNS[number];\r\n\r\n/** The documents of Terms & Conditions and how each is given: written text, a link, a PDF. */\r\nexport const TERMS_DOCUMENTS = ['imprint', 'privacy', 'agb'] as const;\r\nexport type TermsDocument = typeof TERMS_DOCUMENTS[number];\r\nexport const DOCUMENT_KINDS = ['text', 'link', 'pdf'] as const;\r\nexport type DocumentKind = typeof DOCUMENT_KINDS[number];\r\n\r\n/** Where the app settings stand in main/layout_schema.json; the start page is center.option. */\r\nexport const APP_SETTINGS_PATH = 'center.appSettings';\r\nexport const START_PAGE_PATH = 'center.option';\r\n\r\nexport interface AppSettingDef {\r\n /** the building block the setting belongs to */\r\n block: AppSettingBlock;\r\n /** its place inside center.appSettings, dotted */\r\n key: string;\r\n kind: 'choice' | 'flag' | 'text' | 'number' | 'numbers' | 'pages' | 'page' | 'documents' | 'entries';\r\n values?: readonly string[];\r\n default: any;\r\n}\r\n\r\n/** Every app setting, with its values and default. The start page itself is center.option (START_PAGE_KEYS). */\r\nexport const APP_SETTINGS: AppSettingDef[] = [\r\n { block: 'login', key: 'login.when', kind: 'choice', values: LOGIN_WHEN, default: 'none' },\r\n { block: 'login', key: 'login.storage', kind: 'choice', values: LOGIN_STORAGES, default: 'localStorage' },\r\n { block: 'login', key: 'login.roleKey', kind: 'text', default: '' },\r\n { block: 'login', key: 'login.roles', kind: 'pages', default: {} },\r\n { block: 'login', key: 'login.loginPage', kind: 'page', default: null },\r\n // scroll: the user's decision 2026-10-23 for every app\r\n { block: 'pagination', key: 'pagination.default', kind: 'choice', values: PAGINATION_TYPES, default: 'scroll' },\r\n { block: 'pagination', key: 'pagination.userChoice', kind: 'flag', default: false },\r\n { block: 'pagination', key: 'pagination.placement', kind: 'choice', values: PAGINATION_PLACEMENTS, default: 'bottom' },\r\n { block: 'pagination', key: 'pagination.align', kind: 'choice', values: PAGINATION_ALIGNS, default: 'center' },\r\n // the sizes the reference apps use (luv2shop, tm-test)\r\n { block: 'pagination', key: 'pagination.defaultPageSize', kind: 'number', default: 5 },\r\n { block: 'pagination', key: 'pagination.pageSizeOptions', kind: 'numbers', default: [5, 10, 15, 20] },\r\n { block: 'pagination', key: 'pagination.pageSize', kind: 'flag', default: true },\r\n // the label beside the size choice (\"Page Size\") - a text of the app, translated in the language editor\r\n { block: 'pagination', key: 'pagination.caption', kind: 'text', default: '' },\r\n { block: 'terms', key: 'terms.enabled', kind: 'flag', default: false },\r\n { block: 'terms', key: 'terms.confirmOnStart', kind: 'flag', default: false },\r\n { block: 'terms', key: 'terms.documents', kind: 'documents', values: TERMS_DOCUMENTS, default: {} },\r\n // the state of the terms - a new one asks everybody again (without a backend this one counts)\r\n { block: 'terms', key: 'terms.version', kind: 'text', default: '' },\r\n // keep the acceptance in the app's backend too (after the sign-in): ask for the state, send an acceptance\r\n { block: 'terms', key: 'terms.backend.enabled', kind: 'flag', default: false },\r\n { block: 'terms', key: 'terms.backend.statusUrl', kind: 'text', default: '' },\r\n { block: 'terms', key: 'terms.backend.acceptUrl', kind: 'text', default: '' },\r\n // the folder of the entries the library adds - its caption is a text of the app like any caption\r\n { block: 'menu', key: 'menu.caption', kind: 'text', default: 'Setting' },\r\n { block: 'menu', key: 'menu.entries', kind: 'entries', values: MENU_ENTRY_KINDS, default: MENU_ENTRY_KINDS.map(kind => ({ kind, on: true, caption: '' })) },\r\n];\r\n\r\nconst defaultOf = (key: string) => APP_SETTINGS.find(s => s.key === key)?.default;\r\n\r\nexport interface Pagination {\r\n default: PaginationType;\r\n userChoice: boolean;\r\n placement: PaginationPlacement;\r\n align: PaginationAlign;\r\n defaultPageSize: number;\r\n pageSizeOptions: number[];\r\n pageSize: boolean;\r\n caption: string;\r\n}\r\n\r\nexport interface AppSettings {\r\n login: {\r\n when: LoginWhen;\r\n storage: LoginStorage;\r\n roleKey: string;\r\n /** role -> its own start page, in the Designer's order */\r\n roles: Record<string, Bag>;\r\n loginPage: Bag | null;\r\n };\r\n pagination: Pagination;\r\n terms: {\r\n enabled: boolean;\r\n /** confirmed before anything else - before the sign-in */\r\n confirmOnStart: boolean;\r\n documents: Partial<Record<TermsDocument, { kind: DocumentKind; value: string }>>;\r\n /** the state of the terms ('' = the texts themselves decide) */\r\n version: string;\r\n /** the app's backend keeps the acceptance: GET statusUrl -> { version, accepted }, POST acceptUrl */\r\n backend: { enabled: boolean; statusUrl: string; acceptUrl: string };\r\n };\r\n /** The setting entries: the folder's caption and every kind in the Designer's order, each on or off. */\r\n menu: { caption: string; entries: { kind: MenuEntryKind; on: boolean; caption: string }[] };\r\n}\r\n\r\nconst isIn = <T extends string>(list: readonly T[], value: any): value is T => list.includes(value);\r\n// a plain check, no type guard: the values stay `any`, so the library's noPropertyAccessFromIndexSignature\r\n// does not demand ['key'] for every setting read\r\nconst isObject = (value: any): boolean => !!value && typeof value === 'object' && !Array.isArray(value);\r\nconst isSize = (value: any) => Number.isInteger(value) && value > 0;\r\nconst isSizes = (value: any) => Array.isArray(value) && value.length > 0 && value.every(isSize);\r\n\r\n/** The sign-in method of a Configuration (environment.json \"environment\") and its flag; null without one. */\r\nexport function loginMethod(environment: Bag | any): { method: 'keycloak' | 'okta' | 'jwt'; flag: string } | null {\r\n return LOGIN_METHODS[environment?.login?.type] ?? null;\r\n}\r\n\r\n/** Only the page keys of an option object (center.option, a role's page, the page before the sign-in). */\r\nexport function pageOf(option: Bag | any): Bag {\r\n const page: Bag = {};\r\n if (!isObject(option)) return page;\r\n for (const key of START_PAGE_KEYS) if (option[key] !== undefined) page[key] = option[key];\r\n return page;\r\n}\r\n\r\n/** The general start page of a Main layout: the page keys of center.option. */\r\nexport function startPage(layout: Bag | any): Bag {\r\n return pageOf(layout?.center?.option);\r\n}\r\n\r\n/** A value at a dotted path (\"realm_access.roles\"); undefined when a step is missing. */\r\nfunction valueAt(source: any, path: string): any {\r\n return String(path || '').split('.').filter(Boolean).reduce((node, part) => node?.[part], source);\r\n}\r\n\r\n/**\r\n * The roles of a signed-in user: what stands at roleKey in the sign-in answer or the token's claims - a\r\n * text or a list. Empty without roleKey or user.\r\n */\r\nexport function rolesOf(user: Bag | any, roleKey: string): string[] {\r\n if (!user || !roleKey) return [];\r\n const value = valueAt(user, roleKey);\r\n const list = Array.isArray(value) ? value : value === undefined || value === null || value === '' ? [] : [value];\r\n return list.map(v => String(v));\r\n}\r\n\r\n/**\r\n * The start page for a signed-in user: the page of the first role in login.roles (the Designer's order) the\r\n * user has, compared without case; else the general start page.\r\n */\r\nexport function startPageFor(layout: Bag | any, user?: Bag | any): Bag {\r\n const { login } = readAppSettings(layout);\r\n const mine = rolesOf(user, login.roleKey).map(r => r.toLowerCase());\r\n for (const [role, page] of Object.entries(login.roles)) {\r\n if (mine.includes(role.toLowerCase())) return { action: 'get', visible: true, ...pageOf(page) };\r\n }\r\n return startPage(layout);\r\n}\r\n\r\n/** The pagination keys a page or Main writes - the old page keys top / bottom / position translated. */\r\nfunction paginationValues(source: Bag | any): Partial<Pagination> {\r\n const values: Partial<Pagination> = {};\r\n if (!isObject(source)) return values;\r\n if (isIn(PAGINATION_TYPES, source.default)) values.default = source.default;\r\n if (typeof source.userChoice === 'boolean') values.userChoice = source.userChoice;\r\n if (isIn(PAGINATION_PLACEMENTS, source.placement)) values.placement = source.placement;\r\n else if (source.top === true) values.placement = 'top';\r\n else if (source.bottom === true) values.placement = 'bottom';\r\n if (isIn(PAGINATION_ALIGNS, source.align)) values.align = source.align;\r\n else if (source.position === 'space-between') values.align = 'split';\r\n else if (isIn(PAGINATION_ALIGNS, source.position)) values.align = source.position;\r\n if (isSize(source.defaultPageSize)) values.defaultPageSize = source.defaultPageSize;\r\n else if (isSize(source.pageSize)) values.defaultPageSize = source.pageSize;\r\n if (isSizes(source.pageSizeOptions)) values.pageSizeOptions = [...source.pageSizeOptions];\r\n if (typeof source.pageSize === 'boolean') values.pageSize = source.pageSize;\r\n if (typeof source.caption === 'string' && source.caption.trim()) values.caption = source.caption.trim();\r\n return values;\r\n}\r\n\r\n/** The pagination of the whole app (Main), every missing or unknown value replaced by its default. */\r\nfunction appPagination(raw: Bag | any): Pagination {\r\n return {\r\n default: defaultOf('pagination.default'),\r\n userChoice: defaultOf('pagination.userChoice'),\r\n placement: defaultOf('pagination.placement'),\r\n align: defaultOf('pagination.align'),\r\n defaultPageSize: defaultOf('pagination.defaultPageSize'),\r\n pageSizeOptions: [...defaultOf('pagination.pageSizeOptions')],\r\n pageSize: defaultOf('pagination.pageSize'),\r\n caption: defaultOf('pagination.caption'),\r\n ...paginationValues(raw),\r\n };\r\n}\r\n\r\n/**\r\n * The pagination of one list: each value from the page (center.pagination of its layout) if it is there,\r\n * else from Main, else the default. visible: a page with center.pagination pages unless it says\r\n * visible false; a page without it does not page.\r\n */\r\nexport function paginationFor(main: Bag | any, page: Bag | any): Pagination & { visible: boolean } {\r\n const own = page?.center?.pagination;\r\n return {\r\n ...readAppSettings(main).pagination,\r\n ...paginationValues(own),\r\n visible: isObject(own) && own.visible !== false,\r\n };\r\n}\r\n\r\n/**\r\n * The app settings of a Main layout (main/layout_schema.json), every missing or unknown value replaced by\r\n * its default. A Main whose center.option carries a sign-in flag counts as \"required at the start\".\r\n */\r\nexport function readAppSettings(layout: Bag | any): AppSettings {\r\n const center = layout?.center ?? {};\r\n const raw = isObject(center.appSettings) ? center.appSettings : {};\r\n const option = center.option ?? {};\r\n // the first form wrote login as a plain string\r\n const rawLogin = typeof raw.login === 'string' ? { when: raw.login } : isObject(raw.login) ? raw.login : {};\r\n\r\n const when: LoginWhen = LOGIN_FLAGS.some(flag => option[flag])\r\n ? 'start'\r\n : isIn(LOGIN_WHEN, rawLogin.when) ? rawLogin.when : 'none';\r\n const roles: Record<string, Bag> = {};\r\n if (isObject(rawLogin.roles)) {\r\n for (const [role, page] of Object.entries(rawLogin.roles)) if (role.trim() && isObject(page)) roles[role] = pageOf(page);\r\n }\r\n\r\n const documents: AppSettings['terms']['documents'] = {};\r\n for (const key of TERMS_DOCUMENTS) {\r\n const doc = raw.terms?.documents?.[key];\r\n const value = typeof doc?.value === 'string' ? doc.value.trim() : '';\r\n if (value) documents[key] = { kind: isIn(DOCUMENT_KINDS, doc.kind) ? doc.kind : 'text', value };\r\n }\r\n\r\n return {\r\n login: {\r\n when,\r\n storage: isIn(LOGIN_STORAGES, rawLogin.storage) ? rawLogin.storage : 'localStorage',\r\n roleKey: typeof rawLogin.roleKey === 'string' ? rawLogin.roleKey.trim() : '',\r\n roles,\r\n loginPage: isObject(rawLogin.loginPage) ? pageOf(rawLogin.loginPage) : null,\r\n },\r\n pagination: appPagination(raw.pagination),\r\n terms: {\r\n enabled: raw.terms?.enabled === true,\r\n confirmOnStart: raw.terms?.confirmOnStart === true,\r\n documents,\r\n version: typeof raw.terms?.version === 'string' ? raw.terms.version.trim() : '',\r\n backend: {\r\n enabled: raw.terms?.backend?.enabled === true,\r\n statusUrl: typeof raw.terms?.backend?.statusUrl === 'string' ? raw.terms.backend.statusUrl.trim() : '',\r\n acceptUrl: typeof raw.terms?.backend?.acceptUrl === 'string' ? raw.terms.backend.acceptUrl.trim() : '',\r\n },\r\n },\r\n menu: readMenu(raw.menu),\r\n };\r\n}\r\n\r\n/** The setting entries in the given order; unknown kinds are left out, missing ones follow switched on. */\r\nfunction readMenu(raw: any): AppSettings['menu'] {\r\n const caption = typeof raw?.caption === 'string' && raw.caption.trim() ? raw.caption.trim() : 'Setting';\r\n const entries: { kind: MenuEntryKind; on: boolean; caption: string }[] = [];\r\n for (const entry of Array.isArray(raw?.entries) ? raw.entries : []) {\r\n if (isIn(MENU_ENTRY_KINDS, entry?.kind) && !entries.some(e => e.kind === entry.kind)) {\r\n const on = MENU_SWITCHABLE.includes(entry.kind) ? entry.on !== false : true;\r\n entries.push({ kind: entry.kind, on, caption: typeof entry.caption === 'string' ? entry.caption.trim() : '' });\r\n }\r\n }\r\n for (const kind of MENU_ENTRY_KINDS) if (!entries.some(e => e.kind === kind)) entries.push({ kind, on: true, caption: '' });\r\n return { caption, entries };\r\n}\r\n\r\nexport interface AppSettingsProblem { code: string; key: string; }\r\n\r\nconst LAYOUT_URL = /^pages\\/.+\\/layout_schema\\.json$/;\r\n\r\n/** What is wrong with a page description (start page, role page, page before the sign-in). */\r\nfunction checkPage(page: Bag | any, key: string, problems: AppSettingsProblem[]): void {\r\n if (!isObject(page)) { problems.push({ code: 'notAPage', key }); return; }\r\n if (typeof page.layout_url !== 'string' || !LAYOUT_URL.test(page.layout_url)) problems.push({ code: 'pageWithoutLayout', key });\r\n}\r\n\r\n/** What is wrong with a pagination (Main's or a page's override). */\r\nfunction checkPagination(pagination: Bag | any, key: string, problems: AppSettingsProblem[]): void {\r\n if (pagination.default !== undefined && !isIn(PAGINATION_TYPES, pagination.default)) problems.push({ code: 'unknownValue', key: `${key}.default` });\r\n if (pagination.userChoice !== undefined && typeof pagination.userChoice !== 'boolean') problems.push({ code: 'notAFlag', key: `${key}.userChoice` });\r\n if (pagination.placement !== undefined && !isIn(PAGINATION_PLACEMENTS, pagination.placement)) problems.push({ code: 'unknownValue', key: `${key}.placement` });\r\n if (pagination.align !== undefined && !isIn(PAGINATION_ALIGNS, pagination.align)) problems.push({ code: 'unknownValue', key: `${key}.align` });\r\n if (pagination.defaultPageSize !== undefined && !isSize(pagination.defaultPageSize)) problems.push({ code: 'notASize', key: `${key}.defaultPageSize` });\r\n if (pagination.pageSizeOptions !== undefined && !isSizes(pagination.pageSizeOptions)) problems.push({ code: 'notSizes', key: `${key}.pageSizeOptions` });\r\n if (pagination.caption !== undefined && typeof pagination.caption !== 'string') problems.push({ code: 'notAText', key: `${key}.caption` });\r\n if (isSize(pagination.defaultPageSize) && isSizes(pagination.pageSizeOptions) && !pagination.pageSizeOptions.includes(pagination.defaultPageSize)) {\r\n problems.push({ code: 'sizeNotOffered', key: `${key}.defaultPageSize` });\r\n }\r\n}\r\n\r\n/**\r\n * What is wrong with the app settings of a Main layout - an empty list when nothing is. The environment\r\n * (environment.json \"environment\") is needed for the sign-in checks; without it they are skipped.\r\n */\r\nexport function checkAppSettings(layout: Bag | any, environment?: Bag | any): AppSettingsProblem[] {\r\n const problems: AppSettingsProblem[] = [];\r\n const center = layout?.center ?? {};\r\n const raw = center.appSettings;\r\n const option = center.option ?? {};\r\n const flags = LOGIN_FLAGS.filter(flag => option[flag]);\r\n\r\n if (raw !== undefined && !isObject(raw)) return [{ code: 'notAnObject', key: APP_SETTINGS_PATH }];\r\n const settings = raw ?? {};\r\n\r\n checkPage(startPage(layout), START_PAGE_PATH, problems);\r\n\r\n const login = typeof settings.login === 'string' ? { when: settings.login } : settings.login;\r\n if (login !== undefined && !isObject(login)) problems.push({ code: 'notAnObject', key: 'login' });\r\n const loginBag = isObject(login) ? login : {};\r\n const when = loginBag.when;\r\n if (when !== undefined && !isIn(LOGIN_WHEN, when)) problems.push({ code: 'unknownValue', key: 'login.when' });\r\n if (loginBag.storage !== undefined && !isIn(LOGIN_STORAGES, loginBag.storage)) problems.push({ code: 'unknownValue', key: 'login.storage' });\r\n if (loginBag.roleKey !== undefined && typeof loginBag.roleKey !== 'string') problems.push({ code: 'notAText', key: 'login.roleKey' });\r\n if (loginBag.roles !== undefined) {\r\n if (!isObject(loginBag.roles)) problems.push({ code: 'notAnObject', key: 'login.roles' });\r\n else {\r\n for (const [role, page] of Object.entries(loginBag.roles)) checkPage(page, `login.roles.${role}`, problems);\r\n if (Object.keys(loginBag.roles).length && !String(loginBag.roleKey ?? '').trim()) problems.push({ code: 'rolesWithoutRoleKey', key: 'login.roleKey' });\r\n }\r\n }\r\n if (loginBag.loginPage !== undefined) checkPage(loginBag.loginPage, 'login.loginPage', problems);\r\n\r\n if (flags.length > 1) problems.push({ code: 'severalLoginFlags', key: 'login.when' });\r\n if (when === 'start' && !flags.length) problems.push({ code: 'startWithoutLoginFlag', key: 'login.when' });\r\n if (flags.length && when !== undefined && when !== 'start') problems.push({ code: 'loginFlagWithoutStart', key: 'login.when' });\r\n if (environment) {\r\n const method = loginMethod(environment);\r\n const wantsLogin = flags.length || when === 'start' || when === 'optional';\r\n if (wantsLogin && !method) problems.push({ code: 'noLoginMethod', key: 'login.when' });\r\n if (method && flags.length && !flags.includes(method.flag)) problems.push({ code: 'loginFlagNotMethod', key: 'login.when' });\r\n }\r\n\r\n if (settings.pagination !== undefined) {\r\n if (!isObject(settings.pagination)) problems.push({ code: 'notAnObject', key: 'pagination' });\r\n else checkPagination(settings.pagination, 'pagination', problems);\r\n }\r\n\r\n const terms = settings.terms;\r\n if (terms !== undefined) {\r\n for (const key of ['enabled', 'confirmOnStart']) {\r\n if (terms[key] !== undefined && typeof terms[key] !== 'boolean') problems.push({ code: 'notAFlag', key: `terms.${key}` });\r\n }\r\n const documents = terms.documents ?? {};\r\n for (const [name, doc] of Object.entries<any>(documents)) {\r\n const key = `terms.documents.${name}`;\r\n if (!isIn(TERMS_DOCUMENTS, name)) { problems.push({ code: 'unknownDocument', key }); continue; }\r\n if (!isIn(DOCUMENT_KINDS, doc?.kind)) problems.push({ code: 'unknownValue', key: `${key}.kind` });\r\n if (typeof doc?.value !== 'string' || !doc.value.trim()) problems.push({ code: 'emptyDocument', key });\r\n }\r\n if (terms.enabled === true && !TERMS_DOCUMENTS.some(name => documents[name]?.value?.trim?.())) {\r\n problems.push({ code: 'termsWithoutDocument', key: 'terms.documents' });\r\n }\r\n if (terms.confirmOnStart === true && terms.enabled !== true) problems.push({ code: 'confirmWithoutTerms', key: 'terms.confirmOnStart' });\r\n if (terms.version !== undefined && typeof terms.version !== 'string') problems.push({ code: 'notAText', key: 'terms.version' });\r\n const backend = terms.backend;\r\n if (backend !== undefined) {\r\n if (!isObject(backend)) problems.push({ code: 'notAnObject', key: 'terms.backend' });\r\n else {\r\n if (backend.enabled !== undefined && typeof backend.enabled !== 'boolean') problems.push({ code: 'notAFlag', key: 'terms.backend.enabled' });\r\n if (backend.enabled === true) {\r\n for (const key of ['statusUrl', 'acceptUrl']) {\r\n if (typeof backend[key] !== 'string' || !backend[key].trim()) problems.push({ code: 'backendWithoutUrl', key: `terms.backend.${key}` });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n const menu = settings.menu;\r\n if (menu !== undefined) {\r\n if (!isObject(menu)) problems.push({ code: 'notAnObject', key: 'menu' });\r\n else {\r\n if (menu.caption !== undefined && (typeof menu.caption !== 'string' || !menu.caption.trim())) problems.push({ code: 'notAText', key: 'menu.caption' });\r\n if (menu.entries !== undefined && !Array.isArray(menu.entries)) problems.push({ code: 'notAList', key: 'menu.entries' });\r\n const seen = new Set<string>();\r\n for (const [i, entry] of (Array.isArray(menu.entries) ? menu.entries : []).entries()) {\r\n const key = `menu.entries.${i}`;\r\n if (!isIn(MENU_ENTRY_KINDS, entry?.kind)) { problems.push({ code: 'unknownValue', key: `${key}.kind` }); continue; }\r\n if (seen.has(entry.kind)) problems.push({ code: 'duplicateEntry', key: `${key}.kind` });\r\n seen.add(entry.kind);\r\n if (entry.on !== undefined && typeof entry.on !== 'boolean') problems.push({ code: 'notAFlag', key: `${key}.on` });\r\n else if (entry.on !== undefined && !MENU_SWITCHABLE.includes(entry.kind)) problems.push({ code: 'decidedElsewhere', key: `${key}.on` });\r\n if (entry.caption !== undefined && typeof entry.caption !== 'string') problems.push({ code: 'notAText', key: `${key}.caption` });\r\n }\r\n }\r\n }\r\n\r\n return problems;\r\n}\r\n\r\n/** What is wrong with the page bar of one page (center.pagination of its layout): the same values as Main's. */\r\nexport function checkPagePagination(page: Bag | any): AppSettingsProblem[] {\r\n const problems: AppSettingsProblem[] = [];\r\n const own = page?.center?.pagination;\r\n if (own === undefined) return problems;\r\n if (!isObject(own)) return [{ code: 'notAnObject', key: 'center.pagination' }];\r\n checkPagination(own, 'center.pagination', problems);\r\n for (const old of ['top', 'bottom', 'position']) if (own[old] !== undefined) problems.push({ code: 'oldKey', key: `center.pagination.${old}` });\r\n if (isSize(own.pageSize)) problems.push({ code: 'oldKey', key: 'center.pagination.pageSize' });\r\n return problems;\r\n}\r\n\r\n/** The captions of the entries the library adds - keys of the app's language files (English text). */\r\nexport const SETTING_MENU_TEXTS = {\r\n setting: 'Setting', home: 'Home', projectVersion: 'Project Version', languages: 'Languages', login: 'Login',\r\n paginationType: 'Pagination Type', scroll: 'Scroll', numbered: 'Numbered', terms: 'Terms & Conditions',\r\n imprint: 'Imprint', privacy: 'Privacy', agb: 'Terms',\r\n} as const;\r\n\r\n/** The name of a language in that language (\"de\" -> \"Deutsch\"); the code when it is unknown. */\r\nexport function languageName(code: string): string {\r\n try {\r\n const name = new Intl.DisplayNames([code], { type: 'language' }).of(code);\r\n return name ? name.charAt(0).toUpperCase() + name.slice(1) : code;\r\n } catch {\r\n return code;\r\n }\r\n}\r\n\r\n/**\r\n * The side menu with the entries the library adds by itself for an app with app settings: into the\r\n * top-level folder \"Setting\" (caption, any case), else a folder \"Setting\" at the end. languages: the codes\r\n * of the project's language files (\"en\", \"de\"); signedIn: whether a user is signed in. The given menu is\r\n * not changed; without app settings it comes back as it is.\r\n */\r\nexport function appSettingsMenu(menu: any[], center: Bag | any, context: { languages?: string[]; signedIn?: boolean } = {}): any[] {\r\n const items = Array.isArray(menu) ? menu : [];\r\n if (!isObject(center?.appSettings)) return items;\r\n const settings = readAppSettings({ center });\r\n const t = SETTING_MENU_TEXTS;\r\n const entry = (caption: string, icon: string, option: Bag) => ({ label: { caption }, icon, option: { visible: true, ...option } });\r\n const languages = [...new Set(context.languages ?? [])];\r\n const documents = TERMS_DOCUMENTS.filter(name => settings.terms.documents[name]);\r\n\r\n // each kind: its entry, or null when it does not apply (one language, signed in, switched off in Main …)\r\n const build: Record<MenuEntryKind, () => any> = {\r\n home: () => entry(t.home, 'home', { home: true }),\r\n languages: () => languages.length > 1 ? {\r\n label: { caption: t.languages }, icon: 'global', option: { visible: true },\r\n // no icon: a country's flag does not stand for a language\r\n submenu: languages.map(code => entry(languageName(code), '', { changeLang: true, data_url: `${code}.json` })),\r\n } : null,\r\n login: () => settings.login.when === 'optional' && !context.signedIn ? entry(t.login, 'login', { action: 'login', form: true }) : null,\r\n paginationType: () => settings.pagination.userChoice ? {\r\n label: { caption: t.paginationType }, icon: 'ordered-list', option: { visible: true },\r\n submenu: [entry(t.scroll, 'down', { scrollPagination: true }), entry(t.numbered, 'ordered-list', { numberedPagination: true })],\r\n } : null,\r\n terms: () => settings.terms.enabled && documents.length ? {\r\n label: { caption: t.terms }, icon: 'file-text', option: { visible: true },\r\n submenu: documents.map(name => entry(t[name], 'file-text', { terms: true, document: { ...settings.terms.documents[name] } })),\r\n } : null,\r\n projectVersion: () => entry(t.projectVersion, 'info-circle', { projectVersion: true }),\r\n };\r\n // an entry's own caption (Main) wins over the fixed text; it is a text of the app like any caption\r\n const added = settings.menu.entries.filter(e => e.on).map(e => {\r\n const item = build[e.kind]();\r\n return item && e.caption ? { ...item, label: { ...item.label, caption: e.caption } } : item;\r\n }).filter(Boolean);\r\n if (!added.length) return items;\r\n\r\n const caption = settings.menu.caption;\r\n const at = items.findIndex(item => Array.isArray(item?.submenu) && String(item?.label?.caption ?? '').trim().toLowerCase() === caption.toLowerCase());\r\n if (at >= 0) {\r\n const folder = items[at];\r\n return items.map((item, i) => (i === at ? { ...folder, submenu: [...folder.submenu, ...added] } : item));\r\n }\r\n return [...items, { label: { caption }, icon: 'setting', option: { visible: true }, submenu: added }];\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-23\r\n// - new: the app settings catalog - Login, Pagination, Terms & Conditions of Main (#166)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-19\r\n// - new: the test flow format of an app's .liveforge/tests (#166)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-18\r\n// - new: @yomotech/view-toolkit/catalog - the field catalog without Angular, for the Designer,\r\n// node tests and the AI contract tools (#166)\r\nexport * from './field-catalog';\r\nexport * from './test-flow';\r\nexport * from './app-settings-catalog';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAKa,KAAK,GAAG,CAAI,KAAQ,KAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AACzE,MAAM,GAAG,GAAG,CAAC,CAAM,EAAE,CAAS,KAAK,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACvE,SAAU,eAAe,CAAC,IAAe,EAAE,SAAiB,EAAA;IAChE,MAAM,KAAK,GAAG,CAAC,SAAS,IA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