@sap-ux/preview-middleware 0.19.29 → 0.19.31

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 (96) hide show
  1. package/dist/base/flp.d.ts +2 -2
  2. package/dist/base/flp.js +3 -3
  3. package/dist/client/adp/add-fragment.js +48 -0
  4. package/dist/client/adp/add-fragment.ts +51 -0
  5. package/dist/client/adp/api-handler.js +155 -153
  6. package/dist/client/adp/api-handler.ts +2 -2
  7. package/dist/client/adp/command-executor.js +75 -75
  8. package/dist/client/adp/control-utils.js +44 -44
  9. package/dist/client/adp/controllers/AddFragment.controller.js +26 -86
  10. package/dist/client/adp/controllers/AddFragment.controller.ts +29 -113
  11. package/dist/client/adp/controllers/ControllerExtension.controller.js +210 -210
  12. package/dist/client/adp/controllers/ExtensionPoint.controller.js +139 -139
  13. package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
  14. package/dist/client/adp/dialog-factory.js +135 -135
  15. package/dist/client/adp/dialog-factory.ts +21 -13
  16. package/dist/client/adp/extension-point.js +3 -3
  17. package/dist/client/adp/extension-point.ts +3 -3
  18. package/dist/client/adp/init-dialogs.js +163 -138
  19. package/dist/client/adp/init-dialogs.ts +13 -8
  20. package/dist/client/adp/init.js +2 -0
  21. package/dist/client/adp/init.ts +5 -0
  22. package/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +96 -96
  23. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +60 -60
  24. package/dist/client/adp/quick-actions/common/create-page-action.js +54 -54
  25. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +39 -39
  26. package/dist/client/adp/quick-actions/common/op-add-header-field.js +67 -67
  27. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  28. package/dist/client/adp/quick-actions/control-types.js +23 -23
  29. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  30. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  31. package/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +81 -81
  32. package/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +67 -67
  33. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  34. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +107 -107
  35. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +99 -99
  36. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
  37. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  38. package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
  39. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +59 -59
  40. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  41. package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +84 -84
  42. package/dist/client/adp/quick-actions/fe-v2/registry.js +77 -77
  43. package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
  44. package/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +138 -138
  45. package/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +79 -79
  46. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +75 -75
  47. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +53 -53
  48. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +49 -49
  49. package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
  50. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +56 -56
  51. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +84 -84
  52. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +53 -53
  53. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  54. package/dist/client/adp/quick-actions/fe-v4/registry.js +60 -60
  55. package/dist/client/adp/quick-actions/fe-v4/utils.js +72 -72
  56. package/dist/client/adp/quick-actions/load.js +44 -44
  57. package/dist/client/adp/quick-actions/quick-action-base.js +64 -64
  58. package/dist/client/adp/utils.js +218 -218
  59. package/dist/client/cpe/additional-change-info/add-xml-additional-info.js +77 -0
  60. package/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +84 -0
  61. package/dist/client/cpe/changes/index.js +10 -10
  62. package/dist/client/cpe/changes/service.js +5 -2
  63. package/dist/client/cpe/changes/service.ts +2 -0
  64. package/dist/client/cpe/changes/validator.js +39 -39
  65. package/dist/client/cpe/connector-service.js +2 -1
  66. package/dist/client/cpe/connector-service.ts +8 -4
  67. package/dist/client/cpe/documentation.js +164 -164
  68. package/dist/client/cpe/feature-service.js +36 -36
  69. package/dist/client/cpe/logger.js +30 -30
  70. package/dist/client/cpe/outline/editable.js +37 -37
  71. package/dist/client/cpe/outline/nodes.js +203 -203
  72. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  73. package/dist/client/cpe/quick-actions/registry.js +143 -143
  74. package/dist/client/cpe/quick-actions/utils.js +92 -92
  75. package/dist/client/cpe/types.js +4 -4
  76. package/dist/client/cpe/ui5-utils.js +33 -33
  77. package/dist/client/cpe/utils.js +111 -111
  78. package/dist/client/flp/WorkspaceConnector.js +92 -86
  79. package/dist/client/flp/WorkspaceConnector.ts +10 -2
  80. package/dist/client/flp/common.js +28 -28
  81. package/dist/client/flp/enableFakeConnector.js +89 -83
  82. package/dist/client/flp/enableFakeConnector.ts +11 -2
  83. package/dist/client/flp/homepage/Component.js +14 -14
  84. package/dist/client/flp/initCdm.js +117 -117
  85. package/dist/client/flp/initConnectors.js +28 -28
  86. package/dist/client/flp/initRta.js +178 -178
  87. package/dist/client/i18n.js +56 -56
  88. package/dist/client/utils/additional-change-info.js +43 -0
  89. package/dist/client/utils/additional-change-info.ts +42 -0
  90. package/dist/client/utils/application.js +32 -32
  91. package/dist/client/utils/core.js +84 -84
  92. package/dist/client/utils/error.js +19 -19
  93. package/dist/client/utils/fe-v2.js +56 -56
  94. package/dist/client/utils/fe-v4.js +140 -140
  95. package/dist/client/utils/version.js +104 -104
  96. package/package.json +4 -4
