@sap-ux/preview-middleware 0.10.0 → 0.10.1
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/client/adp/controllers/BaseDialog.controller.js +4 -0
- package/dist/client/adp/controllers/BaseDialog.controller.ts +5 -0
- package/dist/client/adp/controllers/ControllerExtension.controller.js +4 -0
- package/dist/client/adp/controllers/ControllerExtension.controller.ts +9 -0
- package/package.json +2 -2
|
@@ -33,6 +33,10 @@ sap.ui.define(["sap/ui/core/library", "sap/ui/core/mvc/Controller"], function (s
|
|
|
33
33
|
updateDialogState(ValueState.Error, 'The fragment name cannot contain white spaces or special characters.');
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
+
if (fragmentName.length > 64) {
|
|
37
|
+
updateDialogState(ValueState.Error, 'A fragment file name cannot contain more than 64 characters.');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
36
40
|
updateDialogState(ValueState.Success);
|
|
37
41
|
this.model.setProperty('/newFragmentName', fragmentName);
|
|
38
42
|
},
|
|
@@ -83,6 +83,11 @@ export default abstract class BaseDialog extends Controller {
|
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
if(fragmentName.length > 64) {
|
|
87
|
+
updateDialogState(ValueState.Error, 'A fragment file name cannot contain more than 64 characters.');
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
86
91
|
updateDialogState(ValueState.Success);
|
|
87
92
|
this.model.setProperty('/newFragmentName', fragmentName);
|
|
88
93
|
}
|
|
@@ -56,6 +56,10 @@ sap.ui.define(["sap/m/MessageToast", "sap/ui/core/library", "sap/ui/model/json/J
|
|
|
56
56
|
updateDialogState(ValueState.Error, 'The controller name cannot contain white spaces or special characters.');
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
+
if (controllerName.length > 64) {
|
|
60
|
+
updateDialogState(ValueState.Error, 'A controller file name cannot contain more than 64 characters.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
59
63
|
updateDialogState(ValueState.Success);
|
|
60
64
|
this.model.setProperty('/newControllerName', controllerName);
|
|
61
65
|
},
|
|
@@ -100,10 +100,19 @@ export default class ControllerExtension extends BaseDialog {
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
if(controllerName.length > 64) {
|
|
104
|
+
updateDialogState(
|
|
105
|
+
ValueState.Error,
|
|
106
|
+
'A controller file name cannot contain more than 64 characters.'
|
|
107
|
+
);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
103
111
|
updateDialogState(ValueState.Success);
|
|
104
112
|
this.model.setProperty('/newControllerName', controllerName);
|
|
105
113
|
}
|
|
106
114
|
|
|
115
|
+
|
|
107
116
|
/**
|
|
108
117
|
* Handles create button press
|
|
109
118
|
*
|
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%3Apreview-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.10.
|
|
12
|
+
"version": "0.10.1",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"npm-run-all": "4.1.5",
|
|
37
37
|
"nock": "13.2.1",
|
|
38
38
|
"supertest": "6.3.3",
|
|
39
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.7.
|
|
39
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.7.1",
|
|
40
40
|
"@sap-ux/project-access": "1.14.0",
|
|
41
41
|
"@sap-ux/store": "0.4.0"
|
|
42
42
|
},
|