@sap-ux/preview-middleware 0.16.161 → 0.16.163

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.
Files changed (78) hide show
  1. package/dist/base/flex.js +28 -7
  2. package/dist/client/adp/api-handler.js +164 -142
  3. package/dist/client/adp/api-handler.ts +31 -0
  4. package/dist/client/adp/command-executor.js +75 -75
  5. package/dist/client/adp/control-utils.js +44 -44
  6. package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
  7. package/dist/client/adp/controllers/BaseDialog.controller.ts +1 -2
  8. package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
  9. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  10. package/dist/client/adp/controllers/FileExistsDialog.controller.js +71 -0
  11. package/dist/client/adp/controllers/FileExistsDialog.controller.ts +92 -0
  12. package/dist/client/adp/dialog-factory.js +122 -113
  13. package/dist/client/adp/dialog-factory.ts +15 -7
  14. package/dist/client/adp/init-dialogs.js +100 -100
  15. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
  16. package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +118 -0
  17. package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +141 -0
  18. package/dist/client/adp/quick-actions/common/create-page-action.js +50 -50
  19. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
  20. package/dist/client/adp/quick-actions/common/op-add-header-field.js +48 -48
  21. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  22. package/dist/client/adp/quick-actions/control-types.js +21 -21
  23. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  24. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  25. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  26. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +70 -70
  27. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
  28. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +60 -60
  29. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  30. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +57 -57
  31. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  32. package/dist/client/adp/quick-actions/fe-v2/registry.js +73 -72
  33. package/dist/client/adp/quick-actions/fe-v2/registry.ts +5 -2
  34. package/dist/client/adp/quick-actions/fe-v2/utils.js +95 -95
  35. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +49 -49
  36. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +47 -47
  37. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
  38. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +55 -55
  39. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
  40. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +52 -52
  41. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  42. package/dist/client/adp/quick-actions/fe-v4/registry.js +57 -56
  43. package/dist/client/adp/quick-actions/fe-v4/registry.ts +5 -2
  44. package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
  45. package/dist/client/adp/quick-actions/load.js +44 -44
  46. package/dist/client/adp/quick-actions/quick-action-base.js +53 -53
  47. package/dist/client/adp/ui/FileExistsDialog.fragment.xml +33 -0
  48. package/dist/client/adp/utils.js +160 -160
  49. package/dist/client/cpe/changes/index.js +10 -10
  50. package/dist/client/cpe/changes/service.js +8 -3
  51. package/dist/client/cpe/changes/service.ts +14 -3
  52. package/dist/client/cpe/changes/validator.js +34 -34
  53. package/dist/client/cpe/documentation.js +164 -164
  54. package/dist/client/cpe/feature-service.js +36 -36
  55. package/dist/client/cpe/logger.js +30 -30
  56. package/dist/client/cpe/outline/editable.js +37 -37
  57. package/dist/client/cpe/outline/nodes.js +222 -217
  58. package/dist/client/cpe/outline/nodes.ts +64 -58
  59. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  60. package/dist/client/cpe/quick-actions/registry.js +143 -143
  61. package/dist/client/cpe/quick-actions/utils.js +92 -92
  62. package/dist/client/cpe/types.js +4 -4
  63. package/dist/client/cpe/ui5-utils.js +33 -33
  64. package/dist/client/cpe/utils.js +138 -138
  65. package/dist/client/flp/WorkspaceConnector.js +86 -86
  66. package/dist/client/flp/common.js +28 -28
  67. package/dist/client/flp/enableFakeConnector.js +83 -83
  68. package/dist/client/flp/initConnectors.js +30 -30
  69. package/dist/client/flp/initRta.js +178 -178
  70. package/dist/client/i18n.js +56 -56
  71. package/dist/client/messagebundle.properties +9 -0
  72. package/dist/client/tsconfig.tsbuildinfo +1 -0
  73. package/dist/client/utils/application.js +32 -32
  74. package/dist/client/utils/core.js +68 -68
  75. package/dist/client/utils/error.js +19 -19
  76. package/dist/client/utils/fe-v4.js +118 -118
  77. package/dist/client/utils/version.js +102 -102
  78. package/package.json +4 -4
