@sap-ux/flp-config-inquirer 0.3.36 → 0.3.38
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.
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"tooltips": {
|
|
16
16
|
"inboundId": "Choose the inbound ID to be used to set the SAP Fiori launchpad tile configuration.",
|
|
17
|
-
"additionalParameters": "Enter the value for the parameters in
|
|
17
|
+
"additionalParameters": "Enter the value for the parameters in JSON format."
|
|
18
18
|
},
|
|
19
19
|
"validators": {
|
|
20
20
|
"inboundConfigKeyExists": "An inbound configuration with the key: {{inboundKey}} is already defined. Choose another key.",
|
|
21
21
|
"flpConfigOverwrite": "Overwrite existing configuration?",
|
|
22
22
|
"noInboundKeysAreFound": "The original application target mapping and the default parameters are found in the SAP Fiori reference library under Implementation Information -> Configuration -> Target Mappings.",
|
|
23
23
|
"inboundId": "Choose the inbound ID that will be used to set the FLP tile configuration",
|
|
24
|
-
"additionalParameters": "Enter the value for the parameters in
|
|
24
|
+
"additionalParameters": "Enter the value for the parameters in JSON format.",
|
|
25
25
|
"semObjectActionDuplication": "When generating a new tile, you must modify the Semantic Object value, the Action value, or both. You can use the default suggestions, which include a '_New' suffix for each value or use your own designations.",
|
|
26
26
|
"invalidParameterString": "The parameter string is not valid JSON.",
|
|
27
27
|
"duplicateInbound": "The base application has an existing inbound that matches the values for Semantic Object and Action. To create a new tile you must modify the Semantic Object value, the Action value, or both."
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DescriptorVariant, type NewInboundNavigation, type InternalInboundNavigation } from '@sap-ux/adp-tooling';
|
|
2
|
-
import type { ManifestNamespace } from '@sap-ux/project-access';
|
|
2
|
+
import type { ManifestNamespace, UI5FlexLayer } from '@sap-ux/project-access';
|
|
3
3
|
import { type FLPConfigPromptOptions, type FLPConfigAnswers, type TileSettingsAnswers } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Returns FLP configuration prompt options based on the provided inbounds, variant, and tile settings answers.
|
|
@@ -14,8 +14,9 @@ export declare function getAdpFlpConfigPromptOptions(tileSettingsAnswers: TileSe
|
|
|
14
14
|
* Returns the configuration for writing FLP inbounds based on the provided answers and inbound content.
|
|
15
15
|
*
|
|
16
16
|
* @param {FLPConfigAnswers} flpConfigAnswers - The answers for FLP configuration.
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {FlexLayer} layer - The layer of the project.
|
|
18
|
+
* @param {TileSettingsAnswers} [tileSettingsAnswers] - The answers for tile settings.
|
|
18
19
|
* @returns {InternalInboundNavigation | NewInboundNavigation} The configuration for FLP inbounds writer.
|
|
19
20
|
*/
|
|
20
|
-
export declare function getAdpFlpInboundsWriterConfig(flpConfigAnswers: FLPConfigAnswers, tileSettingsAnswers?: TileSettingsAnswers): InternalInboundNavigation | NewInboundNavigation;
|
|
21
|
+
export declare function getAdpFlpInboundsWriterConfig(flpConfigAnswers: FLPConfigAnswers, layer: UI5FlexLayer, tileSettingsAnswers?: TileSettingsAnswers): InternalInboundNavigation | NewInboundNavigation;
|
|
21
22
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.js
CHANGED
|
@@ -43,30 +43,42 @@ function getAdpFlpConfigPromptOptions(tileSettingsAnswers, inbounds, variant) {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Builds the configuration for replacing an existing FLP inbound based on the provided answers and layer.
|
|
47
47
|
*
|
|
48
48
|
* @param {FLPConfigAnswers} flpConfigAnswers - The answers for FLP configuration.
|
|
49
|
-
* @param {
|
|
50
|
-
* @returns {InternalInboundNavigation
|
|
49
|
+
* @param {UI5FlexLayer} layer - The layer of the project.
|
|
50
|
+
* @returns {InternalInboundNavigation} The configuration for the replaced FLP inbound.
|
|
51
51
|
*/
|
|
52
|
-
function
|
|
53
|
-
const {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
inboundId,
|
|
59
|
-
semanticObject: semanticObject ?? '',
|
|
60
|
-
action: action ?? '',
|
|
61
|
-
title: flpConfigAnswers.title ?? '',
|
|
62
|
-
subTitle: flpConfigAnswers.subTitle ?? '',
|
|
63
|
-
icon: flpConfigAnswers.icon ?? '',
|
|
64
|
-
additionalParameters: parameters ? JSON.stringify(parameters) : ''
|
|
65
|
-
};
|
|
52
|
+
function buildReplaceInboundConfig(flpConfigAnswers, layer) {
|
|
53
|
+
const { semanticObject, action, signature: { parameters } = {} } = flpConfigAnswers.inboundId ?? {};
|
|
54
|
+
let inboundId = !semanticObject || !action ? '' : `${semanticObject}-${action}`;
|
|
55
|
+
if (inboundId) {
|
|
56
|
+
inboundId = layer === "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */ ? `${"customer." /* NamespacePrefix.CUSTOMER */}${inboundId}` : inboundId;
|
|
66
57
|
}
|
|
67
|
-
|
|
58
|
+
return {
|
|
59
|
+
inboundId,
|
|
60
|
+
semanticObject: semanticObject ?? '',
|
|
61
|
+
action: action ?? '',
|
|
62
|
+
title: flpConfigAnswers.title ?? '',
|
|
63
|
+
subTitle: flpConfigAnswers.subTitle ?? '',
|
|
64
|
+
icon: flpConfigAnswers.icon ?? '',
|
|
65
|
+
additionalParameters: parameters ? JSON.stringify(parameters) : ''
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Builds the configuration for adding a new FLP inbound based on the provided answers and layer.
|
|
70
|
+
*
|
|
71
|
+
* @param {FLPConfigAnswers} flpConfigAnswers - The answers for FLP configuration.
|
|
72
|
+
* @param {FlexLayer} layer - The layer of the project.
|
|
73
|
+
* @returns {InternalInboundNavigation} The configuration for the new FLP inbound.
|
|
74
|
+
*/
|
|
75
|
+
function buildAddInboundConfig(flpConfigAnswers, layer) {
|
|
76
|
+
let inboundId = !flpConfigAnswers.semanticObject || !flpConfigAnswers.action
|
|
68
77
|
? ''
|
|
69
78
|
: `${flpConfigAnswers.semanticObject}-${flpConfigAnswers.action}`;
|
|
79
|
+
if (inboundId) {
|
|
80
|
+
inboundId = layer === "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */ ? `${"customer." /* NamespacePrefix.CUSTOMER */}${inboundId}` : inboundId;
|
|
81
|
+
}
|
|
70
82
|
return {
|
|
71
83
|
inboundId,
|
|
72
84
|
semanticObject: flpConfigAnswers.semanticObject ?? '',
|
|
@@ -77,4 +89,19 @@ function getAdpFlpInboundsWriterConfig(flpConfigAnswers, tileSettingsAnswers) {
|
|
|
77
89
|
additionalParameters: flpConfigAnswers.additionalParameters ?? ''
|
|
78
90
|
};
|
|
79
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Returns the configuration for writing FLP inbounds based on the provided answers and inbound content.
|
|
94
|
+
*
|
|
95
|
+
* @param {FLPConfigAnswers} flpConfigAnswers - The answers for FLP configuration.
|
|
96
|
+
* @param {FlexLayer} layer - The layer of the project.
|
|
97
|
+
* @param {TileSettingsAnswers} [tileSettingsAnswers] - The answers for tile settings.
|
|
98
|
+
* @returns {InternalInboundNavigation | NewInboundNavigation} The configuration for FLP inbounds writer.
|
|
99
|
+
*/
|
|
100
|
+
function getAdpFlpInboundsWriterConfig(flpConfigAnswers, layer, tileSettingsAnswers) {
|
|
101
|
+
const { tileHandlingAction } = tileSettingsAnswers ?? {};
|
|
102
|
+
if (tileHandlingAction === types_1.tileActions.REPLACE) {
|
|
103
|
+
return buildReplaceInboundConfig(flpConfigAnswers, layer);
|
|
104
|
+
}
|
|
105
|
+
return buildAddInboundConfig(flpConfigAnswers, layer);
|
|
106
|
+
}
|
|
80
107
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/flp-config-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for FLP configuration",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.38",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"i18next": "23.5.1",
|
|
23
23
|
"lodash": "4.17.21",
|
|
24
|
-
"@sap-ux/inquirer-common": "0.7.
|
|
24
|
+
"@sap-ux/inquirer-common": "0.7.20",
|
|
25
25
|
"@sap-ux/btp-utils": "1.1.0",
|
|
26
|
-
"@sap-ux/project-input-validator": "0.6.
|
|
27
|
-
"@sap-ux/fiori-generator-shared": "0.12.
|
|
28
|
-
"@sap-ux/project-access": "1.30.
|
|
26
|
+
"@sap-ux/project-input-validator": "0.6.9",
|
|
27
|
+
"@sap-ux/fiori-generator-shared": "0.12.15",
|
|
28
|
+
"@sap-ux/project-access": "1.30.6",
|
|
29
29
|
"@sap-ux/axios-extension": "1.22.3",
|
|
30
|
-
"@sap-ux/adp-tooling": "0.14.
|
|
30
|
+
"@sap-ux/adp-tooling": "0.14.38"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@sap-devx/yeoman-ui-types": "1.14.4",
|