@sap-ux/preview-middleware 0.23.92 → 0.23.94

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.
@@ -449,7 +449,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
449
449
  continue;
450
450
  }
451
451
  return result;
452
- } catch (error) {
452
+ } catch {
453
453
  continue;
454
454
  }
455
455
  }
@@ -515,7 +515,7 @@ export class ChangeService extends EventTarget {
515
515
  continue;
516
516
  }
517
517
  return result;
518
- } catch (error) {
518
+ } catch {
519
519
  continue;
520
520
  }
521
521
  }
@@ -95,7 +95,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
95
95
  // enum values are created differently and use DataType as prototype, which only has stubs for instance functions -> getName returns undefined
96
96
  // array and base types also return undefined, but we have already handled those above
97
97
  // https://github.com/SAP/openui5/blob/203ce22763a76e28b7a422f6c635a42480f733f1/src/sap.ui.core/src/sap/ui/base/DataType.js#L430
98
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
98
+
99
99
  const name = Object.getPrototypeOf(propertyDataType).getName();
100
100
  if (!name) {
101
101
  analyzedType.primitiveType = 'enum';
@@ -111,7 +111,7 @@ function analyzePropertyType(property: ManagedObjectMetadataProperties): Analyze
111
111
  // enum values are created differently and use DataType as prototype, which only has stubs for instance functions -> getName returns undefined
112
112
  // array and base types also return undefined, but we have already handled those above
113
113
  // https://github.com/SAP/openui5/blob/203ce22763a76e28b7a422f6c635a42480f733f1/src/sap.ui.core/src/sap/ui/base/DataType.js#L430
114
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
114
+
115
115
  const name = (Object.getPrototypeOf(propertyDataType) as DataType).getName();
116
116
  if (!name) {
117
117
  analyzedType.primitiveType = 'enum';
@@ -6,7 +6,7 @@ sap.ui.define([], function () {
6
6
  class FeatureService {
7
7
  static features = {};
8
8
  static {
9
- // eslint-disable-next-line fiori-custom/sap-no-dom-access, fiori-custom/sap-browser-api-warning
9
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access, @sap-ux/fiori-tools/sap-browser-api-warning
10
10
  const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
11
11
  const features = bootstrapConfig?.dataset.openUxPreviewFeatures;
12
12
  if (features) {
@@ -2,7 +2,7 @@ export class FeatureService {
2
2
  private static features: Record<string, boolean> = {};
3
3
 
4
4
  static {
5
- // eslint-disable-next-line fiori-custom/sap-no-dom-access, fiori-custom/sap-browser-api-warning
5
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access, @sap-ux/fiori-tools/sap-browser-api-warning
6
6
  const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
7
7
  const features = bootstrapConfig?.dataset.openUxPreviewFeatures;
8
8
  if (features) {
@@ -53,7 +53,7 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
53
53
  }
54
54
  });
55
55
  this.rta.attachStop(() => {
56
- // eslint-disable-next-line fiori-custom/sap-no-location-reload
56
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
57
57
  location.reload();
58
58
  });
59
59
  this.rta.attachStart(() => {
@@ -54,7 +54,7 @@ export class RtaService {
54
54
  });
55
55
 
56
56
  this.rta.attachStop(() => {
57
- // eslint-disable-next-line fiori-custom/sap-no-location-reload
57
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
58
58
  location.reload();
59
59
  });
60
60
  this.rta.attachStart(() => {
@@ -68,12 +68,13 @@ sap.ui.define(["sap/ui/fl/LrepConnector", "sap/ui/fl/FakeLrepConnector", "../uti
68
68
  * If the minor version of the SAP UI5 is less than 72, this function extends
69
69
  * the FakeLrepConnector's prototype with specific methods and enables the fake connector.
70
70
  *
71
- * Assumes the existence of a global 'sap' object with a 'ui.version' property,
71
+ * Assumes the existence of a global 'sap' object with an 'ui.version' property,
72
72
  * and global jQuery object with 'extend' method.
73
73
  *
74
74
  * @returns {void}
75
75
  */
76
76
  var __exports = function () {
77
+ // eslint-disable-next-line no-undef
77
78
  jQuery.extend(FakeLrepConnector.prototype, {
78
79
  create,
79
80
  loadChanges,
@@ -94,12 +94,13 @@ export async function loadChanges(...args: []): Promise<LoadChangesResult> {
94
94
  * If the minor version of the SAP UI5 is less than 72, this function extends
95
95
  * the FakeLrepConnector's prototype with specific methods and enables the fake connector.
96
96
  *
97
- * Assumes the existence of a global 'sap' object with a 'ui.version' property,
97
+ * Assumes the existence of a global 'sap' object with an 'ui.version' property,
98
98
  * and global jQuery object with 'extend' method.
99
99
  *
100
100
  * @returns {void}
101
101
  */
102
102
  export default function (): void {
103
+ // eslint-disable-next-line no-undef
103
104
  jQuery.extend(FakeLrepConnector.prototype, {
104
105
  create,
105
106
  loadChanges,
@@ -358,7 +358,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
358
358
  renderer.placeAt('content');
359
359
  }
360
360
 
361
- // eslint-disable-next-line fiori-custom/sap-no-dom-access,fiori-custom/sap-browser-api-warning
361
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access,@sap-ux/fiori-tools/sap-browser-api-warning
362
362
  const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
363
363
  if (bootstrapConfig) {
364
364
  init({
@@ -399,7 +399,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
399
399
  });
400
400
  }
401
401
 
402
- // eslint-disable-next-line fiori-custom/sap-no-location-reload
402
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
403
403
  window.location.reload();
404
404
  }
405
405
  }
@@ -408,7 +408,7 @@ export async function init({
408
408
  renderer.placeAt('content');
409
409
  }
410
410
 
411
- // eslint-disable-next-line fiori-custom/sap-no-dom-access,fiori-custom/sap-browser-api-warning
411
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access,@sap-ux/fiori-tools/sap-browser-api-warning
412
412
  const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
413
413
  if (bootstrapConfig) {
414
414
  init({
@@ -442,7 +442,7 @@ export async function handleHigherLayerChanges(error: unknown, ui5VersionInfo: U
442
442
  });
443
443
  }
444
444
 
445
- // eslint-disable-next-line fiori-custom/sap-no-location-reload
445
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
446
446
  window.location.reload();
447
447
  }
448
448
  }
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.23.92",
12
+ "version": "0.23.94",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -27,12 +27,12 @@
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "qrcode": "1.5.4",
29
29
  "@sap/bas-sdk": "3.12.0",
30
- "@sap-ux/adp-tooling": "0.18.39",
30
+ "@sap-ux/adp-tooling": "0.18.41",
31
31
  "@sap-ux/btp-utils": "1.1.6",
32
32
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.7.8",
33
33
  "@sap-ux/feature-toggle": "0.3.5",
34
34
  "@sap-ux/logger": "0.8.0",
35
- "@sap-ux/project-access": "1.34.1",
35
+ "@sap-ux/project-access": "1.34.2",
36
36
  "@sap-ux/system-access": "0.6.41",
37
37
  "@sap-ux/i18n": "0.3.7"
38
38
  },
@@ -53,10 +53,10 @@
53
53
  "nock": "13.4.0",
54
54
  "npm-run-all2": "6.2.0",
55
55
  "supertest": "7.1.4",
56
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.18.9",
56
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.18.10",
57
57
  "@sap-ux/axios-extension": "1.25.6",
58
58
  "@sap-ux/store": "1.5.0",
59
- "@sap-ux/ui5-info": "0.13.7"
59
+ "@sap-ux/ui5-info": "0.13.8"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "express": "4"
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=quick-action-definition.js.map
@@ -1,132 +0,0 @@
1
- import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
2
- import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
3
- import type { FlexSettings, Manifest } from 'sap/ui/rta/RuntimeAuthoring';
4
- import type { ActionService } from 'sap/ui/rta/service/Action';
5
- import type XMLView from 'sap/ui/core/mvc/XMLView';
6
-
7
- import type {
8
- NestedQuickAction,
9
- SimpleQuickAction,
10
- NESTED_QUICK_ACTION_KIND,
11
- SIMPLE_QUICK_ACTION_KIND
12
- } from '@sap-ux-private/control-property-editor-common';
13
-
14
- import type { TextBundle } from '../../i18n';
15
- import type { ControlTreeIndex } from '../types';
16
- import type { ChangeService } from '../changes';
17
-
18
- export interface QuickActionActivationContext {
19
- controlIndex: ControlTreeIndex;
20
- actionService: ActionService;
21
- manifest: Manifest;
22
- }
23
-
24
- export interface QuickActionTelemetryData {
25
- actionName: string;
26
- telemetryEventIdentifier: string;
27
- }
28
-
29
- export interface QuickActionContext {
30
- controlIndex: ControlTreeIndex;
31
- actionService: ActionService;
32
- resourceBundle: TextBundle;
33
- view: XMLView;
34
- key: string;
35
-
36
- /**
37
- * RTA should not be used directly by quick actions.
38
- *
39
- * Currently it is only used for actions opening ADP dialogs,
40
- * but this should be removed in the future.
41
- *
42
- * @deprecated
43
- */
44
- rta: RuntimeAuthoring;
45
- flexSettings: FlexSettings;
46
- manifest: Manifest;
47
- changeService: ChangeService;
48
- }
49
-
50
- interface QuickActionDefinitionBase {
51
- /**
52
- * Used to identify between different Quick Action definitions.
53
- */
54
- readonly type: string;
55
- /**
56
- * Used to identify Quick Action instances.
57
- * All currently loaded actions must have unique ids.
58
- */
59
- readonly id: string;
60
- /**
61
- * Most actions have side effects that already triggers Quick Action reload,
62
- * however if that is not the case this property should be set to "true" to force Quick Action reload after the action is executed.
63
- */
64
- readonly forceRefreshAfterExecution?: boolean;
65
- /**
66
- * Indicates the number of user steps involved in the Quick Action flow.
67
- * This value helps distinguish between single-step and multi-step quick actions for telemetry
68
- */
69
- quickActionSteps?: number;
70
- /**
71
- * Indicates that the Quick Action is applicable to the given context and should be displayed.
72
- */
73
- isApplicable: boolean;
74
- /**
75
- * Initializes the action and checks if it should be displayed in current context.
76
- */
77
- initialize: () => void | Promise<void>;
78
- /**
79
- * Runs enablement validators to check if the action should be enabled.
80
- */
81
- runEnablementValidators: () => void | Promise<void>;
82
- /**
83
- * This method returns an identifier for telemetry used for grouping multiple events and differentiating
84
- * between quick actions and other triggering points for fragment creation.
85
- * @params update - flag for updating timestamp
86
- */
87
- getTelemetryIdentifier: (update?: boolean) => string | undefined;
88
- }
89
-
90
- export interface SimpleQuickActionDefinition extends QuickActionDefinitionBase {
91
- readonly kind: typeof SIMPLE_QUICK_ACTION_KIND;
92
- /**
93
- * Creates a UI representation object for the action.
94
- *
95
- * @returns UI representation object for the action.
96
- */
97
- getActionObject: () => SimpleQuickAction;
98
-
99
- /**
100
- * Executes the Quick Action.
101
- */
102
- execute: () => FlexCommand[] | Promise<FlexCommand[]>;
103
- }
104
-
105
- export interface NestedQuickActionDefinition extends QuickActionDefinitionBase {
106
- readonly kind: typeof NESTED_QUICK_ACTION_KIND;
107
-
108
- /**
109
- * Creates a UI representation object for the action.
110
- *
111
- * @returns UI representation object for the action.
112
- */
113
- getActionObject: () => NestedQuickAction;
114
- /**
115
- * Executes the Quick Action.
116
- *
117
- * @param path - Path to the specific child action that needs to be executed (e.g '0/1').
118
- */
119
- execute: (path: string) => FlexCommand[] | Promise<FlexCommand[]>;
120
- }
121
- export type QuickActionDefinition = SimpleQuickActionDefinition | NestedQuickActionDefinition;
122
-
123
- export interface QuickActionDefinitionConstructor<T extends QuickActionDefinition> {
124
- new (context: QuickActionContext): T;
125
- }
126
-
127
- export interface QuickActionDefinitionGroup {
128
- title: string;
129
- definitions: QuickActionDefinitionConstructor<QuickActionDefinition>[];
130
- view: XMLView;
131
- key: string;
132
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=types.js.map
@@ -1,47 +0,0 @@
1
- import type { ExternalAction, OutlineNode } from '@sap-ux-private/control-property-editor-common';
2
- import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
3
-
4
- export interface UI5AdaptationOptions {
5
- rta: RuntimeAuthoring;
6
- }
7
-
8
- export type PrimitiveTypes = 'boolean' | 'enum' | 'float' | 'string' | 'any';
9
- export type PropertyValue = boolean | object | number | string;
10
-
11
- export interface UI5ControlProperty {
12
- defaultValue: unknown;
13
- enumValues: Record<string, string> | undefined;
14
- isArray: boolean;
15
- isDeprecated: boolean;
16
- isEnabled: boolean;
17
- isIcon: boolean;
18
- name: string;
19
- primitiveType: string;
20
- ui5Type: string | null;
21
- value: PropertyValue;
22
- }
23
-
24
- export interface UI5ControlData {
25
- allowIndexForDefaultAggregation: boolean;
26
- defaultAggregation: string;
27
- id: string;
28
- properties: UI5ControlProperty[];
29
- selectedControlChildren: string[];
30
- selectedControlName: string;
31
- targetAggregation: string[];
32
- type: string;
33
- }
34
-
35
- export type ActionHandler = (action: ExternalAction) => void | Promise<void>;
36
- export type ActionSenderFunction = (action: ExternalAction) => void;
37
- export type SubscribeFunction = (handler: ActionHandler) => void;
38
- export type UnSubscribeFunction = (handler: ActionHandler) => void;
39
- export type IsReuseComponentApi = (controlId: string) => boolean;
40
-
41
- export interface Service {
42
- init(sendAction: ActionSenderFunction, subscribe: SubscribeFunction): void | Promise<void>;
43
- }
44
-
45
- export interface ControlTreeIndex {
46
- [controlType: string]: OutlineNode[];
47
- }