@sap-ux/preview-middleware 0.23.72 → 0.23.74

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 (92) hide show
  1. package/dist/base/flp.js +1 -1
  2. package/dist/client/adp/controllers/AddSubpage.controller.ts +1 -1
  3. package/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +2 -2
  4. package/dist/client/adp/controllers/BaseDialog.controller.js +5 -6
  5. package/dist/client/adp/controllers/BaseDialog.controller.ts +6 -5
  6. package/dist/client/adp/controllers/ControllerExtension.controller.js +1 -2
  7. package/dist/client/adp/dialog-factory.js +2 -4
  8. package/dist/client/adp/dialog-factory.ts +5 -4
  9. package/dist/client/adp/extension-point.js +2 -2
  10. package/dist/client/adp/extension-point.ts +6 -4
  11. package/dist/client/adp/init-dialogs.js +0 -2
  12. package/dist/client/adp/init-dialogs.ts +1 -3
  13. package/dist/client/adp/quick-actions/common/add-controller-to-page.ts +1 -1
  14. package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +2 -2
  15. package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +1 -1
  16. package/dist/client/adp/quick-actions/common/create-page-action.ts +7 -3
  17. package/dist/client/adp/quick-actions/common/op-add-custom-section.ts +6 -3
  18. package/dist/client/adp/quick-actions/common/op-add-header-field.ts +8 -5
  19. package/dist/client/adp/quick-actions/common/utils.ts +1 -1
  20. package/dist/client/adp/quick-actions/enablement-validator.ts +1 -0
  21. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +6 -3
  22. package/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +3 -3
  23. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +6 -6
  24. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +6 -3
  25. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +5 -2
  26. package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +5 -2
  27. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +5 -2
  28. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +6 -3
  29. package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +7 -4
  30. package/dist/client/adp/quick-actions/fe-v2/registry.js +2 -2
  31. package/dist/client/adp/quick-actions/fe-v2/registry.ts +1 -1
  32. package/dist/client/adp/quick-actions/fe-v2/utils.ts +4 -4
  33. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +6 -3
  34. package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +5 -2
  35. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +6 -3
  36. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +6 -3
  37. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +6 -3
  38. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +6 -3
  39. package/dist/client/adp/quick-actions/fe-v4/registry.js +2 -2
  40. package/dist/client/adp/quick-actions/fe-v4/utils.ts +2 -2
  41. package/dist/client/adp/quick-actions/quick-action-base.js +2 -4
  42. package/dist/client/adp/quick-actions/quick-action-base.ts +1 -1
  43. package/dist/client/adp/quick-actions/simple-quick-action-base.js +1 -2
  44. package/dist/client/adp/quick-actions/simple-quick-action-base.ts +5 -4
  45. package/dist/client/adp/quick-actions/table-quick-action-base.js +12 -4
  46. package/dist/client/adp/quick-actions/table-quick-action-base.ts +20 -10
  47. package/dist/client/adp/sync-views-utils.js +1 -2
  48. package/dist/client/cpe/changes/flex-change.ts +3 -1
  49. package/dist/client/cpe/changes/generic-change.js +22 -29
  50. package/dist/client/cpe/changes/service.js +2 -3
  51. package/dist/client/cpe/changes/service.ts +1 -1
  52. package/dist/client/cpe/changes/validator.ts +4 -4
  53. package/dist/client/cpe/communication-service.js +3 -2
  54. package/dist/client/cpe/communication-service.ts +3 -2
  55. package/dist/client/cpe/connector-service.js +1 -3
  56. package/dist/client/cpe/connector-service.ts +3 -2
  57. package/dist/client/cpe/control-data.ts +5 -4
  58. package/dist/client/cpe/feature-service.js +3 -2
  59. package/dist/client/cpe/init.js +1 -2
  60. package/dist/client/cpe/logger.ts +1 -3
  61. package/dist/client/cpe/odata-health/odata-health-checker.js +4 -7
  62. package/dist/client/cpe/outline/editable.js +1 -2
  63. package/dist/client/cpe/outline/editable.ts +1 -1
  64. package/dist/client/cpe/outline/nodes.js +2 -2
  65. package/dist/client/cpe/outline/nodes.ts +4 -4
  66. package/dist/client/cpe/quick-actions/quick-action-definition.ts +1 -1
  67. package/dist/client/cpe/quick-actions/quick-action-service.js +1 -0
  68. package/dist/client/cpe/quick-actions/quick-action-service.ts +20 -12
  69. package/dist/client/cpe/quick-actions/registry.js +1 -1
  70. package/dist/client/cpe/quick-actions/registry.ts +4 -4
  71. package/dist/client/cpe/quick-actions/utils.js +3 -3
  72. package/dist/client/cpe/quick-actions/utils.ts +9 -10
  73. package/dist/client/cpe/rta-service.js +1 -1
  74. package/dist/client/cpe/rta-service.ts +4 -4
  75. package/dist/client/cpe/selection.js +3 -2
  76. package/dist/client/cpe/selection.ts +6 -3
  77. package/dist/client/cpe/types.ts +2 -2
  78. package/dist/client/flp/WorkspaceConnector.js +1 -1
  79. package/dist/client/flp/WorkspaceConnector.ts +3 -2
  80. package/dist/client/flp/common.ts +1 -1
  81. package/dist/client/flp/enableFakeConnector.js +1 -4
  82. package/dist/client/flp/enableFakeConnector.ts +2 -1
  83. package/dist/client/flp/init.js +10 -14
  84. package/dist/client/flp/init.ts +3 -3
  85. package/dist/client/flp/initCdm.ts +2 -6
  86. package/dist/client/flp/initRta.ts +2 -2
  87. package/dist/client/i18n.js +2 -4
  88. package/dist/client/utils/fe-v2.ts +1 -3
  89. package/dist/client/utils/info-center-message.js +6 -7
  90. package/dist/client/utils/version.js +4 -8
  91. package/dist/client/utils/version.ts +1 -2
  92. package/package.json +16 -16
