@siliconst/metaui 1.4.6 → 1.4.7
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/CameraControl-dbg.js +13 -0
- 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 +10 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts.map +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 +10 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +47 -4
- 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 +47 -4
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +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 +48 -4
- 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 +9 -0
- 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 +7 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +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 +7 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +13 -0
- 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 +10 -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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +10 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +41 -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 +16 -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 +44 -4
- 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 +4 -0
- 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 +4 -0
- 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 +4 -0
- 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 +4 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +4 -0
- 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 +4 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +4 -0
- 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 +25 -12
- 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 +34 -27
- 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 +4 -0
- 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 +13 -3
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +158 -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 +176 -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 +22 -0
- 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 +22 -0
- 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 +5 -0
- 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 +5 -0
- 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 +9 -0
- 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 +8 -0
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +2 -32
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +9 -10
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts +0 -6
- 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 +0 -33
- 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 +16 -0
- 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 +16 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -0
- 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.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 +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +29 -0
- 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 +25 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +2 -0
- 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 +2 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +17 -0
- 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 +16 -0
- 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 +16 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +17 -0
- 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 +20 -0
- 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 +20 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +19 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -0
- 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 +2 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +17 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +19 -0
- 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 +17 -0
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +17 -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,10 +1,4 @@
|
|
|
1
1
|
declare module "nz/co/siliconst/ui5/metaui/library" {
|
|
2
|
-
import { PluginRegistry } from "nz/co/siliconst/ui5/metaui/core/PluginRegistry";
|
|
3
|
-
import "nz/co/siliconst/ui5/metaui/core/LayoutRegistry";
|
|
4
|
-
/**
|
|
5
|
-
* Global Bootstrapper: Maps all standard primitive types to their respective plugins.
|
|
6
|
-
*/
|
|
7
|
-
const registry: PluginRegistry;
|
|
8
2
|
const _default: any;
|
|
9
3
|
export default _default;
|
|
10
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/library.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/library.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oCAAoC,CAAC;;IAmCpD,wBAA6E;CAE5E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["sap/ui/core/Core"
|
|
1
|
+
sap.ui.define(["sap/ui/core/Core"],function(o){"use strict";o.initLibrary({name:"nz.co.siliconst.ui5.metaui",version:"1.0.0",dependencies:["sap.ui.core","sap.m","sap.ui.layout","sap.ui.table"],controls:["nz.co.siliconst.ui5.metaui.controls.GeneratorHost","nz.co.siliconst.ui5.metaui.controls.BaseHardwareControl","nz.co.siliconst.ui5.metaui.controls.CameraControl","nz.co.siliconst.ui5.metaui.controls.BarcodeScannerControl","nz.co.siliconst.ui5.metaui.controls.SignatureControl","nz.co.siliconst.ui5.metaui.controls.VoiceInputControl","nz.co.siliconst.ui5.metaui.controls.GeolocationControl","nz.co.siliconst.ui5.metaui.controls.RichTextControl"],elements:[],interfaces:[],noLibraryCSS:true});var i=window["nz"]["co"]["siliconst"]["ui5"]["metaui"];return i});
|
|
2
2
|
//# sourceMappingURL=library.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","names":["
|
|
1
|
+
{"version":3,"file":"library.js","names":["Core","initLibrary","name","version","dependencies","controls","elements","interfaces","noLibraryCSS","__exports","window"],"sources":["library.ts"],"sourcesContent":["/**\n * @file library.ts\n * @description Standard SAP UI5 library registration file. Exposes the MetaUI namespace \n * and automatically bootstraps the internal PluginRegistry.\n */\n\nimport Core from \"sap/ui/core/Core\";\n\n// Delegate to standard library registration\nCore.initLibrary({\n name: \"nz.co.siliconst.ui5.metaui\",\n version: \"1.0.0\",\n dependencies: [\n \"sap.ui.core\",\n \"sap.m\",\n \"sap.ui.layout\",\n \"sap.ui.table\"\n ],\n controls: [\n \"nz.co.siliconst.ui5.metaui.controls.GeneratorHost\",\n \"nz.co.siliconst.ui5.metaui.controls.BaseHardwareControl\",\n \"nz.co.siliconst.ui5.metaui.controls.CameraControl\",\n \"nz.co.siliconst.ui5.metaui.controls.BarcodeScannerControl\",\n \"nz.co.siliconst.ui5.metaui.controls.SignatureControl\",\n \"nz.co.siliconst.ui5.metaui.controls.VoiceInputControl\",\n \"nz.co.siliconst.ui5.metaui.controls.GeolocationControl\",\n \"nz.co.siliconst.ui5.metaui.controls.RichTextControl\"\n ],\n elements: [],\n interfaces: [],\n noLibraryCSS: true\n});\n\n// Exporting window object safely for UI5 compatibility if needed\nexport default (window as unknown)[\"nz\"][\"co\"][\"siliconst\"][\"ui5\"][\"metaui\"];\n"],"mappings":"4DASAA,EAAKC,YAAY,CACbC,KAAM,6BACNC,QAAS,QACTC,aAAc,CACV,cACA,QACA,gBACA,gBAEJC,SAAU,CACN,oDACA,0DACA,oDACA,4DACA,uDACA,wDACA,yDACA,uDAEJC,SAAU,GACVC,WAAY,GACZC,aAAc,OAGlB,IAAAC,EACgBC,OAAmB,MAAM,MAAM,aAAa,OAAO,UAAS,OAAAD,CAAA","ignoreList":[]}
|
|
@@ -5,20 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import Core from "sap/ui/core/Core";
|
|
8
|
-
import { PluginRegistry } from "./core/PluginRegistry";
|
|
9
|
-
import "./core/LayoutRegistry";
|
|
10
|
-
import { StringPlugin } from "./plugins/controls/StringPlugin";
|
|
11
|
-
import { NumberPlugin } from "./plugins/controls/NumberPlugin";
|
|
12
|
-
import { BooleanPlugin } from "./plugins/controls/BooleanPlugin";
|
|
13
|
-
import { DropdownPlugin } from "./plugins/controls/DropdownPlugin";
|
|
14
|
-
import { DatePlugin } from "./plugins/controls/DatePlugin";
|
|
15
|
-
import { TimePlugin } from "./plugins/controls/TimePlugin";
|
|
16
|
-
import { DateTimePlugin } from "./plugins/controls/DateTimePlugin";
|
|
17
|
-
import { ArrayPlugin } from "./plugins/controls/ArrayPlugin";
|
|
18
|
-
|
|
19
|
-
import { TextAreaPlugin } from "./plugins/controls/TextAreaPlugin";
|
|
20
|
-
import { SwitchPlugin } from "./plugins/controls/SwitchPlugin";
|
|
21
|
-
import { LiveSearchPlugin } from "./plugins/datasources/LiveSearchPlugin";
|
|
22
8
|
|
|
23
9
|
// Delegate to standard library registration
|
|
24
10
|
Core.initLibrary({
|
|
@@ -45,24 +31,5 @@ Core.initLibrary({
|
|
|
45
31
|
noLibraryCSS: true
|
|
46
32
|
});
|
|
47
33
|
|
|
48
|
-
/**
|
|
49
|
-
* Global Bootstrapper: Maps all standard primitive types to their respective plugins.
|
|
50
|
-
*/
|
|
51
|
-
const registry = PluginRegistry.getInstance();
|
|
52
|
-
registry.register("string", StringPlugin);
|
|
53
|
-
registry.register("string", TextAreaPlugin, "textArea");
|
|
54
|
-
registry.register("number", NumberPlugin);
|
|
55
|
-
registry.register("boolean", BooleanPlugin);
|
|
56
|
-
registry.register("boolean", SwitchPlugin, "switch");
|
|
57
|
-
// @ts-ignore: Custom UI widgets mapped back to string primitives for UI orchestration
|
|
58
|
-
registry.register("dropdown", DropdownPlugin);
|
|
59
|
-
registry.register("date", DatePlugin);
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
registry.register("time", TimePlugin);
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
registry.register("datetime", DateTimePlugin);
|
|
64
|
-
registry.register("array", ArrayPlugin);
|
|
65
|
-
registry.register("string", LiveSearchPlugin, "liveSearch");
|
|
66
|
-
|
|
67
34
|
// Exporting window object safely for UI5 compatibility if needed
|
|
68
35
|
export default (window as unknown)["nz"]["co"]["siliconst"]["ui5"]["metaui"];
|
|
@@ -7,6 +7,16 @@ sap.ui.define(["./BasePlugin", "sap/m/Button"], function (___BasePlugin, Button)
|
|
|
7
7
|
*/
|
|
8
8
|
const BasePlugin = ___BasePlugin["BasePlugin"];
|
|
9
9
|
class ArrayPlugin extends BasePlugin {
|
|
10
|
+
/**
|
|
11
|
+
* Renders a `sap.m.Button` to open a nested array form dialog.
|
|
12
|
+
*
|
|
13
|
+
* @param field The specific JSON schema properties for this field.
|
|
14
|
+
* @param bindingPath The JSON path bound to this control.
|
|
15
|
+
* @param modelName The UI5 JSONModel name.
|
|
16
|
+
* @param engineScopeId The deterministic scope ID.
|
|
17
|
+
* @param onChange The callback fired on value change.
|
|
18
|
+
* @returns {Control} The configured Button control.
|
|
19
|
+
*/
|
|
10
20
|
render(field, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
11
21
|
this.onChange = onChange;
|
|
12
22
|
this.metadata = field;
|
|
@@ -58,9 +68,17 @@ sap.ui.define(["./BasePlugin", "sap/m/Button"], function (___BasePlugin, Button)
|
|
|
58
68
|
});
|
|
59
69
|
return this.control;
|
|
60
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Read-only component for the engine, returns null.
|
|
74
|
+
*/
|
|
61
75
|
getValue() {
|
|
62
76
|
return null;
|
|
63
77
|
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Read-only component, no dynamic state handling needed for the button itself.
|
|
81
|
+
*/
|
|
64
82
|
applyState() {
|
|
65
83
|
// dynamic state changes
|
|
66
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMZ,MAAMC,WAAW,SAASF,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field 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 Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): any {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -7,8 +7,24 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin" {
|
|
|
7
7
|
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
8
8
|
import Control from "sap/ui/core/Control";
|
|
9
9
|
export class ArrayPlugin extends BasePlugin {
|
|
10
|
+
/**
|
|
11
|
+
* Renders a `sap.m.Button` to open a nested array form dialog.
|
|
12
|
+
*
|
|
13
|
+
* @param field The specific JSON schema properties for this field.
|
|
14
|
+
* @param bindingPath The JSON path bound to this control.
|
|
15
|
+
* @param modelName The UI5 JSONModel name.
|
|
16
|
+
* @param engineScopeId The deterministic scope ID.
|
|
17
|
+
* @param onChange The callback fired on value change.
|
|
18
|
+
* @returns {Control} The configured Button control.
|
|
19
|
+
*/
|
|
10
20
|
render(field: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
21
|
+
/**
|
|
22
|
+
* Read-only component for the engine, returns null.
|
|
23
|
+
*/
|
|
11
24
|
protected getValue(): any;
|
|
25
|
+
/**
|
|
26
|
+
* Read-only component, no dynamic state handling needed for the button itself.
|
|
27
|
+
*/
|
|
12
28
|
protected applyState(): void;
|
|
13
29
|
}
|
|
14
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yDAAyD,CAAC;IACzE;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,WAAY,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"ArrayPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yDAAyD,CAAC;IACzE;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,WAAY,SAAQ,UAAU;QACvC;;;;;;;;;WASG;QACI,MAAM,CAAC,KAAK,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;QA4DrL;;WAEG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAG/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,
|
|
1
|
+
{"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field 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 Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): any {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,EAWtBG,OAAOC,EAA2BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAC/GC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChB,MAAMO,EAAUN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAEzE,MAAMS,EAAiB,CACnBC,KAAM,QACNC,MAAOZ,EAAMa,IAAIC,OAASP,EAC1BQ,MAAOf,EAAMe,OAAS,CAClBJ,KAAM,SACNK,WAAY,CAAC,IAIrB,GAAIhB,EAAMiB,SAAU,CAChBP,EAAUO,SAAWjB,EAAMiB,QAC/B,CAEAZ,KAAKa,QAAU,IAAIC,EAAO,CACtBC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCqB,MAAOjB,KAAKkB,WAAa,eAAiB,eAC1CC,MAAOnB,KAAKkB,WAAa,qBAAuB,kBAChDE,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAcF,EAAIG,SAAS5B,GACjC,IAAK2B,EAAa,OAElB,MAAME,EAAiBJ,EAAIK,kBAAkB9B,GAC7C,IAAI+B,EAAahC,EACjB,GAAI8B,IAAmB9B,EAAYO,WAAW,KAAM,CAChD,MAAM0B,EAAUH,EAAeI,UAC/BF,EAAaC,EAAQE,SAAS,KAAOF,EAAUjC,EAAeiC,IAAY,IAAM,IAAMjC,EAAciC,EAAU,IAAMjC,CACxH,CAEA,MAAMoC,EAAaR,EAAYS,YAAYL,IAAe,GAE1DM,IAAI1B,GAAG2B,QAAQ,CAAC,0DAA4DC,IACxE,MAAMC,EAAO,IAAID,EAAc,CAC3BE,iBAAkBjC,EAClBkC,KAAMP,EACNQ,SAAUxC,KAAKkB,aAInB,KAAMlB,KAAKkB,WAAY,CACnBmB,EAAKI,aAAcC,IACf,MAAMC,EAAUD,EAAEE,aAAa,WAC/BpB,EAAYqB,YAAYjB,EAAYe,IAE5C,CAEA,MAAMG,EAAanD,EAAMa,IAAIuC,oBAAsB/C,KAAKkB,WAAa,QAAU,MAC/EmB,EAAKW,aAAa,mBAAmBrD,EAAMa,IAAIC,OAASP,IAAW4C,QAK/E,OAAO9C,KAAKa,OAChB,CAKUoC,WACN,OAAO,IACX,CAKUC,aACN,EAEP,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA1D,cAAA,OAAA0D,CAAA","ignoreList":[]}
|
|
@@ -10,6 +10,16 @@ import Button from "sap/m/Button";
|
|
|
10
10
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
11
11
|
|
|
12
12
|
export class ArrayPlugin extends BasePlugin {
|
|
13
|
+
/**
|
|
14
|
+
* Renders a `sap.m.Button` to open a nested array form dialog.
|
|
15
|
+
*
|
|
16
|
+
* @param field 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 Button control.
|
|
22
|
+
*/
|
|
13
23
|
public render(field: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
14
24
|
this.onChange = onChange;
|
|
15
25
|
this.metadata = field;
|
|
@@ -70,10 +80,16 @@ export class ArrayPlugin extends BasePlugin {
|
|
|
70
80
|
return this.control as Control;
|
|
71
81
|
}
|
|
72
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Read-only component for the engine, returns null.
|
|
85
|
+
*/
|
|
73
86
|
protected getValue(): any {
|
|
74
87
|
return null;
|
|
75
88
|
}
|
|
76
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Read-only component, no dynamic state handling needed for the button itself.
|
|
92
|
+
*/
|
|
77
93
|
protected applyState(): void {
|
|
78
94
|
// dynamic state changes
|
|
79
95
|
}
|
|
@@ -3,6 +3,16 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
|
|
|
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;
|
|
@@ -56,9 +66,18 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
|
|
|
56
66
|
this.applyCommonDirectives(this.control, metadata, modelName);
|
|
57
67
|
return this.control;
|
|
58
68
|
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves the current scanned text.
|
|
72
|
+
* @returns {any} The barcode string.
|
|
73
|
+
*/
|
|
59
74
|
getValue() {
|
|
60
75
|
return this.inputControl ? this.inputControl.getValue() : null;
|
|
61
76
|
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Applies dynamic read-only state.
|
|
80
|
+
*/
|
|
62
81
|
applyState() {
|
|
63
82
|
if (this.inputControl && this.metadata) {
|
|
64
83
|
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","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","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\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\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 protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\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;
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","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\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\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 {any} The barcode string.\n */\n protected getValue(): any {\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":"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","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;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the current scanned text.
|
|
20
|
+
* @returns {any} The barcode string.
|
|
21
|
+
*/
|
|
8
22
|
protected getValue(): any;
|
|
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;QA4DxL;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","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\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\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 protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\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":"wIAASA,EAAUC,EAAA,cASZ,MAAMC,UAA6BF,
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","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\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\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 {any} The barcode string.\n */\n protected getValue(): any {\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":"wIAASA,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,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCR,KAAKS,QAAU,IAAIF,EAAY,CAC3BG,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCgB,KAAM,IAAIf,KAAaD,OAE3BI,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GACnD,OAAOG,KAAKS,OAChB,CAEAT,KAAKc,aAAe,IAAIC,EAAM,CAC1BL,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,UACvDoB,MAAO,IAAInB,KAAaD,KACxBqB,UAAWtB,EAASU,IAAIa,SACxBC,MAAO,OACPC,OAAQA,KACJ,MAAMC,EAASrB,KAAKsB,WACpB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,KAIR,MAAMuB,EAAa,IAAIC,EAAqB,CACxCf,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,QACvD8B,YAAcC,IACV,MAAMf,EAAOe,EAAOC,aAAa,QACjC,GAAIhB,EAAM,CACNZ,KAAKc,aAAae,SAASjB,GAE3B,MAAMkB,EAAQ9B,KAAKc,aAAaiB,SAAS/B,KAAKH,WAC9C,GAAIiC,EAAO,CACPA,EAAME,YAAYpC,EAAagB,EACnC,CACA,MAAMS,EAASrB,KAAKsB,WACxB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,CACA,KAIRD,KAAKS,QAAU,IAAIwB,EAAK,CACpBvB,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCsC,MAAO,CAAClC,KAAKc,aAAcU,GAC3BL,MAAO,SACRgB,cAAc,0BAEjBnC,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GAEnD,OAAOG,KAAKS,OAChB,CAMU2B,WACN,OAAOpC,KAAKc,aAAed,KAAKc,aAAasB,WAAa,IAC9D,CAKUC,aACN,GAAIrC,KAAKc,cAAgBd,KAAKL,SAAU,CACpC,IAAKK,KAAKG,WAAY,OACtBH,KAAKc,aAAawB,aAAatC,KAAKL,SAASU,IAAIa,SACrD,CACJ,EACH,IAAAqB,EAAA,CAAAC,WAAA,MAAAD,EAAA9C,uBAAA,OAAA8C,CAAA","ignoreList":[]}
|
|
@@ -10,6 +10,16 @@ import BarcodeScannerButton from "sap/ndc/BarcodeScannerButton";
|
|
|
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;
|
|
@@ -70,10 +80,17 @@ export class BarcodeScannerPlugin extends BasePlugin {
|
|
|
70
80
|
return this.control as Control;
|
|
71
81
|
}
|
|
72
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves the current scanned text.
|
|
85
|
+
* @returns {any} The barcode string.
|
|
86
|
+
*/
|
|
73
87
|
protected getValue(): any {
|
|
74
88
|
return this.inputControl ? this.inputControl.getValue() : null;
|
|
75
89
|
}
|
|
76
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Applies dynamic read-only state.
|
|
93
|
+
*/
|
|
77
94
|
protected applyState(): void {
|
|
78
95
|
if (this.inputControl && this.metadata) {
|
|
79
96
|
if (!this.isEditable) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanPlugin-dbg.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","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\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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 return this.control as Control;\n }\n\n /**\n * Retrieves the current boolean state.\n * @returns {boolean} The selected state.\n */\n protected getValue(): any {\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;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAKnB;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,aAAa,SAASF,UAAU,CAAC;IAC1C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAClBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAC3BG,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACX,aAAa,EAAEF,WAAW,CAAC;UACrDc,IAAI,EAAE;YACFC,IAAI,EAAE,GAAGd,SAAS,IAAID,WAAW,EAAE;YACnCgB,SAAS,EAAGC,GAAY,IAAKA,GAAG,GAAG,KAAK,GAAG;UAC/C;QACJ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEZ,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACU,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIQ,QAAQ,CAAC;QACxBP,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACX,aAAa,EAAEF,WAAW,CAAC;QACrDoB,QAAQ,EAAE,IAAInB,SAAS,IAAID,WAAW,GAAG;QACzCqB,OAAO,EAAE,CAACtB,aAAa,CAACQ,EAAE,EAAEe,QAAQ;QACpCC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMP,GAAG,GAAGO,MAAM,CAACC,YAAY,CAAC,UAAU,CAAC;UAC3C,MAAMC,MAAM,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC;UAC9B,IAAI,IAAI,CAACxB,QAAQ,EAAE;YACf,IAAI,CAACA,QAAQ,CAACuB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"BooleanPlugin-dbg.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","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\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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(): any {\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;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAKnB;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,aAAa,SAASF,UAAU,CAAC;IAC1C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAClBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAC3BG,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACX,aAAa,EAAEF,WAAW,CAAC;UACrDc,IAAI,EAAE;YACFC,IAAI,EAAE,GAAGd,SAAS,IAAID,WAAW,EAAE;YACnCgB,SAAS,EAAGC,GAAY,IAAKA,GAAG,GAAG,KAAK,GAAG;UAC/C;QACJ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEZ,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACU,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIQ,QAAQ,CAAC;QACxBP,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACX,aAAa,EAAEF,WAAW,CAAC;QACrDoB,QAAQ,EAAE,IAAInB,SAAS,IAAID,WAAW,GAAG;QACzCqB,OAAO,EAAE,CAACtB,aAAa,CAACQ,EAAE,EAAEe,QAAQ;QACpCC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMP,GAAG,GAAGO,MAAM,CAACC,YAAY,CAAC,UAAU,CAAC;UAC3C,MAAMC,MAAM,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC;UAC9B,IAAI,IAAI,CAACxB,QAAQ,EAAE;YACf,IAAI,CAACA,QAAQ,CAACuB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,IAAI,CAACX,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEZ,aAAa,EAAEE,SAAS,CAAC;MAElE,OAAO,IAAI,CAACU,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcmB,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAACnB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAcoB,WAAW,CAAC,CAAC,GAAG,KAAK;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACrB,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACM,OAAO,CAAcsB,UAAU,CAAC,CAAC,IAAI,CAAC7B,QAAQ,CAACG,EAAE,EAAEe,QAAQ,CAAC;MACtE;IACJ;EACJ;EAAC,IAAAY,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArC,aAAA,GAAAA,aAAA;EAAA,OAAAqC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -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;IAE1C;;;;;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;
|
|
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;IAE1C;;;;;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;QAoC7L;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;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 i=t["BasePlugin"];class s extends i{render(t,i,s="meta",a,n){this.onChange=n;this.metadata=t;if(!this.isEditable){sap.ui.requireSync("sap/m/Text");const e=sap.ui.require("sap/m/Text");this.control=new e({id:this.generateStableId(a,i),text:{path:`${s}>${i}`,formatter:t=>t?"Yes":"No"}});this.applyCommonDirectives(this.control,t,s);return this.control}this.control=new e({id:this.generateStableId(a,i),selected:`{${s}>${i}}`,enabled:!t.ui?.readOnly,select:t=>{const e=t.getParameter("selected");const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});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 a={__esModule:true};a.BooleanPlugin=s;return a});
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/CheckBox"],function(t,e){"use strict";const i=t["BasePlugin"];class s extends i{render(t,i,s="meta",a,n){this.onChange=n;this.metadata=t;if(!this.isEditable){sap.ui.requireSync("sap/m/Text");const e=sap.ui.require("sap/m/Text");this.control=new e({id:this.generateStableId(a,i),text:{path:`${s}>${i}`,formatter:t=>t?"Yes":"No"}});this.applyCommonDirectives(this.control,t,s);return this.control}this.control=new e({id:this.generateStableId(a,i),selected:`{${s}>${i}}`,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,s);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 a={__esModule:true};a.BooleanPlugin=s;return a});
|
|
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","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","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\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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 return this.control as Control;\n }\n\n /**\n * Retrieves the current boolean state.\n * @returns {boolean} The selected state.\n */\n protected getValue(): any {\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":"2EAAA,MAKSA,EAAUC,EAAA,cAWZ,MAAMC,UAAsBF,EASxBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAC3BG,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCe,KAAM,CACFC,KAAM,GAAGf,KAAaD,IACtBiB,UAAYC,GAAiBA,EAAM,MAAQ,QAGnDd,KAAKe,sBAAsBf,KAAKQ,QAASb,EAAeE,GACxD,OAAOG,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIQ,EAAS,CACxBP,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCqB,SAAU,IAAIpB,KAAaD,KAC3BsB,SAAUvB,EAAcS,IAAIe,SAC5BC,OAASC,IACL,MAAMP,EAAMO,EAAOC,aAAa,YAChC,MAAMC,EAASvB,KAAKwB,WACpB,GAAIxB,KAAKD,SAAU,CACfC,KAAKD,SAASwB,EAAOE,QAASzB,KAAK0B,SACvC,
|
|
1
|
+
{"version":3,"file":"BooleanPlugin.js","names":["BasePlugin","___BasePlugin","BooleanPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","applyCommonDirectives","CheckBox","selected","enabled","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\";\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\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(): any {\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":"2EAAA,MAKSA,EAAUC,EAAA,cAWZ,MAAMC,UAAsBF,EASxBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAC3BG,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCe,KAAM,CACFC,KAAM,GAAGf,KAAaD,IACtBiB,UAAYC,GAAiBA,EAAM,MAAQ,QAGnDd,KAAKe,sBAAsBf,KAAKQ,QAASb,EAAeE,GACxD,OAAOG,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIQ,EAAS,CACxBP,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCqB,SAAU,IAAIpB,KAAaD,KAC3BsB,SAAUvB,EAAcS,IAAIe,SAC5BC,OAASC,IACL,MAAMP,EAAMO,EAAOC,aAAa,YAChC,MAAMC,EAASvB,KAAKwB,WACpB,GAAIxB,KAAKD,SAAU,CACfC,KAAKD,SAASwB,EAAOE,QAASzB,KAAK0B,SACvC,KAIR1B,KAAKe,sBAAsBf,KAAKQ,QAASb,EAAeE,GAExD,OAAOG,KAAKQ,OAChB,CAMUmB,WACN,OAAO3B,KAAKQ,QAAWR,KAAKQ,QAAqBoB,cAAgB,KACrE,CAKUC,aACN,GAAI7B,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKQ,QAAqBsB,YAAY9B,KAAKC,SAASG,IAAIe,SAC7D,CACJ,EACH,IAAAY,EAAA,CAAAC,WAAA,MAAAD,EAAAtC,gBAAA,OAAAsC,CAAA","ignoreList":[]}
|
|
@@ -7,6 +7,16 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/CameraControl"], functi
|
|
|
7
7
|
const BasePlugin = ___controls_BasePlugin["BasePlugin"];
|
|
8
8
|
const CameraControl = _interopRequireDefault(__CameraControl);
|
|
9
9
|
class CameraPlugin extends BasePlugin {
|
|
10
|
+
/**
|
|
11
|
+
* Renders a `CameraControl` component.
|
|
12
|
+
*
|
|
13
|
+
* @param metadata The specific JSON schema properties for this field.
|
|
14
|
+
* @param bindingPath The JSON path bound to this control.
|
|
15
|
+
* @param modelName The UI5 JSONModel name.
|
|
16
|
+
* @param engineScopeId The deterministic scope ID.
|
|
17
|
+
* @param onChange The callback fired on value change.
|
|
18
|
+
* @returns {Control} The configured CameraControl.
|
|
19
|
+
*/
|
|
10
20
|
render(metadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
11
21
|
this.onChange = onChange;
|
|
12
22
|
this.metadata = metadata;
|
|
@@ -41,9 +51,18 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/CameraControl"], functi
|
|
|
41
51
|
});
|
|
42
52
|
return this.control;
|
|
43
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the current base64 image state.
|
|
57
|
+
* @returns {any} The image value.
|
|
58
|
+
*/
|
|
44
59
|
getValue() {
|
|
45
60
|
return this.control ? this.control.getValue() : null;
|
|
46
61
|
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Applies dynamic read-only state.
|
|
65
|
+
*/
|
|
47
66
|
applyState() {
|
|
48
67
|
if (this.control && this.metadata) {
|
|
49
68
|
if (!this.isEditable) return;
|