@@ -1,113 +1,113 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/UIComponent", "../utils/core", "sap/ui/dt/OverlayRegistry", "sap/ui/dt/OverlayUtil"], function (XMLView, UIComponent, ___utils_core, OverlayRegistry, OverlayUtil) {
4
- "use strict";
5
-
6
- const getComponent = ___utils_core["getComponent"];
7
- /**
8
- * Get runtime control.
9
- *
10
- * @param overlayControl - element overlay.
11
- * @returns ManagedObject
12
- */
13
- function getRuntimeControl(overlayControl) {
14
- let runtimeControl;
15
- if (overlayControl.getElementInstance) {
16
- runtimeControl = overlayControl.getElementInstance();
17
- } else {
18
- runtimeControl = overlayControl.getElement();
19
- }
20
- return runtimeControl;
21
- }
22
-
23
- /**
24
- * Get library of a control name.
25
- *
26
- * @param controlName - name of the ui5 control eg: sap.m.Button.
27
- * @returns Promise<string>
28
- */
29
- async function getLibrary(controlName) {
30
- return new Promise(resolve => {
31
- const controlPath = controlName.replace(/\./g, '/');
32
- sap.ui.require([controlPath], control => {
33
- const contMetadata = control.getMetadata();
34
- // getLibraryName method does not exist on events
35
- if (contMetadata?.getLibraryName) {
36
- const contLibName = contMetadata.getLibraryName();
37
- resolve(contLibName);
38
- } else {
39
- resolve(''); // return empty for events
40
- }
41
- });
42
- });
43
- }
44
-
45
- /**
46
- * Gets the root view of component for the provided ComponentContainer control.
47
- *
48
- * @param container ComponentContainer control.
49
- * @returns XMLView which is the root control of the component if it exists.
50
- */
51
- function getRootControlFromComponentContainer(container) {
52
- if (container) {
53
- const componentId = container.getComponent();
54
- const component = getComponent(componentId);
55
- if (component instanceof UIComponent) {
56
- const rootControl = component.getRootControl();
57
- if (rootControl instanceof XMLView) {
58
- return rootControl;
59
- }
60
- }
61
- }
62
- return undefined;
63
- }
64
- function getManifestProperties(control, changeService, controlOverlay) {
65
- const overlayData = controlOverlay?.getDesignTimeMetadata().getData();
66
- if (!controlOverlay || !overlayData?.manifestSettings) {
67
- return {};
68
- }
69
- const manifestPropertiesValue = overlayData?.manifestSettingsValues(overlayData?.manifestSettings(control), control);
70
- const manifestProperties = overlayData?.manifestSettings(control).reduce((acc, item) => {
71
- const propertyId = item.id;
72
- const value = changeService.getConfigurationPropertyValue(control.getId(), propertyId);
73
- let propertyValue = value === 0 || value === false || value ? value : manifestPropertiesValue[propertyId];
74
- if (item?.type && ['boolean', 'number', 'string'].includes(item?.type)) {
75
- if (propertyValue === undefined) {
76
- propertyValue = item.value; // set default value of property
77
- }
78
- }
79
- if (!acc[propertyId]) {
80
- acc[propertyId] = {
81
- ...item,
82
- defaultValue: item.value,
83
- configuration: true,
84
- name: item.id,
85
- readableName: item.name,
86
- manifestPropertyPath: `${overlayData?.manifestPropertyPath(control)}/${propertyId}`,
87
- type: item.type === 'number' ? 'int' : item.type,
88
- value: propertyValue
89
- };
90
- }
91
- return acc;
92
- }, {});
93
- return manifestProperties;
94
- }
95
- const getOverlay = control => {
96
- let controlOverlay = OverlayRegistry.getOverlay(control);
97
- if (!controlOverlay?.getDomRef()) {
98
- //look for closest control
99
- controlOverlay = OverlayUtil.getClosestOverlayFor(control);
100
- }
101
- return controlOverlay;
102
- };
103
- var __exports = {
104
- __esModule: true
105
- };
106
- __exports.getRuntimeControl = getRuntimeControl;
107
- __exports.getLibrary = getLibrary;
108
- __exports.getRootControlFromComponentContainer = getRootControlFromComponentContainer;
109
- __exports.getManifestProperties = getManifestProperties;
110
- __exports.getOverlay = getOverlay;
111
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/UIComponent", "../utils/core", "sap/ui/dt/OverlayRegistry", "sap/ui/dt/OverlayUtil"], function (XMLView, UIComponent, ___utils_core, OverlayRegistry, OverlayUtil) {
4
+ "use strict";
5
+
6
+ const getComponent = ___utils_core["getComponent"];
7
+ /**
8
+ * Get runtime control.
9
+ *
10
+ * @param overlayControl - element overlay.
11
+ * @returns ManagedObject
12
+ */
13
+ function getRuntimeControl(overlayControl) {
14
+ let runtimeControl;
15
+ if (overlayControl.getElementInstance) {
16
+ runtimeControl = overlayControl.getElementInstance();
17
+ } else {
18
+ runtimeControl = overlayControl.getElement();
19
+ }
20
+ return runtimeControl;
21
+ }
22
+
23
+ /**
24
+ * Get library of a control name.
25
+ *
26
+ * @param controlName - name of the ui5 control eg: sap.m.Button.
27
+ * @returns Promise<string>
28
+ */
29
+ async function getLibrary(controlName) {
30
+ return new Promise(resolve => {
31
+ const controlPath = controlName.replace(/\./g, '/');
32
+ sap.ui.require([controlPath], control => {
33
+ const contMetadata = control.getMetadata();
34
+ // getLibraryName method does not exist on events
35
+ if (contMetadata?.getLibraryName) {
36
+ const contLibName = contMetadata.getLibraryName();
37
+ resolve(contLibName);
38
+ } else {
39
+ resolve(''); // return empty for events
40
+ }
41
+ });
42
+ });
43
+ }
44
+
45
+ /**
46
+ * Gets the root view of component for the provided ComponentContainer control.
47
+ *
48
+ * @param container ComponentContainer control.
49
+ * @returns XMLView which is the root control of the component if it exists.
50
+ */
51
+ function getRootControlFromComponentContainer(container) {
52
+ if (container) {
53
+ const componentId = container.getComponent();
54
+ const component = getComponent(componentId);
55
+ if (component instanceof UIComponent) {
56
+ const rootControl = component.getRootControl();
57
+ if (rootControl instanceof XMLView) {
58
+ return rootControl;
59
+ }
60
+ }
61
+ }
62
+ return undefined;
63
+ }
64
+ function getManifestProperties(control, changeService, controlOverlay) {
65
+ const overlayData = controlOverlay?.getDesignTimeMetadata().getData();
66
+ if (!controlOverlay || !overlayData?.manifestSettings) {
67
+ return {};
68
+ }
69
+ const manifestPropertiesValue = overlayData?.manifestSettingsValues(overlayData?.manifestSettings(control), control);
70
+ const manifestProperties = overlayData?.manifestSettings(control).reduce((acc, item) => {
71
+ const propertyId = item.id;
72
+ const value = changeService.getConfigurationPropertyValue(control.getId(), propertyId);
73
+ let propertyValue = value === 0 || value === false || value ? value : manifestPropertiesValue[propertyId];
74
+ if (item?.type && ['boolean', 'number', 'string'].includes(item?.type)) {
75
+ if (propertyValue === undefined) {
76
+ propertyValue = item.value; // set default value of property
77
+ }
78
+ }
79
+ if (!acc[propertyId]) {
80
+ acc[propertyId] = {
81
+ ...item,
82
+ defaultValue: item.value,
83
+ configuration: true,
84
+ name: item.id,
85
+ readableName: item.name,
86
+ manifestPropertyPath: `${overlayData?.manifestPropertyPath(control)}/${propertyId}`,
87
+ type: item.type === 'number' ? 'int' : item.type,
88
+ value: propertyValue
89
+ };
90
+ }
91
+ return acc;
92
+ }, {});
93
+ return manifestProperties;
94
+ }
95
+ const getOverlay = control => {
96
+ let controlOverlay = OverlayRegistry.getOverlay(control);
97
+ if (!controlOverlay?.getDomRef()) {
98
+ //look for closest control
99
+ controlOverlay = OverlayUtil.getClosestOverlayFor(control);
100
+ }
101
+ return controlOverlay;
102
+ };
103
+ var __exports = {
104
+ __esModule: true
105
+ };
106
+ __exports.getRuntimeControl = getRuntimeControl;
107
+ __exports.getLibrary = getLibrary;
108
+ __exports.getRootControlFromComponentContainer = getRootControlFromComponentContainer;
109
+ __exports.getManifestProperties = getManifestProperties;
110
+ __exports.getOverlay = getOverlay;
111
+ return __exports;
112
112
  });
