@sap/ux-specification 1.144.1 → 1.144.3
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/CHANGELOG.md +65 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +316 -311
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +208 -7
- package/dist/schemas/v2/OverviewPageConfig.json +18 -9
- package/dist/schemas/v4/ApplicationV4.json +20 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +597 -166
- package/dist/schemas/v4/ListReportConfig.json +74 -15
- package/dist/schemas/v4/ObjectPageConfig.json +117 -732
- package/dist/specification/package.json +8 -8
- package/dist/specification/scripts/generate-validity-report.js +1 -1
- package/dist/specification/scripts/generate-validity-report.js.map +1 -1
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +15 -0
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +23 -10
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +39 -3
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +1 -0
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +2 -1
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts +91 -0
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js +139 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts +95 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js +210 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +71 -22
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.js +23 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +0 -8
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +0 -15
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +4 -0
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +4 -0
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts +38 -0
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js +3 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js +50 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js +46 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts +26 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js +77 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js +43 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js +68 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts +19 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js +48 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts +6 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js +14 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js.map +1 -0
- package/dist/specification/src/sync/common/i18n.json +29 -1
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +2 -0
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/common/rules.d.ts +1 -1
- package/dist/specification/src/sync/common/rules.js +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +4 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +47 -26
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +3 -2
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +48 -19
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +54 -6
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +106 -12
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +2 -0
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +3 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +16 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.js +33 -22
- package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +4 -4
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts +12 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js +167 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +60 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +626 -11
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +30 -6
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +2 -0
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +25 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +28 -4
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +2 -0
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +20 -0
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts +1 -2
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js +1 -2
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -5
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +2 -7
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +9 -3
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +10 -6
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/InlineEdit.d.ts +38 -0
- package/dist/specification/src/sync/v4/export/controls/InlineEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/export/controls/InlineEdit.js +86 -0
- package/dist/specification/src/sync/v4/export/controls/InlineEdit.js.map +1 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts +1 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js +1 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +11 -51
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +95 -246
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +6 -27
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +14 -49
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +1 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +1 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/index.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/index.js +1 -0
- package/dist/specification/src/sync/v4/export/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v4/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/factory.js +2 -4
- package/dist/specification/src/sync/v4/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +216 -46
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts +15 -2
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +33 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/actions.js +4 -4
- package/dist/specification/src/sync/v4/generate/actions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/app.d.ts +11 -0
- package/dist/specification/src/sync/v4/generate/app.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/app.js +31 -0
- package/dist/specification/src/sync/v4/generate/app.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +13 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +74 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +4 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +29 -27
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +12 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts +32 -13
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +106 -79
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts +16 -10
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js +64 -32
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +1 -2
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +136 -95
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/utils/inlineEdit.d.ts +18 -0
- package/dist/specification/src/sync/v4/generate/utils/inlineEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/utils/inlineEdit.js +91 -0
- package/dist/specification/src/sync/v4/generate/utils/inlineEdit.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/utils/propertiesForEdit.d.ts +156 -0
- package/dist/specification/src/sync/v4/generate/utils/propertiesForEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/utils/propertiesForEdit.js +192 -0
- package/dist/specification/src/sync/v4/generate/utils/propertiesForEdit.js.map +1 -0
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +20 -0
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +11 -50
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +2 -4
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +5 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +3 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +1 -294
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +0 -753
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +2 -4
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +10 -4
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +19 -0
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +34 -0
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +31 -3
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +310 -58
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/specification/test/test-utils/utils.d.ts +1 -0
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -1
- package/dist/specification/test/test-utils/utils.js +11 -0
- package/dist/specification/test/test-utils/utils.js.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +2 -2
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.js +6 -6
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +44 -6
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +1 -0
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +13 -6
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +14 -7
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v4/application.d.ts +21 -0
- package/dist/types/src/v4/application.d.ts.map +1 -1
- package/dist/types/src/v4/application.js +10 -0
- package/dist/types/src/v4/application.js.map +1 -1
- package/dist/types/src/v4/controls/InlineEdit.d.ts +30 -0
- package/dist/types/src/v4/controls/InlineEdit.d.ts.map +1 -0
- package/dist/types/src/v4/controls/InlineEdit.js +3 -0
- package/dist/types/src/v4/controls/InlineEdit.js.map +1 -0
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +86 -252
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.js.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +4 -4
- package/dist/types/src/v4/controls/index.d.ts +1 -0
- package/dist/types/src/v4/controls/index.d.ts.map +1 -1
- package/dist/types/src/v4/controls/index.js +1 -0
- package/dist/types/src/v4/controls/index.js.map +1 -1
- package/dist/types/src/v4/pages/ListReportConfigV4.d.ts +5 -1
- package/dist/types/src/v4/pages/ListReportConfigV4.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.ViewTypes = void 0;
|
|
3
|
+
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.CONFIG = exports.ViewTypes = void 0;
|
|
4
|
+
exports.getViewFileName = getViewFileName;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
6
7
|
const ejs_1 = require("ejs");
|
|
7
8
|
const fs_1 = require("fs");
|
|
9
|
+
const fe_fpm_writer_1 = require("@sap-ux/fe-fpm-writer");
|
|
8
10
|
const templatesPath = (0, path_1.join)(__dirname, 'templates');
|
|
9
11
|
var ViewTypes;
|
|
10
12
|
(function (ViewTypes) {
|
|
@@ -12,15 +14,88 @@ var ViewTypes;
|
|
|
12
14
|
ViewTypes["HTML"] = "html";
|
|
13
15
|
ViewTypes["JSON"] = "json";
|
|
14
16
|
})(ViewTypes || (exports.ViewTypes = ViewTypes = {}));
|
|
17
|
+
exports.CONFIG = {
|
|
18
|
+
['AnalyticalTableColumnsExtension.xml']: {
|
|
19
|
+
getData: (generateId) => {
|
|
20
|
+
return {
|
|
21
|
+
ids: {
|
|
22
|
+
label: generateId('Label'),
|
|
23
|
+
text: generateId('Text'),
|
|
24
|
+
customData: generateId('CustomData')
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
['fragment.xml']: {
|
|
30
|
+
getData: (generateId) => {
|
|
31
|
+
return {
|
|
32
|
+
ids: {
|
|
33
|
+
verticalLayout: generateId('VerticalLayout'),
|
|
34
|
+
text: generateId('Text'),
|
|
35
|
+
button: generateId('Button')
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
['GridTableColumnsExtension.xml']: {
|
|
41
|
+
getData: (generateId) => {
|
|
42
|
+
return {
|
|
43
|
+
ids: {
|
|
44
|
+
label: generateId('Label'),
|
|
45
|
+
text: generateId('Text'),
|
|
46
|
+
customData: generateId('CustomData')
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
['ResponsiveTableColumnsExtension.xml']: {
|
|
52
|
+
getData: (generateId) => {
|
|
53
|
+
return {
|
|
54
|
+
ids: {
|
|
55
|
+
text: generateId('ColumnText'),
|
|
56
|
+
customData: generateId('CustomData')
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
['TreeTableColumnsExtension.xml']: {
|
|
62
|
+
getData: (generateId) => {
|
|
63
|
+
return {
|
|
64
|
+
ids: {
|
|
65
|
+
label: generateId('Label'),
|
|
66
|
+
text: generateId('Text'),
|
|
67
|
+
customData: generateId('CustomData')
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
['view.xml']: {
|
|
73
|
+
getData: (generateId) => {
|
|
74
|
+
return {
|
|
75
|
+
ids: {
|
|
76
|
+
app: generateId('App'),
|
|
77
|
+
page: generateId('Page'),
|
|
78
|
+
label: generateId('Label')
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
15
84
|
/**
|
|
16
85
|
* Method which reads passed template and renders it using passed template object.
|
|
17
86
|
*
|
|
18
87
|
* @param {string} templatePath - Path to template.
|
|
19
88
|
* @param {{ [key: string]: string }} templateData - Template data object.
|
|
89
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
20
90
|
* @returns {string} the rendered template's string
|
|
21
91
|
*/
|
|
22
|
-
const renderTemplate = (templatePath, templateData) => {
|
|
92
|
+
const renderTemplate = (templatePath, templateData, generateId) => {
|
|
23
93
|
const template = (0, fs_1.readFileSync)(templatePath, 'utf8');
|
|
94
|
+
const templateKey = (0, fe_fpm_writer_1.getRelativeTemplateComponentPath)(templatePath);
|
|
95
|
+
if (generateId && exports.CONFIG[templateKey] && typeof exports.CONFIG[templateKey].getData === 'function') {
|
|
96
|
+
const additionalData = exports.CONFIG[templateKey].getData(generateId);
|
|
97
|
+
templateData = { ...templateData, ...additionalData };
|
|
98
|
+
}
|
|
24
99
|
return (0, ejs_1.render)(template, templateData);
|
|
25
100
|
};
|
|
26
101
|
exports.renderTemplate = renderTemplate;
|
|
@@ -57,11 +132,12 @@ exports.getControllerContent = getControllerContent;
|
|
|
57
132
|
* @param {string} name - View's name.
|
|
58
133
|
* @param {string} namespace - Application namespace.
|
|
59
134
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
135
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
60
136
|
* @param {boolean} [controller] - Generate controller.
|
|
61
137
|
* @param {boolean} [page] - Is view should contains page structure or not - page structure uses 'sap.m.App' in view template.
|
|
62
138
|
* @returns {string} the rendered template's string
|
|
63
139
|
*/
|
|
64
|
-
const getViewContent = (name, namespace, sourceType, controller = false, page = true) => {
|
|
140
|
+
const getViewContent = (name, namespace, sourceType, generateId, controller = false, page = true) => {
|
|
65
141
|
const escapedName = escapeViewName(name);
|
|
66
142
|
const templateData = {
|
|
67
143
|
name: escapedName,
|
|
@@ -71,7 +147,7 @@ const getViewContent = (name, namespace, sourceType, controller = false, page =
|
|
|
71
147
|
if (controller) {
|
|
72
148
|
templateData.controllerName = namespace + '.controller.' + escapedName;
|
|
73
149
|
}
|
|
74
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData);
|
|
150
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData, generateId);
|
|
75
151
|
};
|
|
76
152
|
exports.getViewContent = getViewContent;
|
|
77
153
|
/**
|
|
@@ -80,10 +156,11 @@ exports.getViewContent = getViewContent;
|
|
|
80
156
|
* @param {string} name - View's name.
|
|
81
157
|
* @param {string} namespace - Application namespace.
|
|
82
158
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
159
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
83
160
|
* @param {boolean} handler - JS handler.
|
|
84
161
|
* @returns {string} the rendered template's string
|
|
85
162
|
*/
|
|
86
|
-
const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
163
|
+
const getFragmentContent = (name, namespace, sourceType, generateId, handler = false) => {
|
|
87
164
|
const escapedName = escapeViewName(name);
|
|
88
165
|
const templateData = {
|
|
89
166
|
name: escapedName,
|
|
@@ -92,7 +169,7 @@ const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
|
92
169
|
if (handler) {
|
|
93
170
|
templateData.handler = `${namespace.replace(/\./g, '/')}/${ux_specification_types_1.DirName.Fragment}/${escapedName}`;
|
|
94
171
|
}
|
|
95
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData);
|
|
172
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData, generateId);
|
|
96
173
|
};
|
|
97
174
|
exports.getFragmentContent = getFragmentContent;
|
|
98
175
|
/**
|
|
@@ -109,9 +186,10 @@ exports.getFragmentJsContent = getFragmentJsContent;
|
|
|
109
186
|
*
|
|
110
187
|
* @param column - data (from config) to be inserted in the template
|
|
111
188
|
* @param template - The type of view template (e.g., XML, HTML, JSON).
|
|
189
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
112
190
|
* @returns {string} the rendered template's string
|
|
113
191
|
*/
|
|
114
|
-
const getSingleColumnContent = (column, template) => {
|
|
192
|
+
const getSingleColumnContent = (column, template, generateId) => {
|
|
115
193
|
const templateData = {
|
|
116
194
|
id: column.id,
|
|
117
195
|
text: column.text,
|
|
@@ -119,7 +197,7 @@ const getSingleColumnContent = (column, template) => {
|
|
|
119
197
|
columnIndex: column.columnIndex !== undefined ? column.columnIndex.toString() : undefined,
|
|
120
198
|
leadingProperty: column.leadingProperty
|
|
121
199
|
};
|
|
122
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData);
|
|
200
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData, generateId);
|
|
123
201
|
};
|
|
124
202
|
exports.getSingleColumnContent = getSingleColumnContent;
|
|
125
203
|
/**
|
|
@@ -127,14 +205,15 @@ exports.getSingleColumnContent = getSingleColumnContent;
|
|
|
127
205
|
*
|
|
128
206
|
* @param customColumns - array of all column extensions' data
|
|
129
207
|
* @param templateType - The type of view template (e.g., XML, HTML, JSON).
|
|
208
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
130
209
|
* @returns {string} the rendered template's string
|
|
131
210
|
*/
|
|
132
|
-
const getColumnFragmentContent = (customColumns, templateType) => {
|
|
211
|
+
const getColumnFragmentContent = (customColumns, templateType, generateId) => {
|
|
133
212
|
let fragment = '';
|
|
134
213
|
fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:table="sap.ui.table" xmlns="sap.m">';
|
|
135
214
|
if (customColumns) {
|
|
136
215
|
for (const column of customColumns) {
|
|
137
|
-
const newContent = (0, exports.getSingleColumnContent)(column, templateType);
|
|
216
|
+
const newContent = (0, exports.getSingleColumnContent)(column, templateType, generateId);
|
|
138
217
|
fragment = fragment + '\n' + newContent;
|
|
139
218
|
}
|
|
140
219
|
}
|
|
@@ -145,17 +224,32 @@ exports.getColumnFragmentContent = getColumnFragmentContent;
|
|
|
145
224
|
* Creates the content for a ResponsiveTableCellsExtension fragment.
|
|
146
225
|
*
|
|
147
226
|
* @param customColumns - list of custom columns; for each of them a dummy entry gets created in the view content.
|
|
227
|
+
* @param generateId - function to generate ids for new entries in the fragment.
|
|
148
228
|
* @returns {string} the rendered template's string
|
|
149
229
|
*/
|
|
150
|
-
const getResponsiveTableCellsFragment = (customColumns) => {
|
|
230
|
+
const getResponsiveTableCellsFragment = (customColumns, generateId) => {
|
|
151
231
|
let fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m">';
|
|
232
|
+
let validatedIds = [];
|
|
152
233
|
if (customColumns) {
|
|
153
234
|
customColumns.forEach(() => {
|
|
235
|
+
const newId = generateId('Text', validatedIds);
|
|
236
|
+
validatedIds.push(newId);
|
|
154
237
|
// use same approach as json2xml - use 4 spaces for fragment children elements
|
|
155
|
-
fragment = fragment +
|
|
238
|
+
fragment = fragment + `\n <Text id="${newId}" text="Placeholder"/>`;
|
|
156
239
|
});
|
|
157
240
|
}
|
|
158
241
|
return fragment + '\n' + '</core:FragmentDefinition>';
|
|
159
242
|
};
|
|
160
243
|
exports.getResponsiveTableCellsFragment = getResponsiveTableCellsFragment;
|
|
244
|
+
/**
|
|
245
|
+
* Method to construct full name of view or fragment.
|
|
246
|
+
*
|
|
247
|
+
* @param {string} name Shorten name of view or fragment.
|
|
248
|
+
* @param {boolean} isFragment Is fragment or view.
|
|
249
|
+
* @param {ViewTypes} viewType type of view or fragment.
|
|
250
|
+
* @returns {string} Full path of view or fragment name.
|
|
251
|
+
*/
|
|
252
|
+
function getViewFileName(name, isFragment, viewType = ViewTypes.XML) {
|
|
253
|
+
return isFragment ? `${name}.fragment.${viewType}` : `${name}.view.${viewType}`;
|
|
254
|
+
}
|
|
161
255
|
//# sourceMappingURL=view-controller-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;AA8RA,0CAEC;AAhSD,+BAA4B;AAE5B,wEAAsD;AAEtD,6BAA6B;AAC7B,2BAAkC;AAClC,yDAAmG;AAEnG,MAAM,aAAa,GAAG,IAA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QAAQ,GAAG,SAAS,CAAC,GAAG;IACvF,OAAO,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,aAAa,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,SAAS,QAAQ,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -13,6 +13,7 @@ import type { ConvertedMetadata } from '@sap-ux/vocabularies-types';
|
|
|
13
13
|
*
|
|
14
14
|
* @property appId - id of the app. Note that this should not be taken from the manifest, since the manifest may still contain a placeholder.
|
|
15
15
|
* @property manifest - manifest of the FE v2 app
|
|
16
|
+
* @property flex - flex changes defined for the app
|
|
16
17
|
* @property pagePath - manifest path identifying the page
|
|
17
18
|
* @property annotations - the annotations relevant for this page, may be omitted when parsedAnnotations is available
|
|
18
19
|
* @property parsedAnnotations - parsed annotations relevant for this page, may be omitted when annotations is available
|
|
@@ -21,6 +22,7 @@ import type { ConvertedMetadata } from '@sap-ux/vocabularies-types';
|
|
|
21
22
|
export type PageSpec = {
|
|
22
23
|
appId: string;
|
|
23
24
|
manifest: Manifest;
|
|
25
|
+
flex?: string[];
|
|
24
26
|
pagePath: AccessorPath;
|
|
25
27
|
annotations?: FileData[];
|
|
26
28
|
parsedAnnotations?: ConvertedMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaAdaptation.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/schemaAdaptation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,wBAAwB,CAAC;AAS9E,OAAO,KAAK,EACR,YAAY,EAEZ,eAAe,EACf,QAAQ,EAER,QAAQ,EACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAIR,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAgVpE
|
|
1
|
+
{"version":3,"file":"schemaAdaptation.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/schemaAdaptation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,wBAAwB,CAAC;AAS9E,OAAO,KAAK,EACR,YAAY,EAEZ,eAAe,EACf,QAAQ,EAER,QAAQ,EACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAIR,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAgVpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,aAAa,EAAE,UAAU,CAAC;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,aAAa,EAAE,MAAM,KAAK,4BAA4B,GAAG,SAAS,CAAC;AAE5G;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,yBAAyB,EAC/C,MAAM,CAAC,EAAE,eAAe,GACzB,UAAU,CAyEZ"}
|
|
@@ -153,9 +153,9 @@ function applyAdaptationInfoToElement(adaptationInfo, element, generateParameter
|
|
|
153
153
|
*/
|
|
154
154
|
function getJSONPathForProperty(path, property) {
|
|
155
155
|
const pathIsArray = Array.isArray(path);
|
|
156
|
-
|
|
156
|
+
let pathAsArray = pathIsArray ? path : path.path;
|
|
157
157
|
if (pathIsArray || path.addTargetPropertyToPath) {
|
|
158
|
-
pathAsArray.
|
|
158
|
+
pathAsArray = pathAsArray.concat([property]);
|
|
159
159
|
}
|
|
160
160
|
let jsonPath = '$';
|
|
161
161
|
pathAsArray.forEach((segment) => {
|
|
@@ -340,6 +340,7 @@ function getAdaptedSchema(pageSpec, getGenericSchemaInfo, logger) {
|
|
|
340
340
|
const generateParameters = {
|
|
341
341
|
templateType,
|
|
342
342
|
manifest: pageSpec.manifest,
|
|
343
|
+
flex: pageSpec.flex,
|
|
343
344
|
serviceAVT,
|
|
344
345
|
fioriElementsVersion: ux_specification_types_1.FioriElementsVersion.v2,
|
|
345
346
|
entitySet: entitySetDefinition,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaAdaptation.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/schemaAdaptation.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"schemaAdaptation.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/schemaAdaptation.ts"],"names":[],"mappings":";;AAyaA,4CA6EC;AA/eD,yCAMsB;AACtB,wEAA4F;AAe5F,mEAAgG;AAChG,mEAA+D;AAC/D,mDAA4C;AAC5C,oCAAqD;AACrD,6CAA8C;AAmB9C;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,OAAmB,EAAE,WAAwB;IAC1E,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,YAAY;YACxC,2BAA2B,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,aAAa,CAAC,OAAmB;IACtC,OAAO,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAA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C,CAAC;IACF,qDAAqD;IACrD,iJAAiJ;IACjJ,aAAa,CAAC,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACnF,qFAAqF;IACrF,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/C,OAAO,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Definition } from 'typescript-json-schema';
|
|
2
2
|
import type { MetadataInstanceInterface } from '../../common/decoration/factory';
|
|
3
|
-
import type { v2, PageTypeV2, PageTypeV4, FileData, PropertyMessage, GenerateAppSchemaParameters } from '@sap/ux-specification-types';
|
|
3
|
+
import type { v2, PageTypeV2, PageTypeV4, FileData, PropertyMessage, GenerateAppSchemaParameters, MessageParameters } from '@sap/ux-specification-types';
|
|
4
4
|
import type { AnnotationTerm, EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
5
5
|
import type { Chart, DataPoint, DataFieldAbstractTypes, LineItem, SelectionFields } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
6
6
|
import type * as Edm from '@sap-ux/vocabularies-types/Edm';
|
|
@@ -233,6 +233,21 @@ export type LineItemInfo = {
|
|
|
233
233
|
* @returns an instance of LineItemInfo containing the collected information
|
|
234
234
|
*/
|
|
235
235
|
export declare function getLineItemInfo(lineItemName: string, lineItemDefinition: AnnotationTerm<LineItem>, entityType: Edm.EntityType, tableType: string, generateParameters: GenerateAppSchemaParameters, isOP: boolean): LineItemInfo;
|
|
236
|
+
/**
|
|
237
|
+
* This function provides the information how to deal with the outdated useExportToExcel property for tables in the app schema, based on the existing flex changes for the current page.
|
|
238
|
+
* Thereby, the table properties enableExport and useExportToExcel are checked.
|
|
239
|
+
* We assume that the first of those is preferred and the second one is only supported for compatibility.
|
|
240
|
+
*
|
|
241
|
+
* @param flex - the flex changes applicable to the current page
|
|
242
|
+
* @param smartTableControlId - if this parameter is truthy only flex changes for smart tables with this local id will be considered.
|
|
243
|
+
* Otherwise all flex changes for any smart table will be considered.
|
|
244
|
+
* Note that anyway only flex changes for the two properties mentioned above are relevant.
|
|
245
|
+
* @returns the name of the unfavored property (useExportToExcel) and possibly a message indicating how to deal with it in the app schema (e.g. whether to simply hide it or whether there is an inconsistency that should be resolved by the user).
|
|
246
|
+
*/
|
|
247
|
+
export declare function getExportTablesPropertiesInfo(flex: string[], smartTableControlId?: string): {
|
|
248
|
+
unfavoredName: string;
|
|
249
|
+
message: MessageParameters | undefined;
|
|
250
|
+
};
|
|
236
251
|
/**
|
|
237
252
|
* An instance of this type can be used to modify a section of a schema (e.g. in a post processing step for the app specific schema generation).
|
|
238
253
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EACR,EAAE,EACF,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,EAEf,2BAA2B,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EACR,EAAE,EACF,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,EAEf,2BAA2B,EAG3B,iBAAiB,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B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,aAAa,EAAE,CAAC;CACnC,CAAC;AA4BF;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC3B,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,cAAc,CAAC,QAAQ,CAAC,EAC5C,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,2BAA2B,EAC/C,IAAI,EAAE,OAAO,GACd,YAAY,CA2Cd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CACzC,IAAI,EAAE,MAAM,EAAE,EACd,mBAAmB,CAAC,EAAE,MAAM,GAC7B;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAA;CAAE,CAmDnE;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAWhH"}
|
|
@@ -23,6 +23,7 @@ exports.addStandardFooterActionsOP = addStandardFooterActionsOP;
|
|
|
23
23
|
exports.getUIAnnotationForEntitySet = getUIAnnotationForEntitySet;
|
|
24
24
|
exports.getLineItemAnnotation = getLineItemAnnotation;
|
|
25
25
|
exports.getLineItemInfo = getLineItemInfo;
|
|
26
|
+
exports.getExportTablesPropertiesInfo = getExportTablesPropertiesInfo;
|
|
26
27
|
exports.getExportTablesPropertiesAdapter = getExportTablesPropertiesAdapter;
|
|
27
28
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
28
29
|
const common_1 = require("../../common");
|
|
@@ -550,13 +551,12 @@ function processProperties(schema, schemaDefinition, metaDataDefinition, propert
|
|
|
550
551
|
}
|
|
551
552
|
else {
|
|
552
553
|
const propertyDefinition = schemaDefinition[propertiesSection][propertyKey];
|
|
553
|
-
if (
|
|
554
|
-
processAnyOf(propertyDefinition, schema, propertyKey, factory, pageType, processedRefs);
|
|
555
|
-
}
|
|
556
|
-
else if (propertyKey === '$ref') {
|
|
554
|
+
if (propertyKey === '$ref') {
|
|
557
555
|
processObject(schema, schemaDefinition[propertiesSection], propertyKey, factory, pageType, processedRefs);
|
|
558
556
|
}
|
|
559
557
|
else {
|
|
558
|
+
// Always go through processSingleProperty first to add decorator metadata
|
|
559
|
+
// (artifactType, descriptionSrcURL), then it handles anyOf recursion internally
|
|
560
560
|
processSingleProperty(metaDataDefinition, schema, pageType, factory, propertyDefinition, propertyKey, schemaDefinition, processedRefs);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
@@ -939,18 +939,17 @@ function getLineItemInfo(lineItemName, lineItemDefinition, entityType, tableType
|
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
/**
|
|
942
|
-
* This function provides
|
|
942
|
+
* This function provides the information how to deal with the outdated useExportToExcel property for tables in the app schema, based on the existing flex changes for the current page.
|
|
943
943
|
* Thereby, the table properties enableExport and useExportToExcel are checked.
|
|
944
944
|
* We assume that the first of those is preferred and the second one is only supported for compatibility.
|
|
945
|
-
* Note that this is valid starting with UI5 release 1.142. Hence, this function should not be used for lower releases.
|
|
946
945
|
*
|
|
947
946
|
* @param flex - the flex changes applicable to the current page
|
|
948
947
|
* @param smartTableControlId - if this parameter is truthy only flex changes for smart tables with this local id will be considered.
|
|
949
948
|
* Otherwise all flex changes for any smart table will be considered.
|
|
950
949
|
* Note that anyway only flex changes for the two properties mentioned above are relevant.
|
|
951
|
-
* @returns a
|
|
950
|
+
* @returns the name of the unfavored property (useExportToExcel) and possibly a message indicating how to deal with it in the app schema (e.g. whether to simply hide it or whether there is an inconsistency that should be resolved by the user).
|
|
952
951
|
*/
|
|
953
|
-
function
|
|
952
|
+
function getExportTablesPropertiesInfo(flex, smartTableControlId) {
|
|
954
953
|
const preferredName = 'enableExport';
|
|
955
954
|
const unfavoredName = 'useExportToExcel';
|
|
956
955
|
let preferredChange;
|
|
@@ -967,27 +966,27 @@ function getExportTablesPropertiesAdapter(flex, smartTableControlId) {
|
|
|
967
966
|
}
|
|
968
967
|
}
|
|
969
968
|
});
|
|
969
|
+
let message;
|
|
970
970
|
if (unfavoredChange) {
|
|
971
971
|
// A change of the unfavored property exists. => Inform user that he should better use the preferred property.
|
|
972
|
-
let messageParams;
|
|
973
972
|
// The exact message depends on the situation.
|
|
974
973
|
if (preferredChange?.newValue === unfavoredChange.newValue &&
|
|
975
974
|
preferredChange?.newBinding === unfavoredChange.newBinding) {
|
|
976
|
-
|
|
975
|
+
message = {
|
|
977
976
|
text: i18next_1.default.t('USE_ENABLE_EXPORT_ONLY'),
|
|
978
977
|
deletable: true,
|
|
979
978
|
type: ux_specification_types_1.PropertyMessageType.Info
|
|
980
979
|
}; // Change for unfavored property is simply superfluous, since there is a redundant change for the preferred property.
|
|
981
980
|
}
|
|
982
981
|
else if (preferredChange) {
|
|
983
|
-
|
|
982
|
+
message = {
|
|
984
983
|
text: i18next_1.default.t('ENABLE_EXPORT_INCONSISTENT'),
|
|
985
984
|
deletable: true,
|
|
986
985
|
type: ux_specification_types_1.PropertyMessageType.Error
|
|
987
986
|
}; // Changes for the two properties exist and are inconsistent -> Seems to be a misconfiguration
|
|
988
987
|
}
|
|
989
988
|
else {
|
|
990
|
-
|
|
989
|
+
message = {
|
|
991
990
|
text: i18next_1.default.t('EXPORT_TO_EXCEL_OUTDATED'),
|
|
992
991
|
type: ux_specification_types_1.PropertyMessageType.Info,
|
|
993
992
|
quickFix: {
|
|
@@ -997,18 +996,30 @@ function getExportTablesPropertiesAdapter(flex, smartTableControlId) {
|
|
|
997
996
|
}
|
|
998
997
|
}; // Only change for the unfavored property exists -> Provide option to transfer it to the preferred property
|
|
999
998
|
}
|
|
1000
|
-
return function (tableDefinition) {
|
|
1001
|
-
const elementToMark = tableDefinition?.properties?.[unfavoredName];
|
|
1002
|
-
if (elementToMark) {
|
|
1003
|
-
elementToMark[ux_specification_types_1.SchemaTag.messages] = [messageParams];
|
|
1004
|
-
}
|
|
1005
|
-
};
|
|
1006
999
|
}
|
|
1007
|
-
|
|
1000
|
+
return { unfavoredName, message: message };
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* This function provides a DefinitionAdapter that will modify sections of a schema that represent a table.
|
|
1004
|
+
* Thereby, the table properties enableExport and useExportToExcel are checked.
|
|
1005
|
+
* We assume that the first of those is preferred and the second one is only supported for compatibility.
|
|
1006
|
+
* Note that this is valid starting with UI5 release 1.142. Hence, this function should not be used for lower releases.
|
|
1007
|
+
*
|
|
1008
|
+
* @param flex - the flex changes applicable to the current page
|
|
1009
|
+
* @param smartTableControlId - if this parameter is truthy only flex changes for smart tables with this local id will be considered.
|
|
1010
|
+
* Otherwise all flex changes for any smart table will be considered.
|
|
1011
|
+
* Note that anyway only flex changes for the two properties mentioned above are relevant.
|
|
1012
|
+
* @returns a DefinitionAdapter that should be applied to all table sections that correspond to the specified SmartTable.
|
|
1013
|
+
*/
|
|
1014
|
+
function getExportTablesPropertiesAdapter(flex, smartTableControlId) {
|
|
1015
|
+
const { unfavoredName, message } = getExportTablesPropertiesInfo(flex, smartTableControlId);
|
|
1016
|
+
// If there is a message provide a function that sets it. Otherwise provide a function that hides the unfavored property.
|
|
1017
|
+
const schemaTagToSet = message ? ux_specification_types_1.SchemaTag.messages : ux_specification_types_1.SchemaTag.hidden;
|
|
1018
|
+
const valueToSet = message ? [message] : true;
|
|
1008
1019
|
return function (tableDefinition) {
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1011
|
-
|
|
1020
|
+
const elementToAdapt = tableDefinition?.properties?.[unfavoredName];
|
|
1021
|
+
if (elementToAdapt) {
|
|
1022
|
+
elementToAdapt[schemaTagToSet] = valueToSet;
|
|
1012
1023
|
}
|
|
1013
1024
|
};
|
|
1014
1025
|
}
|