@sap-ux/preview-middleware 0.19.28 → 0.19.30

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 (97) 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/adp/utils.ts +2 -2
  60. package/dist/client/cpe/additional-change-info/add-xml-additional-info.js +77 -0
  61. package/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +84 -0
  62. package/dist/client/cpe/changes/index.js +10 -10
  63. package/dist/client/cpe/changes/service.js +5 -2
  64. package/dist/client/cpe/changes/service.ts +2 -0
  65. package/dist/client/cpe/changes/validator.js +39 -39
  66. package/dist/client/cpe/connector-service.js +2 -1
  67. package/dist/client/cpe/connector-service.ts +8 -4
  68. package/dist/client/cpe/documentation.js +164 -164
  69. package/dist/client/cpe/feature-service.js +36 -36
  70. package/dist/client/cpe/logger.js +30 -30
  71. package/dist/client/cpe/outline/editable.js +37 -37
  72. package/dist/client/cpe/outline/nodes.js +203 -203
  73. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  74. package/dist/client/cpe/quick-actions/registry.js +143 -143
  75. package/dist/client/cpe/quick-actions/utils.js +92 -92
  76. package/dist/client/cpe/types.js +4 -4
  77. package/dist/client/cpe/ui5-utils.js +33 -33
  78. package/dist/client/cpe/utils.js +111 -111
  79. package/dist/client/flp/WorkspaceConnector.js +92 -86
  80. package/dist/client/flp/WorkspaceConnector.ts +10 -2
  81. package/dist/client/flp/common.js +28 -28
  82. package/dist/client/flp/enableFakeConnector.js +89 -83
  83. package/dist/client/flp/enableFakeConnector.ts +11 -2
  84. package/dist/client/flp/homepage/Component.js +14 -14
  85. package/dist/client/flp/initCdm.js +117 -117
  86. package/dist/client/flp/initConnectors.js +28 -28
  87. package/dist/client/flp/initRta.js +178 -178
  88. package/dist/client/i18n.js +56 -56
  89. package/dist/client/utils/additional-change-info.js +43 -0
  90. package/dist/client/utils/additional-change-info.ts +42 -0
  91. package/dist/client/utils/application.js +32 -32
  92. package/dist/client/utils/core.js +84 -84
  93. package/dist/client/utils/error.js +19 -19
  94. package/dist/client/utils/fe-v2.js +56 -56
  95. package/dist/client/utils/fe-v4.js +140 -140
  96. package/dist/client/utils/version.js +104 -104
  97. package/package.json +3 -3