113
113
  //# sourceMappingURL=utils.js.map
@@ -1,88 +1,94 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/base/util/merge", "sap/ui/fl/write/api/connectors/ObjectStorageConnector", "sap/ui/fl/Layer", "./common", "../utils/version"], function (merge, ObjectStorageConnector, Layer, ___common, ___utils_version) {
4
- "use strict";
5
-
6
- const CHANGES_API_PATH = ___common["CHANGES_API_PATH"];
7
- const getFlexSettings = ___common["getFlexSettings"];
8
- const getUi5Version = ___utils_version["getUi5Version"];
9
- const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
10
- const connector = merge({}, ObjectStorageConnector, {
11
- layers: [Layer.VENDOR, Layer.CUSTOMER_BASE],
12
- storage: {
13
- _itemsStoredAsObjects: true,
14
- fileChangeRequestNotifier: undefined,
15
- setItem: function (_key, change) {
16
- const settings = getFlexSettings();
17
- if (settings) {
18
- change.support ??= {};
19
- change.support.generator = settings.generator;
20
- }
21
- if (typeof this.fileChangeRequestNotifier === 'function' && change.fileName) {
22
- try {
23
- this.fileChangeRequestNotifier(change.fileName, 'create', change);
24
- } catch (e) {
25
- // exceptions in the listener call are ignored
26
- }
27
- }
28
- return fetch(CHANGES_API_PATH, {
29
- method: 'POST',
30
- body: JSON.stringify(change, null, 2),
31
- headers: {
32
- 'content-type': 'application/json'
33
- }
34
- });
35
- },
36
- removeItem: function (key) {
37
- if (typeof this.fileChangeRequestNotifier === 'function') {
38
- try {
39
- this.fileChangeRequestNotifier(key, 'delete');
40
- } catch (e) {
41
- // exceptions in the listener call are ignored
42
- }
43
- }
44
- return fetch(CHANGES_API_PATH, {
45
- method: 'DELETE',
46
- body: JSON.stringify({
47
- fileName: key
48
- }),
49
- headers: {
50
- 'content-type': 'application/json'
51
- }
52
- });
53
- },
54
- clear: function () {
55
- // not implemented
56
- },
57
- getItem: function (_key) {
58
- // not implemented
59
- },
60
- getItems: async function () {
61
- const response = await fetch(CHANGES_API_PATH, {
62
- method: 'GET',
63
- headers: {
64
- 'content-type': 'application/json'
65
- }
66
- });
67
- return await response.json();
68
- }
69
- },
70
- loadFeatures: async function () {
71
- const features = await ObjectStorageConnector.loadFeatures();
72
- features.isVariantAdaptationEnabled = !isLowerThanMinimalUi5Version(await getUi5Version(), {
73
- major: 1,
74
- minor: 90
75
- });
76
- const settings = getFlexSettings();
77
- if (settings?.developerMode) {
78
- features.isVariantAdaptationEnabled = false;
79
- }
80
- if (settings?.scenario === 'ADAPTATION_PROJECT') {
81
- features.isVariantAdaptationEnabled = true;
82
- }
83
- return features;
84
- }
85
- });
86
- return connector;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/base/util/merge", "sap/ui/fl/write/api/connectors/ObjectStorageConnector", "sap/ui/fl/Layer", "./common", "../utils/version", "../utils/additional-change-info"], function (merge, ObjectStorageConnector, Layer, ___common, ___utils_version, ___utils_additional_change_info) {
4
+ "use strict";
5
+
6
+ const CHANGES_API_PATH = ___common["CHANGES_API_PATH"];
7
+ const getFlexSettings = ___common["getFlexSettings"];
8
+ const getUi5Version = ___utils_version["getUi5Version"];
9
+ const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
10
+ const getAdditionalChangeInfo = ___utils_additional_change_info["getAdditionalChangeInfo"];
11
+ const connector = merge({}, ObjectStorageConnector, {
12
+ layers: [Layer.VENDOR, Layer.CUSTOMER_BASE],
13
+ storage: {
14
+ _itemsStoredAsObjects: true,
15
+ fileChangeRequestNotifier: undefined,
16
+ setItem: function (_key, change) {
17
+ const settings = getFlexSettings();
18
+ if (settings) {
19
+ change.support ??= {};
20
+ change.support.generator = settings.generator;
21
+ }
22
+ const additionalChangeInfo = getAdditionalChangeInfo(change);
23
+ if (typeof this.fileChangeRequestNotifier === 'function' && change.fileName) {
24
+ try {
25
+ this.fileChangeRequestNotifier(change.fileName, 'create', change, additionalChangeInfo);
26
+ } catch (e) {
27
+ // exceptions in the listener call are ignored
28
+ }
29
+ }
30
+ const body = {
31
+ change,
32
+ additionalChangeInfo
33
+ };
34
+ return fetch(CHANGES_API_PATH, {
35
+ method: 'POST',
36
+ body: JSON.stringify(body, null, 2),
37
+ headers: {
38
+ 'content-type': 'application/json'
39
+ }
40
+ });
41
+ },
42
+ removeItem: function (key) {
43
+ if (typeof this.fileChangeRequestNotifier === 'function') {
44
+ try {
45
+ this.fileChangeRequestNotifier(key, 'delete');
46
+ } catch (e) {
47
+ // exceptions in the listener call are ignored
48
+ }
49
+ }
50
+ return fetch(CHANGES_API_PATH, {
51
+ method: 'DELETE',
52
+ body: JSON.stringify({
53
+ fileName: key
54
+ }),
55
+ headers: {
56
+ 'content-type': 'application/json'
57
+ }
58
+ });
59
+ },
60
+ clear: function () {
61
+ // not implemented
62
+ },
63
+ getItem: function (_key) {
64
+ // not implemented
65
+ },
66
+ getItems: async function () {
67
+ const response = await fetch(CHANGES_API_PATH, {
68
+ method: 'GET',
69
+ headers: {
70
+ 'content-type': 'application/json'
71
+ }
72
+ });
73
+ return await response.json();
74
+ }
75
+ },
76
+ loadFeatures: async function () {
77
+ const features = await ObjectStorageConnector.loadFeatures();
78
+ features.isVariantAdaptationEnabled = !isLowerThanMinimalUi5Version(await getUi5Version(), {
79
+ major: 1,
80
+ minor: 90
81
+ });
82
+ const settings = getFlexSettings();
83
+ if (settings?.developerMode) {
84
+ features.isVariantAdaptationEnabled = false;
85
+ }
86
+ if (settings?.scenario === 'ADAPTATION_PROJECT') {
87
+ features.isVariantAdaptationEnabled = true;
88
+ }
89
+ return features;
90
+ }
91
+ });
92
+ return connector;
87
93
  });
