@siliconst/metaui 1.4.10 → 1.4.13
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 +4 -178
- package/package.json +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +46 -8
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +27 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +41 -9
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +132 -18
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +14 -9
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +117 -18
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +1 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +1 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +9 -6
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +9 -6
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +56 -49
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +9 -4
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +67 -50
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +0 -2
- 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 +0 -2
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +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 +0 -3
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +4 -6
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +34 -9
- 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 +16 -2
- 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 +36 -5
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +19 -2
- 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 +9 -0
- 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 +21 -7
- package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js +3 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Registry.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Registry.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Registry.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Registry.ts +3 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +54 -34
- 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 +3 -1
- 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 +55 -34
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +7 -6
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +7 -6
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +40 -11
- 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 +6 -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 +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 +39 -13
- 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 +13 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +15 -0
- 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 +1 -0
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +1 -0
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +41 -40
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts +1 -0
- 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 +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +77 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +67 -7
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +5 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +5 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +130 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +39 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +127 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +3 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +4 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +3 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sap.ui.define(["sap/m/
|
|
1
|
+
sap.ui.define(["sap/m/IllustratedMessage", "sap/ui/core/Messaging", "../../../utils/Logger", "sap/ui/core/message/Message", "sap/ui/core/library"], function (IllustratedMessage, Messaging, _____utils_Logger, Message, coreLibrary) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
const Logger = _____utils_Logger["Logger"];
|
|
@@ -16,28 +16,28 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Registers a control and all its children with the global MessageManager.
|
|
19
|
+
* (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
|
|
20
|
+
* on every keystroke. MetaUI handles valueState manually via plugins).
|
|
19
21
|
*/
|
|
20
22
|
registerObject(control) {
|
|
21
|
-
|
|
22
|
-
Messaging.registerObject(control, true); // true = recurse all children
|
|
23
|
-
}
|
|
23
|
+
// Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Unregisters a control from the global MessageManager.
|
|
28
28
|
*/
|
|
29
29
|
unregisterObject(control) {
|
|
30
|
-
|
|
31
|
-
Messaging.unregisterObject(control);
|
|
32
|
-
}
|
|
30
|
+
// Do nothing
|
|
33
31
|
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Clears all messages from the global MessageManager.
|
|
37
|
-
*/
|
|
38
32
|
removeAllMessages() {
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
const stateManager = this.host.getStateManager();
|
|
34
|
+
if (stateManager && this.host.getProperty("useMessageManager")) {
|
|
35
|
+
const messageManager = Messaging;
|
|
36
|
+
const messages = messageManager.getMessageModel().getData();
|
|
37
|
+
const messagesToRemove = messages.filter(m => m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId());
|
|
38
|
+
if (messagesToRemove && messagesToRemove.length > 0) {
|
|
39
|
+
messageManager.removeMessages(messagesToRemove);
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -52,53 +52,61 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
|
|
|
52
52
|
} else {
|
|
53
53
|
Logger.warn(`[MetaUI Validation Error] Global - ${text}`);
|
|
54
54
|
}
|
|
55
|
-
if (this.host.getProperty("useMessageManager")) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}));
|
|
65
|
-
});
|
|
55
|
+
if (this.host.getProperty("useMessageManager") === true) {
|
|
56
|
+
const messageManager = Messaging;
|
|
57
|
+
const stateManager = this.host.getStateManager();
|
|
58
|
+
messageManager.addMessages(new Message({
|
|
59
|
+
message: displayText,
|
|
60
|
+
type: coreLibrary.MessageType.Error,
|
|
61
|
+
target: targetPath,
|
|
62
|
+
processor: stateManager?.getModel()
|
|
63
|
+
}));
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
/**
|
|
70
68
|
* Imperatively invalidates a field and highlights it with an error message.
|
|
69
|
+
* Uses a specific 'CustomError' code to distinguish it from internal schema validations.
|
|
70
|
+
*
|
|
71
|
+
* @param fieldPath The internal JSON path of the field to highlight.
|
|
72
|
+
* @param message The custom error message to display.
|
|
71
73
|
*/
|
|
72
74
|
addCustomError(fieldPath, message) {
|
|
73
|
-
|
|
75
|
+
if (this.host.getProperty("useMessageManager") !== true) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
74
78
|
const stateManager = this.host.getStateManager();
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
const messageManager = Messaging;
|
|
78
|
-
messageManager.addMessages(new MessageClass({
|
|
79
|
-
message: message,
|
|
80
|
-
type: coreLibrary.MessageType.Error,
|
|
81
|
-
target: `/${fieldPath.replace(/^\//, "")}`,
|
|
82
|
-
processor: stateManager.getModel()
|
|
83
|
-
}));
|
|
84
|
-
});
|
|
79
|
+
if (!stateManager) {
|
|
80
|
+
return;
|
|
85
81
|
}
|
|
82
|
+
Messaging.addMessages(new Message({
|
|
83
|
+
message: message,
|
|
84
|
+
type: coreLibrary.MessageType.Error,
|
|
85
|
+
target: `/${fieldPath.replace(/^\//, "")}`,
|
|
86
|
+
processor: stateManager.getModel(),
|
|
87
|
+
code: "CustomError"
|
|
88
|
+
}));
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
/**
|
|
89
|
-
* Reverts a custom error state on a field.
|
|
92
|
+
* Reverts a custom error state on a field, safely ignoring native schema validations.
|
|
93
|
+
*
|
|
94
|
+
* @param fieldPath The internal JSON path of the field to clear.
|
|
90
95
|
*/
|
|
91
96
|
clearCustomError(fieldPath) {
|
|
92
|
-
|
|
97
|
+
if (this.host.getProperty("useMessageManager") !== true) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
93
100
|
const stateManager = this.host.getStateManager();
|
|
94
|
-
if (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
if (!stateManager) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const target = `/${fieldPath.replace(/^\//, "")}`;
|
|
105
|
+
const processorId = stateManager.getModel().getId();
|
|
106
|
+
const messages = Messaging.getMessageModel().getData();
|
|
107
|
+
const messagesToRemove = messages.filter(m => m.getTarget() === target && m.getCode() === "CustomError" && m.getMessageProcessor()?.getId() === processorId);
|
|
108
|
+
if (messagesToRemove.length > 0) {
|
|
109
|
+
Messaging.removeMessages(messagesToRemove);
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
112
|
|
|
@@ -107,10 +115,9 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
|
|
|
107
115
|
*/
|
|
108
116
|
mountCrashBoundary(error) {
|
|
109
117
|
Logger.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.", error.message, "ValidationDelegate");
|
|
110
|
-
const errorPage = new
|
|
111
|
-
|
|
112
|
-
description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
|
|
113
|
-
icon: "sap-icon://error"
|
|
118
|
+
const errorPage = new IllustratedMessage({
|
|
119
|
+
title: "UI Generation Failed",
|
|
120
|
+
description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
|
|
114
121
|
});
|
|
115
122
|
this.host.setAggregation("_content", errorPage);
|
|
116
123
|
}
|
package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","getProperty","Messaging","unregisterObject","removeAllMessages","pushMessage","path","text","targetPath","replace","displayText","warn","sap","ui","require","MessageClass","messageManager","stateManager","getStateManager","addMessages","message","type","coreLibrary","MessageType","Error","target","processor","getModel","addCustomError","fieldPath","useMessageManager","clearCustomError","messages","getMessageModel","getData","messageToRemove","find","m","getTarget","getMessageProcessor","getId","removeMessages","mountCrashBoundary","error","errorPage","MessagePage","description","icon","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import MessagePage from \"sap/m/MessagePage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n */\n public registerObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.registerObject(control, true); // true = recurse all children\n }\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.unregisterObject(control);\n }\n }\n\n /**\n * Clears all messages from the global MessageManager.\n */\n public removeAllMessages(): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.removeAllMessages();\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\")) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n });\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel()\n }));\n });\n }\n }\n\n /**\n * Reverts a custom error state on a field.\n */\n public clearCustomError(fieldPath: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n\n const messageToRemove = messages.find((m: sap.ui.core.message.Message) =>\n m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messageToRemove) {\n messageManager.removeMessages(messageToRemove);\n }\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new MessagePage({\n text: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\",\n icon: \"sap-icon://error\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C,IAAI,IAAI,CAACF,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACH,cAAc,CAACC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;MAC7C;IACJ;;IAEA;AACJ;AACA;IACWG,gBAAgBA,CAACH,OAAgB,EAAQ;MAC5C,IAAI,IAAI,CAACF,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACC,gBAAgB,CAACH,OAAO,CAAC;MACvC;IACJ;;IAEA;AACJ;AACA;IACWI,iBAAiBA,CAAA,EAAS;MAC7B,IAAI,IAAI,CAACN,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACE,iBAAiB,CAAC,CAAC;MACjC;IACJ;;IAEA;AACJ;AACA;IACWC,WAAWA,CAACC,IAAY,EAAEC,IAAY,EAAQ;MACjD,MAAMC,UAAU,GAAGF,IAAI,GAAG,IAAIA,IAAI,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;MAC5D,MAAMC,WAAW,GAAGJ,IAAI,GAAG,UAAUA,IAAI,MAAMC,IAAI,EAAE,GAAGA,IAAI;MAE5D,IAAID,IAAI,EAAE;QACNZ,MAAM,CAACiB,IAAI,CAAC,6BAA6BD,WAAW,EAAE,CAAC;MAC3D,CAAC,MAAM;QACHhB,MAAM,CAACiB,IAAI,CAAC,sCAAsCJ,IAAI,EAAE,CAAC;MAC7D;MAEA,IAAI,IAAI,CAACT,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CW,GAAG,CAACC,EAAE,CAACC,OAAO,CAAC,CAAC,6BAA6B,CAAC,EAAGC,YAAkE,IAAK;UACpH,MAAMC,cAAc,GAAGd,SAAS;UAChC,MAAMe,YAAY,GAAG,IAAI,CAACnB,IAAI,CAACoB,eAAe,CAAC,CAAC;UAChDF,cAAc,CAACG,WAAW,CAAC,IAAIJ,YAAY,CAAC;YACxCK,OAAO,EAAEV,WAAW;YACpBW,IAAI,EAAEC,WAAW,CAACC,WAAW,CAACC,KAAK;YACnCC,MAAM,EAAEjB,UAAU;YAClBkB,SAAS,EAAET,YAAY,EAAEU,QAAQ,CAAC;UACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;MACN;IACJ;;IAEA;AACJ;AACA;IACWC,cAAcA,CAACC,SAAiB,EAAET,OAAe,EAAQ;MAC5D,MAAMU,iBAAiB,GAAG,IAAI,CAAChC,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAY;MAC/E,MAAMgB,YAAY,GAAG,IAAI,CAACnB,IAAI,CAACoB,eAAe,CAAC,CAAC;MAChD,IAAIY,iBAAiB,IAAIb,YAAY,EAAE;QACnCL,GAAG,CAACC,EAAE,CAACC,OAAO,CAAC,CAAC,6BAA6B,CAAC,EAAGC,YAAkE,IAAK;UACpH,MAAMC,cAAc,GAAGd,SAAS;UAChCc,cAAc,CAACG,WAAW,CAAC,IAAIJ,YAAY,CAAC;YACxCK,OAAO,EAAEA,OAAO;YAChBC,IAAI,EAAEC,WAAW,CAACC,WAAW,CAACC,KAAK;YACnCC,MAAM,EAAE,IAAII,SAAS,CAACpB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;YAC1CiB,SAAS,EAAET,YAAY,CAACU,QAAQ,CAAC;UACrC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;MACN;IACJ;;IAEA;AACJ;AACA;IACWI,gBAAgBA,CAACF,SAAiB,EAAQ;MAC7C,MAAMC,iBAAiB,GAAG,IAAI,CAAChC,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAY;MAC/E,MAAMgB,YAAY,GAAG,IAAI,CAACnB,IAAI,CAACoB,eAAe,CAAC,CAAC;MAChD,IAAIY,iBAAiB,IAAIb,YAAY,EAAE;QACnC,MAAMD,cAAc,GAAGd,SAAS;QAChC,MAAM8B,QAAQ,GAAGhB,cAAc,CAACiB,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;QAC3D,MAAMT,MAAM,GAAG,IAAII,SAAS,CAACpB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;QAEjD,MAAM0B,eAAe,GAAGH,QAAQ,CAACI,IAAI,CAAEC,CAA8B,IACjEA,CAAC,CAACC,SAAS,CAAC,CAAC,KAAKb,MAAM,IAAIY,CAAC,CAACE,mBAAmB,CAAC,CAAC,IAAIF,CAAC,CAACE,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKvB,YAAY,CAACU,QAAQ,CAAC,CAAC,CAACa,KAAK,CAAC,CAC7H,CAAC;QACD,IAAIL,eAAe,EAAE;UACjBnB,cAAc,CAACyB,cAAc,CAACN,eAAe,CAAC;QAClD;MACJ;IACJ;;IAEA;AACJ;AACA;IACWO,kBAAkBA,CAACC,KAAY,EAAQ;MAC1CjD,MAAM,CAACiD,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACvB,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMwB,SAAS,GAAG,IAAIC,WAAW,CAAC;QAC9BtC,IAAI,EAAE,sBAAsB;QAC5BuC,WAAW,EAAE,+FAA+F;QAC5GC,IAAI,EAAE;MACV,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ;AACJ;AACA;IACWC,gBAAgBA,CAACD,OAAgB,EAAQ;MAC5C;IAAA;IAGGE,iBAAiBA,CAAA,EAAS;MAC7B,MAAMC,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAID,YAAY,IAAI,IAAI,CAACL,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5D,MAAMC,cAAc,GAAGC,SAAS;QAChC,MAAMC,QAAQ,GAAGF,cAAc,CAACG,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;QAC3D,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAAEC,CAA8B,IACpEA,CAAC,CAACC,mBAAmB,CAAC,CAAC,IAAID,CAAC,CAACC,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKZ,YAAY,CAACa,QAAQ,CAAC,CAAC,CAACD,KAAK,CAAC,CACjG,CAAC;QACD,IAAIJ,gBAAgB,IAAIA,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;UACjDX,cAAc,CAACY,cAAc,CAACP,gBAAgB,CAAC;QACnD;MACJ;IACJ;;IAEA;AACJ;AACA;IACWQ,WAAWA,CAACC,IAAY,EAAEC,IAAY,EAAQ;MACjD,MAAMC,UAAU,GAAGF,IAAI,GAAG,IAAIA,IAAI,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;MAC5D,MAAMC,WAAW,GAAGJ,IAAI,GAAG,UAAUA,IAAI,MAAMC,IAAI,EAAE,GAAGA,IAAI;MAE5D,IAAID,IAAI,EAAE;QACN1B,MAAM,CAAC+B,IAAI,CAAC,6BAA6BD,WAAW,EAAE,CAAC;MAC3D,CAAC,MAAM;QACH9B,MAAM,CAAC+B,IAAI,CAAC,sCAAsCJ,IAAI,EAAE,CAAC;MAC7D;MAEA,IAAI,IAAI,CAACvB,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE;QACrD,MAAMC,cAAc,GAAGC,SAAS;QAChC,MAAMJ,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;QAChDE,cAAc,CAACoB,WAAW,CAAC,IAAIC,OAAO,CAAC;UACnCC,OAAO,EAAEJ,WAAW;UACpBK,IAAI,EAAEC,WAAW,CAACC,WAAW,CAACC,KAAK;UACnCC,MAAM,EAAEX,UAAU;UAClBY,SAAS,EAAE/B,YAAY,EAAEa,QAAQ,CAAC;QACtC,CAAC,CAAC,CAAC;MACP;IACJ;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;IACWmB,cAAcA,CAACC,SAAiB,EAAER,OAAe,EAAQ;MAC5D,IAAI,IAAI,CAAC9B,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE;QACrD;MACJ;MAEA,MAAMF,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAI,CAACD,YAAY,EAAE;QACf;MACJ;MAEAI,SAAS,CAACmB,WAAW,CAAC,IAAIC,OAAO,CAAC;QAC9BC,OAAO,EAAEA,OAAO;QAChBC,IAAI,EAAEC,WAAW,CAACC,WAAW,CAACC,KAAK;QACnCC,MAAM,EAAE,IAAIG,SAAS,CAACb,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;QAC1CW,SAAS,EAAE/B,YAAY,CAACa,QAAQ,CAAC,CAAC;QAClCqB,IAAI,EAAE;MACV,CAAC,CAAC,CAAC;IACP;;IAEA;AACJ;AACA;AACA;AACA;IACWC,gBAAgBA,CAACF,SAAiB,EAAQ;MAC7C,IAAI,IAAI,CAACtC,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE;QACrD;MACJ;MAEA,MAAMF,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAI,CAACD,YAAY,EAAE;QACf;MACJ;MAEA,MAAM8B,MAAM,GAAG,IAAIG,SAAS,CAACb,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;MACjD,MAAMgB,WAAW,GAAGpC,YAAY,CAACa,QAAQ,CAAC,CAAC,CAACD,KAAK,CAAC,CAAC;MACnD,MAAMP,QAAQ,GAAGD,SAAS,CAACE,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAkC;MAEvF,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAACC,CAAC,IACtCA,CAAC,CAAC2B,SAAS,CAAC,CAAC,KAAKP,MAAM,IACxBpB,CAAC,CAAC4B,OAAO,CAAC,CAAC,KAAK,aAAa,IAC7B5B,CAAC,CAACC,mBAAmB,CAAC,CAAC,EAAEC,KAAK,CAAC,CAAC,KAAKwB,WACzC,CAAC;MAED,IAAI5B,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;QAC7BV,SAAS,CAACW,cAAc,CAACP,gBAAgB,CAAC;MAC9C;IACJ;;IAEA;AACJ;AACA;IACW+B,kBAAkBA,CAACC,KAAY,EAAQ;MAC1CjD,MAAM,CAACiD,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACf,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMgB,SAAS,GAAG,IAAIC,kBAAkB,CAAC;QACrCC,KAAK,EAAE,sBAAsB;QAC7BC,WAAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
|
|
@@ -18,15 +18,14 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDel
|
|
|
18
18
|
constructor(host: IHostValidation);
|
|
19
19
|
/**
|
|
20
20
|
* Registers a control and all its children with the global MessageManager.
|
|
21
|
+
* (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
|
|
22
|
+
* on every keystroke. MetaUI handles valueState manually via plugins).
|
|
21
23
|
*/
|
|
22
24
|
registerObject(control: Control): void;
|
|
23
25
|
/**
|
|
24
26
|
* Unregisters a control from the global MessageManager.
|
|
25
27
|
*/
|
|
26
28
|
unregisterObject(control: Control): void;
|
|
27
|
-
/**
|
|
28
|
-
* Clears all messages from the global MessageManager.
|
|
29
|
-
*/
|
|
30
29
|
removeAllMessages(): void;
|
|
31
30
|
/**
|
|
32
31
|
* Pushes a validation message to the console, and optionally to the MessageManager.
|
|
@@ -34,10 +33,16 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDel
|
|
|
34
33
|
pushMessage(path: string, text: string): void;
|
|
35
34
|
/**
|
|
36
35
|
* Imperatively invalidates a field and highlights it with an error message.
|
|
36
|
+
* Uses a specific 'CustomError' code to distinguish it from internal schema validations.
|
|
37
|
+
*
|
|
38
|
+
* @param fieldPath The internal JSON path of the field to highlight.
|
|
39
|
+
* @param message The custom error message to display.
|
|
37
40
|
*/
|
|
38
41
|
addCustomError(fieldPath: string, message: string): void;
|
|
39
42
|
/**
|
|
40
|
-
* Reverts a custom error state on a field.
|
|
43
|
+
* Reverts a custom error state on a field, safely ignoring native schema validations.
|
|
44
|
+
*
|
|
45
|
+
* @param fieldPath The internal JSON path of the field to clear.
|
|
41
46
|
*/
|
|
42
47
|
clearCustomError(fieldPath: string): void;
|
|
43
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IAGvF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;IAK5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACzG,eAAe,IAAI,YAAY,GAAG,IAAI,CAAC;KAC1C;IAED;;OAEG;IACH,MAAa,kBAAkB;QAC3B,OAAO,CAAC,IAAI,CAAkB;QAE9B;;;WAGG;oBACS,IAAI,EAAE,eAAe;QAIjC
|
|
1
|
+
{"version":3,"file":"ValidationDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IAGvF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;IAK5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACzG,eAAe,IAAI,YAAY,GAAG,IAAI,CAAC;KAC1C;IAED;;OAEG;IACH,MAAa,kBAAkB;QAC3B,OAAO,CAAC,IAAI,CAAkB;QAE9B;;;WAGG;oBACS,IAAI,EAAE,eAAe;QAIjC;;;;WAIG;QACI,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAI7C;;WAEG;QACI,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAIxC,iBAAiB,IAAI,IAAI;QAchC;;WAEG;QACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAsBpD;;;;;;WAMG;QACI,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;QAmB/D;;;;WAIG;QACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;QAyBhD;;WAEG;QACI,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;KAUhD;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["sap/m/
|
|
1
|
+
sap.ui.define(["sap/m/IllustratedMessage","sap/ui/core/Messaging","../../../utils/Logger","sap/ui/core/message/Message","sap/ui/core/library"],function(e,t,s,r,a){"use strict";const o=s["Logger"];class g{constructor(e){this.host=e}registerObject(e){}unregisterObject(e){}removeAllMessages(){const e=this.host.getStateManager();if(e&&this.host.getProperty("useMessageManager")){const s=t;const r=s.getMessageModel().getData();const a=r.filter(t=>t.getMessageProcessor()&&t.getMessageProcessor().getId()===e.getModel().getId());if(a&&a.length>0){s.removeMessages(a)}}}pushMessage(e,s){const g=e?`/${e.replace(/^\//,"")}`:"";const n=e?`Field '${e}': ${s}`:s;if(e){o.warn(`[MetaUI Validation Error] ${n}`)}else{o.warn(`[MetaUI Validation Error] Global - ${s}`)}if(this.host.getProperty("useMessageManager")===true){const e=t;const s=this.host.getStateManager();e.addMessages(new r({message:n,type:a.MessageType.Error,target:g,processor:s?.getModel()}))}}addCustomError(e,s){if(this.host.getProperty("useMessageManager")!==true){return}const o=this.host.getStateManager();if(!o){return}t.addMessages(new r({message:s,type:a.MessageType.Error,target:`/${e.replace(/^\//,"")}`,processor:o.getModel(),code:"CustomError"}))}clearCustomError(e){if(this.host.getProperty("useMessageManager")!==true){return}const s=this.host.getStateManager();if(!s){return}const r=`/${e.replace(/^\//,"")}`;const a=s.getModel().getId();const o=t.getMessageModel().getData();const g=o.filter(e=>e.getTarget()===r&&e.getCode()==="CustomError"&&e.getMessageProcessor()?.getId()===a);if(g.length>0){t.removeMessages(g)}}mountCrashBoundary(t){o.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.",t.message,"ValidationDelegate");const s=new e({title:"UI Generation Failed",description:"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."});this.host.setAggregation("_content",s)}}var n={__esModule:true};n.ValidationDelegate=g;return n});
|
|
2
2
|
//# sourceMappingURL=ValidationDelegate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","
|
|
1
|
+
{"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAAA,UAaR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAOOE,eAAeC,GAClB,CAMGC,iBAAiBD,GACpB,CAGGE,oBACH,MAAMC,EAAeL,KAAKD,KAAKO,kBAC/B,GAAID,GAAgBL,KAAKD,KAAKQ,YAAY,qBAAsB,CAC5D,MAAMC,EAAiBC,EACvB,MAAMC,EAAWF,EAAeG,kBAAkBC,UAClD,MAAMC,EAAmBH,EAASI,OAAQC,GACtCA,EAAEC,uBAAyBD,EAAEC,sBAAsBC,UAAYZ,EAAaa,WAAWD,SAE3F,GAAIJ,GAAoBA,EAAiBM,OAAS,EAAG,CACjDX,EAAeY,eAAeP,EAClC,CACJ,CACJ,CAKOQ,YAAYC,EAAcC,GAC7B,MAAMC,EAAaF,EAAO,IAAIA,EAAKG,QAAQ,MAAO,MAAQ,GAC1D,MAAMC,EAAcJ,EAAO,UAAUA,OAAUC,IAASA,EAExD,GAAID,EAAM,CACN3B,EAAOgC,KAAK,6BAA6BD,IAC7C,KAAO,CACH/B,EAAOgC,KAAK,sCAAsCJ,IACtD,CAEA,GAAIvB,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MAAMC,EAAiBC,EACvB,MAAMJ,EAAeL,KAAKD,KAAKO,kBAC/BE,EAAeoB,YAAY,IAAIC,EAAQ,CACnCC,QAASJ,EACTK,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQX,EACRY,UAAW/B,GAAca,aAEjC,CACJ,CASOmB,eAAeC,EAAmBR,GACrC,GAAI9B,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEAI,EAAUmB,YAAY,IAAIC,EAAQ,CAC9BC,QAASA,EACTC,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQ,IAAIG,EAAUb,QAAQ,MAAO,MACrCW,UAAW/B,EAAaa,WACxBqB,KAAM,gBAEd,CAOOC,iBAAiBF,GACpB,GAAItC,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEA,MAAM8B,EAAS,IAAIG,EAAUb,QAAQ,MAAO,MAC5C,MAAMgB,EAAcpC,EAAaa,WAAWD,QAC5C,MAAMP,EAAWD,EAAUE,kBAAkBC,UAE7C,MAAMC,EAAmBH,EAASI,OAAOC,GACrCA,EAAE2B,cAAgBP,GAClBpB,EAAE4B,YAAc,eAChB5B,EAAEC,uBAAuBC,UAAYwB,GAGzC,GAAI5B,EAAiBM,OAAS,EAAG,CAC7BV,EAAUW,eAAeP,EAC7B,CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import IllustratedMessage from "sap/m/IllustratedMessage";
|
|
2
2
|
import Messaging from "sap/ui/core/Messaging";
|
|
3
3
|
import Control from "sap/ui/core/Control";
|
|
4
4
|
import { StateManager } from "../../../core/StateManager";
|
|
@@ -28,28 +28,31 @@ export class ValidationDelegate {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Registers a control and all its children with the global MessageManager.
|
|
31
|
+
* (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
|
|
32
|
+
* on every keystroke. MetaUI handles valueState manually via plugins).
|
|
31
33
|
*/
|
|
32
34
|
public registerObject(control: Control): void {
|
|
33
|
-
|
|
34
|
-
Messaging.registerObject(control, true); // true = recurse all children
|
|
35
|
-
}
|
|
35
|
+
// Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Unregisters a control from the global MessageManager.
|
|
40
40
|
*/
|
|
41
41
|
public unregisterObject(control: Control): void {
|
|
42
|
-
|
|
43
|
-
Messaging.unregisterObject(control);
|
|
44
|
-
}
|
|
42
|
+
// Do nothing
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
/**
|
|
48
|
-
* Clears all messages from the global MessageManager.
|
|
49
|
-
*/
|
|
50
45
|
public removeAllMessages(): void {
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
const stateManager = this.host.getStateManager();
|
|
47
|
+
if (stateManager && this.host.getProperty("useMessageManager")) {
|
|
48
|
+
const messageManager = Messaging;
|
|
49
|
+
const messages = messageManager.getMessageModel().getData();
|
|
50
|
+
const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>
|
|
51
|
+
m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()
|
|
52
|
+
);
|
|
53
|
+
if (messagesToRemove && messagesToRemove.length > 0) {
|
|
54
|
+
messageManager.removeMessages(messagesToRemove);
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -66,56 +69,71 @@ export class ValidationDelegate {
|
|
|
66
69
|
Logger.warn(`[MetaUI Validation Error] Global - ${text}`);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
|
-
if (this.host.getProperty("useMessageManager")) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}));
|
|
79
|
-
});
|
|
72
|
+
if (this.host.getProperty("useMessageManager") === true) {
|
|
73
|
+
const messageManager = Messaging;
|
|
74
|
+
const stateManager = this.host.getStateManager();
|
|
75
|
+
messageManager.addMessages(new Message({
|
|
76
|
+
message: displayText,
|
|
77
|
+
type: coreLibrary.MessageType.Error,
|
|
78
|
+
target: targetPath,
|
|
79
|
+
processor: stateManager?.getModel()
|
|
80
|
+
}));
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
85
|
* Imperatively invalidates a field and highlights it with an error message.
|
|
86
|
+
* Uses a specific 'CustomError' code to distinguish it from internal schema validations.
|
|
87
|
+
*
|
|
88
|
+
* @param fieldPath The internal JSON path of the field to highlight.
|
|
89
|
+
* @param message The custom error message to display.
|
|
85
90
|
*/
|
|
86
91
|
public addCustomError(fieldPath: string, message: string): void {
|
|
87
|
-
|
|
92
|
+
if (this.host.getProperty("useMessageManager") !== true) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
88
96
|
const stateManager = this.host.getStateManager();
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
const messageManager = Messaging;
|
|
92
|
-
messageManager.addMessages(new MessageClass({
|
|
93
|
-
message: message,
|
|
94
|
-
type: coreLibrary.MessageType.Error,
|
|
95
|
-
target: `/${fieldPath.replace(/^\//, "")}`,
|
|
96
|
-
processor: stateManager.getModel()
|
|
97
|
-
}));
|
|
98
|
-
});
|
|
97
|
+
if (!stateManager) {
|
|
98
|
+
return;
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
Messaging.addMessages(new Message({
|
|
102
|
+
message: message,
|
|
103
|
+
type: coreLibrary.MessageType.Error,
|
|
104
|
+
target: `/${fieldPath.replace(/^\//, "")}`,
|
|
105
|
+
processor: stateManager.getModel(),
|
|
106
|
+
code: "CustomError"
|
|
107
|
+
}));
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
/**
|
|
103
|
-
* Reverts a custom error state on a field.
|
|
111
|
+
* Reverts a custom error state on a field, safely ignoring native schema validations.
|
|
112
|
+
*
|
|
113
|
+
* @param fieldPath The internal JSON path of the field to clear.
|
|
104
114
|
*/
|
|
105
115
|
public clearCustomError(fieldPath: string): void {
|
|
106
|
-
|
|
116
|
+
if (this.host.getProperty("useMessageManager") !== true) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
107
120
|
const stateManager = this.host.getStateManager();
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const target = `/${fieldPath.replace(/^\//, "")}`;
|
|
121
|
+
if (!stateManager) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
112
124
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
const target = `/${fieldPath.replace(/^\//, "")}`;
|
|
126
|
+
const processorId = stateManager.getModel().getId();
|
|
127
|
+
const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];
|
|
128
|
+
|
|
129
|
+
const messagesToRemove = messages.filter(m =>
|
|
130
|
+
m.getTarget() === target &&
|
|
131
|
+
m.getCode() === "CustomError" &&
|
|
132
|
+
m.getMessageProcessor()?.getId() === processorId
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
if (messagesToRemove.length > 0) {
|
|
136
|
+
Messaging.removeMessages(messagesToRemove);
|
|
119
137
|
}
|
|
120
138
|
}
|
|
121
139
|
|
|
@@ -125,10 +143,9 @@ export class ValidationDelegate {
|
|
|
125
143
|
public mountCrashBoundary(error: Error): void {
|
|
126
144
|
Logger.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.", error.message, "ValidationDelegate");
|
|
127
145
|
|
|
128
|
-
const errorPage = new
|
|
129
|
-
|
|
130
|
-
description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
|
|
131
|
-
icon: "sap-icon://error"
|
|
146
|
+
const errorPage = new IllustratedMessage({
|
|
147
|
+
title: "UI Generation Failed",
|
|
148
|
+
description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
|
|
132
149
|
});
|
|
133
150
|
|
|
134
151
|
this.host.setAggregation("_content", errorPage);
|
|
@@ -28,8 +28,6 @@ sap.ui.define(["./Registry"], function (___Registry) {
|
|
|
28
28
|
class ConditionEngine {
|
|
29
29
|
/** The active form schema being evaluated. */
|
|
30
30
|
|
|
31
|
-
/** The cached bound event handler reference for strict garbage collection. */
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
* Initializes the ConditionEngine with the active schema.
|
|
35
33
|
* @param schema The current UI layout schema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionEngine-dbg.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n
|
|
1
|
+
{"version":3,"file":"ConditionEngine-dbg.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent memory leaks on destruction.\n */\n public destroy(): void {\n this.plugins.clear();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAOSA,QAAQ,GAAAC,WAAA;EAIV,MAAMC,gBAAgB,GAAG,IAAIF,QAAQ,CAAoB,WAAW,CAAC;;EAE5E;EACAE,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;EACjDH,gBAAgB,CAACC,QAAQ,CAAC,KAAK,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,KAAKC,CAAC,CAAC;EACnDH,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;EACjDH,gBAAgB,CAACC,QAAQ,CAAC,KAAK,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,KAAKC,CAAC,CAAC;EACnDH,gBAAgB,CAACC,QAAQ,CAAC,GAAG,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC;EAC/CH,gBAAgB,CAACC,QAAQ,CAAC,GAAG,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC;EAC/CH,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;EACjDH,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;;EAEjD;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,eAAe,CAAC;IACzB;;IAEA;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,MAAe,EAAE;MACzB,IAAI,CAACA,MAAM,GAAGA,MAAM;IACxB;;IAIA;IACQC,OAAO,GAAyB,IAAIC,GAAG,CAAC,CAAC;;IAEjD;AACJ;AACA;AACA;AACA;IACWC,WAAWA,CAACC,QAAgB,EAAEC,OAAgB,EAAQ;MACzD;IAAA;;IAGJ;AACJ;AACA;AACA;AACA;AACA;IACWC,cAAcA,CAACC,WAAmB,EAAEC,MAAe,EAAQ;MAC9D,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACF,WAAW,EAAEC,MAAM,CAAC;IACzC;;IAEA;AACJ;AACA;IACWE,OAAOA,CAAA,EAAS;MACnB,IAAI,CAACT,OAAO,CAACU,KAAK,CAAC,CAAC;IACxB;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlB,gBAAA,GAAAA,gBAAA;EAAAkB,SAAA,CAAAd,eAAA,GAAAA,eAAA;EAAA,OAAAc,SAAA;AAAA","ignoreList":[]}
|
|
@@ -18,8 +18,6 @@ declare module "nz/co/siliconst/ui5/metaui/core/ConditionEngine" {
|
|
|
18
18
|
export class ConditionEngine {
|
|
19
19
|
/** The active form schema being evaluated. */
|
|
20
20
|
private schema;
|
|
21
|
-
/** The cached bound event handler reference for strict garbage collection. */
|
|
22
|
-
private boundHandler;
|
|
23
21
|
/**
|
|
24
22
|
* Initializes the ConditionEngine with the active schema.
|
|
25
23
|
* @param schema The current UI layout schema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionEngine.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;IAEpE,KAAY,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IAE7D,MAAM,gBAAgB,6BAA+C,CAAC;IAY7E;;;;;;OAMG;IACH,MAAa,eAAe;QACxB,8CAA8C;QAC9C,OAAO,CAAC,MAAM,CAAU;QACxB
|
|
1
|
+
{"version":3,"file":"ConditionEngine.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;IAEpE,KAAY,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IAE7D,MAAM,gBAAgB,6BAA+C,CAAC;IAY7E;;;;;;OAMG;IACH,MAAa,eAAe;QACxB,8CAA8C;QAC9C,OAAO,CAAC,MAAM,CAAU;QACxB;;;WAGG;oBACS,MAAM,EAAE,OAAO;QAM3B,oGAAoG;QACpG,OAAO,CAAC,OAAO,CAAmC;QAElD;;;;WAIG;QACI,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;QAI5D;;;;;WAKG;QACI,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;QAIjE;;WAEG;QACI,OAAO,IAAI,IAAI;KAGzB;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionEngine.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","this","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n
|
|
1
|
+
{"version":3,"file":"ConditionEngine.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","this","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent memory leaks on destruction.\n */\n public destroy(): void {\n this.plugins.clear();\n }\n}\n"],"mappings":"sDAAA,MAOSA,EAAQC,EAAA,YAIV,MAAMC,EAAmB,IAAIF,EAA4B,aAGhEE,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GASxC,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,OAASA,CAClB,CAKQE,QAAgC,IAAIC,IAOrCC,YAAYC,EAAkBC,GACjC,CASGC,eAAeC,EAAqBC,GACvCR,KAAKC,QAAQQ,IAAIF,EAAaC,EAClC,CAKOE,UACHV,KAAKC,QAAQU,OACjB,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAnB,mBAAAmB,EAAAf,kBAAA,OAAAe,CAAA","ignoreList":[]}
|
|
@@ -31,9 +31,6 @@ OperatorRegistry.register("<=", (a, b) => a <= b);
|
|
|
31
31
|
export class ConditionEngine {
|
|
32
32
|
/** The active form schema being evaluated. */
|
|
33
33
|
private schema: ISchema;
|
|
34
|
-
/** The cached bound event handler reference for strict garbage collection. */
|
|
35
|
-
private boundHandler: (event: IFieldChangeEvent) => void;
|
|
36
|
-
|
|
37
34
|
/**
|
|
38
35
|
* Initializes the ConditionEngine with the active schema.
|
|
39
36
|
* @param schema The current UI layout schema.
|
|
@@ -91,12 +91,10 @@ sap.ui.define([], function () {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
} catch (error) {
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, error.message);
|
|
99
|
-
});
|
|
94
|
+
// Do not swallow errors. A failure to synthesize a property is a critical failure.
|
|
95
|
+
const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${error.message}`;
|
|
96
|
+
__ui5_require_async("../utils/Logger").then(m => m.Logger.error(msg));
|
|
97
|
+
throw new Error(msg);
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
100
|
return elements;
|