@sap-ux/preview-middleware 0.16.155 → 0.16.156
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/api-handler.js +142 -142
- package/dist/client/adp/command-executor.js +75 -75
- package/dist/client/adp/control-utils.js +44 -44
- package/dist/client/adp/controllers/AddFragment.controller.js +5 -5
- package/dist/client/adp/controllers/AddFragment.controller.ts +1 -1
- package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
- package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
- package/dist/client/adp/init-dialogs.js +157 -157
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +54 -54
- package/dist/client/adp/quick-actions/common/create-page-action.js +49 -49
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +35 -35
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +47 -47
- package/dist/client/adp/quick-actions/common/utils.js +20 -0
- package/dist/client/adp/quick-actions/common/utils.ts +7 -0
- package/dist/client/adp/quick-actions/control-types.js +23 -0
- package/dist/client/adp/quick-actions/control-types.ts +6 -0
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +100 -100
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +69 -69
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +95 -95
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +2 -8
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +56 -56
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +67 -67
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +1 -1
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +57 -57
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +99 -0
- package/dist/client/adp/quick-actions/fe-v2/registry.js +72 -71
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +3 -1
- package/dist/client/adp/quick-actions/fe-v2/utils.js +95 -86
- package/dist/client/adp/quick-actions/fe-v2/utils.ts +14 -4
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +48 -47
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +2 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +46 -45
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.ts +2 -1
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +45 -45
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.ts +3 -7
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +55 -55
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +4 -4
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +52 -52
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +85 -0
- package/dist/client/adp/quick-actions/fe-v4/registry.js +56 -55
- package/dist/client/adp/quick-actions/fe-v4/registry.ts +3 -1
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.js +3 -3
- package/dist/client/adp/quick-actions/fe-v4/table-quick-action-base.ts +7 -4
- package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
- package/dist/client/adp/quick-actions/load.js +44 -44
- package/dist/client/adp/quick-actions/table-quick-action-base.js +18 -21
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +29 -14
- package/dist/client/adp/utils.js +160 -160
- package/dist/client/cpe/changes/index.js +10 -10
- package/dist/client/cpe/changes/validator.js +34 -34
- package/dist/client/cpe/documentation.js +164 -164
- package/dist/client/cpe/feature-service.js +36 -36
- package/dist/client/cpe/logger.js +30 -30
- package/dist/client/cpe/outline/editable.js +37 -37
- package/dist/client/cpe/outline/nodes.js +217 -217
- package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
- package/dist/client/cpe/quick-actions/registry.js +143 -143
- package/dist/client/cpe/quick-actions/utils.js +92 -92
- package/dist/client/cpe/types.js +4 -4
- package/dist/client/cpe/ui5-utils.js +33 -33
- package/dist/client/cpe/utils.js +138 -138
- package/dist/client/flp/WorkspaceConnector.js +86 -86
- package/dist/client/flp/common.js +28 -28
- package/dist/client/flp/enableFakeConnector.js +83 -83
- package/dist/client/flp/initConnectors.js +30 -30
- package/dist/client/flp/initRta.js +178 -178
- package/dist/client/i18n.js +56 -56
- package/dist/client/messagebundle.properties +4 -3
- package/dist/client/utils/application.js +32 -32
- package/dist/client/utils/core.js +68 -68
- package/dist/client/utils/error.js +19 -19
- package/dist/client/utils/fe-v4.js +118 -114
- package/dist/client/utils/fe-v4.ts +19 -11
- package/dist/client/utils/version.js +102 -102
- package/package.json +3 -3
|
@@ -1,88 +1,97 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], function (CommandFactory, _____utils_version) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getUi5Version = _____utils_version["getUi5Version"];
|
|
7
|
-
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
8
|
-
const isVersionEqualOrHasNewerPatch = _____utils_version["isVersionEqualOrHasNewerPatch"];
|
|
9
|
-
/**
|
|
10
|
-
* Prepares the change for the manifest setting.
|
|
11
|
-
*
|
|
12
|
-
* @param context - The context object containing flexSettings.
|
|
13
|
-
* @param propertyPath - The path of the property in the manifest.
|
|
14
|
-
* @param control - The UI5 element representing the control.
|
|
15
|
-
* @param component - component name e.g list report or object page.
|
|
16
|
-
* @param entitySet - Entity Set name.
|
|
17
|
-
* @param propertyValue - The value to be set for the property.
|
|
18
|
-
*
|
|
19
|
-
* @returns A Promise resolving to an array of FlexCommand objects.
|
|
20
|
-
*/
|
|
21
|
-
async function prepareManifestChange(context, propertyPath, control, component, entitySet, propertyValue) {
|
|
22
|
-
const {
|
|
23
|
-
flexSettings
|
|
24
|
-
} = context;
|
|
25
|
-
const modifiedValue = {
|
|
26
|
-
changeType: 'appdescr_ui_generic_app_changePageConfiguration',
|
|
27
|
-
reference: flexSettings.projectId,
|
|
28
|
-
parameters: {
|
|
29
|
-
parentPage: {
|
|
30
|
-
component,
|
|
31
|
-
entitySet
|
|
32
|
-
},
|
|
33
|
-
entityPropertyChange: {
|
|
34
|
-
propertyPath: propertyPath,
|
|
35
|
-
operation: 'UPSERT',
|
|
36
|
-
propertyValue: propertyValue
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const command = await CommandFactory.getCommandFor(control, 'appDescriptor', modifiedValue, null, flexSettings);
|
|
41
|
-
return [command];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Checks
|
|
46
|
-
*
|
|
47
|
-
* @
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
major: 1,
|
|
72
|
-
minor:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
major: 1,
|
|
76
|
-
minor:
|
|
77
|
-
patch:
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version"], function (CommandFactory, _____utils_version) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
7
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
8
|
+
const isVersionEqualOrHasNewerPatch = _____utils_version["isVersionEqualOrHasNewerPatch"];
|
|
9
|
+
/**
|
|
10
|
+
* Prepares the change for the manifest setting.
|
|
11
|
+
*
|
|
12
|
+
* @param context - The context object containing flexSettings.
|
|
13
|
+
* @param propertyPath - The path of the property in the manifest.
|
|
14
|
+
* @param control - The UI5 element representing the control.
|
|
15
|
+
* @param component - component name e.g list report or object page.
|
|
16
|
+
* @param entitySet - Entity Set name.
|
|
17
|
+
* @param propertyValue - The value to be set for the property.
|
|
18
|
+
*
|
|
19
|
+
* @returns A Promise resolving to an array of FlexCommand objects.
|
|
20
|
+
*/
|
|
21
|
+
async function prepareManifestChange(context, propertyPath, control, component, entitySet, propertyValue) {
|
|
22
|
+
const {
|
|
23
|
+
flexSettings
|
|
24
|
+
} = context;
|
|
25
|
+
const modifiedValue = {
|
|
26
|
+
changeType: 'appdescr_ui_generic_app_changePageConfiguration',
|
|
27
|
+
reference: flexSettings.projectId,
|
|
28
|
+
parameters: {
|
|
29
|
+
parentPage: {
|
|
30
|
+
component,
|
|
31
|
+
entitySet
|
|
32
|
+
},
|
|
33
|
+
entityPropertyChange: {
|
|
34
|
+
propertyPath: propertyPath,
|
|
35
|
+
operation: 'UPSERT',
|
|
36
|
+
propertyValue: propertyValue
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const command = await CommandFactory.getCommandFor(control, 'appDescriptor', modifiedValue, null, flexSettings);
|
|
41
|
+
return [command];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Checks whether the manifest has array structured page definitions
|
|
46
|
+
* @param manifest - manifest object
|
|
47
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
48
|
+
*/
|
|
49
|
+
function isManifestArrayStructured(manifest) {
|
|
50
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
55
|
+
*
|
|
56
|
+
* @param manifest - manifest changes of the current application.
|
|
57
|
+
*
|
|
58
|
+
* Returns `false`
|
|
59
|
+
*
|
|
60
|
+
* - If the manifest is structured is an array
|
|
61
|
+
* - If the UI5 version is not supported
|
|
62
|
+
* Otherwise, returns `true`.
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
async function areManifestChangesSupported(manifest) {
|
|
66
|
+
if (isManifestArrayStructured(manifest)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const version = await getUi5Version();
|
|
70
|
+
const isAboveOrEqualMinimalVersion = !isLowerThanMinimalUi5Version(version, {
|
|
71
|
+
major: 1,
|
|
72
|
+
minor: 128
|
|
73
|
+
});
|
|
74
|
+
const isSupportedPatchVersion = isVersionEqualOrHasNewerPatch(version, {
|
|
75
|
+
major: 1,
|
|
76
|
+
minor: 96,
|
|
77
|
+
patch: 35
|
|
78
|
+
}) || isVersionEqualOrHasNewerPatch(version, {
|
|
79
|
+
major: 1,
|
|
80
|
+
minor: 108,
|
|
81
|
+
patch: 38
|
|
82
|
+
}) || isVersionEqualOrHasNewerPatch(version, {
|
|
83
|
+
major: 1,
|
|
84
|
+
minor: 120,
|
|
85
|
+
patch: 23
|
|
86
|
+
});
|
|
87
|
+
return isAboveOrEqualMinimalVersion || isSupportedPatchVersion;
|
|
88
|
+
}
|
|
89
|
+
var __exports = {
|
|
90
|
+
__esModule: true
|
|
91
|
+
};
|
|
92
|
+
__exports.prepareManifestChange = prepareManifestChange;
|
|
93
|
+
__exports.isManifestArrayStructured = isManifestArrayStructured;
|
|
94
|
+
__exports.areManifestChangesSupported = areManifestChangesSupported;
|
|
95
|
+
return __exports;
|
|
87
96
|
});
|
|
88
97
|
//# sourceMappingURL=utils.js.map
|
|
@@ -24,7 +24,7 @@ export async function prepareManifestChange(
|
|
|
24
24
|
control: UI5Element,
|
|
25
25
|
component: string,
|
|
26
26
|
entitySet: string | undefined,
|
|
27
|
-
propertyValue: object
|
|
27
|
+
propertyValue: object | string
|
|
28
28
|
): Promise<FlexCommand[]> {
|
|
29
29
|
const { flexSettings } = context;
|
|
30
30
|
|
|
@@ -53,6 +53,16 @@ export async function prepareManifestChange(
|
|
|
53
53
|
return [command];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Checks whether the manifest has array structured page definitions
|
|
58
|
+
* @param manifest - manifest object
|
|
59
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
60
|
+
*/
|
|
61
|
+
export function isManifestArrayStructured(manifest: Manifest): boolean {
|
|
62
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
56
66
|
/**
|
|
57
67
|
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
58
68
|
*
|
|
@@ -66,17 +76,17 @@ export async function prepareManifestChange(
|
|
|
66
76
|
*
|
|
67
77
|
*/
|
|
68
78
|
export async function areManifestChangesSupported(manifest: Manifest): Promise<boolean> {
|
|
69
|
-
|
|
70
|
-
if (Array.isArray(pagesStructureInManifest)) {
|
|
79
|
+
if (isManifestArrayStructured(manifest)) {
|
|
71
80
|
return false;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
const version = await getUi5Version();
|
|
75
84
|
const isAboveOrEqualMinimalVersion = !isLowerThanMinimalUi5Version(version, { major: 1, minor: 128 });
|
|
76
85
|
const isSupportedPatchVersion =
|
|
77
|
-
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 96, patch:
|
|
86
|
+
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 96, patch: 35 }) ||
|
|
78
87
|
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 108, patch: 38 }) ||
|
|
79
88
|
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 120, patch: 23 });
|
|
80
89
|
|
|
81
90
|
return isAboveOrEqualMinimalVersion || isSupportedPatchVersion;
|
|
82
91
|
}
|
|
92
|
+
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI", "../../../cpe/quick-actions/utils", "../../../utils/core", "./table-quick-action-base"], function (OverlayUtil, FlexRuntimeInfoAPI, _____cpe_quick_actions_utils, _____utils_core, ___table_quick_action_base) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
-
const getControlById = _____utils_core["getControlById"];
|
|
8
|
-
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
__exports.
|
|
47
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI", "../../../cpe/quick-actions/utils", "../../../utils/core", "./table-quick-action-base", "../control-types"], function (OverlayUtil, FlexRuntimeInfoAPI, _____cpe_quick_actions_utils, _____utils_core, ___table_quick_action_base, ___control_types) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
+
const getControlById = _____utils_core["getControlById"];
|
|
8
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
9
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
10
|
+
const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
11
|
+
const ACTION_ID = 'CTX_SETTINGS0';
|
|
12
|
+
const CONTROL_TYPE = 'sap.ui.mdc.Table';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick Action for changing table columns.
|
|
16
|
+
*/
|
|
17
|
+
class ChangeTableColumnsQuickAction extends TableQuickActionDefinitionBase {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
20
|
+
}
|
|
21
|
+
async execute(path) {
|
|
22
|
+
const index = this.tableMap[path];
|
|
23
|
+
const smartTables = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [CONTROL_TYPE]);
|
|
24
|
+
for (let i = 0; i < smartTables.length; i++) {
|
|
25
|
+
if (i === index) {
|
|
26
|
+
const section = getControlById(smartTables[i].getId());
|
|
27
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(section);
|
|
28
|
+
if (controlOverlay) {
|
|
29
|
+
controlOverlay.setSelected(true);
|
|
30
|
+
}
|
|
31
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({
|
|
32
|
+
element: smartTables[i]
|
|
33
|
+
});
|
|
34
|
+
if (!hasVariantManagement) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
await this.context.actionService.execute(smartTables[i].getId(), ACTION_ID);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var __exports = {
|
|
44
|
+
__esModule: true
|
|
45
|
+
};
|
|
46
|
+
__exports.CHANGE_TABLE_COLUMNS = CHANGE_TABLE_COLUMNS;
|
|
47
|
+
__exports.ChangeTableColumnsQuickAction = ChangeTableColumnsQuickAction;
|
|
48
|
+
return __exports;
|
|
48
49
|
});
|
|
49
50
|
//# sourceMappingURL=change-table-columns.js.map
|
|
@@ -5,6 +5,7 @@ import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/qu
|
|
|
5
5
|
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
6
6
|
import { getControlById } from '../../../utils/core';
|
|
7
7
|
import { TableQuickActionDefinitionBase } from './table-quick-action-base';
|
|
8
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
8
9
|
|
|
9
10
|
export const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
10
11
|
const ACTION_ID = 'CTX_SETTINGS0';
|
|
@@ -18,7 +19,7 @@ export class ChangeTableColumnsQuickAction
|
|
|
18
19
|
implements NestedQuickActionDefinition
|
|
19
20
|
{
|
|
20
21
|
constructor(context: QuickActionContext) {
|
|
21
|
-
super(CHANGE_TABLE_COLUMNS, 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
22
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../init-dialogs", "./table-quick-action-base"], function (OverlayUtil, _____cpe_quick_actions_utils, _____utils_core, ____init_dialogs, ___table_quick_action_base) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
-
const getControlById = _____utils_core["getControlById"];
|
|
8
|
-
const DialogNames = ____init_dialogs["DialogNames"];
|
|
9
|
-
const handler = ____init_dialogs["handler"];
|
|
10
|
-
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
__exports.
|
|
45
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../cpe/quick-actions/utils", "../../../utils/core", "../../init-dialogs", "./table-quick-action-base", "../control-types"], function (OverlayUtil, _____cpe_quick_actions_utils, _____utils_core, ____init_dialogs, ___table_quick_action_base, ___control_types) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
7
|
+
const getControlById = _____utils_core["getControlById"];
|
|
8
|
+
const DialogNames = ____init_dialogs["DialogNames"];
|
|
9
|
+
const handler = ____init_dialogs["handler"];
|
|
10
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
11
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
12
|
+
const CREATE_TABLE_ACTION = 'create_table_action';
|
|
13
|
+
const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Quick Action for creating table action.
|
|
17
|
+
*/
|
|
18
|
+
class AddTableActionQuickAction extends TableQuickActionDefinitionBase {
|
|
19
|
+
constructor(context) {
|
|
20
|
+
super(CREATE_TABLE_ACTION, [MDC_TABLE_TYPE], 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
21
|
+
}
|
|
22
|
+
async execute(path) {
|
|
23
|
+
const index = this.tableMap[path];
|
|
24
|
+
const smartTablesToolbarAction = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [TOOLBAR_ACTION]);
|
|
25
|
+
for (let i = 0; i < smartTablesToolbarAction.length; i++) {
|
|
26
|
+
if (i === index) {
|
|
27
|
+
const section = getControlById(smartTablesToolbarAction[i].getId());
|
|
28
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(section);
|
|
29
|
+
if (controlOverlay) {
|
|
30
|
+
controlOverlay.setSelected(true);
|
|
31
|
+
await handler(controlOverlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
32
|
+
aggregation: 'actions',
|
|
33
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION'
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
var __exports = {
|
|
42
|
+
__esModule: true
|
|
43
|
+
};
|
|
44
|
+
__exports.CREATE_TABLE_ACTION = CREATE_TABLE_ACTION;
|
|
45
|
+
__exports.AddTableActionQuickAction = AddTableActionQuickAction;
|
|
46
|
+
return __exports;
|
|
46
47
|
});
|
|
47
48
|
//# sourceMappingURL=create-table-action.js.map
|
|
@@ -6,6 +6,7 @@ import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/uti
|
|
|
6
6
|
import { getControlById } from '../../../utils/core';
|
|
7
7
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
8
8
|
import { TableQuickActionDefinitionBase } from './table-quick-action-base';
|
|
9
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
9
10
|
|
|
10
11
|
export const CREATE_TABLE_ACTION = 'create_table_action';
|
|
11
12
|
const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
@@ -15,7 +16,7 @@ const TOOLBAR_ACTION = 'sap.ui.mdc.ActionToolbar';
|
|
|
15
16
|
*/
|
|
16
17
|
export class AddTableActionQuickAction extends TableQuickActionDefinitionBase implements NestedQuickActionDefinition {
|
|
17
18
|
constructor(context: QuickActionContext) {
|
|
18
|
-
super(CREATE_TABLE_ACTION, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
19
|
+
super(CREATE_TABLE_ACTION, [MDC_TABLE_TYPE], 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, true);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
async execute(path: string): Promise<FlexCommand[]> {
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../table-quick-action-base", "../fe-v2/create-table-custom-column"], function (OverlayRegistry, ____init_dialogs, ___table_quick_action_base, ___fe_v2_create_table_custom_column) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const DialogNames = ____init_dialogs["DialogNames"];
|
|
7
|
-
const handler = ____init_dialogs["handler"];
|
|
8
|
-
const SMART_TABLE_TYPE =
|
|
9
|
-
const GRID_TABLE_TYPE =
|
|
10
|
-
const MDC_TABLE_TYPE =
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
14
|
-
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
15
|
-
const CONTROL_TYPES = [SMART_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
16
|
-
class AddTableCustomColumnQuickAction extends TableQuickActionDefinitionBase {
|
|
17
|
-
constructor(context) {
|
|
18
|
-
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
19
|
-
}
|
|
20
|
-
async execute(path) {
|
|
21
|
-
const {
|
|
22
|
-
table,
|
|
23
|
-
iconTabBarFilterKey,
|
|
24
|
-
sectionInfo
|
|
25
|
-
} = this.tableMap[path];
|
|
26
|
-
if (!table) {
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
30
|
-
this.selectOverlay(table);
|
|
31
|
-
const overlay = OverlayRegistry.getOverlay(table);
|
|
32
|
-
await handler(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
33
|
-
aggregation: 'columns',
|
|
34
|
-
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
35
|
-
});
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
var __exports = {
|
|
40
|
-
__esModule: true
|
|
41
|
-
};
|
|
42
|
-
__exports.CREATE_TABLE_CUSTOM_COLUMN = CREATE_TABLE_CUSTOM_COLUMN;
|
|
43
|
-
__exports.CONTROL_TYPES = CONTROL_TYPES;
|
|
44
|
-
__exports.AddTableCustomColumnQuickAction = AddTableCustomColumnQuickAction;
|
|
45
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../init-dialogs", "../control-types", "../table-quick-action-base", "../fe-v2/create-table-custom-column"], function (OverlayRegistry, ____init_dialogs, ___control_types, ___table_quick_action_base, ___fe_v2_create_table_custom_column) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogNames = ____init_dialogs["DialogNames"];
|
|
7
|
+
const handler = ____init_dialogs["handler"];
|
|
8
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
9
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
10
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
11
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
12
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
13
|
+
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
14
|
+
const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
15
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
16
|
+
class AddTableCustomColumnQuickAction extends TableQuickActionDefinitionBase {
|
|
17
|
+
constructor(context) {
|
|
18
|
+
super(CREATE_TABLE_CUSTOM_COLUMN, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN', context);
|
|
19
|
+
}
|
|
20
|
+
async execute(path) {
|
|
21
|
+
const {
|
|
22
|
+
table,
|
|
23
|
+
iconTabBarFilterKey,
|
|
24
|
+
sectionInfo
|
|
25
|
+
} = this.tableMap[path];
|
|
26
|
+
if (!table) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
30
|
+
this.selectOverlay(table);
|
|
31
|
+
const overlay = OverlayRegistry.getOverlay(table);
|
|
32
|
+
await handler(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
33
|
+
aggregation: 'columns',
|
|
34
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN'
|
|
35
|
+
});
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
var __exports = {
|
|
40
|
+
__esModule: true
|
|
41
|
+
};
|
|
42
|
+
__exports.CREATE_TABLE_CUSTOM_COLUMN = CREATE_TABLE_CUSTOM_COLUMN;
|
|
43
|
+
__exports.CONTROL_TYPES = CONTROL_TYPES;
|
|
44
|
+
__exports.AddTableCustomColumnQuickAction = AddTableCustomColumnQuickAction;
|
|
45
|
+
return __exports;
|
|
46
46
|
});
|
|
47
47
|
//# sourceMappingURL=create-table-custom-column.js.map
|
|
@@ -3,13 +3,9 @@ import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
|
3
3
|
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
4
4
|
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
5
5
|
import { DialogNames, handler } from '../../init-dialogs';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
MDC_TABLE_TYPE,
|
|
10
|
-
TableQuickActionDefinitionBase,
|
|
11
|
-
TREE_TABLE_TYPE
|
|
12
|
-
} from '../table-quick-action-base';
|
|
6
|
+
import { SMART_TABLE_TYPE, GRID_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
7
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
8
|
+
|
|
13
9
|
import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
|
|
14
10
|
|
|
15
11
|
export const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|