@sap-ux/preview-middleware 0.16.107 → 0.16.109
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/fe-v4/create-table-action.js +1 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +1 -1
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.js +7 -4
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.ts +7 -4
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@ sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../
|
|
|
16
16
|
*/
|
|
17
17
|
class AddTableActionQuickAction extends TableQuickActionDefinitionBase {
|
|
18
18
|
constructor(context) {
|
|
19
|
-
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context);
|
|
19
|
+
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
20
20
|
}
|
|
21
21
|
async execute(path) {
|
|
22
22
|
const index = this.tableMap[path];
|
|
@@ -15,7 +15,7 @@ const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
|
15
15
|
*/
|
|
16
16
|
export class AddTableActionQuickAction extends TableQuickActionDefinitionBase implements NestedQuickActionDefinition {
|
|
17
17
|
constructor(context: QuickActionContext) {
|
|
18
|
-
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context);
|
|
18
|
+
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
@@ -21,17 +21,20 @@ sap.ui.define([
|
|
|
21
21
|
isClearButtonEnabled = false;
|
|
22
22
|
children = [];
|
|
23
23
|
tableMap = {};
|
|
24
|
-
constructor(type, defaultTextKey, context) {
|
|
24
|
+
constructor(type, defaultTextKey, context, isSkipVariantManagementCheck) {
|
|
25
25
|
this.type = type;
|
|
26
26
|
this.defaultTextKey = defaultTextKey;
|
|
27
27
|
this.context = context;
|
|
28
|
+
this.isSkipVariantManagementCheck = isSkipVariantManagementCheck;
|
|
28
29
|
}
|
|
29
30
|
async initialize() {
|
|
30
31
|
let index = 0;
|
|
31
32
|
for (const smartTable of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [CONTROL_TYPE])) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (!this.isSkipVariantManagementCheck) {
|
|
34
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({ element: smartTable });
|
|
35
|
+
if (!hasVariantManagement) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
const actions = await this.context.actionService.get(smartTable.getId());
|
|
37
40
|
const changeColumnAction = actions.find(action => action.id === ACTION_ID);
|
|
@@ -24,7 +24,8 @@ export abstract class TableQuickActionDefinitionBase {
|
|
|
24
24
|
constructor(
|
|
25
25
|
public readonly type: string,
|
|
26
26
|
protected readonly defaultTextKey: string,
|
|
27
|
-
protected readonly context: QuickActionContext
|
|
27
|
+
protected readonly context: QuickActionContext,
|
|
28
|
+
protected readonly isSkipVariantManagementCheck?: boolean
|
|
28
29
|
) {}
|
|
29
30
|
|
|
30
31
|
async initialize(): Promise<void> {
|
|
@@ -32,9 +33,11 @@ export abstract class TableQuickActionDefinitionBase {
|
|
|
32
33
|
for (const smartTable of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [
|
|
33
34
|
CONTROL_TYPE
|
|
34
35
|
])) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
if (!this.isSkipVariantManagementCheck) {
|
|
37
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({ element: smartTable });
|
|
38
|
+
if (!hasVariantManagement) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
const actions = await this.context.actionService.get(smartTable.getId());
|
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.
|
|
12
|
+
"version": "0.16.109",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@sap-ux/logger": "0.6.0",
|
|
29
29
|
"@sap-ux/feature-toggle": "0.2.2",
|
|
30
30
|
"@sap-ux/btp-utils": "0.15.2",
|
|
31
|
-
"@sap-ux/adp-tooling": "0.12.
|
|
31
|
+
"@sap-ux/adp-tooling": "0.12.73",
|
|
32
32
|
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.24",
|
|
33
33
|
"@sap-ux/project-access": "1.28.6"
|
|
34
34
|
},
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"supertest": "6.3.3",
|
|
47
47
|
"@sap-ux-private/playwright": "0.1.0",
|
|
48
48
|
"dotenv": "16.3.1",
|
|
49
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.
|
|
50
|
-
"@sap-ux/axios-extension": "1.17.
|
|
49
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.24",
|
|
50
|
+
"@sap-ux/axios-extension": "1.17.1",
|
|
51
51
|
"@sap-ux/store": "0.9.3",
|
|
52
52
|
"@sap-ux/ui5-info": "0.8.3",
|
|
53
53
|
"@sap-ux/i18n": "0.2.0"
|