@siliconst/metaui 1.0.0 → 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 +22 -34
- package/src/nz/co/siliconst/ui5/metaui/.library +7 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost-dbg.js +300 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.d.ts +130 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeneratorHost.ts +292 -162
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +52 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +29 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +49 -40
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +82 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +82 -56
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus-dbg.js +66 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.d.ts +40 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/EventBus.ts +60 -45
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +73 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +39 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +71 -56
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +146 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +157 -31
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +56 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +37 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +56 -56
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.d.ts +29 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IEventBus.ts +29 -29
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.d.ts +20 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager.ts +21 -26
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +15 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +14 -33
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +58 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +70 -70
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout-dbg.js +24 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.d.ts +15 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.ts +22 -34
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +99 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts +20 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +97 -60
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +103 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts +16 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +119 -102
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +44 -0
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +39 -0
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts +10 -0
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/library.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/library.ts +55 -43
- package/src/nz/co/siliconst/ui5/metaui/manifest.json +35 -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 +55 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.d.ts +24 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BasePlugin.ts +56 -58
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin-dbg.js +42 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/BooleanPlugin.ts +41 -42
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin-dbg.js +69 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DatePlugin.js.map +1 -0
- 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 +67 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/DropdownPlugin.ts +65 -65
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin-dbg.js +56 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/NumberPlugin.ts +56 -55
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin-dbg.js +57 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.d.ts +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/StringPlugin.js.map +1 -0
- 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 +4 -12
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module "nz/co/siliconst/ui5/metaui/interfaces/IPlugin" {
|
|
2
|
+
/**
|
|
3
|
+
* @file IPlugin.ts
|
|
4
|
+
* @description Contract for all discrete UI control generation plugins.
|
|
5
|
+
* Enforces a strict lifecycle for rendering, validation, and dynamic state updates.
|
|
6
|
+
*/
|
|
7
|
+
import Control from "sap/ui/core/Control";
|
|
8
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
9
|
+
export interface IPlugin {
|
|
10
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string): Control;
|
|
11
|
+
validate(): boolean;
|
|
12
|
+
onStateChange(newMetadata: IPropertyMetadata): void;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=IPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPlugin.js","names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare module "nz/co/siliconst/ui5/metaui/interfaces/ISchema" {
|
|
2
|
+
/**
|
|
3
|
+
* @file ISchema.ts
|
|
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.
|
|
7
|
+
*/
|
|
8
|
+
export type FieldType = "string" | "number" | "boolean" | "date" | "dropdown" | "time" | "datetime" | "array" | "object";
|
|
9
|
+
/**
|
|
10
|
+
* Value help structure mapping SAP Key/Text pairs.
|
|
11
|
+
*/
|
|
12
|
+
export interface IValueHelp {
|
|
13
|
+
key: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
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.
|
|
33
|
+
*/
|
|
34
|
+
export interface IPropertyMetadata {
|
|
35
|
+
type: FieldType;
|
|
36
|
+
ui?: IUIDirective;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
minimum?: number;
|
|
40
|
+
maximum?: number;
|
|
41
|
+
pattern?: string;
|
|
42
|
+
precision?: number;
|
|
43
|
+
scale?: number;
|
|
44
|
+
valueHelp?: IValueHelp[];
|
|
45
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
46
|
+
items?: IPropertyMetadata;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The master schema contract ingested by the Engine.
|
|
50
|
+
*/
|
|
51
|
+
export interface ISchema {
|
|
52
|
+
title?: string;
|
|
53
|
+
type?: "object" | "array";
|
|
54
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
55
|
+
items?: IPropertyMetadata;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMapping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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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISchema.js","names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file ISchema.ts
|
|
3
|
-
* @description
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file ISchema.ts
|
|
3
|
+
* @description MetaUI v2 Core Schema Contract.
|
|
4
|
+
* Aligned with standard JSON-Schema syntax (properties, items) for native AI generation,
|
|
5
|
+
* with a proprietary 'ui' directive block for Fiori visual orchestration.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type FieldType = "string" | "number" | "boolean" | "date" | "dropdown" | "time" | "datetime" | "array" | "object";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Value help structure mapping SAP Key/Text pairs.
|
|
12
|
+
*/
|
|
13
|
+
export interface IValueHelp {
|
|
14
|
+
key: string;
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Visual orchestration directives to separate layout from data modeling.
|
|
20
|
+
*/
|
|
21
|
+
export interface IUIDirective {
|
|
22
|
+
label?: string;
|
|
23
|
+
isKey?: boolean;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
widget?: string;
|
|
26
|
+
group?: string;
|
|
27
|
+
visibleOn?: string;
|
|
28
|
+
enabledOn?: string;
|
|
29
|
+
format?: string;
|
|
30
|
+
rows?: number;
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Standard JSON-Schema property definition.
|
|
36
|
+
*/
|
|
37
|
+
export interface IPropertyMetadata {
|
|
38
|
+
type: FieldType;
|
|
39
|
+
|
|
40
|
+
// MetaUI specific orchestration
|
|
41
|
+
ui?: IUIDirective;
|
|
42
|
+
|
|
43
|
+
// Standard validations
|
|
44
|
+
required?: boolean;
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minimum?: number;
|
|
47
|
+
maximum?: number;
|
|
48
|
+
pattern?: string;
|
|
49
|
+
|
|
50
|
+
// Numeric specifics
|
|
51
|
+
precision?: number;
|
|
52
|
+
scale?: number;
|
|
53
|
+
|
|
54
|
+
// Value constraints
|
|
55
|
+
valueHelp?: IValueHelp[];
|
|
56
|
+
|
|
57
|
+
// Nested recursion for objects and arrays
|
|
58
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
59
|
+
items?: IPropertyMetadata;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The master schema contract ingested by the Engine.
|
|
64
|
+
*/
|
|
65
|
+
export interface ISchema {
|
|
66
|
+
title?: string;
|
|
67
|
+
type?: "object" | "array"; // Implicit layout hinting
|
|
68
|
+
properties?: Record<string, IPropertyMetadata>;
|
|
69
|
+
items?: IPropertyMetadata;
|
|
70
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
sap.ui.define(["./FormLayout", "./TableLayout"], function (___FormLayout, ___TableLayout) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file BaseLayout.ts
|
|
6
|
+
* @description Central layout factory that delegates to specific form or table layout engines.
|
|
7
|
+
*/
|
|
8
|
+
const FormLayout = ___FormLayout["FormLayout"];
|
|
9
|
+
const TableLayout = ___TableLayout["TableLayout"];
|
|
10
|
+
class BaseLayout {
|
|
11
|
+
renderForm(properties, modelName = "meta", formTitle, trackPlugin) {
|
|
12
|
+
return FormLayout.build(properties, modelName, formTitle, trackPlugin);
|
|
13
|
+
}
|
|
14
|
+
renderTable(tableMeta, modelName = "meta", tableTitle, trackPlugin) {
|
|
15
|
+
return TableLayout.build(tableMeta, modelName, tableTitle, trackPlugin);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
var __exports = {
|
|
19
|
+
__esModule: true
|
|
20
|
+
};
|
|
21
|
+
__exports.BaseLayout = BaseLayout;
|
|
22
|
+
return __exports;
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=BaseLayout-dbg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLayout-dbg.js","names":["FormLayout","___FormLayout","TableLayout","___TableLayout","BaseLayout","renderForm","properties","modelName","formTitle","trackPlugin","build","renderTable","tableMeta","tableTitle","__exports","__esModule"],"sources":["BaseLayout.ts"],"sourcesContent":["/**\n * @file BaseLayout.ts\n * @description Central layout factory that delegates to specific form or table layout engines.\n */\n\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPropertyMetadata } from \"../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { FormLayout } from \"./FormLayout\";\nimport { TableLayout } from \"./TableLayout\";\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\n\nexport class BaseLayout implements ILayoutManager {\n public renderForm(properties: Record<string, IPropertyMetadata>, modelName: string = \"meta\", formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {\n return FormLayout.build(properties, modelName, formTitle, trackPlugin);\n }\n\n public renderTable(tableMeta: IPropertyMetadata, modelName: string = \"meta\", tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {\n return TableLayout.build(tableMeta, modelName, tableTitle, trackPlugin);\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,UAAU,GAAAC,aAAA;EAAA,MACVC,WAAW,GAAAC,cAAA;EAIb,MAAMC,UAAU,CAA2B;IACvCC,UAAUA,CAACC,UAA6C,EAAEC,SAAiB,GAAG,MAAM,EAAEC,SAAkB,EAAEC,WAAuC,EAAW;MAC/J,OAAOT,UAAU,CAACU,KAAK,CAACJ,UAAU,EAAEC,SAAS,EAAEC,SAAS,EAAEC,WAAW,CAAC;IAC1E;IAEOE,WAAWA,CAACC,SAA4B,EAAEL,SAAiB,GAAG,MAAM,EAAEM,UAAmB,EAAEJ,WAAuC,EAAW;MAChJ,OAAOP,WAAW,CAACQ,KAAK,CAACE,SAAS,EAAEL,SAAS,EAAEM,UAAU,EAAEJ,WAAW,CAAC;IAC3E;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAV,UAAA,GAAAA,UAAA;EAAA,OAAAU,SAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module "nz/co/siliconst/ui5/metaui/layouts/BaseLayout" {
|
|
2
|
+
/**
|
|
3
|
+
* @file BaseLayout.ts
|
|
4
|
+
* @description Central layout factory that delegates to specific form or table layout engines.
|
|
5
|
+
*/
|
|
6
|
+
import { ILayoutManager } from "nz/co/siliconst/ui5/metaui/interfaces/ILayoutManager";
|
|
7
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
8
|
+
import Control from "sap/ui/core/Control";
|
|
9
|
+
import { IPlugin } from "nz/co/siliconst/ui5/metaui/interfaces/IPlugin";
|
|
10
|
+
export class BaseLayout implements ILayoutManager {
|
|
11
|
+
renderForm(properties: Record<string, IPropertyMetadata>, modelName?: string, formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
12
|
+
renderTable(tableMeta: IPropertyMetadata, modelName?: string, tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=BaseLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLayout.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/layouts/BaseLayout.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;OAGG;IAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;IACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IAExE,MAAa,UAAW,YAAW,cAAc;QACtC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAAE,SAAS,GAAE,MAAe,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO;QAI3J,WAAW,CAAC,SAAS,EAAE,iBAAiB,EAAE,SAAS,GAAE,MAAe,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO;KAGtJ;CAEA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
sap.ui.define(["./FormLayout","./TableLayout"],function(e,r){"use strict";const t=e["FormLayout"];const u=r["TableLayout"];class a{renderForm(e,r="meta",u,a){return t.build(e,r,u,a)}renderTable(e,r="meta",t,a){return u.build(e,r,t,a)}}var o={__esModule:true};o.BaseLayout=a;return o});
|
|
2
|
+
//# sourceMappingURL=BaseLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLayout.js","names":["FormLayout","___FormLayout","TableLayout","___TableLayout","BaseLayout","renderForm","properties","modelName","formTitle","trackPlugin","build","renderTable","tableMeta","tableTitle","__exports","__esModule"],"sources":["BaseLayout.ts"],"sourcesContent":["/**\n * @file BaseLayout.ts\n * @description Central layout factory that delegates to specific form or table layout engines.\n */\n\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPropertyMetadata } from \"../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { FormLayout } from \"./FormLayout\";\nimport { TableLayout } from \"./TableLayout\";\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\n\nexport class BaseLayout implements ILayoutManager {\n public renderForm(properties: Record<string, IPropertyMetadata>, modelName: string = \"meta\", formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {\n return FormLayout.build(properties, modelName, formTitle, trackPlugin);\n }\n\n public renderTable(tableMeta: IPropertyMetadata, modelName: string = \"meta\", tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {\n return TableLayout.build(tableMeta, modelName, tableTitle, trackPlugin);\n }\n}\n"],"mappings":"0EAAA,MAQSA,EAAUC,EAAA,oBACVC,EAAWC,EAAA,eAIb,MAAMC,EACFC,WAAWC,EAA+CC,EAAoB,OAAQC,EAAoBC,GAC7G,OAAOT,EAAWU,MAAMJ,EAAYC,EAAWC,EAAWC,EAC9D,CAEOE,YAAYC,EAA8BL,EAAoB,OAAQM,EAAqBJ,GAC9F,OAAOP,EAAYQ,MAAME,EAAWL,EAAWM,EAAYJ,EAC/D,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAV,aAAA,OAAAU,CAAA","ignoreList":[]}
|
|
@@ -1,34 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file BaseLayout.ts
|
|
3
|
-
* @description Central layout factory that delegates to specific form or table layout engines.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return FormLayout.build(schema.rootFields);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Constructs a responsive table layout container.
|
|
28
|
-
* @param tableMeta The metadata defining the table columns.
|
|
29
|
-
* @returns A UI5 Table control (sap.m.Table).
|
|
30
|
-
*/
|
|
31
|
-
public renderTable(tableMeta: ITableMetadata): Control {
|
|
32
|
-
return TableLayout.build(tableMeta);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file BaseLayout.ts
|
|
3
|
+
* @description Central layout factory that delegates to specific form or table layout engines.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ILayoutManager } from "../interfaces/ILayoutManager";
|
|
7
|
+
import { IPropertyMetadata } from "../interfaces/ISchema";
|
|
8
|
+
import Control from "sap/ui/core/Control";
|
|
9
|
+
import { FormLayout } from "./FormLayout";
|
|
10
|
+
import { TableLayout } from "./TableLayout";
|
|
11
|
+
|
|
12
|
+
import { IPlugin } from "../interfaces/IPlugin";
|
|
13
|
+
|
|
14
|
+
export class BaseLayout implements ILayoutManager {
|
|
15
|
+
public renderForm(properties: Record<string, IPropertyMetadata>, modelName: string = "meta", formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {
|
|
16
|
+
return FormLayout.build(properties, modelName, formTitle, trackPlugin);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public renderTable(tableMeta: IPropertyMetadata, modelName: string = "meta", tableTitle?: string, trackPlugin?: (plugin: IPlugin) => void): Control {
|
|
20
|
+
return TableLayout.build(tableMeta, modelName, tableTitle, trackPlugin);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
sap.ui.define(["sap/ui/layout/form/SimpleForm", "sap/m/Label", "sap/ui/core/Title", "../core/PluginRegistry"], function (SimpleForm, Label, Title, ___core_PluginRegistry) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const PluginRegistry = ___core_PluginRegistry["PluginRegistry"];
|
|
5
|
+
class FormLayout {
|
|
6
|
+
/**
|
|
7
|
+
* Builds a SimpleForm with ResponsiveGridLayout, injecting the requested plugins.
|
|
8
|
+
* @param properties The dictionary of fields to render.
|
|
9
|
+
* @param modelName The dynamic model name.
|
|
10
|
+
* @param formTitle Optional title for the form block.
|
|
11
|
+
* @param trackPlugin Optional callback to track instantiated plugins.
|
|
12
|
+
*/
|
|
13
|
+
static build(properties, modelName = "meta", formTitle, trackPlugin) {
|
|
14
|
+
const form = new SimpleForm({
|
|
15
|
+
editable: true,
|
|
16
|
+
title: formTitle,
|
|
17
|
+
layout: "ResponsiveGridLayout",
|
|
18
|
+
labelSpanXL: 4,
|
|
19
|
+
labelSpanL: 4,
|
|
20
|
+
labelSpanM: 4,
|
|
21
|
+
labelSpanS: 12,
|
|
22
|
+
adjustLabelSpan: false,
|
|
23
|
+
emptySpanXL: 0,
|
|
24
|
+
emptySpanL: 0,
|
|
25
|
+
emptySpanM: 0,
|
|
26
|
+
emptySpanS: 0,
|
|
27
|
+
columnsXL: 1,
|
|
28
|
+
columnsL: 1,
|
|
29
|
+
columnsM: 1,
|
|
30
|
+
singleContainerFullSize: false
|
|
31
|
+
});
|
|
32
|
+
const registry = PluginRegistry.getInstance();
|
|
33
|
+
|
|
34
|
+
// Group fields by their ui.group directive
|
|
35
|
+
const groups = {};
|
|
36
|
+
const DEFAULT_GROUP = "__DEFAULT__";
|
|
37
|
+
for (const key of Object.keys(properties)) {
|
|
38
|
+
const meta = properties[key];
|
|
39
|
+
const groupName = meta.ui?.group || DEFAULT_GROUP;
|
|
40
|
+
if (!groups[groupName]) groups[groupName] = [];
|
|
41
|
+
groups[groupName].push({
|
|
42
|
+
key,
|
|
43
|
+
meta
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Render groups
|
|
48
|
+
for (const groupName of Object.keys(groups)) {
|
|
49
|
+
if (groupName !== DEFAULT_GROUP) {
|
|
50
|
+
form.addContent(new Title({
|
|
51
|
+
text: groupName
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
groups[groupName].forEach(field => {
|
|
55
|
+
try {
|
|
56
|
+
const label = new Label({
|
|
57
|
+
text: field.meta.ui?.label || field.key,
|
|
58
|
+
required: field.meta.required
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Attach visibility condition to label and control container logic
|
|
62
|
+
if (field.meta.ui?.visibleOn) {
|
|
63
|
+
const expr = `{= ${field.meta.ui.visibleOn.replace(/\$root\./g, `${modelName}>/`).replace(/\./g, '/')} }`;
|
|
64
|
+
label.bindProperty("visible", {
|
|
65
|
+
parts: [{
|
|
66
|
+
path: "meta>/"
|
|
67
|
+
}],
|
|
68
|
+
formatter: () => false
|
|
69
|
+
}); // temporary, condition engine does this usually
|
|
70
|
+
}
|
|
71
|
+
const plugin = registry.getPlugin(field.meta.type, field.meta.ui?.widget);
|
|
72
|
+
if (trackPlugin) trackPlugin(plugin);
|
|
73
|
+
const control = plugin.render(field.meta, `/${field.key}`, modelName);
|
|
74
|
+
if (field.meta.ui?.fullWidth) {
|
|
75
|
+
sap.ui.require(["sap/ui/layout/GridData"], GridData => {
|
|
76
|
+
control.setLayoutData(new GridData({
|
|
77
|
+
span: "XL12 L12 M12 S12"
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
form.addContent(label);
|
|
82
|
+
form.addContent(control);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
sap.ui.require(["sap/base/Log"], Log => {
|
|
85
|
+
if (Log) Log.error(`[MetaUI] Failed to render field ${field.key}`, error.message, "FormLayout");
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return form;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
var __exports = {
|
|
94
|
+
__esModule: true
|
|
95
|
+
};
|
|
96
|
+
__exports.FormLayout = FormLayout;
|
|
97
|
+
return __exports;
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=FormLayout-dbg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLayout-dbg.js","names":["PluginRegistry","___core_PluginRegistry","FormLayout","build","properties","modelName","formTitle","trackPlugin","form","SimpleForm","editable","title","layout","labelSpanXL","labelSpanL","labelSpanM","labelSpanS","adjustLabelSpan","emptySpanXL","emptySpanL","emptySpanM","emptySpanS","columnsXL","columnsL","columnsM","singleContainerFullSize","registry","getInstance","groups","DEFAULT_GROUP","key","Object","keys","meta","groupName","ui","group","push","addContent","Title","text","forEach","field","label","Label","required","visibleOn","expr","replace","bindProperty","parts","path","formatter","plugin","getPlugin","type","widget","control","render","fullWidth","sap","require","GridData","setLayoutData","span","error","Log","message","__exports","__esModule"],"sources":["FormLayout.ts"],"sourcesContent":["/**\n * @file FormLayout.ts\n * @description Generates a fully responsive SAP Fiori Form layout (SimpleForm).\n */\n\nimport SimpleForm from \"sap/ui/layout/form/SimpleForm\";\nimport Label from \"sap/m/Label\";\nimport Title from \"sap/ui/core/Title\";\nimport { IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { PluginRegistry } from \"../core/PluginRegistry\";\nimport { IPlugin } from \"../interfaces/IPlugin\";\n\nexport class FormLayout {\n /**\n * Builds a SimpleForm with ResponsiveGridLayout, injecting the requested plugins.\n * @param properties The dictionary of fields to render.\n * @param modelName The dynamic model name.\n * @param formTitle Optional title for the form block.\n * @param trackPlugin Optional callback to track instantiated plugins.\n */\n public static build(properties: Record<string, IPropertyMetadata>, modelName: string = \"meta\", formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): SimpleForm {\n const form = new SimpleForm({\n editable: true,\n title: formTitle,\n layout: \"ResponsiveGridLayout\",\n labelSpanXL: 4,\n labelSpanL: 4,\n labelSpanM: 4,\n labelSpanS: 12,\n adjustLabelSpan: false,\n emptySpanXL: 0,\n emptySpanL: 0,\n emptySpanM: 0,\n emptySpanS: 0,\n columnsXL: 1,\n columnsL: 1,\n columnsM: 1,\n singleContainerFullSize: false\n });\n\n const registry = PluginRegistry.getInstance();\n \n // Group fields by their ui.group directive\n const groups: Record<string, { key: string; meta: IPropertyMetadata }[]> = {};\n const DEFAULT_GROUP = \"__DEFAULT__\";\n \n for (const key of Object.keys(properties)) {\n const meta = properties[key];\n const groupName = meta.ui?.group || DEFAULT_GROUP;\n if (!groups[groupName]) groups[groupName] = [];\n groups[groupName].push({ key, meta });\n }\n\n // Render groups\n for (const groupName of Object.keys(groups)) {\n if (groupName !== DEFAULT_GROUP) {\n form.addContent(new Title({ text: groupName }));\n }\n \n groups[groupName].forEach((field) => {\n try {\n const label = new Label({\n text: field.meta.ui?.label || field.key,\n required: field.meta.required\n });\n\n // Attach visibility condition to label and control container logic\n if (field.meta.ui?.visibleOn) {\n const expr = `{= ${field.meta.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n label.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false}); // temporary, condition engine does this usually\n }\n\n const plugin = registry.getPlugin(field.meta.type, field.meta.ui?.widget);\n if (trackPlugin) trackPlugin(plugin);\n const control = plugin.render(field.meta, `/${field.key}`, modelName);\n\n if (field.meta.ui?.fullWidth) {\n sap.ui.require([\"sap/ui/layout/GridData\"], (GridData: any) => {\n control.setLayoutData(new GridData({\n span: \"XL12 L12 M12 S12\"\n }));\n });\n }\n\n form.addContent(label);\n form.addContent(control);\n } catch (error) {\n sap.ui.require([\"sap/base/Log\"], (Log: any) => {\n if (Log) Log.error(`[MetaUI] Failed to render field ${field.key}`, (error as Error).message, \"FormLayout\");\n });\n }\n });\n }\n\n return form;\n }\n}\n"],"mappings":";;;QASSA,cAAc,GAAAC,sBAAA;EAGhB,MAAMC,UAAU,CAAC;IACpB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,OAAcC,KAAKA,CAACC,UAA6C,EAAEC,SAAiB,GAAG,MAAM,EAAEC,SAAkB,EAAEC,WAAuC,EAAc;MACpK,MAAMC,IAAI,GAAG,IAAIC,UAAU,CAAC;QACxBC,QAAQ,EAAE,IAAI;QACdC,KAAK,EAAEL,SAAS;QAChBM,MAAM,EAAE,sBAAsB;QAC9BC,WAAW,EAAE,CAAC;QACdC,UAAU,EAAE,CAAC;QACbC,UAAU,EAAE,CAAC;QACbC,UAAU,EAAE,EAAE;QACdC,eAAe,EAAE,KAAK;QACtBC,WAAW,EAAE,CAAC;QACdC,UAAU,EAAE,CAAC;QACbC,UAAU,EAAE,CAAC;QACbC,UAAU,EAAE,CAAC;QACbC,SAAS,EAAE,CAAC;QACZC,QAAQ,EA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AO,EAAE,YAAY,CAAC;YAC9G,CAAC,CAAC;UACN;QACJ,CAAC,CAAC;MACN;MAEA,OAAO3D,IAAI;IACf;EACJ;EAAC,IAAA4D,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlE,UAAA,GAAAA,UAAA;EAAA,OAAAkE,SAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare module "nz/co/siliconst/ui5/metaui/layouts/FormLayout" {
|
|
2
|
+
/**
|
|
3
|
+
* @file FormLayout.ts
|
|
4
|
+
* @description Generates a fully responsive SAP Fiori Form layout (SimpleForm).
|
|
5
|
+
*/
|
|
6
|
+
import SimpleForm from "sap/ui/layout/form/SimpleForm";
|
|
7
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
8
|
+
import { IPlugin } from "nz/co/siliconst/ui5/metaui/interfaces/IPlugin";
|
|
9
|
+
export class FormLayout {
|
|
10
|
+
/**
|
|
11
|
+
* Builds a SimpleForm with ResponsiveGridLayout, injecting the requested plugins.
|
|
12
|
+
* @param properties The dictionary of fields to render.
|
|
13
|
+
* @param modelName The dynamic model name.
|
|
14
|
+
* @param formTitle Optional title for the form block.
|
|
15
|
+
* @param trackPlugin Optional callback to track instantiated plugins.
|
|
16
|
+
*/
|
|
17
|
+
static build(properties: Record<string, IPropertyMetadata>, modelName?: string, formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): SimpleForm;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=FormLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLayout.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;OAGG;IAEH,OAAO,UAAU,MAAM,+BAA+B,CAAC;IAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IAExE,MAAa,UAAU;QACnB;;;;;;WAMG;eACW,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAAE,SAAS,GAAE,MAAe,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,UAAU;KA4E1K;CAEA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
sap.ui.define(["sap/ui/layout/form/SimpleForm","sap/m/Label","sap/ui/core/Title","../core/PluginRegistry"],function(e,t,a,n){"use strict";const i=n["PluginRegistry"];class s{static build(n,s="meta",o,r){const l=new e({editable:true,title:o,layout:"ResponsiveGridLayout",labelSpanXL:4,labelSpanL:4,labelSpanM:4,labelSpanS:12,adjustLabelSpan:false,emptySpanXL:0,emptySpanL:0,emptySpanM:0,emptySpanS:0,columnsXL:1,columnsL:1,columnsM:1,singleContainerFullSize:false});const u=i.getInstance();const p={};const c="__DEFAULT__";for(const e of Object.keys(n)){const t=n[e];const a=t.ui?.group||c;if(!p[a])p[a]=[];p[a].push({key:e,meta:t})}for(const e of Object.keys(p)){if(e!==c){l.addContent(new a({text:e}))}p[e].forEach(e=>{try{const a=new t({text:e.meta.ui?.label||e.key,required:e.meta.required});if(e.meta.ui?.visibleOn){const t=`{= ${e.meta.ui.visibleOn.replace(/\$root\./g,`${s}>/`).replace(/\./g,"/")} }`;a.bindProperty("visible",{parts:[{path:"meta>/"}],formatter:()=>false})}const n=u.getPlugin(e.meta.type,e.meta.ui?.widget);if(r)r(n);const i=n.render(e.meta,`/${e.key}`,s);if(e.meta.ui?.fullWidth){sap.ui.require(["sap/ui/layout/GridData"],e=>{i.setLayoutData(new e({span:"XL12 L12 M12 S12"}))})}l.addContent(a);l.addContent(i)}catch(t){sap.ui.require(["sap/base/Log"],a=>{if(a)a.error(`[MetaUI] Failed to render field ${e.key}`,t.message,"FormLayout")})}})}return l}}var o={__esModule:true};o.FormLayout=s;return o});
|
|
2
|
+
//# sourceMappingURL=FormLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLayout.js","names":["PluginRegistry","___core_PluginRegistry","FormLayout","build","properties","modelName","formTitle","trackPlugin","form","SimpleForm","editable","title","layout","labelSpanXL","labelSpanL","labelSpanM","labelSpanS","adjustLabelSpan","emptySpanXL","emptySpanL","emptySpanM","emptySpanS","columnsXL","columnsL","columnsM","singleContainerFullSize","registry","getInstance","groups","DEFAULT_GROUP","key","Object","keys","meta","groupName","ui","group","push","addContent","Title","text","forEach","field","label","Label","required","visibleOn","expr","replace","bindProperty","parts","path","formatter","plugin","getPlugin","type","widget","control","render","fullWidth","sap","require","GridData","setLayoutData","span","error","Log","message","__exports","__esModule"],"sources":["FormLayout.ts"],"sourcesContent":["/**\n * @file FormLayout.ts\n * @description Generates a fully responsive SAP Fiori Form layout (SimpleForm).\n */\n\nimport SimpleForm from \"sap/ui/layout/form/SimpleForm\";\nimport Label from \"sap/m/Label\";\nimport Title from \"sap/ui/core/Title\";\nimport { IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { PluginRegistry } from \"../core/PluginRegistry\";\nimport { IPlugin } from \"../interfaces/IPlugin\";\n\nexport class FormLayout {\n /**\n * Builds a SimpleForm with ResponsiveGridLayout, injecting the requested plugins.\n * @param properties The dictionary of fields to render.\n * @param modelName The dynamic model name.\n * @param formTitle Optional title for the form block.\n * @param trackPlugin Optional callback to track instantiated plugins.\n */\n public static build(properties: Record<string, IPropertyMetadata>, modelName: string = \"meta\", formTitle?: string, trackPlugin?: (plugin: IPlugin) => void): SimpleForm {\n const form = new SimpleForm({\n editable: true,\n title: formTitle,\n layout: \"ResponsiveGridLayout\",\n labelSpanXL: 4,\n labelSpanL: 4,\n labelSpanM: 4,\n labelSpanS: 12,\n adjustLabelSpan: false,\n emptySpanXL: 0,\n emptySpanL: 0,\n emptySpanM: 0,\n emptySpanS: 0,\n columnsXL: 1,\n columnsL: 1,\n columnsM: 1,\n singleContainerFullSize: false\n });\n\n const registry = PluginRegistry.getInstance();\n \n // Group fields by their ui.group directive\n const groups: Record<string, { key: string; meta: IPropertyMetadata }[]> = {};\n const DEFAULT_GROUP = \"__DEFAULT__\";\n \n for (const key of Object.keys(properties)) {\n const meta = properties[key];\n const groupName = meta.ui?.group || DEFAULT_GROUP;\n if (!groups[groupName]) groups[groupName] = [];\n groups[groupName].push({ key, meta });\n }\n\n // Render groups\n for (const groupName of Object.keys(groups)) {\n if (groupName !== DEFAULT_GROUP) {\n form.addContent(new Title({ text: groupName }));\n }\n \n groups[groupName].forEach((field) => {\n try {\n const label = new Label({\n text: field.meta.ui?.label || field.key,\n required: field.meta.required\n });\n\n // Attach visibility condition to label and control container logic\n if (field.meta.ui?.visibleOn) {\n const expr = `{= ${field.meta.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n label.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false}); // temporary, condition engine does this usually\n }\n\n const plugin = registry.getPlugin(field.meta.type, field.meta.ui?.widget);\n if (trackPlugin) trackPlugin(plugin);\n const control = plugin.render(field.meta, `/${field.key}`, modelName);\n\n if (field.meta.ui?.fullWidth) {\n sap.ui.require([\"sap/ui/layout/GridData\"], (GridData: any) => {\n control.setLayoutData(new GridData({\n span: \"XL12 L12 M12 S12\"\n }));\n });\n }\n\n form.addContent(label);\n form.addContent(control);\n } catch (error) {\n sap.ui.require([\"sap/base/Log\"], (Log: any) => {\n if (Log) Log.error(`[MetaUI] Failed to render field ${field.key}`, (error as Error).message, \"FormLayout\");\n });\n }\n });\n }\n\n return form;\n }\n}\n"],"mappings":"gJASSA,EAAcC,EAAA,kBAGhB,MAAMC,EAQT,YAAcC,CAAMC,EAA+CC,EAAoB,OAAQC,EAAoBC,GAC/G,MAAMC,EAA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