@sap-ux/fiori-elements-writer 0.18.13 → 0.18.15
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/dist/data/defaults.js +11 -2
- package/dist/index.js +1 -1
- package/dist/types.d.ts +10 -5
- package/dist/types.js +1 -0
- package/package.json +2 -2
- package/templates/v2/alp/extend/webapp/manifest.json +5 -5
- package/templates/v2/lrop/extend/webapp/manifest.json +4 -1
- package/templates/v4/lrop/extend/webapp/manifest.json +8 -4
package/dist/data/defaults.js
CHANGED
|
@@ -17,7 +17,7 @@ const defaultModelName = 'mainModel'; // UI5 default model name is '' but some f
|
|
|
17
17
|
* @returns Updated template settings
|
|
18
18
|
*/
|
|
19
19
|
function setDefaultTemplateSettings(template, odataVersion) {
|
|
20
|
-
var _a, _b;
|
|
20
|
+
var _a, _b, _c;
|
|
21
21
|
const templateSettings = template.settings;
|
|
22
22
|
if (template.type === types_1.TemplateType.AnalyticalListPage) {
|
|
23
23
|
const alpSettings = template.settings;
|
|
@@ -42,6 +42,15 @@ function setDefaultTemplateSettings(template, odataVersion) {
|
|
|
42
42
|
return templateSettings;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
else if (template.type === types_1.TemplateType.ListReportObjectPage || template.type === types_1.TemplateType.Worklist) {
|
|
46
|
+
const tableSettings = template.settings;
|
|
47
|
+
Object.assign(templateSettings, {
|
|
48
|
+
tableType: (_c = tableSettings.tableType) !== null && _c !== void 0 ? _c : types_1.TableType.RESPONSIVE // Overrides the UI5 default: ''
|
|
49
|
+
});
|
|
50
|
+
if (tableSettings.tableType !== types_1.TableType.TREE) {
|
|
51
|
+
delete tableSettings.hierarchyQualifier;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
45
54
|
return templateSettings;
|
|
46
55
|
}
|
|
47
56
|
exports.setDefaultTemplateSettings = setDefaultTemplateSettings;
|
|
@@ -81,7 +90,7 @@ function setAppDefaults(feApp) {
|
|
|
81
90
|
feApp.ui5.minUI5Version =
|
|
82
91
|
(_h = feApp.ui5.version) !== null && _h !== void 0 ? _h : templateAttributes_1.TemplateTypeAttributes[feApp.template.type].minimumUi5Version[feApp.service.version];
|
|
83
92
|
}
|
|
84
|
-
// if not
|
|
93
|
+
// if not explicitly disabled, enable the SAP Fiori tools
|
|
85
94
|
feApp.appOptions = (_j = feApp.appOptions) !== null && _j !== void 0 ? _j : {};
|
|
86
95
|
if (feApp.appOptions.sapux !== false) {
|
|
87
96
|
feApp.appOptions.sapux = true;
|
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ function generate(basePath, data, fs) {
|
|
|
88
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
89
|
// Clone rather than modifying callers refs
|
|
90
90
|
const feApp = (0, cloneDeep_1.default)(data);
|
|
91
|
-
// Ensure input data contains at least the
|
|
91
|
+
// Ensure input data contains at least the mandatory properties required for app generation
|
|
92
92
|
(0, validate_1.validateRequiredProperties)(feApp);
|
|
93
93
|
(0, defaults_1.setAppDefaults)(feApp);
|
|
94
94
|
fs = yield (0, ui5_application_writer_1.generate)(basePath, feApp, fs);
|
package/dist/types.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ export interface EntityConfig {
|
|
|
29
29
|
export declare enum TableType {
|
|
30
30
|
GRID = "GridTable",
|
|
31
31
|
ANALYTICAL = "AnalyticalTable",
|
|
32
|
-
RESPONSIVE = "ResponsiveTable"
|
|
32
|
+
RESPONSIVE = "ResponsiveTable",
|
|
33
|
+
TREE = "TreeTable"
|
|
33
34
|
}
|
|
34
35
|
export declare enum TableSelectionMode {
|
|
35
36
|
NONE = "None",
|
|
@@ -37,14 +38,19 @@ export declare enum TableSelectionMode {
|
|
|
37
38
|
MULTI = "Multi",
|
|
38
39
|
SINGLE = "Single"
|
|
39
40
|
}
|
|
40
|
-
export interface
|
|
41
|
+
export interface TableSettings {
|
|
42
|
+
tableType?: TableType;
|
|
43
|
+
qualifier?: string;
|
|
44
|
+
hierarchyQualifier?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LROPSettings extends TableSettings {
|
|
41
47
|
entityConfig: EntityConfig;
|
|
42
48
|
}
|
|
43
49
|
export interface FPMSettings {
|
|
44
50
|
entityConfig: EntityConfig;
|
|
45
51
|
pageName: string;
|
|
46
52
|
}
|
|
47
|
-
export interface WorklistSettings {
|
|
53
|
+
export interface WorklistSettings extends TableSettings {
|
|
48
54
|
entityConfig: EntityConfig;
|
|
49
55
|
}
|
|
50
56
|
export interface FEOPSettings {
|
|
@@ -53,9 +59,8 @@ export interface FEOPSettings {
|
|
|
53
59
|
export interface OVPSettings {
|
|
54
60
|
filterEntityType: string;
|
|
55
61
|
}
|
|
56
|
-
export interface ALPSettings {
|
|
62
|
+
export interface ALPSettings extends TableSettings {
|
|
57
63
|
entityConfig: EntityConfig;
|
|
58
|
-
tableType?: TableType;
|
|
59
64
|
}
|
|
60
65
|
export interface ALPSettingsV2 extends ALPSettings {
|
|
61
66
|
smartVariantManagement?: boolean;
|
package/dist/types.js
CHANGED
|
@@ -30,6 +30,7 @@ var TableType;
|
|
|
30
30
|
TableType["GRID"] = "GridTable";
|
|
31
31
|
TableType["ANALYTICAL"] = "AnalyticalTable";
|
|
32
32
|
TableType["RESPONSIVE"] = "ResponsiveTable";
|
|
33
|
+
TableType["TREE"] = "TreeTable";
|
|
33
34
|
})(TableType || (exports.TableType = TableType = {}));
|
|
34
35
|
var TableSelectionMode;
|
|
35
36
|
(function (TableSelectionMode) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-elements-writer",
|
|
3
3
|
"description": "SAP Fiori elements application writer",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.15",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"read-pkg-up": "7.0.1",
|
|
29
29
|
"semver": "7.5.4",
|
|
30
30
|
"@sap-ux/odata-service-writer": "0.16.4",
|
|
31
|
-
"@sap-ux/ui5-application-writer": "0.26.7",
|
|
32
31
|
"@sap-ux/fe-fpm-writer": "0.24.9",
|
|
32
|
+
"@sap-ux/ui5-application-writer": "0.26.7",
|
|
33
33
|
"@sap-ux/ui5-config": "0.22.1",
|
|
34
34
|
"@sap-ux/ui5-test-writer": "0.3.2"
|
|
35
35
|
},
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"condensedTableLayout": true,
|
|
18
18
|
"showGoButtonOnFilterBar": true,
|
|
19
19
|
<% if (locals.tableType) { %>
|
|
20
|
-
"tableType": "<%- tableType %>",<% } %>
|
|
20
|
+
"tableType": "<%- locals.tableType %>",<% } %>
|
|
21
21
|
<% if (locals.qualifier) { %>
|
|
22
|
-
"qualifier": "<%- qualifier %>",<% } %>
|
|
22
|
+
"qualifier": "<%- locals.qualifier %>",<% } %>
|
|
23
23
|
<% if (locals.autoHide !== undefined) { %>
|
|
24
|
-
"autoHide": <%- autoHide %>,<% } %>
|
|
24
|
+
"autoHide": <%- locals.autoHide %>,<% } %>
|
|
25
25
|
<% if (locals.smartVariantManagement !== undefined) { %>
|
|
26
|
-
"smartVariantManagement": <%- smartVariantManagement %>,<% } %>
|
|
26
|
+
"smartVariantManagement": <%- locals.smartVariantManagement %>,<% } %>
|
|
27
27
|
"tableSettings": {<% if (locals.multiSelect !== undefined) { %>
|
|
28
|
-
"multiSelect": <%- multiSelect %><% } %>
|
|
28
|
+
"multiSelect": <%- locals.multiSelect %><% } %>
|
|
29
29
|
},
|
|
30
30
|
"keyPerformanceIndicators": {}
|
|
31
31
|
}
|
|
@@ -37,15 +37,19 @@
|
|
|
37
37
|
"route": "<%- entityConfig.mainEntityName %>ObjectPage"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
}<% if (
|
|
40
|
+
}<% if (locals.tableType) { %>,
|
|
41
41
|
"controlConfiguration": {
|
|
42
42
|
"@com.sap.vocabularies.UI.v1.LineItem": {
|
|
43
43
|
"tableSettings": {
|
|
44
|
-
"type": "<%- tableType %>"
|
|
45
|
-
"
|
|
44
|
+
"type": "<%- tableType %>"
|
|
45
|
+
<% if (locals.qualifier) { %>,"qualifier": "<%- locals.qualifier %>"<% } %>
|
|
46
|
+
<% if (type === 'alp'){ %>,"selectionMode": "<%- locals.selectionMode %>"<% } %>
|
|
47
|
+
<% if (locals.hierarchyQualifier){ %>,"hierarchyQualifier": "<%- locals.hierarchyQualifier %>"<% } %>
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
|
-
}
|
|
50
|
+
}
|
|
51
|
+
<% } %>
|
|
52
|
+
<% if (type === 'alp'){ %>,
|
|
49
53
|
"views": {
|
|
50
54
|
"paths": [{
|
|
51
55
|
"primary": [
|