@sap-ux/preview-middleware 1.0.23 → 1.0.24

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.
@@ -5,7 +5,7 @@ import FlexChange from 'sap/ui/fl/Change';
5
5
  import JsControlTreeModifier from 'sap/ui/core/util/reflection/JsControlTreeModifier';
6
6
  import Log from 'sap/base/Log';
7
7
  import { getError } from '../../utils/error.js';
8
- import { AppComponent } from 'sap/ui/rta/RuntimeAuthoring';
8
+ import type { AppComponent } from 'sap/ui/rta/RuntimeAuthoring';
9
9
  import { getConfigMapControlIdMap } from '../../utils/fe-v4.js';
10
10
  import { PropertyValue } from '@sap-ux-private/control-property-editor-common';
11
11
 
@@ -1,5 +1,5 @@
1
1
  import type Component from 'sap/ui/core/Component';
2
- import FlexChange from 'sap/ui/fl/Change';
2
+ import type FlexChange from 'sap/ui/fl/Change';
3
3
  import {
4
4
  getAddXMLAdditionalInfo,
5
5
  type AddXMLAdditionalInfo,
@@ -1,5 +1,6 @@
1
- import FlexChange, { ChangeDefinition } from 'sap/ui/fl/Change';
2
- import FlexCommand from 'sap/ui/rta/command/FlexCommand';
1
+ import type FlexChange from 'sap/ui/fl/Change';
2
+ import type { ChangeDefinition } from 'sap/ui/fl/Change';
3
+ import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
3
4
  import { AddXMLChangeContent } from '../cpe/additional-change-info/add-xml-additional-info.js';
4
5
  import { ADD_XML_CHANGE } from '../cpe/changes/generic-change';
5
6
 
@@ -1,8 +1,25 @@
1
1
  "use strict";
2
2
 
3
- sap.ui.define(["sap/ui/core/Component", "./core", "sap/ui/rta/command/CommandFactory", "../cpe/utils"], function (Component, ___corejs, CommandFactory, ___cpe_utilsjs) {
3
+ sap.ui.define(["sap/ui/core/Component", "./core", "../cpe/utils"], function (Component, ___corejs, ___cpe_utilsjs) {
4
4
  "use strict";
5
5
 
6
+ function __ui5_require_async(path) {
7
+ return new Promise(function (resolve, reject) {
8
+ sap.ui.require([path], function (module) {
9
+ if (!(module && module.__esModule)) {
10
+ module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
11
+ default: module
12
+ } : module;
13
+ Object.defineProperty(module, "__esModule", {
14
+ value: true
15
+ });
16
+ }
17
+ resolve(module);
18
+ }, function (err) {
19
+ reject(err);
20
+ });
21
+ });
22
+ }
6
23
  const isA = ___corejs["isA"];
7
24
  const getOverlay = ___cpe_utilsjs["getOverlay"];
8
25
  /**
@@ -117,6 +134,7 @@ sap.ui.define(["sap/ui/core/Component", "./core", "sap/ui/rta/command/CommandFac
117
134
  parameters: manifestPropertyChange.changeSpecificData.content.parameters,
118
135
  selector: manifestPropertyChange.selector
119
136
  };
137
+ const CommandFactory = (await __ui5_require_async('sap/ui/rta/command/CommandFactory')).default;
120
138
  const command = await CommandFactory.getCommandFor(modifiedControl, 'appDescriptor', modifiedValue, null, flexSettings);
121
139
  return command;
122
140
  }
@@ -6,10 +6,9 @@ import XMLView from 'sap/ui/core/mvc/XMLView';
6
6
  import type { FlexSettings, Manifest } from 'sap/ui/rta/RuntimeAuthoring';
7
7
 
8
8
  import { isA } from './core.js';
9
- import CommandFactory from 'sap/ui/rta/command/CommandFactory';
10
9
  import { getOverlay } from '../cpe/utils.js';
11
10
  import UI5Element from 'sap/ui/core/Element';
12
- import FlexCommand from 'sap/ui/rta/command/FlexCommand';
11
+ import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
13
12
  import TableAPI from 'sap/fe/macros/table/TableAPI';
14
13
 
15
14
  export type MacroTable = TableAPI & {
@@ -142,6 +141,7 @@ export async function createManifestPropertyChange(
142
141
  selector: manifestPropertyChange.selector
143
142
  };
144
143
 
144
+ const CommandFactory = (await import('sap/ui/rta/command/CommandFactory')).default;
145
145
  const command = await CommandFactory.getCommandFor(
146
146
  modifiedControl,
147
147
  'appDescriptor',
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
12
12
  },
13
- "version": "1.0.23",
13
+ "version": "1.0.24",
14
14
  "license": "Apache-2.0",
15
15
  "author": "@SAP/ux-tools-team",
16
16
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "mem-fs-editor": "9.4.0",
29
29
  "qrcode": "1.5.4",
30
30
  "@sap/bas-sdk": "3.13.7",
31
- "@sap-ux/adp-tooling": "1.0.16",
31
+ "@sap-ux/adp-tooling": "1.0.17",
32
32
  "@sap-ux/btp-utils": "2.0.2",
33
33
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@1.0.5",
34
34
  "@sap-ux/feature-toggle": "1.0.2",
@@ -54,7 +54,7 @@
54
54
  "nock": "14.0.11",
55
55
  "npm-run-all2": "8.0.4",
56
56
  "supertest": "7.2.2",
57
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@1.0.23",
57
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@1.0.24",
58
58
  "@sap-ux-private/playwright": "1.0.2",
59
59
  "@sap-ux/axios-extension": "2.0.3",
60
60
  "@sap-ux/store": "2.0.1",