@siliconst/metaui 1.0.2 → 1.2.0
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/README.md +134 -123
- package/package.json +3 -2
- package/src/nz/co/siliconst/ui5/metaui/.library +7 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost-dbg.js +299 -163
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.d.ts +54 -6
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.ts +292 -162
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +51 -43
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +5 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +49 -40
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +81 -58
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +5 -12
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +82 -56
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus-dbg.js +65 -50
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.d.ts +9 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.ts +60 -45
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +72 -59
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +6 -4
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +71 -56
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +145 -36
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +13 -8
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +157 -31
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +55 -55
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +56 -56
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.ts +29 -29
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.d.ts +6 -12
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.ts +21 -26
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +3 -20
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +14 -33
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +33 -43
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +70 -70
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout-dbg.js +23 -38
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.d.ts +4 -17
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.ts +22 -34
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +98 -56
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts +7 -7
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +97 -60
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +102 -90
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts +4 -8
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +119 -102
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +43 -32
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +22 -17
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.ts +55 -43
- package/src/nz/co/siliconst/ui5/metaui/manifest.json +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin-dbg.js +68 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin.d.ts +15 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/ArrayPlugin.ts +71 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin-dbg.js +54 -59
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.d.ts +8 -27
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.ts +56 -58
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin-dbg.js +41 -42
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.ts +41 -42
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin-dbg.js +68 -60
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.ts +69 -63
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin-dbg.js +68 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DateTimePlugin.ts +68 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin-dbg.js +66 -66
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.ts +65 -65
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin-dbg.js +55 -53
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.d.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.ts +56 -55
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin-dbg.js +56 -53
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.ts +58 -55
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin-dbg.js +43 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/SwitchPlugin.ts +42 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin-dbg.js +58 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TextAreaPlugin.ts +58 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin-dbg.js +74 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/TimePlugin.ts +71 -0
- package/ui5.yaml +3 -3
- package/test-resources/App.js +0 -11
- package/test-resources/Main.controller.js +0 -73
- package/test-resources/Main.view.xml +0 -42
- package/test-resources/index.html +0 -21
- package/test-resources/mockData.json +0 -27
- package/test-resources/mockSchema.json +0 -98
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateManager.js","names":["StateManager","constructor","initialData","safeData","JSON","parse","stringify","this","model","JSONModel","setDefaultBindingMode","getModel","bindControl","control","property","bindingPath","bindProperty","path","extractPayload","data","getData","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"StateManager.js","names":["StateManager","constructor","initialData","safeData","JSON","parse","stringify","this","model","JSONModel","setDefaultBindingMode","getModel","bindControl","control","property","bindingPath","bindProperty","path","extractPayload","data","getData","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\n * @file StateManager.ts\n * @description Isolated internal state management. Decouples the MetaUI engine from external host models.\n */\n\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ManagedObject from \"sap/ui/base/ManagedObject\";\n\n/**\n * Manages the isolated internal data payload for the MetaUI engine.\n */\nexport class StateManager {\n private model: JSONModel;\n\n /**\n * Initializes the state manager with an optional initial payload.\n * @param initialData The initial JSON payload to populate the fields.\n */\n constructor(initialData: Record<string, any> = {}) {\n // Deep copy to ensure no reference leakage from the host application\n const safeData = JSON.parse(JSON.stringify(initialData));\n this.model = new JSONModel(safeData);\n this.model.setDefaultBindingMode(\"TwoWay\");\n }\n\n /**\n * Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.\n * @returns The internal JSONModel.\n */\n public getModel(): JSONModel {\n return this.model;\n }\n\n /**\n * Binds a generated UI control property to a path in the internal model.\n * @param control The target UI5 Control.\n * @param property The UI5 property name (e.g., 'value').\n * @param bindingPath The exact path in the JSON payload.\n */\n public bindControl(control: ManagedObject, property: string, bindingPath: string): void {\n control.bindProperty(property, {\n path: bindingPath,\n model: \"meta\" // Assumes the model is bound to the root container with the name 'meta'\n });\n }\n\n /**\n * Extracts the flat JavaScript object representing the current state of the UI.\n * @returns A serialized record of the data payload, free of UI5 wrappers.\n */\n public extractPayload(): Record<string, any> {\n // Create a deep copy to prevent accidental mutations by the host\n const data = this.model.getData();\n return JSON.parse(JSON.stringify(data));\n }\n}\n"],"mappings":"uEAWO,MAAMA,EAOTC,YAAYC,EAAmC,CAAC,GAE5C,MAAMC,EAAWC,KAAKC,MAAMD,KAAKE,UAAUJ,IAC3CK,KAAKC,MAAQ,IAAIC,EAAUN,GAC3BI,KAAKC,MAAME,sBAAsB,SACrC,CAMOC,WACH,OAAOJ,KAAKC,KAChB,CAQOI,YAAYC,EAAwBC,EAAkBC,GACzDF,EAAQG,aAAaF,EAAU,CAC3BG,KAAMF,EACNP,MAAO,QAEf,CAMOU,iBAEH,MAAMC,EAAOZ,KAAKC,MAAMY,UACxB,OAAOhB,KAAKC,MAAMD,KAAKE,UAAUa,GACrC,EACH,IAAAE,EAAA,CAAAC,WAAA,MAAAD,EAAArB,eAAA,OAAAqB,CAAA","ignoreList":[]}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file StateManager.ts
|
|
3
|
-
* @description Isolated internal state management. Decouples the MetaUI engine from external host models.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
7
|
-
import ManagedObject from "sap/ui/base/ManagedObject";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Manages the isolated internal data payload for the MetaUI engine.
|
|
11
|
-
*/
|
|
12
|
-
export class StateManager {
|
|
13
|
-
private model: JSONModel;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Initializes the state manager with an optional initial payload.
|
|
17
|
-
* @param initialData The initial JSON payload to populate the fields.
|
|
18
|
-
*/
|
|
19
|
-
constructor(initialData: Record<string, any> = {}) {
|
|
20
|
-
// Deep copy to ensure no reference leakage from the host application
|
|
21
|
-
const safeData = JSON.parse(JSON.stringify(initialData));
|
|
22
|
-
this.model = new JSONModel(safeData);
|
|
23
|
-
this.model.setDefaultBindingMode("TwoWay");
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.
|
|
28
|
-
* @returns The internal JSONModel.
|
|
29
|
-
*/
|
|
30
|
-
public getModel(): JSONModel {
|
|
31
|
-
return this.model;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Binds a generated UI control property to a path in the internal model.
|
|
36
|
-
* @param control The target UI5 Control.
|
|
37
|
-
* @param property The UI5 property name (e.g., 'value').
|
|
38
|
-
* @param bindingPath The exact path in the JSON payload.
|
|
39
|
-
*/
|
|
40
|
-
public bindControl(control: ManagedObject, property: string, bindingPath: string): void {
|
|
41
|
-
control.bindProperty(property, {
|
|
42
|
-
path: bindingPath,
|
|
43
|
-
model: "meta" // Assumes the model is bound to the root container with the name 'meta'
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Extracts the flat JavaScript object representing the current state of the UI.
|
|
49
|
-
* @returns A serialized record of the data payload, free of UI5 wrappers.
|
|
50
|
-
*/
|
|
51
|
-
public extractPayload(): Record<string, any> {
|
|
52
|
-
// Create a deep copy to prevent accidental mutations by the host
|
|
53
|
-
const data = this.model.getData();
|
|
54
|
-
return JSON.parse(JSON.stringify(data));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file StateManager.ts
|
|
3
|
+
* @description Isolated internal state management. Decouples the MetaUI engine from external host models.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
7
|
+
import ManagedObject from "sap/ui/base/ManagedObject";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Manages the isolated internal data payload for the MetaUI engine.
|
|
11
|
+
*/
|
|
12
|
+
export class StateManager {
|
|
13
|
+
private model: JSONModel;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Initializes the state manager with an optional initial payload.
|
|
17
|
+
* @param initialData The initial JSON payload to populate the fields.
|
|
18
|
+
*/
|
|
19
|
+
constructor(initialData: Record<string, any> = {}) {
|
|
20
|
+
// Deep copy to ensure no reference leakage from the host application
|
|
21
|
+
const safeData = JSON.parse(JSON.stringify(initialData));
|
|
22
|
+
this.model = new JSONModel(safeData);
|
|
23
|
+
this.model.setDefaultBindingMode("TwoWay");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.
|
|
28
|
+
* @returns The internal JSONModel.
|
|
29
|
+
*/
|
|
30
|
+
public getModel(): JSONModel {
|
|
31
|
+
return this.model;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Binds a generated UI control property to a path in the internal model.
|
|
36
|
+
* @param control The target UI5 Control.
|
|
37
|
+
* @param property The UI5 property name (e.g., 'value').
|
|
38
|
+
* @param bindingPath The exact path in the JSON payload.
|
|
39
|
+
*/
|
|
40
|
+
public bindControl(control: ManagedObject, property: string, bindingPath: string): void {
|
|
41
|
+
control.bindProperty(property, {
|
|
42
|
+
path: bindingPath,
|
|
43
|
+
model: "meta" // Assumes the model is bound to the root container with the name 'meta'
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Extracts the flat JavaScript object representing the current state of the UI.
|
|
49
|
+
* @returns A serialized record of the data payload, free of UI5 wrappers.
|
|
50
|
+
*/
|
|
51
|
+
public extractPayload(): Record<string, any> {
|
|
52
|
+
// Create a deep copy to prevent accidental mutations by the host
|
|
53
|
+
const data = this.model.getData();
|
|
54
|
+
return JSON.parse(JSON.stringify(data));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=IEventBus-dbg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEventBus-dbg.js","names":[],"sources":["IEventBus.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"IEventBus-dbg.js","names":[],"sources":["IEventBus.ts"],"sourcesContent":["/**\n * @file IEventBus.ts\n * @description Pub/Sub interface for localized cross-field communication and state logic.\n */\n\n/**\n * Describes a state change payload fired by a plugin.\n */\nexport interface IFieldChangeEvent {\n fieldName: string;\n newValue: any;\n}\n\n/**\n * Contract for the internal event orchestrator to manage conditional UI logic.\n */\nexport interface IEventBus {\n /**\n * Publishes a value change event to the internal channel.\n * @param event The structured event detailing which field changed and its new value.\n */\n publishFieldChange(event: IFieldChangeEvent): void;\n\n /**\n * Subscribes a listener to react to field value changes.\n * @param listener The callback function to execute when a change occurs.\n */\n subscribe(listener: (event: IFieldChangeEvent) => void): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEventBus.d.ts","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"IEventBus.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;OAGG;IAEH;;OAEG;IACH,UAAiB,iBAAiB;QAC9B,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,GAAG,CAAC;KACjB;IAED;;OAEG;IACH,UAAiB,SAAS;QACtB;;;WAGG;QACH,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;QAEnD;;;WAGG;QACH,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI,CAAC;KACjE;CAEA"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file IEventBus.ts
|
|
3
|
-
* @description Pub/Sub interface for localized cross-field communication and state logic.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Describes a state change payload fired by a plugin.
|
|
8
|
-
*/
|
|
9
|
-
export interface IFieldChangeEvent {
|
|
10
|
-
fieldName: string;
|
|
11
|
-
newValue: any;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Contract for the internal event orchestrator to manage conditional UI logic.
|
|
16
|
-
*/
|
|
17
|
-
export interface IEventBus {
|
|
18
|
-
/**
|
|
19
|
-
* Publishes a value change event to the internal channel.
|
|
20
|
-
* @param event The structured event detailing which field changed and its new value.
|
|
21
|
-
*/
|
|
22
|
-
publishFieldChange(event: IFieldChangeEvent): void;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Subscribes a listener to react to field value changes.
|
|
26
|
-
* @param listener The callback function to execute when a change occurs.
|
|
27
|
-
*/
|
|
28
|
-
subscribe(listener: (event: IFieldChangeEvent) => void): void;
|
|
29
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file IEventBus.ts
|
|
3
|
+
* @description Pub/Sub interface for localized cross-field communication and state logic.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Describes a state change payload fired by a plugin.
|
|
8
|
+
*/
|
|
9
|
+
export interface IFieldChangeEvent {
|
|
10
|
+
fieldName: string;
|
|
11
|
+
newValue: any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Contract for the internal event orchestrator to manage conditional UI logic.
|
|
16
|
+
*/
|
|
17
|
+
export interface IEventBus {
|
|
18
|
+
/**
|
|
19
|
+
* Publishes a value change event to the internal channel.
|
|
20
|
+
* @param event The structured event detailing which field changed and its new value.
|
|
21
|
+
*/
|
|
22
|
+
publishFieldChange(event: IFieldChangeEvent): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Subscribes a listener to react to field value changes.
|
|
26
|
+
* @param listener The callback function to execute when a change occurs.
|
|
27
|
+
*/
|
|
28
|
+
subscribe(listener: (event: IFieldChangeEvent) => void): void;
|
|
29
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=ILayoutManager-dbg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILayoutManager-dbg.js","names":[],"sources":["ILayoutManager.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"ILayoutManager-dbg.js","names":[],"sources":["ILayoutManager.ts"],"sourcesContent":["/**\n * @file ILayoutManager.ts\n * @description Factory contract for generating UI5 layout containers (Forms/Tables).\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nimport { IPlugin } from \"./IPlugin\";\n\nexport interface ILayoutManager {\n /**\n * Renders a form-style layout for the root fields defined in the schema.\n */\n renderForm(properties: Record<string, IPropertyMetadata>, modelName?: string, formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;\n\n /**\n * Renders a tabular layout for the provided array metadata.\n */\n renderTable(tableMeta: IPropertyMetadata, modelName?: string, tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -4,23 +4,17 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager" {
|
|
|
4
4
|
* @description Factory contract for generating UI5 layout containers (Forms/Tables).
|
|
5
5
|
*/
|
|
6
6
|
import Control from "sap/ui/core/Control";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
* The factory interface responsible for structuring the visual grid.
|
|
10
|
-
*/
|
|
7
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
8
|
+
import { IPlugin } from "nz/co/siliconst/ui5/metaui/interfaces/IPlugin";
|
|
11
9
|
export interface ILayoutManager {
|
|
12
10
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param schema The master schema containing rootFields to be mounted.
|
|
15
|
-
* @returns A populated UI5 container (e.g., sap.ui.layout.form.SimpleForm).
|
|
11
|
+
* Renders a form-style layout for the root fields defined in the schema.
|
|
16
12
|
*/
|
|
17
|
-
renderForm(
|
|
13
|
+
renderForm(properties: Record<string, IPropertyMetadata>, modelName?: string, formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
18
14
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @param tableMeta The metadata defining the table columns.
|
|
21
|
-
* @returns A UI5 Table control (e.g., sap.m.Table or sap.ui.table.Table).
|
|
15
|
+
* Renders a tabular layout for the provided array metadata.
|
|
22
16
|
*/
|
|
23
|
-
renderTable(tableMeta:
|
|
17
|
+
renderTable(tableMeta: IPropertyMetadata, modelName?: string, tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
//# sourceMappingURL=ILayoutManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILayoutManager.d.ts","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"ILayoutManager.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,sDAAsD,CAAC;IACtE;;;OAGG;IAEH,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IAExE,UAAiB,cAAc;QAC3B;;WAEG;QACH,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;QAEpJ;;WAEG;QACH,WAAW,CAAC,SAAS,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;KACxI;CAEA"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file ILayoutManager.ts
|
|
3
|
-
* @description Factory contract for generating UI5 layout containers (Forms/Tables).
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import Control from "sap/ui/core/Control";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* @param tableMeta The metadata defining the table columns.
|
|
23
|
-
* @returns A UI5 Table control (e.g., sap.m.Table or sap.ui.table.Table).
|
|
24
|
-
*/
|
|
25
|
-
renderTable(tableMeta: ITableMetadata): Control;
|
|
26
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file ILayoutManager.ts
|
|
3
|
+
* @description Factory contract for generating UI5 layout containers (Forms/Tables).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Control from "sap/ui/core/Control";
|
|
7
|
+
import { IPropertyMetadata } from "./ISchema";
|
|
8
|
+
|
|
9
|
+
import { IPlugin } from "./IPlugin";
|
|
10
|
+
|
|
11
|
+
export interface ILayoutManager {
|
|
12
|
+
/**
|
|
13
|
+
* Renders a form-style layout for the root fields defined in the schema.
|
|
14
|
+
*/
|
|
15
|
+
renderForm(properties: Record<string, IPropertyMetadata>, modelName?: string, formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Renders a tabular layout for the provided array metadata.
|
|
19
|
+
*/
|
|
20
|
+
renderTable(tableMeta: IPropertyMetadata, modelName?: string, tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
21
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=IPlugin-dbg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\n * @file IPlugin.ts\n * @description Contract for all discrete UI control generation plugins.\n * Enforces a strict lifecycle for rendering, validation, and dynamic state updates.\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nexport interface IPlugin {\n render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string): Control;\n validate(): boolean;\n onStateChange(newMetadata: IPropertyMetadata): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -5,28 +5,11 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/IPlugin" {
|
|
|
5
5
|
* Enforces a strict lifecycle for rendering, validation, and dynamic state updates.
|
|
6
6
|
*/
|
|
7
7
|
import Control from "sap/ui/core/Control";
|
|
8
|
-
import {
|
|
9
|
-
/**
|
|
10
|
-
* Defines the contract that every MetaUI plugin must fulfill.
|
|
11
|
-
*/
|
|
8
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
12
9
|
export interface IPlugin {
|
|
13
|
-
|
|
14
|
-
* Instantiates and binds the appropriate UI5 control based on the field metadata.
|
|
15
|
-
* @param fieldMetadata The immutable schema configuration for this specific field.
|
|
16
|
-
* @param bindingPath The exact model path where this field's data is stored.
|
|
17
|
-
* @returns The fully constructed and bound UI5 Control ready for layout insertion.
|
|
18
|
-
*/
|
|
19
|
-
render(fieldMetadata: IFieldMetadata, bindingPath: string): Control;
|
|
20
|
-
/**
|
|
21
|
-
* Evaluates the current state of the UI5 control against the required schema rules.
|
|
22
|
-
* @returns True if the input is valid, false otherwise. Must set ValueState natively.
|
|
23
|
-
*/
|
|
10
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string): Control;
|
|
24
11
|
validate(): boolean;
|
|
25
|
-
|
|
26
|
-
* Hook triggered when a cross-field dependency requires this field to re-evaluate its state.
|
|
27
|
-
* @param newMetadata The dynamically updated schema rules for this field.
|
|
28
|
-
*/
|
|
29
|
-
onStateChange(newMetadata: IFieldMetadata): void;
|
|
12
|
+
onStateChange(newMetadata: IPropertyMetadata): void;
|
|
30
13
|
}
|
|
31
14
|
}
|
|
32
15
|
//# sourceMappingURL=IPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPlugin.d.ts","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"IPlugin.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;OAIG;IAEH,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,UAAiB,OAAO;QACpB,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC3F,QAAQ,IAAI,OAAO,CAAC;QACpB,aAAa,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;KACvD;CAEA"}
|
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file IPlugin.ts
|
|
3
|
-
* @description Contract for all discrete UI control generation plugins.
|
|
4
|
-
* Enforces a strict lifecycle for rendering, validation, and dynamic state updates.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import Control from "sap/ui/core/Control";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Instantiates and binds the appropriate UI5 control based on the field metadata.
|
|
16
|
-
* @param fieldMetadata The immutable schema configuration for this specific field.
|
|
17
|
-
* @param bindingPath The exact model path where this field's data is stored.
|
|
18
|
-
* @returns The fully constructed and bound UI5 Control ready for layout insertion.
|
|
19
|
-
*/
|
|
20
|
-
render(fieldMetadata: IFieldMetadata, bindingPath: string): Control;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Evaluates the current state of the UI5 control against the required schema rules.
|
|
24
|
-
* @returns True if the input is valid, false otherwise. Must set ValueState natively.
|
|
25
|
-
*/
|
|
26
|
-
validate(): boolean;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Hook triggered when a cross-field dependency requires this field to re-evaluate its state.
|
|
30
|
-
* @param newMetadata The dynamically updated schema rules for this field.
|
|
31
|
-
*/
|
|
32
|
-
onStateChange(newMetadata: IFieldMetadata): void;
|
|
33
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file IPlugin.ts
|
|
3
|
+
* @description Contract for all discrete UI control generation plugins.
|
|
4
|
+
* Enforces a strict lifecycle for rendering, validation, and dynamic state updates.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import Control from "sap/ui/core/Control";
|
|
8
|
+
import { IPropertyMetadata } from "./ISchema";
|
|
9
|
+
|
|
10
|
+
export interface IPlugin {
|
|
11
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string): Control;
|
|
12
|
+
validate(): boolean;
|
|
13
|
+
onStateChange(newMetadata: IPropertyMetadata): void;
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=ISchema-dbg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISchema-dbg.js","names":[],"sources":["ISchema.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"ISchema-dbg.js","names":[],"sources":["ISchema.ts"],"sourcesContent":["/**\n * @file ISchema.ts\n * @description MetaUI v2 Core Schema Contract.\n * Aligned with standard JSON-Schema syntax (properties, items) for native AI generation,\n * with a proprietary 'ui' directive block for Fiori visual orchestration.\n */\n\nexport type FieldType = \"string\" | \"number\" | \"boolean\" | \"date\" | \"dropdown\" | \"time\" | \"datetime\" | \"array\" | \"object\";\n\n/**\n * Value help structure mapping SAP Key/Text pairs.\n */\nexport interface IValueHelp {\n key: string;\n text: string;\n}\n\n/**\n * Visual orchestration directives to separate layout from data modeling.\n */\nexport interface IUIDirective {\n label?: string;\n isKey?: boolean;\n readOnly?: boolean;\n widget?: string;\n group?: string;\n visibleOn?: string;\n enabledOn?: string;\n format?: string;\n rows?: number;\n fullWidth?: boolean;\n}\n\n/**\n * Standard JSON-Schema property definition.\n */\nexport interface IPropertyMetadata {\n type: FieldType;\n \n // MetaUI specific orchestration\n ui?: IUIDirective;\n \n // Standard validations\n required?: boolean;\n maxLength?: number;\n minimum?: number;\n maximum?: number;\n pattern?: string;\n \n // Numeric specifics\n precision?: number;\n scale?: number;\n \n // Value constraints\n valueHelp?: IValueHelp[];\n \n // Nested recursion for objects and arrays\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n}\n\n/**\n * The master schema contract ingested by the Engine.\n */\nexport interface ISchema {\n title?: string;\n type?: \"object\" | \"array\"; // Implicit layout hinting\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,68 +1,58 @@
|
|
|
1
1
|
declare module "nz/co/siliconst/ui5/metaui/interfaces/ISchema" {
|
|
2
2
|
/**
|
|
3
3
|
* @file ISchema.ts
|
|
4
|
-
* @description
|
|
5
|
-
*
|
|
4
|
+
* @description MetaUI v2 Core Schema Contract.
|
|
5
|
+
* Aligned with standard JSON-Schema syntax (properties, items) for native AI generation,
|
|
6
|
+
* with a proprietary 'ui' directive block for Fiori visual orchestration.
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
* Supported data primitive types that drive plugin selection.
|
|
9
|
-
*/
|
|
10
|
-
export type FieldType = "string" | "number" | "boolean" | "date" | "dropdown";
|
|
8
|
+
export type FieldType = "string" | "number" | "boolean" | "date" | "dropdown" | "time" | "datetime" | "array" | "object";
|
|
11
9
|
/**
|
|
12
10
|
* Value help structure mapping SAP Key/Text pairs.
|
|
13
11
|
*/
|
|
14
12
|
export interface IValueHelp {
|
|
15
|
-
/** The technical key passed back to the backend. */
|
|
16
13
|
key: string;
|
|
17
|
-
/** The localized descriptive text displayed to the user. */
|
|
18
14
|
text: string;
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
21
|
-
*
|
|
17
|
+
* Visual orchestration directives to separate layout from data modeling.
|
|
18
|
+
*/
|
|
19
|
+
export interface IUIDirective {
|
|
20
|
+
label?: string;
|
|
21
|
+
isKey?: boolean;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
widget?: string;
|
|
24
|
+
group?: string;
|
|
25
|
+
visibleOn?: string;
|
|
26
|
+
enabledOn?: string;
|
|
27
|
+
format?: string;
|
|
28
|
+
rows?: number;
|
|
29
|
+
fullWidth?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Standard JSON-Schema property definition.
|
|
22
33
|
*/
|
|
23
|
-
export interface
|
|
24
|
-
/** The technical field name mapping to the data model property. */
|
|
25
|
-
fieldName: string;
|
|
26
|
-
/** The primitive type determining the rendering plugin. */
|
|
34
|
+
export interface IPropertyMetadata {
|
|
27
35
|
type: FieldType;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/** Indicates if the field is a primary key (often rendered first or highlighted). */
|
|
31
|
-
isKey: boolean;
|
|
32
|
-
/** If true, the field is rendered as a non-editable display element. */
|
|
33
|
-
isReadOnly: boolean;
|
|
34
|
-
/** If true, triggers UI5 validation to ensure a value exists. */
|
|
35
|
-
isRequired: boolean;
|
|
36
|
-
/** Maximum allowed character length for string-based inputs. */
|
|
36
|
+
ui?: IUIDirective;
|
|
37
|
+
required?: boolean;
|
|
37
38
|
maxLength?: number;
|
|
38
|
-
|
|
39
|
+
minimum?: number;
|
|
40
|
+
maximum?: number;
|
|
41
|
+
pattern?: string;
|
|
39
42
|
precision?: number;
|
|
40
|
-
/** The number of decimal places for numeric inputs. */
|
|
41
43
|
scale?: number;
|
|
42
|
-
/** Pre-loaded static value help arrays for dropdowns. */
|
|
43
44
|
valueHelp?: IValueHelp[];
|
|
45
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
46
|
+
items?: IPropertyMetadata;
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
export interface ITableMetadata {
|
|
49
|
-
/** The internal ID/name of the table. */
|
|
50
|
-
tableName: string;
|
|
51
|
-
/** The localized table header label. */
|
|
52
|
-
label: string;
|
|
53
|
-
/** Array of field definitions dictating the table's columns. */
|
|
54
|
-
fields: IFieldMetadata[];
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The master schema contract ingested by the Engine to build the UI5 layout.
|
|
49
|
+
* The master schema contract ingested by the Engine.
|
|
58
50
|
*/
|
|
59
51
|
export interface ISchema {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/** The table structures to be rendered sequentially. */
|
|
65
|
-
tables: ITableMetadata[];
|
|
52
|
+
title?: string;
|
|
53
|
+
type?: "object" | "array";
|
|
54
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
55
|
+
items?: IPropertyMetadata;
|
|
66
56
|
}
|
|
67
57
|
}
|
|
68
58
|
//# sourceMappingURL=ISchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISchema.d.ts","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"ISchema.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;;OAKG;IAEH,KAAY,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;IAEzH;;OAEG;IACH,UAAiB,UAAU;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KAChB;IAED;;OAEG;IACH,UAAiB,YAAY;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,OAAO,CAAC;KACvB;IAED;;OAEG;IACH,UAAiB,iBAAiB;QAC9B,IAAI,EAAE,SAAS,CAAC;QAGhB,EAAE,CAAC,EAAE,YAAY,CAAC;QAGlB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QAGjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QAGf,SAAS,CAAC,EAAE,UAAU,EAAE,CAAC;QAGzB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;QAC/C,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC7B;IAED;;OAEG;IACH,UAAiB,OAAO;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;QAC/C,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC7B;CAEA"}
|