@sap-ux/fiori-elements-writer 2.1.41 → 2.3.0
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.d.ts +6 -0
- package/dist/data/defaults.js +13 -0
- package/dist/index.js +12 -8
- package/dist/types.d.ts +12 -2
- package/package.json +9 -9
- package/templates/ovp/extend/webapp/manifest.json +4 -0
package/dist/data/defaults.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import { OdataVersion } from '@sap-ux/odata-service-writer';
|
|
|
2
2
|
import type { FioriElementsApp, Template } from '../types';
|
|
3
3
|
import { TemplateType } from '../types';
|
|
4
4
|
import { type TemplateOptions } from './templateAttributes';
|
|
5
|
+
/**
|
|
6
|
+
* Sets defaults for relevant parameters (`flpAppId`, `startFile`, `localStartFile`, ) when virtual endpoints are used.
|
|
7
|
+
*
|
|
8
|
+
* @param feApp - Fiori elements application config
|
|
9
|
+
*/
|
|
10
|
+
export declare function setVirtualEndpointDefaults(feApp: FioriElementsApp<unknown>): void;
|
|
5
11
|
/**
|
|
6
12
|
* Updates the template settings to defaults if not provided.
|
|
7
13
|
*
|
package/dist/data/defaults.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.setVirtualEndpointDefaults = setVirtualEndpointDefaults;
|
|
6
7
|
exports.setDefaultTemplateSettings = setDefaultTemplateSettings;
|
|
7
8
|
exports.getUi5Libs = getUi5Libs;
|
|
8
9
|
exports.getManifestLibs = getManifestLibs;
|
|
@@ -15,6 +16,18 @@ const templateAttributes_1 = require("./templateAttributes");
|
|
|
15
16
|
const annotationCustomUi5Libs_1 = require("./annotationCustomUi5Libs");
|
|
16
17
|
const semver_1 = __importDefault(require("semver"));
|
|
17
18
|
const defaultModelName = 'mainModel'; // UI5 default model name is '' but some floorplans require a named default model
|
|
19
|
+
const defaultVirtualPreviewFile = 'test/flp.html'; // Default virtual preview file name
|
|
20
|
+
const defaultIntent = 'app-preview';
|
|
21
|
+
/**
|
|
22
|
+
* Sets defaults for relevant parameters (`flpAppId`, `startFile`, `localStartFile`, ) when virtual endpoints are used.
|
|
23
|
+
*
|
|
24
|
+
* @param feApp - Fiori elements application config
|
|
25
|
+
*/
|
|
26
|
+
function setVirtualEndpointDefaults(feApp) {
|
|
27
|
+
feApp.app.flpAppId = defaultIntent;
|
|
28
|
+
feApp.app.startFile = defaultVirtualPreviewFile;
|
|
29
|
+
feApp.app.localStartFile = defaultVirtualPreviewFile;
|
|
30
|
+
}
|
|
18
31
|
/**
|
|
19
32
|
* Updates the template settings to defaults if not provided.
|
|
20
33
|
*
|
package/dist/index.js
CHANGED
|
@@ -95,10 +95,14 @@ async function generate(basePath, data, fs, log) {
|
|
|
95
95
|
// Add new files from templates e.g.
|
|
96
96
|
const rootTemplatesPath = (0, path_1.join)(__dirname, '..', 'templates');
|
|
97
97
|
// Add templates common to all template types
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
ignore
|
|
98
|
+
const isTypeScriptEnabled = feApp.appOptions?.typescript === true;
|
|
99
|
+
const ignore = [
|
|
100
|
+
...(isTypeScriptEnabled ? getTypeScriptIgnoreGlob(feApp, coercedUI5Version) : ['**/*.ts']),
|
|
101
|
+
// if using virtual endpoints for preview, ignore the files within webapp/test (flpSandbox.html, changes_loader (v2), changes_preview (v2))
|
|
102
|
+
...(feApp.appOptions?.useVirtualPreviewEndpoints ? ['**/webapp/test/**'] : [])
|
|
103
|
+
];
|
|
104
|
+
if (feApp.appOptions?.useVirtualPreviewEndpoints) {
|
|
105
|
+
(0, defaults_1.setVirtualEndpointDefaults)(feApp);
|
|
102
106
|
}
|
|
103
107
|
// Determine if the project type is 'EDMXBackend'.
|
|
104
108
|
const isEdmxProjectType = feApp.app.projectType === 'EDMXBackend';
|
|
@@ -157,11 +161,11 @@ async function generate(basePath, data, fs, log) {
|
|
|
157
161
|
localOnly: !feApp.service?.url,
|
|
158
162
|
addMock: !!feApp.service?.metadata,
|
|
159
163
|
addTest,
|
|
160
|
-
sapClient: feApp.service?.client,
|
|
161
164
|
flpAppId: feApp.app.flpAppId,
|
|
162
|
-
startFile:
|
|
163
|
-
localStartFile:
|
|
164
|
-
generateIndex: feApp.appOptions?.generateIndex
|
|
165
|
+
startFile: feApp.app?.startFile,
|
|
166
|
+
localStartFile: feApp.app?.localStartFile,
|
|
167
|
+
generateIndex: feApp.appOptions?.generateIndex,
|
|
168
|
+
supportVirtualEndpoints: feApp.appOptions?.useVirtualPreviewEndpoints // no need for search params if virtual endpoints are used
|
|
165
169
|
})
|
|
166
170
|
});
|
|
167
171
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -60,9 +60,19 @@ export interface WorklistSettings extends TableSettings {
|
|
|
60
60
|
export interface FEOPSettings {
|
|
61
61
|
entityConfig: EntityConfig;
|
|
62
62
|
}
|
|
63
|
-
export
|
|
63
|
+
export type OVPSettings = {
|
|
64
|
+
/**
|
|
65
|
+
* Represents the entity type to use as a global filter in the smart filter bar control.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated since version SAPUI5 1.54. Use `filterEntitySet` instead, this property will be removed in a future version
|
|
68
|
+
*/
|
|
64
69
|
filterEntityType: string;
|
|
65
|
-
}
|
|
70
|
+
} | {
|
|
71
|
+
/**
|
|
72
|
+
* Represents the entity set to use as a global filter in the smart filter bar control.
|
|
73
|
+
*/
|
|
74
|
+
filterEntitySet: string;
|
|
75
|
+
};
|
|
66
76
|
export interface ALPSettings extends TableSettings {
|
|
67
77
|
entityConfig: EntityConfig;
|
|
68
78
|
}
|
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": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
28
|
"read-pkg-up": "7.0.1",
|
|
29
29
|
"semver": "7.5.4",
|
|
30
|
-
"@sap-ux/odata-service-writer": "0.26.
|
|
31
|
-
"@sap-ux/ui5-application-writer": "1.
|
|
32
|
-
"@sap-ux/fe-fpm-writer": "0.33.
|
|
33
|
-
"@sap-ux/ui5-config": "0.
|
|
34
|
-
"@sap-ux/ui5-test-writer": "0.6.
|
|
35
|
-
"@sap-ux/fiori-generator-shared": "0.
|
|
36
|
-
"@sap-ux/cap-config-writer": "0.9.
|
|
37
|
-
"@sap-ux/annotation-generator": "0.3.
|
|
30
|
+
"@sap-ux/odata-service-writer": "0.26.14",
|
|
31
|
+
"@sap-ux/ui5-application-writer": "1.4.0",
|
|
32
|
+
"@sap-ux/fe-fpm-writer": "0.33.23",
|
|
33
|
+
"@sap-ux/ui5-config": "0.27.0",
|
|
34
|
+
"@sap-ux/ui5-test-writer": "0.6.4",
|
|
35
|
+
"@sap-ux/fiori-generator-shared": "0.11.0",
|
|
36
|
+
"@sap-ux/cap-config-writer": "0.9.26",
|
|
37
|
+
"@sap-ux/annotation-generator": "0.3.25",
|
|
38
38
|
"@sap-ux/logger": "0.6.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sap.ovp": {
|
|
3
3
|
"globalFilterModel": "<%- defaultModel %>",
|
|
4
|
+
<% if (locals.filterEntityType) { %>
|
|
4
5
|
"globalFilterEntityType": "<%- filterEntityType %>",
|
|
6
|
+
<% } else if (locals.filterEntitySet) { %>
|
|
7
|
+
"globalFilterEntitySet": "<%- filterEntitySet %>",
|
|
8
|
+
<% } %>
|
|
5
9
|
"containerLayout": "resizable",
|
|
6
10
|
"enableLiveFilter": true,
|
|
7
11
|
"considerAnalyticalParameters": false,
|