@sap-ux/preview-middleware 0.19.21 → 0.19.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.
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +2 -0
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +3 -4
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +3 -1
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +3 -1
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +3 -1
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +3 -1
- package/dist/client/adp/quick-actions/table-quick-action-base.js +14 -11
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +14 -14
- package/package.json +6 -6
|
@@ -63,6 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
const {annotationExistsInWS} = source.annotationDetails;
|
|
64
64
|
if (source.metadataReadErrorMsg) {
|
|
65
65
|
this.children.push({
|
|
66
|
+
path: this.children.length.toString(),
|
|
66
67
|
enabled: false,
|
|
67
68
|
tooltip: source.metadataReadErrorMsg,
|
|
68
69
|
label: this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
@@ -70,6 +71,7 @@ sap.ui.define([
|
|
|
70
71
|
});
|
|
71
72
|
} else {
|
|
72
73
|
this.children.push({
|
|
74
|
+
path: this.children.length.toString(),
|
|
73
75
|
enabled: true,
|
|
74
76
|
label: annotationExistsInWS ? this.context.resourceBundle.getText('SHOW_ANNOTATION_FILE', [key]) : this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
75
77
|
children: []
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
QuickActionContext,
|
|
5
|
-
NestedQuickActionDefinition
|
|
6
|
-
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
3
|
+
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
7
4
|
import type { AnnotationDataSourceResponse } from '../../api-handler';
|
|
8
5
|
import { getDataSourceAnnotationFileMap } from '../../api-handler';
|
|
9
6
|
import {
|
|
@@ -65,6 +62,7 @@ export class AddNewAnnotationFile
|
|
|
65
62
|
const { annotationExistsInWS } = source.annotationDetails;
|
|
66
63
|
if (source.metadataReadErrorMsg) {
|
|
67
64
|
this.children.push({
|
|
65
|
+
path: this.children.length.toString(),
|
|
68
66
|
enabled: false,
|
|
69
67
|
tooltip: source.metadataReadErrorMsg,
|
|
70
68
|
label: this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
@@ -72,6 +70,7 @@ export class AddNewAnnotationFile
|
|
|
72
70
|
});
|
|
73
71
|
} else {
|
|
74
72
|
this.children.push({
|
|
73
|
+
path: this.children.length.toString(),
|
|
75
74
|
enabled: true,
|
|
76
75
|
label: annotationExistsInWS
|
|
77
76
|
? this.context.resourceBundle.getText('SHOW_ANNOTATION_FILE', [key])
|
|
@@ -29,12 +29,14 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI"
|
|
|
29
29
|
const actions = await this.context.actionService.get(smartTable.getId());
|
|
30
30
|
const changeColumnAction = actions.find(action => action.id === ACTION_ID);
|
|
31
31
|
if (changeColumnAction) {
|
|
32
|
+
const path = this.children.length.toString();
|
|
32
33
|
this.children.push({
|
|
34
|
+
path,
|
|
33
35
|
label: `'${smartTable.getHeader()}' table`,
|
|
34
36
|
enabled: true,
|
|
35
37
|
children: []
|
|
36
38
|
});
|
|
37
|
-
this.tableMap[
|
|
39
|
+
this.tableMap[path] = {
|
|
38
40
|
table: smartTable,
|
|
39
41
|
tableUpdateEventAttachedOnce: false
|
|
40
42
|
};
|
|
@@ -39,12 +39,14 @@ export class ChangeTableColumnsQuickAction
|
|
|
39
39
|
const actions = await this.context.actionService.get(smartTable.getId());
|
|
40
40
|
const changeColumnAction = actions.find((action) => action.id === ACTION_ID);
|
|
41
41
|
if (changeColumnAction) {
|
|
42
|
+
const path = this.children.length.toString();
|
|
42
43
|
this.children.push({
|
|
44
|
+
path,
|
|
43
45
|
label: `'${(smartTable as Table).getHeader()}' table`,
|
|
44
46
|
enabled: true,
|
|
45
47
|
children: []
|
|
46
48
|
});
|
|
47
|
-
this.tableMap[
|
|
49
|
+
this.tableMap[path] = {
|
|
48
50
|
table: smartTable,
|
|
49
51
|
tableUpdateEventAttachedOnce: false
|
|
50
52
|
};
|
|
@@ -32,13 +32,15 @@ sap.ui.define(["../table-quick-action-base", "../../../cpe/quick-actions/utils",
|
|
|
32
32
|
const personalizationData = smartTable.getP13nMode();
|
|
33
33
|
const value = this.context.changeService.getConfigurationPropertyValue(smartTable.getId(), 'personalization');
|
|
34
34
|
const isFilterEnabled = value?.filter === undefined ? personalizationData.includes('Filter') : value.filter;
|
|
35
|
+
const path = this.children.length.toString();
|
|
35
36
|
this.children.push({
|
|
37
|
+
path,
|
|
36
38
|
label: `'${smartTable.getHeader()}' table`,
|
|
37
39
|
enabled: !isFilterEnabled,
|
|
38
40
|
tooltip: isFilterEnabled ? tooltipText : undefined,
|
|
39
41
|
children: []
|
|
40
42
|
});
|
|
41
|
-
this.tableMap[
|
|
43
|
+
this.tableMap[path] = {
|
|
42
44
|
table: smartTable,
|
|
43
45
|
tableUpdateEventAttachedOnce: false
|
|
44
46
|
};
|
|
@@ -48,13 +48,15 @@ export class EnableTableFilteringQuickAction
|
|
|
48
48
|
'personalization'
|
|
49
49
|
) as Personalization;
|
|
50
50
|
const isFilterEnabled = value?.filter === undefined ? personalizationData.includes('Filter') : value.filter;
|
|
51
|
+
const path = this.children.length.toString();
|
|
51
52
|
this.children.push({
|
|
53
|
+
path,
|
|
52
54
|
label: `'${(smartTable as Table).getHeader()}' table`,
|
|
53
55
|
enabled: !isFilterEnabled,
|
|
54
56
|
tooltip: isFilterEnabled ? tooltipText : undefined,
|
|
55
57
|
children: []
|
|
56
58
|
});
|
|
57
|
-
this.tableMap[
|
|
59
|
+
this.tableMap[path] = {
|
|
58
60
|
table: smartTable,
|
|
59
61
|
tableUpdateEventAttachedOnce: false
|
|
60
62
|
};
|
|
@@ -99,9 +99,9 @@ sap.ui.define([
|
|
|
99
99
|
await this.collectChildrenInSection(section, table);
|
|
100
100
|
} else if (this.iconTabBar && tabKey) {
|
|
101
101
|
const label = `'${ iconTabBarfilterMap[tabKey] }' table`;
|
|
102
|
-
const
|
|
102
|
+
const tableMapKey = this.children.length.toString();
|
|
103
|
+
const child = this.createChild(label, table, tableMapKey);
|
|
103
104
|
this.children.push(child);
|
|
104
|
-
const tableMapKey = `${ this.children.length - 1 }`;
|
|
105
105
|
this.tableMap[tableMapKey] = {
|
|
106
106
|
table,
|
|
107
107
|
iconTabBarFilterKey: tabKey,
|
|
@@ -140,9 +140,9 @@ sap.ui.define([
|
|
|
140
140
|
return `'${ header }' table`;
|
|
141
141
|
}
|
|
142
142
|
} else if (isA(M_TABLE_TYPE, table)) {
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
return `'${
|
|
143
|
+
const title = table?.getHeaderToolbar()?.getTitleControl()?.getText();
|
|
144
|
+
if (title) {
|
|
145
|
+
return `'${ title }' table`;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
return 'Unnamed table';
|
|
@@ -178,17 +178,19 @@ sap.ui.define([
|
|
|
178
178
|
const existingChildIdx = this.children.findIndex(val => val.label === `'${ section.getTitle() }' section`);
|
|
179
179
|
let tableMapIndex;
|
|
180
180
|
const label = this.getTableLabel(table);
|
|
181
|
-
const child = this.createChild(label, table);
|
|
182
181
|
if (existingChildIdx < 0) {
|
|
182
|
+
tableMapIndex = `${ this.children.length }/0`;
|
|
183
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
183
184
|
this.children.push({
|
|
185
|
+
path: this.children.length.toString(),
|
|
184
186
|
label: `'${ section?.getTitle() }' section`,
|
|
185
187
|
enabled: true,
|
|
186
188
|
children: [child]
|
|
187
189
|
});
|
|
188
|
-
tableMapIndex = `${ this.children.length - 1 }/0`;
|
|
189
190
|
} else {
|
|
191
|
+
tableMapIndex = `${ existingChildIdx }/${ this.children[existingChildIdx].children.length }`;
|
|
192
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
190
193
|
this.children[existingChildIdx].children.push(child);
|
|
191
|
-
tableMapIndex = `${ existingChildIdx.toFixed(0) }/${ this.children[existingChildIdx].children.length - 1 }`;
|
|
192
194
|
}
|
|
193
195
|
this.tableMap[tableMapIndex] = {
|
|
194
196
|
table,
|
|
@@ -204,6 +206,7 @@ sap.ui.define([
|
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
async processTable(table, sectionInfo) {
|
|
209
|
+
const tableMapKey = this.children.length.toString();
|
|
207
210
|
if ([
|
|
208
211
|
SMART_TABLE_TYPE,
|
|
209
212
|
M_TABLE_TYPE,
|
|
@@ -213,10 +216,9 @@ sap.ui.define([
|
|
|
213
216
|
ANALYTICAL_TABLE_TYPE
|
|
214
217
|
].some(type => isA(type, table))) {
|
|
215
218
|
const label = this.getTableLabel(table);
|
|
216
|
-
const child = this.createChild(label, table);
|
|
219
|
+
const child = this.createChild(label, table, tableMapKey);
|
|
217
220
|
this.children.push(child);
|
|
218
221
|
}
|
|
219
|
-
const tableMapKey = `${ this.children.length - 1 }`;
|
|
220
222
|
this.tableMap[tableMapKey] = {
|
|
221
223
|
table,
|
|
222
224
|
sectionInfo: sectionInfo,
|
|
@@ -240,8 +242,9 @@ sap.ui.define([
|
|
|
240
242
|
children: this.children
|
|
241
243
|
};
|
|
242
244
|
}
|
|
243
|
-
createChild(label, table) {
|
|
245
|
+
createChild(label, table, path) {
|
|
244
246
|
const child = {
|
|
247
|
+
path,
|
|
245
248
|
label,
|
|
246
249
|
enabled: true,
|
|
247
250
|
children: []
|
|
@@ -148,9 +148,9 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
148
148
|
await this.collectChildrenInSection(section, table);
|
|
149
149
|
} else if (this.iconTabBar && tabKey) {
|
|
150
150
|
const label = `'${iconTabBarfilterMap[tabKey]}' table`;
|
|
151
|
-
const
|
|
151
|
+
const tableMapKey = this.children.length.toString();
|
|
152
|
+
const child = this.createChild(label, table, tableMapKey);
|
|
152
153
|
this.children.push(child);
|
|
153
|
-
const tableMapKey = `${this.children.length - 1}`;
|
|
154
154
|
this.tableMap[tableMapKey] = {
|
|
155
155
|
table,
|
|
156
156
|
iconTabBarFilterKey: tabKey,
|
|
@@ -202,9 +202,9 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
202
202
|
return `'${header}' table`;
|
|
203
203
|
}
|
|
204
204
|
} else if (isA<Table>(M_TABLE_TYPE, table)) {
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
return `'${
|
|
205
|
+
const title = table?.getHeaderToolbar()?.getTitleControl()?.getText();
|
|
206
|
+
if (title) {
|
|
207
|
+
return `'${title}' table`;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -255,20 +255,19 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
255
255
|
);
|
|
256
256
|
let tableMapIndex;
|
|
257
257
|
const label = this.getTableLabel(table);
|
|
258
|
-
const child = this.createChild(label, table);
|
|
259
258
|
if (existingChildIdx < 0) {
|
|
259
|
+
tableMapIndex = `${this.children.length}/0`;
|
|
260
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
260
261
|
this.children.push({
|
|
262
|
+
path: this.children.length.toString(),
|
|
261
263
|
label: `'${section?.getTitle()}' section`,
|
|
262
264
|
enabled: true,
|
|
263
265
|
children: [child]
|
|
264
266
|
});
|
|
265
|
-
|
|
266
|
-
tableMapIndex = `${this.children.length - 1}/0`;
|
|
267
267
|
} else {
|
|
268
|
+
tableMapIndex = `${existingChildIdx}/${this.children[existingChildIdx].children.length}`;
|
|
269
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
268
270
|
this.children[existingChildIdx].children.push(child);
|
|
269
|
-
tableMapIndex = `${existingChildIdx.toFixed(0)}/${
|
|
270
|
-
this.children[existingChildIdx].children.length - 1
|
|
271
|
-
}`;
|
|
272
271
|
}
|
|
273
272
|
|
|
274
273
|
this.tableMap[tableMapIndex] = {
|
|
@@ -290,6 +289,7 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
290
289
|
table: UI5Element,
|
|
291
290
|
sectionInfo?: { section: ObjectPageSection; subSection: ObjectPageSubSection; layout?: ObjectPageLayout }
|
|
292
291
|
): Promise<void> {
|
|
292
|
+
const tableMapKey = this.children.length.toString();
|
|
293
293
|
if (
|
|
294
294
|
[
|
|
295
295
|
SMART_TABLE_TYPE,
|
|
@@ -301,11 +301,10 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
301
301
|
].some((type) => isA(type, table))
|
|
302
302
|
) {
|
|
303
303
|
const label = this.getTableLabel(table);
|
|
304
|
-
const child = this.createChild(label, table);
|
|
304
|
+
const child = this.createChild(label, table, tableMapKey);
|
|
305
305
|
this.children.push(child);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
const tableMapKey = `${this.children.length - 1}`;
|
|
309
308
|
this.tableMap[tableMapKey] = {
|
|
310
309
|
table,
|
|
311
310
|
sectionInfo: sectionInfo,
|
|
@@ -340,8 +339,9 @@ export abstract class TableQuickActionDefinitionBase extends QuickActionDefiniti
|
|
|
340
339
|
};
|
|
341
340
|
}
|
|
342
341
|
|
|
343
|
-
createChild(label: string, table: UI5Element): NestedQuickActionChild {
|
|
342
|
+
createChild(label: string, table: UI5Element, path: string): NestedQuickActionChild {
|
|
344
343
|
const child: NestedQuickActionChild = {
|
|
344
|
+
path,
|
|
345
345
|
label,
|
|
346
346
|
enabled: true,
|
|
347
347
|
children: []
|
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.19.
|
|
12
|
+
"version": "0.19.24",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"ejs": "3.1.10",
|
|
26
26
|
"mem-fs": "2.1.0",
|
|
27
27
|
"mem-fs-editor": "9.4.0",
|
|
28
|
-
"@sap-ux/adp-tooling": "0.13.
|
|
28
|
+
"@sap-ux/adp-tooling": "0.13.30",
|
|
29
29
|
"@sap-ux/btp-utils": "1.0.3",
|
|
30
|
-
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.
|
|
30
|
+
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.3",
|
|
31
31
|
"@sap-ux/feature-toggle": "0.2.3",
|
|
32
32
|
"@sap-ux/logger": "0.6.0",
|
|
33
33
|
"@sap-ux/project-access": "1.29.18",
|
|
34
|
-
"@sap-ux/system-access": "0.5.
|
|
34
|
+
"@sap-ux/system-access": "0.5.36"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@sap-ux-private/playwright": "0.1.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"nock": "13.4.0",
|
|
50
50
|
"npm-run-all2": "6.2.0",
|
|
51
51
|
"supertest": "6.3.3",
|
|
52
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.13.
|
|
53
|
-
"@sap-ux/axios-extension": "1.
|
|
52
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.13.17",
|
|
53
|
+
"@sap-ux/axios-extension": "1.20.0",
|
|
54
54
|
"@sap-ux/i18n": "0.2.3",
|
|
55
55
|
"@sap-ux/store": "1.0.0",
|
|
56
56
|
"@sap-ux/ui5-info": "0.9.1"
|