@sap/ux-specification 1.90.15 → 1.90.19
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 +99 -11
- package/dist/documentation/runDocu-min.js +1 -1
- package/dist/documentation/styleDocu.css +4 -5
- package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/documentation/v4/v4-AnalyticalListPage.html +1 -1
- package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
- package/dist/documentation/v4/v4-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +148 -40
- package/dist/schemas/v2/ListReportConfig.json +162 -32
- package/dist/schemas/v2/ObjectPageConfig.json +252 -56
- package/dist/schemas/v2/OverviewPageConfig.json +298 -196
- package/dist/schemas/v4/AnalyticalListPageConfig.json +46 -70
- package/dist/schemas/v4/ListReportConfig.json +46 -70
- package/dist/schemas/v4/ObjectPageConfig.json +49 -76
- package/dist/scripts/extractDocu.js +18 -8
- package/dist/scripts/extractDocu.js.map +1 -1
- package/dist/scripts/runDocu.js +105 -89
- package/dist/scripts/runDocu.js.map +1 -1
- package/dist/scripts/to-json-schema.js +31 -37
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/specification/v2/index-min.js +1 -1
- package/dist/specification/v4/index-min.js +1 -1
- package/dist/src/api.js +9 -9
- package/dist/src/api.js.map +1 -1
- package/dist/src/apiTypes.d.ts +5 -2
- package/dist/src/specification/schemaAccess.js +1 -3
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/specification/v2/controls/Action.d.ts +71 -0
- package/dist/src/specification/v2/controls/{FormAction.js → Action.js} +1 -1
- package/dist/src/specification/v2/controls/Action.js.map +1 -0
- package/dist/src/specification/v2/controls/Card.d.ts +20 -72
- package/dist/src/specification/v2/controls/Card.js.map +1 -1
- package/dist/src/specification/v2/controls/FilterBar.d.ts +48 -6
- package/dist/src/specification/v2/controls/FilterBar.js +24 -0
- package/dist/src/specification/v2/controls/FilterBar.js.map +1 -1
- package/dist/src/specification/v2/controls/Footer.d.ts +20 -0
- package/dist/src/specification/v2/controls/{ObjectPageFooter.js → Footer.js} +1 -1
- package/dist/src/specification/v2/controls/Footer.js.map +1 -0
- package/dist/src/specification/v2/controls/ObjectPageForm.d.ts +1 -2
- package/dist/src/specification/v2/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +4 -0
- package/dist/src/specification/v2/controls/ObjectPageToolBar.d.ts +1 -5
- package/dist/src/specification/v2/controls/Table.d.ts +13 -10
- package/dist/src/specification/v2/controls/Table.js.map +1 -1
- package/dist/src/specification/v2/controls/ToolBar.d.ts +1 -8
- package/dist/src/specification/v2/controls/index.d.ts +8 -10
- package/dist/src/specification/v2/controls/index.js +2 -2
- package/dist/src/specification/v2/controls/index.js.map +1 -1
- package/dist/src/specification/v2/pages/AnalyticalListPageConfig.d.ts +2 -1
- package/dist/src/specification/v2/pages/ListReportConfig.d.ts +3 -2
- package/dist/src/specification/v4/controls/ObjectPageFooter.d.ts +2 -2
- package/dist/src/specification/v4/controls/ObjectPageSection.d.ts +7 -7
- package/dist/src/specification/v4/controls/ObjectPageTable.d.ts +5 -6
- package/dist/src/specification/v4/controls/Table.d.ts +3 -7
- package/dist/src/specification/v4/webapp/manifest/ManifestSettings.d.ts +51 -13
- package/dist/src/specification/v4/webapp/manifest/ManifestSettings.js +6 -0
- package/dist/src/specification/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.d.ts +2 -1
- package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.js.map +1 -1
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +11 -1
- package/dist/src/sync/common/decoration/control.js +29 -3
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/factory.js +2 -4
- package/dist/src/sync/common/decoration/factory.js.map +1 -1
- package/dist/src/sync/common/generate/index.d.ts +1 -0
- package/dist/src/sync/common/generate/index.js +1 -0
- package/dist/src/sync/common/generate/index.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +8 -0
- package/dist/src/sync/common/generate/objectPage.js +28 -12
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +67 -0
- package/dist/src/sync/common/generate/utils.js +221 -0
- package/dist/src/sync/common/generate/utils.js.map +1 -0
- package/dist/src/sync/common/i18n.json +2 -0
- package/dist/src/sync/common/import/utils.d.ts +8 -1
- package/dist/src/sync/common/import/utils.js +14 -3
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.js +19 -28
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +29 -15
- package/dist/src/sync/common/types.js +25 -1
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +6 -33
- package/dist/src/sync/common/utils.js +25 -131
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.d.ts +29 -0
- package/dist/src/sync/v2/export/controls/Action.js +127 -0
- package/dist/src/sync/v2/export/controls/Action.js.map +1 -0
- package/dist/src/sync/v2/export/controls/Card.d.ts +3 -7
- package/dist/src/sync/v2/export/controls/Card.js +15 -43
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.d.ts +7 -3
- package/dist/src/sync/v2/export/controls/FilterBar.js +36 -22
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js +3 -2
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.js +244 -168
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.d.ts +9 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +62 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +11 -29
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +2 -2
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +4 -4
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +3 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +15 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +9 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +61 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -0
- package/dist/src/sync/v2/export/controls/Table.d.ts +4 -4
- package/dist/src/sync/v2/export/controls/Table.js +16 -21
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.d.ts +18 -2
- package/dist/src/sync/v2/export/controls/TableColumn.js +126 -1
- package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ToolBar.d.ts +4 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js +6 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js.map +1 -0
- package/dist/src/sync/v2/export/controls/index.d.ts +12 -8
- package/dist/src/sync/v2/export/controls/index.js +12 -8
- package/dist/src/sync/v2/export/controls/index.js.map +1 -1
- package/dist/src/sync/v2/export/export.js +134 -111
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +3 -2
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.js +2 -5
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.d.ts +2 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +3 -0
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ListReport.d.ts +3 -2
- package/dist/src/sync/v2/export/pages/ListReport.js +3 -0
- package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts +16 -21
- package/dist/src/sync/v2/export/view-controller-generator.js +20 -36
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +16 -8
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +8 -0
- package/dist/src/sync/v2/generate/listReport.js +26 -6
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts +1 -6
- package/dist/src/sync/v2/generate/objectPage.js +208 -126
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +16 -12
- package/dist/src/sync/v2/generate/utils.js +235 -98
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +29 -4
- package/dist/src/sync/v2/import/common/index.js +330 -56
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.js +3 -2
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +27 -5
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.d.ts +0 -5
- package/dist/src/sync/v2/import/pages/listReport.js +21 -100
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +443 -303
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts +4 -6
- package/dist/src/sync/v2/import/utils.js +32 -11
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +28 -2
- package/dist/src/sync/v2/types.js +14 -0
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js +5 -1
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTable.js +2 -2
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +4 -7
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js +3 -33
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +1 -1
- package/dist/src/sync/v4/export/controls/TableColumn.d.ts +3 -6
- package/dist/src/sync/v4/export/controls/TableColumn.js +3 -33
- package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBar.d.ts +5 -1
- package/dist/src/sync/v4/export/controls/ToolBar.js +3 -0
- package/dist/src/sync/v4/export/controls/ToolBar.js.map +1 -1
- package/dist/src/sync/v4/export/export.js +36 -25
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/pages/AnalyticalListPage.d.ts +2 -2
- package/dist/src/sync/v4/export/pages/ListReport.d.ts +2 -2
- package/dist/src/sync/v4/export/pages/ObjectPage.d.ts +2 -2
- package/dist/src/sync/v4/export/types.d.ts +4 -0
- package/dist/src/sync/v4/generate/generate.d.ts +4 -2
- package/dist/src/sync/v4/generate/generate.js +15 -6
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts +9 -7
- package/dist/src/sync/v4/generate/listReport.js +93 -22
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +111 -81
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js +2 -2
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/pages/analyticalListPage.d.ts +2 -2
- package/dist/src/sync/v4/import/pages/analyticalListPage.js +0 -1
- package/dist/src/sync/v4/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.d.ts +4 -6
- package/dist/src/sync/v4/import/pages/listReport.js +57 -36
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +2 -2
- package/dist/src/sync/v4/import/pages/objectPage.js +21 -18
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/utils.js +6 -5
- package/dist/src/sync/v4/import/utils.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +15 -2
- package/dist/src/sync/v4/utils/utils.js +65 -26
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/test/unit/utils.test.d.ts +1 -1
- package/package.json +11 -10
- package/dist/src/specification/v2/controls/FormAction.d.ts +0 -27
- package/dist/src/specification/v2/controls/FormAction.js.map +0 -1
- package/dist/src/specification/v2/controls/ObjectPageFooter.d.ts +0 -11
- package/dist/src/specification/v2/controls/ObjectPageFooter.js.map +0 -1
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.d.ts +0 -27
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.js +0 -3
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.js.map +0 -1
- package/dist/test/test-utils/metadataParser.d.ts +0 -19
|
@@ -9,7 +9,20 @@ const common_1 = require("../../common");
|
|
|
9
9
|
const i18next_1 = __importDefault(require("i18next"));
|
|
10
10
|
const i18n_1 = require("../../../i18n/i18n");
|
|
11
11
|
const v2_1 = require("../../../v2");
|
|
12
|
+
const extensionLogger_1 = require("../../../extensionLogger");
|
|
12
13
|
const types_1 = require("../types");
|
|
14
|
+
/**
|
|
15
|
+
* Adds the enum types for QuickVariant and QuickVariantX, based on the entity type annotations
|
|
16
|
+
* @param {EntityType} entityType
|
|
17
|
+
* @param appSchema - app specific JSON schema
|
|
18
|
+
* @param {ConverterOutput} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
|
|
19
|
+
*/
|
|
20
|
+
function addEnumForVariantPaths(entityType, appSchema, oDataServiceAVT) {
|
|
21
|
+
common_1.addEnumForSingleTabVariant(entityType, appSchema, 'QuickVariant');
|
|
22
|
+
common_1.addEnumForMultiTabVariant(oDataServiceAVT, appSchema, 'QuickVariantX');
|
|
23
|
+
common_1.addEnumForVariantEntitySet(oDataServiceAVT, appSchema, 'QuickVariantX');
|
|
24
|
+
}
|
|
25
|
+
exports.addEnumForVariantPaths = addEnumForVariantPaths;
|
|
13
26
|
/**
|
|
14
27
|
* Generates an app specific schema for the FE V2 Listreport from the generic schema.
|
|
15
28
|
* Generic types are replaced by information from the app specific annotations.
|
|
@@ -23,6 +36,9 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
23
36
|
// Initialize i18next
|
|
24
37
|
i18n_1.initI18n();
|
|
25
38
|
const appSchema = JSON.parse(JSON.stringify(genericSchema));
|
|
39
|
+
if (!(generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT)) {
|
|
40
|
+
return appSchema;
|
|
41
|
+
}
|
|
26
42
|
appSchema['properties']['table']['anyOf']['0']['$ref'] = common_1.DEFINITION_LINK_PREFIX + types_1.MULTISELECTTABLE;
|
|
27
43
|
appSchema['properties']['table']['anyOf']['1']['$ref'] = common_1.DEFINITION_LINK_PREFIX + types_1.INLINEDELETETABLE;
|
|
28
44
|
appSchema['properties']['table']['anyOf']['2']['$ref'] = common_1.DEFINITION_LINK_PREFIX + types_1.TREETABLE;
|
|
@@ -41,7 +57,7 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
41
57
|
treeTableDefinition['properties']['columns'] = lrLineItems;
|
|
42
58
|
analyticalTableDefinition['properties']['columns'] = lrLineItems;
|
|
43
59
|
gridTableDefinition['properties']['columns'] = lrLineItems;
|
|
44
|
-
const lrToolBar = common_1.DEFINITION_LINK_PREFIX + common_1.
|
|
60
|
+
const lrToolBar = common_1.DEFINITION_LINK_PREFIX + common_1.DefinitionName.ToolBarLR;
|
|
45
61
|
appSchema['definitions'][types_1.MULTISELECTTABLE] = responsiveTableMultiSelect;
|
|
46
62
|
appSchema['definitions'][types_1.MULTISELECTTABLE].properties.toolBar.$ref = lrToolBar;
|
|
47
63
|
appSchema['definitions'][types_1.INLINEDELETETABLE] = responsiveTableInlineDelete;
|
|
@@ -52,9 +68,9 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
52
68
|
appSchema['definitions'][types_1.ANALYTICALTABLE].properties.toolBar.$ref = lrToolBar;
|
|
53
69
|
appSchema['definitions'][types_1.GRIDTABLE] = gridTableDefinition;
|
|
54
70
|
appSchema['definitions'][types_1.GRIDTABLE].properties.toolBar.$ref = lrToolBar;
|
|
55
|
-
const entityType = generateParameters.serviceAVT.entityTypes.find((et) => et.name === entityTypeName);
|
|
71
|
+
const entityType = generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT.entityTypes.find((et) => et.name === entityTypeName);
|
|
56
72
|
if (!entityType) {
|
|
57
|
-
|
|
73
|
+
extensionLogger_1.log(generateParameters.logger, {
|
|
58
74
|
severity: "error" /* Error */,
|
|
59
75
|
message: i18next_1.default.t('NOENTITYTYPE', { entityType: entityTypeName }),
|
|
60
76
|
location: {
|
|
@@ -71,7 +87,7 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
71
87
|
const pageKeys = [];
|
|
72
88
|
const v2Page = import_1.findListReportPageV2(generateParameters.manifest[v2_1.ManifestSection.generic].pages, pageKeys);
|
|
73
89
|
if (!v2Page) {
|
|
74
|
-
|
|
90
|
+
extensionLogger_1.log(generateParameters.logger, {
|
|
75
91
|
severity: "error" /* Error */,
|
|
76
92
|
message: i18next_1.default.t('NOALP'),
|
|
77
93
|
location: {
|
|
@@ -79,9 +95,11 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
79
95
|
range: [v2_1.ManifestSection.generic]
|
|
80
96
|
}
|
|
81
97
|
});
|
|
82
|
-
return;
|
|
98
|
+
return appSchema;
|
|
83
99
|
}
|
|
84
|
-
utils_1.
|
|
100
|
+
utils_1.addTableColumnExtensions(appSchema, entityType, v2Page, generateParameters.manifest, generateParameters.fragments);
|
|
101
|
+
addEnumForVariantPaths(entityType, appSchema, generateParameters.serviceAVT);
|
|
102
|
+
common_1.addEnumForFilterBarAnnotationPath(entityType, appSchema, common_1.DefinitionName.ListReportFilterBar);
|
|
85
103
|
//Delete generic definitions
|
|
86
104
|
delete appSchema['definitions']['ResponsiveTableWithMultiSelect'];
|
|
87
105
|
delete appSchema['definitions']['ResponsiveTableWithInlineDelete'];
|
|
@@ -89,8 +107,10 @@ function generateListReportSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
89
107
|
delete appSchema['definitions']['AnalyticalTable'];
|
|
90
108
|
delete appSchema['definitions']['GridTable'];
|
|
91
109
|
delete appSchema['definitions']['GenericColumns'];
|
|
110
|
+
delete appSchema['definitions']['TableColumnAction'];
|
|
92
111
|
delete appSchema['definitions']['ToolBar'];
|
|
93
112
|
delete appSchema['definitions']['Actions'];
|
|
113
|
+
delete appSchema['definitions']['GenericFooter'];
|
|
94
114
|
}
|
|
95
115
|
return appSchema;
|
|
96
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listReport.js","sourceRoot":"","sources":["../../../../../src/sync/v2/generate/listReport.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"listReport.js","sourceRoot":"","sources":["../../../../../src/sync/v2/generate/listReport.ts"],"names":[],"mappings":";;;;;AAAA,mCAAqE;AACrE,sCAAiD;AACjD,yCASsB;AACtB,sDAA8B;AAC9B,6CAA8C;AAC9C,oCAAyF;AACzF,8DAA4D;AAC5D,oCAAsG;AAGtG;;;;;GAKG;AACH,SAAgB,sBAAsB,CAClC,UAAsB,EACtB,SAAiB,EACjB,eAAgC;IAEhC,mCAA0B,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IAClE,kCAAyB,CAAC,eAAe,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACvE,mCAA0B,CAAC,eAAe,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC5E,CAAC;AARD,wDAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACtC,kBAA+C,EAC/C,aAAqB,EACrB,cAAsB;IAEtB,qBAAqB;IACrB,eAAQ,EAAE,CAAC;IAEX,MAAM,SAAS,GAAW,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;IACpE,IAAI,EAAC,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,UAAU,CAAA,EAAE;QACjC,OAAO,SAAS,CAAC;KACpB;IAED,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,+BAAsB,GAAG,wBAAgB,CAAC;IACnG,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,+BAAsB,GAAG,yBAAiB,CAAC;IACpG,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,+BAAsB,GAAG,iBAAS,CAAC;IAC5F,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,+BAAsB,GAAG,uBAAe,CAAC;IAClG,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,+BAAsB,GAAG,iBAAS,CAAC;IAE5F,MAAM,0BAA0B,GAAG,IAAI,CAAC,KAAK,CACzC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,gCAAgC,CAAC,CAAC,CACjF,CAAC;IACF,MAAM,2BAA2B,GAAG,IAAI,CAAC,KAAK,CAC1C,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAClF,CAAC;IACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAClG,MAAM,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9G,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAElG,MAAM,WAAW,GAAG;QAChB,IAAI,EAAE,+BAAsB,GAAG,WAAW;KAC7C,CAAC;IACF,0BAA0B,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAClE,2BAA2B,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IACnE,mBAAmB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAC3D,yBAAyB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IACjE,mBAAmB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAE3D,MAAM,SAAS,GAAG,+BAAsB,GAAG,uBAAc,CAAC,SAAS,CAAC;IACpE,SAAS,CAAC,aAAa,CAAC,CAAC,wBAAgB,CAAC,GAAG,0BAA0B,CAAC;IACxE,SAAS,CAAC,aAAa,CAAC,CAAC,wBAAgB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAC/E,SAAS,CAAC,aAAa,CAAC,CAAC,yBAAiB,CAAC,GAAG,2BAA2B,CAAC;IAC1E,SAAS,CAAC,aAAa,CAAC,CAAC,yBAAiB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAChF,SAAS,CAAC,aAAa,CAAC,CAAC,iBAAS,CAAC,GAAG,mBAAmB,CAAC;IAC1D,SAAS,CAAC,aAAa,CAAC,CAAC,iBAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IACxE,SAAS,CAAC,aAAa,CAAC,CAAC,uBAAe,CAAC,GAAG,yBAAyB,CAAC;IACtE,SAAS,CAAC,aAAa,CAAC,CAAC,uBAAe,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAC9E,SAAS,CAAC,aAAa,CAAC,CAAC,iBAAS,CAAC,GAAG,mBAAmB,CAAC;IAC1D,SAAS,CAAC,aAAa,CAAC,CAAC,iBAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAExE,MAAM,UAAU,GAAG,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IACvG,IAAI,CAAC,UAAU,EAAE;QACb,qBAAG,CAAC,kBAAkB,CAAC,MAAM,EAAE;YAC3B,QAAQ,qBAAmB;YAC3B,OAAO,EAAE,iBAAO,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;YAClE,QAAQ,EAAE;gBACN,IAAI,EAAE,qBAAY;aACrB;SACJ,CAAC,CAAC;KACN;SAAM;QACH,mBAAmB;QACnB,MAAM,kBAAkB,GACpB,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC;QAC9F,wBAAgB,CAAC,SAAS,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;QAE5D,0CAA0C;QAC1C,sBAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAErC,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,6BAAoB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,oBAAe,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC1G,IAAI,CAAC,MAAM,EAAE;YACT,qBAAG,CAAC,kBAAkB,CAAC,MAAM,EAAE;gBAC3B,QAAQ,qBAAmB;gBAC3B,OAAO,EAAE,iBAAO,CAAC,CAAC,CAAC,OAAO,CAAC;gBAC3B,QAAQ,EAAE;oBACN,IAAI,EAAE,iBAAY;oBAClB,KAAK,EAAE,CAAC,oBAAe,CAAC,OAAO,CAAC;iBACnC;aACJ,CAAC,CAAC;YACH,OAAO,SAAS,CAAC;SACpB;QACD,gCAAwB,CACpB,SAAS,EACT,UAAU,EACV,MAAM,EACN,kBAAkB,CAAC,QAAQ,EAC3B,kBAAkB,CAAC,SAAS,CAC/B,CAAC;QAEF,sBAAsB,CAAC,UAAU,EAAE,SAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC7E,0CAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,uBAAc,CAAC,mBAAmB,CAAC,CAAC;QAE7F,4BAA4B;QAC5B,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,gCAAgC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,iCAAiC,CAAC,CAAC;QACnE,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC;QACnD,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAAC;QAClD,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;QACrD,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC;KACpD;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAzGD,gEAyGC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { GenerateAppSchemaParameters } from '../../../v2';
|
|
2
|
-
export interface ObjectPageSectionData {
|
|
3
|
-
target: string;
|
|
4
|
-
key?: string;
|
|
5
|
-
}
|
|
6
2
|
/**
|
|
7
3
|
* Generates an app specific schema out of the generic schema.
|
|
8
|
-
* Generic types are replaced by information from the app specific annotations.
|
|
9
4
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
10
5
|
* @param genericSchema - generic JSON schema of an object page
|
|
11
6
|
* @param entityTypeName - the base entity type of the given page
|
|
12
7
|
*
|
|
13
8
|
* @returns the app specific JSON schema
|
|
14
9
|
*/
|
|
15
|
-
export declare function generateObjectPageSchemaV2(generateParameters: GenerateAppSchemaParameters, genericSchema: object, entityTypeName: string): object
|
|
10
|
+
export declare function generateObjectPageSchemaV2(generateParameters: GenerateAppSchemaParameters, genericSchema: object, entityTypeName: string): object;
|
|
@@ -7,6 +7,7 @@ const common_1 = require("../../common");
|
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
8
|
const import_1 = require("../import");
|
|
9
9
|
const v2_1 = require("../../../v2");
|
|
10
|
+
const extensionLogger_1 = require("../../../extensionLogger");
|
|
10
11
|
const common_2 = require("../../../specification/common");
|
|
11
12
|
const i18next_1 = __importDefault(require("i18next"));
|
|
12
13
|
const i18n_1 = require("../../../i18n/i18n");
|
|
@@ -78,26 +79,90 @@ function addHeaderActionCallBackV2(entityType, appSchema, actionAnnotation, head
|
|
|
78
79
|
* @param {string} entitySetName Entity set name.
|
|
79
80
|
* @param {string} entityTypeName Entity type name.
|
|
80
81
|
* @param {ConverterOutput} oDataServiceAVT Complete service information, as returned by annotation vocabularies tool
|
|
82
|
+
* @param {FacetConfig} facet information
|
|
83
|
+
* @param {string} facetKey - key of the facet, as listed in FacetConfigs
|
|
81
84
|
* @param {FileData[]} [fragments] Array with XML fragments.
|
|
82
85
|
* @return {string} Name of custom columns definition.
|
|
83
86
|
*/
|
|
84
|
-
function ensureCustomColumnDefinitionExists(appSchema, manifest, entitySetName, entityTypeName, oDataServiceAVT, fragments) {
|
|
85
|
-
|
|
87
|
+
function ensureCustomColumnDefinitionExists(appSchema, manifest, entitySetName, entityTypeName, oDataServiceAVT, facet, facetKey, fragments) {
|
|
88
|
+
let suffix, customColumnsDefinitionName;
|
|
89
|
+
if (facet.ID && facet.Label) {
|
|
90
|
+
suffix = facet.ID + facet.Label.replace(/\s+/g, '');
|
|
91
|
+
}
|
|
92
|
+
else if (facet.ID) {
|
|
93
|
+
suffix = facet.ID;
|
|
94
|
+
}
|
|
95
|
+
else if (facet.Label) {
|
|
96
|
+
suffix = facet.Label.replace(/\s+/g, '');
|
|
97
|
+
}
|
|
98
|
+
if (suffix) {
|
|
99
|
+
customColumnsDefinitionName = `${common_1.DefinitionName.CustomColumns}<${entitySetName}><${facetKey}><${suffix}>`;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
customColumnsDefinitionName = `${common_1.DefinitionName.CustomColumns}<${entitySetName}><${facetKey}>`;
|
|
103
|
+
}
|
|
86
104
|
if (appSchema['definitions'][customColumnsDefinitionName]) {
|
|
87
105
|
// Definition is already created - we do not need to create it again
|
|
88
|
-
return
|
|
106
|
+
return customColumnsDefinitionName;
|
|
89
107
|
}
|
|
90
108
|
// Create type specific 'TableCustomColumn' definition - use entity set as type.
|
|
91
|
-
const customColumnDefinitionName = `${
|
|
109
|
+
const customColumnDefinitionName = `${common_1.DefinitionName.CustomColumn}<${entitySetName}>`;
|
|
92
110
|
const customColumnDefinition = JSON.parse(JSON.stringify(appSchema['definitions']['TableCustomColumn']));
|
|
93
111
|
appSchema['definitions'][customColumnDefinitionName] = customColumnDefinition;
|
|
94
112
|
// Update definitions for type specific custom columns
|
|
95
113
|
const pageKeys = [];
|
|
96
114
|
const entityType = oDataServiceAVT.entityTypes.find((et) => et.name === entityTypeName);
|
|
97
115
|
const v2Page = import_1.findObjectPageV2(manifest[common_2.ManifestSection.generic].pages, entitySetName, pageKeys);
|
|
98
|
-
utils_1.
|
|
116
|
+
utils_1.addTableColumnExtensions(appSchema, entityType, v2Page, manifest, fragments, customColumnsDefinitionName, customColumnDefinitionName);
|
|
99
117
|
return customColumnsDefinitionName;
|
|
100
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Method fills new app schema section with properties.
|
|
121
|
+
* @param {object} appSchema App schema in general
|
|
122
|
+
* @param {object} appSchemaSection app schema section to be filled
|
|
123
|
+
* @param {FacetConfig} facet facet or section information
|
|
124
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
125
|
+
* @param {SectionTypeV2} mainSectionType main section type, used to fill app schema section
|
|
126
|
+
* @return {boolean} returns false in case further handling is required.
|
|
127
|
+
*/
|
|
128
|
+
function addAppSchemaDefinition(appSchema, appSchemaSection, facet, sectionType, mainSectionType) {
|
|
129
|
+
var _a;
|
|
130
|
+
if ((facet === null || facet === void 0 ? void 0 : facet.ID) || ((_a = facet === null || facet === void 0 ? void 0 : facet.target) === null || _a === void 0 ? void 0 : _a['qualifier'])) {
|
|
131
|
+
appSchemaSection['properties'] = JSON.parse(JSON.stringify(appSchema['definitions'][mainSectionType]['properties']));
|
|
132
|
+
if (appSchemaSection['properties'].visible) {
|
|
133
|
+
addFlexChangeForSection(appSchema, appSchemaSection, 'visible', sectionType);
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Method adds title and description to app schema section in case facet information is available.
|
|
143
|
+
* @param {object} appSchemaSection app schema section to be filled
|
|
144
|
+
* @param {FacetConfig} facet facet or section information
|
|
145
|
+
*/
|
|
146
|
+
function addFacetTitleDescription(appSchemaSection, facet) {
|
|
147
|
+
if (facet === null || facet === void 0 ? void 0 : facet.ID) {
|
|
148
|
+
appSchemaSection['title'] = common_1.FacetTitlePrefix + facet.ID;
|
|
149
|
+
}
|
|
150
|
+
if (facet === null || facet === void 0 ? void 0 : facet.Label) {
|
|
151
|
+
appSchemaSection['description'] = facet.Label;
|
|
152
|
+
}
|
|
153
|
+
if (!appSchemaSection['description']) {
|
|
154
|
+
appSchemaSection['description'] = facet.base;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Method adds reference to section property key.
|
|
159
|
+
* @param {object} sections - schema of current sections definition
|
|
160
|
+
* @param {string} key section key which will contain the reference
|
|
161
|
+
* @param {string} definitionKey key which the section should point to
|
|
162
|
+
*/
|
|
163
|
+
function addSectionReference(sections, key, definitionKey) {
|
|
164
|
+
sections['properties'][key] = { $ref: `${common_1.DEFINITION_LINK_PREFIX}${definitionKey}` };
|
|
165
|
+
}
|
|
101
166
|
/**
|
|
102
167
|
* Reuse function for all table types, copies and adapts the generic definition
|
|
103
168
|
* @param tableType - Table type
|
|
@@ -115,91 +180,83 @@ function addTableDefinition(tableType, facetId, facet, appSchema) {
|
|
|
115
180
|
appSchema['definitions'][schemaId].title = common_1.FacetTitlePrefix + facet.ID;
|
|
116
181
|
}
|
|
117
182
|
appSchema['definitions'][schemaId].description = 'Table';
|
|
183
|
+
//adjust quickVariantSelection
|
|
184
|
+
appSchema['definitions'][schemaId].properties['quickVariantSelection'].$ref = `${common_1.DEFINITION_LINK_PREFIX}QuickVariantSelectionOP<${facetId}>`;
|
|
185
|
+
appSchema['definitions'][`QuickVariantSelectionOP<${facetId}>`] = JSON.parse(JSON.stringify(appSchema['definitions']['QuickVariantSelectionOP']));
|
|
186
|
+
appSchema['definitions'][`QuickVariant<${facetId}>`] = JSON.parse(JSON.stringify(appSchema['definitions']['QuickVariant']));
|
|
187
|
+
appSchema['definitions'][`QuickVariantSelectionOP<${facetId}>`].properties.variants.patternProperties['^[0-9]+$'].$ref = `${common_1.DEFINITION_LINK_PREFIX}QuickVariant<${facetId}>`;
|
|
188
|
+
common_1.addEnumForSingleTabVariant(facet.entityType, appSchema, `QuickVariant<${facetId}>`);
|
|
118
189
|
}
|
|
119
190
|
/**
|
|
120
191
|
* Adds definitions for line items in object page sections to the app schema
|
|
121
192
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
122
|
-
* @param {string}
|
|
193
|
+
* @param {string} facetKey - key of the facet, as listed in FacetConfigs
|
|
123
194
|
* @param {object} appSchema - app schema in general
|
|
124
195
|
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
125
196
|
* @param {FacetConfigs} facets - list of all facets
|
|
197
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
126
198
|
*/
|
|
127
|
-
function handleLineItem(generateParameters,
|
|
128
|
-
|
|
129
|
-
if (facet.base !== 'LineItem' || !facetId) {
|
|
199
|
+
function handleLineItem(generateParameters, facetKey, appSchema, facet, facets, sectionType) {
|
|
200
|
+
if (facet.base !== 'LineItem' || !facetKey) {
|
|
130
201
|
//no properties
|
|
131
202
|
return;
|
|
132
203
|
}
|
|
133
|
-
const navigationProperty =
|
|
134
|
-
const schemaIdForOpSection = `${sectionType}<${
|
|
135
|
-
appSchema['definitions'][schemaIdForOpSection] = common_1.createSectionWithoutProperties(facet,
|
|
204
|
+
const navigationProperty = facetKey.split('::')[0];
|
|
205
|
+
const schemaIdForOpSection = `${sectionType}<${facetKey}>`;
|
|
206
|
+
appSchema['definitions'][schemaIdForOpSection] = common_1.createSectionWithoutProperties(facet, facetKey);
|
|
136
207
|
const appSchemaSection = appSchema['definitions'][schemaIdForOpSection];
|
|
137
|
-
if (
|
|
138
|
-
appSchemaSection.properties = JSON.parse(JSON.stringify(appSchema['definitions'][types_1.SectionTypeV2.SectionTable]['properties']));
|
|
139
|
-
if (appSchemaSection.properties.visible) {
|
|
140
|
-
addFlexChangeForSection(appSchema, appSchemaSection, 'visible', sectionType);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
208
|
+
if (!addAppSchemaDefinition(appSchema, appSchemaSection, facet, sectionType, types_1.SectionTypeV2.SectionTable)) {
|
|
144
209
|
appSchemaSection.properties.table = JSON.parse(JSON.stringify(appSchema['definitions'][types_1.SectionTypeV2.SectionTable]['properties']['table']));
|
|
145
210
|
}
|
|
146
211
|
appSchemaSection.properties.table.anyOf = [
|
|
147
212
|
{
|
|
148
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageResponsiveTableWithMultiSelect<${
|
|
213
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageResponsiveTableWithMultiSelect<${facetKey}>`
|
|
149
214
|
},
|
|
150
215
|
{
|
|
151
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageResponsiveTableWithInlineDelete<${
|
|
216
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageResponsiveTableWithInlineDelete<${facetKey}>`
|
|
152
217
|
},
|
|
153
218
|
{
|
|
154
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageAnalyticalTable<${
|
|
219
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageAnalyticalTable<${facetKey}>`
|
|
155
220
|
},
|
|
156
221
|
{
|
|
157
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageGridTable<${
|
|
222
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageGridTable<${facetKey}>`
|
|
158
223
|
},
|
|
159
224
|
{
|
|
160
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageTreeTable<${
|
|
225
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}ObjectPageTreeTable<${facetKey}>`
|
|
161
226
|
}
|
|
162
227
|
];
|
|
163
228
|
appSchemaSection.annotationPath = facet.annotationPath;
|
|
164
|
-
common_1.addSectionTitleAndDescription(facet, appSchemaSection,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
addTableDefinition('
|
|
170
|
-
addTableDefinition('ObjectPageResponsiveTableWithInlineDelete', facetId, facet, appSchema);
|
|
171
|
-
addTableDefinition('ObjectPageGridTable', facetId, facet, appSchema);
|
|
172
|
-
addTableDefinition('ObjectPageTreeTable', facetId, facet, appSchema);
|
|
173
|
-
addTableDefinition('ObjectPageAnalyticalTable', facetId, facet, appSchema);
|
|
229
|
+
common_1.addSectionTitleAndDescription(facet, appSchemaSection, facetKey);
|
|
230
|
+
addTableDefinition('ObjectPageResponsiveTableWithMultiSelect', facetKey, facet, appSchema);
|
|
231
|
+
addTableDefinition('ObjectPageResponsiveTableWithInlineDelete', facetKey, facet, appSchema);
|
|
232
|
+
addTableDefinition('ObjectPageGridTable', facetKey, facet, appSchema);
|
|
233
|
+
addTableDefinition('ObjectPageTreeTable', facetKey, facet, appSchema);
|
|
234
|
+
addTableDefinition('ObjectPageAnalyticalTable', facetKey, facet, appSchema);
|
|
174
235
|
let customColumnDefinitionKey;
|
|
175
|
-
|
|
236
|
+
// Find target entity
|
|
237
|
+
const targetEntitySet = common_1.determineEntitySetOfFacet(facet, generateParameters.serviceAVT);
|
|
238
|
+
if (targetEntitySet) {
|
|
176
239
|
// Make sure that custom columns definitions are created for passed entity
|
|
177
|
-
customColumnDefinitionKey = ensureCustomColumnDefinitionExists(appSchema, generateParameters.manifest,
|
|
240
|
+
customColumnDefinitionKey = ensureCustomColumnDefinitionExists(appSchema, generateParameters.manifest, targetEntitySet.name, facet.entityType.name, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, facet, facetKey, generateParameters.fragments);
|
|
178
241
|
}
|
|
179
242
|
for (const facetKey in facets) {
|
|
180
243
|
if (facets[facetKey].base === 'LineItem' && facetKey.includes(navigationProperty)) {
|
|
181
|
-
utils_1.addLineItemsType(appSchema, facets[facetKey].target, facets[facetKey].entityType,
|
|
244
|
+
utils_1.addLineItemsType(appSchema, facets[facetKey].target, facets[facetKey].entityType, facetKey, customColumnDefinitionKey);
|
|
182
245
|
}
|
|
183
246
|
}
|
|
184
247
|
}
|
|
185
248
|
/**
|
|
186
249
|
* Adds definitions for subsections in object page sections to the app schema
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param facet
|
|
190
|
-
* @param
|
|
250
|
+
* @param {object} appSchema - app schema in general
|
|
251
|
+
* @param {string} definitionKey - key of app schema definition to be filled
|
|
252
|
+
* @param {FacetConfig} facet facet or section information
|
|
253
|
+
* @param {string} facetId - key of the facet, as listed in FacetConfigs
|
|
254
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
191
255
|
*/
|
|
192
|
-
function handleSubSection(
|
|
193
|
-
const schemaIdForSection = facetId.replace(`@${"com.sap.vocabularies.UI.v1.Facets" /* Facets */}`, facet.base);
|
|
194
|
-
const definitionKey = `${sectionType}<${schemaIdForSection}>`;
|
|
256
|
+
function handleSubSection(appSchema, definitionKey, facet, facetId, sectionType) {
|
|
195
257
|
appSchema['definitions'][definitionKey] = common_1.createSectionWithoutProperties(facet, facetId);
|
|
196
258
|
const appSchemaSection = appSchema['definitions'][definitionKey];
|
|
197
|
-
|
|
198
|
-
appSchemaSection.properties = JSON.parse(JSON.stringify(appSchema['definitions'][types_1.SectionTypeV2.SubSection]['properties']));
|
|
199
|
-
if (appSchemaSection.properties.visible) {
|
|
200
|
-
addFlexChangeForSection(appSchema, appSchemaSection, 'visible', sectionType);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
259
|
+
addAppSchemaDefinition(appSchema, appSchemaSection, facet, sectionType, types_1.SectionTypeV2.SubSection);
|
|
203
260
|
appSchemaSection.properties.subsections = {
|
|
204
261
|
type: 'object',
|
|
205
262
|
description: 'Subsections',
|
|
@@ -208,6 +265,79 @@ function handleSubSection(facetId, appSchema, facet, sectionType) {
|
|
|
208
265
|
isViewNode: true
|
|
209
266
|
};
|
|
210
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Method fills new chart section with properties.
|
|
270
|
+
* @param {object} appSchema App schema in general
|
|
271
|
+
* @param {string} definitionKey - key of app schema definition to be filled
|
|
272
|
+
* @param {FacetConfig} facet facet or section information
|
|
273
|
+
* @param {string} facetKey - facet key.
|
|
274
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
275
|
+
*/
|
|
276
|
+
function handleSectionChart(appSchema, definitionKey, facet, facetKey, sectionType) {
|
|
277
|
+
appSchema['definitions'][definitionKey] = common_1.createSectionWithoutProperties(facet, facetKey);
|
|
278
|
+
const appSchemaSection = appSchema['definitions'][definitionKey];
|
|
279
|
+
addAppSchemaDefinition(appSchema, appSchemaSection, facet, sectionType, types_1.SectionTypeV2.SectionChart);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Method fills new form section in app schema with properties.
|
|
283
|
+
* @param {object} appSchema App schema in general
|
|
284
|
+
* @param {string} definitionKey - key of app schema definition to be filled
|
|
285
|
+
* @param {FacetConfig} facet facet or section information
|
|
286
|
+
* @param {string} facetKey - facet key.
|
|
287
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
288
|
+
* @return {object} returns filled form section in app schema.
|
|
289
|
+
*/
|
|
290
|
+
function handleAppSchemaFormSection(appSchema, definitionKey, facet, facetKey, sectionType) {
|
|
291
|
+
appSchema['definitions'][definitionKey] = common_1.createSectionWithoutProperties(facet, facetKey);
|
|
292
|
+
const appSchemaSection = appSchema['definitions'][definitionKey];
|
|
293
|
+
addAppSchemaDefinition(appSchema, appSchemaSection, facet, sectionType, types_1.SectionTypeV2.SectionForm);
|
|
294
|
+
addFacetTitleDescription(appSchemaSection, facet);
|
|
295
|
+
appSchemaSection.annotationPath = facet.annotationPath;
|
|
296
|
+
appSchemaSection.isViewNode = true;
|
|
297
|
+
return appSchemaSection;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Mapping of facet type to (sub)section type to enable correct further handling
|
|
301
|
+
* @param {FacetBase} facetType - facet type to be mapped
|
|
302
|
+
* @param {boolean} isSubSection - if section is subsection of section
|
|
303
|
+
* @return {SectionTypeV2} sectionType (sub)section type
|
|
304
|
+
*/
|
|
305
|
+
function getSectionType(facetType, isSubSection) {
|
|
306
|
+
const sectionTypeMapping = new Map([
|
|
307
|
+
[v2_1.FacetBase.CollectionFacet, types_1.SectionTypeV2.Section],
|
|
308
|
+
[v2_1.FacetBase.LineItem, types_1.SectionTypeV2.SectionTable],
|
|
309
|
+
[v2_1.FacetBase.Chart, types_1.SectionTypeV2.SectionChart],
|
|
310
|
+
[v2_1.FacetBase.Form, types_1.SectionTypeV2.SectionForm],
|
|
311
|
+
[v2_1.FacetBase.Identification, types_1.SectionTypeV2.SectionForm]
|
|
312
|
+
]);
|
|
313
|
+
const subSectionTypeMapping = new Map([
|
|
314
|
+
[v2_1.FacetBase.CollectionFacet, types_1.SectionTypeV2.SubSection],
|
|
315
|
+
[v2_1.FacetBase.LineItem, types_1.SectionTypeV2.SubSectionTable],
|
|
316
|
+
[v2_1.FacetBase.Chart, types_1.SectionTypeV2.SubSectionChart],
|
|
317
|
+
[v2_1.FacetBase.Form, types_1.SectionTypeV2.SubSectionForm],
|
|
318
|
+
[v2_1.FacetBase.Identification, types_1.SectionTypeV2.SubSectionForm]
|
|
319
|
+
]);
|
|
320
|
+
if (isSubSection) {
|
|
321
|
+
return subSectionTypeMapping.get(facetType);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
return sectionTypeMapping.get(facetType);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Method returns reference key, special handling of (sub)sections
|
|
329
|
+
* @param {FacetConfig} facet facet or section information
|
|
330
|
+
* @param {string} facetKey - facet key.
|
|
331
|
+
* @param {SectionTypeV2} sectionType (sub)section type
|
|
332
|
+
* @return {string} reference key
|
|
333
|
+
*/
|
|
334
|
+
function getReferenceKey(facet, facetKey, sectionType) {
|
|
335
|
+
let referenceKey = facetKey;
|
|
336
|
+
if (sectionType === (types_1.SectionTypeV2.Section || types_1.SectionTypeV2.SubSection)) {
|
|
337
|
+
referenceKey = referenceKey.replace(`@${"com.sap.vocabularies.UI.v1.Facets" /* Facets */}`, facet.base);
|
|
338
|
+
}
|
|
339
|
+
return `${referenceKey}`;
|
|
340
|
+
}
|
|
211
341
|
/**
|
|
212
342
|
* Creates a section definition in app schema.
|
|
213
343
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
@@ -215,87 +345,44 @@ function handleSubSection(facetId, appSchema, facet, sectionType) {
|
|
|
215
345
|
* @param {string} facetKey - facet key.
|
|
216
346
|
* @param {object} sections - schema of current sections definition.
|
|
217
347
|
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
348
|
+
* @param {boolean} isSubSection - if section is subsection of section
|
|
218
349
|
*/
|
|
219
350
|
function addSection(generateParameters, facets, facetKey, sections, appSchema, isSubSection = false) {
|
|
220
|
-
var _a;
|
|
221
351
|
const facet = facets[facetKey];
|
|
222
|
-
|
|
223
|
-
|
|
352
|
+
const sectionType = getSectionType(facet.base, isSubSection);
|
|
353
|
+
const referenceKey = getReferenceKey(facet, facetKey, sectionType);
|
|
354
|
+
const definitionKey = `${sectionType}<${referenceKey}>`;
|
|
355
|
+
addSectionReference(sections, referenceKey, definitionKey);
|
|
356
|
+
switch (sectionType) {
|
|
357
|
+
case types_1.SectionTypeV2.Section:
|
|
358
|
+
case types_1.SectionTypeV2.SubSection: {
|
|
224
359
|
//handle collection facets
|
|
225
|
-
const sectionType = (sections === null || sections === void 0 ? void 0 : sections['description']) === 'Subsections' ? types_1.SectionTypeV2.SubSection : types_1.SectionTypeV2.Section;
|
|
226
|
-
const schemaIdForSection = facetKey.replace(`@${"com.sap.vocabularies.UI.v1.Facets" /* Facets */}`, facet.base);
|
|
227
360
|
isSubSection = true;
|
|
228
|
-
|
|
229
|
-
sections['properties'][schemaIdForSection] = { $ref: `${common_1.DEFINITION_LINK_PREFIX}${definitionKey}` };
|
|
230
|
-
handleSubSection(facetKey, appSchema, facet, sectionType);
|
|
361
|
+
handleSubSection(appSchema, definitionKey, facet, facetKey, sectionType);
|
|
231
362
|
const subSections = appSchema['definitions'][definitionKey].properties.subsections;
|
|
232
363
|
for (const key in facet['facets']) {
|
|
233
364
|
addSection(generateParameters, facet['facets'], key, subSections, appSchema, isSubSection);
|
|
234
365
|
}
|
|
235
366
|
break;
|
|
236
367
|
}
|
|
237
|
-
case
|
|
238
|
-
|
|
239
|
-
const sectionType = isSubSection ? types_1.SectionTypeV2.SubSectionTable : types_1.SectionTypeV2.SectionTable;
|
|
240
|
-
sections['properties'][facetKey] = {
|
|
241
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${sectionType}<${facetKey}>`
|
|
242
|
-
};
|
|
368
|
+
case types_1.SectionTypeV2.SectionTable:
|
|
369
|
+
case types_1.SectionTypeV2.SubSectionTable: {
|
|
243
370
|
handleLineItem(generateParameters, facetKey, appSchema, facet, facets, sectionType);
|
|
244
371
|
//add fields for createWithParameterDialog
|
|
245
372
|
const floorplanSuffix = 'OP';
|
|
246
373
|
common_1.addFieldsType(appSchema, facet.entityType, floorplanSuffix);
|
|
247
374
|
break;
|
|
248
375
|
}
|
|
249
|
-
case
|
|
376
|
+
case types_1.SectionTypeV2.SectionChart:
|
|
377
|
+
case types_1.SectionTypeV2.SubSectionChart: {
|
|
250
378
|
//handle reference facet (if comprising chart)
|
|
251
|
-
|
|
252
|
-
const definitionKey = `${sectionType}<${facetKey}>`;
|
|
253
|
-
sections['properties'][facetKey] = {
|
|
254
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${definitionKey}`
|
|
255
|
-
};
|
|
256
|
-
appSchema['definitions'][definitionKey] = common_1.createSectionWithoutProperties(facet, facetKey);
|
|
257
|
-
const appSchemaSection = appSchema['definitions'][definitionKey];
|
|
258
|
-
if (facet.ID) {
|
|
259
|
-
appSchemaSection.properties = JSON.parse(JSON.stringify(appSchema['definitions'][types_1.SectionTypeV2.SectionChart]['properties']));
|
|
260
|
-
if (appSchemaSection.properties.visible) {
|
|
261
|
-
addFlexChangeForSection(appSchema, appSchemaSection, 'visible', sectionType);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
379
|
+
handleSectionChart(appSchema, definitionKey, facet, facetKey, sectionType);
|
|
264
380
|
break;
|
|
265
381
|
}
|
|
266
|
-
case
|
|
267
|
-
case
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
sections['properties'][facetKey] = {
|
|
271
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${definitionKey}`
|
|
272
|
-
};
|
|
273
|
-
appSchema['definitions'][definitionKey] = common_1.createSectionWithoutProperties(facet, facetKey);
|
|
274
|
-
const appSchemaSection = appSchema['definitions'][definitionKey];
|
|
275
|
-
if ((facet === null || facet === void 0 ? void 0 : facet.ID) || ((_a = facet.target) === null || _a === void 0 ? void 0 : _a['qualifier'])) {
|
|
276
|
-
appSchemaSection['properties'] = JSON.parse(JSON.stringify(appSchema['definitions'][types_1.SectionTypeV2.SectionForm]['properties']));
|
|
277
|
-
if (appSchemaSection.properties.visible) {
|
|
278
|
-
addFlexChangeForSection(appSchema, appSchemaSection, 'visible', sectionType);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
if (facet === null || facet === void 0 ? void 0 : facet.ID) {
|
|
282
|
-
appSchemaSection.title = common_1.FacetTitlePrefix + facet.ID;
|
|
283
|
-
}
|
|
284
|
-
if (facet === null || facet === void 0 ? void 0 : facet.Label) {
|
|
285
|
-
appSchemaSection.description = facet.Label;
|
|
286
|
-
}
|
|
287
|
-
let withActions = true;
|
|
288
|
-
appSchemaSection.annotationPath = facet.annotationPath;
|
|
289
|
-
appSchemaSection.isViewNode = true;
|
|
290
|
-
if (!appSchemaSection.description) {
|
|
291
|
-
if (facet.base === v2_1.FacetBase.Form) {
|
|
292
|
-
appSchemaSection.description = 'Form';
|
|
293
|
-
}
|
|
294
|
-
else if (facet.base === 'Identification') {
|
|
295
|
-
appSchemaSection.description = 'Identification';
|
|
296
|
-
withActions = false;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
382
|
+
case types_1.SectionTypeV2.SectionForm:
|
|
383
|
+
case types_1.SectionTypeV2.SubSectionForm: {
|
|
384
|
+
const withActions = facet.base !== v2_1.FacetBase.Identification;
|
|
385
|
+
const appSchemaSection = handleAppSchemaFormSection(appSchema, definitionKey, facet, facetKey, sectionType);
|
|
299
386
|
common_1.handleForm(v2_1.SectionType.Section, facet, appSchemaSection, appSchema, common_2.FioriElementsVersion.v2, withActions);
|
|
300
387
|
break;
|
|
301
388
|
}
|
|
@@ -310,6 +397,7 @@ function addSection(generateParameters, facets, facetKey, sections, appSchema, i
|
|
|
310
397
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
311
398
|
* @param {object} appSchema - app specific schema that potentially gets enhanced
|
|
312
399
|
* @param {EntityType} entityType - current entity type
|
|
400
|
+
* @param {string} entitySetName Entity set name
|
|
313
401
|
* @param {SapUiAppPagesV2} pages - list of (manifest) pages
|
|
314
402
|
*/
|
|
315
403
|
function addSections(generateParameters, appSchema, entityType, entitySetName, pages) {
|
|
@@ -328,7 +416,7 @@ function addSections(generateParameters, appSchema, entityType, entitySetName, p
|
|
|
328
416
|
return;
|
|
329
417
|
}
|
|
330
418
|
// Get facet annotations
|
|
331
|
-
const facets = common_1.getObjectPageFacets(entityType, generateParameters.serviceAVT, common_2.FioriElementsVersion.v2, generateParameters.logger);
|
|
419
|
+
const facets = common_1.getObjectPageFacets(entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, common_2.FioriElementsVersion.v2, generateParameters.logger);
|
|
332
420
|
if (!facets || Object.keys(facets).length === 0) {
|
|
333
421
|
return;
|
|
334
422
|
}
|
|
@@ -379,7 +467,6 @@ function addRelatedFacetKeysType(schema, entityType, oDataServiceAVT, logger) {
|
|
|
379
467
|
}
|
|
380
468
|
/**
|
|
381
469
|
* Generates an app specific schema out of the generic schema.
|
|
382
|
-
* Generic types are replaced by information from the app specific annotations.
|
|
383
470
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
384
471
|
* @param genericSchema - generic JSON schema of an object page
|
|
385
472
|
* @param entityTypeName - the base entity type of the given page
|
|
@@ -399,22 +486,21 @@ function generateObjectPageSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
399
486
|
appSchema['properties']['sections'] = {
|
|
400
487
|
$ref: common_1.DEFINITION_LINK_PREFIX + 'Sections'
|
|
401
488
|
};
|
|
402
|
-
const entitySet = generateParameters.serviceAVT.entitySets &&
|
|
403
|
-
generateParameters.serviceAVT.entitySets.find((es) => es.entityType.name === entityTypeName || es.name === entityTypeName);
|
|
489
|
+
const entitySet = (generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT.entitySets) && (generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT.entitySets.find((es) => es.entityType.name === entityTypeName || es.name === entityTypeName));
|
|
404
490
|
if (!entitySet) {
|
|
405
|
-
|
|
491
|
+
extensionLogger_1.log(generateParameters.logger, {
|
|
406
492
|
severity: "error" /* Error */,
|
|
407
493
|
message: i18next_1.default.t('NOENTITYSET4NAME', { entityType: entityTypeName }),
|
|
408
494
|
location: {
|
|
409
495
|
path: common_1.METADATAPATH
|
|
410
496
|
}
|
|
411
497
|
});
|
|
412
|
-
return;
|
|
498
|
+
return appSchema;
|
|
413
499
|
}
|
|
414
500
|
const entityType = entitySet === null || entitySet === void 0 ? void 0 : entitySet.entityType;
|
|
415
501
|
const pages = generateParameters.manifest[common_2.ManifestSection.generic].pages;
|
|
416
502
|
if (!pages) {
|
|
417
|
-
|
|
503
|
+
extensionLogger_1.log(generateParameters.logger, {
|
|
418
504
|
severity: "error" /* Error */,
|
|
419
505
|
message: i18next_1.default.t('NOPAGES', { appId: generateParameters.manifest['sap.app']['id'] }),
|
|
420
506
|
location: {
|
|
@@ -425,15 +511,11 @@ function generateObjectPageSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
425
511
|
return appSchema;
|
|
426
512
|
}
|
|
427
513
|
// Add header
|
|
428
|
-
addHeader(appSchema, entityType, generateParameters.serviceAVT);
|
|
514
|
+
addHeader(appSchema, entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT);
|
|
429
515
|
// Add sections
|
|
430
516
|
addSections(generateParameters, appSchema, entityType, entitySet.name, pages);
|
|
431
517
|
// Custom section facets
|
|
432
|
-
addRelatedFacetKeysType(appSchema, entityType, generateParameters.serviceAVT, generateParameters.logger);
|
|
433
|
-
// Remove Custom Column non existing extensions - TreeTableColumnsExtension does not exist in ALP
|
|
434
|
-
utils_1.removeElementsFromEnum(appSchema['definitions']['TableColumnExtensionTypeV2']['enum'], [
|
|
435
|
-
v2_1.TableColumnExtensionTypeV2.TreeTableColumnsExtension
|
|
436
|
-
]);
|
|
518
|
+
addRelatedFacetKeysType(appSchema, entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, generateParameters.logger);
|
|
437
519
|
if (!appSchema['definitions']['Sections']) {
|
|
438
520
|
if (appSchema['definitions']['RelatedFacetKeys'] &&
|
|
439
521
|
appSchema['definitions']['RelatedFacetKeys']['oneOf'].length) {
|
|
@@ -449,11 +531,12 @@ function generateObjectPageSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
449
531
|
delete appSchema['properties']['sections'];
|
|
450
532
|
}
|
|
451
533
|
}
|
|
452
|
-
common_1.addFooterActions(appSchema, entityType, generateParameters.serviceAVT);
|
|
534
|
+
common_1.addFooterActions(appSchema, entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT);
|
|
453
535
|
// Eliminate generic definitions
|
|
454
536
|
delete appSchema['definitions']['GenericSections'];
|
|
455
537
|
delete appSchema['definitions']['ObjectPageSectionTableV2'];
|
|
456
538
|
delete appSchema['definitions']['GenericColumns'];
|
|
539
|
+
delete appSchema['definitions']['TableColumnAction'];
|
|
457
540
|
delete appSchema['definitions']['ObjectPageSectionFormV2'];
|
|
458
541
|
delete appSchema['definitions']['ObjectPageSectionTableV2'];
|
|
459
542
|
delete appSchema['definitions']['ObjectPageSubSectionV2'];
|
|
@@ -464,7 +547,6 @@ function generateObjectPageSchemaV2(generateParameters, genericSchema, entityTyp
|
|
|
464
547
|
delete appSchema['definitions']['ObjectPageGridTable'];
|
|
465
548
|
delete appSchema['definitions']['ObjectPageToolBar'];
|
|
466
549
|
delete appSchema['definitions']['ObjectPageToolBarActions'];
|
|
467
|
-
delete appSchema['definitions']['ObjectPageToolBarAction'];
|
|
468
550
|
delete appSchema['definitions']['ObjectPageForm'];
|
|
469
551
|
delete appSchema['definitions']['ObjectPageFormFields'];
|
|
470
552
|
delete appSchema['definitions']['ObjectPageFormActions'];
|