@sap/ux-specification 1.136.17 → 1.136.18
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 +40 -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 +320 -315
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +202 -7
- package/dist/schemas/v4/ApplicationV4.json +14 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +50 -19
- package/dist/schemas/v4/ObjectPageConfig.json +112 -717
- 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 +58 -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 +28 -0
- 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 +29 -20
- 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.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.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 +59 -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 +582 -7
- 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 +29 -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 +1 -0
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +10 -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/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 +13 -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 +97 -238
- 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 +11 -38
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +3 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +8 -5
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.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 +212 -46
- package/dist/specification/src/sync/v4/export/fpmCustomPage.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 +103 -78
- 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 +7 -4
- 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 +34 -17
- 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/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/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +4 -23
- 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 +2 -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 +22 -2
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +239 -41
- 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 +15 -5
- 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 +25 -11
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +17 -10
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v4/application.d.ts +15 -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/ObjectPageTable.d.ts +91 -250
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.js.map +1 -1
- package/package.json +8 -8
|
@@ -67,6 +67,7 @@ exports.importManifestBasedActionMenuSettingsOfReference = importManifestBasedAc
|
|
|
67
67
|
exports.importActionSettingsOfReference = importActionSettingsOfReference;
|
|
68
68
|
exports.addCustomFieldDefinition = addCustomFieldDefinition;
|
|
69
69
|
exports.addManifestPathsToProperties = addManifestPathsToProperties;
|
|
70
|
+
exports.getInsertableForEntitySet = getInsertableForEntitySet;
|
|
70
71
|
exports.getPageManifestPath = getPageManifestPath;
|
|
71
72
|
const utils_1 = require("../../common/utils");
|
|
72
73
|
const StableIdHelper_1 = require("./StableIdHelper");
|
|
@@ -78,7 +79,6 @@ const path_1 = require("path");
|
|
|
78
79
|
const DataFieldStrategy_1 = require("../../common/DataFieldStrategy");
|
|
79
80
|
const utils_2 = require("../import/utils");
|
|
80
81
|
const src_1 = require("@sap/ux-specification-types/src");
|
|
81
|
-
const objectPage_1 = require("../generate/objectPage");
|
|
82
82
|
const v4controls = __importStar(require("../export/controls"));
|
|
83
83
|
const pages = __importStar(require("../export/pages"));
|
|
84
84
|
const application_1 = require("../application");
|
|
@@ -86,6 +86,12 @@ exports.DATA_FIELD_FOR_ACTION_GROUP = 'DataFieldForActionGroup';
|
|
|
86
86
|
const UI_ANNOTATION_KEY = 'UI';
|
|
87
87
|
exports.FIELD_SEPARATOR = '::';
|
|
88
88
|
exports.QUALIFIER_SEPARATOR = '#';
|
|
89
|
+
/**
|
|
90
|
+
* List of annotation-based action prefixes that should be included in the schema
|
|
91
|
+
* even if they lack custom action properties (press, menu), so they can be validated
|
|
92
|
+
* and removed during export if they don't match the config.
|
|
93
|
+
*/
|
|
94
|
+
const ANNOTATION_BASED_ACTION_PREFIXES = [`${ux_specification_types_1.DataFieldActionType.DataFieldForIntentBasedNavigation}${exports.FIELD_SEPARATOR}`];
|
|
89
95
|
const ACTION_TYPE = 'actionType';
|
|
90
96
|
const strategyTypeMap = new Map([
|
|
91
97
|
['', "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */],
|
|
@@ -95,19 +101,23 @@ const strategyTypeMap = new Map([
|
|
|
95
101
|
]);
|
|
96
102
|
const OP_ACTION_MENU_DEFINITION = {
|
|
97
103
|
actionMenuDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageCustomActionMenu,
|
|
98
|
-
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageCustomActionMenuActions
|
|
104
|
+
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageCustomActionMenuActions,
|
|
105
|
+
actionName: ux_specification_types_1.DefinitionName.ObjectPageToolBarAction
|
|
99
106
|
};
|
|
100
107
|
const OP_HEADER_ACTION_MENU_DEFINITION = {
|
|
101
108
|
actionMenuDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageHeaderCustomActionMenu,
|
|
102
|
-
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageHeaderCustomActionMenuActions
|
|
109
|
+
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ObjectPageHeaderCustomActionMenuActions,
|
|
110
|
+
actionName: ux_specification_types_1.DefinitionName.ObjectPageHeaderAction
|
|
103
111
|
};
|
|
104
112
|
const LR_ACTION_MENU_DEFINITION = {
|
|
105
113
|
actionMenuDefinitionName: ux_specification_types_1.DefinitionName.CustomActionMenu,
|
|
106
|
-
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.CustomActionMenuActions
|
|
114
|
+
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.CustomActionMenuActions,
|
|
115
|
+
actionName: ux_specification_types_1.DefinitionName.ToolBarAction
|
|
107
116
|
};
|
|
108
117
|
const LR_ACTION_VIEW_MENU_DEFINITION = {
|
|
109
118
|
actionMenuDefinitionName: ux_specification_types_1.DefinitionName.ViewCustomActionMenu,
|
|
110
|
-
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ViewCustomActionMenuActions
|
|
119
|
+
actionMenuActionsDefinitionName: ux_specification_types_1.DefinitionName.ViewCustomActionMenuActions,
|
|
120
|
+
actionName: ux_specification_types_1.DefinitionName.ViewToolBarAction
|
|
111
121
|
};
|
|
112
122
|
const actionMenuDefinitionNameMap = new Map([
|
|
113
123
|
[ux_specification_types_1.DefinitionName.CustomTableActionOP, OP_ACTION_MENU_DEFINITION],
|
|
@@ -234,7 +244,7 @@ function getExtensionDetails(extension, extensionDefinitionName, extId, actionTy
|
|
|
234
244
|
* @param {string} extensionDefinitionName - The name of the extension definition to refer to.
|
|
235
245
|
* @param {[string, unknown][]} sortedExtArray - A sorted array of existing extensions represented as key-value pairs.
|
|
236
246
|
* @param {ExtensionLogger} logger - The logger used for logging errors and warnings during the adjustment process.
|
|
237
|
-
* @param {boolean} [forceAdd
|
|
247
|
+
* @param {boolean} [forceAdd] - Flag indicating whether to force adding extensions even if proper anchor/placement is not found.
|
|
238
248
|
*/
|
|
239
249
|
function adjustCustomExtReferringToCustomExt(remainingExtensions, extensionDefinitionName, sortedExtArray, logger, forceAdd = false) {
|
|
240
250
|
const initialRemaining = Object.entries(remainingExtensions).length;
|
|
@@ -406,6 +416,110 @@ function handleInvalidExtension(logger, extensionId, sortedExtensionsArray, newE
|
|
|
406
416
|
sortedExtensionsArray.push([extensionId, newExtensionReference]);
|
|
407
417
|
delete localExtensions[extensionId];
|
|
408
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Checks if an extension ID represents an annotation-based action.
|
|
421
|
+
* Annotation-based actions should be included in the schema even if they lack custom action
|
|
422
|
+
* properties (press, menu), so they can be validated and removed during export if they don't match the config.
|
|
423
|
+
*
|
|
424
|
+
* @param {string} extensionId - The extension ID to check.
|
|
425
|
+
* @returns {boolean} True if the extension is an annotation-based action, false otherwise.
|
|
426
|
+
*/
|
|
427
|
+
function isAnnotationBasedAction(extensionId) {
|
|
428
|
+
return ANNOTATION_BASED_ACTION_PREFIXES.some((prefix) => extensionId.startsWith(prefix));
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Handles orphaned annotation-based actions that exist in manifest but not in annotations.
|
|
432
|
+
* These actions must be added to the schema to enable cleanup during export.
|
|
433
|
+
*
|
|
434
|
+
* @param {string} extensionId - The extension ID.
|
|
435
|
+
* @param {any} extension - The extension object.
|
|
436
|
+
* @param {string} extensionDefinitionName - The definition name associated with the extensions.
|
|
437
|
+
* @param {Definition} [appSchema] - Optional application schema for creating specific definitions.
|
|
438
|
+
* @param {ActionDetails[]} sortedExtensionsArray - The array to add the action to.
|
|
439
|
+
*/
|
|
440
|
+
function handleOrphanedAnnotationAction(extensionId, extension, extensionDefinitionName, appSchema, sortedExtensionsArray) {
|
|
441
|
+
// This is an annotation-based action from manifest that doesn't exist in annotations.
|
|
442
|
+
// IMPORTANT: We must add these orphaned actions to the schema to enable cleanup.
|
|
443
|
+
//
|
|
444
|
+
// When an action is renamed (e.g., IBN action's semantic object changes), the old
|
|
445
|
+
// action key remains in the manifest but disappears from the config (annotations).
|
|
446
|
+
// By adding it to the schema, the export process can detect this mismatch and remove
|
|
447
|
+
// the orphaned entry from the manifest. If we don't add it to the schema, it will be
|
|
448
|
+
// ignored and remain as garbage in the manifest forever.
|
|
449
|
+
//
|
|
450
|
+
// Process:
|
|
451
|
+
// 1. Add orphaned action to schema with Standard action type
|
|
452
|
+
// 2. During export: compare schema with config
|
|
453
|
+
// 3. Action in schema but NOT in config → remove from manifest
|
|
454
|
+
// 4. Action in schema AND in config → keep in manifest
|
|
455
|
+
if (appSchema) {
|
|
456
|
+
// Create specific definition name and schema like "ToolBarActionGroup<DataFieldForActionGroup::AnnoActionMenu>"
|
|
457
|
+
const { actionName } = determineActionDefinitionNames(extensionDefinitionName);
|
|
458
|
+
const preparedRef = (0, common_1.prepareRef)(extensionId);
|
|
459
|
+
const specificDefinitionName = (0, common_1.getFacetDefinitionKey)(actionName, preparedRef);
|
|
460
|
+
// Create the schema definition for this action
|
|
461
|
+
(0, common_1.parseSchemaDefinition)(actionName, preparedRef, appSchema);
|
|
462
|
+
const correctedExtensionReference = getExtensionDetails(extension, specificDefinitionName, extensionId, ux_specification_types_1.ActionType.Standard);
|
|
463
|
+
sortedExtensionsArray.push([extensionId, correctedExtensionReference]);
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
// Fallback if no appSchema provided
|
|
467
|
+
const correctedExtensionReference = getExtensionDetails(extension, extensionDefinitionName, extensionId, ux_specification_types_1.ActionType.Standard);
|
|
468
|
+
sortedExtensionsArray.push([extensionId, correctedExtensionReference]);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Recursively checks if an action exists in annotation entries, including nested actions within action groups.
|
|
473
|
+
*
|
|
474
|
+
* @param {string} extensionId - The unique identifier for the extension to search for.
|
|
475
|
+
* @param {ActionDetails[]} annotationEntries - Array of actions to search through.
|
|
476
|
+
* @param {Definition | undefined} appSchema - Optional application schema to look up action group definitions.
|
|
477
|
+
* @returns {boolean} True if the action exists at any level (top-level or nested in groups).
|
|
478
|
+
*/
|
|
479
|
+
function actionExistsInAnnotations(extensionId, annotationEntries, appSchema) {
|
|
480
|
+
for (const [id, actionDef] of annotationEntries) {
|
|
481
|
+
// Check top-level match
|
|
482
|
+
if (id === extensionId) {
|
|
483
|
+
return true;
|
|
484
|
+
}
|
|
485
|
+
// Check if this is an action group with nested actions
|
|
486
|
+
const actionDefinition = actionDef;
|
|
487
|
+
if (appSchema && actionDefinition.$ref) {
|
|
488
|
+
const defKey = actionDefinition.$ref.replace('#/definitions/', '');
|
|
489
|
+
const definition = appSchema.definitions?.[defKey];
|
|
490
|
+
// If it's an action group, check its nested actions (properties)
|
|
491
|
+
if (definition && definition.properties) {
|
|
492
|
+
const nestedActions = Object.entries(definition.properties).map(([nestedId, nestedDef]) => [nestedId, nestedDef]);
|
|
493
|
+
// Recursively search nested actions
|
|
494
|
+
if (actionExistsInAnnotations(extensionId, nestedActions, appSchema)) {
|
|
495
|
+
return true;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Processes annotation-based actions with unsupported extension types.
|
|
504
|
+
* Either skips duplicates or handles orphaned actions.
|
|
505
|
+
*
|
|
506
|
+
* @param {string} extensionId - The extension ID.
|
|
507
|
+
* @param {any} extension - The extension object.
|
|
508
|
+
* @param {string} extensionDefinitionName - The definition name.
|
|
509
|
+
* @param {Definition} [appSchema] - Optional application schema.
|
|
510
|
+
* @param {ActionDetails[]} annotationEntries - Array of annotation entries.
|
|
511
|
+
* @param {ActionDetails[]} sortedExtensionsArray - The sorted extensions array.
|
|
512
|
+
*/
|
|
513
|
+
function processAnnotationBasedAction(extensionId, extension, extensionDefinitionName, appSchema, annotationEntries, sortedExtensionsArray) {
|
|
514
|
+
// Check if this annotation-based action exists in annotationEntries (including nested in action groups)
|
|
515
|
+
const existsInAnnotations = actionExistsInAnnotations(extensionId, annotationEntries, appSchema);
|
|
516
|
+
if (existsInAnnotations) {
|
|
517
|
+
// Action already exists from annotations - skip it to avoid duplicates
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
// Handle orphaned annotation-based action
|
|
521
|
+
handleOrphanedAnnotationAction(extensionId, extension, extensionDefinitionName, appSchema, sortedExtensionsArray);
|
|
522
|
+
}
|
|
409
523
|
/**
|
|
410
524
|
* Adds extension entries to a sorted array of extensions based on specific rules,
|
|
411
525
|
* including using anchors, callbacks, and custom templates.
|
|
@@ -413,13 +527,14 @@ function handleInvalidExtension(logger, extensionId, sortedExtensionsArray, newE
|
|
|
413
527
|
* @param {CustomExtensions} extensions - The object containing custom extensions to be added to the array.
|
|
414
528
|
* @param {ActionDetails[]} sortedExtensionsArray - The array of sorted extensions to which new extensions will be added.
|
|
415
529
|
* @param {string} extensionDefinitionName - The definition name associated with the extensions being added.
|
|
416
|
-
* @param {TemplatePropertyName | TemplatePropertyName[]} [templatePropertyName
|
|
530
|
+
* @param {TemplatePropertyName | TemplatePropertyName[]} [templatePropertyName] -
|
|
417
531
|
* The property name(s) to check for existence in an extension; used to determine compatibility.
|
|
418
532
|
* @param {ExtensionLogger} [logger] - An optional logger to handle logging of invalid extensions or other events.
|
|
419
533
|
* @param {boolean} [ignoreAnnotationAnchors=false] - A flag to indicate whether extension anchors should be ignored.
|
|
534
|
+
* @param {Definition} [appSchema] - Optional application schema for creating specific definitions for annotation-based actions.
|
|
420
535
|
* @returns {ActionDetails[]} The updated sorted extensions array, including newly added and valid extensions.
|
|
421
536
|
*/
|
|
422
|
-
function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinitionName, templatePropertyName = ux_specification_types_1.TemplatePropertyName.Template, logger, ignoreAnnotationAnchors = false) {
|
|
537
|
+
function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinitionName, templatePropertyName = ux_specification_types_1.TemplatePropertyName.Template, logger, ignoreAnnotationAnchors = false, appSchema) {
|
|
423
538
|
templatePropertyName = Array.isArray(templatePropertyName) ? templatePropertyName : [templatePropertyName];
|
|
424
539
|
const annotationEntries = [...sortedExtensionsArray];
|
|
425
540
|
const localExtensions = { ...extensions };
|
|
@@ -439,9 +554,17 @@ function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinit
|
|
|
439
554
|
}
|
|
440
555
|
const hasUnsupportedExtensionType = templatePropertyName.every((propertyName) => !(propertyName in extension));
|
|
441
556
|
if (hasUnsupportedExtensionType) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
557
|
+
const isAnnotationBased = isAnnotationBasedAction(extensionId);
|
|
558
|
+
if (isAnnotationBased) {
|
|
559
|
+
processAnnotationBasedAction(extensionId, extension, extensionDefinitionName, appSchema, annotationEntries, sortedExtensionsArray);
|
|
560
|
+
delete localExtensions[extensionId];
|
|
561
|
+
continue;
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
// Skip regular entries (columns, actions, etc.) that don't have required properties
|
|
565
|
+
delete localExtensions[extensionId];
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
445
568
|
}
|
|
446
569
|
const anchor = getExtensionAnchor(extension, annotationEntries);
|
|
447
570
|
if (anchor) {
|
|
@@ -492,7 +615,7 @@ function removeDataFieldPrefix(key) {
|
|
|
492
615
|
* Extracts and processes the columns defined in the given lineItems or Definition object,
|
|
493
616
|
* returning an array of CreationFieldOneOfOption.
|
|
494
617
|
*
|
|
495
|
-
* @param {Definition} [columns
|
|
618
|
+
* @param {Definition} [columns] - An object containing column definitions where keys represent field identifiers
|
|
496
619
|
* and values are field metadata.
|
|
497
620
|
* @returns {CreationFieldOneOfOption[]} An array of field options, each containing field-specific metadata.
|
|
498
621
|
*/
|
|
@@ -653,14 +776,28 @@ function addActionRecordToSchema(lineItemDefinitionParams, createRef = true) {
|
|
|
653
776
|
//no footer bar -> toolbar action
|
|
654
777
|
const actionDefinitionName = determineActionDefinitionName(data, lineItemRecord);
|
|
655
778
|
const description = (0, common_1.getDataFieldDescription)(lineItemRecord, data.entityType);
|
|
656
|
-
|
|
779
|
+
// Generate stable ID using strategy pattern to ensure correct key format for all action types.
|
|
780
|
+
// This is crucial for IBN actions, which need the full key including SemanticObject and RequiresContext
|
|
781
|
+
// (e.g., "DataFieldForIntentBasedNavigation::v4Freestyle::Inbound::RequiresContext")
|
|
782
|
+
// to be properly matched when referenced in manifest-based action menus.
|
|
783
|
+
const strategy = DataFieldStrategy_1.dataFieldStrategyContext.getStrategy(lineItemRecord.$Type);
|
|
784
|
+
const stableId = strategy.generateStableId(lineItemRecord);
|
|
785
|
+
// Extract Action property for keys generation (used by addTargetAndKeysOfAction).
|
|
786
|
+
// For IBN actions, this is just the action name (e.g., "Inbound").
|
|
787
|
+
// For bound actions, this may include namespace (e.g., "com.sap.Action/MyAction").
|
|
657
788
|
const actionId = typeof lineItemRecord.Action === 'string' ? lineItemRecord.Action : lineItemRecord.Action['path'];
|
|
658
|
-
|
|
659
|
-
|
|
789
|
+
// Remove type prefix from stable ID for use in $ref generation.
|
|
790
|
+
// This ensures getUniqueFacetDefinitionLink can properly detect duplicates based on full action identity,
|
|
791
|
+
// not just the Action property. For example, two IBN actions with different SemanticObjects but same Action
|
|
792
|
+
// should be treated as different actions, not duplicates.
|
|
793
|
+
const stableIdWithoutPrefix = stableId.split('::').slice(1).join('::');
|
|
794
|
+
// Create action definition with full stable ID as property key.
|
|
795
|
+
// This allows manifest-based menus to correctly reference actions by their complete identity.
|
|
796
|
+
const actionDefinition = (actionsDefinition.properties[stableId] = {
|
|
660
797
|
description
|
|
661
798
|
});
|
|
662
799
|
if (createRef) {
|
|
663
|
-
actionDefinition.$ref = (0, common_1.getUniqueFacetDefinitionLink)(actionDefinitionName, (0, common_1.prepareRef)(
|
|
800
|
+
actionDefinition.$ref = (0, common_1.getUniqueFacetDefinitionLink)(actionDefinitionName, (0, common_1.prepareRef)(stableIdWithoutPrefix), data.appSchema, lineItemPath);
|
|
664
801
|
}
|
|
665
802
|
else {
|
|
666
803
|
actionDefinition.properties = {};
|
|
@@ -966,20 +1103,12 @@ function initializeCreationModeSchema(appSchema, lineItemId, entityType, definit
|
|
|
966
1103
|
*/
|
|
967
1104
|
function addOneOfForCreationFields(appSchema, entityType, definitionName, lineItemId) {
|
|
968
1105
|
const creationModeDefinitionName = initializeCreationModeSchema(appSchema, lineItemId, entityType, definitionName);
|
|
969
|
-
//
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
// replace generic creation mode definition with specific one
|
|
976
|
-
// I don't check that $ref contains the definition name, the replacement should not work for other definitions
|
|
977
|
-
const updatedRef = $ref.replace(definitionName, creationModeDefinitionName);
|
|
978
|
-
return { ...definition, $ref: updatedRef };
|
|
979
|
-
});
|
|
980
|
-
appSchema.definitions[`${type}<${lineItemId}>`].properties.creationMode.anyOf = updatedCreationModeAnyOf;
|
|
981
|
-
}
|
|
982
|
-
});
|
|
1106
|
+
// Replace the generic creationMode definition reference with the facet-specific one
|
|
1107
|
+
const tableDefinition = appSchema.definitions[`${ux_specification_types_1.DefinitionName.ObjectPageTable}<${lineItemId}>`];
|
|
1108
|
+
const creationModeProperty = tableDefinition?.properties?.creationMode;
|
|
1109
|
+
if (creationModeProperty?.$ref) {
|
|
1110
|
+
creationModeProperty.$ref = creationModeProperty.$ref.replace(definitionName, creationModeDefinitionName);
|
|
1111
|
+
}
|
|
983
1112
|
}
|
|
984
1113
|
/**
|
|
985
1114
|
* Find the relevant V4 page under the routing targets of manifest,json.
|
|
@@ -1156,7 +1285,7 @@ function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, custom
|
|
|
1156
1285
|
function addActionsToArray(params) {
|
|
1157
1286
|
const { extensions, initialActionDetailsList, customActionDefinitionName, logger } = params;
|
|
1158
1287
|
// Add custom actions
|
|
1159
|
-
let actionDetailsList = addExtensionToArray(extensions, initialActionDetailsList, customActionDefinitionName, [ux_specification_types_1.TemplatePropertyName.Press, ux_specification_types_1.TemplatePropertyName.Menu], logger);
|
|
1288
|
+
let actionDetailsList = addExtensionToArray(extensions, initialActionDetailsList, customActionDefinitionName, [ux_specification_types_1.TemplatePropertyName.Press, ux_specification_types_1.TemplatePropertyName.Menu], logger, false, params.appSchema);
|
|
1160
1289
|
const processActionMenusParams = {
|
|
1161
1290
|
...params,
|
|
1162
1291
|
initialActionDetailsList: actionDetailsList
|
|
@@ -1216,19 +1345,31 @@ function getMenuEntryDefinitionLink($ref, actionMenuDefinitionName, appSchema) {
|
|
|
1216
1345
|
menuEntryDefinition[originalDefinitionKey] = originalDefinition[originalDefinitionKey];
|
|
1217
1346
|
}
|
|
1218
1347
|
}
|
|
1219
|
-
// some properties doesn't make sense for menu entries
|
|
1220
|
-
|
|
1221
|
-
|
|
1348
|
+
// some properties doesn't make sense for menu entries - hide them instead of deleting
|
|
1349
|
+
// NOTE: This is a necessary trade-off. When moving IBN actions in and out of menus,
|
|
1350
|
+
// we keep these properties visible in the manifest but hidden in the UI.
|
|
1351
|
+
// Unfortunately, this is required - otherwise, when renaming actions, we end up with
|
|
1352
|
+
// orphaned entries in the manifest.
|
|
1353
|
+
if (menuEntryDefinition.properties[ux_specification_types_1.PropertyName.position]) {
|
|
1354
|
+
menuEntryDefinition.properties[ux_specification_types_1.PropertyName.position][ux_specification_types_1.SchemaTag.hidden] = true;
|
|
1355
|
+
}
|
|
1356
|
+
if (menuEntryDefinition.properties[ux_specification_types_1.PropertyName.overflowGroup]) {
|
|
1357
|
+
menuEntryDefinition.properties[ux_specification_types_1.PropertyName.overflowGroup][ux_specification_types_1.SchemaTag.hidden] = true;
|
|
1358
|
+
}
|
|
1359
|
+
if (menuEntryDefinition.properties[ux_specification_types_1.PropertyName.priority]) {
|
|
1360
|
+
menuEntryDefinition.properties[ux_specification_types_1.PropertyName.priority][ux_specification_types_1.SchemaTag.hidden] = true;
|
|
1361
|
+
}
|
|
1222
1362
|
}
|
|
1223
1363
|
return menuEntryDefinitionLink;
|
|
1224
1364
|
}
|
|
1225
1365
|
/**
|
|
1226
|
-
* Determines the appropriate action
|
|
1366
|
+
* Determines the appropriate action definition names based on a custom action definition name.
|
|
1367
|
+
* Returns menu definition names and the action name for menu entries.
|
|
1227
1368
|
*
|
|
1228
1369
|
* @param {string} customActionDefinitionName - The custom action definition name to be parsed and matched.
|
|
1229
|
-
* @returns {ActionMenuDefinitionName} The corresponding action
|
|
1370
|
+
* @returns {ActionMenuDefinitionName} The corresponding action definition names, or a default value if not found.
|
|
1230
1371
|
*/
|
|
1231
|
-
function
|
|
1372
|
+
function determineActionDefinitionNames(customActionDefinitionName) {
|
|
1232
1373
|
const { baseDefinitionName } = parseDefinitionName(customActionDefinitionName);
|
|
1233
1374
|
return actionMenuDefinitionNameMap.get(baseDefinitionName) ?? LR_ACTION_MENU_DEFINITION;
|
|
1234
1375
|
}
|
|
@@ -1254,7 +1395,7 @@ function parseDefinitionName(definitionName = '') {
|
|
|
1254
1395
|
* Updates the custom menu's default action to include a list of valid options based on the provided menu schema.
|
|
1255
1396
|
*
|
|
1256
1397
|
* @param {Definition} customMenuDefinition - The definition object for the custom menu, where the default action will be updated.
|
|
1257
|
-
* @param {Record<string, SchemaDefinition>} [menu
|
|
1398
|
+
* @param {Record<string, SchemaDefinition>} [menu] - A mapping of menu items to their schema definitions, used to generate valid options for the default action.
|
|
1258
1399
|
*/
|
|
1259
1400
|
function setCustomMenuDefaultAction(customMenuDefinition, menu = {}) {
|
|
1260
1401
|
if (customMenuDefinition.properties[ux_specification_types_1.PropertyName.defaultAction]) {
|
|
@@ -1294,7 +1435,7 @@ function processActionMenu(params, extension, actionDefinition, initialDetailsLi
|
|
|
1294
1435
|
}
|
|
1295
1436
|
const { customActionDefinitionName, appSchema, lineItemId } = params;
|
|
1296
1437
|
const detailsList = [...initialDetailsList];
|
|
1297
|
-
const { actionMenuDefinitionName, actionMenuActionsDefinitionName } =
|
|
1438
|
+
const { actionMenuDefinitionName, actionMenuActionsDefinitionName } = determineActionDefinitionNames(customActionDefinitionName);
|
|
1298
1439
|
// Prepare submenu entries to be processed
|
|
1299
1440
|
const menu = extension[ux_specification_types_1.TemplatePropertyName.Menu] ?? [];
|
|
1300
1441
|
const properties = {};
|
|
@@ -1627,8 +1768,8 @@ function importManifestBasedActionMenuSettingsOfReference(importActionParams, de
|
|
|
1627
1768
|
/**
|
|
1628
1769
|
* Determines the strategy type for action settings based on the provided data type and action type.
|
|
1629
1770
|
*
|
|
1630
|
-
* @param {string} [dataType
|
|
1631
|
-
* @param {string} [actionType
|
|
1771
|
+
* @param {string} [dataType] - The data type associated with the action settings. Defaults to an empty string.
|
|
1772
|
+
* @param {string} [actionType] - The action type within the context of the action settings. Defaults to an empty string.
|
|
1632
1773
|
* @returns {DataFieldStrategyTypes} The corresponding strategy type for the given data type and action type.
|
|
1633
1774
|
*/
|
|
1634
1775
|
function determineActionStrategyType(dataType = '', actionType = '') {
|
|
@@ -1712,6 +1853,63 @@ function addCustomFieldDefinition(appSchema, v4Page, fieldGroupInManifest, logge
|
|
|
1712
1853
|
function addManifestPathsToProperties(appSchema, definitionName, definition, pathParams, handleRelative = false) {
|
|
1713
1854
|
(0, utils_1.addManifestPathsToProperties)([v4controls, pages], appSchema, definitionName, definition, pathParams, undefined, handleRelative);
|
|
1714
1855
|
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Determines whether an entity set or navigation target is insertable based on its annotations.
|
|
1858
|
+
*
|
|
1859
|
+
* When navigationPath is provided:
|
|
1860
|
+
* 1. Checks NavigationRestrictions.RestrictedProperties on the source EntitySet
|
|
1861
|
+
* 2. Resolves the target EntitySet via navigationPropertyBinding
|
|
1862
|
+
* 3. Checks InsertRestrictions on the target EntitySet
|
|
1863
|
+
* 4. Both must allow insertion for the function to return true
|
|
1864
|
+
*
|
|
1865
|
+
* When navigationPath is not provided:
|
|
1866
|
+
* 1. Checks InsertRestrictions on the given EntitySet
|
|
1867
|
+
*
|
|
1868
|
+
* For Path-based (dynamic) Insertable values, always returns true (shows creationMode).
|
|
1869
|
+
*
|
|
1870
|
+
* @param entitySet - The source entity set (where navigation starts from, or the entity set being checked)
|
|
1871
|
+
* @param navigationPath - Optional navigation property path (e.g., "_Booking", "to_Items")
|
|
1872
|
+
* @returns A boolean indicating whether insertion is allowed. Returns true if the insertability is Path-based (dynamic) or undefined.
|
|
1873
|
+
*/
|
|
1874
|
+
function getInsertableForEntitySet(entitySet, navigationPath) {
|
|
1875
|
+
// Check NavigationRestrictions if navigation path provided
|
|
1876
|
+
// Default: allow if not specified (Path-based values are also treated as true)
|
|
1877
|
+
let navigationInsertable = true;
|
|
1878
|
+
if (navigationPath) {
|
|
1879
|
+
const navRestrictions = entitySet?.annotations?.Capabilities?.NavigationRestrictions;
|
|
1880
|
+
if (navRestrictions?.RestrictedProperties) {
|
|
1881
|
+
const restriction = navRestrictions.RestrictedProperties.find((prop) => prop.NavigationProperty?.value === navigationPath);
|
|
1882
|
+
if (restriction?.InsertRestrictions?.Insertable !== undefined) {
|
|
1883
|
+
const navInsertable = restriction.InsertRestrictions.Insertable;
|
|
1884
|
+
if (typeof navInsertable === 'boolean') {
|
|
1885
|
+
navigationInsertable = navInsertable;
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
// Resolve target EntitySet via navigationPropertyBinding
|
|
1890
|
+
const targetEntitySet = entitySet?.navigationPropertyBinding?.[navigationPath];
|
|
1891
|
+
if (targetEntitySet && '_type' in targetEntitySet && targetEntitySet._type === 'EntitySet') {
|
|
1892
|
+
// Default: allow if not specified (Path-based values are also treated as true)
|
|
1893
|
+
let targetEntitySetInsertable = true;
|
|
1894
|
+
const targetRestriction = targetEntitySet.annotations?.Capabilities?.InsertRestrictions?.Insertable;
|
|
1895
|
+
if (typeof targetRestriction === 'boolean') {
|
|
1896
|
+
targetEntitySetInsertable = targetRestriction;
|
|
1897
|
+
}
|
|
1898
|
+
// Both Navigation and Target EntitySet must allow insertion
|
|
1899
|
+
return navigationInsertable && targetEntitySetInsertable;
|
|
1900
|
+
}
|
|
1901
|
+
// If no targetEntitySet found, only check navigation restrictions
|
|
1902
|
+
return navigationInsertable;
|
|
1903
|
+
}
|
|
1904
|
+
// No navigation path: check EntitySet-level InsertRestrictions
|
|
1905
|
+
// Default: allow if not specified (Path-based values are also treated as true)
|
|
1906
|
+
let entitySetInsertable = true;
|
|
1907
|
+
const entitySetRestriction = entitySet?.annotations?.Capabilities?.InsertRestrictions?.Insertable;
|
|
1908
|
+
if (typeof entitySetRestriction === 'boolean') {
|
|
1909
|
+
entitySetInsertable = entitySetRestriction;
|
|
1910
|
+
}
|
|
1911
|
+
return entitySetInsertable;
|
|
1912
|
+
}
|
|
1715
1913
|
/**
|
|
1716
1914
|
* Returns the manifest path for a given page based on the provided path parameters.
|
|
1717
1915
|
*
|