@sap-ux/preview-middleware 0.17.38 → 0.17.40

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.
package/README.md CHANGED
@@ -13,27 +13,30 @@ When this middleware is used together with the `reload-middleware`, then the ord
13
13
  ```
14
14
 
15
15
  ## [Configuration Options](#configuration-options)
16
- | Option | Type | Default Value | Description |
17
- | ---------------------- | --------- | ---------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
18
- | `flp` | | | Optional configuration object for the local Fiori launchpad |
19
- | `flp.path` | `string` | `/test/flp.html` | The mount point of the local Fiori launchpad. |
20
- | `flp.init` | `string` | `undefined` | Optional UI5 module/script to be executed after the standard initialization |
21
- | `flp.intent` | | | Optional intent to be used for the application |
22
- | `flp.intent.object` | `string` | `app` | Optional intent object |
23
- | `flp.intent.action` | `string` | `preview` | Optional intent action |
24
- | `flp.apps` | `array` | `undefined` | Optional additional local apps that are available in local Fiori launchpad |
25
- | `flp.libs` | `boolean` | `undefined` | Optional flag to add a generic script fetching the paths of used libraries not available in UI5. To disable set it to `false`, if not set, then the project is checked for a `load-reuse-libs` script and if available the libraries are fetched as well. |
26
- | `flp.theme` | `string` | `undefined` | Optional flag for setting the UI5 Theme. |
27
- | `adp.target` | | | Required configuration for adaptation projects defining the connected backend |
28
- | `adp.ignoreCertErrors` | `boolean` | `false` | Optional setting to ignore certification validation errors when working with e.g. development systems with self signed certificates |
29
- | `rta` | | | Optional configuration allowing to add mount points for runtime adaptation |
30
- | `rta.layer` | `string` | `(calculated)` | Optional property for defining the runtime adaptation layer for changes (default is `CUSTOMER_BASE` or read from the project for adaptation projects) |
31
- | `rta.editors` | `array` | `undefined` | Optional list of mount points for editing |
32
- | `test` | `array` | `undefined` | Optional list of configurations for automated testing. |
33
- | `debug` | `boolean` | `false` | Enables debug output |
16
+ | Option | Type | Default Value | Description |
17
+ |-------------------------|-----------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
18
+ | `flp` | | | Optional configuration object for the local Fiori launchpad |
19
+ | `flp.path` | `string` | `/test/flp.html` | The mount point of the local Fiori launchpad. |
20
+ | `flp.init` | `string` | `undefined` | Optional UI5 module/script to be executed after the standard initialization |
21
+ | `flp.intent` | | | Optional intent to be used for the application |
22
+ | `flp.intent.object` | `string` | `app` | Optional intent object |
23
+ | `flp.intent.action` | `string` | `preview` | Optional intent action |
24
+ | `flp.apps` | `array` | `undefined` | Optional additional local apps that are available in local Fiori launchpad |
25
+ | `flp.libs` | `boolean` | `undefined` | Optional flag to add a generic script fetching the paths of used libraries not available in UI5. To disable set it to `false`, if not set, then the project is checked for a `load-reuse-libs` script and if available the libraries are fetched as well. |
26
+ | `flp.theme` | `string` | `undefined` | Optional flag for setting the UI5 Theme. |
27
+ | `adp.target` | | | Required configuration for adaptation projects defining the connected backend |
28
+ | `adp.ignoreCertErrors` | `boolean` | `false` | Optional setting to ignore certification validation errors when working with e.g. development systems with self signed certificates |
29
+ | `rta` | | | 🚫 *Deprecated: use 'editors.rta' instead* <br/> Optional configuration allowing to add mount points for runtime adaptation |
30
+ | `editors` | | | Optional list of configurations allowing to add mount points for additional editors |
31
+ | `editors.rta` | `array` | `undefined` | Optional configuration allowing to add mount points for runtime adaptation |
32
+ | `editors.rta.layer` | `string` | `(calculated)` | Optional property for defining the runtime adaptation layer for changes (default is `CUSTOMER_BASE` or read from the project for adaptation projects) |
33
+ | `editors.rta.endpoints` | `array` | `undefined` | Optional list of mount points for editing |
34
+ | `test` | `array` | `undefined` | Optional list of configurations for automated testing. |
35
+ | `debug` | `boolean` | `false` | Enables debug output |
34
36
 
35
37
  ### [`flp.apps`](#configuration-option-flpapps)
36
38
  Array of additional application configurations:
39
+
37
40
  | Option | Type | Default Value | Description |
38
41
  | ------------------------ | -------- | -------------- | ------------------------------------------------------------------------------------------------------------- |
39
42
  | `target` | `string` | | Target path of the additional application |
@@ -50,11 +53,11 @@ Array of additional application configurations:
50
53
  | `client` | `string` optional | sap-client parameter |
51
54
  | `scp` | `boolean` optional | If set to true the proxy will execute the required OAuth routine for the ABAP environment on SAP BTP |
52
55
 
53
- ### [`rta.editors`](#configuration-option-rtaeditors)
54
- | Option | Type | Description |
55
- | --------------- | -------------------| -----------------------------------------------------------------------------------------------|
56
- | `path` | `string` mandatory | The mount point to be used for the editor. |
57
- | `developerMode` | `boolean` optional | Enables/disables the runtime adaptation developer mode (only supported for adaptation projects) |
56
+ ### [`editors`](#configuration-option-editors)
57
+ | Option | Type | Description |
58
+ |-------------------------------|--------------------|-------------------------------------------------------------------------------------------------|
59
+ | `rta.endpoints.path` | `string` mandatory | The mount point to be used for the editor. |
60
+ | `rta.endpoints.developerMode` | `boolean` optional | Enables/disables the runtime adaptation developer mode (only supported for adaptation projects) |
58
61
 
59
62
  ### [`test`](#configuration-option-test)
60
63
  | Option | Type | Description |
@@ -1,5 +1,5 @@
1
1
  import { ToolsLogger, type Logger } from '@sap-ux/logger';
2
- import type { App, DefaultFlpPath, DefaultIntent, FlpConfig, Intent, InternalTestConfig, MiddlewareConfig, TestConfig } from '../types';
2
+ import type { App, DefaultFlpPath, DefaultIntent, FlpConfig, Intent, InternalTestConfig, MiddlewareConfig, RtaConfig, TestConfig } from '../types';
3
3
  import { type Manifest, type UI5FlexLayer } from '@sap-ux/project-access';
4
4
  import { type Editor } from 'mem-fs-editor';
5
5
  import type { MergedAppDescriptor } from '@sap-ux/axios-extension';
@@ -95,6 +95,14 @@ export declare function getFlpConfigWithDefaults(config?: Partial<FlpConfig>): F
95
95
  * @param logger logger instance
96
96
  */
97
97
  export declare function sanitizeConfig(config: MiddlewareConfig, logger: ToolsLogger): void;
98
+ /**
99
+ * Sanitize the deprecated RTA configuration.
100
+ *
101
+ * @param deprecatedRtaConfig deprecated RTA configuration
102
+ * @param logger logger instance
103
+ * @returns sanitized RTA configuration
104
+ */
105
+ export declare function sanitizeRtaConfig(deprecatedRtaConfig: MiddlewareConfig['rta'], logger: Logger): RtaConfig | undefined;
98
106
  /**
99
107
  * Add an application to the local FLP preview.
100
108
  *
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_INTENT = exports.DEFAULT_PATH = exports.DEFAULT_THEME = exports.PREVIEW_URL = void 0;
4
4
  exports.getFlpConfigWithDefaults = getFlpConfigWithDefaults;
5
5
  exports.sanitizeConfig = sanitizeConfig;
6
+ exports.sanitizeRtaConfig = sanitizeRtaConfig;
6
7
  exports.addApp = addApp;
7
8
  exports.getAppName = getAppName;
8
9
  exports.createFlpTemplateConfig = createFlpTemplateConfig;
@@ -118,8 +119,14 @@ function getFlpConfigWithDefaults(config = {}) {
118
119
  * @param logger logger instance
119
120
  */
120
121
  function sanitizeConfig(config, logger) {
121
- if (config.rta && config.adp === undefined) {
122
- config.rta.editors = config.rta.editors.map((editor) => {
122
+ //prettier-ignore
123
+ if (config.rta) { //NOSONAR
124
+ config.editors ??= {};
125
+ config.editors.rta = sanitizeRtaConfig(config.rta, logger); //NOSONAR
126
+ delete config.rta; //NOSONAR
127
+ }
128
+ if (config.editors?.rta && config.adp === undefined) {
129
+ config.editors.rta.endpoints = config.editors.rta.endpoints.map((editor) => {
123
130
  if (editor.developerMode) {
124
131
  logger.error('developerMode is ONLY supported for SAP UI5 adaptation projects.');
125
132
  logger.warn(`developerMode for ${editor.path} disabled`);
@@ -129,6 +136,23 @@ function sanitizeConfig(config, logger) {
129
136
  });
130
137
  }
131
138
  }
139
+ /**
140
+ * Sanitize the deprecated RTA configuration.
141
+ *
142
+ * @param deprecatedRtaConfig deprecated RTA configuration
143
+ * @param logger logger instance
144
+ * @returns sanitized RTA configuration
145
+ */
146
+ //prettier-ignore
147
+ function sanitizeRtaConfig(deprecatedRtaConfig, logger) {
148
+ let rtaConfig;
149
+ if (deprecatedRtaConfig) {
150
+ const { editors, ...rta } = deprecatedRtaConfig;
151
+ rtaConfig = { ...rta, endpoints: [...editors] };
152
+ logger.warn(`The configuration option 'rta' is deprecated. Please use 'editors.rta' instead.`);
153
+ }
154
+ return rtaConfig;
155
+ }
132
156
  /**
133
157
  * Retrieves the configuration settings for UI5 flexibility services.
134
158
  *
@@ -279,9 +303,9 @@ function getPreviewPaths(config, logger = new logger_1.ToolsLogger()) {
279
303
  const flpConfig = getFlpConfigWithDefaults(config.flp);
280
304
  urls.push({ path: `${flpConfig.path}#${flpConfig.intent.object}-${flpConfig.intent.action}`, type: 'preview' });
