@sap-ux/preview-middleware 0.18.15 → 0.18.17
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/base/config.js +1 -1
- package/dist/base/flp.d.ts +7 -0
- package/dist/base/flp.js +13 -0
- package/dist/client/adp/api-handler.js +153 -153
- package/dist/client/adp/command-executor.js +75 -75
- package/dist/client/adp/control-utils.js +44 -44
- package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
- package/dist/client/adp/controllers/ControllerExtension.controller.js +209 -209
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
- package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
- package/dist/client/adp/dialog-factory.js +125 -125
- package/dist/client/adp/init-dialogs.js +107 -107
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
- package/dist/client/adp/quick-actions/common/create-page-action.js +51 -51
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +61 -48
- package/dist/client/adp/quick-actions/common/op-add-header-field.ts +23 -10
- package/dist/client/adp/quick-actions/common/utils.js +18 -18
- package/dist/client/adp/quick-actions/control-types.js +21 -21
- package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
- package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +104 -104
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +59 -59
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
- package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +84 -84
- package/dist/client/adp/quick-actions/fe-v2/registry.js +75 -75
- package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +73 -73
- package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +50 -50
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
- package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +56 -56
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +53 -53
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
- package/dist/client/adp/quick-actions/fe-v4/registry.js +58 -58
- 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/quick-action-base.js +53 -53
- package/dist/client/adp/utils.js +160 -160
- package/dist/client/cpe/changes/index.js +10 -10
- package/dist/client/cpe/changes/validator.js +39 -39
- 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 +222 -222
- 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 +28 -30
- package/dist/client/flp/initConnectors.ts +0 -7
- package/dist/client/flp/initRta.js +178 -178
- package/dist/client/i18n.js +56 -56
- package/dist/client/messagebundle.properties +1 -1
- 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 -118
- package/dist/client/utils/version.js +104 -104
- package/package.json +3 -3
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../simple-quick-action-base", "../../../utils/application", "../../../utils/version", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, ___simple_quick_action_base, _____utils_application, _____utils_version, ___dialog_enablement_validator) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
-
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
-
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
|
-
const getApplicationType = _____utils_application["getApplicationType"];
|
|
10
|
-
const getUi5Version = _____utils_version["getUi5Version"];
|
|
11
|
-
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
12
|
-
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
13
|
-
const ADD_PAGE_ACTION = 'add-page-action';
|
|
14
|
-
const CONTROL_TYPES = ['sap.f.DynamicPageTitle', 'sap.uxap.ObjectPageHeader', 'sap.uxap.ObjectPageDynamicHeaderTitle'];
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Quick Action for adding a custom page action.
|
|
18
|
-
*/
|
|
19
|
-
class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
20
|
-
constructor(context) {
|
|
21
|
-
super(ADD_PAGE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
22
|
-
this.appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
23
|
-
}
|
|
24
|
-
async initialize() {
|
|
25
|
-
const version = await getUi5Version();
|
|
26
|
-
if (this.appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, {
|
|
27
|
-
major: 1,
|
|
28
|
-
minor: 130
|
|
29
|
-
})) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
await super.initialize();
|
|
33
|
-
}
|
|
34
|
-
async execute() {
|
|
35
|
-
if (this.control) {
|
|
36
|
-
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
37
|
-
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
38
|
-
aggregation: 'actions',
|
|
39
|
-
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
40
|
-
defaultAggregationArrayIndex: 1
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
var __exports = {
|
|
47
|
-
__esModule: true
|
|
48
|
-
};
|
|
49
|
-
__exports.ADD_PAGE_ACTION = ADD_PAGE_ACTION;
|
|
50
|
-
__exports.AddPageActionQuickAction = AddPageActionQuickAction;
|
|
51
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../simple-quick-action-base", "../../../utils/application", "../../../utils/version", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, ___simple_quick_action_base, _____utils_application, _____utils_version, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
|
+
const getApplicationType = _____utils_application["getApplicationType"];
|
|
10
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
11
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
12
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
13
|
+
const ADD_PAGE_ACTION = 'add-page-action';
|
|
14
|
+
const CONTROL_TYPES = ['sap.f.DynamicPageTitle', 'sap.uxap.ObjectPageHeader', 'sap.uxap.ObjectPageDynamicHeaderTitle'];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Quick Action for adding a custom page action.
|
|
18
|
+
*/
|
|
19
|
+
class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
20
|
+
constructor(context) {
|
|
21
|
+
super(ADD_PAGE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
22
|
+
this.appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
23
|
+
}
|
|
24
|
+
async initialize() {
|
|
25
|
+
const version = await getUi5Version();
|
|
26
|
+
if (this.appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, {
|
|
27
|
+
major: 1,
|
|
28
|
+
minor: 130
|
|
29
|
+
})) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
await super.initialize();
|
|
33
|
+
}
|
|
34
|
+
async execute() {
|
|
35
|
+
if (this.control) {
|
|
36
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
37
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
38
|
+
aggregation: 'actions',
|
|
39
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
40
|
+
defaultAggregationArrayIndex: 1
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
var __exports = {
|
|
47
|
+
__esModule: true
|
|
48
|
+
};
|
|
49
|
+
__exports.ADD_PAGE_ACTION = ADD_PAGE_ACTION;
|
|
50
|
+
__exports.AddPageActionQuickAction = AddPageActionQuickAction;
|
|
51
|
+
return __exports;
|
|
52
52
|
});
|
|
53
53
|
//# sourceMappingURL=create-page-action.js.map
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../cpe/quick-actions/utils", "../simple-quick-action-base", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, _____cpe_quick_actions_utils, ___simple_quick_action_base, ___dialog_enablement_validator) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
-
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
-
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
9
|
-
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
10
|
-
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
11
|
-
const OP_ADD_CUSTOM_SECTION = 'op-add-custom-section';
|
|
12
|
-
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Quick Action for adding a Header Field to an Object Page.
|
|
16
|
-
*/
|
|
17
|
-
class AddCustomSectionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
18
|
-
constructor(context) {
|
|
19
|
-
super(OP_ADD_CUSTOM_SECTION, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
20
|
-
}
|
|
21
|
-
async execute() {
|
|
22
|
-
const objectPageLayout = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)[0];
|
|
23
|
-
const overlay = OverlayRegistry.getOverlay(objectPageLayout) || [];
|
|
24
|
-
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
25
|
-
aggregation: 'sections',
|
|
26
|
-
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
27
|
-
});
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
var __exports = {
|
|
32
|
-
__esModule: true
|
|
33
|
-
};
|
|
34
|
-
__exports.OP_ADD_CUSTOM_SECTION = OP_ADD_CUSTOM_SECTION;
|
|
35
|
-
__exports.AddCustomSectionQuickAction = AddCustomSectionQuickAction;
|
|
36
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../cpe/quick-actions/utils", "../simple-quick-action-base", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, _____cpe_quick_actions_utils, ___simple_quick_action_base, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
9
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
10
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
11
|
+
const OP_ADD_CUSTOM_SECTION = 'op-add-custom-section';
|
|
12
|
+
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick Action for adding a Header Field to an Object Page.
|
|
16
|
+
*/
|
|
17
|
+
class AddCustomSectionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(OP_ADD_CUSTOM_SECTION, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
20
|
+
}
|
|
21
|
+
async execute() {
|
|
22
|
+
const objectPageLayout = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)[0];
|
|
23
|
+
const overlay = OverlayRegistry.getOverlay(objectPageLayout) || [];
|
|
24
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
25
|
+
aggregation: 'sections',
|
|
26
|
+
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
27
|
+
});
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var __exports = {
|
|
32
|
+
__esModule: true
|
|
33
|
+
};
|
|
34
|
+
__exports.OP_ADD_CUSTOM_SECTION = OP_ADD_CUSTOM_SECTION;
|
|
35
|
+
__exports.AddCustomSectionQuickAction = AddCustomSectionQuickAction;
|
|
36
|
+
return __exports;
|
|
37
37
|
});
|
|
38
38
|
//# sourceMappingURL=op-add-custom-section.js.map
|
|
@@ -1,50 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
-
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const OP_ADD_HEADER_FIELD_TYPE = 'op-add-header-field';
|
|
13
|
-
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Quick Action for adding a Header Field to an Object Page.
|
|
17
|
-
*/
|
|
18
|
-
class AddHeaderFieldQuickAction extends SimpleQuickActionDefinitionBase {
|
|
19
|
-
constructor(context) {
|
|
20
|
-
super(OP_ADD_HEADER_FIELD_TYPE, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_HEADER_FIELD', context, [DIALOG_ENABLEMENT_VALIDATOR
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../utils/core", "../simple-quick-action-base", "../dialog-enablement-validator", "../../../i18n"], function (OverlayRegistry, ____dialog_factory, _____utils_core, ___simple_quick_action_base, ___dialog_enablement_validator, _____i18n) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
+
const isA = _____utils_core["isA"];
|
|
9
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
10
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
11
|
+
const getTextBundle = _____i18n["getTextBundle"];
|
|
12
|
+
const OP_ADD_HEADER_FIELD_TYPE = 'op-add-header-field';
|
|
13
|
+
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Quick Action for adding a Header Field to an Object Page.
|
|
17
|
+
*/
|
|
18
|
+
class AddHeaderFieldQuickAction extends SimpleQuickActionDefinitionBase {
|
|
19
|
+
constructor(context) {
|
|
20
|
+
super(OP_ADD_HEADER_FIELD_TYPE, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_HEADER_FIELD', context, [DIALOG_ENABLEMENT_VALIDATOR, {
|
|
21
|
+
run: async () => {
|
|
22
|
+
const i18n = await getTextBundle();
|
|
23
|
+
if (!this.control?.getShowHeaderContent()) {
|
|
24
|
+
return {
|
|
25
|
+
type: 'error',
|
|
26
|
+
message: i18n.getText('DISABLE_SHOW_HEADER_CONTENT')
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}]);
|
|
32
|
+
}
|
|
33
|
+
async execute() {
|
|
34
|
+
if (!this.control) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
const headerContent = this.control.getHeaderContent();
|
|
38
|
+
|
|
39
|
+
// check if only flex box exist in the headerContent.
|
|
40
|
+
if (headerContent.length === 1 && isA('sap.m.FlexBox', headerContent[0])) {
|
|
41
|
+
const overlay = OverlayRegistry.getOverlay(headerContent[0]) || [];
|
|
42
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
43
|
+
aggregation: 'items',
|
|
44
|
+
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
45
|
+
});
|
|
46
|
+
} else if (this.control) {
|
|
47
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
48
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
49
|
+
aggregation: 'headerContent',
|
|
50
|
+
title: 'QUICK_ACTION_OP_ADD_HEADER_FIELD'
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
var __exports = {
|
|
57
|
+
__esModule: true
|
|
58
|
+
};
|
|
59
|
+
__exports.OP_ADD_HEADER_FIELD_TYPE = OP_ADD_HEADER_FIELD_TYPE;
|
|
60
|
+
__exports.AddHeaderFieldQuickAction = AddHeaderFieldQuickAction;
|
|
61
|
+
return __exports;
|
|
49
62
|
});
|
|
50
63
|
//# sourceMappingURL=op-add-header-field.js.map
|
|
@@ -4,11 +4,12 @@ import ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
|
|
|
4
4
|
import FlexBox from 'sap/m/FlexBox';
|
|
5
5
|
|
|
6
6
|
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
7
|
-
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
8
7
|
import { QuickActionContext, SimpleQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
9
8
|
import { isA } from '../../../utils/core';
|
|
10
9
|
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
11
10
|
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
11
|
+
import { EnablementValidatorResult } from '../enablement-validator';
|
|
12
|
+
import { getTextBundle } from '../../../i18n';
|
|
12
13
|
|
|
13
14
|
export const OP_ADD_HEADER_FIELD_TYPE = 'op-add-header-field';
|
|
14
15
|
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
@@ -16,21 +17,33 @@ const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
|
16
17
|
/**
|
|
17
18
|
* Quick Action for adding a Header Field to an Object Page.
|
|
18
19
|
*/
|
|
19
|
-
export class AddHeaderFieldQuickAction
|
|
20
|
+
export class AddHeaderFieldQuickAction
|
|
21
|
+
extends SimpleQuickActionDefinitionBase<ObjectPageLayout>
|
|
22
|
+
implements SimpleQuickActionDefinition
|
|
23
|
+
{
|
|
20
24
|
constructor(context: QuickActionContext) {
|
|
21
25
|
super(OP_ADD_HEADER_FIELD_TYPE, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_HEADER_FIELD', context, [
|
|
22
|
-
DIALOG_ENABLEMENT_VALIDATOR
|
|
26
|
+
DIALOG_ENABLEMENT_VALIDATOR,
|
|
27
|
+
{
|
|
28
|
+
run: async (): Promise<EnablementValidatorResult> => {
|
|
29
|
+
const i18n = await getTextBundle();
|
|
30
|
+
if (!this.control?.getShowHeaderContent()) {
|
|
31
|
+
return {
|
|
32
|
+
type: 'error',
|
|
33
|
+
message: i18n.getText('DISABLE_SHOW_HEADER_CONTENT')
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
23
39
|
]);
|
|
24
40
|
}
|
|
25
41
|
|
|
26
42
|
async execute(): Promise<FlexCommand[]> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)[0] as ObjectPageLayout;
|
|
32
|
-
|
|
33
|
-
const headerContent = objectPageLayout.getHeaderContent();
|
|
43
|
+
if (!this.control) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
const headerContent = this.control.getHeaderContent();
|
|
34
47
|
|
|
35
48
|
// check if only flex box exist in the headerContent.
|
|
36
49
|
if (headerContent.length === 1 && isA<FlexBox>('sap.m.FlexBox', headerContent[0])) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define([], function () {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
function getTooltipsForTableEmptyRowModeAction(resourceBundle) {
|
|
7
|
-
const alreadyEnabledTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_ALREADY_ENABLED');
|
|
8
|
-
const unsupportedCreationRowsTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_NOT_SUPPORTED');
|
|
9
|
-
return {
|
|
10
|
-
alreadyEnabledTooltip,
|
|
11
|
-
unsupportedCreationRowsTooltip
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
var __exports = {
|
|
15
|
-
__esModule: true
|
|
16
|
-
};
|
|
17
|
-
__exports.getTooltipsForTableEmptyRowModeAction = getTooltipsForTableEmptyRowModeAction;
|
|
18
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define([], function () {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function getTooltipsForTableEmptyRowModeAction(resourceBundle) {
|
|
7
|
+
const alreadyEnabledTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_ALREADY_ENABLED');
|
|
8
|
+
const unsupportedCreationRowsTooltip = resourceBundle.getText('EMPTY_ROW_MODE_IS_NOT_SUPPORTED');
|
|
9
|
+
return {
|
|
10
|
+
alreadyEnabledTooltip,
|
|
11
|
+
unsupportedCreationRowsTooltip
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var __exports = {
|
|
15
|
+
__esModule: true
|
|
16
|
+
};
|
|
17
|
+
__exports.getTooltipsForTableEmptyRowModeAction = getTooltipsForTableEmptyRowModeAction;
|
|
18
|
+
return __exports;
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define([], function () {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const SMART_TABLE_TYPE = 'sap.ui.comp.smarttable.SmartTable';
|
|
7
|
-
const M_TABLE_TYPE = 'sap.m.Table';
|
|
8
|
-
const MDC_TABLE_TYPE = 'sap.ui.mdc.Table';
|
|
9
|
-
const TREE_TABLE_TYPE = 'sap.ui.table.TreeTable';
|
|
10
|
-
const GRID_TABLE_TYPE = 'sap.ui.table.Table';
|
|
11
|
-
const ANALYTICAL_TABLE_TYPE = 'sap.ui.table.AnalyticalTable';
|
|
12
|
-
var __exports = {
|
|
13
|
-
__esModule: true
|
|
14
|
-
};
|
|
15
|
-
__exports.SMART_TABLE_TYPE = SMART_TABLE_TYPE;
|
|
16
|
-
__exports.M_TABLE_TYPE = M_TABLE_TYPE;
|
|
17
|
-
__exports.MDC_TABLE_TYPE = MDC_TABLE_TYPE;
|
|
18
|
-
__exports.TREE_TABLE_TYPE = TREE_TABLE_TYPE;
|
|
19
|
-
__exports.GRID_TABLE_TYPE = GRID_TABLE_TYPE;
|
|
20
|
-
__exports.ANALYTICAL_TABLE_TYPE = ANALYTICAL_TABLE_TYPE;
|
|
21
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define([], function () {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const SMART_TABLE_TYPE = 'sap.ui.comp.smarttable.SmartTable';
|
|
7
|
+
const M_TABLE_TYPE = 'sap.m.Table';
|
|
8
|
+
const MDC_TABLE_TYPE = 'sap.ui.mdc.Table';
|
|
9
|
+
const TREE_TABLE_TYPE = 'sap.ui.table.TreeTable';
|
|
10
|
+
const GRID_TABLE_TYPE = 'sap.ui.table.Table';
|
|
11
|
+
const ANALYTICAL_TABLE_TYPE = 'sap.ui.table.AnalyticalTable';
|
|
12
|
+
var __exports = {
|
|
13
|
+
__esModule: true
|
|
14
|
+
};
|
|
15
|
+
__exports.SMART_TABLE_TYPE = SMART_TABLE_TYPE;
|
|
16
|
+
__exports.M_TABLE_TYPE = M_TABLE_TYPE;
|
|
17
|
+
__exports.MDC_TABLE_TYPE = MDC_TABLE_TYPE;
|
|
18
|
+
__exports.TREE_TABLE_TYPE = TREE_TABLE_TYPE;
|
|
19
|
+
__exports.GRID_TABLE_TYPE = GRID_TABLE_TYPE;
|
|
20
|
+
__exports.ANALYTICAL_TABLE_TYPE = ANALYTICAL_TABLE_TYPE;
|
|
21
|
+
return __exports;
|
|
22
22
|
});
|
|
23
23
|
//# sourceMappingURL=control-types.js.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
sap.ui.define(["../../i18n", "../dialog-factory"], function (____i18n, ___dialog_factory) {
|
|
4
|
-
"use strict";
|
|
5
|
-
|
|
6
|
-
const getTextBundle = ____i18n["getTextBundle"];
|
|
7
|
-
const DialogFactory = ___dialog_factory["DialogFactory"];
|
|
8
|
-
const DIALOG_ENABLEMENT_VALIDATOR = {
|
|
9
|
-
run: async () => {
|
|
10
|
-
const i18n = await getTextBundle();
|
|
11
|
-
if (!DialogFactory.canOpenDialog) {
|
|
12
|
-
return {
|
|
13
|
-
type: 'error',
|
|
14
|
-
message: i18n.getText('ADP_QUICK_ACTION_DIALOG_OPEN_MESSAGE')
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var __exports = {
|
|
21
|
-
__esModule: true
|
|
22
|
-
};
|
|
23
|
-
__exports.DIALOG_ENABLEMENT_VALIDATOR = DIALOG_ENABLEMENT_VALIDATOR;
|
|
24
|
-
return __exports;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../i18n", "../dialog-factory"], function (____i18n, ___dialog_factory) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getTextBundle = ____i18n["getTextBundle"];
|
|
7
|
+
const DialogFactory = ___dialog_factory["DialogFactory"];
|
|
8
|
+
const DIALOG_ENABLEMENT_VALIDATOR = {
|
|
9
|
+
run: async () => {
|
|
10
|
+
const i18n = await getTextBundle();
|
|
11
|
+
if (!DialogFactory.canOpenDialog) {
|
|
12
|
+
return {
|
|
13
|
+
type: 'error',
|
|
14
|
+
message: i18n.getText('ADP_QUICK_ACTION_DIALOG_OPEN_MESSAGE')
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var __exports = {
|
|
21
|
+
__esModule: true
|
|
22
|
+
};
|
|
23
|
+
__exports.DIALOG_ENABLEMENT_VALIDATOR = DIALOG_ENABLEMENT_VALIDATOR;
|
|
24
|
+
return __exports;
|
|
25
25
|
});
|
|
26
26
|
//# sourceMappingURL=dialog-enablement-validator.js.map
|