@sap-ux/preview-middleware 0.17.45 → 0.17.46

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.
@@ -77,12 +77,19 @@ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../dialog
77
77
  getHeaderToolbar(table) {
78
78
  let headerToolbar;
79
79
  if (isA(SMART_TABLE_TYPE, table)) {
80
- headerToolbar = table.getAggregation('items').find(item => {
80
+ for (const item of table.getAggregation('items')) {
81
81
  if (item.getAggregation('headerToolbar')) {
82
- return true;
82
+ headerToolbar = item.getAggregation('headerToolbar');
83
+ break;
83
84
  }
84
- return isA('sap.m.OverflowToolbar', item);
85
- });
85
+ if (isA('sap.m.OverflowToolbar', item)) {
86
+ headerToolbar = item;
87
+ break;
88
+ }
89
+ }
90
+ if (!headerToolbar) {
91
+ headerToolbar = table.getToolbar();
92
+ }
86
93
  } else if (isA(M_TABLE_TYPE, table)) {
87
94
  headerToolbar = table.getAggregation('headerToolbar');
88
95
  }
@@ -83,12 +83,19 @@ export class AddTableActionQuickAction extends TableQuickActionDefinitionBase im
83
83
  getHeaderToolbar(table: UI5Element): ManagedObject | ManagedObject[] | OverflowToolbar | null | undefined {
84
84
  let headerToolbar;
85
85
  if (isA<SmartTable>(SMART_TABLE_TYPE, table)) {
86
- headerToolbar = (table.getAggregation('items') as ManagedObject[]).find((item) => {
86
+ for (const item of table.getAggregation('items') as ManagedObject[]) {
87
87
  if (item.getAggregation('headerToolbar')) {
88
- return true;
88
+ headerToolbar = item.getAggregation('headerToolbar');
89
+ break;
89
90
  }
90
- return isA<OverflowToolbar>('sap.m.OverflowToolbar', item);
91
- });
91
+ if (isA<OverflowToolbar>('sap.m.OverflowToolbar', item)) {
92
+ headerToolbar = item;
93
+ break;
94
+ }
95
+ }
96
+ if (!headerToolbar) {
97
+ headerToolbar = table.getToolbar();
98
+ }
92
99
  } else if (isA<Table>(M_TABLE_TYPE, table)) {
93
100
  headerToolbar = table.getAggregation('headerToolbar');
94
101
  }
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.45",
12
+ "version": "0.17.46",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -27,9 +27,9 @@
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "@sap-ux/logger": "0.6.0",
29
29
  "@sap-ux/feature-toggle": "0.2.3",
30
- "@sap-ux/btp-utils": "1.0.1",
31
30
  "@sap-ux/adp-tooling": "0.12.136",
32
31
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.37",
32
+ "@sap-ux/btp-utils": "1.0.1",
33
33
  "@sap-ux/project-access": "1.29.8"
34
34
  },
35
35
  "devDependencies": {
@@ -48,7 +48,7 @@
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.67",
51
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.68",
52
52
  "@sap-ux/axios-extension": "1.18.6",
53
53
  "@sap-ux/store": "1.0.0",
54
54
  "@sap-ux/ui5-info": "0.8.3",