@sap/ux-specification 1.71.151 → 1.71.153
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 +53 -1
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/index-min.js +197 -188
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +111 -294
- package/dist/specification/package.json +10 -9
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +2 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts +9 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +51 -2
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +1 -0
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +2 -1
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/i18n/i18n.d.ts.map +1 -1
- package/dist/specification/src/i18n/i18n.js +2 -1
- package/dist/specification/src/i18n/i18n.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.d.ts +4 -2
- package/dist/specification/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.js +4 -2
- package/dist/specification/src/sync/common/decoration/control.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +18 -1
- package/dist/specification/src/sync/common/utils.d.ts +2 -2
- package/dist/specification/src/sync/common/utils.js +3 -3
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +5 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +39 -27
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +6 -4
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts +2 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +54 -21
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +70 -18
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +123 -25
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +7 -7
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.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 +33 -6
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +2 -2
- package/dist/specification/src/sync/v2/generate/utils.js +2 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts +0 -15
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +5 -160
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +42 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +410 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +25 -6
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +2 -0
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +25 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +28 -4
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +22 -3
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +5 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +1 -0
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/package.json +11 -10
|
@@ -1,24 +1,58 @@
|
|
|
1
1
|
import type { v2, ViewTemplateType } from '@sap/ux-specification-types';
|
|
2
|
+
import { type IdGeneratorFunction } from '@sap-ux/fe-fpm-writer';
|
|
2
3
|
export declare enum ViewTypes {
|
|
3
4
|
XML = "xml",
|
|
4
5
|
HTML = "html",
|
|
5
6
|
JS = "js",
|
|
6
7
|
JSON = "json"
|
|
7
8
|
}
|
|
9
|
+
export declare const CONFIG: {
|
|
10
|
+
"AnalyticalTableColumnsExtension.xml": {
|
|
11
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
12
|
+
ids: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
"fragment.xml": {
|
|
16
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
17
|
+
ids: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
"GridTableColumnsExtension.xml": {
|
|
21
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
22
|
+
ids: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
"ResponsiveTableColumnsExtension.xml": {
|
|
26
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
27
|
+
ids: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
"TreeTableColumnsExtension.xml": {
|
|
31
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
32
|
+
ids: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
"view.xml": {
|
|
36
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
37
|
+
ids: Record<string, string>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
8
41
|
/**
|
|
9
42
|
* Method which reads passed template and renders it using passed template object.
|
|
10
43
|
* @param {string} templatePath - Path to template.
|
|
11
44
|
* @param {{ [key: string]: string }} templateData - Template data object.
|
|
12
|
-
* @
|
|
45
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
46
|
+
* @returns {string} the rendered template's string
|
|
13
47
|
*/
|
|
14
48
|
export declare const renderTemplate: (templatePath: string, templateData: {
|
|
15
49
|
[key: string]: string | boolean;
|
|
16
|
-
}) => string;
|
|
50
|
+
}, generateId?: IdGeneratorFunction) => string;
|
|
17
51
|
/**
|
|
18
52
|
* Method which reads passed template and renders it using passed template object.
|
|
19
53
|
* @param {string} name - View's name.
|
|
20
54
|
* @param {string} namespace - Application namespace.
|
|
21
|
-
* @
|
|
55
|
+
* @returns {string} the rendered template's string
|
|
22
56
|
*/
|
|
23
57
|
export declare const getControllerContent: (name: string, namespace: string, fcl?: boolean, newControllerRouting?: boolean) => string;
|
|
24
58
|
/**
|
|
@@ -26,43 +60,61 @@ export declare const getControllerContent: (name: string, namespace: string, fcl
|
|
|
26
60
|
* @param {string} name - View's name.
|
|
27
61
|
* @param {string} namespace - Application namespace.
|
|
28
62
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {boolean} [
|
|
31
|
-
* @
|
|
63
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
64
|
+
* @param {boolean} [controller] - Generate controller.
|
|
65
|
+
* @param {boolean} [page] - Is view should contains page structure or not - page structure uses 'sap.m.App' in view template.
|
|
66
|
+
* @returns {string} the rendered template's string
|
|
32
67
|
*/
|
|
33
|
-
export declare const getViewContent: (name: string, namespace: string, sourceType: ViewTypes, controller?: boolean, page?: boolean) => string;
|
|
68
|
+
export declare const getViewContent: (name: string, namespace: string, sourceType: ViewTypes, generateId: IdGeneratorFunction, controller?: boolean, page?: boolean) => string;
|
|
34
69
|
/**
|
|
35
70
|
* Method which reads template for fragment and returns rendered result of fragment.
|
|
36
71
|
* @param {string} name - View's name.
|
|
37
72
|
* @param {string} namespace - Application namespace.
|
|
38
73
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
74
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
39
75
|
* @param {boolean} handler - JS handler.
|
|
40
|
-
* @
|
|
76
|
+
* @returns {string} the rendered template's string
|
|
41
77
|
*/
|
|
42
|
-
export declare const getFragmentContent: (name: string, namespace: string, sourceType: ViewTypes, handler?: boolean) => string;
|
|
78
|
+
export declare const getFragmentContent: (name: string, namespace: string, sourceType: ViewTypes, generateId: IdGeneratorFunction, handler?: boolean) => string;
|
|
43
79
|
/**
|
|
44
80
|
* Method which reads passed template and renders it using passed template object.
|
|
45
81
|
* @param {string} name - View's name.
|
|
46
82
|
* @param {string} namespace - Application namespace.
|
|
47
|
-
* @
|
|
83
|
+
* @returns {string} the rendered template's string
|
|
48
84
|
*/
|
|
49
85
|
export declare const getFragmentJsContent: () => string;
|
|
50
86
|
/**
|
|
51
|
-
* Method which reads the template for a single column extension that shall be added to a fragment
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
87
|
+
* Method which reads the template for a single column extension that shall be added to a fragment.
|
|
88
|
+
*
|
|
89
|
+
* @param column - data (from config) to be inserted in the template
|
|
90
|
+
* @param template - The type of view template (e.g., XML, HTML, JSON).
|
|
91
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
92
|
+
* @returns {string} the rendered template's string
|
|
54
93
|
*/
|
|
55
|
-
export declare const getSingleColumnContent: (column: v2.TableCustomColumn, template: ViewTemplateType) => string;
|
|
94
|
+
export declare const getSingleColumnContent: (column: v2.TableCustomColumn, template: ViewTemplateType, generateId: IdGeneratorFunction) => string;
|
|
56
95
|
/**
|
|
57
96
|
* Method which reads the template for a column extension fragment and returns rendered result of fragment.
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
97
|
+
*
|
|
98
|
+
* @param customColumns - array of all column extensions' data
|
|
99
|
+
* @param templateType - The type of view template (e.g., XML, HTML, JSON).
|
|
100
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
101
|
+
* @returns {string} the rendered template's string
|
|
60
102
|
*/
|
|
61
|
-
export declare const getColumnFragmentContent: (customColumns: v2.TableCustomColumns, templateType: ViewTemplateType) => string;
|
|
103
|
+
export declare const getColumnFragmentContent: (customColumns: v2.TableCustomColumns, templateType: ViewTemplateType, generateId: IdGeneratorFunction) => string;
|
|
62
104
|
/**
|
|
63
105
|
* Creates the content for a ResponsiveTableCellsExtension fragment
|
|
64
106
|
* @param customColumns - list of custom columns; for each of them a dummy entry gets created in the view content.
|
|
107
|
+
* @param generateId - function to generate ids for new entries in the fragment.
|
|
65
108
|
* @returns {string} the rendered template's string
|
|
66
109
|
*/
|
|
67
|
-
export declare const getResponsiveTableCellsFragment: (customColumns: v2.TableCustomColumns) => string;
|
|
110
|
+
export declare const getResponsiveTableCellsFragment: (customColumns: v2.TableCustomColumns, generateId: IdGeneratorFunction) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Method to construct full name of view or fragment.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} name Shorten name of view or fragment.
|
|
115
|
+
* @param {boolean} isFragment Is fragment or view.
|
|
116
|
+
* @param {ViewTypes} viewType type of view or fragment.
|
|
117
|
+
* @returns {string} Full path of view or fragment name.
|
|
118
|
+
*/
|
|
119
|
+
export declare function getViewFileName(name: string, isFragment: boolean, viewType?: ViewTypes): string;
|
|
68
120
|
//# sourceMappingURL=view-controller-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"view-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKxE,OAAO,EAAE,KAAK,mBAAmB,EAAoC,MAAM,uBAAuB,CAAC;AAInG,oBAAY,SAAS;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,EAAE,OAAO;IACT,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,MAAM;;8BAEW,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;;8BAWrD,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;;8BAWrD,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;;8BAWrD,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;;8BAUrD,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;;8BAWrD,mBAAmB,KAAG;YAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE;;CAUlF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACvB,cAAc,MAAM,EACpB,cAAc;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,EACjD,aAAa,mBAAmB,KACjC,MAQF,CAAC;AAYF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC7B,MAAM,MAAM,EACZ,WAAW,MAAM,EACjB,aAAW,EACX,8BAA4B,KAC7B,MAMF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GACvB,MAAM,MAAM,EACZ,WAAW,MAAM,EACjB,YAAY,SAAS,EACrB,YAAY,mBAAmB,EAC/B,oBAAkB,EAClB,cAAW,KACZ,MAWF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAC3B,MAAM,MAAM,EACZ,WAAW,MAAM,EACjB,YAAY,SAAS,EACrB,YAAY,mBAAmB,EAC/B,iBAAe,KAChB,MAUF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAEvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAC/B,QAAQ,EAAE,CAAC,iBAAiB,EAC5B,UAAU,gBAAgB,EAC1B,YAAY,mBAAmB,KAChC,MASF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACjC,eAAe,EAAE,CAAC,kBAAkB,EACpC,cAAc,gBAAgB,EAC9B,YAAY,mBAAmB,KAChC,MAUF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,GACxC,eAAe,EAAE,CAAC,kBAAkB,EACpC,YAAY,mBAAmB,KAChC,MAYF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,YAAgB,GAAG,MAAM,CAEnG"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.ViewTypes = void 0;
|
|
3
|
+
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.CONFIG = exports.ViewTypes = void 0;
|
|
4
|
+
exports.getViewFileName = getViewFileName;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
6
7
|
const ejs_1 = require("ejs");
|
|
7
8
|
const fs_1 = require("fs");
|
|
9
|
+
const fe_fpm_writer_1 = require("@sap-ux/fe-fpm-writer");
|
|
8
10
|
const templatesPath = (0, path_1.join)(__dirname, 'templates');
|
|
9
11
|
var ViewTypes;
|
|
10
12
|
(function (ViewTypes) {
|
|
@@ -13,21 +15,94 @@ var ViewTypes;
|
|
|
13
15
|
ViewTypes["JS"] = "js";
|
|
14
16
|
ViewTypes["JSON"] = "json";
|
|
15
17
|
})(ViewTypes || (exports.ViewTypes = ViewTypes = {}));
|
|
18
|
+
exports.CONFIG = {
|
|
19
|
+
['AnalyticalTableColumnsExtension.xml']: {
|
|
20
|
+
getData: (generateId) => {
|
|
21
|
+
return {
|
|
22
|
+
ids: {
|
|
23
|
+
label: generateId('Label'),
|
|
24
|
+
text: generateId('Text'),
|
|
25
|
+
customData: generateId('CustomData')
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
['fragment.xml']: {
|
|
31
|
+
getData: (generateId) => {
|
|
32
|
+
return {
|
|
33
|
+
ids: {
|
|
34
|
+
verticalLayout: generateId('VerticalLayout'),
|
|
35
|
+
text: generateId('Text'),
|
|
36
|
+
button: generateId('Button')
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
['GridTableColumnsExtension.xml']: {
|
|
42
|
+
getData: (generateId) => {
|
|
43
|
+
return {
|
|
44
|
+
ids: {
|
|
45
|
+
label: generateId('Label'),
|
|
46
|
+
text: generateId('Text'),
|
|
47
|
+
customData: generateId('CustomData')
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
['ResponsiveTableColumnsExtension.xml']: {
|
|
53
|
+
getData: (generateId) => {
|
|
54
|
+
return {
|
|
55
|
+
ids: {
|
|
56
|
+
text: generateId('Text'),
|
|
57
|
+
customData: generateId('CustomData')
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
['TreeTableColumnsExtension.xml']: {
|
|
63
|
+
getData: (generateId) => {
|
|
64
|
+
return {
|
|
65
|
+
ids: {
|
|
66
|
+
label: generateId('Label'),
|
|
67
|
+
text: generateId('Text'),
|
|
68
|
+
customData: generateId('CustomData')
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
['view.xml']: {
|
|
74
|
+
getData: (generateId) => {
|
|
75
|
+
return {
|
|
76
|
+
ids: {
|
|
77
|
+
app: generateId('App'),
|
|
78
|
+
page: generateId('Page'),
|
|
79
|
+
label: generateId('Label')
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
16
85
|
/**
|
|
17
86
|
* Method which reads passed template and renders it using passed template object.
|
|
18
87
|
* @param {string} templatePath - Path to template.
|
|
19
88
|
* @param {{ [key: string]: string }} templateData - Template data object.
|
|
20
|
-
* @
|
|
89
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
90
|
+
* @returns {string} the rendered template's string
|
|
21
91
|
*/
|
|
22
|
-
const renderTemplate = (templatePath, templateData) => {
|
|
92
|
+
const renderTemplate = (templatePath, templateData, generateId) => {
|
|
23
93
|
const template = (0, fs_1.readFileSync)(templatePath, 'utf8');
|
|
94
|
+
const templateKey = (0, fe_fpm_writer_1.getRelativeTemplateComponentPath)(templatePath);
|
|
95
|
+
if (generateId && exports.CONFIG[templateKey] && typeof exports.CONFIG[templateKey].getData === 'function') {
|
|
96
|
+
const additionalData = exports.CONFIG[templateKey].getData(generateId);
|
|
97
|
+
templateData = { ...templateData, ...additionalData };
|
|
98
|
+
}
|
|
24
99
|
return (0, ejs_1.render)(template, templateData);
|
|
25
100
|
};
|
|
26
101
|
exports.renderTemplate = renderTemplate;
|
|
27
102
|
/**
|
|
28
103
|
* Method escapes view name.
|
|
29
104
|
* @param {string} name - View's name.
|
|
30
|
-
* @
|
|
105
|
+
* @returns {string} Escaped view name.
|
|
31
106
|
*/
|
|
32
107
|
const escapeViewName = (name) => {
|
|
33
108
|
// Remove all special characters
|
|
@@ -37,7 +112,7 @@ const escapeViewName = (name) => {
|
|
|
37
112
|
* Method which reads passed template and renders it using passed template object.
|
|
38
113
|
* @param {string} name - View's name.
|
|
39
114
|
* @param {string} namespace - Application namespace.
|
|
40
|
-
* @
|
|
115
|
+
* @returns {string} the rendered template's string
|
|
41
116
|
*/
|
|
42
117
|
const getControllerContent = (name, namespace, fcl = false, newControllerRouting = false) => {
|
|
43
118
|
const templateData = {
|
|
@@ -52,11 +127,12 @@ exports.getControllerContent = getControllerContent;
|
|
|
52
127
|
* @param {string} name - View's name.
|
|
53
128
|
* @param {string} namespace - Application namespace.
|
|
54
129
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {boolean} [
|
|
57
|
-
* @
|
|
130
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
131
|
+
* @param {boolean} [controller] - Generate controller.
|
|
132
|
+
* @param {boolean} [page] - Is view should contains page structure or not - page structure uses 'sap.m.App' in view template.
|
|
133
|
+
* @returns {string} the rendered template's string
|
|
58
134
|
*/
|
|
59
|
-
const getViewContent = (name, namespace, sourceType, controller = false, page = true) => {
|
|
135
|
+
const getViewContent = (name, namespace, sourceType, generateId, controller = false, page = true) => {
|
|
60
136
|
const escapedName = escapeViewName(name);
|
|
61
137
|
const templateData = {
|
|
62
138
|
name: escapedName,
|
|
@@ -66,7 +142,7 @@ const getViewContent = (name, namespace, sourceType, controller = false, page =
|
|
|
66
142
|
if (controller) {
|
|
67
143
|
templateData.controllerName = namespace + '.controller.' + escapedName;
|
|
68
144
|
}
|
|
69
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData);
|
|
145
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData, generateId);
|
|
70
146
|
};
|
|
71
147
|
exports.getViewContent = getViewContent;
|
|
72
148
|
/**
|
|
@@ -74,10 +150,11 @@ exports.getViewContent = getViewContent;
|
|
|
74
150
|
* @param {string} name - View's name.
|
|
75
151
|
* @param {string} namespace - Application namespace.
|
|
76
152
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
153
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
77
154
|
* @param {boolean} handler - JS handler.
|
|
78
|
-
* @
|
|
155
|
+
* @returns {string} the rendered template's string
|
|
79
156
|
*/
|
|
80
|
-
const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
157
|
+
const getFragmentContent = (name, namespace, sourceType, generateId, handler = false) => {
|
|
81
158
|
const escapedName = escapeViewName(name);
|
|
82
159
|
const templateData = {
|
|
83
160
|
name: escapedName,
|
|
@@ -86,25 +163,28 @@ const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
|
86
163
|
if (handler) {
|
|
87
164
|
templateData.handler = `${namespace.replace(/\./g, '/')}/${ux_specification_types_1.DirName.Fragment}/${escapedName}`;
|
|
88
165
|
}
|
|
89
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData);
|
|
166
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData, generateId);
|
|
90
167
|
};
|
|
91
168
|
exports.getFragmentContent = getFragmentContent;
|
|
92
169
|
/**
|
|
93
170
|
* Method which reads passed template and renders it using passed template object.
|
|
94
171
|
* @param {string} name - View's name.
|
|
95
172
|
* @param {string} namespace - Application namespace.
|
|
96
|
-
* @
|
|
173
|
+
* @returns {string} the rendered template's string
|
|
97
174
|
*/
|
|
98
175
|
const getFragmentJsContent = () => {
|
|
99
176
|
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.js'), {});
|
|
100
177
|
};
|
|
101
178
|
exports.getFragmentJsContent = getFragmentJsContent;
|
|
102
179
|
/**
|
|
103
|
-
* Method which reads the template for a single column extension that shall be added to a fragment
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
180
|
+
* Method which reads the template for a single column extension that shall be added to a fragment.
|
|
181
|
+
*
|
|
182
|
+
* @param column - data (from config) to be inserted in the template
|
|
183
|
+
* @param template - The type of view template (e.g., XML, HTML, JSON).
|
|
184
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
185
|
+
* @returns {string} the rendered template's string
|
|
106
186
|
*/
|
|
107
|
-
const getSingleColumnContent = (column, template) => {
|
|
187
|
+
const getSingleColumnContent = (column, template, generateId) => {
|
|
108
188
|
const templateData = {
|
|
109
189
|
id: column.id,
|
|
110
190
|
text: column.text,
|
|
@@ -112,20 +192,23 @@ const getSingleColumnContent = (column, template) => {
|
|
|
112
192
|
columnIndex: column.columnIndex !== undefined ? column.columnIndex.toString() : undefined,
|
|
113
193
|
leadingProperty: column.leadingProperty
|
|
114
194
|
};
|
|
115
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData);
|
|
195
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData, generateId);
|
|
116
196
|
};
|
|
117
197
|
exports.getSingleColumnContent = getSingleColumnContent;
|
|
118
198
|
/**
|
|
119
199
|
* Method which reads the template for a column extension fragment and returns rendered result of fragment.
|
|
120
|
-
*
|
|
121
|
-
* @
|
|
200
|
+
*
|
|
201
|
+
* @param customColumns - array of all column extensions' data
|
|
202
|
+
* @param templateType - The type of view template (e.g., XML, HTML, JSON).
|
|
203
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
204
|
+
* @returns {string} the rendered template's string
|
|
122
205
|
*/
|
|
123
|
-
const getColumnFragmentContent = (customColumns, templateType) => {
|
|
206
|
+
const getColumnFragmentContent = (customColumns, templateType, generateId) => {
|
|
124
207
|
let fragment = '';
|
|
125
208
|
fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:table="sap.ui.table" xmlns="sap.m">';
|
|
126
209
|
if (customColumns) {
|
|
127
210
|
for (const column of customColumns) {
|
|
128
|
-
const newContent = (0, exports.getSingleColumnContent)(column, templateType);
|
|
211
|
+
const newContent = (0, exports.getSingleColumnContent)(column, templateType, generateId);
|
|
129
212
|
fragment = fragment + '\n' + newContent;
|
|
130
213
|
}
|
|
131
214
|
}
|
|
@@ -135,17 +218,32 @@ exports.getColumnFragmentContent = getColumnFragmentContent;
|
|
|
135
218
|
/**
|
|
136
219
|
* Creates the content for a ResponsiveTableCellsExtension fragment
|
|
137
220
|
* @param customColumns - list of custom columns; for each of them a dummy entry gets created in the view content.
|
|
221
|
+
* @param generateId - function to generate ids for new entries in the fragment.
|
|
138
222
|
* @returns {string} the rendered template's string
|
|
139
223
|
*/
|
|
140
|
-
const getResponsiveTableCellsFragment = (customColumns) => {
|
|
224
|
+
const getResponsiveTableCellsFragment = (customColumns, generateId) => {
|
|
141
225
|
let fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m">';
|
|
226
|
+
let validatedIds = [];
|
|
142
227
|
if (customColumns) {
|
|
143
228
|
customColumns.forEach(() => {
|
|
229
|
+
const newId = generateId('Text', validatedIds);
|
|
230
|
+
validatedIds.push(newId);
|
|
144
231
|
// use same approach as json2xml - use 4 spaces for fragment children elements
|
|
145
|
-
fragment = fragment +
|
|
232
|
+
fragment = fragment + `\n <Text id="${newId}" text="Placeholder"/>`;
|
|
146
233
|
});
|
|
147
234
|
}
|
|
148
235
|
return fragment + '\n' + '</core:FragmentDefinition>';
|
|
149
236
|
};
|
|
150
237
|
exports.getResponsiveTableCellsFragment = getResponsiveTableCellsFragment;
|
|
238
|
+
/**
|
|
239
|
+
* Method to construct full name of view or fragment.
|
|
240
|
+
*
|
|
241
|
+
* @param {string} name Shorten name of view or fragment.
|
|
242
|
+
* @param {boolean} isFragment Is fragment or view.
|
|
243
|
+
* @param {ViewTypes} viewType type of view or fragment.
|
|
244
|
+
* @returns {string} Full path of view or fragment name.
|
|
245
|
+
*/
|
|
246
|
+
function getViewFileName(name, isFragment, viewType = ViewTypes.XML) {
|
|
247
|
+
return isFragment ? `${name}.fragment.${viewType}` : `${name}.view.${viewType}`;
|
|
248
|
+
}
|
|
151
249
|
//# sourceMappingURL=view-controller-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;AAwRA,0CAEC;AA1RD,+BAA4B;AAE5B,wEAAsD;AAEtD,6BAA6B;AAC7B,2BAAkC;AAClC,yDAAmG;AAEnG,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAEnD,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,sBAAS,CAAA;IACT,0BAAa,CAAA;AACjB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAEY,QAAA,MAAM,GAAG;IAClB,CAAC,qCAAqC,CAAC,EAAE;QACrC,OAAO,EAAE,CAAC,UAA+B,EAAmC,EAAE;YAC1E,OAAO;gBACH,GAAG,EAAE;oBACD,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;oBAC1B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;oBACxB,UAAU,EAAE,UAAU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Aa,EAAE,MAAM,GACtB,MAAM,
|
|
1
|
+
{"version":3,"file":"analyticalListReport.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/analyticalListReport.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAiL/E;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAChD,kBAAkB,EAAE,2BAA2B,EAC/C,aAAa,EAAE,MAAM,GACtB,MAAM,CA8HR"}
|
|
@@ -184,6 +184,8 @@ function generateAnalyticalListReportSchemaV2(generateParameters, genericSchema)
|
|
|
184
184
|
(0, utils_1.removeElementsFromEnum)(appSchema.definitions.TableColumnExtensionTypeV2['enum'], [
|
|
185
185
|
ux_specification_types_1.v2.TableColumnExtensionTypeV2.TreeTableColumnsExtension
|
|
186
186
|
]);
|
|
187
|
+
const pageKeys = [];
|
|
188
|
+
const v2Page = (0, import_1.findAnalyticalListPage)(generateParameters.manifest[ux_specification_types_1.ManifestSection.generic].pages, pageKeys, generateParameters.logger);
|
|
187
189
|
const entityType = generateParameters.entitySet?.entityType;
|
|
188
190
|
if (!entityType) {
|
|
189
191
|
(0, extensionLogger_1.log)(generateParameters.logger, {
|
|
@@ -194,8 +196,6 @@ function generateAnalyticalListReportSchemaV2(generateParameters, genericSchema)
|
|
|
194
196
|
else {
|
|
195
197
|
// handle header actions
|
|
196
198
|
(0, utils_1.addStandardHeaderActions)(appSchema);
|
|
197
|
-
const pageKeys = [];
|
|
198
|
-
const v2Page = (0, import_1.findAnalyticalListPage)(generateParameters.manifest[ux_specification_types_1.ManifestSection.generic].pages, pageKeys, generateParameters.logger);
|
|
199
199
|
const annotations = entityType?.annotations?.UI;
|
|
200
200
|
const { lineItemAnnotation, chartAnnotation } = getLineItemAndChartAnnotation(v2Page, annotations, generateParameters.logger);
|
|
201
201
|
//handle line items
|
|
@@ -225,11 +225,6 @@ function generateAnalyticalListReportSchemaV2(generateParameters, genericSchema)
|
|
|
225
225
|
}
|
|
226
226
|
(0, utils_1.addTableColumnExtensions)(appSchema, entityType, v2Page, generateParameters.manifest, generateParameters.fragments);
|
|
227
227
|
(0, listReport_1.addEnumForVariantPaths)(entityType, generateParameters.entitySet, appSchema, generateParameters.serviceAVT);
|
|
228
|
-
// Add manifest path to static nodes in schema
|
|
229
|
-
addManifestPathsToStaticNodes(appSchema, {
|
|
230
|
-
manifest: generateParameters.manifest,
|
|
231
|
-
pageName: pageKeys
|
|
232
|
-
});
|
|
233
228
|
// Delete generic definitions that have been replaced
|
|
234
229
|
delete appSchema.definitions.ALPGridTable;
|
|
235
230
|
delete appSchema.definitions.ALPResponsiveTable;
|
|
@@ -241,6 +236,11 @@ function generateAnalyticalListReportSchemaV2(generateParameters, genericSchema)
|
|
|
241
236
|
delete appSchema.definitions.Actions;
|
|
242
237
|
delete appSchema.definitions.FieldPath;
|
|
243
238
|
}
|
|
239
|
+
// Add manifest path to static nodes in schema
|
|
240
|
+
addManifestPathsToStaticNodes(appSchema, {
|
|
241
|
+
manifest: generateParameters.manifest,
|
|
242
|
+
pageName: pageKeys
|
|
243
|
+
});
|
|
244
244
|
(0, common_1.updatePropertyIndices)(appSchema, ROOT_PROPERTIES_ORDER);
|
|
245
245
|
return appSchema;
|
|
246
246
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyticalListReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/analyticalListReport.ts"],"names":[],"mappings":";;;;;AAkNA,
|
|
1
|
+
{"version":3,"file":"analyticalListReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/analyticalListReport.ts"],"names":[],"mappings":";;;;;AAkNA,oFAiIC;AAnVD,mCAMiB;AACjB,sCAAmD;AACnD,yCAKsB;AACtB,wEASqC;AACrC,6CAAsD;AAGtD,sDAA8B;AAE9B,8DAA+C;AAW/C,oCAAyC;AACzC,iEAAkE;AAClE,+CAA8C;AAC9C,oCAA6E;AAE7E,MAAM,qBAAqB,GAA+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,EAAE,SAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAE3G,qDAAqD;QACrD,OAAO,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC1C,OAAO,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC;QAChD,OAAO,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC;QAChD,OAAO,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC;QAC5C,OAAO,SAAS,CAAC,WAAW,CAAC,iBAAiB,CAAC;QAC/C,OAAO,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;QACrC,OAAO,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC;QAC3C,OAAO,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;QACrC,OAAO,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;IAC3C,CAAC;IACD,8CAA8C;IAC9C,6BAA6B,CAAC,SAAS,EAAE;QACrC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;QACrC,QAAQ,EAAE,QAAQ;KACrB,CAAC,CAAC;IACH,IAAA,8BAAqB,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACxD,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/objectPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/objectPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIR,2BAA2B,EAE9B,MAAM,6BAA6B,CAAC;AAu4BrC;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,kBAAkB,EAAE,2BAA2B,EAC/C,aAAa,EAAE,MAAM,GACtB,MAAM,CAsGR"}
|
|
@@ -14,6 +14,7 @@ const i18n_1 = require("../../../i18n/i18n");
|
|
|
14
14
|
const types_1 = require("../types");
|
|
15
15
|
const utils_2 = require("../utils");
|
|
16
16
|
const factory_1 = require("../export/factory");
|
|
17
|
+
const application_1 = require("../application");
|
|
17
18
|
const ROOT_PROPERTIES_ORDER = ['header', 'sections', 'footer'];
|
|
18
19
|
/**
|
|
19
20
|
* Adds flexChange properties for sub(sections)
|
|
@@ -103,7 +104,7 @@ function addHeaderActionCallBackV2(entityType, appSchema, actionAnnotation, head
|
|
|
103
104
|
* @param {FacetConfig} facet information
|
|
104
105
|
* @param {string} facetKey - key of the facet, as listed in FacetConfigs
|
|
105
106
|
* @param {FileData[]} [fragments] Array with XML fragments.
|
|
106
|
-
* @
|
|
107
|
+
* @returns {string} Name of custom columns definition.
|
|
107
108
|
*/
|
|
108
109
|
function ensureCustomColumnDefinitionExists(appSchema, manifest, entitySetName, entityTypeName, oDataServiceAVT, facet, facetKey, fragments) {
|
|
109
110
|
let suffix, customColumnsDefinitionName;
|
|
@@ -332,7 +333,7 @@ function addDataPointHeaderFacetDataType(appSchema, definitionKey, facet) {
|
|
|
332
333
|
* @param {FacetConfig} facet facet or section information
|
|
333
334
|
* @param {string} facetKey - facet key.
|
|
334
335
|
* @param {SectionTypeV2} sectionType (sub)section type
|
|
335
|
-
* @
|
|
336
|
+
* @returns {object} returns filled form section in app schema.
|
|
336
337
|
*/
|
|
337
338
|
function handleFormSection(appSchema, definitionKey, facet, facetKey, sectionType) {
|
|
338
339
|
appSchema.definitions[definitionKey] = (0, common_1.createDefaultSection)(appSchema, facet, facetKey);
|
|
@@ -346,7 +347,7 @@ function handleFormSection(appSchema, definitionKey, facet, facetKey, sectionTyp
|
|
|
346
347
|
* Mapping of facet type to (sub)section type to enable correct further handling
|
|
347
348
|
* @param {FacetBase} facetType - facet type to be mapped
|
|
348
349
|
* @param {boolean} isSubSection - if section is subsection of section
|
|
349
|
-
* @
|
|
350
|
+
* @returns {SectionTypeV2} sectionType (sub)section type
|
|
350
351
|
*/
|
|
351
352
|
function getSectionType(facetType, isSubSection, isHeaderFacet) {
|
|
352
353
|
const headerSectionMap = new Map([
|
|
@@ -390,7 +391,7 @@ function getSectionType(facetType, isSubSection, isHeaderFacet) {
|
|
|
390
391
|
* @param {FacetConfig} facet facet or section information
|
|
391
392
|
* @param {string} facetKey - facet key.
|
|
392
393
|
* @param {SectionTypeV2} sectionType (sub)section type
|
|
393
|
-
* @
|
|
394
|
+
* @returns {string} reference key
|
|
394
395
|
*/
|
|
395
396
|
function getReferenceKey(facet, facetKey, sectionType) {
|
|
396
397
|
let referenceKey = facet.ID || facetKey;
|
|
@@ -583,14 +584,17 @@ function addRelatedFacetKeysType(schema, entityType, oDataServiceAVT, logger) {
|
|
|
583
584
|
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
584
585
|
* @param definition - The definition object containing property schemas.
|
|
585
586
|
* @param pathParams - Additional context required to compute manifest paths.
|
|
587
|
+
* @param parentProperty - Information about the parent property used when resolving.
|
|
588
|
+
* nested or inherited manifest paths (e.g. parent property name and resolved rule path).
|
|
589
|
+
* @param handleRelative - A flag indicating whether to use relative paths for definition properties.
|
|
586
590
|
*/
|
|
587
|
-
function addManifestPathsToPropertiesOP(appSchema, definitionName, definition, pathParams) {
|
|
591
|
+
function addManifestPathsToPropertiesOP(appSchema, definitionName, definition, pathParams, parentProperty, handleRelative = false) {
|
|
588
592
|
(0, utils_2.addManifestPathsToProperties)(appSchema, definitionName, definition, {
|
|
589
593
|
...pathParams,
|
|
590
594
|
targetAnnotation: pathParams.sectionId?.replace('::', '/'),
|
|
591
595
|
targetAnnotationEncoded: pathParams.sectionId,
|
|
592
596
|
pathsParts: [pathParams.sectionId]
|
|
593
|
-
}, factory_1.pageTypes.ObjectPage);
|
|
597
|
+
}, factory_1.pageTypes.ObjectPage, parentProperty, handleRelative);
|
|
594
598
|
}
|
|
595
599
|
/**
|
|
596
600
|
* Adds 'manifestPath' to static nodes in schema.
|
|
@@ -605,6 +609,29 @@ function addManifestPathsToStaticNodes(appSchema, pathParams) {
|
|
|
605
609
|
addManifestPathsToPropertiesOP(appSchema, 'ObjectPage', appSchema, pathParams);
|
|
606
610
|
// Add manifestPath to table
|
|
607
611
|
addManifestPathsToPropertiesOP(appSchema, undefined, appSchema.properties.header, pathParams);
|
|
612
|
+
// Add "manifestPath" to custom sections
|
|
613
|
+
const sections = appSchema.definitions[ux_specification_types_1.DefinitionName.Sections]['properties'] ?? {};
|
|
614
|
+
for (const sectionDefinitionKey in sections) {
|
|
615
|
+
if (sectionDefinitionKey === 'custom') {
|
|
616
|
+
const sectionDefinition = sections[sectionDefinitionKey];
|
|
617
|
+
const anyOfDefinitions = sectionDefinition.items['anyOf'];
|
|
618
|
+
anyOfDefinitions.forEach((anyOfDefinition) => {
|
|
619
|
+
const manifestPathForSections = (0, common_1.convertSyncRulePathToJsonPath)((0, application_1.getViewExtensionsPath)());
|
|
620
|
+
anyOfDefinition['manifestPath'] = (0, common_1.appendJsonPathSegment)(manifestPathForSections, `||`);
|
|
621
|
+
sectionDefinition['manifestPath'] = manifestPathForSections;
|
|
622
|
+
const definitionKey = anyOfDefinition.$ref ? (0, common_1.getDefinitionKey)(anyOfDefinition.$ref) : undefined;
|
|
623
|
+
addManifestPathsToPropertiesOP(appSchema, definitionKey, // we need to pass definitionName to specifically resolve className and sync rules
|
|
624
|
+
anyOfDefinition, { pageName: [''], sectionId: '' }, // we can't use undefined because these params are expected to be defined in sync rule resolution (check 'getObjectPageCustomSectionPath')
|
|
625
|
+
{
|
|
626
|
+
name: ux_specification_types_1.v2.SAPUI5_VIEW_EXTENSION_OBJECT_PAGE,
|
|
627
|
+
relativeManifestPath: ux_specification_types_1.v2.SAPUI5_VIEW_EXTENSION_OBJECT_PAGE,
|
|
628
|
+
absoluteManifestPath: manifestPathForSections
|
|
629
|
+
}, true);
|
|
630
|
+
// remove manifestPath from anyOf definition because it was only required in resolving specific property paths (e.g. title)
|
|
631
|
+
delete anyOfDefinition['manifestPath'];
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
}
|
|
608
635
|
}
|
|
609
636
|
/**
|
|
610
637
|
* Generates an app specific schema out of the generic schema.
|