@@ -1,7 +1,10 @@
1
- import FlexCommand from 'sap/ui/rta/command/FlexCommand';
2
- import FilterBar from 'sap/ui/mdc/FilterBar';
1
+ import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
2
+ import type FilterBar from 'sap/ui/mdc/FilterBar';
3
3
 
4
- import { QuickActionContext, SimpleQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
4
+ import type {
5
+ QuickActionContext,
6
+ SimpleQuickActionDefinition
7
+ } from '../../../cpe/quick-actions/quick-action-definition';
5
8
  import { pageHasControlId } from '../../../cpe/quick-actions/utils';
6
9
  import { getControlById } from '../../../utils/core';
7
10
  import { executeToggleAction } from './utils';
@@ -1,13 +1,16 @@
1
- import FlexCommand from 'sap/ui/rta/command/FlexCommand';
1
+ import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
2
2
 
3
- import { NestedQuickActionDefinition, QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
3
+ import type {
4
+ NestedQuickActionDefinition,
5
+ QuickActionContext
6
+ } from '../../../cpe/quick-actions/quick-action-definition';
4
7
  import { createManifestPropertyChange } from '../../../utils/fe-v4';
5
8
  import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
6
9
  import { ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
7
10
  import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
8
11
  import { isA } from '../../../utils/core';
9
12
  import { getTooltipsForTableEmptyRowModeAction } from '../common/utils';
10
- import { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
13
+ import type { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
11
14
  import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
12
15
 
13
16
  export const ENABLE_TABLE_EMPTY_ROW_MODE = 'enable-table-empty-row-mode';
@@ -26,10 +26,10 @@ sap.ui.define(["../../../cpe/quick-actions/registry", "../common/add-controller-
26
26
  * Quick Action provider for SAP Fiori Elements V4 applications.
27
27
  */
28
28
  class FEV4QuickActionRegistry extends QuickActionDefinitionRegistry {
29
- PAGE_NAME_MAP = (() => ({
29
+ PAGE_NAME_MAP = {
30
30
  [LIST_REPORT_TYPE]: 'listReport',
31
31
  [OBJECT_PAGE_TYPE]: 'objectPage'
32
- }))();
32
+ };
33
33
  getDefinitions(context) {
34
34
  const activePages = this.getActivePageContent(context.controlIndex);
35
35
  const definitionGroups = [];
@@ -1,6 +1,6 @@
1
1
  import { getControlById } from '../../../utils/core';
2
- import FlexCommand from 'sap/ui/rta/command/FlexCommand';
3
- import { QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
2
+ import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
3
+ import type { QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
4
4
  import CommandFactory from 'sap/ui/rta/command/CommandFactory';
5
5
  import { getV4AppComponent, getPageName, getReference } from '../../../utils/fe-v4';
6
6
 
@@ -11,8 +11,7 @@ sap.ui.define(["./dialog-enablement-validator"], function (___dialog_enablement_
11
11
  get id() {
12
12
  return `${this.context.key}-${this.type}`;
13
13
  }
14
- getTelemetryIdentifier() {
15
- let update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
14
+ getTelemetryIdentifier(update = false) {
16
15
  if (update === true) {
17
16
  this.telemetryIdentifier = new Date().toISOString();
18
17
  }
@@ -45,8 +44,7 @@ sap.ui.define(["./dialog-enablement-validator"], function (___dialog_enablement_
45
44
  get textKey() {
46
45
  return this.defaultTextKey;
47
46
  }
48
- constructor(type, kind, defaultTextKey, context) {
49
- let enablementValidators = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
47
+ constructor(type, kind, defaultTextKey, context, enablementValidators = []) {
50
48
  this.type = type;
51
49
  this.kind = kind;
52
50
  this.defaultTextKey = defaultTextKey;
@@ -1,4 +1,4 @@
1
- import { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
1
+ import type { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
2
2
 
3
3
  import { EnablementValidator, EnablementValidatorError, EnablementValidatorResult } from './enablement-validator';
4
4
  import { DIALOG_ENABLEMENT_VALIDATOR } from './dialog-enablement-validator';
@@ -13,8 +13,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
13
13
  get isApplicable() {
14
14
  return this.control !== undefined;
15
15
  }
16
- constructor(type, controlTypes, defaultTextKey, context) {
17
- let enablementValidators = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
16
+ constructor(type, controlTypes, defaultTextKey, context, enablementValidators = []) {
18
17
  super(type, SIMPLE_QUICK_ACTION_KIND, defaultTextKey, context, enablementValidators);
19
18
  this.type = type;
20
19
  this.controlTypes = controlTypes;
@@ -1,10 +1,11 @@
1
- import UI5Element from 'sap/ui/core/Element';
1
+ import type UI5Element from 'sap/ui/core/Element';
2
2
 
3
- import { SIMPLE_QUICK_ACTION_KIND, SimpleQuickAction } from '@sap-ux-private/control-property-editor-common';
3
+ import type { SimpleQuickAction } from '@sap-ux-private/control-property-editor-common';
4
+ import { SIMPLE_QUICK_ACTION_KIND } from '@sap-ux-private/control-property-editor-common';
4
5
 
5
6
  import { getRelevantControlFromActivePage } from '../../cpe/quick-actions/utils';
6
- import { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
7
- import { EnablementValidator } from './enablement-validator';
7
+ import type { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
8
+ import type { EnablementValidator } from './enablement-validator';
8
9
  import { QuickActionDefinitionBase } from './quick-action-base';
9
10
 
10
11
  /**
@@ -58,9 +58,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
58
58
  get textKey() {
59
59
  return this.defaultTextKey;
60
60
  }
61
- constructor(type, controlTypes, defaultTextKey, context) {
62
- let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
63
- let enablementValidators = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
61
+ constructor(type, controlTypes, defaultTextKey, context, options = {}, enablementValidators = []) {
64
62
  super(type, NESTED_QUICK_ACTION_KIND, defaultTextKey, context, enablementValidators);
65
63
  this.type = type;
66
64
  this.controlTypes = controlTypes;
@@ -72,6 +70,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
72
70
 
73
71
  /**
74
72
  * Adds action id to the table map entry, if the service actions are needed.
73
+ *
75
74
  * @param table - table element
76
75
  * @param tableMapKey - map key
77
76
  */
@@ -143,13 +142,14 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
143
142
  tableInternal = itemsAggregation.find(item => [M_TABLE_TYPE, TREE_TABLE_TYPE, ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE].some(tType => isA(tType, item)));
144
143
  }
145
144
  return tableInternal;
146
- } catch (error) {
145
+ } catch {
147
146
  return undefined;
148
147
  }
149
148
  }
150
149
 
151
150
  /**
152
151
  * Determines table label for the given table element
152
+ *
153
153
  * @param table - table element
154
154
  * @returns table label if found or 'Unnamed table'
155
155
  */
@@ -170,6 +170,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
170
170
 
171
171
  /**
172
172
  * Builds a map kay/tab_name for ICON_TAB_BAR control of the active page, if such exists
173
+ *
173
174
  * @returns built map
174
175
  */
175
176
  buildIconTabBarFilterMap() {
@@ -193,6 +194,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
193
194
 
194
195
  /**
195
196
  * Collects subsection data in the table map for the given section and table
197
+ *
196
198
  * @param section - object page section
197
199
  * @param table - table element
198
200
  */
@@ -241,8 +243,12 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
241
243
 
242
244
  /**
243
245
  * Processes table element and pushes table data to the children array
246
+ *
244
247
  * @param table - table element
245
248
  * @param sectionInfo - section info object
249
+ * @param sectionInfo.section
250
+ * @param sectionInfo.subSection
251
+ * @param sectionInfo.layout
246
252
  */
247
253
  async processTable(table, sectionInfo) {
248
254
  const tableMapKey = this.children.length.toString();
@@ -261,6 +267,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
261
267
 
262
268
  /**
263
269
  * Selects closest overlay for the given table element
270
+ *
264
271
  * @param table - table element
265
272
  */
266
273
  selectOverlay(table) {
@@ -272,6 +279,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
272
279
 
273
280
  /**
274
281
  * Prepares nested quick action object
282
+ *
275
283
  * @returns action instance
276
284
  */
277
285
  getActionObject() {
@@ -1,21 +1,21 @@
1
- import UI5Element from 'sap/ui/core/Element';
2
- import { NESTED_QUICK_ACTION_KIND, NestedQuickAction } from '@sap-ux-private/control-property-editor-common';
1
+ import type UI5Element from 'sap/ui/core/Element';
2
+ import { NESTED_QUICK_ACTION_KIND } from '@sap-ux-private/control-property-editor-common';
3
3
  import type IconTabBar from 'sap/m/IconTabBar';
4
4
  import type IconTabFilter from 'sap/m/IconTabFilter';
5
5
  import type Table from 'sap/m/Table';
6
6
  import type MdcTable from 'sap/ui/mdc/Table';
7
7
  import type SmartTable from 'sap/ui/comp/smarttable/SmartTable';
8
- import { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
8
+ import type { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
9
9
  import OverlayUtil from 'sap/ui/dt/OverlayUtil';
10
- import type { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
10
+ import type { NestedQuickActionChild, NestedQuickAction } from '@sap-ux-private/control-property-editor-common';
11
11
  import { getParentContainer, getRelevantControlFromActivePage } from '../../cpe/quick-actions/utils';
12
12
  import { getControlById, isA, isManagedObject } from '../../utils/core';
13
13
  import { getUi5Version, isLowerThanMinimalUi5Version } from '../../utils/version';
14
- import ObjectPageSection from 'sap/uxap/ObjectPageSection';
15
- import ObjectPageSubSection from 'sap/uxap/ObjectPageSubSection';
16
- import ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
17
- import ManagedObject from 'sap/ui/base/ManagedObject';
18
- import { EnablementValidator } from './enablement-validator';
14
+ import type ObjectPageSection from 'sap/uxap/ObjectPageSection';
15
+ import type ObjectPageSubSection from 'sap/uxap/ObjectPageSubSection';
16
+ import type ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
17
+ import type ManagedObject from 'sap/ui/base/ManagedObject';
18
+ import type { EnablementValidator } from './enablement-validator';
19
19
  import { QuickActionDefinitionBase } from './quick-action-base';
20
20
  import {
21
21
  ANALYTICAL_TABLE_TYPE,
@@ -106,6 +106,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
106
106
 
107
107
  /**
108
108
  * Adds action id to the table map entry, if the service actions are needed.
109
+ *
109
110
  * @param table - table element
110
111
  * @param tableMapKey - map key
111
112
  */
@@ -187,13 +188,14 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
187
188
  );
188
189
  }
189
190
  return tableInternal as UI5Element | undefined;
190
- } catch (error) {
191
+ } catch {
191
192
  return undefined;
192
193
  }
193
194
  }
194
195
 
195
196
  /**
196
197
  * Determines table label for the given table element
198
+ *
197
199
  * @param table - table element
198
200
  * @returns table label if found or 'Unnamed table'
199
201
  */
@@ -215,6 +217,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
215
217
 
216
218
  /**
217
219
  * Builds a map kay/tab_name for ICON_TAB_BAR control of the active page, if such exists
220
+ *
218
221
  * @returns built map
219
222
  */
220
223
  protected buildIconTabBarFilterMap(): { [key: string]: string } {
@@ -241,6 +244,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
241
244
 
242
245
  /**
243
246
  * Collects subsection data in the table map for the given section and table
247
+ *
244
248
  * @param section - object page section
245
249
  * @param table - table element
246
250
  */
@@ -284,8 +288,12 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
284
288
 
285
289
  /**
286
290
  * Processes table element and pushes table data to the children array
291
+ *
287
292
  * @param table - table element
288
293
  * @param sectionInfo - section info object
294
+ * @param sectionInfo.section
295
+ * @param sectionInfo.subSection
296
+ * @param sectionInfo.layout
289
297
  */
290
298
  private async processTable(
291
299
  table: UI5Element,
@@ -317,6 +325,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
317
325
 
318
326
  /**
319
327
  * Selects closest overlay for the given table element
328
+ *
320
329
  * @param table - table element
321
330
  */
322
331
  protected selectOverlay(table: UI5Element): void {
@@ -328,6 +337,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
328
337
 
329
338
  /**
330
339
  * Prepares nested quick action object
340
+ *
331
341
  * @returns action instance
332
342
  */
333
343
  getActionObject(): NestedQuickAction {
@@ -50,8 +50,7 @@ sap.ui.define(["sap/base/Log", "sap/ui/core/Element", "open/ux/preview/client/th
50
50
  } else {
51
51
  const ElementRegistry = (await __ui5_require_async('sap/ui/core/ElementRegistry')).default;
52
52
  const elements = ElementRegistry.all();
53
- Object.entries(elements).forEach(_ref => {
54
- let [key, ui5Element] = _ref;
53
+ Object.entries(elements).forEach(([key, ui5Element]) => {
55
54
  if (isSyncView(ui5Element)) {
56
55
  syncViews.add(key);
57
56
  }
@@ -54,7 +54,9 @@ export async function applyChange(options: UI5AdaptationOptions, change: Propert
54
54
  );
55
55
  await rta.getCommandStack().pushAndExecute(command);
56
56
  } else if (change.propertyType === PropertyType.Configuration) {
57
- const command = await createManifestPropertyChange(modifiedControl, flexSettings, { [change.propertyName]: change.value });
57
+ const command = await createManifestPropertyChange(modifiedControl, flexSettings, {
58
+ [change.propertyName]: change.value
59
+ });
58
60
  if (command) {
59
61
  await rta.getCommandStack().pushAndExecute(command);
60
62
  } else {
@@ -125,10 +125,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
125
125
  return selector.id;
126
126
  }
127
127
  }
128
- async function getPropertyChange(change, _ref) {
129
- let {
130
- appComponent
131
- } = _ref;
128
+ async function getPropertyChange(change, {
129
+ appComponent
130
+ }) {
132
131
  const propertyChange = change;
133
132
  const flexObject = await getFlexObject(change);
134
133
  const selectorId = await getControlIdByChange(flexObject, appComponent);
@@ -151,10 +150,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
151
150
  }]
152
151
  };
153
152
  }
154
- function getV2ConfigurationChange(change, _ref2) {
155
- let {
156
- textBundle
157
- } = _ref2;
153
+ function getV2ConfigurationChange(change, {
154
+ textBundle
155
+ }) {
158
156
  const {
159
157
  entityPropertyChange,
160
158
  parentPage
@@ -174,11 +172,10 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
174
172
  }]
175
173
  };
176
174
  }
177
- function getV4ConfigurationChange(change, _ref3) {
178
- let {
179
- configPropertyControlIdMap,
180
- textBundle
181
- } = _ref3;
175
+ function getV4ConfigurationChange(change, {
176
+ configPropertyControlIdMap,
177
+ textBundle
178
+ }) {
182
179
  assertManifestChange(change);
183
180
  if ([change.content.entityPropertyChange.propertyValue].every(item => item === undefined || item === null)) {
184
181
  throw new Error('Invalid change, missing property value on change file');
@@ -217,10 +214,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
217
214
  };
218
215
  }
219
216
  const GENERIC_CHANGE_HANDLER = {
220
- [ADD_NEW_ANNOTATION_FILE_CHANGE]: (annotationFileChange, _ref4) => {
221
- let {
222
- textBundle
223
- } = _ref4;
217
+ [ADD_NEW_ANNOTATION_FILE_CHANGE]: (annotationFileChange, {
218
+ textBundle
219
+ }) => {
224
220
  const dataSourceId = annotationFileChange.content.dataSourceId;
225
221
  const sourceKey = Object.keys(annotationFileChange.content.dataSource)[0];
226
222
  return {
@@ -235,10 +231,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
235
231
  }]
236
232
  };
237
233
  },
238
- [RENAME_CHANGE]: (renameChange, _ref5) => {
239
- let {
240
- textBundle
241
- } = _ref5;
234
+ [RENAME_CHANGE]: (renameChange, {
235
+ textBundle
236
+ }) => {
242
237
  const selectorId = renameChange.selector.id;
243
238
  return {
244
239
  changeTitle: textBundle?.getText('RENAME_CHANGE'),
@@ -255,10 +250,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
255
250
  }]
256
251
  };
257
252
  },
258
- [MOVE_CHANGE]: (moveChange, _ref6) => {
259
- let {
260
- textBundle
261
- } = _ref6;
253
+ [MOVE_CHANGE]: (moveChange, {
254
+ textBundle
255
+ }) => {
262
256
  const movedControlId = moveChange.content.movedElements[0].selector.id;
263
257
  return {
264
258
  changeTitle: textBundle?.getText('MOVE_CONTROLS_CHANGE'),
@@ -278,10 +272,9 @@ sap.ui.define(["../../utils/version", "sap/ui/core/util/reflection/JsControlTree
278
272
  }]
279
273
  };
280
274
  },
281
- [ADD_XML_CHANGE]: (addXmlChange, _ref7) => {
282
- let {
283
- textBundle
284
- } = _ref7;
275
+ [ADD_XML_CHANGE]: (addXmlChange, {
276
+ textBundle
277
+ }) => {
285
278
  return {
286
279
  changeTitle: textBundle?.getText('ADD_XML_CHANGE'),
287
280
  controlId: addXmlChange.selector.id,
@@ -51,8 +51,8 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
51
51
  pendingChanges = [];
52
52
  changedFiles = {};
53
53
  eventStack = [];
54
- pendingConfigChangeMap = (() => new Map())();
55
- configPropertyControlIdMap = (() => new Map())();
54
+ pendingConfigChangeMap = new Map();
55
+ configPropertyControlIdMap = new Map();
56
56
  /**
57
57
  *
58
58
  * @param options ui5 adaptation options.
@@ -85,7 +85,6 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
85
85
  name = control.getMetadata().getName();
86
86
  }
87
87
  const error = getError(exception);
88
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
89
88
  const modifiedMessage = modifyRTAErrorMessage(error.toString(), id, name);
90
89
  const errorMessage = modifiedMessage || `RTA Exception applying expression "${action.payload.value}"`;
91
90
  await sendInfoCenterMessage({
@@ -112,7 +112,7 @@ export class ChangeService extends EventTarget {
112
112
  }
113
113
 
114
114
  const error = getError(exception);
115
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
115
+
116
116
  const modifiedMessage = modifyRTAErrorMessage(error.toString(), id, name);
117
117
  const errorMessage =
118
118
  modifiedMessage || `RTA Exception applying expression "${action.payload.value}"`;
@@ -1,5 +1,5 @@
1
- import ResourceBundle from 'sap/base/i18n/ResourceBundle';
2
- import ResourceModel from 'sap/ui/model/resource/ResourceModel';
1
+ import type ResourceBundle from 'sap/base/i18n/ResourceBundle';
2
+ import type ResourceModel from 'sap/ui/model/resource/ResourceModel';
3
3
  import type UI5Element from 'sap/ui/core/Element';
4
4
  import { getTextBundle } from '../../i18n';
5
5
 
@@ -21,8 +21,8 @@ export async function validateBindingModel(modifiedControl: UI5Element, value: s
21
21
  if (bindingParts.length === 2) {
22
22
  const bindingModel = bindingParts[0];
23
23
  const resourceKey = bindingParts[1].trim();
24
- const resourceModel = (modifiedControl.getModel(bindingModel) as ResourceModel);
25
- if(!resourceModel) {
24
+ const resourceModel = modifiedControl.getModel(bindingModel) as ResourceModel;
25
+ if (!resourceModel) {
26
26
  throw new SyntaxError(textBundle.getText('INVALID_BINDING_MODEL'));
27
27
  }
28
28
  const resourceBundle = resourceModel.getResourceBundle() as ResourceBundle;
@@ -11,7 +11,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
11
11
  */
12
12
 
13
13
  static actionHandlers = [];
14
- static #_ = (() => {
14
+ static {
15
15
  const {
16
16
  sendAction
17
17
  } = startPostMessageCommunication(window.parent, async action => {
@@ -24,7 +24,8 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
24
24
  }
25
25
  });
26
26
  this.sendAction = sendAction;
27
- })();
27
+ }
28
+
28
29
  /**
29
30
  * Creates a listener to receive actions from the CPE.
30
31
  *
@@ -1,10 +1,11 @@
1
1
  import Log from 'sap/base/Log';
2
2
 
3
- import { ExternalAction, startPostMessageCommunication } from '@sap-ux-private/control-property-editor-common';
3
+ import type { ExternalAction } from '@sap-ux-private/control-property-editor-common';
4
+ import { startPostMessageCommunication } from '@sap-ux-private/control-property-editor-common';
4
5
 
5
6
  import { getError } from '../utils/error';
6
7
 
7
- import { ActionHandler } from './types';
8
+ import type { ActionHandler } from './types';
8
9
 
9
10
  export class CommunicationService {
10
11
  /**
@@ -63,9 +63,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
63
63
  connector.storage.fileChangeRequestNotifier = this.onChangeSaved.bind(this);
64
64
  }
65
65
  }
66
- onChangeSaved(fileName, kind) {
67
- let change = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
68
- let additionalChangeInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
66
+ onChangeSaved(fileName, kind, change = {}, additionalChangeInfo = {}) {
69
67
  const {
70
68
  changeType,
71
69
  content
@@ -1,5 +1,6 @@
1
- import { ExternalAction, reloadApplication, storageFileChanged } from '@sap-ux-private/control-property-editor-common';
2
- import { ActionSenderFunction, SubscribeFunction } from './types';
1
+ import type { ExternalAction } from '@sap-ux-private/control-property-editor-common';
2
+ import { reloadApplication, storageFileChanged } from '@sap-ux-private/control-property-editor-common';
3
+ import type { ActionSenderFunction, SubscribeFunction } from './types';
3
4
  import { getUi5Version, isLowerThanMinimalUi5Version } from '../utils/version';
4
5
  import { AdditionalChangeInfo } from '../utils/additional-change-info';
5
6
  /**
@@ -14,12 +14,13 @@ import {
14
14
  import Utils from 'sap/ui/fl/Utils';
15
15
  import type ManagedObject from 'sap/ui/base/ManagedObject';
16
16
  import type ElementOverlay from 'sap/ui/dt/ElementOverlay';
17
- import { getManifestProperties, MergedSetting, type ManagedObjectMetadataProperties } from './utils';
18
- import { UI5ControlProperty } from './types';
17
+ import type { MergedSetting, ManagedObjectMetadataProperties } from './utils';
18
+ import { getManifestProperties } from './utils';
19
+ import type { UI5ControlProperty } from './types';
19
20
  import DataType from 'sap/ui/base/DataType';
20
21
  import { getV4PageType } from '../utils/fe-v4';
21
- import { ChangeService } from './changes';
22
- import { TemplateType } from 'sap/ui/dt/DesignTimeMetadata';
22
+ import type { ChangeService } from './changes';
23
+ import type { TemplateType } from 'sap/ui/dt/DesignTimeMetadata';
23
24
 
24
25
  type AnalyzedType = Pick<UI5ControlProperty, 'isArray' | 'primitiveType' | 'ui5Type' | 'enumValues'>;
25
26
 
@@ -5,7 +5,7 @@ sap.ui.define([], function () {
5
5
 
6
6
  class FeatureService {
7
7
  static features = {};
8
- static #_ = (() => {
8
+ static {
9
9
  // eslint-disable-next-line fiori-custom/sap-no-dom-access, fiori-custom/sap-browser-api-warning
10
10
  const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
11
11
  const features = bootstrapConfig?.getAttribute('data-open-ux-preview-features');
@@ -18,7 +18,8 @@ sap.ui.define([], function () {
18
18
  this.features[feature] = isEnabled;
19
19
  }
20
20
  }
21
- })();
21
+ }
22
+
22
23
  /**
23
24
  * Checks if given feature is enabled.
24
25
  *
@@ -21,8 +21,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
21
21
  const ODataHealthChecker = ___odata_health_odata_health_checker["ODataHealthChecker"];
22
22
  const sendInfoCenterMessage = ___utils_info_center_message["sendInfoCenterMessage"];
23
23
  const ODataUpStatus = ___odata_health_odata_health_status["ODataUpStatus"];
24
- function init(rta) {
25
- let registries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
24
+ function init(rta, registries = []) {
26
25
  Log.info('Initializing Control Property Editor');
27
26
 
28
27
  // enable telemetry if requested
@@ -1,6 +1,5 @@
1
1
  import Log from 'sap/base/Log';
2
- import { Logger } from '@sap-ux-private/control-property-editor-common';
3
-
2
+ import type { Logger } from '@sap-ux-private/control-property-editor-common';
4
3
 
5
4
  function getString(message: string | object): string {
6
5
  if (typeof message === 'object') {
@@ -23,4 +22,3 @@ export const logger: Logger = {
23
22
  Log.error(getString(message));
24
23
  }
25
24
  };
26
-
@@ -57,13 +57,10 @@ sap.ui.define(["sap/base/Log", "sap/ui/model/odata/v2/ODataModel", "sap/ui/model
57
57
  async getHealthStatus() {
58
58
  const oDataHealthCheckStartTime = Date.now();
59
59
  const services = this.getServices();
60
- const metadataPromises = await Promise.allSettled(services.map(_ref => {
61
- let {
62
- serviceUrl,
63
- oDataVersion
64
- } = _ref;
65
- return this.getServiceMetadata(serviceUrl, oDataVersion);
66
- }));
60
+ const metadataPromises = await Promise.allSettled(services.map(({
61
+ serviceUrl,
62
+ oDataVersion
63
+ }) => this.getServiceMetadata(serviceUrl, oDataVersion)));
67
64
  const oDataHealthCheckDurationInSec = ((Date.now() - oDataHealthCheckStartTime) / 1000).toFixed(2);
68
65
  Log.info(`OData service health check took ${oDataHealthCheckDurationInSec} sec.`);
69
66
  return metadataPromises.map((metadataPromise, idx) => metadataPromise.status === 'fulfilled' ? new ODataUpStatus(services[idx].serviceUrl) : new ODataDownStatus(services[idx].serviceUrl, metadataPromise.reason));
@@ -6,8 +6,7 @@ sap.ui.define(["../control-data", "../utils", "sap/ui/dt/OverlayUtil", "sap/ui/d
6
6
  const buildControlData = ___control_data["buildControlData"];
7
7
  const getRuntimeControl = ___utils["getRuntimeControl"];
8
8
  const getComponent = ____utils_core["getComponent"];
9
- const isEditable = function (changeService) {
10
- let id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
9
+ const isEditable = (changeService, id = '') => {
11
10
  let editable = false;
12
11
  const control = sap.ui.getCore().byId(id);
13
12
  if (!control) {
@@ -3,7 +3,7 @@ import { getRuntimeControl } from '../utils';
3
3
  import OverlayUtil from 'sap/ui/dt/OverlayUtil';
4
4
  import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
5
5
  import { getComponent } from '../../utils/core';
6
- import { ChangeService } from '../changes';
6
+ import type { ChangeService } from '../changes';
7
7
 
8
8
  export const isEditable = (changeService: ChangeService, id = ''): boolean => {
9
9
  let editable = false;