@sap-ux/fiori-freestyle-writer 0.14.13 → 0.14.15
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/package.json +4 -4
- package/templates/listdetail/add/webapp/controller/Detail.controller.ts +3 -3
- package/templates/listdetail/add/webapp/controller/ErrorHandler.ts +1 -1
- package/templates/listdetail/add/webapp/controller/List.controller.ts +1 -1
- package/templates/listdetail/add/webapp/controller/ListSelector.ts +1 -1
- package/templates/worklist/add/webapp/controller/ErrorHandler.ts +1 -1
- package/templates/worklist/add/webapp/controller/Object.controller.ts +1 -1
- package/templates/worklist/add/webapp/controller/Worklist.controller.ts +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-freestyle-writer",
|
|
3
3
|
"description": "SAP Fiori freestyle application writer",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.15",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"!dist/**/*.map"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sap-ux/odata-service-writer": "0.14.
|
|
24
|
-
"@sap-ux/ui5-application-writer": "0.17.
|
|
25
|
-
"@sap-ux/ui5-config": "0.
|
|
23
|
+
"@sap-ux/odata-service-writer": "0.14.13",
|
|
24
|
+
"@sap-ux/ui5-application-writer": "0.17.12",
|
|
25
|
+
"@sap-ux/ui5-config": "0.16.0",
|
|
26
26
|
"ejs": "3.1.7",
|
|
27
27
|
"i18next": "20.3.2",
|
|
28
28
|
"lodash": "4.17.21",
|
|
@@ -49,7 +49,7 @@ export default class Detail extends BaseController {
|
|
|
49
49
|
public onListUpdateFinished(event: Event) {
|
|
50
50
|
const viewModel = this.getModel<JSONModel>("detailView");
|
|
51
51
|
const totalItems = event.getParameter("total") as number;
|
|
52
|
-
let title: string;
|
|
52
|
+
let title: string | undefined;
|
|
53
53
|
// only update the counter if the length is final
|
|
54
54
|
if ((this.byId("lineItemsList")!.getBinding("items") as ListBinding).isLengthFinal()) {
|
|
55
55
|
if (totalItems) {
|
|
@@ -111,7 +111,7 @@ export default class Detail extends BaseController {
|
|
|
111
111
|
const elementBinding = view.getElementBinding();
|
|
112
112
|
|
|
113
113
|
// No data for the binding
|
|
114
|
-
if (!elementBinding
|
|
114
|
+
if (!elementBinding?.getBoundContext()) {
|
|
115
115
|
this.getRouter().getTargets()!.display("detailObjectNotFound");
|
|
116
116
|
// if object could not be found, the selection in the list
|
|
117
117
|
// does not make sense anymore.
|
|
@@ -121,7 +121,7 @@ export default class Detail extends BaseController {
|
|
|
121
121
|
|
|
122
122
|
const path = elementBinding.getPath();
|
|
123
123
|
const resourceBundle = this.getResourceBundle();
|
|
124
|
-
const detailObject =
|
|
124
|
+
const detailObject = this.getModel().getObject(path);
|
|
125
125
|
const viewModel = this.getModel<JSONModel>("detailView");
|
|
126
126
|
|
|
127
127
|
this.getUIComponent().listSelector.selectAListItem(path);
|
|
@@ -45,7 +45,7 @@ export default class ErrorHandler extends UI5Object {
|
|
|
45
45
|
}
|
|
46
46
|
this.messageOpen = true;
|
|
47
47
|
MessageBox.error(
|
|
48
|
-
((this.component.getModel("i18n") as ResourceModel).getResourceBundle() as ResourceBundle).getText("errorText"),
|
|
48
|
+
((this.component.getModel("i18n") as ResourceModel).getResourceBundle() as ResourceBundle).getText("errorText") || "",
|
|
49
49
|
{
|
|
50
50
|
id: "serviceErrorMessageBox",
|
|
51
51
|
details: (event.getParameters() as XMLHttpRequest['response']).response,
|
|
@@ -122,7 +122,7 @@ export default class List extends BaseController {
|
|
|
122
122
|
* and group settings and refreshes the list binding.
|
|
123
123
|
*/
|
|
124
124
|
public onRefresh() {
|
|
125
|
-
this.list.getBinding("items")
|
|
125
|
+
this.list.getBinding("items")?.refresh(false);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/**
|
|
@@ -27,7 +27,7 @@ export default class ListSelector extends UI5Object {
|
|
|
27
27
|
this.oWhenListLoadingIsDone = new Promise(function (this: ListSelector, resolve: Function, reject: Function) {
|
|
28
28
|
this._oWhenListHasBeenSet
|
|
29
29
|
.then(function (this: ListSelector, list: List) {
|
|
30
|
-
list.getBinding("items")
|
|
30
|
+
list.getBinding("items")?.attachEventOnce("dataReceived",
|
|
31
31
|
function (this: ListSelector) {
|
|
32
32
|
if (this.list.getItems().length) {
|
|
33
33
|
resolve({ list });
|
|
@@ -44,7 +44,7 @@ export default class ErrorHandler extends UI5Object {
|
|
|
44
44
|
// Due to batching there can be more than one technical message. However the UX
|
|
45
45
|
// guidelines say "display a single message in a message box" assuming that there
|
|
46
46
|
// will be only one at a time.
|
|
47
|
-
const errorTitle = resourceBundle.getText(messages.length === 1 ? "errorText" : "multipleErrorsText");
|
|
47
|
+
const errorTitle = resourceBundle.getText(messages.length === 1 ? "errorText" : "multipleErrorsText") || "";
|
|
48
48
|
this.showServiceError(errorTitle, messages[0].getMessage());
|
|
49
49
|
}, this);
|
|
50
50
|
}
|
|
@@ -61,7 +61,7 @@ export default class Object extends BaseController {
|
|
|
61
61
|
const elementBinding = view.getElementBinding();
|
|
62
62
|
|
|
63
63
|
// No data for the binding
|
|
64
|
-
if (!elementBinding
|
|
64
|
+
if (!elementBinding?.getBoundContext()) {
|
|
65
65
|
this.getRouter().getTargets()!.display("objectNotFound");
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
@@ -41,7 +41,7 @@ export default class Worklist extends BaseController {
|
|
|
41
41
|
const total = event.getParameter("total") as number;
|
|
42
42
|
// only update the counter if the length is final and
|
|
43
43
|
// the table is not empty
|
|
44
|
-
let title: string;
|
|
44
|
+
let title: string | undefined;
|
|
45
45
|
if (total && (table.getBinding("items") as ListBinding).isLengthFinal()) {
|
|
46
46
|
title = this.getResourceBundle().getText("worklistTableTitleCount", [total]);
|
|
47
47
|
} else {
|
|
@@ -84,7 +84,7 @@ export default class Worklist extends BaseController {
|
|
|
84
84
|
*
|
|
85
85
|
*/
|
|
86
86
|
public onRefresh() {
|
|
87
|
-
this.byId("table")
|
|
87
|
+
this.byId("table")?.getBinding("items")?.refresh(false);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|