@sap-ux/preview-middleware 0.16.80 → 0.16.81

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 (48) hide show
  1. package/dist/client/adp/api-handler.js +142 -142
  2. package/dist/client/adp/command-executor.js +58 -58
  3. package/dist/client/adp/control-utils.js +44 -44
  4. package/dist/client/adp/controllers/AddFragment.controller.js +5 -1
  5. package/dist/client/adp/controllers/AddFragment.controller.ts +5 -1
  6. package/dist/client/adp/controllers/BaseDialog.controller.js +105 -105
  7. package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
  8. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  9. package/dist/client/adp/init-dialogs.js +159 -159
  10. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +54 -54
  11. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +35 -35
  12. package/dist/client/adp/quick-actions/common/op-add-header-field.js +47 -47
  13. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +98 -98
  14. package/dist/client/adp/quick-actions/fe-v2/create-page-action.js +35 -35
  15. package/dist/client/adp/quick-actions/fe-v2/create-page-action.ts +2 -2
  16. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +69 -69
  17. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +57 -57
  18. package/dist/client/adp/quick-actions/fe-v2/registry.js +60 -60
  19. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +79 -79
  20. package/dist/client/adp/quick-actions/fe-v4/registry.js +50 -50
  21. package/dist/client/adp/quick-actions/fe-v4/utils.js +52 -52
  22. package/dist/client/adp/quick-actions/load.js +48 -48
  23. package/dist/client/adp/utils.js +160 -160
  24. package/dist/client/cpe/changes/flex-change.js +51 -51
  25. package/dist/client/cpe/changes/index.js +10 -10
  26. package/dist/client/cpe/changes/validator.js +34 -34
  27. package/dist/client/cpe/documentation.js +164 -164
  28. package/dist/client/cpe/logger.js +30 -30
  29. package/dist/client/cpe/outline/editable.js +37 -37
  30. package/dist/client/cpe/outline/nodes.js +187 -187
  31. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  32. package/dist/client/cpe/quick-actions/registry.js +143 -143
  33. package/dist/client/cpe/quick-actions/utils.js +92 -92
  34. package/dist/client/cpe/types.js +4 -4
  35. package/dist/client/cpe/ui5-utils.js +33 -33
  36. package/dist/client/cpe/utils.js +97 -97
  37. package/dist/client/flp/WorkspaceConnector.js +87 -87
  38. package/dist/client/flp/common.js +28 -28
  39. package/dist/client/flp/enableFakeConnector.js +84 -84
  40. package/dist/client/flp/initConnectors.js +30 -30
  41. package/dist/client/flp/initRta.js +178 -178
  42. package/dist/client/i18n.js +56 -56
  43. package/dist/client/tsconfig.tsbuildinfo +1 -1
  44. package/dist/client/utils/application.js +32 -32
  45. package/dist/client/utils/core.js +68 -68
  46. package/dist/client/utils/error.js +19 -19
  47. package/dist/client/utils/version.js +68 -68
  48. package/package.json +4 -4
