@sap-ux/preview-middleware 0.12.11 → 0.12.12

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 (38) hide show
  1. package/README.md +22 -0
  2. package/dist/base/flp.d.ts +10 -1
  3. package/dist/base/flp.js +67 -4
  4. package/dist/base/test.d.ts +24 -0
  5. package/dist/base/test.js +59 -0
  6. package/dist/client/adp/api-handler.js +141 -141
  7. package/dist/client/adp/command-executor.js +54 -54
  8. package/dist/client/adp/control-utils.js +44 -44
  9. package/dist/client/adp/controllers/AddFragment.controller.js +206 -206
  10. package/dist/client/adp/controllers/BaseDialog.controller.js +57 -57
  11. package/dist/client/adp/controllers/ControllerExtension.controller.js +174 -174
  12. package/dist/client/adp/controllers/ExtensionPoint.controller.js +100 -100
  13. package/dist/client/adp/init-dialogs.js +74 -74
  14. package/dist/client/adp/ui5-version-utils.js +63 -63
  15. package/dist/client/adp/utils.js +33 -33
  16. package/dist/client/cpe/changes/flex-change.js +51 -51
  17. package/dist/client/cpe/changes/index.js +10 -10
  18. package/dist/client/cpe/changes/validator.js +35 -35
  19. package/dist/client/cpe/documentation.js +164 -164
  20. package/dist/client/cpe/logger.js +30 -30
  21. package/dist/client/cpe/outline/nodes.js +84 -84
  22. package/dist/client/cpe/outline/utils.js +37 -37
  23. package/dist/client/cpe/types.js +4 -4
  24. package/dist/client/cpe/ui5-utils.js +49 -49
  25. package/dist/client/cpe/utils.js +48 -48
  26. package/dist/client/flp/WorkspaceConnector.js +69 -69
  27. package/dist/client/flp/common.js +28 -28
  28. package/dist/client/flp/enableFakeConnector.js +77 -77
  29. package/dist/client/flp/init.js +220 -212
  30. package/dist/client/flp/init.ts +17 -2
  31. package/dist/client/flp/initConnectors.js +33 -33
  32. package/dist/client/flp/initRta.js +178 -178
  33. package/dist/index.d.ts +1 -1
  34. package/dist/types/index.d.ts +23 -0
  35. package/package.json +3 -3
  36. package/templates/flp/sandbox.html +5 -4
  37. package/templates/test/qunit.html +25 -0
  38. package/templates/test/qunit.js +6 -0
