@sap-ux/fiori-generator-shared 1.0.19 → 1.1.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.
@@ -28,4 +28,12 @@ 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;
31
39
  //# sourceMappingURL=app-gen-info.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { dirname, join } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
+ import { t } from './i18n.js';
3
4
  const __dirname = dirname(fileURLToPath(import.meta.url));
4
5
  /**
5
6
  * Transforms the external abapCSN object (possible multiple services) to the internal abapCSN (single chosen service).
@@ -56,4 +57,14 @@ export function generateAppGenInfo(destPath, appGenInfo, fs) {
56
57
  fs.writeJSON(`${destPath}/.appGenInfo.json`, appGenInfoJson);
57
58
  return fs;
58
59
  }
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
+ }
59
70
  //# sourceMappingURL=app-gen-info.js.map
package/dist/i18n.js CHANGED
@@ -16,7 +16,16 @@ export async function initI18n() {
16
16
  fallbackLng: 'en',
17
17
  defaultNS: NS,
18
18
  ns: [NS],
19
- showSupportNotice: false
19
+ showSupportNotice: false,
20
+ interpolation: {
21
+ format: function (value, format) {
22
+ if (format === 'odataVersionFormatter') {
23
+ return value ? ` V${value}` : '';
24
+ }
25
+ return value;
26
+ }
27
+ },
28
+ missingInterpolationHandler: () => ''
20
29
  });
21
30
  }
22
31
  /**
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ 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 } from './app-gen-info.js';
12
+ export { generateAppGenInfo, getFloorplanLabel } from './app-gen-info.js';
13
13
  export { getFlpId, getSemanticObject } from './app-helpers/app-helpers.js';
14
14
  export { setYeomanEnvConflicterForce } from './yeoman.js';
15
15
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ 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 } from './app-gen-info.js';
12
+ export { generateAppGenInfo, getFloorplanLabel } from './app-gen-info.js';
13
13
  export { getFlpId, getSemanticObject } from './app-helpers/app-helpers.js';
14
14
  export { setYeomanEnvConflicterForce } from './yeoman.js';
15
15
  //# sourceMappingURL=index.js.map
@@ -17,5 +17,25 @@
17
17
  "systemTypeLabel": {
18
18
  "abapCloud": "ABAP Cloud"
19
19
  }
20
+ },
21
+ "floorplans": {
22
+ "label": {
23
+ "basic": "Basic{{odataVersion, odataVersionFormatter}}",
24
+ "fpm": "Custom Page{{odataVersion, odataVersionFormatter}}",
25
+ "lrop": "List Report Page{{odataVersion, odataVersionFormatter}}",
26
+ "worklist": "Worklist Page{{odataVersion, odataVersionFormatter}}",
27
+ "alp": "Analytical List Page{{odataVersion, odataVersionFormatter}}",
28
+ "ovp": "Overview Page{{odataVersion, odataVersionFormatter}}",
29
+ "feop": "Form Entry Object Page{{odataVersion, odataVersionFormatter}}"
30
+ },
31
+ "description": {
32
+ "basic": "Create a freestyle application, starting with an empty page.",
33
+ "fpm": "Create an SAP Fiori elements application containing a custom page based on the flexible programming model.",
34
+ "lrop": "Create an SAP Fiori elements application containing a list report and an object page.",
35
+ "worklist": "Create an SAP Fiori elements application containing a worklist and an object page.",
36
+ "alp": "Create an SAP Fiori elements application containing an analytical list and an object page.",
37
+ "ovp": "Create an SAP Fiori elements application containing an overview page.",
38
+ "feop": "Create an SAP Fiori elements application containing an object page optimized for data entry."
39
+ }
20
40
  }
21
41
  }
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.0.19",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,21 +25,21 @@
25
25
  "mem-fs-editor": "9.4.0",
26
26
  "os-name": "4.0.1",
27
27
  "semver": "7.8.4",
28
- "@sap-ux/axios-extension": "2.0.6",
28
+ "@sap-ux/axios-extension": "2.0.7",
29
29
  "@sap-ux/btp-utils": "2.0.5",
30
30
  "@sap-ux/project-access": "2.1.6",
31
- "@sap-ux/telemetry": "1.0.17"
31
+ "@sap-ux/telemetry": "1.0.18"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jest/globals": "30.4.1",
35
35
  "@types/mem-fs-editor": "7.0.1",
36
36
  "@types/mem-fs": "1.1.2",
37
37
  "@types/semver": "7.7.1",
38
- "@types/vscode": "1.125.0",
38
+ "@types/vscode": "1.106.1",
39
39
  "@types/yeoman-environment": "2.10.11",
40
40
  "@types/yeoman-generator": "5.2.14",
41
- "@sap-ux/logger": "1.0.2",
42
- "@sap-ux/store": "2.0.3"
41
+ "@sap-ux/logger": "1.0.3",
42
+ "@sap-ux/store": "2.0.4"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=22.x"