88
94
  //# sourceMappingURL=WorkspaceConnector.js.map
@@ -3,6 +3,7 @@ import ObjectStorageConnector from 'sap/ui/fl/write/api/connectors/ObjectStorage
3
3
  import Layer from 'sap/ui/fl/Layer';
4
4
  import { CHANGES_API_PATH, FlexChange, getFlexSettings } from './common';
5
5
  import { getUi5Version, isLowerThanMinimalUi5Version } from '../utils/version';
6
+ import { getAdditionalChangeInfo } from '../utils/additional-change-info';
6
7
 
7
8
  const connector = merge({}, ObjectStorageConnector, {
8
9
  layers: [Layer.VENDOR, Layer.CUSTOMER_BASE],
@@ -16,17 +17,24 @@ const connector = merge({}, ObjectStorageConnector, {
16
17
  change.support.generator = settings.generator;
17
18
  }
18
19
 
20
+ const additionalChangeInfo = getAdditionalChangeInfo(change);
21
+
19
22
  if (typeof this.fileChangeRequestNotifier === 'function' && change.fileName) {
20
23
  try {
21
- this.fileChangeRequestNotifier(change.fileName, 'create', change);
24
+ this.fileChangeRequestNotifier(change.fileName, 'create', change, additionalChangeInfo);
22
25
  } catch (e) {
23
26
  // exceptions in the listener call are ignored
24
27
  }
25
28
  }
26
29
 
30
+ const body = {
31
+ change,
32
+ additionalChangeInfo
33
+ };
34
+
27
35
  return fetch(CHANGES_API_PATH, {
28
36
  method: 'POST',
29
- body: JSON.stringify(change, null, 2),
37
+ body: JSON.stringify(body, null, 2),
30
38
  headers: {
31
39
  'content-type': 'application/json'
32
40
  }
@@ -1,30 +1,30 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- const CHANGES_API_PATH = '/preview/api/changes';
7
-
8
- /**
9
- * Retrieves Flex settings from a 'sap-ui-bootstrap' element's data attribute.
10
- * Parses the 'data-open-ux-preview-flex-settings' attribute as JSON.
11
- *
12
- * @returns {FlexSettings | undefined} The parsed Flex settings if available, otherwise undefined.
13
- */
14
- function getFlexSettings() {
15
- let result;
16
- const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
17
- const flexSetting = bootstrapConfig?.getAttribute('data-open-ux-preview-flex-settings');
18
- if (flexSetting) {
19
- result = JSON.parse(flexSetting);
20
- }
21
- return result;
22
- }
23
- var __exports = {
24
- __esModule: true
25
- };
26
- __exports.CHANGES_API_PATH = CHANGES_API_PATH;
27
- __exports.getFlexSettings = getFlexSettings;
28
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ const CHANGES_API_PATH = '/preview/api/changes';
7
+
8
+ /**
9
+ * Retrieves Flex settings from a 'sap-ui-bootstrap' element's data attribute.
10
+ * Parses the 'data-open-ux-preview-flex-settings' attribute as JSON.
11
+ *
12
+ * @returns {FlexSettings | undefined} The parsed Flex settings if available, otherwise undefined.
13
+ */
14
+ function getFlexSettings() {
15
+ let result;
16
+ const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
17
+ const flexSetting = bootstrapConfig?.getAttribute('data-open-ux-preview-flex-settings');
18
+ if (flexSetting) {
19
+ result = JSON.parse(flexSetting);
20
+ }
21
+ return result;
22
+ }
23
+ var __exports = {
24
+ __esModule: true
25
+ };
26
+ __exports.CHANGES_API_PATH = CHANGES_API_PATH;
27
+ __exports.getFlexSettings = getFlexSettings;
28
+ return __exports;
29
29
  });
30
30
  //# sourceMappingURL=common.js.map