@@ -1,70 +1,70 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/core/Component", "sap/ui/core/Element"], function (Component, Element) {
4
- "use strict";
5
-
6
- /**
7
- * Gets Component by id.
8
- *
9
- * @param id - unique identifier for control
10
- * @returns Component | undefined
11
- */
12
- function getComponent(id) {
13
- if (Component?.getComponentById) {
14
- return Component.getComponentById(id);
15
- } else if (Component?.get) {
16
- // Older version must be still supported until maintenance period.
17
- return Component.get(id); // NOSONAR
18
- } else {
19
- // Older version must be still supported until maintenance period.
20
- return sap.ui.getCore().getComponent(id); // NOSONAR
21
- }
22
- }
23
-
24
- /**
25
- * Returns control by its global ID.
26
- *
27
- * @param id Id of the control.
28
- * @returns Control instance if it exists.
29
- */
30
- function getControlById(id) {
31
- if (typeof Element.getElementById === 'function') {
32
- return Element.getElementById(id);
33
- } else {
34
- return sap.ui.getCore().byId(id);
35
- }
36
- }
37
-
38
- /**
39
- * Checks wether this object is an instance of a ManagedObject.
40
- *
41
- * @param element An object.
42
- * @returns True if element is an instance of a ManagedObject.
43
- */
44
- function isManagedObject(element) {
45
- if (typeof element?.isA === 'function') {
46
- return element.isA('sap.ui.base.ManagedObject');
47
- }
48
- return false;
49
- }
50
-
51
- /**
52
- * Checks whether this object is an instance of the named type.
53
- *
54
- * @param type - Type to check for.
55
- * @param element - Object to check
56
- * @returns Whether this object is an instance of the given type.
57
- */
58
- function isA(type, element) {
59
- return !!element?.isA(type);
60
- }
61
- var __exports = {
62
- __esModule: true
63
- };
64
- __exports.getComponent = getComponent;
65
- __exports.getControlById = getControlById;
66
- __exports.isManagedObject = isManagedObject;
67
- __exports.isA = isA;
68
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/core/Component", "sap/ui/core/Element"], function (Component, Element) {
4
+ "use strict";
5
+
6
+ /**
7
+ * Gets Component by id.
8
+ *
9
+ * @param id - unique identifier for control
10
+ * @returns Component | undefined
11
+ */
12
+ function getComponent(id) {
13
+ if (Component?.getComponentById) {
14
+ return Component.getComponentById(id);
15
+ } else if (Component?.get) {
16
+ // Older version must be still supported until maintenance period.
17
+ return Component.get(id); // NOSONAR
18
+ } else {
19
+ // Older version must be still supported until maintenance period.
20
+ return sap.ui.getCore().getComponent(id); // NOSONAR
21
+ }
22
+ }
23
+
24
+ /**
25
+ * Returns control by its global ID.
26
+ *
27
+ * @param id Id of the control.
28
+ * @returns Control instance if it exists.
29
+ */
30
+ function getControlById(id) {
31
+ if (typeof Element.getElementById === 'function') {
32
+ return Element.getElementById(id);
33
+ } else {
34
+ return sap.ui.getCore().byId(id);
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Checks wether this object is an instance of a ManagedObject.
40
+ *
41
+ * @param element An object.
42
+ * @returns True if element is an instance of a ManagedObject.
43
+ */
44
+ function isManagedObject(element) {
45
+ if (typeof element?.isA === 'function') {
46
+ return element.isA('sap.ui.base.ManagedObject');
47
+ }
48
+ return false;
49
+ }
50
+
51
+ /**
52
+ * Checks whether this object is an instance of the named type.
53
+ *
54
+ * @param type - Type to check for.
55
+ * @param element - Object to check
56
+ * @returns Whether this object is an instance of the given type.
57
+ */
58
+ function isA(type, element) {
59
+ return !!element?.isA(type);
60
+ }
61
+ var __exports = {
62
+ __esModule: true
63
+ };
64
+ __exports.getComponent = getComponent;
65
+ __exports.getControlById = getControlById;
66
+ __exports.isManagedObject = isManagedObject;
67
+ __exports.isA = isA;
68
+ return __exports;
69
69
  });
70
70
  //# sourceMappingURL=core.js.map
@@ -1,21 +1,21 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- /**
7
- * Returns the Error if the error is an instance of `Error` otherwise a new Error instance with string representation of the error.
8
- *
9
- * @param error {unknown} - the error instance
10
- * @returns {Error} the error
11
- */
12
- function getError(error) {
13
- return error instanceof Error ? error : new Error(JSON.stringify(error));
14
- }
15
- var __exports = {
16
- __esModule: true
17
- };
18
- __exports.getError = getError;
19
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Returns the Error if the error is an instance of `Error` otherwise a new Error instance with string representation of the error.
8
+ *
9
+ * @param error {unknown} - the error instance
10
+ * @returns {Error} the error
11
+ */
12
+ function getError(error) {
13
+ return error instanceof Error ? error : new Error(JSON.stringify(error));
14
+ }
15
+ var __exports = {
16
+ __esModule: true
17
+ };
18
+ __exports.getError = getError;
19
+ return __exports;
20
20
  });
21
21
  //# sourceMappingURL=error.js.map