@@ -1,85 +1,91 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/fl/LrepConnector", "sap/ui/fl/FakeLrepConnector", "./common"], function (LrepConnector, FakeLrepConnector, ___common) {
4
- "use strict";
5
-
6
- const CHANGES_API_PATH = ___common["CHANGES_API_PATH"];
7
- const getFlexSettings = ___common["getFlexSettings"];
8
- /**
9
- * Processes an array of FlexChange objects.
10
- * It updates each change object with settings and sends them to a API endpoint.
11
- *
12
- * @param {FlexChange | FlexChange[]} changes - Array of FlexChange objects to be processed.
13
- * @returns {Promise<void>} A promise that resolves when all changes are processed.
14
- */
15
- async function create(changes) {
16
- const settings = getFlexSettings();
17
- await Promise.all((Array.isArray(changes) ? changes : [changes]).map(change => {
18
- if (settings) {
19
- change.support ??= {};
20
- change.support.generator = settings.generator;
21
- }
22
- if (typeof FakeLrepConnector.fileChangeRequestNotifier === 'function' && change.fileName) {
23
- try {
24
- FakeLrepConnector.fileChangeRequestNotifier(change.fileName, 'create', change);
25
- } catch (e) {
26
- // exceptions in the listener call are ignored
27
- }
28
- }
29
- return fetch(CHANGES_API_PATH, {
30
- method: 'POST',
31
- body: JSON.stringify(change, null, 2),
32
- headers: {
33
- 'content-type': 'application/json'
34
- }
35
- });
36
- }));
37
- }
38
-
39
- /**
40
- * Loads changes from a given path and processes them using an LrepConnector instance.
41
- * The changes are then formatted and returned in a specified structure.
42
- *
43
- * @returns {Promise<LoadChangesResult>} A promise that resolves to an object of type LoadChangesResult.
44
- */
45
- async function loadChanges() {
46
- const lrep = new LrepConnector();
47
- const response = await fetch(CHANGES_API_PATH, {
48
- method: 'GET',
49
- headers: {
50
- 'content-type': 'application/json'
51
- }
52
- });
53
- const changes = await response.json();
54
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55
- args[_key] = arguments[_key];
56
- }
57
- return LrepConnector.prototype.loadChanges.apply(lrep, args).then(res => {
58
- res.changes.changes = Object.values(changes);
59
- return res;
60
- });
61
- }
62
-
63
- /**
64
- * Configures and enables the FakeLrepConnector based on the SAP UI5 version.
65
- * If the minor version of the SAP UI5 is less than 72, this function extends
66
- * the FakeLrepConnector's prototype with specific methods and enables the fake connector.
67
- *
68
- * Assumes the existence of a global 'sap' object with a 'ui.version' property,
69
- * and global jQuery object with 'extend' method.
70
- *
71
- * @returns {void}
72
- */
73
- var __exports = function () {
74
- jQuery.extend(FakeLrepConnector.prototype, {
75
- create,
76
- loadChanges,
77
- loadSettings: () => Promise.resolve()
78
- });
79
- FakeLrepConnector.enableFakeConnector();
80
- };
81
- __exports.create = create;
82
- __exports.loadChanges = loadChanges;
83
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/fl/LrepConnector", "sap/ui/fl/FakeLrepConnector", "../utils/additional-change-info", "./common"], function (LrepConnector, FakeLrepConnector, ___utils_additional_change_info, ___common) {
4
+ "use strict";
5
+
6
+ const getAdditionalChangeInfo = ___utils_additional_change_info["getAdditionalChangeInfo"];
7
+ const CHANGES_API_PATH = ___common["CHANGES_API_PATH"];
8
+ const getFlexSettings = ___common["getFlexSettings"];
9
+ /**
10
+ * Processes an array of FlexChange objects.
11
+ * It updates each change object with settings and sends them to a API endpoint.
12
+ *
13
+ * @param {FlexChange | FlexChange[]} changes - Array of FlexChange objects to be processed.
14
+ * @returns {Promise<void>} A promise that resolves when all changes are processed.
15
+ */
16
+ async function create(changes) {
17
+ const settings = getFlexSettings();
18
+ await Promise.all((Array.isArray(changes) ? changes : [changes]).map(change => {
19
+ if (settings) {
20
+ change.support ??= {};
21
+ change.support.generator = settings.generator;
22
+ }
23
+ const additionalChangeInfo = getAdditionalChangeInfo(change);
24
+ if (typeof FakeLrepConnector.fileChangeRequestNotifier === 'function' && change.fileName) {
25
+ try {
26
+ FakeLrepConnector.fileChangeRequestNotifier(change.fileName, 'create', change, additionalChangeInfo);
27
+ } catch (e) {
28
+ // exceptions in the listener call are ignored
29
+ }
30
+ }
31
+ const body = {
32
+ change,
33
+ additionalChangeInfo
34
+ };
35
+ return fetch(CHANGES_API_PATH, {
36
+ method: 'POST',
37
+ body: JSON.stringify(body, null, 2),
38
+ headers: {
39
+ 'content-type': 'application/json'
40
+ }
41
+ });
42
+ }));
43
+ }
44
+
45
+ /**
46
+ * Loads changes from a given path and processes them using an LrepConnector instance.
47
+ * The changes are then formatted and returned in a specified structure.
48
+ *
49
+ * @returns {Promise<LoadChangesResult>} A promise that resolves to an object of type LoadChangesResult.
50
+ */
51
+ async function loadChanges() {
52
+ const lrep = new LrepConnector();
53
+ const response = await fetch(CHANGES_API_PATH, {
54
+ method: 'GET',
55
+ headers: {
56
+ 'content-type': 'application/json'
57
+ }
58
+ });
59
+ const changes = await response.json();
60
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
61
+ args[_key] = arguments[_key];
62
+ }
63
+ return LrepConnector.prototype.loadChanges.apply(lrep, args).then(res => {
64
+ res.changes.changes = Object.values(changes);
65
+ return res;
66
+ });
67
+ }
68
+
69
+ /**
70
+ * Configures and enables the FakeLrepConnector based on the SAP UI5 version.
71
+ * If the minor version of the SAP UI5 is less than 72, this function extends
72
+ * the FakeLrepConnector's prototype with specific methods and enables the fake connector.
73
+ *
74
+ * Assumes the existence of a global 'sap' object with a 'ui.version' property,
75
+ * and global jQuery object with 'extend' method.
76
+ *
77
+ * @returns {void}
78
+ */
79
+ var __exports = function () {
80
+ jQuery.extend(FakeLrepConnector.prototype, {
81
+ create,
82
+ loadChanges,
83
+ loadSettings: () => Promise.resolve()
84
+ });
85
+ FakeLrepConnector.enableFakeConnector();
86
+ };
87
+ __exports.create = create;
88
+ __exports.loadChanges = loadChanges;
89
+ return __exports;
84
90
  });
