@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
|
@@ -10,8 +10,25 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin" {
|
|
|
10
10
|
* Handles rendering and logic for timestamps/datetime inputs.
|
|
11
11
|
*/
|
|
12
12
|
export class DateTimePlugin extends BasePlugin {
|
|
13
|
+
/**
|
|
14
|
+
* Renders a `sap.m.DateTimePicker` component.
|
|
15
|
+
*
|
|
16
|
+
* @param fieldMetadata 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 DateTimePicker control.
|
|
22
|
+
*/
|
|
13
23
|
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the current datetime string.
|
|
26
|
+
* @returns {any} The datetime value.
|
|
27
|
+
*/
|
|
14
28
|
protected getValue(): any;
|
|
29
|
+
/**
|
|
30
|
+
* Applies dynamic read-only state.
|
|
31
|
+
*/
|
|
15
32
|
protected applyState(): void;
|
|
16
33
|
}
|
|
17
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,4DAA4D,CAAC;IAC5E;;;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;;OAEG;IACH,MAAa,cAAe,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"DateTimePlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,4DAA4D,CAAC;IAC5E;;;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;;OAEG;IACH,MAAa,cAAe,SAAQ,UAAU;QAC1C;;;;;;;;;WASG;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;QAgD7L;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAQ/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePlugin.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","readOnly","required","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\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 type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\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 protected getValue(): any {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":"iFAAA,MAKSA,EAAUC,EAAA,cAQZ,MAAMC,UAAuBF,
|
|
1
|
+
{"version":3,"file":"DateTimePlugin.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","readOnly","required","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\n /**\n * Renders a `sap.m.DateTimePicker` component.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured DateTimePicker 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 type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\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 datetime string.\n * @returns {any} The datetime value.\n */\n protected getValue(): any {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\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 const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":"iFAAA,MAKSA,EAAUC,EAAA,cAQZ,MAAMC,UAAuBF,EAWzBG,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,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,+BAIrBhB,KAAKiB,sBAAsBjB,KAAKQ,QAASb,EAAeE,GACxD,OAAOG,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIU,EAAe,CAC9BT,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCuB,MAAO,CACHP,KAAM,GAAGf,KAAaD,IACtBiB,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,6BAGjBI,UAAWzB,EAAcS,IAAIiB,SAC7BC,SAAU3B,EAAc2B,SACxBC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,SAChC,MAAMC,EAAS3B,KAAK4B,WACpB,GAAI5B,KAAKD,SAAU,CACfC,KAAKD,SAAS4B,EAAOE,QAAS7B,KAAK8B,SACvC,KAIR9B,KAAKiB,sBAAsBjB,KAAKQ,QAASb,EAAeE,GAExD,OAAOG,KAAKQ,OAChB,CAMUuB,WACN,OAAO/B,KAAKQ,QAAWR,KAAKQ,QAA2BuB,WAAa,IACxE,CAKUC,aACN,GAAIhC,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAM+B,EAAQjC,KAAKQ,QACnByB,EAAMC,aAAalC,KAAKC,SAASG,IAAIiB,UACrCY,EAAME,YAAYnC,KAAKC,SAASqB,SACpC,CACJ,EACH,IAAAc,EAAA,CAAAC,WAAA,MAAAD,EAAA3C,iBAAA,OAAA2C,CAAA","ignoreList":[]}
|
|
@@ -12,6 +12,16 @@ import Control from "sap/ui/core/Control";
|
|
|
12
12
|
* Handles rendering and logic for timestamps/datetime inputs.
|
|
13
13
|
*/
|
|
14
14
|
export class DateTimePlugin extends BasePlugin {
|
|
15
|
+
/**
|
|
16
|
+
* Renders a `sap.m.DateTimePicker` component.
|
|
17
|
+
*
|
|
18
|
+
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
19
|
+
* @param bindingPath The JSON path bound to this control.
|
|
20
|
+
* @param modelName The UI5 JSONModel name.
|
|
21
|
+
* @param engineScopeId The deterministic scope ID.
|
|
22
|
+
* @param onChange The callback fired on value change.
|
|
23
|
+
* @returns {Control} The configured DateTimePicker control.
|
|
24
|
+
*/
|
|
15
25
|
public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
16
26
|
this.onChange = onChange;
|
|
17
27
|
this.metadata = fieldMetadata;
|
|
@@ -60,10 +70,17 @@ export class DateTimePlugin extends BasePlugin {
|
|
|
60
70
|
return this.control as Control;
|
|
61
71
|
}
|
|
62
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves the current datetime string.
|
|
75
|
+
* @returns {any} The datetime value.
|
|
76
|
+
*/
|
|
63
77
|
protected getValue(): any {
|
|
64
78
|
return this.control ? (this.control as DateTimePicker).getValue() : null;
|
|
65
79
|
}
|
|
66
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Applies dynamic read-only state.
|
|
83
|
+
*/
|
|
67
84
|
protected applyState(): void {
|
|
68
85
|
if (this.control && this.metadata) {
|
|
69
86
|
if (!this.isEditable) return;
|
|
@@ -20,6 +20,8 @@ sap.ui.define(["./BasePlugin", "sap/m/Select", "sap/ui/core/Item"], function (__
|
|
|
20
20
|
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
21
21
|
* @param bindingPath The JSON path bound to this control.
|
|
22
22
|
* @param modelName The UI5 JSONModel name.
|
|
23
|
+
* @param engineScopeId The deterministic scope ID.
|
|
24
|
+
* @param onChange The callback fired on value change.
|
|
23
25
|
* @returns {Control} The configured Select control.
|
|
24
26
|
*/
|
|
25
27
|
render(fieldMetadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownPlugin-dbg.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","TextControl","require","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\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 Select 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 \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {any} The selected key.\n */\n protected getValue(): any {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;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;QAEhD,MAAMC,cAAc,GAAGZ,aAAa,CAACa,SAAS,IAAIC,KAAK,CAACC,OAAO,CAACf,aAAa,CAACa,SAAS,CAAC,GAClFb,aAAa,CAACa,SAAS,GACtBb,aAAa,CAACgB,IAAI,GAAGhB,aAAa,CAACgB,IAAI,CAACC,GAAG,CAACC,CAAC,KAAK;UAAEC,GAAG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IAAI,CAACC,UAAU,EAAE;QACtB,MAAMyB,MAAM,GAAG,IAAI,CAACT,OAAiB;QACrCS,MAAM,CAACuB,UAAU,CAAC,CAAC,IAAI,CAACjD,QAAQ,CAACG,EAAE,EAAE2B,QAAQ,CAAC;MAClD;IACJ;EACJ;EAAC,IAAAoB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAzD,cAAA,GAAAA,cAAA;EAAA,OAAAyD,SAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DropdownPlugin-dbg.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","TextControl","require","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select 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 \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {any} The selected key.\n */\n protected getValue(): any {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;AACJ;AACA;AACA;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;QAEhD,MAAMC,cAAc,GAAGZ,aAAa,CAACa,SAAS,IAAIC,KAAK,CAACC,OAAO,CAACf,aAAa,CAACa,SAAS,CAAC,GAClFb,aAAa,CAACa,SAAS,GACtBb,aAAa,CAACgB,IAAI,GAAGhB,aAAa,CAACgB,IAAI,CAACC,GAAG,CAACC,CAAC,KAAK;UAAEC,GAAG,EAAEC,MAAM,CAACF,CAAC,CAAC;UAAEG,IAAI,EAAED,MAAM,CAACF,CAAC;QAAE,CAAC,CAAC,CAAC,GAAG,EAAG;QAEpG,IAAI,CAACI,OAAO,GAAG,IAAIZ,WAAW,CAAC;UAC3Ba,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACrB,aAAa,EAAEF,WAAW,CAAC;UACrDoB,IAAI,EAAE;YACF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AAA;EAAA,OAAAyD,SAAA;AAAA","ignoreList":[]}
|
|
@@ -20,6 +20,8 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin" {
|
|
|
20
20
|
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
21
21
|
* @param bindingPath The JSON path bound to this control.
|
|
22
22
|
* @param modelName The UI5 JSONModel name.
|
|
23
|
+
* @param engineScopeId The deterministic scope ID.
|
|
24
|
+
* @param onChange The callback fired on value change.
|
|
23
25
|
* @returns {Control} The configured Select control.
|
|
24
26
|
*/
|
|
25
27
|
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,4DAA4D,CAAC;IAC5E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAE1C;;;;;;OAMG;IACH,MAAa,cAAe,SAAQ,UAAU;QAC1C
|
|
1
|
+
{"version":3,"file":"DropdownPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,4DAA4D,CAAC;IAC5E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAE1C;;;;;;OAMG;IACH,MAAa,cAAe,SAAQ,UAAU;QAC1C;;;;;;;;;WASG;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;QA2D7L;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAO/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownPlugin.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\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 Select 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 \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {any} The selected key.\n */\n protected getValue(): any {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8FAAA,MAKSA,EAAUC,EAAA,cAaZ,MAAMC,UAAuBF,
|
|
1
|
+
{"version":3,"file":"DropdownPlugin.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select 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 \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {any} The selected key.\n */\n protected getValue(): any {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8FAAA,MAKSA,EAAUC,EAAA,cAaZ,MAAMC,UAAuBF,EAWzBG,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,cAEnC,MAAMC,EAAiBb,EAAcc,WAAaC,MAAMC,QAAQhB,EAAcc,WACxEd,EAAcc,UACbd,EAAciB,KAAOjB,EAAciB,KAAKC,IAAIC,IAAC,CAAOC,IAAKC,OAAOF,GAAIG,KAAMD,OAAOF,MAAS,GAEjGd,KAAKkB,QAAU,IAAIZ,EAAY,CAC3Ba,GAAInB,KAAKoB,iBAAiBtB,EAAeF,GACzCqB,KAAM,CACFI,KAAM,GAAGxB,KAAaD,IACtB0B,UAAYP,IACR,MAAMQ,EAAQf,EAAegB,KAAKC,GAAMA,EAAGV,MAAQA,GACnD,OAAOQ,EAAQA,EAAMN,KAAOF,MAIxCf,KAAK0B,sBAAsB1B,KAAKkB,QAASvB,EAAeE,GACxD,OAAOG,KAAKkB,OAChB,CAEA,MAAMS,EAAS,IAAIC,EAAO,CACtBT,GAAInB,KAAKoB,iBAAiBtB,EAAeF,GACzCiC,YAAa,IAAIhC,KAAaD,KAC9BkC,SAAUnC,EAAcS,IAAI2B,SAC5BC,eAAgB,MAChBC,OAASC,IACL,MAAMC,EAAOD,EAAOE,aAAa,gBACjC,MAAMC,EAAMF,EAAOA,EAAKG,SAAW,GACnC,MAAMC,EAASvC,KAAKwC,WACpB,GAAIxC,KAAKD,SAAU,CACfC,KAAKD,SAASwC,EAAOE,QAASzC,KAAK0C,SACvC,KAIR,MAAMlC,EAAiBb,EAAcc,WAAaC,MAAMC,QAAQhB,EAAcc,WACxEd,EAAcc,UACbd,EAAciB,KAAOjB,EAAciB,KAAKC,IAAIC,IAAC,CAAOC,IAAKC,OAAOF,GAAIG,KAAMD,OAAOF,MAAS,GAEjG,GAAIN,EAAemC,OAAS,EAAG,CAE3BhB,EAAOiB,QAAQ,IAAIC,EAAK,CAAE9B,IAAK,GAAIE,KAAM,oBAEzCT,EAAesC,QAAQrB,IACnBE,EAAOiB,QAAQ,IAAIC,EAAK,CAAE9B,IAAKU,EAAGV,IAAKE,KAAMQ,EAAGR,SAExD,CAEAjB,KAAKkB,QAAUS,EACf3B,KAAK0B,sBAAsB1B,KAAKkB,QAASvB,EAAeE,GACxD,OAAOG,KAAKkB,OAChB,CAMU6B,WACN,OAAO/C,KAAKkB,QAAWlB,KAAKkB,QAAmB8B,iBAAmB,IACtE,CAKUC,aACN,GAAIjD,KAAKkB,SAAWlB,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAMyB,EAAS3B,KAAKkB,QACpBS,EAAOuB,YAAYlD,KAAKC,SAASG,IAAI2B,SACzC,CACJ,EACH,IAAAoB,EAAA,CAAAC,WAAA,MAAAD,EAAA1D,iBAAA,OAAA0D,CAAA","ignoreList":[]}
|
|
@@ -23,6 +23,8 @@ export class DropdownPlugin extends BasePlugin {
|
|
|
23
23
|
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
24
24
|
* @param bindingPath The JSON path bound to this control.
|
|
25
25
|
* @param modelName The UI5 JSONModel name.
|
|
26
|
+
* @param engineScopeId The deterministic scope ID.
|
|
27
|
+
* @param onChange The callback fired on value change.
|
|
26
28
|
* @returns {Control} The configured Select control.
|
|
27
29
|
*/
|
|
28
30
|
public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
@@ -13,6 +13,16 @@ sap.ui.define(["./BasePlugin", "sap/ui/unified/FileUploader"], function (___Base
|
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
15
|
class FileUploaderPlugin extends BasePlugin {
|
|
16
|
+
/**
|
|
17
|
+
* Renders a `sap.ui.unified.FileUploader` component.
|
|
18
|
+
*
|
|
19
|
+
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
20
|
+
* @param bindingPath The JSON path bound to this control.
|
|
21
|
+
* @param modelName The UI5 JSONModel name.
|
|
22
|
+
* @param engineScopeId The deterministic scope ID.
|
|
23
|
+
* @param onChange The callback fired on value change.
|
|
24
|
+
* @returns {Control} The configured FileUploader control.
|
|
25
|
+
*/
|
|
16
26
|
render(fieldMetadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
17
27
|
this.onChange = onChange;
|
|
18
28
|
this.metadata = fieldMetadata;
|
|
@@ -46,9 +56,18 @@ sap.ui.define(["./BasePlugin", "sap/ui/unified/FileUploader"], function (___Base
|
|
|
46
56
|
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
47
57
|
return this.control;
|
|
48
58
|
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves the current file path.
|
|
62
|
+
* @returns {any} The file value.
|
|
63
|
+
*/
|
|
49
64
|
getValue() {
|
|
50
65
|
return this.control ? this.control.getValue() : null;
|
|
51
66
|
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Applies dynamic read-only state.
|
|
70
|
+
*/
|
|
52
71
|
applyState() {
|
|
53
72
|
if (this.control && this.metadata) {
|
|
54
73
|
if (!this.isEditable) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderPlugin-dbg.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","LinkControl","require","control","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\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/Link\");\n const LinkControl = sap.ui.require(\"sap/m/Link\");\n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\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 return this.control as Control;\n }\n\n protected getValue(): any {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).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,kBAAkB,SAASF,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUploaderPlugin-dbg.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","sap","ui","requireSync","LinkControl","require","control","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader 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/Link\");\n const LinkControl = sap.ui.require(\"sap/m/Link\");\n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\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 return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {any} The file value.\n */\n protected getValue(): any {\n return this.control ? (this.control as FileUploader).getValue() : null;\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 FileUploader).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,kBAAkB,SAASF,UAAU,CAAC;IAC/C;AACJ;AACA;AACA;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,O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I,CAACtB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAkBsB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACvB,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACM,OAAO,CAAkBwB,UAAU,CAAC,CAAC,IAAI,CAAC/B,QAAQ,CAACG,EAAE,EAAEc,QAAQ,CAAC;MAC1E;IACJ;EACJ;EAAC,IAAAe,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvC,kBAAA,GAAAA,kBAAA;EAAA,OAAAuC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -13,8 +13,25 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin"
|
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
15
|
export class FileUploaderPlugin extends BasePlugin {
|
|
16
|
+
/**
|
|
17
|
+
* Renders a `sap.ui.unified.FileUploader` component.
|
|
18
|
+
*
|
|
19
|
+
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
20
|
+
* @param bindingPath The JSON path bound to this control.
|
|
21
|
+
* @param modelName The UI5 JSONModel name.
|
|
22
|
+
* @param engineScopeId The deterministic scope ID.
|
|
23
|
+
* @param onChange The callback fired on value change.
|
|
24
|
+
* @returns {Control} The configured FileUploader control.
|
|
25
|
+
*/
|
|
16
26
|
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the current file path.
|
|
29
|
+
* @returns {any} The file value.
|
|
30
|
+
*/
|
|
17
31
|
protected getValue(): any;
|
|
32
|
+
/**
|
|
33
|
+
* Applies dynamic read-only state.
|
|
34
|
+
*/
|
|
18
35
|
protected applyState(): void;
|
|
19
36
|
}
|
|
20
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gEAAgE,CAAC;IAChF;;;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,kBAAmB,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"FileUploaderPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gEAAgE,CAAC;IAChF;;;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,kBAAmB,SAAQ,UAAU;QAC9C;;;;;;;;;WASG;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderPlugin.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","LinkControl","require","control","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\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/Link\");\n const LinkControl = sap.ui.require(\"sap/m/Link\");\n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\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 return this.control as Control;\n }\n\n protected getValue(): any {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wFAAA,MAKSA,EAAUC,EAAA,cAWZ,MAAMC,UAA2BF,
|
|
1
|
+
{"version":3,"file":"FileUploaderPlugin.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","sap","ui","requireSync","LinkControl","require","control","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader 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/Link\");\n const LinkControl = sap.ui.require(\"sap/m/Link\");\n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\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 return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {any} The file value.\n */\n protected getValue(): any {\n return this.control ? (this.control as FileUploader).getValue() : null;\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 FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wFAAA,MAKSA,EAAUC,EAAA,cAWZ,MAAMC,UAA2BF,EAW7BG,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,IAAId,KAAaD,KACvBgB,KAAM,IAAIf,KAAaD,KACvBiB,OAAQ,WAEZb,KAAKc,sBAAsBd,KAAKQ,QAASb,EAAeE,GACxD,OAAOG,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIO,EAAa,CAC5BN,GAAIT,KAAKU,iBAAiBZ,EAAeF,GACzCoB,MAAO,IAAInB,KAAaD,KACxBqB,SAAUtB,EAAcS,IAAIc,SAC5BC,YAAaxB,EAAcS,IAAIgB,OAAS,mBACxCC,MAAO,OACPC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,YAChC,MAAMC,EAAS1B,KAAK2B,WACpB,GAAI3B,KAAKD,SAAU,CACfC,KAAKD,SAAS2B,EAAOE,QAAS5B,KAAK6B,SACvC,KAIR7B,KAAKc,sBAAsBd,KAAKQ,QAASb,EAAeE,GACxD,OAAOG,KAAKQ,OAChB,CAMUsB,WACN,OAAO9B,KAAKQ,QAAWR,KAAKQ,QAAyBsB,WAAa,IACtE,CAKUC,aACN,GAAI/B,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKQ,QAAyBwB,YAAYhC,KAAKC,SAASG,IAAIc,SACjE,CACJ,EACH,IAAAe,EAAA,CAAAC,WAAA,MAAAD,EAAAxC,qBAAA,OAAAwC,CAAA","ignoreList":[]}
|
|
@@ -15,6 +15,16 @@ import Control from "sap/ui/core/Control";
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
export class FileUploaderPlugin extends BasePlugin {
|
|
18
|
+
/**
|
|
19
|
+
* Renders a `sap.ui.unified.FileUploader` component.
|
|
20
|
+
*
|
|
21
|
+
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
22
|
+
* @param bindingPath The JSON path bound to this control.
|
|
23
|
+
* @param modelName The UI5 JSONModel name.
|
|
24
|
+
* @param engineScopeId The deterministic scope ID.
|
|
25
|
+
* @param onChange The callback fired on value change.
|
|
26
|
+
* @returns {Control} The configured FileUploader control.
|
|
27
|
+
*/
|
|
18
28
|
public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
19
29
|
this.onChange = onChange;
|
|
20
30
|
this.metadata = fieldMetadata;
|
|
@@ -51,10 +61,17 @@ export class FileUploaderPlugin extends BasePlugin {
|
|
|
51
61
|
return this.control as Control;
|
|
52
62
|
}
|
|
53
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves the current file path.
|
|
66
|
+
* @returns {any} The file value.
|
|
67
|
+
*/
|
|
54
68
|
protected getValue(): any {
|
|
55
69
|
return this.control ? (this.control as FileUploader).getValue() : null;
|
|
56
70
|
}
|
|
57
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Applies dynamic read-only state.
|
|
74
|
+
*/
|
|
58
75
|
protected applyState(): void {
|
|
59
76
|
if (this.control && this.metadata) {
|
|
60
77
|
if (!this.isEditable) return;
|
|
@@ -7,6 +7,16 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/GeolocationControl"], f
|
|
|
7
7
|
const BasePlugin = ___controls_BasePlugin["BasePlugin"];
|
|
8
8
|
const GeolocationControl = _interopRequireDefault(__GeolocationControl);
|
|
9
9
|
class GeolocationPlugin extends BasePlugin {
|
|
10
|
+
/**
|
|
11
|
+
* Renders a `GeolocationControl` 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 GeolocationControl.
|
|
19
|
+
*/
|
|
10
20
|
render(metadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
11
21
|
this.onChange = onChange;
|
|
12
22
|
this.metadata = metadata;
|
|
@@ -40,9 +50,18 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/GeolocationControl"], f
|
|
|
40
50
|
});
|
|
41
51
|
return this.control;
|
|
42
52
|
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves the current geolocation object.
|
|
56
|
+
* @returns {any} The geolocation value.
|
|
57
|
+
*/
|
|
43
58
|
getValue() {
|
|
44
59
|
return this.control ? this.control.getValue() : null;
|
|
45
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Applies dynamic read-only state.
|
|
64
|
+
*/
|
|
46
65
|
applyState() {
|
|
47
66
|
if (this.control && this.metadata) {
|
|
48
67
|
if (!this.isEditable) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeolocationPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\n\nexport class GeolocationPlugin extends BasePlugin {\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: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as unknown as { attachCapture: (fn: Function) => void }).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.control ? (this.control as unknown as { getValue: () => unknown }).getValue() : null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as unknown as { setProperty: (k: string, v: unknown) => void }).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,kBAAkB,GAAAC,sBAAA,CAAAC,oBAAA;EAElB,MAAMC,iBAAiB,SAASL,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"GeolocationPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\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 GeolocationControl.\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: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as unknown as { attachCapture: (fn: Function) => void }).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {any} The geolocation value.\n */\n protected getValue(): any {\n return this.control ? (this.control as unknown as { getValue: () => unknown }).getValue() : null;\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 unknown as { setProperty: (k: string, v: unknown) => void }).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,kBAAkB,GAAAC,sBAAA,CAAAC,oBAAA;EAElB,MAAMC,iBAAiB,SAASL,UAAU,CAAC;IAC9C;AACJ;AACA;AACA;AACA;AACA;AACA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,QAAQ,EAAE,CAAC,CAAC1B,QAAQ,CAACS,EAAE,EAAEiB;MAC7B,CAAC,CAAC;MAEF,IAAI,CAACH,qBAAqB,CAAC,IAAI,CAACV,OAAO,EAAEb,QAAQ,EAAEE,SAAS,CAAC;MAE5D,IAAI,CAACW,OAAO,CAA0Dc,aAAa,CAAC,MAAM;QACvF,MAAMC,MAAM,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC;QAC1B,IAAI,IAAI,CAACzB,QAAQ,EAAE;UACf,IAAI,CAACA,QAAQ,CAACwB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACzB,QAAQ,CAAC;QAChD;MACR,CAAC,CAAC;MAEF,OAAO,IAAI,CAACQ,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACckB,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAAClB,OAAO,GAAI,IAAI,CAACA,OAAO,CAA4CkB,QAAQ,CAAC,CAAC,GAAG,IAAI;IACpG;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACnB,OAAO,IAAI,IAAI,CAACb,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QACrB,IAAI,CAACM,OAAO,CAAiEoB,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAACjC,QAAQ,CAACS,EAAE,EAAEiB,QAAQ,CAAC;MACvI;IACJ;EACJ;EAAC,IAAAQ,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApC,iBAAA,GAAAA,iBAAA;EAAA,OAAAoC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -3,8 +3,25 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin" {
|
|
|
3
3
|
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
4
4
|
import Control from "sap/ui/core/Control";
|
|
5
5
|
export class GeolocationPlugin extends BasePlugin {
|
|
6
|
+
/**
|
|
7
|
+
* Renders a `GeolocationControl` component.
|
|
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 GeolocationControl.
|
|
15
|
+
*/
|
|
6
16
|
render(metadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves the current geolocation object.
|
|
19
|
+
* @returns {any} The geolocation value.
|
|
20
|
+
*/
|
|
7
21
|
protected getValue(): any;
|
|
22
|
+
/**
|
|
23
|
+
* Applies dynamic read-only state.
|
|
24
|
+
*/
|
|
8
25
|
protected applyState(): void;
|
|
9
26
|
}
|
|
10
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeolocationPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+DAA+D,CAAC;IAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,MAAa,iBAAkB,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"GeolocationPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+DAA+D,CAAC;IAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,MAAa,iBAAkB,SAAQ,UAAU;QAC7C;;;;;;;;;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;QAuCxL;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,GAAG;QAIzB;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeolocationPlugin.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\n\nexport class GeolocationPlugin extends BasePlugin {\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: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as unknown as { attachCapture: (fn: Function) => void }).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.control ? (this.control as unknown as { getValue: () => unknown }).getValue() : null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as unknown as { setProperty: (k: string, v: unknown) => void }).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"+LAASA,EAAUC,EAAA,oBAGZC,EAAkBC,EAAAC,GAElB,MAAMC,UAA0BL,
|
|
1
|
+
{"version":3,"file":"GeolocationPlugin.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\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 GeolocationControl.\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: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as unknown as { attachCapture: (fn: Function) => void }).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {any} The geolocation value.\n */\n protected getValue(): any {\n return this.control ? (this.control as unknown as { getValue: () => unknown }).getValue() : null;\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 unknown as { setProperty: (k: string, v: unknown) => void }).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"+LAASA,EAAUC,EAAA,oBAGZC,EAAkBC,EAAAC,GAElB,M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
|
|
@@ -4,6 +4,16 @@ import Control from "sap/ui/core/Control";
|
|
|
4
4
|
import GeolocationControl from "../../controls/GeolocationControl";
|
|
5
5
|
|
|
6
6
|
export class GeolocationPlugin extends BasePlugin {
|
|
7
|
+
/**
|
|
8
|
+
* Renders a `GeolocationControl` component.
|
|
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 GeolocationControl.
|
|
16
|
+
*/
|
|
7
17
|
public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
8
18
|
this.onChange = onChange;
|
|
9
19
|
this.metadata = metadata;
|
|
@@ -43,10 +53,17 @@ export class GeolocationPlugin extends BasePlugin {
|
|
|
43
53
|
return this.control as Control;
|
|
44
54
|
}
|
|
45
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves the current geolocation object.
|
|
58
|
+
* @returns {any} The geolocation value.
|
|
59
|
+
*/
|
|
46
60
|
protected getValue(): any {
|
|
47
61
|
return this.control ? (this.control as unknown as { getValue: () => unknown }).getValue() : null;
|
|
48
62
|
}
|
|
49
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Applies dynamic read-only state.
|
|
66
|
+
*/
|
|
50
67
|
protected applyState(): void {
|
|
51
68
|
if (this.control && this.metadata) {
|
|
52
69
|
if (!this.isEditable) return;
|
|
@@ -14,6 +14,16 @@ sap.ui.define(["./BasePlugin", "sap/m/MessageStrip"], function (___BasePlugin, M
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
class MessageStripPlugin extends BasePlugin {
|
|
17
|
+
/**
|
|
18
|
+
* Renders a `sap.m.MessageStrip` component.
|
|
19
|
+
*
|
|
20
|
+
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
21
|
+
* @param bindingPath The JSON path bound to this control.
|
|
22
|
+
* @param modelName The UI5 JSONModel name.
|
|
23
|
+
* @param engineScopeId The deterministic scope ID.
|
|
24
|
+
* @param onChange The callback fired on value change.
|
|
25
|
+
* @returns {Control} The configured MessageStrip control.
|
|
26
|
+
*/
|
|
17
27
|
render(fieldMetadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
|
|
18
28
|
this.onChange = onChange;
|
|
19
29
|
this.metadata = fieldMetadata;
|
|
@@ -29,9 +39,17 @@ sap.ui.define(["./BasePlugin", "sap/m/MessageStrip"], function (___BasePlugin, M
|
|
|
29
39
|
});
|
|
30
40
|
return this.control;
|
|
31
41
|
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Read-only control, returns null.
|
|
45
|
+
*/
|
|
32
46
|
getValue() {
|
|
33
47
|
return null; // Read-only component
|
|
34
48
|
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Read-only control, no dynamic state needed.
|
|
52
|
+
*/
|
|
35
53
|
applyState() {
|
|
36
54
|
// Read-only component, no dynamic state needed currently
|
|
37
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageStripPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","control","MessageStrip","id","generateStableId","text","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\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 // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n type: \"Information\", // Can be driven by schema arguments in the future\n showIcon: true,\n showCloseButton: false\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null; // Read-only component\n }\n\n protected applyState(): void {\n // Read-only component, no dynamic state needed currently\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAKnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,kBAAkB,SAASF,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageStripPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","control","MessageStrip","id","generateStableId","text","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MessageStrip` component.\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 * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured MessageStrip 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 // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n type: \"Information\", // Can be driven by schema arguments in the future\n showIcon: true,\n showCloseButton: false\n });\n\n return this.control as Control;\n }\n\n /**\n * Read-only control, returns null.\n */\n protected getValue(): any {\n return null; // Read-only component\n }\n\n /**\n * Read-only control, no dynamic state needed.\n */\n protected applyState(): void {\n // Read-only component, no dynamic state needed currently\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAKnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,kBAAkB,SAASF,UAAU,CAAC;IAC/C;AACJ;AACA;AACA;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;MACA,IAAI,CAACM,OAAO,GAAG,IAAIC,YAAY,CAAC;QAC5BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACN,aAAa,EAAEF,WAAW,CAAC;QACrDS,IAAI,EAAE,IAAIR,SAAS,IAAID,WAAW,GAAG;QACrCU,IAAI,EAAE,aAAa;QAAE;QACrBC,QAAQ,EAAE,IAAI;QACdC,eAAe,EAAE;MACrB,CAAC,CAAC;MAEF,OAAO,IAAI,CAACP,OAAO;IACvB;;IAEA;AACJ;AACA;IACcQ,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAAC,CAAC;IACjB;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB;IAAA;EAER;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlB,kBAAA,GAAAA,kBAAA;EAAA,OAAAkB,SAAA;AAAA","ignoreList":[]}
|