@siliconst/metaui 1.4.21 → 1.4.34
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/constants/MetaUIConstants-dbg.js +51 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.d.ts +41 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.ts +44 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.ts +2 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +5 -1
- 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 +6 -2
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +10 -9
- package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js +0 -9
- 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 +0 -9
- 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 +3 -9
- package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +0 -11
- 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 +0 -11
- 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 +2 -9
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +2 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +0 -5
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +3 -7
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +1 -6
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +0 -5
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +9 -12
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +51 -12
- 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 +13 -0
- 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 +53 -14
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +2 -2
- 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 +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +8 -7
- 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 +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +3 -4
- 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 +1 -1
- 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 +6 -7
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator-dbg.js +84 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.d.ts +16 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.ts +80 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer-dbg.js +137 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.d.ts +24 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.ts +141 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +26 -0
- 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 +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +29 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +1 -1
- 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 +4 -4
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +11 -11
- package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.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 +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +4 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +5 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +5 -5
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +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 +4 -4
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +7 -5
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +11 -7
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +40 -37
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts +19 -19
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +2 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +18 -15
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +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 +18 -18
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +1 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +4 -4
- 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.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +4 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +5 -4
- 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.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +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 +7 -6
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js +3 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.ts +3 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +109 -108
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.ts +64 -63
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +118 -117
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +105 -104
- package/src/nz/co/siliconst/ui5/metaui/utils/Logger-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/utils/Logger.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/utils/Logger.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/utils/Logger.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApi3Parser.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2DAA2D,CAAC;IAC3E;;;OAGG;IAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;IAC1G,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IAIxE;;;;;OAKG;IACH,MAAa,cAAe,YAAW,oBAAoB;QACvD;;;;;;;;WAQG;QACI,KAAK,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"OpenApi3Parser.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2DAA2D,CAAC;IAC3E;;;OAGG;IAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;IAC1G,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IAIxE;;;;;OAKG;IACH,MAAa,cAAe,YAAW,oBAAoB;QACvD;;;;;;;;WAQG;QACI,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO;KA8ErE;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApi3Parser.js","names":["OpenApiPropertyMapper","___OpenApiPropertyMapper","OpenApiRefResolver","___OpenApiRefResolver","OpenApi3Parser","parse","openApiRoot","targetDefinition","targetObject","components","schemas","keys","Object","length","replace","Error","$ref","resolved","resolve","Array","isArray","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","schema","title","info","type","layoutStrategy","additionalProperties","mapPropertyMetadata","properties","requiredFields","required","mapProperties","items","definitions","key","mappedProp","ui","__exports","__esModule"],"sources":["OpenApi3Parser.ts"],"sourcesContent":["/**\n * @file OpenApi3Parser.ts\n * @description Native parser for OpenAPI 3.0.x specifications.\n */\n\nimport { IOpenApiParserPlugin } from \"../interfaces/IOpenApiParserPlugin\";\nimport { ISchema } from \"../../interfaces/ISchema\";\nimport { OpenApiPropertyMapper } from \"./OpenApiPropertyMapper\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\n\n/**\n * Parser plugin specifically designed for parsing OpenAPI 3.0.x schemas.\n * Responsible for translating OpenAPI 3.0 specific constructs into the MetaUI normalized schema.\n * \n * @public\n */\nexport class OpenApi3Parser implements IOpenApiParserPlugin {\n /**\n * Parses a raw OpenAPI 3.0 document into a normalized MetaUI ISchema tree.\n * Extracts definitions from components.schemas, normalizes properties, and recursively resolves composition (allOf).\n * \n * @param {any} openApiRoot The root JSON document.\n * @param {string} [targetDefinition] Optional specific schema to extract from components.schemas. If omitted, uses the first schema available.\n * @returns {ISchema} The synthesized MetaUI schema structure.\n * @throws {Error} If the target definition cannot be found in the provided Swagger document.\n */\n public parse(openApiRoot:
|
|
1
|
+
{"version":3,"file":"OpenApi3Parser.js","names":["OpenApiPropertyMapper","___OpenApiPropertyMapper","OpenApiRefResolver","___OpenApiRefResolver","OpenApi3Parser","parse","openApiRoot","targetDefinition","targetObject","components","schemas","keys","Object","length","replace","Error","$ref","resolved","resolve","Array","isArray","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","schema","title","info","type","layoutStrategy","additionalProperties","mapPropertyMetadata","properties","requiredFields","required","mapProperties","items","definitions","key","mappedProp","ui","__exports","__esModule"],"sources":["OpenApi3Parser.ts"],"sourcesContent":["/**\n * @file OpenApi3Parser.ts\n * @description Native parser for OpenAPI 3.0.x specifications.\n */\n\nimport { IOpenApiParserPlugin } from \"../interfaces/IOpenApiParserPlugin\";\nimport { ISchema } from \"../../interfaces/ISchema\";\nimport { OpenApiPropertyMapper } from \"./OpenApiPropertyMapper\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\n\n/**\n * Parser plugin specifically designed for parsing OpenAPI 3.0.x schemas.\n * Responsible for translating OpenAPI 3.0 specific constructs into the MetaUI normalized schema.\n * \n * @public\n */\nexport class OpenApi3Parser implements IOpenApiParserPlugin {\n /**\n * Parses a raw OpenAPI 3.0 document into a normalized MetaUI ISchema tree.\n * Extracts definitions from components.schemas, normalizes properties, and recursively resolves composition (allOf).\n * \n * @param {any} openApiRoot The root JSON document.\n * @param {string} [targetDefinition] Optional specific schema to extract from components.schemas. If omitted, uses the first schema available.\n * @returns {ISchema} The synthesized MetaUI schema structure.\n * @throws {Error} If the target definition cannot be found in the provided Swagger document.\n */\n public parse(openApiRoot: any, targetDefinition?: string): ISchema {\n let targetObject = openApiRoot;\n\n if (!targetDefinition) {\n if (openApiRoot.components && openApiRoot.components.schemas) {\n const keys = Object.keys(openApiRoot.components.schemas);\n if (keys.length > 0) targetDefinition = keys[0];\n }\n }\n\n if (targetDefinition) {\n targetDefinition = targetDefinition.replace(\"#/components/schemas/\", \"\").replace(\"#/definitions/\", \"\");\n if (openApiRoot.components && openApiRoot.components.schemas && openApiRoot.components.schemas[targetDefinition]) {\n targetObject = openApiRoot.components.schemas[targetDefinition];\n } else {\n throw new Error(`[MetaUI OpenApi3Parser] Could not find target definition '${targetDefinition}' in components.schemas.`);\n }\n }\n\n if (targetObject.$ref) {\n const resolved = OpenApiRefResolver.resolve(targetObject.$ref, openApiRoot);\n if (resolved) {\n targetObject = { ...resolved, ...targetObject };\n }\n }\n\n if (Array.isArray(targetObject.allOf)) {\n let merged = { ...targetObject };\n delete merged.allOf;\n for (const subSchema of targetObject.allOf) {\n let resolvedSub = subSchema;\n if (subSchema.$ref) {\n resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};\n }\n merged = OpenApiPropertyMapper.deepMergeSchemas(merged, resolvedSub);\n }\n targetObject = merged;\n }\n\n const schema: ISchema = {\n title: targetObject.title || openApiRoot.info?.title || targetDefinition,\n type: targetObject.type === \"array\" ? \"array\" : \"object\",\n layoutStrategy: targetObject.type === \"array\" ? \"table\" : \"form\"\n };\n\n if (targetObject.additionalProperties) {\n if (targetObject.additionalProperties === true) {\n schema.additionalProperties = true;\n } else if (typeof targetObject.additionalProperties === \"object\") {\n schema.additionalProperties = OpenApiPropertyMapper.mapPropertyMetadata(targetObject.additionalProperties, \"value\", false, openApiRoot, \"3.0\");\n }\n }\n\n if (targetObject.properties) {\n const requiredFields = Array.isArray(targetObject.required) ? targetObject.required : [];\n schema.properties = OpenApiPropertyMapper.mapProperties(targetObject.properties, requiredFields, openApiRoot, \"3.0\");\n } else if (schema.type === \"array\" && targetObject.items) {\n schema.items = OpenApiPropertyMapper.mapPropertyMetadata(targetObject.items, \"items\", false, openApiRoot, \"3.0\");\n }\n\n if (openApiRoot.components && openApiRoot.components.schemas) {\n schema.definitions = {};\n const schemas = openApiRoot.components.schemas;\n for (const key of Object.keys(schemas)) {\n const mappedProp = OpenApiPropertyMapper.mapPropertyMetadata(schemas[key], key, false, openApiRoot, \"3.0\");\n schema.definitions[key] = {\n title: key,\n type: mappedProp.type === \"array\" ? \"array\" : \"object\",\n properties: mappedProp.properties,\n items: mappedProp.items,\n ui: mappedProp.ui,\n layoutStrategy: mappedProp.type === \"array\" ? \"table\" : \"form\"\n };\n }\n }\n\n return schema;\n }\n}\n"],"mappings":"6FAAA,MAOSA,EAAqBC,EAAA,+BACrBC,EAAkBC,EAAA,sBAQpB,MAAMC,EAUFC,MAAMC,EAAkBC,GAC3B,IAAIC,EAAeF,EAEnB,IAAKC,EAAkB,CACnB,GAAID,EAAYG,YAAcH,EAAYG,WAAWC,QAAS,CAC1D,MAAMC,EAAOC,OAAOD,KAAKL,EAAYG,WAAWC,SAChD,GAAIC,EAAKE,OAAS,EAAGN,EAAmBI,EAAK,EACjD,CACJ,CAEA,GAAIJ,EAAkB,CAClBA,EAAmBA,EAAiBO,QAAQ,wBAAyB,IAAIA,QAAQ,iBAAkB,IACnG,GAAIR,EAAYG,YAAcH,EAAYG,WAAWC,SAAWJ,EAAYG,WAAWC,QAAQH,GAAmB,CAC9GC,EAAeF,EAAYG,WAAWC,QAAQH,EAClD,KAAO,CACH,MAAM,IAAIQ,MAAM,6DAA6DR,4BACjF,CACJ,CAEA,GAAIC,EAAaQ,KAAM,CACnB,MAAMC,EAAWf,EAAmBgB,QAAQV,EAAaQ,KAAMV,GAC/D,GAAIW,EAAU,CACVT,EAAe,IAAKS,KAAa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A,EAAK,MAAOjC,EAAa,OACpGoB,EAAOY,YAAYC,GAAO,CACtBZ,MAAOY,EACPV,KAAMW,EAAWX,OAAS,QAAU,QAAU,SAC9CI,WAAYO,EAAWP,WACvBI,MAAOG,EAAWH,MAClBI,GAAID,EAAWC,GACfX,eAAgBU,EAAWX,OAAS,QAAU,QAAU,OAEhE,CACJ,CAEA,OAAOH,CACX,EACH,IAAAgB,EAAA,CAAAC,WAAA,MAAAD,EAAAtC,iBAAA,OAAAsC,CAAA","ignoreList":[]}
|
|
@@ -24,7 +24,7 @@ export class OpenApi3Parser implements IOpenApiParserPlugin {
|
|
|
24
24
|
* @returns {ISchema} The synthesized MetaUI schema structure.
|
|
25
25
|
* @throws {Error} If the target definition cannot be found in the provided Swagger document.
|
|
26
26
|
*/
|
|
27
|
-
public parse(openApiRoot:
|
|
27
|
+
public parse(openApiRoot: any, targetDefinition?: string): ISchema {
|
|
28
28
|
let targetObject = openApiRoot;
|
|
29
29
|
|
|
30
30
|
if (!targetDefinition) {
|
|
@@ -17,7 +17,7 @@ sap.ui.define(["../OpenApiRefResolver", "../OpenApiTypeMapper", "../OpenApiUIMap
|
|
|
17
17
|
/**
|
|
18
18
|
* Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.
|
|
19
19
|
*
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {any} properties The OpenAPI properties block.
|
|
21
21
|
* @param {string[]} requiredKeys Array of required property keys.
|
|
22
22
|
* @param {any} openApiRoot The OpenAPI root document for resolving references.
|
|
23
23
|
* @param {"2.0" | "3.0"} version The OpenAPI version.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiPropertyMapper-dbg.js","names":["OpenApiRefResolver","___OpenApiRefResolver","OpenApiTypeMapper","___OpenApiTypeMapper","OpenApiUIMapper","___OpenApiUIMapper","OpenApiPropertyMapper","mapProperties","properties","requiredKeys","openApiRoot","version","depth","normalizedProps","key","Object","keys","isRequired","includes","propDef","$ref","resolved","resolve","mapPropertyMetadata","swaggerProp","keyName","currentProp","refResult","_resolveReference","_resolveAllOf","type","mapType","metaProp","required","uiDirective","build","length","ui","_applyConstraints","_applyStateModifiers","default","undefined","Array","isArray","enum","widget","_applyPolymorphism","_applyNestedTypes","resolvedType","inlineProp","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","maxLength","minLength","pattern","maximum","minimum","multipleOf","maxItems","minItems","uniqueItems","maxProperties","minProperties","exclusiveMaximum","exclusiveMinimum","readOnly","writeOnly","nullable","deprecated","discriminator","propertyName","mapping","oneOf","i","push","anyOf","not","childRequired","additionalProperties","items","target","source","output","assign","forEach","from","Set","__exports","__esModule"],"sources":["OpenApiPropertyMapper.ts"],"sourcesContent":["/**\n * @file OpenApiPropertyMapper.ts\n * @description Extracts and maps OpenAPI properties into MetaUI IPropertyMetadata.\n */\n\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\nimport { OpenApiTypeMapper } from \"../OpenApiTypeMapper\";\nimport { OpenApiUIMapper } from \"../OpenApiUIMapper\";\n\n/**\n * Utility class responsible for extracting and mapping OpenAPI properties into the native MetaUI IPropertyMetadata schema format.\n * \n * @public\n */\nexport class OpenApiPropertyMapper {\n /**\n * Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.\n * \n * @param {Record<string, any>} properties The OpenAPI properties block.\n * @param {string[]} requiredKeys Array of required property keys.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.\n * @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.\n */\n public static mapProperties(\n properties: Record<string, any>, \n requiredKeys: string[], \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n \n if (depth > 8) return normalizedProps;\n\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n let propDef = properties[key];\n\n if (propDef.$ref) {\n const resolved = OpenApiRefResolver.resolve(propDef.$ref, openApiRoot);\n if (resolved) {\n propDef = { ...resolved, ...propDef };\n }\n }\n\n normalizedProps[key] = this.mapPropertyMetadata(propDef, key, isRequired, openApiRoot, version, depth + 1);\n }\n \n return normalizedProps;\n }\n\n /**\n * Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.\n * Delegates specific mapping tasks to focused private methods to adhere to SRP.\n * \n * @param {any} swaggerProp The specific OpenAPI property schema to map.\n * @param {string} keyName The key/name of this property.\n * @param {boolean} isRequired Whether this property is strictly required.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter.\n * @returns {IPropertyMetadata} The normalized MetaUI property metadata.\n */\n public static mapPropertyMetadata(\n swaggerProp: unknown, \n keyName: string, \n isRequired: boolean, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): IPropertyMetadata {\n let currentProp = swaggerProp;\n\n // 1. Resolve References\n const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);\n if (refResult) {\n return refResult;\n }\n\n // 2. Resolve Composition (allOf)\n currentProp = this._resolveAllOf(currentProp, openApiRoot);\n\n // 3. Base Initialization\n const type = OpenApiTypeMapper.mapType(currentProp.type);\n const metaProp: IPropertyMetadata = {\n type: type,\n required: isRequired\n };\n\n // 4. UI Directive Binding\n const uiDirective = OpenApiUIMapper.build(currentProp, keyName);\n if (Object.keys(uiDirective).length > 0) {\n metaProp.ui = uiDirective;\n }\n\n // 5. Constraints & State Modifiers\n this._applyConstraints(metaProp, currentProp, version);\n this._applyStateModifiers(metaProp, currentProp);\n\n if (currentProp.default !== undefined) {\n metaProp.default = currentProp.default;\n }\n\n if (Array.isArray(currentProp.enum)) {\n metaProp.enum = currentProp.enum;\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dropdown\";\n }\n\n // 6. Polymorphism & Nesting\n this._applyPolymorphism(metaProp, currentProp, openApiRoot, version, depth);\n this._applyNestedTypes(metaProp, currentProp, openApiRoot, version, depth, type);\n\n return metaProp;\n }\n\n /**\n * Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.\n * Otherwise, it returns a reference widget payload.\n * \n * @param {any} currentProp The current schema property definition.\n * @param {string} keyName The structural key name.\n * @param {boolean} isRequired Whether the property is strictly required.\n * @param {any} openApiRoot The root API definition for relative resolution.\n * @param {\"2.0\" | \"3.0\"} version The structural version context.\n * @param {number} depth The recursive resolution depth.\n * @returns {IPropertyMetadata | null} Resolved metadata, or null if no reference exists.\n * @private\n */\n private static _resolveReference(\n currentProp: unknown, \n keyName: string, \n isRequired: boolean, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): IPropertyMetadata | null {\n if (!currentProp.$ref) {\n return null;\n }\n\n const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);\n const resolvedType = currentProp.type || (resolved && resolved.type);\n \n if (resolvedType && [\"string\", \"number\", \"integer\", \"boolean\"].includes(resolvedType)) {\n const inlineProp = { ...resolved, ...currentProp };\n delete inlineProp.$ref;\n return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);\n }\n\n return {\n type: \"object\",\n $ref: currentProp.$ref,\n required: isRequired,\n ui: { widget: \"reference\" }\n };\n }\n\n /**\n * Evaluates and merges 'allOf' arrays into a unified schema definition.\n * \n * @param {any} currentProp The structural property definition containing potential aggregations.\n * @param {any} openApiRoot The base schema for deep resolution.\n * @returns {any} A flattened and merged schema entity.\n * @private\n */\n private static _resolveAllOf(currentProp: unknown, openApiRoot: unknown): unknown {\n if (!Array.isArray(currentProp.allOf)) {\n return currentProp;\n }\n \n let merged = { ...currentProp };\n delete merged.allOf;\n for (const subSchema of currentProp.allOf) {\n let resolvedSub = subSchema;\n if (subSchema.$ref) {\n resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};\n }\n merged = this.deepMergeSchemas(merged, resolvedSub);\n }\n return merged;\n }\n\n /**\n * Extracts structural constraints (min/max, regex, etc.) and maps them natively to the output metadata.\n * \n * @param {IPropertyMetadata} metaProp The target metadata definition block.\n * @param {any} currentProp The source OpenAPI schema chunk.\n * @param {\"2.0\" | \"3.0\"} version The version, utilized for nuanced boundary matching.\n * @private\n */\n private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: unknown, version: \"2.0\" | \"3.0\"): void {\n // String Constraints\n if (typeof currentProp.maxLength === \"number\") metaProp.maxLength = currentProp.maxLength;\n if (typeof currentProp.minLength === \"number\") metaProp.minLength = currentProp.minLength;\n if (typeof currentProp.pattern === \"string\") metaProp.pattern = currentProp.pattern;\n\n // Numeric Constraints\n if (typeof currentProp.maximum === \"number\") metaProp.maximum = currentProp.maximum;\n if (typeof currentProp.minimum === \"number\") metaProp.minimum = currentProp.minimum;\n if (typeof currentProp.multipleOf === \"number\") metaProp.multipleOf = currentProp.multipleOf;\n \n // Array Constraints\n if (typeof currentProp.maxItems === \"number\") metaProp.maxItems = currentProp.maxItems;\n if (typeof currentProp.minItems === \"number\") metaProp.minItems = currentProp.minItems;\n if (typeof currentProp.uniqueItems === \"boolean\") metaProp.uniqueItems = currentProp.uniqueItems;\n\n // Object Constraints\n if (typeof currentProp.maxProperties === \"number\") metaProp.maxProperties = currentProp.maxProperties;\n if (typeof currentProp.minProperties === \"number\") metaProp.minProperties = currentProp.minProperties;\n\n // Exclusive Min/Max version-specific logic\n if (version === \"2.0\") {\n if (currentProp.exclusiveMaximum === true && typeof currentProp.maximum === \"number\") {\n metaProp.exclusiveMaximum = true;\n }\n if (currentProp.exclusiveMinimum === true && typeof currentProp.minimum === \"number\") {\n metaProp.exclusiveMinimum = true;\n }\n } else if (version === \"3.0\") {\n if (typeof currentProp.exclusiveMaximum === \"number\" || typeof currentProp.exclusiveMaximum === \"boolean\") {\n metaProp.exclusiveMaximum = currentProp.exclusiveMaximum;\n }\n if (typeof currentProp.exclusiveMinimum === \"number\" || typeof currentProp.exclusiveMinimum === \"boolean\") {\n metaProp.exclusiveMinimum = currentProp.exclusiveMinimum;\n }\n }\n }\n\n /**\n * Extracts operational state flags like readOnly or nullable mapping them onto the internal specification.\n * \n * @param {IPropertyMetadata} metaProp Target native specification.\n * @param {any} currentProp Source raw schema payload.\n * @private\n */\n private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: unknown): void {\n if (currentProp.readOnly === true) metaProp.readOnly = true;\n if (currentProp.writeOnly === true) metaProp.writeOnly = true;\n if (currentProp.nullable === true) metaProp.nullable = true;\n if (currentProp.deprecated === true) metaProp.deprecated = true;\n }\n\n /**\n * Extracts and maps polymorphic discriminator and union types (oneOf/anyOf) to MetaUI structural directives.\n * \n * @param {IPropertyMetadata} metaProp Native MetaUI definition tree.\n * @param {any} currentProp Raw schema block.\n * @param {any} openApiRoot Master OpenAPI root.\n * @param {\"2.0\" | \"3.0\"} version Protocol version identifier.\n * @param {number} depth Internal depth tracker.\n * @private\n */\n private static _applyPolymorphism(\n metaProp: IPropertyMetadata, \n currentProp: unknown, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): void {\n // Discriminator handling\n if (currentProp.discriminator) {\n if (version === \"2.0\" && typeof currentProp.discriminator === \"string\") {\n metaProp.discriminator = { propertyName: currentProp.discriminator };\n } else if (version === \"3.0\" && typeof currentProp.discriminator === \"object\") {\n metaProp.discriminator = {\n propertyName: currentProp.discriminator.propertyName,\n mapping: currentProp.discriminator.mapping\n };\n }\n }\n\n // Handle oneOf polymorphic mapping\n if (Array.isArray(currentProp.oneOf)) {\n metaProp.oneOf = [];\n for (let i = 0; i < currentProp.oneOf.length; i++) {\n metaProp.oneOf.push(this.mapPropertyMetadata(currentProp.oneOf[i], `Variant${i}`, false, openApiRoot, version, depth + 1));\n }\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"polymorphic\";\n }\n \n // Handle anyOf mapping\n if (Array.isArray(currentProp.anyOf)) {\n metaProp.anyOf = [];\n for (let i = 0; i < currentProp.anyOf.length; i++) {\n metaProp.anyOf.push(this.mapPropertyMetadata(currentProp.anyOf[i], `AnyVariant${i}`, false, openApiRoot, version, depth + 1));\n }\n }\n\n // Handle not mapping\n if (currentProp.not) {\n metaProp.not = this.mapPropertyMetadata(currentProp.not, `NotVariant`, false, openApiRoot, version, depth + 1);\n }\n }\n\n /**\n * Recursively traverses into nested objects and arrays constructing the structural node trees.\n * \n * @param {IPropertyMetadata} metaProp The localized destination structure.\n * @param {any} currentProp The source chunk representing a complex element.\n * @param {any} openApiRoot The OpenAPI dictionary context.\n * @param {\"2.0\" | \"3.0\"} version System schema version.\n * @param {number} depth Invocation stack depth.\n * @param {string} type Normalized atomic structure type.\n * @private\n */\n private static _applyNestedTypes(\n metaProp: IPropertyMetadata, \n currentProp: unknown, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number,\n type: string\n ): void {\n if (type === \"object\") {\n if (currentProp.properties) {\n const childRequired = Array.isArray(currentProp.required) ? currentProp.required : [];\n metaProp.properties = this.mapProperties(currentProp.properties, childRequired, openApiRoot, version, depth + 1);\n }\n \n if (currentProp.additionalProperties) {\n if (currentProp.additionalProperties === true) {\n metaProp.additionalProperties = true;\n } else if (typeof currentProp.additionalProperties === \"object\") {\n metaProp.additionalProperties = this.mapPropertyMetadata(currentProp.additionalProperties, \"value\", false, openApiRoot, version, depth + 1);\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dictionary\";\n }\n }\n \n // Opaque JSON object definition mapping\n if (!currentProp.properties && !currentProp.additionalProperties) {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"codeEditor\";\n }\n } else if (type === \"array\" && currentProp.items) {\n metaProp.items = this.mapPropertyMetadata(currentProp.items, \"items\", false, openApiRoot, version, depth + 1);\n if (metaProp.items.type !== \"object\") {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"multiInput\";\n }\n }\n }\n\n /**\n * Recursively deep-merges two OpenAPI objects, ensuring array boundaries and nested structures are preserved.\n * \n * @param {any} target The target base object.\n * @param {any} source The source object providing override details.\n * @returns {any} The synthesized output object.\n */\n public static deepMergeSchemas(target: unknown, source: unknown): unknown {\n const output = Object.assign({}, target);\n if (source === null || typeof source !== \"object\") return output;\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(source[key])) {\n output[key] = Array.isArray(target[key]) \n ? Array.from(new Set([...target[key], ...source[key]])) \n : [...source[key]];\n } else if (typeof source[key] === \"object\" && source[key] !== null) {\n if (target[key] && typeof target[key] === \"object\") {\n output[key] = this.deepMergeSchemas(target[key], source[key]);\n } else {\n output[key] = Object.assign({}, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n return output;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAMSA,kBAAkB,GAAAC,qBAAA;EAAA,MAClBC,iBAAiB,GAAAC,oBAAA;EAAA,MACjBC,eAAe,GAAAC,kBAAA;EAExB;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,CAAC;IAC/B;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACI,OAAcC,aAAaA,CACvBC,UAA+B,EAC/BC,YAAsB,EACtBC,WAAoB,EACpBC,OAAsB,EACtBC,KAAa,GAAG,CAAC,EACgB;MACjC,MAAMC,eAAkD,GAAG,CAAC,CAAC;MAE7D,IAAID,KAAK,GAAG,CAAC,EAAE,OAAOC,eAAe;MAErC,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACR,UAAU,CAAC,EAAE;QACvC,MAAMS,UAAU,GAAGR,YAAY,CAACS,QAAQ,CAACJ,GAAG,CAAC;QAC7C,IAAIK,OAAO,GAAGX,UAAU,CAACM,GAAG,CAAC;QAE7B,IAAIK,OAAO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D;QACJ,CAAC,MAAM;UACHuE,MAAM,CAACvE,GAAG,CAAC,GAAGsE,MAAM,CAACtE,GAAG,CAAC;QAC7B;MACJ,CAAC,CAAC;MACF,OAAOuE,MAAM;IACjB;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApF,qBAAA,GAAAA,qBAAA;EAAA,OAAAoF,SAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"OpenApiPropertyMapper-dbg.js","names":["OpenApiRefResolver","___OpenApiRefResolver","OpenApiTypeMapper","___OpenApiTypeMapper","OpenApiUIMapper","___OpenApiUIMapper","OpenApiPropertyMapper","mapProperties","properties","requiredKeys","openApiRoot","version","depth","normalizedProps","key","Object","keys","isRequired","includes","propDef","$ref","resolved","resolve","mapPropertyMetadata","swaggerProp","keyName","currentProp","refResult","_resolveReference","_resolveAllOf","type","mapType","metaProp","required","uiDirective","build","length","ui","_applyConstraints","_applyStateModifiers","default","undefined","Array","isArray","enum","widget","_applyPolymorphism","_applyNestedTypes","resolvedType","inlineProp","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","maxLength","minLength","pattern","maximum","minimum","multipleOf","maxItems","minItems","uniqueItems","maxProperties","minProperties","exclusiveMaximum","exclusiveMinimum","readOnly","writeOnly","nullable","deprecated","discriminator","propertyName","mapping","oneOf","i","push","anyOf","not","childRequired","additionalProperties","items","target","source","output","assign","forEach","from","Set","__exports","__esModule"],"sources":["OpenApiPropertyMapper.ts"],"sourcesContent":["/**\n * @file OpenApiPropertyMapper.ts\n * @description Extracts and maps OpenAPI properties into MetaUI IPropertyMetadata.\n */\n\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\nimport { OpenApiTypeMapper } from \"../OpenApiTypeMapper\";\nimport { OpenApiUIMapper } from \"../OpenApiUIMapper\";\n\n/**\n * Utility class responsible for extracting and mapping OpenAPI properties into the native MetaUI IPropertyMetadata schema format.\n * \n * @public\n */\nexport class OpenApiPropertyMapper {\n /**\n * Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.\n * \n * @param {any} properties The OpenAPI properties block.\n * @param {string[]} requiredKeys Array of required property keys.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.\n * @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.\n */\n public static mapProperties(\n properties: any, \n requiredKeys: string[], \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n \n if (depth > 8) return normalizedProps;\n\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n let propDef = properties[key];\n\n if (propDef.$ref) {\n const resolved = OpenApiRefResolver.resolve(propDef.$ref, openApiRoot);\n if (resolved) {\n propDef = { ...resolved, ...propDef };\n }\n }\n\n normalizedProps[key] = this.mapPropertyMetadata(propDef, key, isRequired, openApiRoot, version, depth + 1);\n }\n \n return normalizedProps;\n }\n\n /**\n * Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.\n * Delegates specific mapping tasks to focused private methods to adhere to SRP.\n * \n * @param {any} swaggerProp The specific OpenAPI property schema to map.\n * @param {string} keyName The key/name of this property.\n * @param {boolean} isRequired Whether this property is strictly required.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter.\n * @returns {IPropertyMetadata} The normalized MetaUI property metadata.\n */\n public static mapPropertyMetadata(\n swaggerProp: any, \n keyName: string, \n isRequired: boolean, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): IPropertyMetadata {\n let currentProp = swaggerProp as any;\n\n // 1. Resolve References\n const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);\n if (refResult) {\n return refResult;\n }\n\n // 2. Resolve Composition (allOf)\n currentProp = this._resolveAllOf(currentProp, openApiRoot);\n\n // 3. Base Initialization\n const type = OpenApiTypeMapper.mapType(currentProp.type);\n const metaProp: IPropertyMetadata = {\n type: type,\n required: isRequired\n };\n\n // 4. UI Directive Binding\n const uiDirective = OpenApiUIMapper.build(currentProp, keyName);\n if (Object.keys(uiDirective).length > 0) {\n metaProp.ui = uiDirective;\n }\n\n // 5. Constraints & State Modifiers\n this._applyConstraints(metaProp, currentProp, version);\n this._applyStateModifiers(metaProp, currentProp);\n\n if (currentProp.default !== undefined) {\n metaProp.default = currentProp.default;\n }\n\n if (Array.isArray(currentProp.enum)) {\n metaProp.enum = currentProp.enum;\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dropdown\";\n }\n\n // 6. Polymorphism & Nesting\n this._applyPolymorphism(metaProp, currentProp, openApiRoot, version, depth);\n this._applyNestedTypes(metaProp, currentProp, openApiRoot, version, depth, type);\n\n return metaProp;\n }\n\n /**\n * Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.\n * Otherwise, it returns a reference widget payload.\n * \n * @param {any} currentProp The current schema property definition.\n * @param {string} keyName The structural key name.\n * @param {boolean} isRequired Whether the property is strictly required.\n * @param {any} openApiRoot The root API definition for relative resolution.\n * @param {\"2.0\" | \"3.0\"} version The structural version context.\n * @param {number} depth The recursive resolution depth.\n * @returns {IPropertyMetadata | null} Resolved metadata, or null if no reference exists.\n * @private\n */\n private static _resolveReference(\n currentProp: any, \n keyName: string, \n isRequired: boolean, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): IPropertyMetadata | null {\n if (!currentProp.$ref) {\n return null;\n }\n\n const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);\n const resolvedType = currentProp.type || (resolved && (resolved as any).type);\n \n if (resolvedType && [\"string\", \"number\", \"integer\", \"boolean\"].includes(resolvedType)) {\n const inlineProp = { ...(resolved as any), ...currentProp };\n delete inlineProp.$ref;\n return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);\n }\n\n return {\n type: \"object\",\n $ref: currentProp.$ref,\n required: isRequired,\n ui: { widget: \"reference\" }\n };\n }\n\n /**\n * Evaluates and merges 'allOf' arrays into a unified schema definition.\n * \n * @param {any} currentProp The structural property definition containing potential aggregations.\n * @param {any} openApiRoot The base schema for deep resolution.\n * @returns {any} A flattened and merged schema entity.\n * @private\n */\n private static _resolveAllOf(currentProp: any, openApiRoot: any): unknown {\n if (!Array.isArray(currentProp.allOf)) {\n return currentProp;\n }\n \n let merged = { ...currentProp };\n delete merged.allOf;\n for (const subSchema of currentProp.allOf) {\n let resolvedSub = subSchema;\n if (subSchema.$ref) {\n resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};\n }\n merged = this.deepMergeSchemas(merged, resolvedSub);\n }\n return merged;\n }\n\n /**\n * Extracts structural constraints (min/max, regex, etc.) and maps them natively to the output metadata.\n * \n * @param {IPropertyMetadata} metaProp The target metadata definition block.\n * @param {any} currentProp The source OpenAPI schema chunk.\n * @param {\"2.0\" | \"3.0\"} version The version, utilized for nuanced boundary matching.\n * @private\n */\n private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: any, version: \"2.0\" | \"3.0\"): void {\n // String Constraints\n if (typeof currentProp.maxLength === \"number\") metaProp.maxLength = currentProp.maxLength;\n if (typeof currentProp.minLength === \"number\") metaProp.minLength = currentProp.minLength;\n if (typeof currentProp.pattern === \"string\") metaProp.pattern = currentProp.pattern;\n\n // Numeric Constraints\n if (typeof currentProp.maximum === \"number\") metaProp.maximum = currentProp.maximum;\n if (typeof currentProp.minimum === \"number\") metaProp.minimum = currentProp.minimum;\n if (typeof currentProp.multipleOf === \"number\") metaProp.multipleOf = currentProp.multipleOf;\n \n // Array Constraints\n if (typeof currentProp.maxItems === \"number\") metaProp.maxItems = currentProp.maxItems;\n if (typeof currentProp.minItems === \"number\") metaProp.minItems = currentProp.minItems;\n if (typeof currentProp.uniqueItems === \"boolean\") metaProp.uniqueItems = currentProp.uniqueItems;\n\n // Object Constraints\n if (typeof currentProp.maxProperties === \"number\") metaProp.maxProperties = currentProp.maxProperties;\n if (typeof currentProp.minProperties === \"number\") metaProp.minProperties = currentProp.minProperties;\n\n // Exclusive Min/Max version-specific logic\n if (version === \"2.0\") {\n if (currentProp.exclusiveMaximum === true && typeof currentProp.maximum === \"number\") {\n metaProp.exclusiveMaximum = true;\n }\n if (currentProp.exclusiveMinimum === true && typeof currentProp.minimum === \"number\") {\n metaProp.exclusiveMinimum = true;\n }\n } else if (version === \"3.0\") {\n if (typeof currentProp.exclusiveMaximum === \"number\" || typeof currentProp.exclusiveMaximum === \"boolean\") {\n metaProp.exclusiveMaximum = currentProp.exclusiveMaximum;\n }\n if (typeof currentProp.exclusiveMinimum === \"number\" || typeof currentProp.exclusiveMinimum === \"boolean\") {\n metaProp.exclusiveMinimum = currentProp.exclusiveMinimum;\n }\n }\n }\n\n /**\n * Extracts operational state flags like readOnly or nullable mapping them onto the internal specification.\n * \n * @param {IPropertyMetadata} metaProp Target native specification.\n * @param {any} currentProp Source raw schema payload.\n * @private\n */\n private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: any): void {\n if (currentProp.readOnly === true) metaProp.readOnly = true;\n if (currentProp.writeOnly === true) metaProp.writeOnly = true;\n if (currentProp.nullable === true) metaProp.nullable = true;\n if (currentProp.deprecated === true) metaProp.deprecated = true;\n }\n\n /**\n * Extracts and maps polymorphic discriminator and union types (oneOf/anyOf) to MetaUI structural directives.\n * \n * @param {IPropertyMetadata} metaProp Native MetaUI definition tree.\n * @param {any} currentProp Raw schema block.\n * @param {any} openApiRoot Master OpenAPI root.\n * @param {\"2.0\" | \"3.0\"} version Protocol version identifier.\n * @param {number} depth Internal depth tracker.\n * @private\n */\n private static _applyPolymorphism(\n metaProp: IPropertyMetadata, \n currentProp: any, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): void {\n // Discriminator handling\n if (currentProp.discriminator) {\n if (version === \"2.0\" && typeof currentProp.discriminator === \"string\") {\n metaProp.discriminator = { propertyName: currentProp.discriminator };\n } else if (version === \"3.0\" && typeof currentProp.discriminator === \"object\") {\n metaProp.discriminator = {\n propertyName: currentProp.discriminator.propertyName,\n mapping: currentProp.discriminator.mapping\n };\n }\n }\n\n // Handle oneOf polymorphic mapping\n if (Array.isArray(currentProp.oneOf)) {\n metaProp.oneOf = [];\n for (let i = 0; i < currentProp.oneOf.length; i++) {\n metaProp.oneOf.push(this.mapPropertyMetadata(currentProp.oneOf[i], `Variant${i}`, false, openApiRoot, version, depth + 1));\n }\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"polymorphic\";\n }\n \n // Handle anyOf mapping\n if (Array.isArray(currentProp.anyOf)) {\n metaProp.anyOf = [];\n for (let i = 0; i < currentProp.anyOf.length; i++) {\n metaProp.anyOf.push(this.mapPropertyMetadata(currentProp.anyOf[i], `AnyVariant${i}`, false, openApiRoot, version, depth + 1));\n }\n }\n\n // Handle not mapping\n if (currentProp.not) {\n metaProp.not = this.mapPropertyMetadata(currentProp.not, `NotVariant`, false, openApiRoot, version, depth + 1);\n }\n }\n\n /**\n * Recursively traverses into nested objects and arrays constructing the structural node trees.\n * \n * @param {IPropertyMetadata} metaProp The localized destination structure.\n * @param {any} currentProp The source chunk representing a complex element.\n * @param {any} openApiRoot The OpenAPI dictionary context.\n * @param {\"2.0\" | \"3.0\"} version System schema version.\n * @param {number} depth Invocation stack depth.\n * @param {string} type Normalized atomic structure type.\n * @private\n */\n private static _applyNestedTypes(\n metaProp: IPropertyMetadata, \n currentProp: any, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number,\n type: string\n ): void {\n if (type === \"object\") {\n if (currentProp.properties) {\n const childRequired = Array.isArray(currentProp.required) ? currentProp.required : [];\n metaProp.properties = this.mapProperties(currentProp.properties, childRequired, openApiRoot, version, depth + 1);\n }\n \n if (currentProp.additionalProperties) {\n if (currentProp.additionalProperties === true) {\n metaProp.additionalProperties = true;\n } else if (typeof currentProp.additionalProperties === \"object\") {\n metaProp.additionalProperties = this.mapPropertyMetadata(currentProp.additionalProperties, \"value\", false, openApiRoot, version, depth + 1);\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dictionary\";\n }\n }\n \n // Opaque JSON object definition mapping\n if (!currentProp.properties && !currentProp.additionalProperties) {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"codeEditor\";\n }\n } else if (type === \"array\" && currentProp.items) {\n metaProp.items = this.mapPropertyMetadata(currentProp.items, \"items\", false, openApiRoot, version, depth + 1);\n if (metaProp.items.type !== \"object\") {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"multiInput\";\n }\n }\n }\n\n /**\n * Recursively deep-merges two OpenAPI objects, ensuring array boundaries and nested structures are preserved.\n * \n * @param {any} target The target base object.\n * @param {any} source The source object providing override details.\n * @returns {any} The synthesized output object.\n */\n public static deepMergeSchemas(target: any, source: any): any {\n const output: any = Object.assign({}, target);\n if (source === null || typeof source !== \"object\") return output;\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(source[key])) {\n output[key] = Array.isArray(target[key]) \n ? Array.from(new Set([...target[key], ...source[key]])) \n : [...source[key]];\n } else if (typeof source[key] === \"object\" && source[key] !== null) {\n if (target[key] && typeof target[key] === \"object\") {\n output[key] = this.deepMergeSchemas(target[key], source[key]);\n } else {\n output[key] = Object.assign({}, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n return output;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAMSA,kBAAkB,GAAAC,qBAAA;EAAA,MAClBC,iBAAiB,GAAAC,oBAAA;EAAA,MACjBC,eAAe,GAAAC,kBAAA;EAExB;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,CAAC;IAC/B;AACJ;AACA;A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CAAC,KAAK,QAAQ,IAAIsE,MAAM,CAACtE,GAAG,CAAC,KAAK,IAAI,EAAE;UAChE,IAAIqE,MAAM,CAACrE,GAAG,CAAC,IAAI,OAAOqE,MAAM,CAACrE,GAAG,CAAC,KAAK,QAAQ,EAAE;YAChDuE,MAAM,CAACvE,GAAG,CAAC,GAAG,IAAI,CAACwC,gBAAgB,CAAC6B,MAAM,CAACrE,GAAG,CAAC,EAAEsE,MAAM,CAACtE,GAAG,CAAC,CAAC;UACjE,CAAC,MAAM;YACHuE,MAAM,CAACvE,GAAG,CAAC,GAAGC,MAAM,CAACuE,MAAM,CAAC,CAAC,CAAC,EAAEF,MAAM,CAACtE,GAAG,CAAC,CAAC;UAChD;QACJ,CAAC,MAAM;UACHuE,MAAM,CAACvE,GAAG,CAAC,GAAGsE,MAAM,CAACtE,GAAG,CAAC;QAC7B;MACJ,CAAC,CAAC;MACF,OAAOuE,MAAM;IACjB;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApF,qBAAA,GAAAA,qBAAA;EAAA,OAAAoF,SAAA;AAAA","ignoreList":[]}
|
|
@@ -13,14 +13,14 @@ declare module "nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper
|
|
|
13
13
|
/**
|
|
14
14
|
* Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.
|
|
15
15
|
*
|
|
16
|
-
* @param {
|
|
16
|
+
* @param {any} properties The OpenAPI properties block.
|
|
17
17
|
* @param {string[]} requiredKeys Array of required property keys.
|
|
18
18
|
* @param {any} openApiRoot The OpenAPI root document for resolving references.
|
|
19
19
|
* @param {"2.0" | "3.0"} version The OpenAPI version.
|
|
20
20
|
* @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.
|
|
21
21
|
* @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.
|
|
22
22
|
*/
|
|
23
|
-
static mapProperties(properties:
|
|
23
|
+
static mapProperties(properties: any, requiredKeys: string[], openApiRoot: any, version: "2.0" | "3.0", depth?: number): Record<string, IPropertyMetadata>;
|
|
24
24
|
/**
|
|
25
25
|
* Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.
|
|
26
26
|
* Delegates specific mapping tasks to focused private methods to adhere to SRP.
|
|
@@ -33,7 +33,7 @@ declare module "nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper
|
|
|
33
33
|
* @param {number} [depth=0] Recursion depth limiter.
|
|
34
34
|
* @returns {IPropertyMetadata} The normalized MetaUI property metadata.
|
|
35
35
|
*/
|
|
36
|
-
static mapPropertyMetadata(swaggerProp:
|
|
36
|
+
static mapPropertyMetadata(swaggerProp: any, keyName: string, isRequired: boolean, openApiRoot: any, version: "2.0" | "3.0", depth?: number): IPropertyMetadata;
|
|
37
37
|
/**
|
|
38
38
|
* Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.
|
|
39
39
|
* Otherwise, it returns a reference widget payload.
|
|
@@ -104,7 +104,7 @@ declare module "nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper
|
|
|
104
104
|
* @param {any} source The source object providing override details.
|
|
105
105
|
* @returns {any} The synthesized output object.
|
|
106
106
|
*/
|
|
107
|
-
static deepMergeSchemas(target:
|
|
107
|
+
static deepMergeSchemas(target: any, source: any): any;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
//# sourceMappingURL=OpenApiPropertyMapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiPropertyMapper.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF;;;OAGG;IAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAKlF;;;;OAIG;IACH,MAAa,qBAAqB;QAC9B;;;;;;;;;WASG;eACW,aAAa,CACvB,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"OpenApiPropertyMapper.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF;;;OAGG;IAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAKlF;;;;OAIG;IACH,MAAa,qBAAqB;QAC9B;;;;;;;;;WASG;eACW,aAAa,CACvB,UAAU,EAAE,GAAG,EACf,YAAY,EAAE,MAAM,EAAE,EACtB,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,KAAK,GAAG,KAAK,EACtB,KAAK,GAAE,MAAU,GAClB,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC;QAsBpC;;;;;;;;;;;WAWG;eACW,mBAAmB,CAC7B,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,KAAK,GAAG,KAAK,EACtB,KAAK,GAAE,MAAU,GAClB,iBAAiB;QA8CpB;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;QA6BhC;;;;;;;WAOG;QACH,OAAO,CAAC,MAAM,CAAC,aAAa;QAiB5B;;;;;;;WAOG;QACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;QAsChC;;;;;;WAMG;QACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;QAOnC;;;;;;;;;WASG;QACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;QA2CjC;;;;;;;;;;WAUG;QACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;QAsChC;;;;;;WAMG;eACW,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;KAqBhE;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiPropertyMapper.js","names":["OpenApiRefResolver","___OpenApiRefResolver","OpenApiTypeMapper","___OpenApiTypeMapper","OpenApiUIMapper","___OpenApiUIMapper","OpenApiPropertyMapper","mapProperties","properties","requiredKeys","openApiRoot","version","depth","normalizedProps","key","Object","keys","isRequired","includes","propDef","$ref","resolved","resolve","this","mapPropertyMetadata","swaggerProp","keyName","currentProp","refResult","_resolveReference","_resolveAllOf","type","mapType","metaProp","required","uiDirective","build","length","ui","_applyConstraints","_applyStateModifiers","default","undefined","Array","isArray","enum","widget","_applyPolymorphism","_applyNestedTypes","resolvedType","inlineProp","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","maxLength","minLength","pattern","maximum","minimum","multipleOf","maxItems","minItems","uniqueItems","maxProperties","minProperties","exclusiveMaximum","exclusiveMinimum","readOnly","writeOnly","nullable","deprecated","discriminator","propertyName","mapping","oneOf","i","push","anyOf","not","childRequired","additionalProperties","items","target","source","output","assign","forEach","from","Set","__exports","__esModule"],"sources":["OpenApiPropertyMapper.ts"],"sourcesContent":["/**\n * @file OpenApiPropertyMapper.ts\n * @description Extracts and maps OpenAPI properties into MetaUI IPropertyMetadata.\n */\n\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\nimport { OpenApiTypeMapper } from \"../OpenApiTypeMapper\";\nimport { OpenApiUIMapper } from \"../OpenApiUIMapper\";\n\n/**\n * Utility class responsible for extracting and mapping OpenAPI properties into the native MetaUI IPropertyMetadata schema format.\n * \n * @public\n */\nexport class OpenApiPropertyMapper {\n /**\n * Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.\n * \n * @param {Record<string, any>} properties The OpenAPI properties block.\n * @param {string[]} requiredKeys Array of required property keys.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.\n * @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.\n */\n public static mapProperties(\n properties: Record<string, any>, \n requiredKeys: string[], \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n \n if (depth > 8) return normalizedProps;\n\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n let propDef = properties[key];\n\n if (propDef.$ref) {\n const resolved = OpenApiRefResolver.resolve(propDef.$ref, openApiRoot);\n if (resolved) {\n propDef = { ...resolved, ...propDef };\n }\n }\n\n normalizedProps[key] = this.mapPropertyMetadata(propDef, key, isRequired, openApiRoot, version, depth + 1);\n }\n \n return normalizedProps;\n }\n\n /**\n * Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.\n * Delegates specific mapping tasks to focused private methods to adhere to SRP.\n * \n * @param {any} swaggerProp The specific OpenAPI property schema to map.\n * @param {string} keyName The key/name of this property.\n * @param {boolean} isRequired Whether this property is strictly required.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter.\n * @returns {IPropertyMetadata} The normalized MetaUI property metadata.\n */\n public static mapPropertyMetadata(\n swaggerProp: unknown, \n keyName: string, \n isRequired: boolean, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): IPropertyMetadata {\n let currentProp = swaggerProp;\n\n // 1. Resolve References\n const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);\n if (refResult) {\n return refResult;\n }\n\n // 2. Resolve Composition (allOf)\n currentProp = this._resolveAllOf(currentProp, openApiRoot);\n\n // 3. Base Initialization\n const type = OpenApiTypeMapper.mapType(currentProp.type);\n const metaProp: IPropertyMetadata = {\n type: type,\n required: isRequired\n };\n\n // 4. UI Directive Binding\n const uiDirective = OpenApiUIMapper.build(currentProp, keyName);\n if (Object.keys(uiDirective).length > 0) {\n metaProp.ui = uiDirective;\n }\n\n // 5. Constraints & State Modifiers\n this._applyConstraints(metaProp, currentProp, version);\n this._applyStateModifiers(metaProp, currentProp);\n\n if (currentProp.default !== undefined) {\n metaProp.default = currentProp.default;\n }\n\n if (Array.isArray(currentProp.enum)) {\n metaProp.enum = currentProp.enum;\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dropdown\";\n }\n\n // 6. Polymorphism & Nesting\n this._applyPolymorphism(metaProp, currentProp, openApiRoot, version, depth);\n this._applyNestedTypes(metaProp, currentProp, openApiRoot, version, depth, type);\n\n return metaProp;\n }\n\n /**\n * Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.\n * Otherwise, it returns a reference widget payload.\n * \n * @param {any} currentProp The current schema property definition.\n * @param {string} keyName The structural key name.\n * @param {boolean} isRequired Whether the property is strictly required.\n * @param {any} openApiRoot The root API definition for relative resolution.\n * @param {\"2.0\" | \"3.0\"} version The structural version context.\n * @param {number} depth The recursive resolution depth.\n * @returns {IPropertyMetadata | null} Resolved metadata, or null if no reference exists.\n * @private\n */\n private static _resolveReference(\n currentProp: unknown, \n keyName: string, \n isRequired: boolean, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): IPropertyMetadata | null {\n if (!currentProp.$ref) {\n return null;\n }\n\n const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);\n const resolvedType = currentProp.type || (resolved && resolved.type);\n \n if (resolvedType && [\"string\", \"number\", \"integer\", \"boolean\"].includes(resolvedType)) {\n const inlineProp = { ...resolved, ...currentProp };\n delete inlineProp.$ref;\n return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);\n }\n\n return {\n type: \"object\",\n $ref: currentProp.$ref,\n required: isRequired,\n ui: { widget: \"reference\" }\n };\n }\n\n /**\n * Evaluates and merges 'allOf' arrays into a unified schema definition.\n * \n * @param {any} currentProp The structural property definition containing potential aggregations.\n * @param {any} openApiRoot The base schema for deep resolution.\n * @returns {any} A flattened and merged schema entity.\n * @private\n */\n private static _resolveAllOf(currentProp: unknown, openApiRoot: unknown): unknown {\n if (!Array.isArray(currentProp.allOf)) {\n return currentProp;\n }\n \n let merged = { ...currentProp };\n delete merged.allOf;\n for (const subSchema of currentProp.allOf) {\n let resolvedSub = subSchema;\n if (subSchema.$ref) {\n resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};\n }\n merged = this.deepMergeSchemas(merged, resolvedSub);\n }\n return merged;\n }\n\n /**\n * Extracts structural constraints (min/max, regex, etc.) and maps them natively to the output metadata.\n * \n * @param {IPropertyMetadata} metaProp The target metadata definition block.\n * @param {any} currentProp The source OpenAPI schema chunk.\n * @param {\"2.0\" | \"3.0\"} version The version, utilized for nuanced boundary matching.\n * @private\n */\n private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: unknown, version: \"2.0\" | \"3.0\"): void {\n // String Constraints\n if (typeof currentProp.maxLength === \"number\") metaProp.maxLength = currentProp.maxLength;\n if (typeof currentProp.minLength === \"number\") metaProp.minLength = currentProp.minLength;\n if (typeof currentProp.pattern === \"string\") metaProp.pattern = currentProp.pattern;\n\n // Numeric Constraints\n if (typeof currentProp.maximum === \"number\") metaProp.maximum = currentProp.maximum;\n if (typeof currentProp.minimum === \"number\") metaProp.minimum = currentProp.minimum;\n if (typeof currentProp.multipleOf === \"number\") metaProp.multipleOf = currentProp.multipleOf;\n \n // Array Constraints\n if (typeof currentProp.maxItems === \"number\") metaProp.maxItems = currentProp.maxItems;\n if (typeof currentProp.minItems === \"number\") metaProp.minItems = currentProp.minItems;\n if (typeof currentProp.uniqueItems === \"boolean\") metaProp.uniqueItems = currentProp.uniqueItems;\n\n // Object Constraints\n if (typeof currentProp.maxProperties === \"number\") metaProp.maxProperties = currentProp.maxProperties;\n if (typeof currentProp.minProperties === \"number\") metaProp.minProperties = currentProp.minProperties;\n\n // Exclusive Min/Max version-specific logic\n if (version === \"2.0\") {\n if (currentProp.exclusiveMaximum === true && typeof currentProp.maximum === \"number\") {\n metaProp.exclusiveMaximum = true;\n }\n if (currentProp.exclusiveMinimum === true && typeof currentProp.minimum === \"number\") {\n metaProp.exclusiveMinimum = true;\n }\n } else if (version === \"3.0\") {\n if (typeof currentProp.exclusiveMaximum === \"number\" || typeof currentProp.exclusiveMaximum === \"boolean\") {\n metaProp.exclusiveMaximum = currentProp.exclusiveMaximum;\n }\n if (typeof currentProp.exclusiveMinimum === \"number\" || typeof currentProp.exclusiveMinimum === \"boolean\") {\n metaProp.exclusiveMinimum = currentProp.exclusiveMinimum;\n }\n }\n }\n\n /**\n * Extracts operational state flags like readOnly or nullable mapping them onto the internal specification.\n * \n * @param {IPropertyMetadata} metaProp Target native specification.\n * @param {any} currentProp Source raw schema payload.\n * @private\n */\n private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: unknown): void {\n if (currentProp.readOnly === true) metaProp.readOnly = true;\n if (currentProp.writeOnly === true) metaProp.writeOnly = true;\n if (currentProp.nullable === true) metaProp.nullable = true;\n if (currentProp.deprecated === true) metaProp.deprecated = true;\n }\n\n /**\n * Extracts and maps polymorphic discriminator and union types (oneOf/anyOf) to MetaUI structural directives.\n * \n * @param {IPropertyMetadata} metaProp Native MetaUI definition tree.\n * @param {any} currentProp Raw schema block.\n * @param {any} openApiRoot Master OpenAPI root.\n * @param {\"2.0\" | \"3.0\"} version Protocol version identifier.\n * @param {number} depth Internal depth tracker.\n * @private\n */\n private static _applyPolymorphism(\n metaProp: IPropertyMetadata, \n currentProp: unknown, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): void {\n // Discriminator handling\n if (currentProp.discriminator) {\n if (version === \"2.0\" && typeof currentProp.discriminator === \"string\") {\n metaProp.discriminator = { propertyName: currentProp.discriminator };\n } else if (version === \"3.0\" && typeof currentProp.discriminator === \"object\") {\n metaProp.discriminator = {\n propertyName: currentProp.discriminator.propertyName,\n mapping: currentProp.discriminator.mapping\n };\n }\n }\n\n // Handle oneOf polymorphic mapping\n if (Array.isArray(currentProp.oneOf)) {\n metaProp.oneOf = [];\n for (let i = 0; i < currentProp.oneOf.length; i++) {\n metaProp.oneOf.push(this.mapPropertyMetadata(currentProp.oneOf[i], `Variant${i}`, false, openApiRoot, version, depth + 1));\n }\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"polymorphic\";\n }\n \n // Handle anyOf mapping\n if (Array.isArray(currentProp.anyOf)) {\n metaProp.anyOf = [];\n for (let i = 0; i < currentProp.anyOf.length; i++) {\n metaProp.anyOf.push(this.mapPropertyMetadata(currentProp.anyOf[i], `AnyVariant${i}`, false, openApiRoot, version, depth + 1));\n }\n }\n\n // Handle not mapping\n if (currentProp.not) {\n metaProp.not = this.mapPropertyMetadata(currentProp.not, `NotVariant`, false, openApiRoot, version, depth + 1);\n }\n }\n\n /**\n * Recursively traverses into nested objects and arrays constructing the structural node trees.\n * \n * @param {IPropertyMetadata} metaProp The localized destination structure.\n * @param {any} currentProp The source chunk representing a complex element.\n * @param {any} openApiRoot The OpenAPI dictionary context.\n * @param {\"2.0\" | \"3.0\"} version System schema version.\n * @param {number} depth Invocation stack depth.\n * @param {string} type Normalized atomic structure type.\n * @private\n */\n private static _applyNestedTypes(\n metaProp: IPropertyMetadata, \n currentProp: unknown, \n openApiRoot: unknown, \n version: \"2.0\" | \"3.0\", \n depth: number,\n type: string\n ): void {\n if (type === \"object\") {\n if (currentProp.properties) {\n const childRequired = Array.isArray(currentProp.required) ? currentProp.required : [];\n metaProp.properties = this.mapProperties(currentProp.properties, childRequired, openApiRoot, version, depth + 1);\n }\n \n if (currentProp.additionalProperties) {\n if (currentProp.additionalProperties === true) {\n metaProp.additionalProperties = true;\n } else if (typeof currentProp.additionalProperties === \"object\") {\n metaProp.additionalProperties = this.mapPropertyMetadata(currentProp.additionalProperties, \"value\", false, openApiRoot, version, depth + 1);\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dictionary\";\n }\n }\n \n // Opaque JSON object definition mapping\n if (!currentProp.properties && !currentProp.additionalProperties) {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"codeEditor\";\n }\n } else if (type === \"array\" && currentProp.items) {\n metaProp.items = this.mapPropertyMetadata(currentProp.items, \"items\", false, openApiRoot, version, depth + 1);\n if (metaProp.items.type !== \"object\") {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"multiInput\";\n }\n }\n }\n\n /**\n * Recursively deep-merges two OpenAPI objects, ensuring array boundaries and nested structures are preserved.\n * \n * @param {any} target The target base object.\n * @param {any} source The source object providing override details.\n * @returns {any} The synthesized output object.\n */\n public static deepMergeSchemas(target: unknown, source: unknown): unknown {\n const output = Object.assign({}, target);\n if (source === null || typeof source !== \"object\") return output;\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(source[key])) {\n output[key] = Array.isArray(target[key]) \n ? Array.from(new Set([...target[key], ...source[key]])) \n : [...source[key]];\n } else if (typeof source[key] === \"object\" && source[key] !== null) {\n if (target[key] && typeof target[key] === \"object\") {\n output[key] = this.deepMergeSchemas(target[key], source[key]);\n } else {\n output[key] = Object.assign({}, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n return output;\n }\n}\n"],"mappings":"iHAAA,MAMSA,EAAkBC,EAAA,4BAClBC,EAAiBC,EAAA,2BACjBC,EAAeC,EAAA,mBAOjB,MAAMC,EAWT,oBAAcC,CACVC,EACAC,EACAC,EACAC,EACAC,EAAgB,GAEhB,MAAMC,EAAqD,CAAC,EAE5D,GAAID,EAAQ,EAAG,OAAOC,EAEtB,IAAK,MAAMC,KAAOC,OAAOC,KAAKR,GAAa,CACvC,MAAMS,EAAaR,EAAaS,SAASJ,GACzC,IAAIK,EAAUX,EAAWM,GAEzB,GAAIK,EAAQC,KAAM,CACd,MAAMC,EAAWrB,EAAmBsB,QAAQH,EAAQC,KAAMV,GAC1D,GAAIW,EAAU,CACVF,EAAU,IAAKE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enApiPropertyMapper.js","names":["OpenApiRefResolver","___OpenApiRefResolver","OpenApiTypeMapper","___OpenApiTypeMapper","OpenApiUIMapper","___OpenApiUIMapper","OpenApiPropertyMapper","mapProperties","properties","requiredKeys","openApiRoot","version","depth","normalizedProps","key","Object","keys","isRequired","includes","propDef","$ref","resolved","resolve","this","mapPropertyMetadata","swaggerProp","keyName","currentProp","refResult","_resolveReference","_resolveAllOf","type","mapType","metaProp","required","uiDirective","build","length","ui","_applyConstraints","_applyStateModifiers","default","undefined","Array","isArray","enum","widget","_applyPolymorphism","_applyNestedTypes","resolvedType","inlineProp","allOf","merged","subSchema","resolvedSub","deepMergeSchemas","maxLength","minLength","pattern","maximum","minimum","multipleOf","maxItems","minItems","uniqueItems","maxProperties","minProperties","exclusiveMaximum","exclusiveMinimum","readOnly","writeOnly","nullable","deprecated","discriminator","propertyName","mapping","oneOf","i","push","anyOf","not","childRequired","additionalProperties","items","target","source","output","assign","forEach","from","Set","__exports","__esModule"],"sources":["OpenApiPropertyMapper.ts"],"sourcesContent":["/**\n * @file OpenApiPropertyMapper.ts\n * @description Extracts and maps OpenAPI properties into MetaUI IPropertyMetadata.\n */\n\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport { OpenApiRefResolver } from \"../OpenApiRefResolver\";\nimport { OpenApiTypeMapper } from \"../OpenApiTypeMapper\";\nimport { OpenApiUIMapper } from \"../OpenApiUIMapper\";\n\n/**\n * Utility class responsible for extracting and mapping OpenAPI properties into the native MetaUI IPropertyMetadata schema format.\n * \n * @public\n */\nexport class OpenApiPropertyMapper {\n /**\n * Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.\n * \n * @param {any} properties The OpenAPI properties block.\n * @param {string[]} requiredKeys Array of required property keys.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.\n * @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.\n */\n public static mapProperties(\n properties: any, \n requiredKeys: string[], \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n \n if (depth > 8) return normalizedProps;\n\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n let propDef = properties[key];\n\n if (propDef.$ref) {\n const resolved = OpenApiRefResolver.resolve(propDef.$ref, openApiRoot);\n if (resolved) {\n propDef = { ...resolved, ...propDef };\n }\n }\n\n normalizedProps[key] = this.mapPropertyMetadata(propDef, key, isRequired, openApiRoot, version, depth + 1);\n }\n \n return normalizedProps;\n }\n\n /**\n * Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.\n * Delegates specific mapping tasks to focused private methods to adhere to SRP.\n * \n * @param {any} swaggerProp The specific OpenAPI property schema to map.\n * @param {string} keyName The key/name of this property.\n * @param {boolean} isRequired Whether this property is strictly required.\n * @param {any} openApiRoot The OpenAPI root document for resolving references.\n * @param {\"2.0\" | \"3.0\"} version The OpenAPI version.\n * @param {number} [depth=0] Recursion depth limiter.\n * @returns {IPropertyMetadata} The normalized MetaUI property metadata.\n */\n public static mapPropertyMetadata(\n swaggerProp: any, \n keyName: string, \n isRequired: boolean, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number = 0\n ): IPropertyMetadata {\n let currentProp = swaggerProp as any;\n\n // 1. Resolve References\n const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);\n if (refResult) {\n return refResult;\n }\n\n // 2. Resolve Composition (allOf)\n currentProp = this._resolveAllOf(currentProp, openApiRoot);\n\n // 3. Base Initialization\n const type = OpenApiTypeMapper.mapType(currentProp.type);\n const metaProp: IPropertyMetadata = {\n type: type,\n required: isRequired\n };\n\n // 4. UI Directive Binding\n const uiDirective = OpenApiUIMapper.build(currentProp, keyName);\n if (Object.keys(uiDirective).length > 0) {\n metaProp.ui = uiDirective;\n }\n\n // 5. Constraints & State Modifiers\n this._applyConstraints(metaProp, currentProp, version);\n this._applyStateModifiers(metaProp, currentProp);\n\n if (currentProp.default !== undefined) {\n metaProp.default = currentProp.default;\n }\n\n if (Array.isArray(currentProp.enum)) {\n metaProp.enum = currentProp.enum;\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dropdown\";\n }\n\n // 6. Polymorphism & Nesting\n this._applyPolymorphism(metaProp, currentProp, openApiRoot, version, depth);\n this._applyNestedTypes(metaProp, currentProp, openApiRoot, version, depth, type);\n\n return metaProp;\n }\n\n /**\n * Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.\n * Otherwise, it returns a reference widget payload.\n * \n * @param {any} currentProp The current schema property definition.\n * @param {string} keyName The structural key name.\n * @param {boolean} isRequired Whether the property is strictly required.\n * @param {any} openApiRoot The root API definition for relative resolution.\n * @param {\"2.0\" | \"3.0\"} version The structural version context.\n * @param {number} depth The recursive resolution depth.\n * @returns {IPropertyMetadata | null} Resolved metadata, or null if no reference exists.\n * @private\n */\n private static _resolveReference(\n currentProp: any, \n keyName: string, \n isRequired: boolean, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): IPropertyMetadata | null {\n if (!currentProp.$ref) {\n return null;\n }\n\n const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);\n const resolvedType = currentProp.type || (resolved && (resolved as any).type);\n \n if (resolvedType && [\"string\", \"number\", \"integer\", \"boolean\"].includes(resolvedType)) {\n const inlineProp = { ...(resolved as any), ...currentProp };\n delete inlineProp.$ref;\n return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);\n }\n\n return {\n type: \"object\",\n $ref: currentProp.$ref,\n required: isRequired,\n ui: { widget: \"reference\" }\n };\n }\n\n /**\n * Evaluates and merges 'allOf' arrays into a unified schema definition.\n * \n * @param {any} currentProp The structural property definition containing potential aggregations.\n * @param {any} openApiRoot The base schema for deep resolution.\n * @returns {any} A flattened and merged schema entity.\n * @private\n */\n private static _resolveAllOf(currentProp: any, openApiRoot: any): unknown {\n if (!Array.isArray(currentProp.allOf)) {\n return currentProp;\n }\n \n let merged = { ...currentProp };\n delete merged.allOf;\n for (const subSchema of currentProp.allOf) {\n let resolvedSub = subSchema;\n if (subSchema.$ref) {\n resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};\n }\n merged = this.deepMergeSchemas(merged, resolvedSub);\n }\n return merged;\n }\n\n /**\n * Extracts structural constraints (min/max, regex, etc.) and maps them natively to the output metadata.\n * \n * @param {IPropertyMetadata} metaProp The target metadata definition block.\n * @param {any} currentProp The source OpenAPI schema chunk.\n * @param {\"2.0\" | \"3.0\"} version The version, utilized for nuanced boundary matching.\n * @private\n */\n private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: any, version: \"2.0\" | \"3.0\"): void {\n // String Constraints\n if (typeof currentProp.maxLength === \"number\") metaProp.maxLength = currentProp.maxLength;\n if (typeof currentProp.minLength === \"number\") metaProp.minLength = currentProp.minLength;\n if (typeof currentProp.pattern === \"string\") metaProp.pattern = currentProp.pattern;\n\n // Numeric Constraints\n if (typeof currentProp.maximum === \"number\") metaProp.maximum = currentProp.maximum;\n if (typeof currentProp.minimum === \"number\") metaProp.minimum = currentProp.minimum;\n if (typeof currentProp.multipleOf === \"number\") metaProp.multipleOf = currentProp.multipleOf;\n \n // Array Constraints\n if (typeof currentProp.maxItems === \"number\") metaProp.maxItems = currentProp.maxItems;\n if (typeof currentProp.minItems === \"number\") metaProp.minItems = currentProp.minItems;\n if (typeof currentProp.uniqueItems === \"boolean\") metaProp.uniqueItems = currentProp.uniqueItems;\n\n // Object Constraints\n if (typeof currentProp.maxProperties === \"number\") metaProp.maxProperties = currentProp.maxProperties;\n if (typeof currentProp.minProperties === \"number\") metaProp.minProperties = currentProp.minProperties;\n\n // Exclusive Min/Max version-specific logic\n if (version === \"2.0\") {\n if (currentProp.exclusiveMaximum === true && typeof currentProp.maximum === \"number\") {\n metaProp.exclusiveMaximum = true;\n }\n if (currentProp.exclusiveMinimum === true && typeof currentProp.minimum === \"number\") {\n metaProp.exclusiveMinimum = true;\n }\n } else if (version === \"3.0\") {\n if (typeof currentProp.exclusiveMaximum === \"number\" || typeof currentProp.exclusiveMaximum === \"boolean\") {\n metaProp.exclusiveMaximum = currentProp.exclusiveMaximum;\n }\n if (typeof currentProp.exclusiveMinimum === \"number\" || typeof currentProp.exclusiveMinimum === \"boolean\") {\n metaProp.exclusiveMinimum = currentProp.exclusiveMinimum;\n }\n }\n }\n\n /**\n * Extracts operational state flags like readOnly or nullable mapping them onto the internal specification.\n * \n * @param {IPropertyMetadata} metaProp Target native specification.\n * @param {any} currentProp Source raw schema payload.\n * @private\n */\n private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: any): void {\n if (currentProp.readOnly === true) metaProp.readOnly = true;\n if (currentProp.writeOnly === true) metaProp.writeOnly = true;\n if (currentProp.nullable === true) metaProp.nullable = true;\n if (currentProp.deprecated === true) metaProp.deprecated = true;\n }\n\n /**\n * Extracts and maps polymorphic discriminator and union types (oneOf/anyOf) to MetaUI structural directives.\n * \n * @param {IPropertyMetadata} metaProp Native MetaUI definition tree.\n * @param {any} currentProp Raw schema block.\n * @param {any} openApiRoot Master OpenAPI root.\n * @param {\"2.0\" | \"3.0\"} version Protocol version identifier.\n * @param {number} depth Internal depth tracker.\n * @private\n */\n private static _applyPolymorphism(\n metaProp: IPropertyMetadata, \n currentProp: any, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number\n ): void {\n // Discriminator handling\n if (currentProp.discriminator) {\n if (version === \"2.0\" && typeof currentProp.discriminator === \"string\") {\n metaProp.discriminator = { propertyName: currentProp.discriminator };\n } else if (version === \"3.0\" && typeof currentProp.discriminator === \"object\") {\n metaProp.discriminator = {\n propertyName: currentProp.discriminator.propertyName,\n mapping: currentProp.discriminator.mapping\n };\n }\n }\n\n // Handle oneOf polymorphic mapping\n if (Array.isArray(currentProp.oneOf)) {\n metaProp.oneOf = [];\n for (let i = 0; i < currentProp.oneOf.length; i++) {\n metaProp.oneOf.push(this.mapPropertyMetadata(currentProp.oneOf[i], `Variant${i}`, false, openApiRoot, version, depth + 1));\n }\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"polymorphic\";\n }\n \n // Handle anyOf mapping\n if (Array.isArray(currentProp.anyOf)) {\n metaProp.anyOf = [];\n for (let i = 0; i < currentProp.anyOf.length; i++) {\n metaProp.anyOf.push(this.mapPropertyMetadata(currentProp.anyOf[i], `AnyVariant${i}`, false, openApiRoot, version, depth + 1));\n }\n }\n\n // Handle not mapping\n if (currentProp.not) {\n metaProp.not = this.mapPropertyMetadata(currentProp.not, `NotVariant`, false, openApiRoot, version, depth + 1);\n }\n }\n\n /**\n * Recursively traverses into nested objects and arrays constructing the structural node trees.\n * \n * @param {IPropertyMetadata} metaProp The localized destination structure.\n * @param {any} currentProp The source chunk representing a complex element.\n * @param {any} openApiRoot The OpenAPI dictionary context.\n * @param {\"2.0\" | \"3.0\"} version System schema version.\n * @param {number} depth Invocation stack depth.\n * @param {string} type Normalized atomic structure type.\n * @private\n */\n private static _applyNestedTypes(\n metaProp: IPropertyMetadata, \n currentProp: any, \n openApiRoot: any, \n version: \"2.0\" | \"3.0\", \n depth: number,\n type: string\n ): void {\n if (type === \"object\") {\n if (currentProp.properties) {\n const childRequired = Array.isArray(currentProp.required) ? currentProp.required : [];\n metaProp.properties = this.mapProperties(currentProp.properties, childRequired, openApiRoot, version, depth + 1);\n }\n \n if (currentProp.additionalProperties) {\n if (currentProp.additionalProperties === true) {\n metaProp.additionalProperties = true;\n } else if (typeof currentProp.additionalProperties === \"object\") {\n metaProp.additionalProperties = this.mapPropertyMetadata(currentProp.additionalProperties, \"value\", false, openApiRoot, version, depth + 1);\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"dictionary\";\n }\n }\n \n // Opaque JSON object definition mapping\n if (!currentProp.properties && !currentProp.additionalProperties) {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"codeEditor\";\n }\n } else if (type === \"array\" && currentProp.items) {\n metaProp.items = this.mapPropertyMetadata(currentProp.items, \"items\", false, openApiRoot, version, depth + 1);\n if (metaProp.items.type !== \"object\") {\n if (!metaProp.ui) metaProp.ui = {};\n metaProp.ui.widget = \"multiInput\";\n }\n }\n }\n\n /**\n * Recursively deep-merges two OpenAPI objects, ensuring array boundaries and nested structures are preserved.\n * \n * @param {any} target The target base object.\n * @param {any} source The source object providing override details.\n * @returns {any} The synthesized output object.\n */\n public static deepMergeSchemas(target: any, source: any): any {\n const output: any = Object.assign({}, target);\n if (source === null || typeof source !== \"object\") return output;\n\n Object.keys(source).forEach(key => {\n if (Array.isArray(source[key])) {\n output[key] = Array.isArray(target[key]) \n ? Array.from(new Set([...target[key], ...source[key]])) \n : [...source[key]];\n } else if (typeof source[key] === \"object\" && source[key] !== null) {\n if (target[key] && typeof target[key] === \"object\") {\n output[key] = this.deepMergeSchemas(target[key], source[key]);\n } else {\n output[key] = Object.assign({}, source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n return output;\n }\n}\n"],"mappings":"iHAAA,MAMSA,EAAkBC,EAAA,4BAClBC,EAAiBC,EAAA,2BACjBC,EAAeC,EAAA,mBAOjB,MAAMC,EAWT,oBAAcC,CACVC,EACAC,EACAC,EACAC,EACAC,EAAgB,GAEhB,MAAMC,EAAqD,CAAC,EAE5D,GAAID,EAAQ,EAAG,OAAOC,EAEtB,IAAK,MAAMC,KAAOC,OAAOC,KAAKR,GAAa,CACvC,MAAMS,EAAaR,EAAaS,SAASJ,GACzC,IAAIK,EAAUX,EAAWM,GAEzB,GAAIK,EAAQC,KAAM,CACd,MAAMC,EAAWrB,EAAmBsB,QAAQH,EAAQC,KAAMV,GAC1D,GAAIW,EAAU,CACVF,EAAU,IAAKE,KAAaF,EAChC,CACJ,CAEAN,EAAgBC,GAAOS,KAAKC,oBAAoBL,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an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.
|
|
19
19
|
*
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {any} properties The OpenAPI properties block.
|
|
21
21
|
* @param {string[]} requiredKeys Array of required property keys.
|
|
22
22
|
* @param {any} openApiRoot The OpenAPI root document for resolving references.
|
|
23
23
|
* @param {"2.0" | "3.0"} version The OpenAPI version.
|
|
@@ -25,9 +25,9 @@ export class OpenApiPropertyMapper {
|
|
|
25
25
|
* @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.
|
|
26
26
|
*/
|
|
27
27
|
public static mapProperties(
|
|
28
|
-
properties:
|
|
28
|
+
properties: any,
|
|
29
29
|
requiredKeys: string[],
|
|
30
|
-
openApiRoot:
|
|
30
|
+
openApiRoot: any,
|
|
31
31
|
version: "2.0" | "3.0",
|
|
32
32
|
depth: number = 0
|
|
33
33
|
): Record<string, IPropertyMetadata> {
|
|
@@ -65,14 +65,14 @@ export class OpenApiPropertyMapper {
|
|
|
65
65
|
* @returns {IPropertyMetadata} The normalized MetaUI property metadata.
|
|
66
66
|
*/
|
|
67
67
|
public static mapPropertyMetadata(
|
|
68
|
-
swaggerProp:
|
|
68
|
+
swaggerProp: any,
|
|
69
69
|
keyName: string,
|
|
70
70
|
isRequired: boolean,
|
|
71
|
-
openApiRoot:
|
|
71
|
+
openApiRoot: any,
|
|
72
72
|
version: "2.0" | "3.0",
|
|
73
73
|
depth: number = 0
|
|
74
74
|
): IPropertyMetadata {
|
|
75
|
-
let currentProp = swaggerProp;
|
|
75
|
+
let currentProp = swaggerProp as any;
|
|
76
76
|
|
|
77
77
|
// 1. Resolve References
|
|
78
78
|
const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);
|
|
@@ -131,10 +131,10 @@ export class OpenApiPropertyMapper {
|
|
|
131
131
|
* @private
|
|
132
132
|
*/
|
|
133
133
|
private static _resolveReference(
|
|
134
|
-
currentProp:
|
|
134
|
+
currentProp: any,
|
|
135
135
|
keyName: string,
|
|
136
136
|
isRequired: boolean,
|
|
137
|
-
openApiRoot:
|
|
137
|
+
openApiRoot: any,
|
|
138
138
|
version: "2.0" | "3.0",
|
|
139
139
|
depth: number
|
|
140
140
|
): IPropertyMetadata | null {
|
|
@@ -143,10 +143,10 @@ export class OpenApiPropertyMapper {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);
|
|
146
|
-
const resolvedType = currentProp.type || (resolved && resolved.type);
|
|
146
|
+
const resolvedType = currentProp.type || (resolved && (resolved as any).type);
|
|
147
147
|
|
|
148
148
|
if (resolvedType && ["string", "number", "integer", "boolean"].includes(resolvedType)) {
|
|
149
|
-
const inlineProp = { ...resolved, ...currentProp };
|
|
149
|
+
const inlineProp = { ...(resolved as any), ...currentProp };
|
|
150
150
|
delete inlineProp.$ref;
|
|
151
151
|
return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);
|
|
152
152
|
}
|
|
@@ -167,7 +167,7 @@ export class OpenApiPropertyMapper {
|
|
|
167
167
|
* @returns {any} A flattened and merged schema entity.
|
|
168
168
|
* @private
|
|
169
169
|
*/
|
|
170
|
-
private static _resolveAllOf(currentProp:
|
|
170
|
+
private static _resolveAllOf(currentProp: any, openApiRoot: any): unknown {
|
|
171
171
|
if (!Array.isArray(currentProp.allOf)) {
|
|
172
172
|
return currentProp;
|
|
173
173
|
}
|
|
@@ -192,7 +192,7 @@ export class OpenApiPropertyMapper {
|
|
|
192
192
|
* @param {"2.0" | "3.0"} version The version, utilized for nuanced boundary matching.
|
|
193
193
|
* @private
|
|
194
194
|
*/
|
|
195
|
-
private static _applyConstraints(metaProp: IPropertyMetadata, currentProp:
|
|
195
|
+
private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: any, version: "2.0" | "3.0"): void {
|
|
196
196
|
// String Constraints
|
|
197
197
|
if (typeof currentProp.maxLength === "number") metaProp.maxLength = currentProp.maxLength;
|
|
198
198
|
if (typeof currentProp.minLength === "number") metaProp.minLength = currentProp.minLength;
|
|
@@ -237,7 +237,7 @@ export class OpenApiPropertyMapper {
|
|
|
237
237
|
* @param {any} currentProp Source raw schema payload.
|
|
238
238
|
* @private
|
|
239
239
|
*/
|
|
240
|
-
private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp:
|
|
240
|
+
private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: any): void {
|
|
241
241
|
if (currentProp.readOnly === true) metaProp.readOnly = true;
|
|
242
242
|
if (currentProp.writeOnly === true) metaProp.writeOnly = true;
|
|
243
243
|
if (currentProp.nullable === true) metaProp.nullable = true;
|
|
@@ -256,8 +256,8 @@ export class OpenApiPropertyMapper {
|
|
|
256
256
|
*/
|
|
257
257
|
private static _applyPolymorphism(
|
|
258
258
|
metaProp: IPropertyMetadata,
|
|
259
|
-
currentProp:
|
|
260
|
-
openApiRoot:
|
|
259
|
+
currentProp: any,
|
|
260
|
+
openApiRoot: any,
|
|
261
261
|
version: "2.0" | "3.0",
|
|
262
262
|
depth: number
|
|
263
263
|
): void {
|
|
@@ -310,8 +310,8 @@ export class OpenApiPropertyMapper {
|
|
|
310
310
|
*/
|
|
311
311
|
private static _applyNestedTypes(
|
|
312
312
|
metaProp: IPropertyMetadata,
|
|
313
|
-
currentProp:
|
|
314
|
-
openApiRoot:
|
|
313
|
+
currentProp: any,
|
|
314
|
+
openApiRoot: any,
|
|
315
315
|
version: "2.0" | "3.0",
|
|
316
316
|
depth: number,
|
|
317
317
|
type: string
|
|
@@ -353,8 +353,8 @@ export class OpenApiPropertyMapper {
|
|
|
353
353
|
* @param {any} source The source object providing override details.
|
|
354
354
|
* @returns {any} The synthesized output object.
|
|
355
355
|
*/
|
|
356
|
-
public static deepMergeSchemas(target:
|
|
357
|
-
const output = Object.assign({}, target);
|
|
356
|
+
public static deepMergeSchemas(target: any, source: any): any {
|
|
357
|
+
const output: any = Object.assign({}, target);
|
|
358
358
|
if (source === null || typeof source !== "object") return output;
|
|
359
359
|
|
|
360
360
|
Object.keys(source).forEach(key => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\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({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent:
|
|
1
|
+
{"version":3,"file":"ClearFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nimport Event from \"sap/ui/base/Event\";\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\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({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): unknown {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAOnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASF,UAAU,CAAC;IAC3CG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,IA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
|
-
{"version":3,"file":"ClearFormActionPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,OAAO,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClearFormActionPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kEAAkE,CAAC;IAClF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C;;;;;;OAMG;IACH,MAAa,qBAAsB,SAAQ,UAAU;QAC1C,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAE,MAAe,GAAG,OAAO;QA2BzG,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\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({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent:
|
|
1
|
+
{"version":3,"file":"ClearFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nimport Event from \"sap/ui/base/Event\";\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\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({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): unknown {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"mFAAA,MAKSA,EAAUC,EAAA,cAcZ,MAAMC,UAA8BF,EAChCG,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,IAAKG,KAAKE,WAAY,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAAEG,QAAS,QAC1C,OAAOT,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIE,EAAO,CACtBC,KAAMd,EAAcO,IAAIQ,OAAS,aACjCC,KAAM,SACNC,KAAM,oBACNC,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAQF,EAAIG,SAASrB,GAC3B,GAAIoB,EAAO,CAEPA,EAAME,YAAY,IAAK,CAAC,EAC5B,KAIR,OAAOrB,KAAKQ,OAChB,CAEUc,WACN,OAAO,IACX,CAEUC,aACN,GAAIvB,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKQ,QAAmBgB,YAAYxB,KAAKC,SAASG,IAAIqB,SAC3D,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,wBAAA,OAAA+B,CAAA","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ import Button from "sap/m/Button";
|
|
|
9
9
|
import Control from "sap/ui/core/Control";
|
|
10
10
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
11
11
|
|
|
12
|
+
import Event from "sap/ui/base/Event";
|
|
12
13
|
/**
|
|
13
14
|
* A custom action plugin that renders a Button to reset the model data.
|
|
14
15
|
* Demonstrates how to create functional action plugins that interact with the bound model.
|
|
@@ -31,7 +32,7 @@ export class ClearFormActionPlugin extends BasePlugin {
|
|
|
31
32
|
text: fieldMetadata.ui?.label || "Clear Data",
|
|
32
33
|
type: "Reject",
|
|
33
34
|
icon: "sap-icon://delete",
|
|
34
|
-
press: (oEvent:
|
|
35
|
+
press: (oEvent: Event) => {
|
|
35
36
|
const btn = oEvent.getSource() as Button;
|
|
36
37
|
const model = btn.getModel(modelName) as JSONModel;
|
|
37
38
|
if (model) {
|