@sap-ux/preview-middleware 0.13.21 → 0.13.22

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/dist/base/flp.js CHANGED
@@ -573,10 +573,7 @@ function initAdp(rootProject, config, flp, util, logger) {
573
573
  const layer = yield adp.init(variant);
574
574
  if (flp.rta) {
575
575
  flp.rta.layer = layer;
576
- flp.rta.options = {
577
- projectId: variant.id,
578
- scenario: 'ADAPTATION_PROJECT'
579
- };
576
+ flp.rta.options = Object.assign(Object.assign({}, flp.rta.options), { projectId: variant.id, scenario: 'ADAPTATION_PROJECT' });
580
577
  for (const editor of flp.rta.editors) {
581
578
  (_a = editor.pluginScript) !== null && _a !== void 0 ? _a : (editor.pluginScript = 'open/ux/preview/client/adp/init');
582
579
  }
@@ -28,11 +28,16 @@ sap.ui.define([
28
28
  const initDialogs = ___init_dialogs['initDialogs'];
29
29
  const showMessage = ___sap_ux_private_control_property_editor_common['showMessage'];
30
30
  const startPostMessageCommunication = ___sap_ux_private_control_property_editor_common['startPostMessageCommunication'];
31
+ const enableTelemetry = ___sap_ux_private_control_property_editor_common['enableTelemetry'];
31
32
  const getUI5VersionValidationMessage = ___ui5_version_utils['getUI5VersionValidationMessage'];
32
33
  var __exports = async function (rta) {
33
34
  const {version} = await VersionInfo.load();
34
35
  const versionParts = version.split('.');
35
36
  const minor = parseInt(versionParts[1], 10);
37
+ const flexSettings = rta.getFlexSettings();
38
+ if (flexSettings.telemetry === true) {
39
+ enableTelemetry();
40
+ }
36
41
  const actionHandlers = [];
37
42
  function subscribe(handler) {
38
43
  actionHandlers.push(handler);
@@ -6,7 +6,8 @@ import { initDialogs } from './init-dialogs';
6
6
  import {
7
7
  ExternalAction,
8
8
  showMessage,
9
- startPostMessageCommunication
9
+ startPostMessageCommunication,
10
+ enableTelemetry
10
11
  } from '@sap-ux-private/control-property-editor-common';
11
12
 
12
13
  import { ActionHandler } from '../cpe/types';
@@ -17,7 +18,10 @@ export default async function (rta: RuntimeAuthoring) {
17
18
  const { version } = (await VersionInfo.load()) as { version: string };
18
19
  const versionParts = version.split('.');
19
20
  const minor = parseInt(versionParts[1], 10);
20
-
21
+ const flexSettings = rta.getFlexSettings();
22
+ if (flexSettings.telemetry === true) {
23
+ enableTelemetry();
24
+ }
21
25
  const actionHandlers: ActionHandler[] = [];
22
26
  /**
23
27
  *
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.13.21",
12
+ "version": "0.13.22",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -44,8 +44,8 @@
44
44
  "supertest": "6.3.3",
45
45
  "@sap-ux-private/playwright": "0.0.3",
46
46
  "dotenv": "16.3.1",
47
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.9.6",
48
47
  "@sap-ux/axios-extension": "1.11.7",
48
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.9.7",
49
49
  "@sap-ux/store": "0.5.0",
50
50
  "@sap-ux/i18n": "0.0.6"
51
51
  },