@sap-ux/fiori-generator-shared 1.1.0 → 1.2.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/app-gen-info.d.ts +0 -8
- package/dist/app-gen-info.js +0 -11
- package/dist/app-helpers/app-helpers.d.ts +17 -0
- package/dist/app-helpers/app-helpers.js +21 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/package.json +3 -3
package/dist/app-gen-info.d.ts
CHANGED
|
@@ -28,12 +28,4 @@ export declare function transformAbapCSNForAppGenInfo({ serviceId, serviceUrl }:
|
|
|
28
28
|
* @returns {Editor} the file system editor instance used to write the info files.
|
|
29
29
|
*/
|
|
30
30
|
export declare function generateAppGenInfo(destPath: string, appGenInfo: AppGenInfo, fs: Editor): Editor;
|
|
31
|
-
/**
|
|
32
|
-
* Returns the display label for a given floorplan template type.
|
|
33
|
-
*
|
|
34
|
-
* @param templateType - the template type key (e.g. 'lrop', 'fpm')
|
|
35
|
-
* @param odataVersion - optional OData version (e.g. '2', '4')
|
|
36
|
-
* @returns the display label (e.g. 'List Report Page V4')
|
|
37
|
-
*/
|
|
38
|
-
export declare function getFloorplanLabel(templateType: string, odataVersion?: string): string;
|
|
39
31
|
//# sourceMappingURL=app-gen-info.d.ts.map
|
package/dist/app-gen-info.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { dirname, join } from 'node:path';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { t } from './i18n.js';
|
|
4
3
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
4
|
/**
|
|
6
5
|
* Transforms the external abapCSN object (possible multiple services) to the internal abapCSN (single chosen service).
|
|
@@ -57,14 +56,4 @@ export function generateAppGenInfo(destPath, appGenInfo, fs) {
|
|
|
57
56
|
fs.writeJSON(`${destPath}/.appGenInfo.json`, appGenInfoJson);
|
|
58
57
|
return fs;
|
|
59
58
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Returns the display label for a given floorplan template type.
|
|
62
|
-
*
|
|
63
|
-
* @param templateType - the template type key (e.g. 'lrop', 'fpm')
|
|
64
|
-
* @param odataVersion - optional OData version (e.g. '2', '4')
|
|
65
|
-
* @returns the display label (e.g. 'List Report Page V4')
|
|
66
|
-
*/
|
|
67
|
-
export function getFloorplanLabel(templateType, odataVersion) {
|
|
68
|
-
return t(`floorplans.label.${templateType}`, { defaultValue: templateType, odataVersion });
|
|
69
|
-
}
|
|
70
59
|
//# sourceMappingURL=app-gen-info.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Floorplan } from '../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Creates a value suitable for use as a semantic object for navigation intents.
|
|
3
4
|
* Removes specific characters that would break the navigation.
|
|
@@ -7,4 +8,20 @@
|
|
|
7
8
|
*/
|
|
8
9
|
export declare const getSemanticObject: (appId: string) => string;
|
|
9
10
|
export declare const getFlpId: (appId: string, action?: string | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the display label for a given floorplan template type.
|
|
13
|
+
* Falls back to the templateType value itself if no translation is found.
|
|
14
|
+
*
|
|
15
|
+
* @param templateType - the floorplan template type (e.g. `FloorplanFE.FE_LROP`)
|
|
16
|
+
* @param odataVersion - optional OData version suffix (e.g. `'2'` or `'4'`)
|
|
17
|
+
* @returns the display label (e.g. `'List Report Page V4'`)
|
|
18
|
+
*/
|
|
19
|
+
export declare function getFloorplanLabel(templateType: Floorplan, odataVersion?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the description for a given floorplan template type.
|
|
22
|
+
*
|
|
23
|
+
* @param templateType - the floorplan template type (e.g. `FloorplanFE.FE_LROP`)
|
|
24
|
+
* @returns the description string
|
|
25
|
+
*/
|
|
26
|
+
export declare function getFloorplanDescription(templateType: Floorplan): string;
|
|
10
27
|
//# sourceMappingURL=app-helpers.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t } from '../i18n.js';
|
|
1
2
|
/**
|
|
2
3
|
* Creates a value suitable for use as a semantic object for navigation intents.
|
|
3
4
|
* Removes specific characters that would break the navigation.
|
|
@@ -12,4 +13,24 @@ export const getSemanticObject = (appId) => {
|
|
|
12
13
|
export const getFlpId = (appId, action) => {
|
|
13
14
|
return `${getSemanticObject(appId)}${action ? '-' + action : ''}`;
|
|
14
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Returns the display label for a given floorplan template type.
|
|
18
|
+
* Falls back to the templateType value itself if no translation is found.
|
|
19
|
+
*
|
|
20
|
+
* @param templateType - the floorplan template type (e.g. `FloorplanFE.FE_LROP`)
|
|
21
|
+
* @param odataVersion - optional OData version suffix (e.g. `'2'` or `'4'`)
|
|
22
|
+
* @returns the display label (e.g. `'List Report Page V4'`)
|
|
23
|
+
*/
|
|
24
|
+
export function getFloorplanLabel(templateType, odataVersion) {
|
|
25
|
+
return t(`floorplans.label.${templateType}`, { defaultValue: templateType, odataVersion });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns the description for a given floorplan template type.
|
|
29
|
+
*
|
|
30
|
+
* @param templateType - the floorplan template type (e.g. `FloorplanFE.FE_LROP`)
|
|
31
|
+
* @returns the description string
|
|
32
|
+
*/
|
|
33
|
+
export function getFloorplanDescription(templateType) {
|
|
34
|
+
return t(`floorplans.description.${templateType}`, { defaultValue: '' });
|
|
35
|
+
}
|
|
15
36
|
//# sourceMappingURL=app-helpers.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export * from './types/index.js';
|
|
|
9
9
|
export { getPackageScripts } from './npm-package-scripts/getPackageScripts.js';
|
|
10
10
|
export { getBootstrapResourceUrls } from './ui5/ui5.js';
|
|
11
11
|
export { getDefaultTargetFolder, isExtensionInstalled, isCommandRegistered } from './vscode-helpers/vscode-helpers.js';
|
|
12
|
-
export { generateAppGenInfo
|
|
13
|
-
export { getFlpId, getSemanticObject } from './app-helpers/app-helpers.js';
|
|
12
|
+
export { generateAppGenInfo } from './app-gen-info.js';
|
|
13
|
+
export { getFlpId, getSemanticObject, getFloorplanLabel, getFloorplanDescription } from './app-helpers/app-helpers.js';
|
|
14
14
|
export { setYeomanEnvConflicterForce } from './yeoman.js';
|
|
15
|
+
export { initI18n as initI18nFioriGeneratorShared } from './i18n.js';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,8 @@ export * from './types/index.js';
|
|
|
9
9
|
export { getPackageScripts } from './npm-package-scripts/getPackageScripts.js';
|
|
10
10
|
export { getBootstrapResourceUrls } from './ui5/ui5.js';
|
|
11
11
|
export { getDefaultTargetFolder, isExtensionInstalled, isCommandRegistered } from './vscode-helpers/vscode-helpers.js';
|
|
12
|
-
export { generateAppGenInfo
|
|
13
|
-
export { getFlpId, getSemanticObject } from './app-helpers/app-helpers.js';
|
|
12
|
+
export { generateAppGenInfo } from './app-gen-info.js';
|
|
13
|
+
export { getFlpId, getSemanticObject, getFloorplanLabel, getFloorplanDescription } from './app-helpers/app-helpers.js';
|
|
14
14
|
export { setYeomanEnvConflicterForce } from './yeoman.js';
|
|
15
|
+
export { initI18n as initI18nFioriGeneratorShared } from './i18n.js';
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the fiori generator.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"semver": "7.8.4",
|
|
28
28
|
"@sap-ux/axios-extension": "2.0.7",
|
|
29
29
|
"@sap-ux/btp-utils": "2.0.5",
|
|
30
|
-
"@sap-ux/
|
|
31
|
-
"@sap-ux/
|
|
30
|
+
"@sap-ux/telemetry": "1.0.18",
|
|
31
|
+
"@sap-ux/project-access": "2.1.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "30.4.1",
|