@sap/ux-specification 1.139.4 → 1.139.6
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 +66 -1
- 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 +251 -254
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +46 -12
- package/dist/schemas/v2/ListReportNewConfig.json +136 -0
- package/dist/schemas/v2/ObjectPageConfig.json +11 -5
- package/dist/schemas/v4/ApplicationV4.json +61 -28
- package/dist/schemas/v4/BuildingBlocksConfig.json +163 -640
- package/dist/schemas/v4/ListReportConfig.json +248 -9
- package/dist/schemas/v4/ObjectPageConfig.json +269 -3
- package/dist/specification/package.json +16 -16
- package/dist/specification/scripts/macros/schema.d.ts +7 -0
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +61 -14
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/macros/types.d.ts +1 -0
- package/dist/specification/scripts/macros/types.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +64 -9
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js +1 -0
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +9 -5
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +10 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +63 -7
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +11 -4
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +32 -20
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +9 -2
- package/dist/specification/src/sync/common/rules.d.ts +1 -0
- package/dist/specification/src/sync/common/rules.d.ts.map +1 -1
- package/dist/specification/src/sync/common/rules.js +38 -13
- package/dist/specification/src/sync/common/rules.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +64 -0
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +149 -15
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/application.d.ts +1 -0
- package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/application.js +18 -0
- package/dist/specification/src/sync/v2/application.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.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 +15 -4
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +6 -12
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
- package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.js +3 -3
- package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +46 -1
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts +1 -2
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +63 -13
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +4 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +8 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js +1 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +3 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts +78 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +454 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +55 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +152 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +3 -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 +3 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +4 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +61 -23
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js +32 -13
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +23 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +67 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +4 -0
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +51 -1
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +3 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +17 -2
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts +3 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.js +20 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +6 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js +27 -4
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js +10 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +7 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +37 -4
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.js +10 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +2 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +10 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +4 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +30 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +7 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +36 -3
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +3 -0
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +40 -23
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +7 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +60 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +14 -4
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +75 -9
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +13 -3
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +392 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +107 -2
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +176 -91
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +1 -0
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +64 -8
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +16 -4
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +100 -26
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/types.d.ts +114 -3
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +8 -0
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/v2/application.d.ts +18 -0
- package/dist/types/src/v2/application.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/application.d.ts +13 -6
- package/dist/types/src/v4/application.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Action.d.ts +16 -0
- package/dist/types/src/v4/controls/Action.d.ts.map +1 -0
- package/dist/types/src/v4/controls/Action.js +11 -0
- package/dist/types/src/v4/controls/Action.js.map +1 -0
- package/dist/types/src/v4/controls/CustomAction.d.ts +2 -1
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/CustomAction.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts +2 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +6 -3
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +6 -3
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +7 -0
- 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/ObjectPageToolBar.d.ts +10 -7
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +14 -1
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.js.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +32 -10
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.js.map +1 -1
- 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/webapp/manifest/ManifestSettings.d.ts +59 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/package.json +16 -16
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.LR_ANALYTICAL_CONFIGURATION_FOR_NON_ANALYTICAL_TABLE = exports.LR_CREATION_MODE_FOR_NON_CREATION_DIALOG_MODE = exports.LR_CREATION_MODE_FOR_NON_TREE_TABLE = exports.LR_CREATION_MODE_FOR_ANALYTICAL_TABLE = void 0;
|
|
6
|
+
exports.LR_POPIN_LAYOUT_FOR_NON_RESPONSIVE_TABLE = exports.LR_ANALYTICAL_CONFIGURATION_FOR_NON_ANALYTICAL_TABLE = exports.LR_CREATION_MODE_FOR_NON_CREATION_DIALOG_MODE = exports.LR_CREATION_MODE_FOR_NON_TREE_TABLE = exports.LR_CREATION_MODE_FOR_ANALYTICAL_TABLE = void 0;
|
|
7
7
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
8
8
|
const v4_1 = require("@sap/ux-specification-types/src/v4");
|
|
9
9
|
const generate_1 = require("./generate");
|
|
@@ -33,8 +33,8 @@ exports.LR_CREATION_MODE_FOR_NON_TREE_TABLE = {
|
|
|
33
33
|
return getTableType(context) !== v4_1.TableTypeV4.TreeTable;
|
|
34
34
|
},
|
|
35
35
|
process: (context) => {
|
|
36
|
-
processNotAllowedProperty(context, '
|
|
37
|
-
processNotAllowedProperty(context, '
|
|
36
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_NON_TREE_TABLE_TYPE', ux_specification_types_1.PropertyName.createInPlace, ux_specification_types_1.PropertyName.createInPlace, true);
|
|
37
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_NON_TREE_TABLE_TYPE', ux_specification_types_1.PropertyName.isCreateEnabled, ux_specification_types_1.PropertyName.isCreateEnabled, true);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
exports.LR_CREATION_MODE_FOR_NON_CREATION_DIALOG_MODE = {
|
|
@@ -65,6 +65,24 @@ exports.LR_ANALYTICAL_CONFIGURATION_FOR_NON_ANALYTICAL_TABLE = {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
+
exports.LR_POPIN_LAYOUT_FOR_NON_RESPONSIVE_TABLE = {
|
|
69
|
+
name: ux_specification_types_1.RuleName.LRPopinLayoutForNonResponsiveTable,
|
|
70
|
+
match: (context) => {
|
|
71
|
+
return getTableType(context) !== v4_1.TableTypeV4.ResponsiveTable;
|
|
72
|
+
},
|
|
73
|
+
process: (context) => {
|
|
74
|
+
const { schema, parameters: { tableDefinition } } = context;
|
|
75
|
+
const tableSettings = getTableSettings(context);
|
|
76
|
+
if (tableSettings?.popinLayout) {
|
|
77
|
+
if (schema) {
|
|
78
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_TABLE_TYPE', ux_specification_types_1.PropertyName.popinLayout, ux_specification_types_1.PropertyName.popinLayout, true);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
delete tableDefinition.properties['popinLayout'];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
68
86
|
/**
|
|
69
87
|
* Retrieves the table settings from the provided context.
|
|
70
88
|
*
|
|
@@ -102,20 +120,27 @@ function processNotAllowedProperty(context, message, propertyName, propertyToDis
|
|
|
102
120
|
const { schema } = context;
|
|
103
121
|
const tableSettings = getTableSettings(context);
|
|
104
122
|
if (tableSettings?.creationMode?.[propertyName] !== undefined ||
|
|
105
|
-
tableSettings?.analyticalConfiguration?.[propertyName] !== undefined
|
|
106
|
-
|
|
123
|
+
tableSettings?.analyticalConfiguration?.[propertyName] !== undefined ||
|
|
124
|
+
(propertyName === ux_specification_types_1.PropertyName.popinLayout && tableSettings?.[propertyName] !== undefined)) {
|
|
125
|
+
const def = (schema.properties && Object.keys(schema.properties).length > 0 ? schema?.properties?.[propertyName] : schema);
|
|
107
126
|
if (def) {
|
|
108
127
|
if (usePropertyName) {
|
|
109
|
-
(0, generate_1.addMessageToSchema)(def,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
128
|
+
(0, generate_1.addMessageToSchema)(def, {
|
|
129
|
+
text: i18next_1.default.t(message, {
|
|
130
|
+
propertyName: propertyToDisplay ?? propertyName,
|
|
131
|
+
tableType: getTableType(context)
|
|
132
|
+
}),
|
|
133
|
+
deletable: true
|
|
134
|
+
});
|
|
113
135
|
}
|
|
114
136
|
else {
|
|
115
|
-
(0, generate_1.addMessageToSchema)(def,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
137
|
+
(0, generate_1.addMessageToSchema)(def, {
|
|
138
|
+
text: i18next_1.default.t(message, {
|
|
139
|
+
entityName: propertyToDisplay ?? propertyName,
|
|
140
|
+
tableType: getTableType(context)
|
|
141
|
+
}),
|
|
142
|
+
deletable: true
|
|
143
|
+
});
|
|
119
144
|
}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AAE,iBAAiB,IAAI,YAAY;wBAC7C,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC;qBACnC,CAAC;oBACF,SAAS,EAAE,IAAI;iBAClB,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;AACL,CAAC"}
|
|
@@ -468,4 +468,68 @@ export declare function getRefType(element: Definition): string | undefined;
|
|
|
468
468
|
* @returns Returns true if the template names match directly or their page types match; otherwise, false.
|
|
469
469
|
*/
|
|
470
470
|
export declare function compareTemplateNames(templateName1: string, templateName2: any): boolean;
|
|
471
|
+
/**
|
|
472
|
+
* Converts a slash-delimited sync rule path into a JSONPath string.
|
|
473
|
+
*
|
|
474
|
+
* Each path segment is appended to the JSONPath using:
|
|
475
|
+
* - dot notation for valid JavaScript identifiers
|
|
476
|
+
* - bracket notation for segments containing special characters
|
|
477
|
+
*
|
|
478
|
+
* Optionally replaces an encoded annotation segment with its decoded form
|
|
479
|
+
* (for example, converting `::` back to `/`).
|
|
480
|
+
*
|
|
481
|
+
* @param syncRulePath - Slash-delimited path string (e.g. "spec/template/metadata/annotations")
|
|
482
|
+
* @param targetAnnotation - Decoded annotation value to substitute into the path
|
|
483
|
+
* @param targetAnnotationEncoded - Encoded annotation value to match and replace in the path
|
|
484
|
+
* @returns A JSONPath string representing the provided sync rule path
|
|
485
|
+
*/
|
|
486
|
+
export declare function convertSyncRulePathToJsonPath(syncRulePath: string, targetAnnotation?: string, targetAnnotationEncoded?: string): string;
|
|
487
|
+
/**
|
|
488
|
+
* Appends a single segment to an existing JSONPath string.
|
|
489
|
+
*
|
|
490
|
+
* @param basePath - The existing JSONPath string (e.g., '$.data')
|
|
491
|
+
* @param segment - The segment to append
|
|
492
|
+
* @param prevSegment - The previous resolved segment, used to detect array placeholders
|
|
493
|
+
* @returns A new JSONPath string with the segment appended
|
|
494
|
+
*/
|
|
495
|
+
export declare function appendJsonPathSegment(basePath: string, segment: string, prevSegment?: string): string;
|
|
496
|
+
export interface ManifestPathParams {
|
|
497
|
+
pageName: string | string[];
|
|
498
|
+
manifest: Manifest;
|
|
499
|
+
pathsParts?: unknown[];
|
|
500
|
+
targetAnnotation?: string;
|
|
501
|
+
targetAnnotationEncoded?: string;
|
|
502
|
+
sectionId?: string;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Internal helper interface used while traversing a schema to resolve `manifestPath`.
|
|
506
|
+
*/
|
|
507
|
+
interface ManifestPropertyResolution {
|
|
508
|
+
/**
|
|
509
|
+
* Name of the parent property in the schema.
|
|
510
|
+
*/
|
|
511
|
+
name: string;
|
|
512
|
+
/**
|
|
513
|
+
* Manifest path derived from the sync rule.
|
|
514
|
+
*/
|
|
515
|
+
rulePath?: string;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
519
|
+
*
|
|
520
|
+
* @param controls - Array of control classes which contains sync rules.
|
|
521
|
+
* @param appSchema - Full schema.
|
|
522
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
523
|
+
* If `undefined`, the function attempts to resolve the definition name from the `$ref` property of the provided definition.
|
|
524
|
+
* @param definition - The definition object containing property schemas.
|
|
525
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
526
|
+
* @param parentProperty - Information about the parent property used when resolving
|
|
527
|
+
* nested or inherited manifest paths (e.g. parent property name and resolved rule path).
|
|
528
|
+
*/
|
|
529
|
+
export declare function addManifestPathsToProperties(controls: Array<{
|
|
530
|
+
[key: string]: {
|
|
531
|
+
prototype: object;
|
|
532
|
+
};
|
|
533
|
+
}>, appSchema: Definition, definitionName: string | undefined, definition: Definition, pathParams: ManifestPathParams, parentProperty?: ManifestPropertyResolution): void;
|
|
534
|
+
export {};
|
|
471
535
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,aAAa,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,aAAa,EAGhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAMH,YAAY,EAIZ,EAAE,EAGF,oBAAoB,EAEpB,YAAY,EACZ,UAAU,EAEV,UAAU,EACV,UAAU,EAGb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACR,SAAS,EACT,sBAAsB,EAEtB,+BAA+B,EAC/B,UAAU,EAEb,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EACR,iBAAiB,EACjB,UAAU,EAEV,YAAY,EACZ,uBAAuB,EAC1B,MAAM,4BAA4B,CAAC;AASpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAG7F,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,eAAO,MAAM,YAAY,UAKxB,CAAC;AACF,eAAO,MAAM,OAAO,UAAsC,CAAC;AAG3D,eAAO,MAAM,wBAAwB,2BAA2B,CAAC;AACjE,eAAO,MAAM,cAAc,UAAU,CAAC;AAGtC,eAAO,MAAM,aAAa,G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;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AA8CD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CACxC,QAAQ,EAAE,KAAK,CAAC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,EACzD,SAAS,EAAE,UAAU,EACrB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,kBAAkB,EAC9B,cAAc,CAAC,EAAE,0BAA0B,GAC5C,IAAI,CAgDN"}
|
|
@@ -49,12 +49,16 @@ exports.removeNamespaces = removeNamespaces;
|
|
|
49
49
|
exports.replaceNamespaces = replaceNamespaces;
|
|
50
50
|
exports.getRefType = getRefType;
|
|
51
51
|
exports.compareTemplateNames = compareTemplateNames;
|
|
52
|
+
exports.convertSyncRulePathToJsonPath = convertSyncRulePathToJsonPath;
|
|
53
|
+
exports.appendJsonPathSegment = appendJsonPathSegment;
|
|
54
|
+
exports.addManifestPathsToProperties = addManifestPathsToProperties;
|
|
52
55
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
53
56
|
const i18next_1 = __importDefault(require("i18next"));
|
|
54
57
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
55
58
|
const annotation_converter_1 = require("@sap-ux/annotation-converter");
|
|
56
59
|
const edmx_parser_1 = require("@sap-ux/edmx-parser");
|
|
57
60
|
const extensionLogger_1 = require("../../extensionLogger");
|
|
61
|
+
const decoration_1 = require("./decoration");
|
|
58
62
|
exports.DEFINITION_LINK_PREFIX = '#/definitions/';
|
|
59
63
|
exports.V4_TEMPLATES = [
|
|
60
64
|
ux_specification_types_1.v4.FE_TEMPLATE_V4_LIST_REPORT,
|
|
@@ -948,7 +952,7 @@ function getODataVersionFromManifest(manifest) {
|
|
|
948
952
|
return ux_specification_types_1.OdataVersion.v2;
|
|
949
953
|
}
|
|
950
954
|
const dataSource = manifest[ux_specification_types_1.ManifestSection.app].dataSources?.[mainService];
|
|
951
|
-
return dataSource?.settings?.odataVersion
|
|
955
|
+
return dataSource?.settings?.odataVersion?.startsWith('4') ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
|
|
952
956
|
}
|
|
953
957
|
/**
|
|
954
958
|
* Determines the template type of a V2 app.
|
|
@@ -1484,16 +1488,7 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
|
|
|
1484
1488
|
return definitionArray;
|
|
1485
1489
|
}
|
|
1486
1490
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
* @param {UIAnnotationTypes} type - The annotation type which includes the vocabulary prefix to be removed.
|
|
1490
|
-
* @returns {string} The processed annotation type with the vocabulary prefix removed.
|
|
1491
|
-
*/
|
|
1492
|
-
function extractUIAnnotationType(type) {
|
|
1493
|
-
return type.replace(ux_specification_types_1.UIVOCABULARYDOT, '');
|
|
1494
|
-
}
|
|
1495
|
-
/**
|
|
1496
|
-
* Determines the next definition to be handled, based on the definition array.
|
|
1491
|
+
* Determines the next definitions to be handled, based on the definition array.
|
|
1497
1492
|
* It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule.
|
|
1498
1493
|
*
|
|
1499
1494
|
* @param definitionArray - Array of definitions, as determined by fillArrayFromNextDefinition
|
|
@@ -1517,10 +1512,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1517
1512
|
nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
|
|
1518
1513
|
// Action groups contain action definitions as properties, and these definitions require processing.
|
|
1519
1514
|
// This is why we don't use the ref in the action group definition.
|
|
1520
|
-
if (
|
|
1521
|
-
extractUIAnnotationType("com.sap.vocabularies.UI.v1.DataFieldForActionGroup" /* UIAnnotationTypes.DataFieldForActionGroup */) &&
|
|
1522
|
-
nextDefinition?.targetDefinition?.['$ref']) ||
|
|
1523
|
-
nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
1515
|
+
if (nextDefinition?.targetDefinition?.['$ref'] || nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
1524
1516
|
nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
|
|
1525
1517
|
return nextDefinition;
|
|
1526
1518
|
}
|
|
@@ -1765,4 +1757,146 @@ function compareTemplateNames(templateName1, templateName2) {
|
|
|
1765
1757
|
const pageType1 = convertTemplateNameToPageTypeV4(templateName1);
|
|
1766
1758
|
return pageType1 ? pageType1 === convertTemplateNameToPageTypeV4(templateName2) : false;
|
|
1767
1759
|
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Converts a slash-delimited sync rule path into a JSONPath string.
|
|
1762
|
+
*
|
|
1763
|
+
* Each path segment is appended to the JSONPath using:
|
|
1764
|
+
* - dot notation for valid JavaScript identifiers
|
|
1765
|
+
* - bracket notation for segments containing special characters
|
|
1766
|
+
*
|
|
1767
|
+
* Optionally replaces an encoded annotation segment with its decoded form
|
|
1768
|
+
* (for example, converting `::` back to `/`).
|
|
1769
|
+
*
|
|
1770
|
+
* @param syncRulePath - Slash-delimited path string (e.g. "spec/template/metadata/annotations")
|
|
1771
|
+
* @param targetAnnotation - Decoded annotation value to substitute into the path
|
|
1772
|
+
* @param targetAnnotationEncoded - Encoded annotation value to match and replace in the path
|
|
1773
|
+
* @returns A JSONPath string representing the provided sync rule path
|
|
1774
|
+
*/
|
|
1775
|
+
function convertSyncRulePathToJsonPath(syncRulePath, targetAnnotation, targetAnnotationEncoded) {
|
|
1776
|
+
const pathParts = syncRulePath.split('/');
|
|
1777
|
+
let jsonPath = '$';
|
|
1778
|
+
let prevSegment = undefined;
|
|
1779
|
+
for (const segment of pathParts) {
|
|
1780
|
+
// Replace encoded annotation(like '::' -> '/')
|
|
1781
|
+
const resolvedSegment = segment === targetAnnotationEncoded ? targetAnnotation : segment;
|
|
1782
|
+
jsonPath = appendJsonPathSegment(jsonPath, resolvedSegment, prevSegment);
|
|
1783
|
+
prevSegment = resolvedSegment;
|
|
1784
|
+
}
|
|
1785
|
+
return jsonPath;
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Appends a single segment to an existing JSONPath string.
|
|
1789
|
+
*
|
|
1790
|
+
* @param basePath - The existing JSONPath string (e.g., '$.data')
|
|
1791
|
+
* @param segment - The segment to append
|
|
1792
|
+
* @param prevSegment - The previous resolved segment, used to detect array placeholders
|
|
1793
|
+
* @returns A new JSONPath string with the segment appended
|
|
1794
|
+
*/
|
|
1795
|
+
function appendJsonPathSegment(basePath, segment, prevSegment) {
|
|
1796
|
+
// Array placeholder segments like "[]"
|
|
1797
|
+
if (segment === '[]') {
|
|
1798
|
+
// Wait for next segment
|
|
1799
|
+
return basePath;
|
|
1800
|
+
}
|
|
1801
|
+
if (prevSegment === '[]') {
|
|
1802
|
+
//Numeric array index
|
|
1803
|
+
const index = Number(segment);
|
|
1804
|
+
return !Number.isNaN(index) && Number.isInteger(index) ? `${basePath}[${index}]` : `${basePath}[:]`;
|
|
1805
|
+
}
|
|
1806
|
+
// Use dot notation only if the segment is a valid JS identifier
|
|
1807
|
+
if (/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(segment)) {
|
|
1808
|
+
return `${basePath}.${segment}`;
|
|
1809
|
+
}
|
|
1810
|
+
// Otherwise, use bracket notation with quotes
|
|
1811
|
+
const escapedSegment = segment.includes('"') ? segment.replaceAll('"', '\\"') : segment;
|
|
1812
|
+
return `${basePath}["${escapedSegment}"]`;
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Finds the control class object for a given definition name from an array of control objects.
|
|
1816
|
+
*
|
|
1817
|
+
* @param controls - Array of control objects, each mapping definition names to class objects.
|
|
1818
|
+
* @param definitionName - The name of the definition/class to look for.
|
|
1819
|
+
* @returns The control class object, or undefined if not found.
|
|
1820
|
+
*/
|
|
1821
|
+
function findClassControl(controls, definitionName) {
|
|
1822
|
+
if (definitionName) {
|
|
1823
|
+
for (const control of controls) {
|
|
1824
|
+
if (control[definitionName]) {
|
|
1825
|
+
return control[definitionName];
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Resolves the manifest rule path for a property, handling parent property chaining.
|
|
1832
|
+
*
|
|
1833
|
+
* @param rule - The sync rule object containing the manifest path function.
|
|
1834
|
+
* @param pathParams - Parameters for manifest path resolution.
|
|
1835
|
+
* @param parentProperty - Optional parent property resolution info.
|
|
1836
|
+
* @returns The resolved manifest rule path as a string.
|
|
1837
|
+
*/
|
|
1838
|
+
function resolveManifestRulePath(rule, pathParams, parentProperty) {
|
|
1839
|
+
let rulePath = rule?.manifest?.path(Array.isArray(pathParams.pageName) ? pathParams.pageName : [pathParams.pageName], pathParams.manifest, ...(pathParams.pathsParts ?? []));
|
|
1840
|
+
if (rulePath === parentProperty?.rulePath) {
|
|
1841
|
+
rulePath = `${rulePath}/${parentProperty.name}`;
|
|
1842
|
+
}
|
|
1843
|
+
return rulePath;
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
1847
|
+
*
|
|
1848
|
+
* @param controls - Array of control classes which contains sync rules.
|
|
1849
|
+
* @param appSchema - Full schema.
|
|
1850
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
1851
|
+
* If `undefined`, the function attempts to resolve the definition name from the `$ref` property of the provided definition.
|
|
1852
|
+
* @param definition - The definition object containing property schemas.
|
|
1853
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
1854
|
+
* @param parentProperty - Information about the parent property used when resolving
|
|
1855
|
+
* nested or inherited manifest paths (e.g. parent property name and resolved rule path).
|
|
1856
|
+
*/
|
|
1857
|
+
function addManifestPathsToProperties(controls, appSchema, definitionName, definition, pathParams, parentProperty) {
|
|
1858
|
+
// If `definitionName` is undefined, attempt to resolve it from the definition's `$ref`
|
|
1859
|
+
if (definitionName === undefined && definition.$ref) {
|
|
1860
|
+
const innerDefinitionKey = getDefinitionKey(definition.$ref);
|
|
1861
|
+
const innerDefinition = appSchema.definitions[innerDefinitionKey];
|
|
1862
|
+
if (innerDefinition && (!innerDefinition.isViewNode || !parentProperty)) {
|
|
1863
|
+
definition = innerDefinition;
|
|
1864
|
+
definitionName = innerDefinitionKey;
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
// Resolve root definition name in case if reference has syntax like `definitionName<annotation>`
|
|
1868
|
+
if (definitionName?.includes('<')) {
|
|
1869
|
+
definitionName = definitionName.split('<')[0];
|
|
1870
|
+
}
|
|
1871
|
+
if (!definition.properties && definition.$ref) {
|
|
1872
|
+
const innerDefinition = getDefinitionKey(definition.$ref);
|
|
1873
|
+
definition = appSchema.definitions?.[innerDefinition] ?? definition;
|
|
1874
|
+
}
|
|
1875
|
+
const classControl = findClassControl(controls, definitionName);
|
|
1876
|
+
if (classControl) {
|
|
1877
|
+
for (const property in definition.properties ?? {}) {
|
|
1878
|
+
const rule = (0, decoration_1.getReflectMetadata)(classControl.prototype, property);
|
|
1879
|
+
const propertySchema = definition.properties[property];
|
|
1880
|
+
const propertyPath = {
|
|
1881
|
+
name: property
|
|
1882
|
+
};
|
|
1883
|
+
if (rule?.manifest?.path) {
|
|
1884
|
+
const rulePath = resolveManifestRulePath(rule, pathParams, parentProperty);
|
|
1885
|
+
const manifestPath = `${rulePath}/${property}`;
|
|
1886
|
+
propertySchema.manifestPath = convertSyncRulePathToJsonPath(manifestPath, pathParams.targetAnnotation, pathParams.targetAnnotationEncoded);
|
|
1887
|
+
propertyPath.rulePath = rulePath;
|
|
1888
|
+
}
|
|
1889
|
+
// Recursively apply manifest paths to inner properties
|
|
1890
|
+
addManifestPathsToProperties(controls, appSchema, undefined, propertySchema, pathParams, propertyPath);
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
// Recursively apply manifest paths to properties inside `anyOf` variants
|
|
1894
|
+
if (definition.anyOf) {
|
|
1895
|
+
for (const schemaVariant of definition.anyOf) {
|
|
1896
|
+
if (typeof schemaVariant === 'object') {
|
|
1897
|
+
addManifestPathsToProperties(controls, appSchema, undefined, schemaVariant, pathParams, parentProperty);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1768
1902
|
//# sourceMappingURL=utils.js.map
|