@@ -1,214 +1,222 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/base/Log", "sap/ui/core/IconPool", "sap/base/i18n/ResourceBundle", "sap/base/util/UriParameters"], function (Log, IconPool, ResourceBundle, UriParameters) {
4
- "use strict";
5
-
6
- /**
7
- * SAPUI5 delivered namespaces from https://ui5.sap.com/#/api/sap
8
- */
9
- const UI5_LIBS = ['sap.apf', 'sap.base', 'sap.chart', 'sap.collaboration', 'sap.f', 'sap.fe', 'sap.fileviewer', 'sap.gantt', 'sap.landvisz', 'sap.m', 'sap.ndc', 'sap.ovp', 'sap.rules', 'sap.suite', 'sap.tnt', 'sap.ui', 'sap.uiext', 'sap.ushell', 'sap.uxap', 'sap.viz', 'sap.webanalytics', 'sap.zen'];
10
-
11
- /**
12
- * Check whether a specific dependency is a custom library, and if yes, add it to the map.
13
- *
14
- * @param dependency dependency from the manifest
15
- * @param customLibs map containing the required custom libraries
16
- */
17
- function addKeys(dependency, customLibs) {
18
- Object.keys(dependency).forEach(function (key) {
19
- // ignore libs or Components that start with SAPUI5 delivered namespaces
20
- if (!UI5_LIBS.some(function (substring) {
21
- return key === substring || key.startsWith(substring + '.');
22
- })) {
23
- customLibs[key] = true;
24
- }
25
- });
26
- }
27
-
28
- /**
29
- * Fetch the manifest for all the given application urls and generate a string containing all required custom library ids.
30
- *
31
- * @param appUrls urls pointing to included applications
32
- * @returns Promise of a comma separated list of all required libraries.
33
- */
34
- function getManifestLibs(appUrls) {
35
- const result = {};
36
- const promises = [];
37
- for (const url of appUrls) {
38
- promises.push(fetch(`${url}/manifest.json`).then(async resp => {
39
- const manifest = await resp.json();
40
- if (manifest) {
41
- if (manifest['sap.ui5'] && manifest['sap.ui5'].dependencies) {
42
- if (manifest['sap.ui5'].dependencies.libs) {
43
- addKeys(manifest['sap.ui5'].dependencies.libs, result);
44
- }
45
- if (manifest['sap.ui5'].dependencies.components) {
46
- addKeys(manifest['sap.ui5'].dependencies.components, result);
47
- }
48
- }
49
- if (manifest['sap.ui5'] && manifest['sap.ui5'].componentUsages) {
50
- addKeys(manifest['sap.ui5'].componentUsages, result);
51
- }
52
- }
53
- }));
54
- }
55
- return Promise.all(promises).then(() => Object.keys(result).join(','));
56
- }
57
-
58
- /**
59
- * Register the custom libraries and their url with the UI5 loader.
60
- *
61
- * @param dataFromAppIndex data returned from the app index service
62
- */
63
- function registerModules(dataFromAppIndex) {
64
- Object.keys(dataFromAppIndex).forEach(function (moduleDefinitionKey) {
65
- const moduleDefinition = dataFromAppIndex[moduleDefinitionKey];
66
- if (moduleDefinition && moduleDefinition.dependencies) {
67
- moduleDefinition.dependencies.forEach(function (dependency) {
68
- if (dependency.url && dependency.url.length > 0 && dependency.type === 'UI5LIB') {
69
- Log.info('Registering Library ' + dependency.componentId + ' from server ' + dependency.url);
70
- const compId = dependency.componentId.replace(/\./g, '/');
71
- const config = {
72
- paths: {}
73
- };
74
- config.paths[compId] = dependency.url;
75
- sap.ui.loader.config(config);
76
- }
77
- });
78
- }
79
- });
80
- }
81
-
82
- /**
83
- * Fetch the manifest from the given application urls, then parse them for custom libs, and finally request their urls.
84
- *
85
- * @param appUrls application urls
86
- * @returns returns a promise when the registration is completed.
87
- */
88
- async function registerComponentDependencyPaths(appUrls) {
89
- const libs = await getManifestLibs(appUrls);
90
- if (libs && libs.length > 0) {
91
- let url = '/sap/bc/ui2/app_index/ui5_app_info?id=' + libs;
92
- const sapClient = UriParameters.fromQuery(window.location.search).get('sap-client');
93
- if (sapClient && sapClient.length === 3) {
94
- url = url + '&sap-client=' + sapClient;
95
- }
96
- const response = await fetch(url);
97
- try {
98
- registerModules(await response.json());
99
- } catch (error) {
100
- Log.error(`Registering of reuse libs failed. Error:${error}`);
101
- }
102
- }
103
- }
104
-
105
- /**
106
- * Register SAP fonts that are also registered in a productive Fiori launchpad.
107
- */
108
- function registerSAPFonts() {
109
- //Fiori Theme font family and URI
110
- const fioriTheme = {
111
- fontFamily: 'SAP-icons-TNT',
112
- fontURI: sap.ui.require.toUrl('sap/tnt/themes/base/fonts/')
113
- };
114
- //Registering to the icon pool
115
- IconPool.registerFont(fioriTheme);
116
- //SAP Business Suite Theme font family and URI
117
- const suiteTheme = {
118
- fontFamily: 'BusinessSuiteInAppSymbols',
119
- fontURI: sap.ui.require.toUrl('sap/ushell/themes/base/fonts/')
120
- };
121
- //Registering to the icon pool
122
- IconPool.registerFont(suiteTheme);
123
- }
124
-
125
- /**
126
- * Read the application title from the resource bundle and set it as document title.
127
- *
128
- * @param i18nKey optional parameter to define the i18n key to be used for the title.
129
- */
130
- function setI18nTitle() {
131
- let i18nKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'appTitle';
132
- const locale = sap.ui.getCore().getConfiguration().getLanguage();
133
- const resourceBundle = ResourceBundle.create({
134
- url: 'i18n/i18n.properties',
135
- locale
136
- });
137
- if (resourceBundle.hasText(i18nKey)) {
138
- document.title = resourceBundle.getText(i18nKey) ?? document.title;
139
- }
140
- }
141
-
142
- /**
143
- * Apply additional configuration and initialize sandbox.
144
- *
145
- * @param params init parameters read from the script tag
146
- * @param params.appUrls JSON containing a string array of application urls
147
- * @param params.flex JSON containing the flex configuration
148
- * @returns promise
149
- */
150
- async function init(_ref) {
151
- let {
152
- appUrls,
153
- flex
154
- } = _ref;
155
- // Register RTA if configured
156
- if (flex) {
157
- sap.ushell.Container.attachRendererCreatedEvent(async function () {
158
- const lifecycleService = await sap.ushell.Container.getServiceAsync('AppLifeCycle');
159
- lifecycleService.attachAppLoaded(event => {
160
- const version = sap.ui.version;
161
- const minor = parseInt(version.split('.')[1], 10);
162
- const view = event.getParameter('componentInstance');
163
- const flexSettings = JSON.parse(flex);
164
- const pluginScript = flexSettings.pluginScript ?? '';
165
- let libs = [];
166
- if (minor > 71) {
167
- libs.push('sap/ui/rta/api/startAdaptation');
168
- } else {
169
- libs.push('open/ux/preview/client/flp/initRta');
170
- }
171
- if (flexSettings.pluginScript) {
172
- libs.push(pluginScript);
173
- delete flexSettings.pluginScript;
174
- }
175
- const options = {
176
- rootControl: view,
177
- validateAppVersion: false,
178
- flexSettings
179
- };
180
- sap.ui.require(libs, async function (startAdaptation, pluginScript) {
181
- await startAdaptation(options, pluginScript);
182
- });
183
- });
184
- });
185
- }
186
-
187
- // Load custom library paths if configured
188
- if (appUrls) {
189
- await registerComponentDependencyPaths(JSON.parse(appUrls));
190
- }
191
-
192
- // init
193
- setI18nTitle();
194
- registerSAPFonts();
195
- const renderer = await sap.ushell.Container.createRenderer(undefined, true);
196
- renderer.placeAt('content');
197
- }
198
- const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
199
- if (bootstrapConfig) {
200
- init({
201
- appUrls: bootstrapConfig.getAttribute('data-open-ux-preview-libs-manifests'),
202
- flex: bootstrapConfig.getAttribute('data-open-ux-preview-flex-settings')
203
- }).catch(() => Log.error('Sandbox initialization failed.'));
204
- }
205
- var __exports = {
206
- __esModule: true
207
- };
208
- __exports.registerComponentDependencyPaths = registerComponentDependencyPaths;
209
- __exports.registerSAPFonts = registerSAPFonts;
210
- __exports.setI18nTitle = setI18nTitle;
211
- __exports.init = init;
212
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/base/Log", "sap/ui/core/IconPool", "sap/base/i18n/ResourceBundle", "sap/base/util/UriParameters"], function (Log, IconPool, ResourceBundle, UriParameters) {
4
+ "use strict";
5
+
6
+ /**
7
+ * SAPUI5 delivered namespaces from https://ui5.sap.com/#/api/sap
8
+ */
9
+ const UI5_LIBS = ['sap.apf', 'sap.base', 'sap.chart', 'sap.collaboration', 'sap.f', 'sap.fe', 'sap.fileviewer', 'sap.gantt', 'sap.landvisz', 'sap.m', 'sap.ndc', 'sap.ovp', 'sap.rules', 'sap.suite', 'sap.tnt', 'sap.ui', 'sap.uiext', 'sap.ushell', 'sap.uxap', 'sap.viz', 'sap.webanalytics', 'sap.zen'];
10
+
11
+ /**
12
+ * Check whether a specific dependency is a custom library, and if yes, add it to the map.
13
+ *
14
+ * @param dependency dependency from the manifest
15
+ * @param customLibs map containing the required custom libraries
16
+ */
17
+ function addKeys(dependency, customLibs) {
18
+ Object.keys(dependency).forEach(function (key) {
19
+ // ignore libs or Components that start with SAPUI5 delivered namespaces
20
+ if (!UI5_LIBS.some(function (substring) {
21
+ return key === substring || key.startsWith(substring + '.');
22
+ })) {
23
+ customLibs[key] = true;
24
+ }
25
+ });
26
+ }
27
+
28
+ /**
29
+ * Fetch the manifest for all the given application urls and generate a string containing all required custom library ids.
30
+ *
31
+ * @param appUrls urls pointing to included applications
32
+ * @returns Promise of a comma separated list of all required libraries.
33
+ */
34
+ function getManifestLibs(appUrls) {
35
+ const result = {};
36
+ const promises = [];
37
+ for (const url of appUrls) {
38
+ promises.push(fetch(`${url}/manifest.json`).then(async resp => {
39
+ const manifest = await resp.json();
40
+ if (manifest) {
41
+ if (manifest['sap.ui5'] && manifest['sap.ui5'].dependencies) {
42
+ if (manifest['sap.ui5'].dependencies.libs) {
43
+ addKeys(manifest['sap.ui5'].dependencies.libs, result);
44
+ }
45
+ if (manifest['sap.ui5'].dependencies.components) {
46
+ addKeys(manifest['sap.ui5'].dependencies.components, result);
47
+ }
48
+ }
49
+ if (manifest['sap.ui5'] && manifest['sap.ui5'].componentUsages) {
50
+ addKeys(manifest['sap.ui5'].componentUsages, result);
51
+ }
52
+ }
53
+ }));
54
+ }
55
+ return Promise.all(promises).then(() => Object.keys(result).join(','));
56
+ }
57
+
58
+ /**
59
+ * Register the custom libraries and their url with the UI5 loader.
60
+ *
61
+ * @param dataFromAppIndex data returned from the app index service
62
+ */
63
+ function registerModules(dataFromAppIndex) {
64
+ Object.keys(dataFromAppIndex).forEach(function (moduleDefinitionKey) {
65
+ const moduleDefinition = dataFromAppIndex[moduleDefinitionKey];
66
+ if (moduleDefinition && moduleDefinition.dependencies) {
67
+ moduleDefinition.dependencies.forEach(function (dependency) {
68
+ if (dependency.url && dependency.url.length > 0 && dependency.type === 'UI5LIB') {
69
+ Log.info('Registering Library ' + dependency.componentId + ' from server ' + dependency.url);
70
+ const compId = dependency.componentId.replace(/\./g, '/');
71
+ const config = {
72
+ paths: {}
73
+ };
74
+ config.paths[compId] = dependency.url;
75
+ sap.ui.loader.config(config);
76
+ }
77
+ });
78
+ }
79
+ });
80
+ }
81
+
82
+ /**
83
+ * Fetch the manifest from the given application urls, then parse them for custom libs, and finally request their urls.
84
+ *
85
+ * @param appUrls application urls
86
+ * @returns returns a promise when the registration is completed.
87
+ */
88
+ async function registerComponentDependencyPaths(appUrls) {
89
+ const libs = await getManifestLibs(appUrls);
90
+ if (libs && libs.length > 0) {
91
+ let url = '/sap/bc/ui2/app_index/ui5_app_info?id=' + libs;
92
+ const sapClient = UriParameters.fromQuery(window.location.search).get('sap-client');
93
+ if (sapClient && sapClient.length === 3) {
94
+ url = url + '&sap-client=' + sapClient;
95
+ }
96
+ const response = await fetch(url);
97
+ try {
98
+ registerModules(await response.json());
99
+ } catch (error) {
100
+ Log.error(`Registering of reuse libs failed. Error:${error}`);
101
+ }
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Register SAP fonts that are also registered in a productive Fiori launchpad.
107
+ */
108
+ function registerSAPFonts() {
109
+ //Fiori Theme font family and URI
110
+ const fioriTheme = {
111
+ fontFamily: 'SAP-icons-TNT',
112
+ fontURI: sap.ui.require.toUrl('sap/tnt/themes/base/fonts/')
113
+ };
114
+ //Registering to the icon pool
115
+ IconPool.registerFont(fioriTheme);
116
+ //SAP Business Suite Theme font family and URI
117
+ const suiteTheme = {
118
+ fontFamily: 'BusinessSuiteInAppSymbols',
119
+ fontURI: sap.ui.require.toUrl('sap/ushell/themes/base/fonts/')
120
+ };
121
+ //Registering to the icon pool
122
+ IconPool.registerFont(suiteTheme);
123
+ }
124
+
125
+ /**
126
+ * Read the application title from the resource bundle and set it as document title.
127
+ *
128
+ * @param i18nKey optional parameter to define the i18n key to be used for the title.
129
+ */
130
+ function setI18nTitle() {
131
+ let i18nKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'appTitle';
132
+ const locale = sap.ui.getCore().getConfiguration().getLanguage();
133
+ const resourceBundle = ResourceBundle.create({
134
+ url: 'i18n/i18n.properties',
135
+ locale
136
+ });
137
+ if (resourceBundle.hasText(i18nKey)) {
138
+ document.title = resourceBundle.getText(i18nKey) ?? document.title;
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Apply additional configuration and initialize sandbox.
144
+ *
145
+ * @param params init parameters read from the script tag
146
+ * @param params.appUrls JSON containing a string array of application urls
147
+ * @param params.flex JSON containing the flex configuration
148
+ * @param params.customInit path to the custom init module to be called
149
+ * @returns promise
150
+ */
151
+ async function init(_ref) {
152
+ let {
153
+ appUrls,
154
+ flex,
155
+ customInit
156
+ } = _ref;
157
+ // Register RTA if configured
158
+ if (flex) {
159
+ sap.ushell.Container.attachRendererCreatedEvent(async function () {
160
+ const lifecycleService = await sap.ushell.Container.getServiceAsync('AppLifeCycle');
161
+ lifecycleService.attachAppLoaded(event => {
162
+ const version = sap.ui.version;
163
+ const minor = parseInt(version.split('.')[1], 10);
164
+ const view = event.getParameter('componentInstance');
165
+ const flexSettings = JSON.parse(flex);
166
+ const pluginScript = flexSettings.pluginScript ?? '';
167
+ let libs = [];
168
+ if (minor > 71) {
169
+ libs.push('sap/ui/rta/api/startAdaptation');
170
+ } else {
171
+ libs.push('open/ux/preview/client/flp/initRta');
172
+ }
173
+ if (flexSettings.pluginScript) {
174
+ libs.push(pluginScript);
175
+ delete flexSettings.pluginScript;
176
+ }
177
+ const options = {
178
+ rootControl: view,
179
+ validateAppVersion: false,
180
+ flexSettings
181
+ };
182
+ sap.ui.require(libs, async function (startAdaptation, pluginScript) {
183
+ await startAdaptation(options, pluginScript);
184
+ });
185
+ });
186
+ });
187
+ }
188
+
189
+ // Load custom library paths if configured
190
+ if (appUrls) {
191
+ await registerComponentDependencyPaths(JSON.parse(appUrls));
192
+ }
193
+
194
+ // Load custom initialization module
195
+ if (customInit) {
196
+ sap.ui.require([customInit]);
197
+ }
198
+
199
+ // init
200
+ setI18nTitle();
201
+ registerSAPFonts();
202
+ const renderer = await sap.ushell.Container.createRenderer(undefined, true);
203
+ renderer.placeAt('content');
204
+ }
205
+ const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
206
+ if (bootstrapConfig) {
207
+ init({
208
+ appUrls: bootstrapConfig.getAttribute('data-open-ux-preview-libs-manifests'),
209
+ flex: bootstrapConfig.getAttribute('data-open-ux-preview-flex-settings'),
210
+ customInit: bootstrapConfig.getAttribute('data-open-ux-preview-customInit')
211
+ }).catch(() => Log.error('Sandbox initialization failed.'));
212
+ }
213
+ var __exports = {
214
+ __esModule: true
215
+ };
216
+ __exports.registerComponentDependencyPaths = registerComponentDependencyPaths;
217
+ __exports.registerSAPFonts = registerSAPFonts;
218
+ __exports.setI18nTitle = setI18nTitle;
219
+ __exports.init = init;
220
+ return __exports;
213
221
  });
214
222
  //# sourceMappingURL=init.js.map
@@ -185,9 +185,18 @@ export function setI18nTitle(i18nKey = 'appTitle') {
185
185
  * @param params init parameters read from the script tag
186
186
  * @param params.appUrls JSON containing a string array of application urls
187
187
  * @param params.flex JSON containing the flex configuration
188
+ * @param params.customInit path to the custom init module to be called
188
189
  * @returns promise
189
190
  */
190
- export async function init({ appUrls, flex }: { appUrls?: string | null; flex?: string | null }): Promise<void> {
191
+ export async function init({
192
+ appUrls,
193
+ flex,
194
+ customInit
195
+ }: {
196
+ appUrls?: string | null;
197
+ flex?: string | null;
198
+ customInit?: string | null;
199
+ }): Promise<void> {
191
200
  // Register RTA if configured
192
201
  if (flex) {
193
202
  sap.ushell.Container.attachRendererCreatedEvent(async function () {
@@ -232,6 +241,11 @@ export async function init({ appUrls, flex }: { appUrls?: string | null; flex?:
232
241
  await registerComponentDependencyPaths(JSON.parse(appUrls));
233
242
  }
234
243
 
244
+ // Load custom initialization module
245
+ if (customInit) {
246
+ sap.ui.require([customInit]);
247
+ }
248
+
235
249
  // init
236
250
  setI18nTitle();
237
251
  registerSAPFonts();
@@ -243,6 +257,7 @@ const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
243
257
  if (bootstrapConfig) {
244
258
  init({
245
259
  appUrls: bootstrapConfig.getAttribute('data-open-ux-preview-libs-manifests'),
246
- flex: bootstrapConfig.getAttribute('data-open-ux-preview-flex-settings')
260
+ flex: bootstrapConfig.getAttribute('data-open-ux-preview-flex-settings'),
261
+ customInit: bootstrapConfig.getAttribute('data-open-ux-preview-customInit')
247
262
  }).catch(() => Log.error('Sandbox initialization failed.'));
248
263
  }
@@ -1,35 +1,35 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- /**
7
- * Initializes UI5 connectors based on the current UI5 version.
8
- *
9
- * For UI5 versions below 1.72, this function dynamically requires and executes a FakeLrepConnector.
10
- * For UI5 versions 1.72 and above, it defines a local connector that reuses the WorkspaceConnector.
11
- * This setup allows for flexibility in using different connectors based on the UI5 version.
12
- *
13
- * @example
14
- * intiConnectors(); // Simply call the function without any arguments.
15
- * @returns {void}
16
- */
17
- function initConnectors() {
18
- const version = sap.ui.version;
19
- const minor = parseInt(version.split('.')[1], 10);
20
- if (minor < 72) {
21
- sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector) {
22
- enableFakeConnector();
23
- });
24
- } else {
25
- sap.ui.define('custom.connectors.WorkspaceConnector', ['open/ux/preview/client/flp/WorkspaceConnector'], connector => connector, true);
26
- }
27
- }
28
- initConnectors();
29
- var __exports = {
30
- __esModule: true
31
- };
32
- __exports.initConnectors = initConnectors;
33
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Initializes UI5 connectors based on the current UI5 version.
8
+ *
9
+ * For UI5 versions below 1.72, this function dynamically requires and executes a FakeLrepConnector.
10
+ * For UI5 versions 1.72 and above, it defines a local connector that reuses the WorkspaceConnector.
11
+ * This setup allows for flexibility in using different connectors based on the UI5 version.
12
+ *
13
+ * @example
14
+ * intiConnectors(); // Simply call the function without any arguments.
15
+ * @returns {void}
16
+ */
17
+ function initConnectors() {
18
+ const version = sap.ui.version;
19
+ const minor = parseInt(version.split('.')[1], 10);
20
+ if (minor < 72) {
21
+ sap.ui.require(['open/ux/preview/client/flp/enableFakeConnector'], function (enableFakeConnector) {
22
+ enableFakeConnector();
23
+ });
24
+ } else {
25
+ sap.ui.define('custom.connectors.WorkspaceConnector', ['open/ux/preview/client/flp/WorkspaceConnector'], connector => connector, true);
26
+ }
27
+ }
28
+ initConnectors();
29
+ var __exports = {
30
+ __esModule: true
31
+ };
32
+ __exports.initConnectors = initConnectors;
33
+ return __exports;
34
34
  });
35
35
  //# sourceMappingURL=initConnectors.js.map