85
91
  //# sourceMappingURL=enableFakeConnector.js.map
@@ -1,5 +1,6 @@
1
1
  import LrepConnector from 'sap/ui/fl/LrepConnector';
2
2
  import FakeLrepConnector from 'sap/ui/fl/FakeLrepConnector';
3
+ import { getAdditionalChangeInfo } from '../utils/additional-change-info';
3
4
 
4
5
  import { CHANGES_API_PATH, FlexChange, getFlexSettings } from './common';
5
6
 
@@ -37,17 +38,25 @@ export async function create(changes: FlexChange | FlexChange[]): Promise<void>
37
38
  change.support.generator = settings.generator;
38
39
  }
39
40
 
41
+ const additionalChangeInfo = getAdditionalChangeInfo(change);
42
+
40
43
  if (typeof FakeLrepConnector.fileChangeRequestNotifier === 'function' && change.fileName) {
41
44
  try {
42
- FakeLrepConnector.fileChangeRequestNotifier(change.fileName, 'create', change);
45
+ FakeLrepConnector.fileChangeRequestNotifier(change.fileName, 'create', change, additionalChangeInfo);
43
46
  } catch (e) {
44
47
  // exceptions in the listener call are ignored
45
48
  }
46
49
  }
47
50
 
51
+ const body = {
52
+ change,
53
+ additionalChangeInfo
54
+ };
55
+
56
+
48
57
  return fetch(CHANGES_API_PATH, {
49
58
  method: 'POST',
50
- body: JSON.stringify(change, null, 2),
59
+ body: JSON.stringify(body, null, 2),
51
60
  headers: {
52
61
  'content-type': 'application/json'
53
62
  }
@@ -1,16 +1,16 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/core/UIComponent"], function (BaseComponent) {
4
- "use strict";
5
-
6
- /**
7
- * @namespace open.ux.preview.client.flp.homepage
8
- */
9
- const Component = BaseComponent.extend("open.ux.preview.client.flp.homepage.Component", {
10
- metadata: {
11
- manifest: 'json'
12
- }
13
- });
14
- return Component;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/core/UIComponent"], function (BaseComponent) {
4
+ "use strict";
5
+
6
+ /**
7
+ * @namespace open.ux.preview.client.flp.homepage
8
+ */
9
+ const Component = BaseComponent.extend("open.ux.preview.client.flp.homepage.Component", {
10
+ metadata: {
11
+ manifest: 'json'
12
+ }
13
+ });
14
+ return Component;
15
15
  });
16
16
  //# sourceMappingURL=Component.js.map
