@sap-ux/fiori-app-sub-generator 1.2.0 → 1.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.
|
@@ -5,9 +5,10 @@ import { DatasourceType } from '@sap-ux/odata-service-inquirer';
|
|
|
5
5
|
import { ServiceType } from '@sap-ux/odata-service-writer';
|
|
6
6
|
import { AuthenticationType } from '@sap-ux/store';
|
|
7
7
|
import { latestVersionString } from '@sap-ux/ui5-info';
|
|
8
|
+
import { hostEnvironment, getHostEnvironment } from '@sap-ux/fiori-generator-shared';
|
|
9
|
+
import { PageTemplateType } from '@sap-ux/fe-fpm-writer';
|
|
8
10
|
import { DEFAULT_HOST, DEFAULT_SERVICE_PATH, FPM_DEFAULT_PAGE_NAME, FloorplanFE, FloorplanFF, MAIN_DATASOURCE_NAME, MAIN_MODEL_NAME, UI5_VERSION_PROPS } from '../types/index.js';
|
|
9
11
|
import { assignSapUxLayerValue, convertCapRuntimeToCapProjectType, generateToolsId, getAnnotations, getAppId, getMinSupportedUI5Version } from '../utils/index.js';
|
|
10
|
-
import { hostEnvironment, getHostEnvironment } from '@sap-ux/fiori-generator-shared';
|
|
11
12
|
import { isFeatureEnabled } from '@sap-ux/feature-toggle';
|
|
12
13
|
/**
|
|
13
14
|
* Get the writer template type from the Fiori App floorplan.
|
|
@@ -61,9 +62,12 @@ export function transformTemplateType(floorplan, entityRelatedConfig, viewName)
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
// Add page
|
|
65
|
+
// Add page building block config if addPageBuildingBlock is true
|
|
65
66
|
const pageBuildingBlockConfig = entityRelatedConfig?.addPageBuildingBlock
|
|
66
|
-
? {
|
|
67
|
+
? {
|
|
68
|
+
pageBuildingBlockTitle: entityRelatedConfig.pageBuildingBlockTitle,
|
|
69
|
+
pageBuildingBlockTemplateType: entityRelatedConfig.pageBuildingBlockLayout ?? PageTemplateType.Basic
|
|
70
|
+
}
|
|
67
71
|
: {};
|
|
68
72
|
const templateSettingsMap = {
|
|
69
73
|
[TemplateTypeFE.ListReportObjectPage]: {
|
|
@@ -48,7 +48,6 @@ export declare const generatorName = "SAP Fiori Application Generator";
|
|
|
48
48
|
export declare const FPM_DEFAULT_PAGE_NAME = "Main";
|
|
49
49
|
export declare const minSupportedUi5Version = "1.65.0";
|
|
50
50
|
export declare const minSupportedUi5VersionV4 = "1.84.0";
|
|
51
|
-
export declare const minUi5VersionForPageBuildingBlock = "1.136.0";
|
|
52
51
|
export declare const defaultNavActionTile = "tile";
|
|
53
52
|
export declare const defaultNavActionDisplay = "display";
|
|
54
53
|
/**
|
|
@@ -93,8 +93,6 @@ export const FPM_DEFAULT_PAGE_NAME = 'Main';
|
|
|
93
93
|
// App gen specific (not writer specific) supported UI5 versions
|
|
94
94
|
export const minSupportedUi5Version = '1.65.0';
|
|
95
95
|
export const minSupportedUi5VersionV4 = '1.84.0';
|
|
96
|
-
// The minimum UI5 version required for page building block feature
|
|
97
|
-
export const minUi5VersionForPageBuildingBlock = '1.136.0';
|
|
98
96
|
export const defaultNavActionTile = 'tile';
|
|
99
97
|
export const defaultNavActionDisplay = 'display';
|
|
100
98
|
/**
|
|
@@ -42,7 +42,7 @@ export declare function buildSapClientParam(sapClient: string): string;
|
|
|
42
42
|
export declare function getRequiredOdataVersion(floorplan: Floorplan): OdataVersion | undefined;
|
|
43
43
|
/**
|
|
44
44
|
* Gets the minimum supported UI5 version for the specified OData version, floorplan, and entity configuration.
|
|
45
|
-
* For FPM floorplans with page building blocks, enforces a minimum version
|
|
45
|
+
* For FPM floorplans with page building blocks, enforces a minimum version based on layout type.
|
|
46
46
|
*
|
|
47
47
|
* @param version - The OData version.
|
|
48
48
|
* @param floorplan - The floorplan type.
|
|
@@ -3,13 +3,14 @@ import { isAbapEnvironmentOnBtp, isAppStudio } from '@sap-ux/btp-utils';
|
|
|
3
3
|
import { checkCdsUi5PluginEnabled, getAppLaunchText } from '@sap-ux/cap-config-writer';
|
|
4
4
|
import { parse } from '@sap-ux/edmx-parser';
|
|
5
5
|
import { TemplateTypeAttributes } from '@sap-ux/fiori-elements-writer';
|
|
6
|
+
import { PageTemplateType, MIN_UI5_VERSION_PAGE_BUILDING_BLOCK, MIN_UI5_VERSION_PAGE_BUILDING_BLOCK_FULL_LAYOUT } from '@sap-ux/fe-fpm-writer';
|
|
6
7
|
import { writeApplicationInfoSettings } from '@sap-ux/fiori-tools-settings';
|
|
7
8
|
import { createLaunchConfig } from '@sap-ux/launch-config';
|
|
8
9
|
import { DatasourceType, OdataVersion } from '@sap-ux/odata-service-inquirer';
|
|
9
10
|
import { isCapJavaProject, toReferenceUri } from '@sap-ux/project-access';
|
|
10
11
|
import { basename, join } from 'node:path';
|
|
11
12
|
import { v4 as uuidV4 } from 'uuid';
|
|
12
|
-
import { ApiHubType, SapSystemSourceType, FloorplanFE
|
|
13
|
+
import { ApiHubType, SapSystemSourceType, FloorplanFE } from '../types/index.js';
|
|
13
14
|
import { minSupportedUi5Version, minSupportedUi5VersionV4 } from '../types/constants.js';
|
|
14
15
|
import { FloorplanAttributes, FloorplanFF } from '../types/external.js';
|
|
15
16
|
import { t } from './i18n.js';
|
|
@@ -64,7 +65,7 @@ export function getRequiredOdataVersion(floorplan) {
|
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* Gets the minimum supported UI5 version for the specified OData version, floorplan, and entity configuration.
|
|
67
|
-
* For FPM floorplans with page building blocks, enforces a minimum version
|
|
68
|
+
* For FPM floorplans with page building blocks, enforces a minimum version based on layout type.
|
|
68
69
|
*
|
|
69
70
|
* @param version - The OData version.
|
|
70
71
|
* @param floorplan - The floorplan type.
|
|
@@ -73,7 +74,9 @@ export function getRequiredOdataVersion(floorplan) {
|
|
|
73
74
|
*/
|
|
74
75
|
export function getMinSupportedUI5Version(version, floorplan, entityRelatedConfig) {
|
|
75
76
|
if (floorplan === FloorplanFE.FE_FPM && entityRelatedConfig?.addPageBuildingBlock) {
|
|
76
|
-
return
|
|
77
|
+
return entityRelatedConfig.pageBuildingBlockLayout === PageTemplateType.Full
|
|
78
|
+
? MIN_UI5_VERSION_PAGE_BUILDING_BLOCK_FULL_LAYOUT
|
|
79
|
+
: MIN_UI5_VERSION_PAGE_BUILDING_BLOCK;
|
|
77
80
|
}
|
|
78
81
|
let minUI5Version;
|
|
79
82
|
if (floorplan && floorplan !== FloorplanFF.FF_SIMPLE) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-app-sub-generator",
|
|
3
3
|
"description": "A yeoman (sub) generator that can generate Fiori applications. Not for standalone use.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -34,13 +34,14 @@
|
|
|
34
34
|
"@sap-ux/axios-extension": "2.0.7",
|
|
35
35
|
"@sap-ux/btp-utils": "2.0.5",
|
|
36
36
|
"@sap-ux/cap-config-writer": "1.0.22",
|
|
37
|
+
"@sap-ux/fe-fpm-writer": "1.3.0",
|
|
37
38
|
"@sap-ux/feature-toggle": "1.0.5",
|
|
38
|
-
"@sap-ux/fiori-elements-writer": "3.0
|
|
39
|
+
"@sap-ux/fiori-elements-writer": "3.1.0",
|
|
39
40
|
"@sap-ux/fiori-freestyle-writer": "3.0.53",
|
|
40
41
|
"@sap-ux/fiori-generator-shared": "1.2.0",
|
|
41
42
|
"@sap-ux/fiori-tools-settings": "1.0.1",
|
|
42
43
|
"@sap-ux/launch-config": "1.0.12",
|
|
43
|
-
"@sap-ux/odata-service-inquirer": "3.
|
|
44
|
+
"@sap-ux/odata-service-inquirer": "3.2.0",
|
|
44
45
|
"@sap-ux/odata-service-writer": "1.0.12",
|
|
45
46
|
"@sap-ux/project-access": "2.1.6",
|
|
46
47
|
"@sap-ux/store": "2.0.4",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"mock-spawn": "0.2.6",
|
|
65
66
|
"rimraf": "6.1.3",
|
|
66
67
|
"yeoman-test": "6.3.0",
|
|
67
|
-
"@sap-ux/deploy-config-sub-generator": "1.0.
|
|
68
|
+
"@sap-ux/deploy-config-sub-generator": "1.0.44",
|
|
68
69
|
"@sap-ux/flp-config-sub-generator": "1.0.39",
|
|
69
70
|
"@sap-ux/inquirer-common": "1.0.23",
|
|
70
71
|
"@sap-ux/jest-file-matchers": "1.0.2",
|