@@ -1,70 +1,70 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log"], function (VersionInfo, Log) {
4
- "use strict";
5
-
6
- /**
7
- * Default minimal supported UI5 version
8
- */
9
- const minVersionInfo = {
10
- major: 1,
11
- minor: 71
12
- };
13
-
14
- /**
15
- * Retrieve the UI5 version from sap.ui.core library
16
- *
17
- * @returns Ui5VersionInfo
18
- */
19
- async function getUi5Version() {
20
- let version = (await VersionInfo.load({
21
- library: 'sap.ui.core'
22
- }))?.version;
23
- if (!version) {
24
- Log.error('Could not get UI5 version of application. Using 1.121.0 as fallback.');
25
- version = '1.121.0';
26
- }
27
- const [major, minor] = version.split('.').map(versionPart => parseInt(versionPart, 10));
28
- return {
29
- major: major,
30
- minor: minor
31
- };
32
- }
33
-
34
- /**
35
- * Checks if the given version is lower than the required minimal version.
36
- * @param ui5VersionInfo to check
37
- * @param minUi5VersionInfo to check against (default is 1.71)
38
- *
39
- * @returns boolean
40
- */
41
- function isLowerThanMinimalUi5Version(ui5VersionInfo) {
42
- let minUi5VersionInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : minVersionInfo;
43
- if (!isNaN(ui5VersionInfo.major) && !isNaN(ui5VersionInfo.minor)) {
44
- if (ui5VersionInfo.major < minUi5VersionInfo.major) {
45
- return true;
46
- }
47
- if (ui5VersionInfo.major === minUi5VersionInfo.major && ui5VersionInfo.minor < minUi5VersionInfo.minor) {
48
- return true;
49
- }
50
- }
51
- return false;
52
- }
53
-
54
- /**
55
- * Get UI5 version validation message.
56
- * @param ui5VersionInfo to be mentioned in the message
57
- * @returns string with validation message.
58
- */
59
- function getUI5VersionValidationMessage(ui5VersionInfo) {
60
- return `The current SAPUI5 version set for this Adaptation project is ${ui5VersionInfo.major}.${ui5VersionInfo.minor}. The minimum version to use for SAPUI5 Adaptation Project and its SAPUI5 Visual Editor is ${minVersionInfo.major}.${minVersionInfo.minor}`;
61
- }
62
- var __exports = {
63
- __esModule: true
64
- };
65
- __exports.getUi5Version = getUi5Version;
66
- __exports.isLowerThanMinimalUi5Version = isLowerThanMinimalUi5Version;
67
- __exports.getUI5VersionValidationMessage = getUI5VersionValidationMessage;
68
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log"], function (VersionInfo, Log) {
4
+ "use strict";
5
+
6
+ /**
7
+ * Default minimal supported UI5 version
8
+ */
9
+ const minVersionInfo = {
10
+ major: 1,
11
+ minor: 71
12
+ };
13
+
14
+ /**
15
+ * Retrieve the UI5 version from sap.ui.core library
16
+ *
17
+ * @returns Ui5VersionInfo
18
+ */
19
+ async function getUi5Version() {
20
+ let version = (await VersionInfo.load({
21
+ library: 'sap.ui.core'
22
+ }))?.version;
23
+ if (!version) {
24
+ Log.error('Could not get UI5 version of application. Using 1.121.0 as fallback.');
25
+ version = '1.121.0';
26
+ }
27
+ const [major, minor] = version.split('.').map(versionPart => parseInt(versionPart, 10));
28
+ return {
29
+ major: major,
30
+ minor: minor
31
+ };
32
+ }
33
+
34
+ /**
35
+ * Checks if the given version is lower than the required minimal version.
36
+ * @param ui5VersionInfo to check
37
+ * @param minUi5VersionInfo to check against (default is 1.71)
38
+ *
39
+ * @returns boolean
40
+ */
41
+ function isLowerThanMinimalUi5Version(ui5VersionInfo) {
42
+ let minUi5VersionInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : minVersionInfo;
43
+ if (!isNaN(ui5VersionInfo.major) && !isNaN(ui5VersionInfo.minor)) {
44
+ if (ui5VersionInfo.major < minUi5VersionInfo.major) {
45
+ return true;
46
+ }
47
+ if (ui5VersionInfo.major === minUi5VersionInfo.major && ui5VersionInfo.minor < minUi5VersionInfo.minor) {
48
+ return true;
49
+ }
50
+ }
51
+ return false;
52
+ }
53
+
54
+ /**
55
+ * Get UI5 version validation message.
56
+ * @param ui5VersionInfo to be mentioned in the message
57
+ * @returns string with validation message.
58
+ */
59
+ function getUI5VersionValidationMessage(ui5VersionInfo) {
60
+ return `The current SAPUI5 version set for this Adaptation project is ${ui5VersionInfo.major}.${ui5VersionInfo.minor}. The minimum version to use for SAPUI5 Adaptation Project and its SAPUI5 Visual Editor is ${minVersionInfo.major}.${minVersionInfo.minor}`;
61
+ }
62
+ var __exports = {
63
+ __esModule: true
64
+ };
65
+ __exports.getUi5Version = getUi5Version;
66
+ __exports.isLowerThanMinimalUi5Version = isLowerThanMinimalUi5Version;
67
+ __exports.getUI5VersionValidationMessage = getUI5VersionValidationMessage;
68
+ return __exports;
69
69
  });
70
70
  //# sourceMappingURL=version.js.map
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.16.80",
12
+ "version": "0.16.81",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -26,9 +26,9 @@
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "@sap-ux/logger": "0.6.0",
29
- "@sap-ux/btp-utils": "0.15.2",
30
29
  "@sap-ux/adp-tooling": "0.12.55",
31
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.14",
30
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.15",
31
+ "@sap-ux/btp-utils": "0.15.2",
32
32
  "@sap-ux/project-access": "1.27.5"
33
33
  },
34
34
  "devDependencies": {
@@ -45,7 +45,7 @@
45
45
  "supertest": "6.3.3",
46
46
  "@sap-ux-private/playwright": "0.1.0",
47
47
  "dotenv": "16.3.1",
48
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.12",
48
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.13",
49
49
  "@sap-ux/axios-extension": "1.16.6",
50
50
  "@sap-ux/store": "0.9.2",
51
51
  "@sap-ux/ui5-info": "0.8.1",