281
305
  // add editor urls
282
- if (config.rta?.editors) {
283
- config.rta.editors.forEach((editor) => {
284
- urls.push({ path: editor.path, type: 'editor' });
306
+ if (config.editors?.rta) {
307
+ config.editors.rta.endpoints.forEach((endpoint) => {
308
+ urls.push({ path: endpoint.path, type: 'editor' });
285
309
  });
286
310
  }
287
311
  // add test urls if configured
@@ -25,7 +25,7 @@ export declare class FlpSandbox {
25
25
  private manifest;
26
26
  protected onChangeRequest: OnChangeRequestHandler | undefined;
27
27
  protected templateConfig: TemplateConfig;
28
- readonly config: FlpConfig;
28
+ readonly flpConfig: FlpConfig;
29
29
  readonly rta?: RtaConfig;
30
30
  readonly test?: TestConfig[];
31
31
  readonly router: EnhancedRouter;
package/dist/base/flp.js CHANGED
@@ -27,7 +27,7 @@ class FlpSandbox {
27
27
  manifest;
28
28
  onChangeRequest;
29
29
  templateConfig;
30
- config;
30
+ flpConfig;
31
31
  rta;
32
32
  test;
33
33
  router;
@@ -44,10 +44,10 @@ class FlpSandbox {
44
44
  this.project = project;
45
45
  this.utils = utils;
46
46
  this.logger = logger;
47
- this.config = (0, config_1.getFlpConfigWithDefaults)(config.flp);
47
+ this.flpConfig = (0, config_1.getFlpConfigWithDefaults)(config.flp);
48
48
  this.test = config.test;
49
- this.rta = config.rta;
50
- logger.debug(`Config: ${JSON.stringify({ flp: this.config, rta: this.rta, test: this.test })}`);
49
+ this.rta = config.editors?.rta ?? (0, config_1.sanitizeRtaConfig)(config.rta, logger); //NOSONAR
50
+ logger.debug(`Config: ${JSON.stringify({ flp: this.flpConfig, rta: this.rta, test: this.test })}`);
51
51
  this.router = (0, express_1.Router)();
52
52
  }
53
53
  /**
@@ -68,16 +68,16 @@ class FlpSandbox {
68
68
  */
69
69
  async init(manifest, componentId, resources = {}, adp) {
70
70
  this.createFlexHandler();
71
- this.config.libs ??= await this.hasLocateReuseLibsScript();
71
+ this.flpConfig.libs ??= await this.hasLocateReuseLibsScript();
72
72
  const id = manifest['sap.app']?.id ?? '';
73
- this.templateConfig = (0, config_1.createFlpTemplateConfig)(this.config, manifest, resources);
73
+ this.templateConfig = (0, config_1.createFlpTemplateConfig)(this.flpConfig, manifest, resources);
74
74
  this.adp = adp;
75
75
  this.manifest = manifest;
76
76
  await (0, config_1.addApp)(this.templateConfig, manifest, {
77
77
  componentId,
78
78
  target: resources[componentId ?? id] ?? this.templateConfig.basePath,
79
79
  local: '.',
80
- intent: this.config.intent
80
+ intent: this.flpConfig.intent
81
81
  }, this.logger);
82
82
  this.addStandardRoutes();
83
83
  if (this.rta) {
@@ -171,7 +171,7 @@ class FlpSandbox {
171
171
  async setApplicationDependencies() {
172
172
  if (this.adp) {
173
173
  await this.adp.sync();
174
- const appName = (0, config_1.getAppName)(this.manifest, this.config.intent);
174
+ const appName = (0, config_1.getAppName)(this.manifest, this.flpConfig.intent);
175
175
  this.templateConfig.apps[appName].applicationDependencies = this.adp.descriptor;
176
176
  }
177
177
  }
@@ -185,7 +185,7 @@ class FlpSandbox {
185
185
  */
186
186
  async editorGetHandlerDeveloperMode(res, rta, previewUrl) {
187
187
  const scenario = rta.options?.scenario;
188
- let templatePreviewUrl = `${previewUrl}?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=forAdaptation&sap-ui-rta-skip-flex-validation=true&sap-ui-xx-condense-changes=true#${this.config.intent.object}-${this.config.intent.action}`;
188
+ let templatePreviewUrl = `${previewUrl}?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=forAdaptation&sap-ui-rta-skip-flex-validation=true&sap-ui-xx-condense-changes=true#${this.flpConfig.intent.object}-${this.flpConfig.intent.action}`;
189
189
  if (scenario === 'ADAPTATION_PROJECT') {
190
190
  templatePreviewUrl = templatePreviewUrl.replace('?', `?sap-ui-layer=${rta.layer}&`);
191
191
  }
@@ -237,7 +237,7 @@ class FlpSandbox {
237
237
  */
238
238
  addEditorRoutes(rta) {
239
239
  const cpe = (0, path_1.dirname)(require.resolve('@sap-ux/control-property-editor-sources'));
240
- for (const editor of rta.editors) {
240
+ for (const editor of rta.endpoints) {
241
241
  let previewUrl = editor.path.startsWith('/') ? editor.path : `/${editor.path}`;
242
242
  if (editor.developerMode) {
243
243
  previewUrl = `${previewUrl}.inner.html`;
@@ -270,15 +270,15 @@ class FlpSandbox {
270
270
  // Redirect to the same URL but add the necessary parameter
271
271
  const params = structuredClone(req.query);
272
272
  params['sap-ui-xx-viewCache'] = 'false';
273
- res.redirect(302, `${this.config.path}?${new URLSearchParams(params)}`);
273
+ res.redirect(302, `${this.flpConfig.path}?${new URLSearchParams(params)}`);
274
274
  return;
275
275
  }
276
276
  await this.setApplicationDependencies();
277
277
  // inform the user if a html file exists on the filesystem
278
278
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
279
- const file = await this.project.byPath(this.config.path);
279
+ const file = await this.project.byPath(this.flpConfig.path);
280
280
  if (file) {
281
- this.logger.info(`HTML file returned at ${this.config.path} is loaded from the file system.`);
281
+ this.logger.info(`HTML file returned at ${this.flpConfig.path} is loaded from the file system.`);
282
282
  next();
283
283
  }
284
284
  else {
@@ -298,7 +298,7 @@ class FlpSandbox {
298
298
  // register static client sources
299
299
  this.router.use(config_1.PREVIEW_URL.client.path, (0, express_1.static)(config_1.PREVIEW_URL.client.local));
300
300
  // add route for the sandbox html
301
- this.router.get(this.config.path, async (req, res, next) => {
301
+ this.router.get(this.flpConfig.path, async (req, res, next) => {
302
302
  await this.flpGetHandler(req, res, next);
303
303
  });
304
304
  }
@@ -372,7 +372,7 @@ class FlpSandbox {
372
372
  * Add additional routes for apps also to be shown in the local FLP.
373
373
  */
374
374
  async addRoutesForAdditionalApps() {
375
- for (const app of this.config.apps) {
375
+ for (const app of this.flpConfig.apps) {
376
376
  let manifest;
377
377
  if (app.local) {
378
378
  this.fs = this.fs ?? (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
@@ -700,7 +700,7 @@ async function initAdp(rootProject, config, flp, util, logger) {
700
700
  projectId: variant.id,
701
701
  scenario: 'ADAPTATION_PROJECT'
702
702
  };
703
- for (const editor of flp.rta.editors) {
703
+ for (const editor of flp.rta.endpoints) {
704
704
  editor.pluginScript ??= 'open/ux/preview/client/adp/init';
705
705
  }
706
706
  }
@@ -29,7 +29,7 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../simple-q
29
29
  })) {
30
30
  return;
31
31
  }
32
- super.initialize();
32
+ await super.initialize();
33
33
  }
34
34
  async execute() {
35
35
  if (this.control) {
@@ -27,7 +27,7 @@ export class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase im
27
27
  if (appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, { major: 1, minor: 130 })) {
28
28
  return;
29
29
  }
30
- super.initialize();
30
+ await super.initialize();
31
31
  }
32
32
 
33
33
  async execute(): Promise<FlexCommand[]> {
@@ -35,7 +35,7 @@ sap.ui.define(["./utils", "../simple-quick-action-base", "sap/ui/core/Component"
35
35
  if (!manifestChangesSupported) {
36
36
  return;
37
37
  }
38
- super.initialize();
38
+ await super.initialize();
39
39
  if (this.control) {
40
40
  this.ownerComponent = Component.getOwnerComponentFor(this.control);
41
41
  if (!this.ownerComponent?.isA('sap.suite.ui.generic.template.ListReport.Component') && !this.ownerComponent?.isA('sap.suite.ui.generic.template.AnalyticalListPage.Component')) {
@@ -53,7 +53,7 @@ export class EnableListReportVariantManagementQuickAction
53
53
  if (!manifestChangesSupported) {
54
54
  return;
55
55
  }
56
- super.initialize();
56
+ await super.initialize();
57
57
  if (this.control) {
58
58
  this.ownerComponent = Component.getOwnerComponentFor(this.control) as unknown as ListReportComponent;
59
59
  if (
@@ -29,6 +29,7 @@ sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../cpe/quick-actions/
29
29
  this.control = modifiedControl;
30
30
  }
31
31
  }
32
+ return Promise.resolve();
32
33
  }
33
34
  get textKey() {
34
35
  return this.isClearButtonEnabled ? 'V2_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V2_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
@@ -25,7 +25,7 @@ export class ToggleClearFilterBarQuickAction
25
25
 
26
26
  private isClearButtonEnabled = false;
27
27
 
28
- initialize(): void {
28
+ initialize(): Promise<void> {
29
29
  const controls = [
30
30
  ...(this.context.controlIndex[CONTROL_TYPE_LR] ?? []),
31
31
  ...(this.context.controlIndex[CONTROL_TYPE_ALP] ?? [])
@@ -38,6 +38,7 @@ export class ToggleClearFilterBarQuickAction
38
38
  this.control = modifiedControl;
39
39
  }
40
40
  }
41
+ return Promise.resolve();
41
42
  }
42
43
 
43
44
  protected get textKey() {
@@ -41,7 +41,7 @@ sap.ui.define(["../simple-quick-action-base", "sap/ui/core/Component", "../../..
41
41
  })) {
42
42
  return;
43
43
  }
44
- super.initialize();
44
+ await super.initialize();
45
45
  if (this.control) {
46
46
  this.ownerComponent = Component.getOwnerComponentFor(this.control);
47
47
  if (!this.ownerComponent?.isA('sap.fe.templates.ListReport.Component') && !this.ownerComponent?.isA('sap.fe.templates.ObjectPage.Component') && !this.ownerComponent?.isA('sap.fe.templates.AnalyticalListPage.Component')) {
@@ -54,7 +54,7 @@ export class EnableVariantManagementQuickAction
54
54
  if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 131 })) {
55
55
  return;
56
56
  }
57
- super.initialize();
57
+ await super.initialize();
58
58
  if (this.control) {
59
59
  this.ownerComponent = Component.getOwnerComponentFor(this.control) as unknown as ListReportComponent;
60
60
  if (
@@ -35,6 +35,7 @@ sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "./uti
35
35
  this.isUseDateRangeTypeEnabled = value === undefined ? boolMap[this.control.data('useSemanticDateRange')] : value;
36
36
  }
37
37
  }
38
+ return Promise.resolve();
38
39
  }
39
40
  get textKey() {
40
41
  return this.isUseDateRangeTypeEnabled ? 'QUICK_ACTION_LR_DISABLE_SEMANTIC_DATE_RANGE_FILTER_BAR' : 'QUICK_ACTION_LR_ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR';
@@ -28,7 +28,7 @@ export class ToggleSemanticDateRangeFilterBar
28
28
  readonly forceRefreshAfterExecution = true;
29
29
  private isUseDateRangeTypeEnabled = false;
30
30
 
31
- initialize(): void {
31
+ initialize(): Promise<void> {
32
32
  const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
33
33
  for (const control of controls) {
34
34
  const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
@@ -43,6 +43,7 @@ export class ToggleSemanticDateRangeFilterBar
43
43
  value === undefined ? boolMap[this.control.data('useSemanticDateRange')] : (value as boolean);
44
44
  }
45
45
  }
46
+ return Promise.resolve();
46
47
  }
47
48
 
48
49
  protected get textKey() {
@@ -32,6 +32,7 @@ sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "./uti
32
32
  this.isClearButtonEnabled = value === undefined ? filterBar.getShowClearButton() : value;
33
33
  }
34
34
  }
35
+ return Promise.resolve();
35
36
  }
36
37
  get textKey() {
37
38
  return this.isClearButtonEnabled ? 'V4_QUICK_ACTION_LR_DISABLE_CLEAR_FILTER_BAR' : 'V4_QUICK_ACTION_LR_ENABLE_CLEAR_FILTER_BAR';
@@ -25,7 +25,7 @@ export class ToggleClearFilterBarQuickAction
25
25
  readonly forceRefreshAfterExecution = true;
26
26
  private isClearButtonEnabled = false;
27
27
 
28
- initialize(): void {
28
+ initialize(): Promise<void> {
29
29
  const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
30
30
  for (const control of controls) {
31
31
  const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
@@ -39,6 +39,7 @@ export class ToggleClearFilterBarQuickAction
39
39
  this.isClearButtonEnabled = value === undefined ? filterBar.getShowClearButton() : (value as boolean);
40
40
  }
41
41
  }
42
+ return Promise.resolve();
42
43
  }
43
44
 
44
45
  protected get textKey() {
@@ -26,6 +26,7 @@ sap.ui.define([
26
26
  this.control = control;
27
27
  break;
28
28
  }
29
+ return Promise.resolve();
29
30
  }
30
31
  getActionObject() {
31
32
  return {
@@ -29,7 +29,7 @@ export abstract class SimpleQuickActionDefinitionBase<
29
29
  super(type, SIMPLE_QUICK_ACTION_KIND, defaultTextKey, context, enablementValidators);
30
30
  }
31
31
 
32
- initialize(): void {
32
+ initialize(): Promise<void> {
33
33
  for (const control of getRelevantControlFromActivePage<T>(
34
34
  this.context.controlIndex,
35
35
  this.context.view,
@@ -38,6 +38,7 @@ export abstract class SimpleQuickActionDefinitionBase<
38
38
  this.control = control;
39
39
  break;
40
40
  }
41
+ return Promise.resolve();
41
42
  }
42
43
 
43
44
  getActionObject(): SimpleQuickAction {
@@ -19,13 +19,16 @@ export interface App {
19
19
  componentId?: string;
20
20
  intent?: Intent;
21
21
  }
22
- export interface Editor {
22
+ export interface RtaEditor {
23
23
  path: string;
24
24
  developerMode?: boolean;
25
25
  pluginScript?: string;
26
26
  generator?: string;
27
27
  }
28
- export interface RtaConfig {
28
+ export type RtaConfig = Omit<InternalRtaConfig, 'editors'> & {
29
+ endpoints: RtaEditor[];
30
+ };
31
+ interface InternalRtaConfig {
29
32
  layer: UI5FlexLayer;
30
33
  options?: {
31
34
  [key: string]: unknown;
@@ -34,7 +37,7 @@ export interface RtaConfig {
34
37
  scenario?: string;
35
38
  appName?: string;
36
39
  };
37
- editors: Editor[];
40
+ editors: RtaEditor[];
38
41
  }
39
42
  /**
40
43
  * FLP preview configuration.
@@ -97,7 +100,13 @@ export type TestConfigDefaults = {
97
100
  export interface MiddlewareConfig {
98
101
  flp?: Partial<FlpConfig>;
99
102
  test?: TestConfig[];
100
- rta?: RtaConfig;
103
+ /**
104
+ * @deprecated use editors.rta instead.
105
+ */
106
+ rta?: InternalRtaConfig;
107
+ editors?: {
108
+ rta?: RtaConfig;
109
+ };
101
110
  adp?: AdpPreviewConfig;
102
111
  debug?: boolean;
103
112
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.17.38",
12
+ "version": "0.17.40",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "@sap-ux/logger": "0.6.0",
29
29
  "@sap-ux/feature-toggle": "0.2.3",
30
30
  "@sap-ux/btp-utils": "1.0.1",
31
- "@sap-ux/adp-tooling": "0.12.133",
31
+ "@sap-ux/adp-tooling": "0.12.134",
32
32
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.37",
33
33
  "@sap-ux/project-access": "1.29.8"
34
34
  },
@@ -48,9 +48,9 @@
48
48
  "supertest": "6.3.3",
49
49
  "@sap-ux-private/playwright": "0.1.0",
50
50
  "dotenv": "16.3.1",
51
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.65",
51
52
  "@sap-ux/axios-extension": "1.18.6",
52
53
  "@sap-ux/store": "1.0.0",
53
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.64",
54
54
  "@sap-ux/ui5-info": "0.8.3",
55
55
  "@sap-ux/i18n": "0.2.1"
56
56
  },