@sap-ux/adp-tooling 0.12.43 → 0.12.44
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.
|
@@ -4,6 +4,38 @@ exports.getPrompts = void 0;
|
|
|
4
4
|
const i18n_1 = require("../../i18n");
|
|
5
5
|
const project_access_1 = require("@sap-ux/project-access");
|
|
6
6
|
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
7
|
+
/**
|
|
8
|
+
* Validates the OData Source URI prompt.
|
|
9
|
+
*
|
|
10
|
+
* @param value The value to validate.
|
|
11
|
+
* @returns {boolean | string} True if the value is a valid URI, or an error message if not a valid URI or empty.
|
|
12
|
+
*/
|
|
13
|
+
function validatePromptOdataURI(value) {
|
|
14
|
+
const validationResult = (0, project_input_validator_1.validateEmptyString)(value);
|
|
15
|
+
if (typeof validationResult === 'string') {
|
|
16
|
+
return validationResult;
|
|
17
|
+
}
|
|
18
|
+
if (!(0, project_input_validator_1.isDataSourceURI)(value)) {
|
|
19
|
+
return (0, i18n_1.t)('validators.errorInvalidDataSourceURI');
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates the Annotation URI prompt.
|
|
25
|
+
*
|
|
26
|
+
* @param value The value to validate.
|
|
27
|
+
* @returns {boolean | string} True if the value is a valid URI or empty, or an error message if not a valid URI.
|
|
28
|
+
*/
|
|
29
|
+
function validatePromptAnnotationURI(value) {
|
|
30
|
+
const validationResult = (0, project_input_validator_1.validateEmptyString)(value);
|
|
31
|
+
if (typeof validationResult === 'string') {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (!(0, project_input_validator_1.isDataSourceURI)(value)) {
|
|
35
|
+
return (0, i18n_1.t)('validators.errorInvalidDataSourceURI');
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
7
39
|
/**
|
|
8
40
|
* Gets the prompts for changing the data source.
|
|
9
41
|
*
|
|
@@ -33,7 +65,7 @@ function getPrompts(dataSources) {
|
|
|
33
65
|
mandatory: true,
|
|
34
66
|
hint: (0, i18n_1.t)('prompts.oDataSourceURITooltip')
|
|
35
67
|
},
|
|
36
|
-
validate:
|
|
68
|
+
validate: validatePromptOdataURI,
|
|
37
69
|
when: !!dataSourceIds.length,
|
|
38
70
|
store: false
|
|
39
71
|
},
|
|
@@ -52,7 +84,8 @@ function getPrompts(dataSources) {
|
|
|
52
84
|
message: (0, i18n_1.t)('prompts.oDataAnnotationSourceURILabel'),
|
|
53
85
|
guiOptions: {
|
|
54
86
|
hint: (0, i18n_1.t)('prompts.oDataAnnotationSourceURITooltip')
|
|
55
|
-
}
|
|
87
|
+
},
|
|
88
|
+
validate: validatePromptAnnotationURI
|
|
56
89
|
}
|
|
57
90
|
];
|
|
58
91
|
}
|
|
@@ -3,32 +3,32 @@
|
|
|
3
3
|
"oDataSourceLabel": "Target OData Service",
|
|
4
4
|
"oDataSourceTooltip": "Select the OData service you want to replace",
|
|
5
5
|
"oDataSourceURILabel": "OData Source URI",
|
|
6
|
-
"oDataSourceURITooltip": "Enter the URI for the new OData source",
|
|
6
|
+
"oDataSourceURITooltip": "Enter the URI for the new OData source. The URI should start and end with '/' and should not contain any whitespaces or parameters",
|
|
7
7
|
"maxAgeLabel": "New maxAge",
|
|
8
8
|
"maxAgeTooltip": "(Optional) Enter the time in seconds it takes for a cached response of the service to expire.",
|
|
9
9
|
"oDataAnnotationSourceURILabel": "OData Annotation Data Source URI",
|
|
10
|
-
"oDataAnnotationSourceURITooltip": "Server side annotations have been detected for the selected OData service. If needed, enter new annotation data source URI
|
|
10
|
+
"oDataAnnotationSourceURITooltip": "Server side annotations have been detected for the selected OData service. If needed, enter new annotation data source URI for the changed service. The URI should start and end with '/' and should not contain any whitespaces or parameters",
|
|
11
11
|
"fileSelectOptionLabel": "Annotation XML",
|
|
12
12
|
"fileSelectOptionTooltip": "Select the annotation file source",
|
|
13
13
|
"filePathLabel": "Annotation File path",
|
|
14
14
|
"filePathTooltip": "Select the annotation file from your workspace",
|
|
15
|
-
"addAnnotationOdataSourceTooltip": "Select the annotation file
|
|
15
|
+
"addAnnotationOdataSourceTooltip": "Select the OData service you want to add annotation file to",
|
|
16
16
|
"oDataServiceNameLabel": "OData Service Name",
|
|
17
17
|
"oDataServiceNameTooltip": "Enter a name for the OData service you want to add",
|
|
18
18
|
"oDataServiceUriLabel": "OData Service URI",
|
|
19
|
-
"oDataServiceUriTooltip": "Enter the URI for the OData service you want to add
|
|
19
|
+
"oDataServiceUriTooltip": "Enter the URI for the OData service you want to add. The URI should start and end with '/' and should not contain any whitespaces or parameters",
|
|
20
20
|
"oDataServiceVersionLabel": "OData Version",
|
|
21
21
|
"oDataServiceVersionTooltip": "Select the version of OData of the service you want to add",
|
|
22
22
|
"oDataServiceModelNameLabel": "OData Service SAPUI5 Model Name",
|
|
23
23
|
"oDataServiceModelNameTooltip": "Enter a name for the SAPUI5 model you want to use from the service",
|
|
24
24
|
"oDataServiceModelSettingsLabel": "OData Service SAPUI5 Model Settings",
|
|
25
|
-
"oDataServiceModelSettingsTooltip": "If needed enter any additional model settings in the
|
|
25
|
+
"oDataServiceModelSettingsTooltip": "If needed enter any additional model settings in the \"key1\":\"value1\",\"key2\":\"value2\" format",
|
|
26
26
|
"oDataAnnotationDataSourceNameLabel": "OData Annotation Data Source Name",
|
|
27
27
|
"oDataAnnotationDataSourceNameTooltip": "Enter a name for the OData annotation data source",
|
|
28
28
|
"oDataAnnotationDataSourceUriLabel": "OData Annotation Data Source URI",
|
|
29
|
-
"oDataAnnotationDataSourceUriTooltip": "Enter URI for the OData annotation data source",
|
|
29
|
+
"oDataAnnotationDataSourceUriTooltip": "Enter URI for the OData annotation data source. The URI should start and end with '/' and should not contain any whitespaces or parameters",
|
|
30
30
|
"oDataAnnotationSettingsLabel": "OData Annotation Settings",
|
|
31
|
-
"oDataAnnotationSettingsTooltip": "If needed enter any additional {{value}} settings in the
|
|
31
|
+
"oDataAnnotationSettingsTooltip": "If needed enter any additional {{value}} settings in the \"key1\":\"value1\",\"key2\":\"value2\" format",
|
|
32
32
|
"component": {
|
|
33
33
|
"usage": "Component usage",
|
|
34
34
|
"usageIdLabel": "Component Usage ID",
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.12.
|
|
12
|
+
"version": "0.12.44",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|