@@ -0,0 +1,33 @@
1
+ <Dialog
2
+ id="fileExistsDialog"
3
+ xmlns:mvc="sap.ui.core.mvc"
4
+ xmlns="sap.m"
5
+ xmlns:core="sap.ui.core"
6
+ xmlns:f="sap.ui.layout.form"
7
+ title="{i18n>ANNOTATION_FILE_EXISTS}"
8
+ contentWidth="450px"
9
+ class="sapUiRTABorder"
10
+ type="Message"
11
+ >
12
+ <content>
13
+ <Text text="{i18n>ANNOTATION_FILE_HAS_BEEN_FOUND}" />
14
+ <Text text="{/filePathFromRoot}" />
15
+ </content>
16
+ <beginButton>
17
+ <Button
18
+ id="showFileInVscodeBtn"
19
+ text="{i18n>SHOW_FILE_IN_VSCODE}"
20
+ press="onShowFileInVscodeBtn"
21
+ enabled="true"
22
+ type="Emphasized"
23
+ />
24
+ </beginButton>
25
+ <endButton>
26
+ <Button
27
+ id="closeShowFileInVsCodeBtn"
28
+ text="{i18n>CANCEL_BUTTON_LABEL}"
29
+ press="handleDialogClose"
30
+ type="Reject"
31
+ />
32
+ </endButton>
33
+ </Dialog>
@@ -1,162 +1,162 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/m/MessageToast", "sap/ui/core/Element", "sap/base/Log", "sap/ui/fl/Utils", "../utils/error", "../utils/version"], function (MessageToast, Element, Log, FlexUtils, ___utils_error, ___utils_version) {
4
- "use strict";
5
-
6
- function __ui5_require_async(path) {
7
- return new Promise(function (resolve, reject) {
8
- sap.ui.require([path], function (module) {
9
- if (!(module && module.__esModule)) {
10
- module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
11
- default: module
12
- } : module;
13
- Object.defineProperty(module, "__esModule", {
14
- value: true
15
- });
16
- }
17
- resolve(module);
18
- }, function (err) {
19
- reject(err);
20
- });
21
- });
22
- }
23
- const getError = ___utils_error["getError"];
24
- const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
25
- /**
26
- * Defers the resolution of the promise, stores resolve/reject functions so that they can be accessed at a later stage.
27
- *
28
- * @description A Deferred object contains an unresolved promise along with the functions to resolve or reject that promise.
29
- *
30
- * @returns {Deferred} Deferred object
31
- */
32
- function createDeferred() {
33
- let resolve = null;
34
- let reject = null;
35
- const promise = new Promise((res, rej) => {
36
- resolve = res;
37
- reject = rej;
38
- });
39
- if (resolve === null || reject === null) {
40
- throw new Error('Failed to initialize resolve and reject functions.');
41
- }
42
- return {
43
- promise,
44
- resolve,
45
- reject
46
- };
47
- }
48
-
49
- /**
50
- * Checks if the fragment name associated with a command matches the specified fragment name.
51
- *
52
- * @param {FlexCommand} command - The command object containing the prepared change to be examined.
53
- * @param {string} fragmentName - The name of the fragment to match against the command's change.
54
- * @returns {boolean} Returns true if the command's change contains a fragment path that matches
55
- * the specified fragment name; otherwise, returns false.
56
- */
57
- function matchesFragmentName(command, fragmentName) {
58
- if (typeof command.getPreparedChange !== 'function') {
59
- return false;
60
- }
61
- const change = command.getPreparedChange().getDefinition();
62
- return change.content?.fragmentPath?.includes(`${fragmentName}.fragment.xml`) || false;
63
- }
64
-
65
- /**
66
- * Displays a message to the user indicating that an XML fragment will be created upon saving a change.
67
- *
68
- * @param {string} message - The message to be shown in the message toast.
69
- * @param {number} duration - The duration during which message toast will be active.
70
- */
71
- function notifyUser(message) {
72
- let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5000;
73
- MessageToast.show(message, {
74
- duration
75
- });
76
- }
77
-
78
- /**
79
- * Check if element is sync view
80
- *
81
- * @param element Design time Element
82
- * @returns boolean if element is sync view or not
83
- */
84
- function isSyncView(element) {
85
- return element?.getMetadata()?.getName()?.includes('XMLView') && element?.oAsyncState === undefined;
86
- }
87
-
88
- /**
89
- * Get Ids for all sync views
90
- *
91
- * @param ui5VersionInfo UI5 Version Information
92
- *
93
- * @returns array of Ids for application sync views
94
- */
95
- async function getAllSyncViewsIds(ui5VersionInfo) {
96
- const syncViewIds = [];
97
- try {
98
- if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
99
- major: 1,
100
- minor: 120
101
- })) {
102
- const elements = Element.registry.filter(() => true);
103
- elements.forEach(ui5Element => {
104
- if (isSyncView(ui5Element)) {
105
- syncViewIds.push(ui5Element.getId());
106
- }
107
- });
108
- } else {
109
- const ElementRegistry = (await __ui5_require_async('sap/ui/core/ElementRegistry')).default;
110
- const elements = ElementRegistry.all();
111
- Object.entries(elements).forEach(_ref => {
112
- let [key, ui5Element] = _ref;
113
- if (isSyncView(ui5Element)) {
114
- syncViewIds.push(key);
115
- }
116
- });
117
- }
118
- } catch (error) {
119
- Log.error('Could not get application sync views', getError(error));
120
- }
121
- return syncViewIds;
122
- }
123
- /**
124
- * Gets controller name and view ID for the given UI5 control.
125
- *
126
- * @param control UI5 control.
127
- * @returns The controller name and view ID.
128
- */
129
-
130
- function getControllerInfoForControl(control) {
131
- const view = FlexUtils.getViewForControl(control);
132
- const controllerName = view.getController().getMetadata().getName();
133
- const viewId = view.getId();
134
- return {
135
- controllerName,
136
- viewId
137
- };
138
- }
139
-
140
- /**
141
- * Gets controller name and view ID for the given overlay control.
142
- *
143
- * @param overlayControl The overlay control.
144
- * @returns The controller name and view ID.
145
- */
146
-
147
- function getControllerInfo(overlayControl) {
148
- const control = overlayControl.getElement();
149
- return getControllerInfoForControl(control);
150
- }
151
- var __exports = {
152
- __esModule: true
153
- };
154
- __exports.createDeferred = createDeferred;
155
- __exports.matchesFragmentName = matchesFragmentName;
156
- __exports.notifyUser = notifyUser;
157
- __exports.getAllSyncViewsIds = getAllSyncViewsIds;
158
- __exports.getControllerInfoForControl = getControllerInfoForControl;
159
- __exports.getControllerInfo = getControllerInfo;
160
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/m/MessageToast", "sap/ui/core/Element", "sap/base/Log", "sap/ui/fl/Utils", "../utils/error", "../utils/version"], function (MessageToast, Element, Log, FlexUtils, ___utils_error, ___utils_version) {
4
+ "use strict";
5
+
6
+ function __ui5_require_async(path) {
7
+ return new Promise(function (resolve, reject) {
8
+ sap.ui.require([path], function (module) {
9
+ if (!(module && module.__esModule)) {
10
+ module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
11
+ default: module
12
+ } : module;
13
+ Object.defineProperty(module, "__esModule", {
14
+ value: true
15
+ });
16
+ }
17
+ resolve(module);
18
+ }, function (err) {
19
+ reject(err);
20
+ });
21
+ });
22
+ }
23
+ const getError = ___utils_error["getError"];
24
+ const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
25
+ /**
26
+ * Defers the resolution of the promise, stores resolve/reject functions so that they can be accessed at a later stage.
27
+ *
28
+ * @description A Deferred object contains an unresolved promise along with the functions to resolve or reject that promise.
29
+ *
30
+ * @returns {Deferred} Deferred object
31
+ */
32
+ function createDeferred() {
33
+ let resolve = null;
34
+ let reject = null;
35
+ const promise = new Promise((res, rej) => {
36
+ resolve = res;
37
+ reject = rej;
38
+ });
39
+ if (resolve === null || reject === null) {
40
+ throw new Error('Failed to initialize resolve and reject functions.');
41
+ }
42
+ return {
43
+ promise,
44
+ resolve,
45
+ reject
46
+ };
47
+ }
48
+
49
+ /**
50
+ * Checks if the fragment name associated with a command matches the specified fragment name.
51
+ *
52
+ * @param {FlexCommand} command - The command object containing the prepared change to be examined.
53
+ * @param {string} fragmentName - The name of the fragment to match against the command's change.
54
+ * @returns {boolean} Returns true if the command's change contains a fragment path that matches
55
+ * the specified fragment name; otherwise, returns false.
56
+ */
57
+ function matchesFragmentName(command, fragmentName) {
58
+ if (typeof command.getPreparedChange !== 'function') {
59
+ return false;
60
+ }
61
+ const change = command.getPreparedChange().getDefinition();
62
+ return change.content?.fragmentPath?.includes(`${fragmentName}.fragment.xml`) || false;
63
+ }
64
+
65
+ /**
66
+ * Displays a message to the user indicating that an XML fragment will be created upon saving a change.
67
+ *
68
+ * @param {string} message - The message to be shown in the message toast.
69
+ * @param {number} duration - The duration during which message toast will be active.
70
+ */
71
+ function notifyUser(message) {
72
+ let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5000;
73
+ MessageToast.show(message, {
74
+ duration
75
+ });
76
+ }
77
+
78
+ /**
79
+ * Check if element is sync view
80
+ *
81
+ * @param element Design time Element
82
+ * @returns boolean if element is sync view or not
83
+ */
84
+ function isSyncView(element) {
85
+ return element?.getMetadata()?.getName()?.includes('XMLView') && element?.oAsyncState === undefined;
86
+ }
87
+
88
+ /**
89
+ * Get Ids for all sync views
90
+ *
91
+ * @param ui5VersionInfo UI5 Version Information
92
+ *
93
+ * @returns array of Ids for application sync views
94
+ */
95
+ async function getAllSyncViewsIds(ui5VersionInfo) {
96
+ const syncViewIds = [];
97
+ try {
98
+ if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
99
+ major: 1,
100
+ minor: 120
101
+ })) {
102
+ const elements = Element.registry.filter(() => true);
103
+ elements.forEach(ui5Element => {
104
+ if (isSyncView(ui5Element)) {
105
+ syncViewIds.push(ui5Element.getId());
106
+ }
107
+ });
108
+ } else {
109
+ const ElementRegistry = (await __ui5_require_async('sap/ui/core/ElementRegistry')).default;
110
+ const elements = ElementRegistry.all();
111
+ Object.entries(elements).forEach(_ref => {
112
+ let [key, ui5Element] = _ref;
113
+ if (isSyncView(ui5Element)) {
114
+ syncViewIds.push(key);
115
+ }
116
+ });
117
+ }
118
+ } catch (error) {
119
+ Log.error('Could not get application sync views', getError(error));
120
+ }
121
+ return syncViewIds;
122
+ }
123
+ /**
124
+ * Gets controller name and view ID for the given UI5 control.
125
+ *
126
+ * @param control UI5 control.
127
+ * @returns The controller name and view ID.
128
+ */
129
+
130
+ function getControllerInfoForControl(control) {
131
+ const view = FlexUtils.getViewForControl(control);
132
+ const controllerName = view.getController().getMetadata().getName();
133
+ const viewId = view.getId();
134
+ return {
135
+ controllerName,
136
+ viewId
137
+ };
138
+ }
139
+
140
+ /**
141
+ * Gets controller name and view ID for the given overlay control.
142
+ *
143
+ * @param overlayControl The overlay control.
144
+ * @returns The controller name and view ID.
145
+ */
146
+
147
+ function getControllerInfo(overlayControl) {
148
+ const control = overlayControl.getElement();
149
+ return getControllerInfoForControl(control);
150
+ }
151
+ var __exports = {
152
+ __esModule: true
153
+ };
154
+ __exports.createDeferred = createDeferred;
155
+ __exports.matchesFragmentName = matchesFragmentName;
156
+ __exports.notifyUser = notifyUser;
157
+ __exports.getAllSyncViewsIds = getAllSyncViewsIds;
158
+ __exports.getControllerInfoForControl = getControllerInfoForControl;
159
+ __exports.getControllerInfo = getControllerInfo;
160
+ return __exports;
161
161
  });
