@sap/ux-specification 1.84.127 → 1.84.129
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 +54 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +177 -177
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +36 -9
- package/dist/schemas/v2/ListReportNewConfig.json +134 -0
- package/dist/schemas/v2/ObjectPageConfig.json +12 -5
- package/dist/schemas/v4/ApplicationV4.json +8 -4
- package/dist/specification/package.json +16 -15
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +72 -7
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +72 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +145 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +7 -0
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +10 -0
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +17 -18
- package/dist/specification/src/sync/common/generate/utils.d.ts +17 -7
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +38 -22
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +13 -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 +148 -2
- 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 +44 -0
- 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 +86 -31
- 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 +54 -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 +153 -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 +40 -20
- 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/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 +74 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +262 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +61 -2
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +145 -80
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +82 -33
- 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 +15 -5
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +53 -5
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/Application.d.ts +3 -0
- package/dist/types/src/common/Application.d.ts.map +1 -1
- package/dist/types/src/common/Application.js +4 -0
- package/dist/types/src/common/Application.js.map +1 -1
- package/dist/types/src/common/types.d.ts +106 -1
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +2 -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/Action.d.ts +12 -0
- package/dist/types/src/v2/controls/Action.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.d.ts +13 -0
- package/dist/types/src/v2/controls/Card.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.js.map +1 -1
- package/dist/types/src/v2/controls/Field.d.ts +1 -0
- package/dist/types/src/v2/controls/Field.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.d.ts +6 -0
- package/dist/types/src/v2/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.js.map +1 -1
- package/dist/types/src/v2/controls/Header.d.ts +1 -0
- package/dist/types/src/v2/controls/Header.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts +3 -0
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts +13 -0
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +10 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +28 -0
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.js.map +1 -1
- package/dist/types/src/v2/controls/ToolBar.d.ts +1 -0
- package/dist/types/src/v2/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts +1 -0
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.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/v2/pages/OverviewPageConfigV2.d.ts +4 -0
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/controls/FilterBar.d.ts +2 -0
- package/dist/types/src/v4/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts +4 -0
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts +15 -0
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +2 -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 +3 -0
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +15 -0
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +6 -0
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +22 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/package.json +16 -15
|
@@ -1,15 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.getManifestPathToPageSettings = getManifestPathToPageSettings;
|
|
4
37
|
exports.getManifestPropertyByPath = getManifestPropertyByPath;
|
|
5
38
|
exports.isDefinition = isDefinition;
|
|
6
39
|
exports.addConversionExit = addConversionExit;
|
|
7
40
|
exports.executeConversionExit = executeConversionExit;
|
|
41
|
+
exports.isEmpty = isEmpty;
|
|
42
|
+
exports.addManifestPathsToProperties = addManifestPathsToProperties;
|
|
8
43
|
/**
|
|
9
44
|
* @file This file contains helper functions for generic schema handling.
|
|
10
45
|
* The functionality is implicitly tested by the more complex unit-tests for generic schema generation and generic import in test-folder unit/genericSchemaHandling.
|
|
11
46
|
*/
|
|
12
47
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
48
|
+
const common_1 = require("../common");
|
|
49
|
+
const v2controls = __importStar(require("./export/controls"));
|
|
50
|
+
const pages = __importStar(require("./export/pages"));
|
|
51
|
+
const controlsWithSyncRules = {};
|
|
52
|
+
for (const control in v2controls) {
|
|
53
|
+
if (typeof v2controls[control] === 'function') {
|
|
54
|
+
controlsWithSyncRules[control] = v2controls[control];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
13
57
|
/**
|
|
14
58
|
* Returns the manifest path to (a section within) the settings for a page.
|
|
15
59
|
*
|
|
@@ -108,4 +152,27 @@ function executeConversionExit(isDirectionAppToConfig, conversionExitProvider, p
|
|
|
108
152
|
? conversionExit.appToConfig(value, conversionExitParams, fragments ?? [], propertyDefinition, logger)
|
|
109
153
|
: conversionExit.configToApp(value, conversionExitParams, (fragments ?? []), propertyDefinition, oldValue);
|
|
110
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns whether an object should be considered as an empty object.
|
|
157
|
+
*
|
|
158
|
+
* @param obj - the object to be checked
|
|
159
|
+
* @returns whether the object should be considered empty
|
|
160
|
+
*/
|
|
161
|
+
function isEmpty(obj) {
|
|
162
|
+
return !obj || Object.keys(obj).every((key) => obj[key] === undefined);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
166
|
+
*
|
|
167
|
+
* @param appSchema - Full schema.
|
|
168
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
169
|
+
* If `undefined`, the function attempts to resolve the definition name from the `$ref` property of the provided definition.
|
|
170
|
+
* @param definition - The definition object containing property schemas.
|
|
171
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
172
|
+
* @param control - Control containing sync rules to detect 'manifestPath'
|
|
173
|
+
*/
|
|
174
|
+
function addManifestPathsToProperties(appSchema, definitionName, definition, pathParams, control) {
|
|
175
|
+
const controls = control ? [control, controlsWithSyncRules, pages] : [controlsWithSyncRules, pages];
|
|
176
|
+
(0, common_1.addManifestPathsToProperties)(controls, appSchema, definitionName, definition, pathParams);
|
|
177
|
+
}
|
|
111
178
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/sync/v2/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/sync/v2/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,sEAGC;AAYD,8DA6BC;AAQD,oCAEC;AAYD,8CAQC;AAeD,sDAyBC;AAQD,0BAEC;AAYD,oEASC;AAnLD;;;GAGG;AACH,wEAAyE;AAWzE,sCAA+F;AAE/F,8DAAgD;AAChD,sDAAwC;AAExC,MAAM,qBAAqB,GAA6C,EAAE,CAAC;AAC3E,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE,CAAC;IAC/B,IAAI,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;QAC5C,qBAAqB,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,6BAA6B,CAAC,QAAsB,EAAE,SAAuB,EAAE;IAC3F,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAChE,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,yBAAyB,CACrC,QAAkB,EAClB,YAA0B,EAC1B,QAAiB;IAEjB,IAAI,eAAe,GAAY,QAAQ,CAAC,CAAC,sDAAsD;IAC/F,MAAM,OAAO;IACT,wFAAwF;IACxF,YAAY,CAAC,KAAK,CAAC,UAAU,QAAQ;QACjC,IACI,CAAC,eAAe;YAChB,OAAO,eAAe,KAAK,QAAQ;YACnC,CAAC,KAAK,CAAC,OAAO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ListReport.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v4/export/pages/ListReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ListReport.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v4/export/pages/ListReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAmCpD;;GAEG;AACH,qBAIa,UAAW,YAAW,EAAE,CAAC,kBAAkB;IASpD,KAAK,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC;IAOxB,KAAK,CAAC,EAAE,EAAE,CAAC,YAAY,GAAG,KAAK,CAAC;IAUhC,iBAAiB,CAAC,EAAE,EAAE,CAAC,+BAA+B,CAAC;IAQvD,WAAW,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC;IAQjC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAIvC,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB"}
|
|
@@ -69,7 +69,8 @@ __decorate([
|
|
|
69
69
|
manifest: {
|
|
70
70
|
path: (entitySet) => (0, application_1.getSettingsPathForPage)(entitySet)
|
|
71
71
|
}
|
|
72
|
-
})
|
|
72
|
+
}),
|
|
73
|
+
(0, decorators_1.hidden)()
|
|
73
74
|
], ListReport.prototype, "defaultTemplateAnnotationPath", void 0);
|
|
74
75
|
__decorate([
|
|
75
76
|
(0, decorators_1.childId)('fe::FilterBar')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListReport.js","sourceRoot":"","sources":["../../../../../../../src/sync/v4/export/pages/ListReport.ts"],"names":[],"mappings":";;;;;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"ListRe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,CAAC,GAAG,mBAAmB;SACvF;KACJ,CAAC;IACD,IAAA,8BAAiB,EAAC,kEAAkE,CAAC;+CACrD;AAQjC;IANC,IAAA,qBAAQ,EAAC;QACN,QAAQ,EAAE;YACN,IAAI,EAAE,CAAC,SAAS,EAAU,EAAE,CAAC,IAAA,oCAAsB,EAAC,SAAS,CAAC;SACjE;KACJ,CAAC;IACD,IAAA,mBAAM,GAAE;iEAC8B;AAIvC;IADC,IAAA,oBAAO,EAAC,eAAe,CAAC;6CACH;qBA9Cb,UAAU;IAJtB,IAAA,kCAAqB,EAAC;QACnB,EAAE,EAAE,0DAA0D;QAC9D,MAAM,EAAE,0CAA0C;KACrD,CAAC;GACW,UAAU,CA+CtB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ExtensionLogger, v4 } from '../../..';
|
|
2
|
+
import type { AppSchema } from '../sync-rules/AppSchema';
|
|
3
|
+
import type { Page } from '../sync-rules/Page';
|
|
4
|
+
import type { EntityType } from '@sap-ux/vocabularies-types';
|
|
5
|
+
export declare class BaseConstruct {
|
|
6
|
+
page: Page;
|
|
7
|
+
schema: AppSchema;
|
|
8
|
+
logger?: ExtensionLogger;
|
|
9
|
+
/**
|
|
10
|
+
* Constructor for BaseConstruct.
|
|
11
|
+
*
|
|
12
|
+
* @param schema - the application schema
|
|
13
|
+
* @param page - the page object
|
|
14
|
+
* @param logger - optional extension logger
|
|
15
|
+
*/
|
|
16
|
+
constructor(schema: AppSchema, page: Page, logger?: ExtensionLogger);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Add general settings to schema (LR or ALP).
|
|
20
|
+
*
|
|
21
|
+
* - Adds Selection-(PresentationVariant) related enums to the schema.
|
|
22
|
+
*/
|
|
23
|
+
export declare class GeneralListReportSettings extends BaseConstruct {
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for general settings of ListReport.
|
|
26
|
+
*
|
|
27
|
+
* @param schema - the application schema
|
|
28
|
+
* @param page - the page object
|
|
29
|
+
* @param logger - optional extension logger
|
|
30
|
+
*/
|
|
31
|
+
constructor(schema: AppSchema, page: Page, logger?: ExtensionLogger);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Add filter bar to schema (LR or ALP).
|
|
35
|
+
*/
|
|
36
|
+
export declare class FilterBar extends BaseConstruct {
|
|
37
|
+
/**
|
|
38
|
+
* Constructor for FilterBar.
|
|
39
|
+
*
|
|
40
|
+
* @param schema - the application schema
|
|
41
|
+
* @param page - the page object
|
|
42
|
+
* @param logger - optional extension logger
|
|
43
|
+
*/
|
|
44
|
+
constructor(schema: AppSchema, page: Page, logger?: ExtensionLogger);
|
|
45
|
+
/**
|
|
46
|
+
* Instantiates the FilterBar and adds the filterBar to the schema.
|
|
47
|
+
*/
|
|
48
|
+
instantiate(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Adds filter bar to schema (LR or ALP).
|
|
51
|
+
*
|
|
52
|
+
* @param entityType - the entity type
|
|
53
|
+
* @param schema - the application schema
|
|
54
|
+
* @param v4Page - the actual page in the manifest
|
|
55
|
+
* @param alias - alias definition for the UI vocabulary
|
|
56
|
+
*/
|
|
57
|
+
addFilterBar(entityType: EntityType, schema: AppSchema, v4Page: v4.SapUiAppPageV4, alias: string): void;
|
|
58
|
+
}
|
|
59
|
+
export declare class TableAndViews extends BaseConstruct {
|
|
60
|
+
/**
|
|
61
|
+
* Constructor for TableAndViews.
|
|
62
|
+
*
|
|
63
|
+
* @param schema - the application schema
|
|
64
|
+
* @param page - the page object
|
|
65
|
+
* @param logger - optional extension logger
|
|
66
|
+
*/
|
|
67
|
+
constructor(schema: AppSchema, page: Page, logger?: ExtensionLogger);
|
|
68
|
+
addTableAndViews(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Instantiates the TableAndViews and adds them to the schema.
|
|
71
|
+
*/
|
|
72
|
+
instantiate(): void;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ListReportUtils.d.ts.map
|
|
@@ -0,0 +1 @@
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
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TableAndViews = exports.FilterBar = exports.GeneralListReportSettings = exports.BaseConstruct = void 0;
|
|
7
|
+
const __1 = require("../../..");
|
|
8
|
+
const utils_1 = require("../utils/utils");
|
|
9
|
+
const listReport_1 = require("./listReport");
|
|
10
|
+
const listReport_2 = require("./listReport");
|
|
11
|
+
const common_1 = require("../../common");
|
|
12
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
13
|
+
class BaseConstruct {
|
|
14
|
+
/**
|
|
15
|
+
* Constructor for BaseConstruct.
|
|
16
|
+
*
|
|
17
|
+
* @param schema - the application schema
|
|
18
|
+
* @param page - the page object
|
|
19
|
+
* @param logger - optional extension logger
|
|
20
|
+
*/
|
|
21
|
+
constructor(schema, page, logger) {
|
|
22
|
+
this.schema = schema;
|
|
23
|
+
this.page = page;
|
|
24
|
+
this.logger = logger;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.BaseConstruct = BaseConstruct;
|
|
28
|
+
/**
|
|
29
|
+
* Add general settings to schema (LR or ALP).
|
|
30
|
+
*
|
|
31
|
+
* - Adds Selection-(PresentationVariant) related enums to the schema.
|
|
32
|
+
*/
|
|
33
|
+
class GeneralListReportSettings extends BaseConstruct {
|
|
34
|
+
/**
|
|
35
|
+
* Constructor for general settings of ListReport.
|
|
36
|
+
*
|
|
37
|
+
* @param schema - the application schema
|
|
38
|
+
* @param page - the page object
|
|
39
|
+
* @param logger - optional extension logger
|
|
40
|
+
*/
|
|
41
|
+
constructor(schema, page, logger) {
|
|
42
|
+
super(schema, page, logger);
|
|
43
|
+
//enum for annotation path as part of QuickVariantSelection
|
|
44
|
+
(0, common_1.addEnumForSingleTabVariant)(page.entity.type, schema.getSchema(), __1.DefinitionName.AnnotationPathAsObject);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.GeneralListReportSettings = GeneralListReportSettings;
|
|
48
|
+
/**
|
|
49
|
+
* Add filter bar to schema (LR or ALP).
|
|
50
|
+
*/
|
|
51
|
+
class FilterBar extends BaseConstruct {
|
|
52
|
+
/**
|
|
53
|
+
* Constructor for FilterBar.
|
|
54
|
+
*
|
|
55
|
+
* @param schema - the application schema
|
|
56
|
+
* @param page - the page object
|
|
57
|
+
* @param logger - optional extension logger
|
|
58
|
+
*/
|
|
59
|
+
constructor(schema, page, logger) {
|
|
60
|
+
super(schema, page, logger);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Instantiates the FilterBar and adds the filterBar to the schema.
|
|
64
|
+
*/
|
|
65
|
+
instantiate() {
|
|
66
|
+
this.addFilterBar(this.page.getEntityType(), this.schema, this.page.getPage(), this.page.getApp().getUIVocabularyAlias() || 'UI');
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Adds filter bar to schema (LR or ALP).
|
|
70
|
+
*
|
|
71
|
+
* @param entityType - the entity type
|
|
72
|
+
* @param schema - the application schema
|
|
73
|
+
* @param v4Page - the actual page in the manifest
|
|
74
|
+
* @param alias - alias definition for the UI vocabulary
|
|
75
|
+
*/
|
|
76
|
+
addFilterBar(entityType, schema, v4Page, alias) {
|
|
77
|
+
const selectionFields = alias && entityType?.annotations?.[alias]?.SelectionFields;
|
|
78
|
+
(0, listReport_2.addSelectionFields)(entityType, schema.getSchema(), selectionFields);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.FilterBar = FilterBar;
|
|
82
|
+
/**
|
|
83
|
+
* Adjusts the entity type if a different entity set is maintained for a view.
|
|
84
|
+
*
|
|
85
|
+
* @param {EntitySet} entitySet - actual entity set (AVT information)
|
|
86
|
+
* @param view - the current view in manifest
|
|
87
|
+
* @param page - the page object
|
|
88
|
+
* @returns the target entity type
|
|
89
|
+
*/
|
|
90
|
+
function getTargetEntityType(entitySet, view, page) {
|
|
91
|
+
let targetEntityType = page.getEntityType();
|
|
92
|
+
let viewEntitySet = entitySet;
|
|
93
|
+
if (view['entitySet'] && view['entitySet'] !== entitySet.name) {
|
|
94
|
+
viewEntitySet = page
|
|
95
|
+
.getApp()
|
|
96
|
+
.getAVT()
|
|
97
|
+
?.entitySets.find((es) => {
|
|
98
|
+
return es.name === view['entitySet'];
|
|
99
|
+
});
|
|
100
|
+
targetEntityType = viewEntitySet.entityType;
|
|
101
|
+
}
|
|
102
|
+
return targetEntityType;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Adapts the table definition in schema.
|
|
106
|
+
* Evaluates the path depending on if defaultTemplateAnnotationPath or Selection-/PresentationVariant is present.
|
|
107
|
+
*
|
|
108
|
+
* @param schema - the app-specific JSON schema
|
|
109
|
+
* @param page - the page object
|
|
110
|
+
* @param templateAnnotation - defaultTemplateAnnotationPath as registered in manifest
|
|
111
|
+
* @param tableDefinitionName - The name of the table definition in the schema
|
|
112
|
+
*/
|
|
113
|
+
function adaptTableDefinition(schema, page, templateAnnotation, tableDefinitionName) {
|
|
114
|
+
const logger = page.getApp().getLogger();
|
|
115
|
+
//here: tableDefinitionName = DefinitionName.Table
|
|
116
|
+
const tableDefinition = schema.getDefinition(tableDefinitionName);
|
|
117
|
+
const { visualization, targetAnnotation, namespace } = (0, listReport_2.analyzeViewAnnotation)(templateAnnotation, page.getUIAnnotations(), undefined, __1.Visualization.LineItem, page.getApp().getLogger());
|
|
118
|
+
if (visualization) {
|
|
119
|
+
const annotationTerm = visualization.split('.')[1];
|
|
120
|
+
const annotationTermInSchema = `${__1.DefinitionName.LineItems}OfSPV::${(0, common_1.prepareRef)(annotationTerm)}`;
|
|
121
|
+
const spvTable = schema.cloneDefinition(tableDefinitionName, `${tableDefinitionName}SPV`);
|
|
122
|
+
schema.setPropertyRef(spvTable, ['properties', 'toolBar'], `${__1.DefinitionName.ToolBar}<${annotationTermInSchema}>`);
|
|
123
|
+
// Switch from generic column to specific definition
|
|
124
|
+
// schema.setProperty(spvTable, ['properties', 'columns'], {});
|
|
125
|
+
schema.setProperty(spvTable, [__1.SchemaTag.annotationPath], targetAnnotation);
|
|
126
|
+
schema.setPropertyRef(spvTable, ['properties', 'columns'], annotationTermInSchema);
|
|
127
|
+
schema.setDefinitionRef(tableDefinition, `${tableDefinitionName}SPV`);
|
|
128
|
+
schema.removeProperty(spvTable, __1.SchemaTag.isViewNode);
|
|
129
|
+
schema.removeProperty(tableDefinition, 'properties');
|
|
130
|
+
schema.setProperty(tableDefinition, [__1.SchemaTag.annotationPath], `/${namespace}/@${templateAnnotation}`);
|
|
131
|
+
const lineItemAnnotation = page.getUIAnnotations()[annotationTerm];
|
|
132
|
+
if (!lineItemAnnotation) {
|
|
133
|
+
(0, __1.log)(logger, {
|
|
134
|
+
severity: "error" /* LogSeverity.Error */,
|
|
135
|
+
message: i18next_1.default.t('NOTARGET', { target: annotationTerm })
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
const dataForLineItem = {
|
|
139
|
+
isObjectPage: false,
|
|
140
|
+
appSchema: schema.getSchema(),
|
|
141
|
+
lineItemAnnotation,
|
|
142
|
+
entityType: page.entity.type,
|
|
143
|
+
oDataServiceAVT: page.getApp().getAVT(),
|
|
144
|
+
lineItemId: annotationTermInSchema
|
|
145
|
+
};
|
|
146
|
+
(0, utils_1.addLineItemsTypeToSchema)(dataForLineItem);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
schema.setPropertyRef(tableDefinition, ['properties', 'toolBar'], `${__1.DefinitionName.ToolBarLR}`);
|
|
150
|
+
schema.setPropertyRef(tableDefinition, ['properties', 'columns'], `${__1.DefinitionName.LineItems}`);
|
|
151
|
+
// Switch from generic column to specific definition
|
|
152
|
+
const lineItemAnnotation = page.getUIAnnotations()?.LineItem;
|
|
153
|
+
if (!lineItemAnnotation && !page.getPage().options?.settings?.views?.paths) {
|
|
154
|
+
(0, __1.log)(logger, {
|
|
155
|
+
severity: "error" /* LogSeverity.Error */,
|
|
156
|
+
message: i18next_1.default.t('NOLINEITEMS')
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const dataForLineItem = {
|
|
160
|
+
isObjectPage: false,
|
|
161
|
+
appSchema: schema.getSchema(),
|
|
162
|
+
lineItemAnnotation,
|
|
163
|
+
entityType: page.entity.type,
|
|
164
|
+
oDataServiceAVT: page.getApp().getAVT(),
|
|
165
|
+
lineItemId: __1.DefinitionName.LineItems
|
|
166
|
+
};
|
|
167
|
+
(0, utils_1.addLineItemsTypeToSchema)(dataForLineItem);
|
|
168
|
+
}
|
|
169
|
+
// Add "manifestPath" for table properties
|
|
170
|
+
(0, listReport_1.addManifestPathsToPropertiesLR)(schema.getSchema(), tableDefinitionName, tableDefinition, {
|
|
171
|
+
pageName: page.getPage().id,
|
|
172
|
+
manifest: page.getApp().getManifest(),
|
|
173
|
+
targetAnnotation
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Add list report views to the app-specific schema.
|
|
178
|
+
*
|
|
179
|
+
* @param schema - app-specific JSON schema
|
|
180
|
+
* @param viewsPaths - views' paths' section in the manifest
|
|
181
|
+
* @param page - the given page in manifest
|
|
182
|
+
* @param tableDefinitionName - The name of the table definition in the schema
|
|
183
|
+
*/
|
|
184
|
+
function addLRViews(schema, viewsPaths, page, tableDefinitionName) {
|
|
185
|
+
const tableDefinition = schema.getDefinition(tableDefinitionName);
|
|
186
|
+
tableDefinition.properties = {
|
|
187
|
+
annotationPath: tableDefinition.properties.annotationPath,
|
|
188
|
+
initialLoad: tableDefinition.properties.initialLoad,
|
|
189
|
+
views: tableDefinition.properties.views
|
|
190
|
+
};
|
|
191
|
+
const viewsDefinition = schema.getDefinition(__1.DefinitionName.MultiTableModeV4);
|
|
192
|
+
for (const view of viewsPaths) {
|
|
193
|
+
if (!view[__1.SchemaTag.key]) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
let navPropName = undefined;
|
|
197
|
+
const targetEntityType = getTargetEntityType(page.entity.set, view, page);
|
|
198
|
+
const uiAnnotations = targetEntityType?.annotations.UI;
|
|
199
|
+
const { visualization, targetAnnotation, namespace, title } = (0, listReport_2.analyzeViewAnnotation)(view?.[__1.SchemaTag.annotationPath], uiAnnotations, view[__1.SchemaTag.key], undefined, page.getApp().getLogger());
|
|
200
|
+
if (view['entitySet']) {
|
|
201
|
+
navPropName = page.getEntityType().navigationProperties.find((np) => {
|
|
202
|
+
return np.targetTypeName === namespace;
|
|
203
|
+
})?.name;
|
|
204
|
+
}
|
|
205
|
+
const viewKey = (0, common_1.prepareRef)(view[__1.SchemaTag.key]);
|
|
206
|
+
const commonInputParameters = {
|
|
207
|
+
viewKey,
|
|
208
|
+
appSchema: schema.getSchema(),
|
|
209
|
+
targetAnnotation,
|
|
210
|
+
navPropName,
|
|
211
|
+
targetEntityType,
|
|
212
|
+
title,
|
|
213
|
+
entitySet: view['entitySet']
|
|
214
|
+
};
|
|
215
|
+
(0, listReport_2.addLRViewParts)(visualization, viewsDefinition, commonInputParameters, { serviceAVT: page.getApp().getAVT(), entityType: targetEntityType, logger: page.getApp().getLogger() }, page, uiAnnotations, view);
|
|
216
|
+
(0, listReport_2.addTagsToView)(viewsDefinition, viewKey, namespace, view);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
class TableAndViews extends BaseConstruct {
|
|
220
|
+
/**
|
|
221
|
+
* Constructor for TableAndViews.
|
|
222
|
+
*
|
|
223
|
+
* @param schema - the application schema
|
|
224
|
+
* @param page - the page object
|
|
225
|
+
* @param logger - optional extension logger
|
|
226
|
+
*/
|
|
227
|
+
constructor(schema, page, logger) {
|
|
228
|
+
super(schema, page, logger);
|
|
229
|
+
}
|
|
230
|
+
addTableAndViews() {
|
|
231
|
+
const views = this.page.getPage().options?.settings?.views;
|
|
232
|
+
const defaultAnnotation = (0, listReport_2.getDefaultAnnotationPath)(this.page.getPage(), this.page.getEntityType(), this.page.getTemplate().type);
|
|
233
|
+
const tableDefinitionName = (0, utils_1.alignSchemaWithTemplateType)(this.schema.getSchema(), this.page.getTemplate().type);
|
|
234
|
+
if (this.page.getTemplate().type === __1.TemplateType.ListReportObjectPageV4) {
|
|
235
|
+
this.schema.hide(this.schema.getRootProperty([__1.PropertyName.chart]));
|
|
236
|
+
adaptTableDefinition(this.schema, this.page, defaultAnnotation, tableDefinitionName);
|
|
237
|
+
if (!views) {
|
|
238
|
+
this.schema.setProperty(__1.DefinitionName.MultiTableModeV4, ['properties'], {});
|
|
239
|
+
}
|
|
240
|
+
else if (views.paths) {
|
|
241
|
+
this.schema.cleanup(['LineItems', 'ToolBar<LineItems>', 'Actions<LineItems>']);
|
|
242
|
+
addLRViews(this.schema, views.paths, this.page, tableDefinitionName);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
else if (this.page.getTemplate().type === __1.TemplateType.AnalyticalListPageV4) {
|
|
246
|
+
const generateParameters = {
|
|
247
|
+
logger: this.logger,
|
|
248
|
+
entityType: this.page.getEntityType(),
|
|
249
|
+
serviceAVT: this.page.getApp().getAVT()
|
|
250
|
+
};
|
|
251
|
+
(0, listReport_2.addALPViews)(this.schema.getSchema(), views?.paths, generateParameters, defaultAnnotation, this.page.getPage(), tableDefinitionName);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Instantiates the TableAndViews and adds them to the schema.
|
|
256
|
+
*/
|
|
257
|
+
instantiate() {
|
|
258
|
+
this.addTableAndViews();
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.TableAndViews = TableAndViews;
|
|
262
|
+
//# sourceMappingURL=ListReportUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListReportUtils.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/generate/ListReportUtils.ts"],"names":[],"mappings":";;;;;;AACA,gCAAkH;AAElH,0CAAuF;AACvF,6CAA8D;AAG9D,6CAO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C5E,MAAM,kBAAkB,GAAyC;gBAC7D,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACrC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE;aAC1C,CAAC;YACF,IAAA,wBAAW,EACP,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EACvB,KAAK,EAAE,KAAK,EACZ,kBAAiD,EACjD,iBAAiB,EACjB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EACnB,mBAAmB,CACtB,CAAC;QACN,CAAC;IACL,CAAC;IACD;;OAEG;IACH,WAAW;QACP,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;CACJ;AApDD,sCAoDC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Visualization } from '@sap/ux-specification-types';
|
|
2
|
-
import type { GenerateAppSchemaParameters, ExtensionLogger } from '@sap/ux-specification-types';
|
|
1
|
+
import { TemplateType, Visualization } from '@sap/ux-specification-types';
|
|
2
|
+
import type { v4, GenerateAppSchemaParameters, ExtensionLogger } from '@sap/ux-specification-types';
|
|
3
3
|
import type { AnnotationTerm, EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
4
4
|
import type { SelectionFields } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
5
|
+
import { type ManifestPathParams } from '../../common';
|
|
5
6
|
import type { Definition } from 'typescript-json-schema';
|
|
7
|
+
import { Page } from '../sync-rules/Page';
|
|
6
8
|
/**
|
|
7
9
|
* Adds the selection fields to the app schema, as properties of the FilterBar
|
|
8
10
|
* @param {EntityType} entityType - the entity type as part of the AVT ConvertedMetadata
|
|
@@ -29,6 +31,63 @@ export declare function analyzeViewAnnotation(annotationPath: string, uIAnnotati
|
|
|
29
31
|
namespace: string;
|
|
30
32
|
title: string;
|
|
31
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Adds the ALP views to the app-specific schema
|
|
36
|
+
* @param {Definition} appSchema - app-specific JSON schema
|
|
37
|
+
* @param {Array<Object>} viewsPaths - views' paths' section in the manifest
|
|
38
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
39
|
+
* @param {string} templateAnnotation - defaultTemplateAnnotationPath as registered in manifest
|
|
40
|
+
* @param {SapUiAppPageV4} v4Page - actual page in the manifest
|
|
41
|
+
*/
|
|
42
|
+
export declare function addALPViews(appSchema: Definition, viewsPaths: Array<object>, generateParameters: GenerateAppSchemaParameters, templateAnnotation: string, v4Page: v4.SapUiAppPageV4, tableDefinitionName: string): void;
|
|
43
|
+
export type ViewsParameters = {
|
|
44
|
+
viewKey: string;
|
|
45
|
+
appSchema: Definition;
|
|
46
|
+
targetAnnotation: string;
|
|
47
|
+
navPropName: string;
|
|
48
|
+
targetEntityType: EntityType;
|
|
49
|
+
title: string;
|
|
50
|
+
entitySet?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Adds the schema tags to a given view
|
|
54
|
+
* @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
|
|
55
|
+
* @param viewKey - key property of the view
|
|
56
|
+
* @param namespace - target namespace for annotations
|
|
57
|
+
* @param view - the given view
|
|
58
|
+
*/
|
|
59
|
+
export declare function addTagsToView(viewsDefinition: Definition, viewKey: string, namespace: string, view: object): void;
|
|
60
|
+
/**
|
|
61
|
+
* Adds definition parts to a LR View (LineItem/Chart)
|
|
62
|
+
* @param {string} templateAnnotation - defaultTemplateAnnotationPath as registered in manifest
|
|
63
|
+
* @param {string} visualization - visualization of the annotation
|
|
64
|
+
* @param viewsDefinition - the views definition in app schema (MultiTableModeV4)
|
|
65
|
+
* @param commonInputParameters - list of input parameters as collected by the calling instance
|
|
66
|
+
* @param generateParameters - list of API input parameters
|
|
67
|
+
* @param generateParameters.serviceAVT - OData service AVT information
|
|
68
|
+
* @param generateParameters.entityType - entity type of the current page
|
|
69
|
+
* @param generateParameters.logger - extension logger
|
|
70
|
+
* @param page - the current page object
|
|
71
|
+
* @param uiAnnotations - UI annotations of the given entityType
|
|
72
|
+
* @param view - the given view
|
|
73
|
+
*/
|
|
74
|
+
export declare function addLRViewParts(visualization: string, viewsDefinition: Definition, commonInputParameters: ViewsParameters, { serviceAVT, entityType, logger }: Partial<GenerateAppSchemaParameters>, page: Page, uiAnnotations: object, view: object): void;
|
|
75
|
+
/**
|
|
76
|
+
* Checks for the default annotation path to use for LR table
|
|
77
|
+
* @param {SapUiAppPageV4} v4Page - actual page in the manifest
|
|
78
|
+
* @param {EntityType} entityType - actual entity type (AVT information)
|
|
79
|
+
* @returns {string} annotation term
|
|
80
|
+
*/
|
|
81
|
+
export declare function getDefaultAnnotationPath(v4Page: v4.SapUiAppPageV4, entityType: EntityType, templateType: TemplateType): string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
84
|
+
*
|
|
85
|
+
* @param appSchema - Full schema.
|
|
86
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
87
|
+
* @param definition - The definition object containing property schemas.
|
|
88
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
89
|
+
*/
|
|
90
|
+
export declare function addManifestPathsToPropertiesLR(appSchema: Definition, definitionName: string | undefined, definition: Definition, pathParams: ManifestPathParams): void;
|
|
32
91
|
/**
|
|
33
92
|
* Generates an app specific schema for the FE V4 ListReport from the generic schema.
|
|
34
93
|
* Generic types are replaced by information from the app specific annotations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listReport.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/generate/listReport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listReport.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/generate/listReport.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,YAAY,EACZ,aAAa,EAUhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,E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