@@ -1,119 +1,119 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- /**
7
- * Initializes the CDM (Common Data Model) configuration for the SAP Fiori Launchpad.
8
- *
9
- * @param {sap.ushell.Container} container - The SAP Fiori Launchpad container.
10
- * @returns {Promise<void>} A promise that resolves when the initialization is complete.
11
- */
12
- async function initCdm(container) {
13
- window['sap-ushell-config'] = {
14
- defaultRenderer: 'fiori2',
15
- renderers: {
16
- fiori2: {
17
- componentData: {
18
- config: {
19
- enableSearch: false,
20
- enableRecentActivity: true,
21
- rootIntent: 'Shell-home'
22
- }
23
- }
24
- }
25
- },
26
- ushell: {
27
- customPreload: {
28
- enabled: false
29
- },
30
- spaces: {
31
- enabled: true,
32
- myHome: {
33
- enabled: true
34
- }
35
- },
36
- homeApp: {
37
- component: {
38
- name: 'open.ux.preview.client.flp.homepage',
39
- url: '/preview/client/flp/homepage'
40
- }
41
- }
42
- },
43
- services: {
44
- Container: {
45
- adapter: {
46
- config: {
47
- userProfile: {
48
- metadata: {
49
- editablePropterties: ['accessibility', 'contentDensity', 'theme']
50
- },
51
- defaults: {
52
- email: 'john.doe@sap.com',
53
- firstName: 'John',
54
- lastName: 'Doe',
55
- fullName: 'John Doe',
56
- id: 'DOEJ'
57
- }
58
- }
59
- }
60
- }
61
- },
62
- CommonDataModel: {
63
- adapter: {
64
- config: {
65
- ignoreSiteDataPersonalization: true,
66
- siteDataUrl: '/cdm.json'
67
- }
68
- }
69
- },
70
- Personalization: {
71
- adapter: {
72
- module: 'sap.ushell.adapters.local.PersonalizationAdapter',
73
- config: {
74
- storageType: 'MEMORY'
75
- }
76
- }
77
- },
78
- PersonalizationV2: {
79
- adapter: {
80
- module: 'sap.ushell.adapters.local.PersonalizationAdapter',
81
- config: {
82
- storageType: 'MEMORY'
83
- }
84
- }
85
- },
86
- AppState: {
87
- adapter: {
88
- module: 'sap.ushell.adapters.local.AppStateAdapter'
89
- },
90
- config: {
91
- transient: true
92
- }
93
- },
94
- NavTargetResolutionInternal: {
95
- config: {
96
- allowTestUrlComponentConfig: false,
97
- enableClientSideTargetResolution: true
98
- },
99
- adapter: {
100
- module: 'sap.ushell.adapters.local.NavTargetResolutionInternalAdapter'
101
- }
102
- },
103
- UserInfo: {
104
- adapter: {
105
- module: 'sap.ushell.adapters.local.UserInfoAdapter'
106
- }
107
- },
108
- FlpLaunchPage: {
109
- adapter: {
110
- module: 'sap.ushell.adapters.cdm.v3.FlpLaunchPageAdapter'
111
- }
112
- }
113
- }
114
- };
115
- await container.init('cdm');
116
- }
117
- return initCdm;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Initializes the CDM (Common Data Model) configuration for the SAP Fiori Launchpad.
8
+ *
9
+ * @param {sap.ushell.Container} container - The SAP Fiori Launchpad container.
10
+ * @returns {Promise<void>} A promise that resolves when the initialization is complete.
11
+ */
12
+ async function initCdm(container) {
13
+ window['sap-ushell-config'] = {
14
+ defaultRenderer: 'fiori2',
15
+ renderers: {
16
+ fiori2: {
17
+ componentData: {
18
+ config: {
19
+ enableSearch: false,
20
+ enableRecentActivity: true,
21
+ rootIntent: 'Shell-home'
22
+ }
23
+ }
24
+ }
25
+ },
26
+ ushell: {
27
+ customPreload: {
28
+ enabled: false
29
+ },
30
+ spaces: {
31
+ enabled: true,
32
+ myHome: {
33
+ enabled: true
34
+ }
35
+ },
36
+ homeApp: {
37
+ component: {
38
+ name: 'open.ux.preview.client.flp.homepage',
39
+ url: '/preview/client/flp/homepage'
40
+ }
41
+ }
42
+ },
43
+ services: {
44
+ Container: {
45
+ adapter: {
46
+ config: {
47
+ userProfile: {
48
+ metadata: {
49
+ editablePropterties: ['accessibility', 'contentDensity', 'theme']
50
+ },
51
+ defaults: {
52
+ email: 'john.doe@sap.com',
53
+ firstName: 'John',
54
+ lastName: 'Doe',
55
+ fullName: 'John Doe',
56
+ id: 'DOEJ'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ CommonDataModel: {
63
+ adapter: {
64
+ config: {
65
+ ignoreSiteDataPersonalization: true,
66
+ siteDataUrl: '/cdm.json'
67
+ }
68
+ }
69
+ },
70
+ Personalization: {
71
+ adapter: {
72
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
73
+ config: {
74
+ storageType: 'MEMORY'
75
+ }
76
+ }
77
+ },
78
+ PersonalizationV2: {
79
+ adapter: {
80
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
81
+ config: {
82
+ storageType: 'MEMORY'
83
+ }
84
+ }
85
+ },
86
+ AppState: {
87
+ adapter: {
88
+ module: 'sap.ushell.adapters.local.AppStateAdapter'
89
+ },
90
+ config: {
91
+ transient: true
92
+ }
93
+ },
94
+ NavTargetResolutionInternal: {
95
+ config: {
96
+ allowTestUrlComponentConfig: false,
97
+ enableClientSideTargetResolution: true
98
+ },
99
+ adapter: {
100
+ module: 'sap.ushell.adapters.local.NavTargetResolutionInternalAdapter'
101
+ }
102
+ },
103
+ UserInfo: {
104
+ adapter: {
105
+ module: 'sap.ushell.adapters.local.UserInfoAdapter'
106
+ }
107
+ },
108
+ FlpLaunchPage: {
109
+ adapter: {
110
+ module: 'sap.ushell.adapters.cdm.v3.FlpLaunchPageAdapter'
111
+ }
112
+ }
113
+ }
114
+ };
115
+ await container.init('cdm');
116
+ }
117
+ return initCdm;
118
118
  });
119
119
  //# sourceMappingURL=initCdm.js.map
@@ -1,30 +1,30 @@
1
- "use strict";
2
-
3
- sap.ui.define(["../utils/version"], function (___utils_version) {
4
- "use strict";
5
-
6
- const getUi5Version = ___utils_version["getUi5Version"];
7
- const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
8
- /**
9
- * Initializes UI5 connectors based on the current UI5 version.
10
- *
11
- * For UI5 versions below 1.72, this function dynamically requires and executes a FakeLrepConnector.
12
- * For UI5 versions 1.72 and above, it defines a local connector that reuses the WorkspaceConnector.
13
- * This setup allows for flexibility in using different connectors based on the UI5 version.
14
- *
15
- * @example
16
- * intiConnectors(); // Simply call the function without any arguments.
17
- */
18
- async function initConnectors() {
19
- if (isLowerThanMinimalUi5Version(await getUi5Version(), {
20
- major: 1,
21
- minor: 72
22
- })) {
23
- sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector) {
24
- enableFakeConnector();
25
- });
26
- }
27
- }
28
- return initConnectors;
1
+ "use strict";
2
+
3
+ sap.ui.define(["../utils/version"], function (___utils_version) {
4
+ "use strict";
5
+
6
+ const getUi5Version = ___utils_version["getUi5Version"];
7
+ const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
8
+ /**
9
+ * Initializes UI5 connectors based on the current UI5 version.
10
+ *
11
+ * For UI5 versions below 1.72, this function dynamically requires and executes a FakeLrepConnector.
12
+ * For UI5 versions 1.72 and above, it defines a local connector that reuses the WorkspaceConnector.
13
+ * This setup allows for flexibility in using different connectors based on the UI5 version.
14
+ *
15
+ * @example
16
+ * intiConnectors(); // Simply call the function without any arguments.
17
+ */
18
+ async function initConnectors() {
19
+ if (isLowerThanMinimalUi5Version(await getUi5Version(), {
20
+ major: 1,
21
+ minor: 72
22
+ })) {
23
+ sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector) {
24
+ enableFakeConnector();
25
+ });
26
+ }
27
+ }
28
+ return initConnectors;
29
29
  });
30
30
  //# sourceMappingURL=initConnectors.js.map