162
162
  //# sourceMappingURL=utils.js.map
@@ -1,12 +1,12 @@
1
- "use strict";
2
-
3
- sap.ui.define(["./service"], function (___service) {
4
- "use strict";
5
-
6
- var __exports = {
7
- __esModule: true
8
- };
9
- __exports.ChangeService = ___service.ChangeService;
10
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["./service"], function (___service) {
4
+ "use strict";
5
+
6
+ var __exports = {
7
+ __esModule: true
8
+ };
9
+ __exports.ChangeService = ___service.ChangeService;
10
+ return __exports;
11
11
  });
12
12
  //# sourceMappingURL=index.js.map
@@ -48,6 +48,7 @@ sap.ui.define([
48
48
  const getControlById = ____utils_core['getControlById'];
49
49
  const isA = ____utils_core['isA'];
50
50
  const getConfigMapControlIdMap = ____utils_fe_v4['getConfigMapControlIdMap'];
51
+ const TITLE_MAP = { appdescr_app_addAnnotationsToOData: 'Add New Annotation File' };
51
52
  const STACK_CHANGE_EVENT = 'STACK_CHANGED';
52
53
  const PROPRTY_CHANGE = 'propertyChange';
53
54
  const PROPRTY_BINDING_CHANGE = 'propertyBindingChange';
@@ -202,6 +203,7 @@ sap.ui.define([
202
203
  };
203
204
  }
204
205
  } catch (error) {
206
+ const title = TITLE_MAP[change.changeType] ?? '';
205
207
  if (change.fileName) {
206
208
  this.changedFiles[change.fileName] = change;
207
209
  const unknownChange = {
@@ -209,7 +211,8 @@ sap.ui.define([
209
211
  kind: 'unknown',
210
212
  changeType: change.changeType,
211
213
  fileName: change.fileName,
212
- timestamp: new Date(change.creation).getTime()
214
+ timestamp: new Date(change.creation).getTime(),
215
+ ...title && { title }
213
216
  };
214
217
  if (change.creation) {
215
218
  unknownChange.timestamp = new Date(change.creation).getTime();
@@ -282,7 +285,7 @@ sap.ui.define([
282
285
  const eventIndex = this.eventStack.indexOf(event);
283
286
  if (this.eventStack.length - 1 === eventIndex) {
284
287
  this.pendingChanges = pendingChanges.filter(change => !!change);
285
- const changesRequiringReload = this.pendingChanges.reduce((sum, change) => change.kind === CONFIGURATION_CHANGE_KIND || change.changeType === 'appdescr_ui_generic_app_changePageConfiguration' ? sum + 1 : sum, 0);
288
+ const changesRequiringReload = this.pendingChanges.reduce((sum, change) => change.kind === CONFIGURATION_CHANGE_KIND || change.changeType === 'appdescr_ui_generic_app_changePageConfiguration' || change.changeType === 'appdescr_app_addAnnotationsToOData' ? sum + 1 : sum, 0);
286
289
  if (changesRequiringReload > this.changesRequiringReload) {
287
290
  MessageToast.show(resourceBundle.getText('CPE_CHANGES_VISIBLE_AFTER_SAVE_AND_RELOAD_MESSAGE'), { duration: 8000 });
288
291
  this.sendAction(setApplicationRequiresReload(changesRequiringReload > 0));
@@ -391,7 +394,7 @@ sap.ui.define([
391
394
  if (!changeType) {
392
395
  return undefined;
393
396
  }
394
- const {fileName} = change.getDefinition();
397
+ const {fileName} = change.getDefinition ? change.getDefinition() : change.getJson();
395
398
  if ((changeType === 'propertyChange' || changeType === 'propertyBindingChange') && selectorId) {
396
399
  let value = '';
397
400
  switch (changeType) {
@@ -420,9 +423,11 @@ sap.ui.define([
420
423
  } else if (changeType === 'appdescr_ui_generic_app_changePageConfiguration') {
421
424
  return this.prepareV2ConfigurationChange(command, fileName, index, inactiveCommandCount);
422
425
  } else {
426
+ const title = TITLE_MAP[changeType] ?? '';
423
427
  let result = {
424
428
  type: PENDING_CHANGE_TYPE,
425
429
  kind: UNKNOWN_CHANGE_KIND,
430
+ ...title && { title },
426
431
  changeType,
427
432
  isActive: index >= inactiveCommandCount,
428
433
  fileName
@@ -39,6 +39,10 @@ import { getControlById, isA } from '../../utils/core';
39
39
  import UI5Element from 'sap/ui/core/Element';
40
40
  import { getConfigMapControlIdMap } from '../../utils/fe-v4';
41
41
 
42
+ const TITLE_MAP: { [key: string]: string } = {
43
+ appdescr_app_addAnnotationsToOData: 'Add New Annotation File'
44
+ };
45
+
42
46
  interface ChangeContent {
43
47
  property: string;
44
48
  newValue: string;
@@ -317,6 +321,7 @@ export class ChangeService extends EventTarget {
317
321
  }
318
322
  } catch (error) {
319
323
  // Gracefully handle change files with invalid content
324
+ const title = TITLE_MAP[change.changeType] ?? '';
320
325
  if (change.fileName) {
321
326
  this.changedFiles[change.fileName] = change;
322
327
  const unknownChange: UnknownSavedChange = {
@@ -324,7 +329,8 @@ export class ChangeService extends EventTarget {
324
329
  kind: 'unknown',
325
330
  changeType: change.changeType,
326
331
  fileName: change.fileName,
327
- timestamp: new Date(change.creation).getTime()
332
+ timestamp: new Date(change.creation).getTime(),
333
+ ...(title && { title })
328
334
  };
329
335
  if (change.creation) {
330
336
  unknownChange.timestamp = new Date(change.creation).getTime();
@@ -431,7 +437,8 @@ export class ChangeService extends EventTarget {
431
437
  const changesRequiringReload = this.pendingChanges.reduce(
432
438
  (sum, change) =>
433
439
  change.kind === CONFIGURATION_CHANGE_KIND ||
434
- change.changeType === 'appdescr_ui_generic_app_changePageConfiguration'
440
+ change.changeType === 'appdescr_ui_generic_app_changePageConfiguration' ||
441
+ change.changeType === 'appdescr_app_addAnnotationsToOData'
435
442
  ? sum + 1
436
443
  : sum,
437
444
  0
@@ -628,7 +635,9 @@ export class ChangeService extends EventTarget {
628
635
  return undefined;
629
636
  }
630
637
 
631
- const { fileName } = change.getDefinition();
638
+ const { fileName } = change.getDefinition
639
+ ? change.getDefinition()
640
+ : (change.getJson() as { fileName: string });
632
641
  if ((changeType === 'propertyChange' || changeType === 'propertyBindingChange') && selectorId) {
633
642
  let value = '';
634
643
  switch (changeType) {
@@ -660,9 +669,11 @@ export class ChangeService extends EventTarget {
660
669
  } else if (changeType === 'appdescr_ui_generic_app_changePageConfiguration') {
661
670
  return this.prepareV2ConfigurationChange(command, fileName, index, inactiveCommandCount);
662
671
  } else {
672
+ const title = TITLE_MAP[changeType] ?? '';
663
673
  let result: PendingChange = {
664
674
  type: PENDING_CHANGE_TYPE,
665
675
  kind: UNKNOWN_CHANGE_KIND,
676
+ ...(title && { title }),
666
677
  changeType,
667
678
  isActive: index >= inactiveCommandCount,
668
679
  fileName
@@ -1,36 +1,36 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- /**
7
- * Function to validate if a given value is a valid binding model.
8
- *
9
- * @param modifiedControl control to be modified.
10
- * @param value value to be checked.
11
- */
12
- function validateBindingModel(modifiedControl, value) {
13
- const bindingValue = value.replace(/[{}]/gi, '').trim();
14
- const bindingParts = bindingValue.split('>').filter(el => el !== '');
15
- if (!bindingParts.length) {
16
- throw new SyntaxError('Invalid binding string.');
17
- }
18
- if (bindingParts[0].trim() === 'i18n') {
19
- if (bindingParts.length === 2) {
20
- const resourceKey = bindingParts[1].trim();
21
- const resourceBundle = modifiedControl.getModel('i18n').getResourceBundle();
22
- if (!resourceBundle.getText(resourceKey, undefined, true)) {
23
- throw new SyntaxError('Invalid key in the binding string. Supported value pattern is {i18n>YOUR_KEY}. Check if the key already exists in i18n.properties.' + 'If not, add the key in the i18n.properties file and reload the editor for the new key to take effect.');
24
- }
25
- } else {
26
- throw new SyntaxError('Invalid binding string. Supported value pattern is {i18n>YOUR_KEY}');
27
- }
28
- }
29
- }
30
- var __exports = {
31
- __esModule: true
32
- };
33
- __exports.validateBindingModel = validateBindingModel;
34
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Function to validate if a given value is a valid binding model.
8
+ *
9
+ * @param modifiedControl control to be modified.
10
+ * @param value value to be checked.
11
+ */
12
+ function validateBindingModel(modifiedControl, value) {
13
+ const bindingValue = value.replace(/[{}]/gi, '').trim();
14
+ const bindingParts = bindingValue.split('>').filter(el => el !== '');
15
+ if (!bindingParts.length) {
16
+ throw new SyntaxError('Invalid binding string.');
17
+ }
18
+ if (bindingParts[0].trim() === 'i18n') {
19
+ if (bindingParts.length === 2) {
20
+ const resourceKey = bindingParts[1].trim();
21
+ const resourceBundle = modifiedControl.getModel('i18n').getResourceBundle();
22
+ if (!resourceBundle.getText(resourceKey, undefined, true)) {
23
+ throw new SyntaxError('Invalid key in the binding string. Supported value pattern is {i18n>YOUR_KEY}. Check if the key already exists in i18n.properties.' + 'If not, add the key in the i18n.properties file and reload the editor for the new key to take effect.');
24
+ }
25
+ } else {
26
+ throw new SyntaxError('Invalid binding string. Supported value pattern is {i18n>YOUR_KEY}');
27
+ }
28
+ }
29
+ }
30
+ var __exports = {
31
+ __esModule: true
32
+ };
33
+ __exports.validateBindingModel = validateBindingModel;
34
+ return __exports;
35
35
  });
36
36
  //# sourceMappingURL=validator.js.map