@siliconst/metaui 1.4.6 → 1.4.8
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/package.json +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +16 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts +11 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +14 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +48 -5
- 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 +48 -5
- 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 +55 -10
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js +32 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts +7 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts +11 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +20 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts +12 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts +21 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +38 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +17 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +46 -8
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +22 -6
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +41 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +57 -12
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +33 -5
- 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 +15 -4
- 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 +40 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +5 -0
- 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 +7 -3
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +8 -4
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +4 -0
- 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 +5 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +5 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +4 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +9 -8
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +7 -3
- 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 +5 -1
- 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 +11 -6
- 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 +1 -1
- 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 +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +45 -12
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts +6 -0
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.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 +26 -13
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +25 -12
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +5 -5
- 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 +35 -28
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js +17 -3
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts +5 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.ts +14 -4
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +162 -106
- 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 +25 -26
- 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 +180 -113
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +26 -0
- 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 +23 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +29 -7
- 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 +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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +6 -0
- 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 +7 -2
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +11 -6
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js +10 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts +9 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.ts +9 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +10 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts +9 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +10 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js +9 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts +8 -0
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.ts +9 -1
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +3 -33
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +33 -34
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts +14 -7
- 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 +15 -34
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js +0 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.ts +2 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts +17 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +20 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +21 -8
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts.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 +25 -13
- 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 +2 -2
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +5 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +2 -3
- 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.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.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 +5 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts.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 +23 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +30 -3
- 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 +26 -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 +39 -14
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.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 +20 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.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 +20 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +4 -4
- 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.d.ts +4 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.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 +6 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.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 +20 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.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 +23 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +18 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts +17 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +17 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.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 +21 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.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 +20 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +23 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts +21 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +28 -7
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.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 +20 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +20 -3
- 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.d.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts.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 +22 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts.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 +25 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.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 +22 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +4 -4
- 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.d.ts +4 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts.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 +8 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.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 +22 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.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 +22 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.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 +22 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +20 -3
- 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.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.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 +24 -7
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js +9 -0
- 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.d.ts +8 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.d.ts.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 +13 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js +9 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts +8 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.ts +10 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +19 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts +18 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +19 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js +23 -0
- 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.d.ts +20 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.d.ts.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 +25 -6
- 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 +6 -0
- 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 +6 -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 +7 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +5 -0
- 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 +6 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +6 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +5 -0
- 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 +6 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +6 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js +6 -0
- 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 +7 -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 +7 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js +6 -0
- 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 +7 -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 +7 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +6 -0
- 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 +7 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +7 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +6 -0
- 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 +7 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +7 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +6 -0
- 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 +7 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +7 -1
- package/src/nz/co/siliconst/ui5/metaui/typings/ui5-custom.d.ts +20 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js +0 -32
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts +0 -16
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js +0 -2
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.ts +0 -26
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/BarcodeScannerButton"], function (___controls_BasePlugin, HBox, Input, BarcodeScannerButton) {
|
|
1
|
+
sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/BarcodeScannerButton", "sap/m/Text"], function (___controls_BasePlugin, HBox, Input, BarcodeScannerButton, TextControl) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
const BasePlugin = ___controls_BasePlugin["BasePlugin"];
|
|
5
5
|
class BarcodeScannerPlugin extends BasePlugin {
|
|
6
|
+
/**
|
|
7
|
+
* Renders a `BarcodeScannerButton` alongside an `Input`.
|
|
8
|
+
*
|
|
9
|
+
* @param metadata The specific JSON schema properties for this field.
|
|
10
|
+
* @param bindingPath The JSON path bound to this control.
|
|
11
|
+
* @param modelName The UI5 JSONModel name.
|
|
12
|
+
* @param engineScopeId The deterministic scope ID.
|
|
13
|
+
* @param onChange The callback fired on value change.
|
|
14
|
+
* @returns {Control} The configured HBox control.
|
|
15
|
+
*/
|
|
6
16
|
render(metadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
7
17
|
this.onChange = onChange;
|
|
8
18
|
this.metadata = metadata;
|
|
9
19
|
this.fieldKey = bindingPath.replace('/', '');
|
|
10
20
|
this.modelName = modelName;
|
|
11
21
|
if (!this.isEditable) {
|
|
12
|
-
sap.ui.requireSync("sap/m/Text");
|
|
13
|
-
const TextControl = sap.ui.require("sap/m/Text");
|
|
14
22
|
this.control = new TextControl({
|
|
15
23
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
16
24
|
text: `{${modelName}>${bindingPath}}`
|
|
@@ -36,11 +44,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
|
|
|
36
44
|
const text = oEvent.getParameter("text");
|
|
37
45
|
if (text) {
|
|
38
46
|
this.inputControl.setValue(text);
|
|
39
|
-
//
|
|
40
|
-
const model = this.inputControl.getModel(this.modelName);
|
|
41
|
-
if (model) {
|
|
42
|
-
model.setProperty(bindingPath, text);
|
|
43
|
-
}
|
|
47
|
+
// UI5's two-way data binding on the input will sync the model automatically
|
|
44
48
|
const result = this.validate();
|
|
45
49
|
if (this.onChange) {
|
|
46
50
|
this.onChange(result.isValid, this.fieldKey);
|
|
@@ -56,9 +60,18 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
|
|
|
56
60
|
this.applyCommonDirectives(this.control, metadata, modelName);
|
|
57
61
|
return this.control;
|
|
58
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves the current scanned text.
|
|
66
|
+
* @returns {unknown} The barcode string.
|
|
67
|
+
*/
|
|
59
68
|
getValue() {
|
|
60
69
|
return this.inputControl ? this.inputControl.getValue() : null;
|
|
61
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Applies dynamic read-only state.
|
|
74
|
+
*/
|
|
62
75
|
applyState() {
|
|
63
76
|
if (this.inputControl && this.metadata) {
|
|
64
77
|
if (!this.isEditable) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\") as string;\n if (text) {\n this.inputControl.setValue(text);\n // UI5's two-way data binding on the input will sync the model automatically\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current scanned text.\n * @returns {unknown} The barcode string.\n */\n protected getValue(): unknown {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;QAASA,UAAU,GAAAC,sBAAA;EASZ,MAAMC,oBAAoB,SAASF,UAAU,CAAC;IAGjD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAA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;EAAAD,SAAA,CAAAvC,oBAAA,GAAAA,oBAAA;EAAA,OAAAuC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -4,8 +4,25 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin
|
|
|
4
4
|
import Control from "sap/ui/core/Control";
|
|
5
5
|
export class BarcodeScannerPlugin extends BasePlugin {
|
|
6
6
|
private inputControl;
|
|
7
|
+
/**
|
|
8
|
+
* Renders a `BarcodeScannerButton` alongside an `Input`.
|
|
9
|
+
*
|
|
10
|
+
* @param metadata The specific JSON schema properties for this field.
|
|
11
|
+
* @param bindingPath The JSON path bound to this control.
|
|
12
|
+
* @param modelName The UI5 JSONModel name.
|
|
13
|
+
* @param engineScopeId The deterministic scope ID.
|
|
14
|
+
* @param onChange The callback fired on value change.
|
|
15
|
+
* @returns {Control} The configured HBox control.
|
|
16
|
+
*/
|
|
7
17
|
render(metadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
8
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the current scanned text.
|
|
20
|
+
* @returns {unknown} The barcode string.
|
|
21
|
+
*/
|
|
22
|
+
protected getValue(): unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Applies dynamic read-only state.
|
|
25
|
+
*/
|
|
9
26
|
protected applyState(): void;
|
|
10
27
|
}
|
|
11
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAO1C,MAAa,oBAAqB,SAAQ,UAAU;QAChD,OAAO,CAAC,YAAY,CAAS;
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAO1C,MAAa,oBAAqB,SAAQ,UAAU;QAChD,OAAO,CAAC,YAAY,CAAS;QAE7B;;;;;;;;;WASG;QACI,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAuDxL;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton"],function(t,e,i,n){"use strict";const
|
|
1
|
+
sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton","sap/m/Text"],function(t,e,i,n,s){"use strict";const a=t["BasePlugin"];class l extends a{render(t,a,l="meta",o,r){this.onChange=r;this.metadata=t;this.fieldKey=a.replace("/","");this.modelName=l;if(!this.isEditable){this.control=new s({id:this.generateStableId(o,a),text:`{${l}>${a}}`});this.applyCommonDirectives(this.control,t,l);return this.control}this.inputControl=new i({id:this.generateStableId(o,a+"-input"),value:`{${l}>${a}}`,editable:!t.ui?.readOnly,width:"100%",change:()=>{const t=this.validate();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}});const h=new n({id:this.generateStableId(o,a+"-btn"),scanSuccess:t=>{const e=t.getParameter("text");if(e){this.inputControl.setValue(e);const t=this.validate();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}}});this.control=new e({id:this.generateStableId(o,a),items:[this.inputControl,h],width:"100%"}).addStyleClass("sapUiSmallMarginBottom");this.applyCommonDirectives(this.control,t,l);return this.control}getValue(){return this.inputControl?this.inputControl.getValue():null}applyState(){if(this.inputControl&&this.metadata){if(!this.isEditable)return;this.inputControl.setEditable(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.BarcodeScannerPlugin=l;return o});
|
|
2
2
|
//# sourceMappingURL=BarcodeScannerPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\") as string;\n if (text) {\n this.inputControl.setValue(text);\n // UI5's two-way data binding on the input will sync the model automatically\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current scanned text.\n * @returns {unknown} The barcode string.\n */\n protected getValue(): unknown {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"uJAASA,EAAUC,EAAA,cASZ,MAAMC,UAA6BF,EAa/BG,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAM,IAAIX,KAAaD,OAE3BI,KAAKS,sBAAsBT,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKU,aAAe,IAAIC,EAAM,CAC1BL,GAAIN,KAAKO,iBAAiBT,EAAeF,EAAc,UACvDgB,MAAO,IAAIf,KAAaD,KACxBiB,UAAWlB,EAASmB,IAAIC,SACxBC,MAAO,OACPC,OAAQA,KACJ,MAAMC,EAASlB,KAAKmB,WACpB,GAAInB,KAAKD,SAAU,CACfC,KAAKD,SAASmB,EAAOE,QAASpB,KAAKC,SACvC,KAIR,MAAMoB,EAAa,IAAIC,EAAqB,CACxChB,GAAIN,KAAKO,iBAAiBT,EAAeF,EAAc,QACvD2B,YAAcC,IACV,MAAMhB,EAAOgB,EAAOC,aAAa,QACjC,GAAIjB,EAAM,CACNR,KAAKU,aAAagB,SAASlB,GAE3B,MAAMU,EAASlB,KAAKmB,WACpB,GAAInB,KAAKD,SAAU,CACfC,KAAKD,SAASmB,EAAOE,QAASpB,KAAKC,SACvC,CACJ,KAIRD,KAAKI,QAAU,IAAIuB,EAAK,CACpBrB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCgC,MAAO,CAAC5B,KAAKU,aAAcW,GAC3BL,MAAO,SACRa,cAAc,0BAEjB7B,KAAKS,sBAAsBT,KAAKI,QAAST,EAAUE,GAEnD,OAAOG,KAAKI,OAChB,CAMU0B,WACN,OAAO9B,KAAKU,aAAeV,KAAKU,aAAaoB,WAAa,IAC9D,CAKUC,aACN,GAAI/B,KAAKU,cAAgBV,KAAKL,SAAU,CACpC,IAAKK,KAAKG,WAAY,OACtBH,KAAKU,aAAasB,aAAahC,KAAKL,SAASmB,IAAIC,SACrD,CACJ,EACH,IAAAkB,EAAA,CAAAC,WAAA,MAAAD,EAAAxC,uBAAA,OAAAwC,CAAA","ignoreList":[]}
|
|
@@ -4,12 +4,22 @@ import Control from "sap/ui/core/Control";
|
|
|
4
4
|
import HBox from "sap/m/HBox";
|
|
5
5
|
import Input from "sap/m/Input";
|
|
6
6
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
7
|
-
// @ts-ignore
|
|
8
7
|
import BarcodeScannerButton from "sap/ndc/BarcodeScannerButton";
|
|
8
|
+
import TextControl from "sap/m/Text";
|
|
9
9
|
|
|
10
10
|
export class BarcodeScannerPlugin extends BasePlugin {
|
|
11
11
|
private inputControl!: Input;
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Renders a `BarcodeScannerButton` alongside an `Input`.
|
|
15
|
+
*
|
|
16
|
+
* @param metadata The specific JSON schema properties for this field.
|
|
17
|
+
* @param bindingPath The JSON path bound to this control.
|
|
18
|
+
* @param modelName The UI5 JSONModel name.
|
|
19
|
+
* @param engineScopeId The deterministic scope ID.
|
|
20
|
+
* @param onChange The callback fired on value change.
|
|
21
|
+
* @returns {Control} The configured HBox control.
|
|
22
|
+
*/
|
|
13
23
|
public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
14
24
|
this.onChange = onChange;
|
|
15
25
|
this.metadata = metadata;
|
|
@@ -17,8 +27,7 @@ export class BarcodeScannerPlugin extends BasePlugin {
|
|
|
17
27
|
this.modelName = modelName;
|
|
18
28
|
|
|
19
29
|
if (!this.isEditable) {
|
|
20
|
-
|
|
21
|
-
const TextControl = sap.ui.require("sap/m/Text");
|
|
30
|
+
|
|
22
31
|
this.control = new TextControl({
|
|
23
32
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
24
33
|
text: `{${modelName}>${bindingPath}}`
|
|
@@ -43,18 +52,14 @@ export class BarcodeScannerPlugin extends BasePlugin {
|
|
|
43
52
|
const scannerBtn = new BarcodeScannerButton({
|
|
44
53
|
id: this.generateStableId(engineScopeId, bindingPath + "-btn"),
|
|
45
54
|
scanSuccess: (oEvent: sap.ui.base.Event) => {
|
|
46
|
-
const text = oEvent.getParameter("text");
|
|
55
|
+
const text = oEvent.getParameter("text") as string;
|
|
47
56
|
if (text) {
|
|
48
57
|
this.inputControl.setValue(text);
|
|
49
|
-
//
|
|
50
|
-
const model = this.inputControl.getModel(this.modelName) as JSONModel;
|
|
51
|
-
if (model) {
|
|
52
|
-
model.setProperty(bindingPath, text);
|
|
53
|
-
}
|
|
58
|
+
// UI5's two-way data binding on the input will sync the model automatically
|
|
54
59
|
const result = this.validate();
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
if (this.onChange) {
|
|
61
|
+
this.onChange(result.isValid, this.fieldKey);
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
});
|
|
@@ -70,10 +75,17 @@ export class BarcodeScannerPlugin extends BasePlugin {
|
|
|
70
75
|
return this.control as Control;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves the current scanned text.
|
|
80
|
+
* @returns {unknown} The barcode string.
|
|
81
|
+
*/
|
|
82
|
+
protected getValue(): unknown {
|
|
74
83
|
return this.inputControl ? this.inputControl.getValue() : null;
|
|
75
84
|
}
|
|
76
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Applies dynamic read-only state.
|
|
88
|
+
*/
|
|
77
89
|
protected applyState(): void {
|
|
78
90
|
if (this.inputControl && this.metadata) {
|
|
79
91
|
if (!this.isEditable) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin-dbg.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isEditable","setEditable","editable","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing an editable mode. */\n protected isEditable: boolean = true;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in editable mode.\n */\n public setEditable(editable: boolean): void {\n this.isEditable = editable;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue(): any;\n\n /**\n * Universal pipeline validation.\n */\n public validate(): import(\"../../interfaces/IPlugin\").IPluginValidationResult {\n if (!this.control || !this.metadata) return { isValid: true };\n \n // Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)\n if (typeof (this.control as unknown).getVisible === \"function\") {\n if (!(this.control as unknown).getVisible()) {\n return { isValid: true };\n }\n }\n \n const validatorsToRun: string[] = [];\n const argsMap: Record<string, any> = {\n \"maxLength\": this.metadata.maxLength\n };\n\n if (this.metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (this.metadata.maxLength) validatorsToRun.push(\"maxLength\");\n \n if (this.metadata.ui?.validators) {\n for (const v of this.metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length === 0) {\n return { isValid: true, errorMessage: undefined, fieldKey: this.fieldKey };\n }\n\n const val = this.getValue();\n const result = GlobalPipeline.executeValidation(val, validatorsToRun, argsMap);\n return { isValid: result.isValid, errorMessage: result.errorMessage, fieldKey: this.fieldKey };\n }\n\n /**\n * Executes when the condition engine pushes new schema metadata to this field (e.g. readOnly changing).\n * @param newMetadata The mutated schema metadata.\n */\n public onStateChange(newMetadata: IPropertyMetadata): void {\n this.metadata = newMetadata;\n this.applyState();\n }\n\n /**\n * Abstract hook for the plugin to apply state changes to its specific UI5 control (e.g. placeholders, labels).\n */\n protected abstract applyState(): void;\n\n /**\n * Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.\n */\n protected applyCommonDirectives(control: any, metadata: IPropertyMetadata, modelName: string = \"meta\"): void {\n if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === \"function\") {\n control.setEditable(!metadata.ui.readOnly);\n }\n\n if (metadata.ui?.visibleOn) {\n const expr = `{= ${metadata.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false });\n // The ConditionEngine handles actual binding injection, but here we can set a fallback or natively bind if we bypass ConditionEngine.\n control.bindProperty(\"visible\", expr);\n }\n \n if (metadata.ui?.enabledOn && typeof control.setEnabled === \"function\") {\n const expr = `{= ${metadata.ui.enabledOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"enabled\", expr);\n }\n }\n\n\n\n /**\n * Natively destroys the instantiated UI5 control to prevent memory leaks.\n * Can be overridden by subclasses if they manage secondary controls or custom models.\n */\n public destroy(): void {\n if (this.control && typeof this.control.destroy === \"function\") {\n this.control.destroy();\n this.control = null;\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,cAAc,GAAAC,wBAAA;EAEvB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAeC,UAAU,CAAoB;IAChD;IACUC,OAAO,GAAmB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AAI,CAAC7C,OAAO,GAAG,IAAI;MACvB;IACJ;EACJ;EAAC,IAAA8C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/C,UAAA,GAAAA,UAAA;EAAA,OAAA+C,SAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"BasePlugin-dbg.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isEditable","setEditable","editable","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing an editable mode. */\n protected isEditable: boolean = true;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in editable mode.\n */\n public setEditable(editable: boolean): void {\n this.isEditable = editable;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue(): unknown;\n\n /**\n * Universal pipeline validation.\n */\n public validate(): import(\"../../interfaces/IPlugin\").IPluginValidationResult {\n if (!this.control || !this.metadata) return { isValid: true };\n \n // Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)\n if (typeof (this.control as Control).getVisible === \"function\") {\n if (!(this.control as Control).getVisible()) {\n return { isValid: true };\n }\n }\n \n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {\n \"maxLength\": this.metadata.maxLength\n };\n\n if (this.metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (this.metadata.maxLength) validatorsToRun.push(\"maxLength\");\n \n if (this.metadata.ui?.validators) {\n for (const v of this.metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length === 0) {\n return { isValid: true, errorMessage: undefined, fieldKey: this.fieldKey };\n }\n\n const val = this.getValue();\n const result = GlobalPipeline.executeValidation(val, validatorsToRun, argsMap);\n return { isValid: result.isValid, errorMessage: result.errorMessage, fieldKey: this.fieldKey };\n }\n\n /**\n * Executes when the condition engine pushes new schema metadata to this field (e.g. readOnly changing).\n * @param newMetadata The mutated schema metadata.\n */\n public onStateChange(newMetadata: IPropertyMetadata): void {\n this.metadata = newMetadata;\n this.applyState();\n }\n\n /**\n * Abstract hook for the plugin to apply state changes to its specific UI5 control (e.g. placeholders, labels).\n */\n protected abstract applyState(): void;\n\n /**\n * Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.\n */\n protected applyCommonDirectives(control: Control, metadata: IPropertyMetadata, modelName: string = \"meta\"): void {\n if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === \"function\") {\n control.setEditable(!metadata.ui.readOnly);\n }\n\n if (metadata.ui?.visibleOn) {\n const expr = `{= ${metadata.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false });\n // The ConditionEngine handles actual binding injection, but here we can set a fallback or natively bind if we bypass ConditionEngine.\n control.bindProperty(\"visible\", expr);\n }\n \n if (metadata.ui?.enabledOn && typeof control.setEnabled === \"function\") {\n const expr = `{= ${metadata.ui.enabledOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"enabled\", expr);\n }\n }\n\n\n\n /**\n * Natively destroys the instantiated UI5 control to prevent memory leaks.\n * Can be overridden by subclasses if they manage secondary controls or custom models.\n */\n public destroy(): void {\n if (this.control && typeof this.control.destroy === \"function\") {\n this.control.destroy();\n this.control = null;\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,cAAc,GAAAC,wBAAA;EAEvB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAeC,UAAU,CAAoB;IACh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AO,CAAC,CAAC;QACtB,IAAI,CAAC7C,OAAO,GAAG,IAAI;MACvB;IACJ;EACJ;EAAC,IAAA8C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/C,UAAA,GAAAA,UAAA;EAAA,OAAA+C,SAAA;AAAA","ignoreList":[]}
|
|
@@ -50,7 +50,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin" {
|
|
|
50
50
|
/**
|
|
51
51
|
* Extracts the current raw value from the underlying UI5 control.
|
|
52
52
|
*/
|
|
53
|
-
protected abstract getValue():
|
|
53
|
+
protected abstract getValue(): unknown;
|
|
54
54
|
/**
|
|
55
55
|
* Universal pipeline validation.
|
|
56
56
|
*/
|
|
@@ -67,7 +67,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin" {
|
|
|
67
67
|
/**
|
|
68
68
|
* Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.
|
|
69
69
|
*/
|
|
70
|
-
protected applyCommonDirectives(control:
|
|
70
|
+
protected applyCommonDirectives(control: Control, metadata: IPropertyMetadata, modelName?: string): void;
|
|
71
71
|
/**
|
|
72
72
|
* Natively destroys the instantiated UI5 control to prevent memory leaks.
|
|
73
73
|
* Can be overridden by subclasses if they manage secondary controls or custom models.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C;;;;;;OAMG;IACH,eAAsB,UAAW,YAAW,OAAO;QAC/C,oDAAoD;QACpD,SAAS,CAAC,OAAO,EAAE,OAAO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D;;WAEG;QACH,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI;QAErC;;WAEG;QACH,SAAS,CAAC,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,GAAE,MAAe,GAAG,IAAI;QAoBhH;;;WAGG;QACI,OAAO,IAAI,IAAI;KAMzB;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isEditable","setEditable","editable","this","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing an editable mode. */\n protected isEditable: boolean = true;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in editable mode.\n */\n public setEditable(editable: boolean): void {\n this.isEditable = editable;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue():
|
|
1
|
+
{"version":3,"file":"BasePlugin.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isEditable","setEditable","editable","this","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing an editable mode. */\n protected isEditable: boolean = true;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in editable mode.\n */\n public setEditable(editable: boolean): void {\n this.isEditable = editable;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue(): unknown;\n\n /**\n * Universal pipeline validation.\n */\n public validate(): import(\"../../interfaces/IPlugin\").IPluginValidationResult {\n if (!this.control || !this.metadata) return { isValid: true };\n \n // Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)\n if (typeof (this.control as Control).getVisible === \"function\") {\n if (!(this.control as Control).getVisible()) {\n return { isValid: true };\n }\n }\n \n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {\n \"maxLength\": this.metadata.maxLength\n };\n\n if (this.metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (this.metadata.maxLength) validatorsToRun.push(\"maxLength\");\n \n if (this.metadata.ui?.validators) {\n for (const v of this.metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length === 0) {\n return { isValid: true, errorMessage: undefined, fieldKey: this.fieldKey };\n }\n\n const val = this.getValue();\n const result = GlobalPipeline.executeValidation(val, validatorsToRun, argsMap);\n return { isValid: result.isValid, errorMessage: result.errorMessage, fieldKey: this.fieldKey };\n }\n\n /**\n * Executes when the condition engine pushes new schema metadata to this field (e.g. readOnly changing).\n * @param newMetadata The mutated schema metadata.\n */\n public onStateChange(newMetadata: IPropertyMetadata): void {\n this.metadata = newMetadata;\n this.applyState();\n }\n\n /**\n * Abstract hook for the plugin to apply state changes to its specific UI5 control (e.g. placeholders, labels).\n */\n protected abstract applyState(): void;\n\n /**\n * Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.\n */\n protected applyCommonDirectives(control: Control, metadata: IPropertyMetadata, modelName: string = \"meta\"): void {\n if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === \"function\") {\n control.setEditable(!metadata.ui.readOnly);\n }\n\n if (metadata.ui?.visibleOn) {\n const expr = `{= ${metadata.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false });\n // The ConditionEngine handles actual binding injection, but here we can set a fallback or natively bind if we bypass ConditionEngine.\n control.bindProperty(\"visible\", expr);\n }\n \n if (metadata.ui?.enabledOn && typeof control.setEnabled === \"function\") {\n const expr = `{= ${metadata.ui.enabledOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"enabled\", expr);\n }\n }\n\n\n\n /**\n * Natively destroys the instantiated UI5 control to prevent memory leaks.\n * Can be overridden by subclasses if they manage secondary controls or custom models.\n */\n public destroy(): void {\n if (this.control && typeof this.control.destroy === \"function\") {\n this.control.destroy();\n this.control = null;\n }\n }\n}\n"],"mappings":"sEAAA,MAQSA,EAAcC,EAAA,kBAShB,MAAeC,EAERC,QAA0B,KAG1BC,SAAqC,KAGrCC,SAAmB,GAGnBC,UAAoB,OAGpBC,WAAsB,KASzBC,YAAYC,GACfC,KAAKH,WAAaE,CACtB,CAkBUE,iBAAiBC,EAAmCC,GAC1D,IAAKD,EAAe,OAAOE,UAE3B,MAAMC,EAAWF,EAAYG,QAAQ,MAAO,IAAIA,QAAQ,MAAO,KAC/D,MAAO,GAAGJ,MAAkBG,GAChC,CAUOE,WACH,IAAKP,KAAKP,UAAYO,KAAKN,SAAU,MAAO,CAAEc,QAAS,MAGvD,UAAYR,KAAKP,QAAoBgB,aAAe,WAAY,CAC5D,IAAMT,KAAKP,QAAoBgB,aAAc,CACzC,MAAO,CAAED,QAAS,KACtB,CACJ,CAEA,MAAME,EAA4B,GAClC,MAAMC,EAAmC,CACrCC,UAAaZ,KAAKN,SAASkB,WAG/B,GAAIZ,KAAKN,SAASmB,SAAU,CACxBH,EAAgBI,KAAK,WACzB,CACA,GAAId,KAAKN,SAASkB,UAAWF,EAAgBI,KAAK,aAElD,GAAId,KAAKN,SAASqB,IAAIC,WAAY,CAC9B,IAAK,MAAMC,KAAKjB,KAAKN,SAASqB,GAAGC,WAAY,CACzC,UA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vC,KAAKP,QAAU,IACnB,CACJ,EACH,IAAA+C,EAAA,CAAAC,WAAA,MAAAD,EAAAhD,aAAA,OAAAgD,CAAA","ignoreList":[]}
|
|
@@ -68,7 +68,7 @@ export abstract class BasePlugin implements IPlugin {
|
|
|
68
68
|
/**
|
|
69
69
|
* Extracts the current raw value from the underlying UI5 control.
|
|
70
70
|
*/
|
|
71
|
-
protected abstract getValue():
|
|
71
|
+
protected abstract getValue(): unknown;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Universal pipeline validation.
|
|
@@ -77,14 +77,14 @@ export abstract class BasePlugin implements IPlugin {
|
|
|
77
77
|
if (!this.control || !this.metadata) return { isValid: true };
|
|
78
78
|
|
|
79
79
|
// Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)
|
|
80
|
-
if (typeof (this.control as
|
|
81
|
-
if (!(this.control as
|
|
80
|
+
if (typeof (this.control as Control).getVisible === "function") {
|
|
81
|
+
if (!(this.control as Control).getVisible()) {
|
|
82
82
|
return { isValid: true };
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
const validatorsToRun: string[] = [];
|
|
87
|
-
const argsMap: Record<string,
|
|
87
|
+
const argsMap: Record<string, unknown> = {
|
|
88
88
|
"maxLength": this.metadata.maxLength
|
|
89
89
|
};
|
|
90
90
|
|
|
@@ -132,7 +132,7 @@ export abstract class BasePlugin implements IPlugin {
|
|
|
132
132
|
/**
|
|
133
133
|
* Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.
|
|
134
134
|
*/
|
|
135
|
-
protected applyCommonDirectives(control:
|
|
135
|
+
protected applyCommonDirectives(control: Control, metadata: IPropertyMetadata, modelName: string = "meta"): void {
|
|
136
136
|
if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === "function") {
|
|
137
137
|
control.setEditable(!metadata.ui.readOnly);
|
|
138
138
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin", "sap/m/CheckBox"], function (___BasePlugin, CheckBox) {
|
|
1
|
+
sap.ui.define(["./BasePlugin", "sap/m/CheckBox", "sap/m/Text"], function (___BasePlugin, CheckBox, TextControl) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -25,8 +25,6 @@ sap.ui.define(["./BasePlugin", "sap/m/CheckBox"], function (___BasePlugin, Check
|
|
|
25
25
|
this.onChange = onChange;
|
|
26
26
|
this.metadata = fieldMetadata;
|
|
27
27
|
if (!this.isEditable) {
|
|
28
|
-
sap.ui.requireSync("sap/m/Text");
|
|
29
|
-
const TextControl = sap.ui.require("sap/m/Text");
|
|
30
28
|
this.control = new TextControl({
|
|
31
29
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
32
30
|
text: {
|
|
@@ -49,6 +47,7 @@ sap.ui.define(["./BasePlugin", "sap/m/CheckBox"], function (___BasePlugin, Check
|
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
});
|
|
50
|
+
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
52
51
|
return this.control;
|
|
53
52
|
}
|
|
54
53
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanPlugin-dbg.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","
|
|
1
|
+
{"version":3,"file":"BooleanPlugin-dbg.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","ui","readOnly","select","oEvent","getParameter","result","validate","isValid","fieldKey","getValue","getSelected","applyState","setEnabled","__exports","__esModule"],"sources":["BooleanPlugin.ts"],"sourcesContent":["/**\n * @file BooleanPlugin.ts\n * @description Renders a sap.m.Switch for boolean states.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport CheckBox from \"sap/m/CheckBox\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for toggleable booleans using `sap.m.CheckBox`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class BooleanPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.CheckBox` component for boolean evaluation.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @returns {Control} The configured CheckBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: boolean) => val ? \"Yes\" : \"No\"\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new CheckBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n selected: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n select: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"selected\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current boolean state.\n * @returns {boolean} The selected state.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as CheckBox).getSelected() : false;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as CheckBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AAC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,CAACE,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,IAAI,CAACZ,qBAAqB,CAAC,IAAI,CAACR,OAAO,EAAEP,aAAa,EAAEE,SAAS,CAAC;MAElE,OAAO,IAAI,CAACK,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcqB,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACrB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAcsB,WAAW,CAAC,CAAC,GAAG,KAAK;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACvB,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAcwB,UAAU,CAAC,CAAC,IAAI,CAAC1B,QAAQ,CAACc,EAAE,EAAEC,QAAQ,CAAC;MACtE;IACJ;EACJ;EAAC,IAAAY,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlC,aAAA,GAAAA,aAAA;EAAA,OAAAkC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -26,7 +26,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin" {
|
|
|
26
26
|
* Retrieves the current boolean state.
|
|
27
27
|
* @returns {boolean} The selected state.
|
|
28
28
|
*/
|
|
29
|
-
protected getValue():
|
|
29
|
+
protected getValue(): unknown;
|
|
30
30
|
/**
|
|
31
31
|
* Applies dynamic read-only state.
|
|
32
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2DAA2D,CAAC;IAC3E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,OAAO,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"BooleanPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2DAA2D,CAAC;IAC3E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C;;;;;OAKG;IACH,MAAa,aAAc,SAAQ,UAAU;QACzC;;;;;;;WAOG;QACI,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAmC7L;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin","sap/m/CheckBox"],function(t,e){"use strict";const
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/CheckBox","sap/m/Text"],function(t,e,i){"use strict";const s=t["BasePlugin"];class a extends s{render(t,s,a="meta",n,o){this.onChange=o;this.metadata=t;if(!this.isEditable){this.control=new i({id:this.generateStableId(n,s),text:{path:`${a}>${s}`,formatter:t=>t?"Yes":"No"}});this.applyCommonDirectives(this.control,t,a);return this.control}this.control=new e({id:this.generateStableId(n,s),selected:`{${a}>${s}}`,enabled:!t.ui?.readOnly,select:t=>{const e=t.getParameter("selected");const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});this.applyCommonDirectives(this.control,t,a);return this.control}getValue(){return this.control?this.control.getSelected():false}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var n={__esModule:true};n.BooleanPlugin=a;return n});
|
|
2
2
|
//# sourceMappingURL=BooleanPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanPlugin.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","
|
|
1
|
+
{"version":3,"file":"BooleanPlugin.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","ui","readOnly","select","oEvent","getParameter","result","validate","isValid","fieldKey","getValue","getSelected","applyState","setEnabled","__exports","__esModule"],"sources":["BooleanPlugin.ts"],"sourcesContent":["/**\n * @file BooleanPlugin.ts\n * @description Renders a sap.m.Switch for boolean states.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport CheckBox from \"sap/m/CheckBox\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for toggleable booleans using `sap.m.CheckBox`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class BooleanPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.CheckBox` component for boolean evaluation.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @returns {Control} The configured CheckBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: boolean) => val ? \"Yes\" : \"No\"\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new CheckBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n selected: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n select: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"selected\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current boolean state.\n * @returns {boolean} The selected state.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as CheckBox).getSelected() : false;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as CheckBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"0FAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAAsBF,EASxBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAElBF,KAAKG,QAAU,IAAIC,EAAY,CAC3BC,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCW,KAAM,CACFC,KAAM,GAAGX,KAAaD,IACtBa,UAAYC,GAAiBA,EAAM,MAAQ,QAGnDV,KAAKW,sBAAsBX,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAEAH,KAAKG,QAAU,IAAIS,EAAS,CACxBP,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCiB,SAAU,IAAIhB,KAAaD,KAC3BkB,SAAUnB,EAAcoB,IAAIC,SAC5BC,OAASC,IACL,MAAMR,EAAMQ,EAAOC,aAAa,YAChC,MAAMC,EAASpB,KAAKqB,WACpB,GAAIrB,KAAKD,SAAU,CACfC,KAAKD,SAASqB,EAAOE,QAAStB,KAAKuB,SACvC,KAIRvB,KAAKW,sBAAsBX,KAAKG,QAASR,EAAeE,GAExD,OAAOG,KAAKG,OAChB,CAMUqB,WACN,OAAOxB,KAAKG,QAAWH,KAAKG,QAAqBsB,cAAgB,KACrE,CAKUC,aACN,GAAI1B,KAAKG,SAAWH,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKG,QAAqBwB,YAAY3B,KAAKC,SAASc,IAAIC,SAC7D,CACJ,EACH,IAAAY,EAAA,CAAAC,WAAA,MAAAD,EAAAnC,gBAAA,OAAAmC,CAAA","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ import { BasePlugin } from "./BasePlugin";
|
|
|
7
7
|
import { IPropertyMetadata } from "../../interfaces/ISchema";
|
|
8
8
|
import CheckBox from "sap/m/CheckBox";
|
|
9
9
|
import Control from "sap/ui/core/Control";
|
|
10
|
+
import TextControl from "sap/m/Text";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Handles rendering logic for toggleable booleans using `sap.m.CheckBox`.
|
|
@@ -28,8 +29,7 @@ export class BooleanPlugin extends BasePlugin {
|
|
|
28
29
|
this.metadata = fieldMetadata;
|
|
29
30
|
|
|
30
31
|
if (!this.isEditable) {
|
|
31
|
-
|
|
32
|
-
const TextControl = sap.ui.require("sap/m/Text");
|
|
32
|
+
|
|
33
33
|
this.control = new TextControl({
|
|
34
34
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
35
35
|
text: {
|
|
@@ -54,6 +54,8 @@ export class BooleanPlugin extends BasePlugin {
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
58
|
+
|
|
57
59
|
return this.control as Control;
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -61,7 +63,7 @@ export class BooleanPlugin extends BasePlugin {
|
|
|
61
63
|
* Retrieves the current boolean state.
|
|
62
64
|
* @returns {boolean} The selected state.
|
|
63
65
|
*/
|
|
64
|
-
protected getValue():
|
|
66
|
+
protected getValue(): unknown {
|
|
65
67
|
return this.control ? (this.control as CheckBox).getSelected() : false;
|
|
66
68
|
}
|
|
67
69
|
|