@sap-ux/preview-middleware 0.19.28 → 0.19.29

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.
Files changed (74) hide show
  1. package/dist/client/adp/api-handler.js +153 -153
  2. package/dist/client/adp/command-executor.js +75 -75
  3. package/dist/client/adp/control-utils.js +44 -44
  4. package/dist/client/adp/controllers/ControllerExtension.controller.js +210 -210
  5. package/dist/client/adp/controllers/ExtensionPoint.controller.js +139 -139
  6. package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
  7. package/dist/client/adp/dialog-factory.js +135 -135
  8. package/dist/client/adp/init-dialogs.js +138 -138
  9. package/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +96 -96
  10. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +60 -60
  11. package/dist/client/adp/quick-actions/common/create-page-action.js +54 -54
  12. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +39 -39
  13. package/dist/client/adp/quick-actions/common/op-add-header-field.js +67 -67
  14. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  15. package/dist/client/adp/quick-actions/control-types.js +23 -23
  16. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  17. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  18. package/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +81 -81
  19. package/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +67 -67
  20. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  21. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +107 -107
  22. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +99 -99
  23. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
  24. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  25. package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
  26. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +59 -59
  27. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  28. package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +84 -84
  29. package/dist/client/adp/quick-actions/fe-v2/registry.js +77 -77
  30. package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
  31. package/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +138 -138
  32. package/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +79 -79
  33. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +75 -75
  34. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +53 -53
  35. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +49 -49
  36. package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
  37. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +56 -56
  38. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +84 -84
  39. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +53 -53
  40. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  41. package/dist/client/adp/quick-actions/fe-v4/registry.js +60 -60
  42. package/dist/client/adp/quick-actions/fe-v4/utils.js +72 -72
  43. package/dist/client/adp/quick-actions/load.js +44 -44
  44. package/dist/client/adp/quick-actions/quick-action-base.js +64 -64
  45. package/dist/client/adp/utils.js +218 -218
  46. package/dist/client/adp/utils.ts +2 -2
  47. package/dist/client/cpe/changes/index.js +10 -10
  48. package/dist/client/cpe/changes/validator.js +39 -39
  49. package/dist/client/cpe/documentation.js +164 -164
  50. package/dist/client/cpe/feature-service.js +36 -36
  51. package/dist/client/cpe/logger.js +30 -30
  52. package/dist/client/cpe/outline/editable.js +37 -37
  53. package/dist/client/cpe/outline/nodes.js +203 -203
  54. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  55. package/dist/client/cpe/quick-actions/registry.js +143 -143
  56. package/dist/client/cpe/quick-actions/utils.js +92 -92
  57. package/dist/client/cpe/types.js +4 -4
  58. package/dist/client/cpe/ui5-utils.js +33 -33
  59. package/dist/client/cpe/utils.js +111 -111
  60. package/dist/client/flp/WorkspaceConnector.js +86 -86
  61. package/dist/client/flp/common.js +28 -28
  62. package/dist/client/flp/enableFakeConnector.js +83 -83
  63. package/dist/client/flp/homepage/Component.js +14 -14
  64. package/dist/client/flp/initCdm.js +117 -117
  65. package/dist/client/flp/initConnectors.js +28 -28
  66. package/dist/client/flp/initRta.js +178 -178
  67. package/dist/client/i18n.js +56 -56
  68. package/dist/client/utils/application.js +32 -32
  69. package/dist/client/utils/core.js +84 -84
  70. package/dist/client/utils/error.js +19 -19
  71. package/dist/client/utils/fe-v2.js +56 -56
  72. package/dist/client/utils/fe-v4.js +140 -140
  73. package/dist/client/utils/version.js +104 -104
  74. package/package.json +2 -2
@@ -1,98 +1,98 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../cpe/quick-actions/utils", "../../utils/core", "../dialog-factory", "../../i18n", "./simple-quick-action-base", "./dialog-enablement-validator"], function (Component, OverlayRegistry, ____cpe_quick_actions_utils, ____utils_core, ___dialog_factory, ____i18n, ___simple_quick_action_base, ___dialog_enablement_validator) {
4
- "use strict";
5
-
6
- const pageHasControlId = ____cpe_quick_actions_utils["pageHasControlId"];
7
- const getControlById = ____utils_core["getControlById"];
8
- const DialogFactory = ___dialog_factory["DialogFactory"];
9
- const DialogNames = ___dialog_factory["DialogNames"];
10
- const getTextBundle = ____i18n["getTextBundle"];
11
- const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
12
- const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
13
- const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
14
- const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
15
- /**
16
- * Base Quick Action class for adding a custom page action.
17
- */
18
- class AddNewSubpageBase extends SimpleQuickActionDefinitionBase {
19
- constructor(context) {
20
- super(ADD_NEW_OBJECT_PAGE_ACTION, [], 'QUICK_ACTION_ADD_NEW_SUB_PAGE', context, [{
21
- run: async () => {
22
- const i18n = await getTextBundle();
23
- if (this.navProperties.length === 0) {
24
- return {
25
- type: 'error',
26
- message: i18n.getText('NO_SUB_PAGES_TO_ADD')
27
- };
28
- }
29
- return undefined;
30
- }
31
- }, DIALOG_ENABLEMENT_VALIDATOR]);
32
- this.appReference = context.flexSettings.projectId ?? '';
33
- this.existingPages = this.getApplicationPages();
34
- }
35
- async addNavigationOptionIfAvailable(metaModel, targetEntitySet, navProperty) {
36
- if (!targetEntitySet) {
37
- return;
38
- }
39
- const pageExists = await this.isPageExists(targetEntitySet, metaModel);
40
- if (!pageExists) {
41
- this.navProperties.push({
42
- entitySet: targetEntitySet,
43
- navProperty: navProperty ?? targetEntitySet
44
- });
45
- }
46
- }
47
- async initialize() {
48
- if (!this.appReference) {
49
- throw new Error('App reference not defined');
50
- }
51
- const allControls = CONTROL_TYPES.flatMap(item => this.context.controlIndex[item] ?? []);
52
- const control = allControls.find(c => pageHasControlId(this.context.view, c.controlId));
53
- this.pageType = this.context.view.getViewName().split('.view.')[0];
54
- const metaModel = this.getODataMetaModel();
55
- if (!metaModel || !control) {
56
- return Promise.resolve();
57
- }
58
- const modifiedControl = getControlById(control.controlId);
59
- if (!modifiedControl) {
60
- return Promise.resolve();
61
- }
62
- const component = Component.getOwnerComponentFor(modifiedControl);
63
- const entitySetName = await this.getEntitySetNameFromPageComponent(component, metaModel);
64
- if (!entitySetName) {
65
- return Promise.resolve();
66
- }
67
- this.entitySet = entitySetName;
68
- this.navProperties = [];
69
- if (!this.isCurrentObjectPage()) {
70
- await this.addNavigationOptionIfAvailable(metaModel, this.entitySet);
71
- } else {
72
- await this.prepareNavigationData(metaModel);
73
- }
74
- this.control = modifiedControl;
75
- return Promise.resolve();
76
- }
77
- async execute() {
78
- const overlay = OverlayRegistry.getOverlay(this.control);
79
- await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_SUBPAGE, undefined, {
80
- appReference: this.appReference,
81
- navProperties: this.navProperties,
82
- title: 'ADD_SUB_PAGE_DIALOG_TITLE',
83
- pageDescriptor: this.currentPageDescriptor
84
- }, {
85
- actionName: this.type,
86
- telemetryEventIdentifier: this.getTelemetryIdentifier()
87
- });
88
- return [];
89
- }
90
- }
91
- var __exports = {
92
- __esModule: true
93
- };
94
- __exports.ADD_NEW_OBJECT_PAGE_ACTION = ADD_NEW_OBJECT_PAGE_ACTION;
95
- __exports.AddNewSubpageBase = AddNewSubpageBase;
96
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../cpe/quick-actions/utils", "../../utils/core", "../dialog-factory", "../../i18n", "./simple-quick-action-base", "./dialog-enablement-validator"], function (Component, OverlayRegistry, ____cpe_quick_actions_utils, ____utils_core, ___dialog_factory, ____i18n, ___simple_quick_action_base, ___dialog_enablement_validator) {
4
+ "use strict";
5
+
6
+ const pageHasControlId = ____cpe_quick_actions_utils["pageHasControlId"];
7
+ const getControlById = ____utils_core["getControlById"];
8
+ const DialogFactory = ___dialog_factory["DialogFactory"];
9
+ const DialogNames = ___dialog_factory["DialogNames"];
10
+ const getTextBundle = ____i18n["getTextBundle"];
11
+ const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
12
+ const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
13
+ const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
14
+ const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
15
+ /**
16
+ * Base Quick Action class for adding a custom page action.
17
+ */
18
+ class AddNewSubpageBase extends SimpleQuickActionDefinitionBase {
19
+ constructor(context) {
20
+ super(ADD_NEW_OBJECT_PAGE_ACTION, [], 'QUICK_ACTION_ADD_NEW_SUB_PAGE', context, [{
21
+ run: async () => {
22
+ const i18n = await getTextBundle();
23
+ if (this.navProperties.length === 0) {
24
+ return {
25
+ type: 'error',
26
+ message: i18n.getText('NO_SUB_PAGES_TO_ADD')
27
+ };
28
+ }
29
+ return undefined;
30
+ }
31
+ }, DIALOG_ENABLEMENT_VALIDATOR]);
32
+ this.appReference = context.flexSettings.projectId ?? '';
33
+ this.existingPages = this.getApplicationPages();
34
+ }
35
+ async addNavigationOptionIfAvailable(metaModel, targetEntitySet, navProperty) {
36
+ if (!targetEntitySet) {
37
+ return;
38
+ }
39
+ const pageExists = await this.isPageExists(targetEntitySet, metaModel);
40
+ if (!pageExists) {
41
+ this.navProperties.push({
42
+ entitySet: targetEntitySet,
43
+ navProperty: navProperty ?? targetEntitySet
44
+ });
45
+ }
46
+ }
47
+ async initialize() {
48
+ if (!this.appReference) {
49
+ throw new Error('App reference not defined');
50
+ }
51
+ const allControls = CONTROL_TYPES.flatMap(item => this.context.controlIndex[item] ?? []);
52
+ const control = allControls.find(c => pageHasControlId(this.context.view, c.controlId));
53
+ this.pageType = this.context.view.getViewName().split('.view.')[0];
54
+ const metaModel = this.getODataMetaModel();
55
+ if (!metaModel || !control) {
56
+ return Promise.resolve();
57
+ }
58
+ const modifiedControl = getControlById(control.controlId);
59
+ if (!modifiedControl) {
60
+ return Promise.resolve();
61
+ }
62
+ const component = Component.getOwnerComponentFor(modifiedControl);
63
+ const entitySetName = await this.getEntitySetNameFromPageComponent(component, metaModel);
64
+ if (!entitySetName) {
65
+ return Promise.resolve();
66
+ }
67
+ this.entitySet = entitySetName;
68
+ this.navProperties = [];
69
+ if (!this.isCurrentObjectPage()) {
70
+ await this.addNavigationOptionIfAvailable(metaModel, this.entitySet);
71
+ } else {
72
+ await this.prepareNavigationData(metaModel);
73
+ }
74
+ this.control = modifiedControl;
75
+ return Promise.resolve();
76
+ }
77
+ async execute() {
78
+ const overlay = OverlayRegistry.getOverlay(this.control);
79
+ await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_SUBPAGE, undefined, {
80
+ appReference: this.appReference,
81
+ navProperties: this.navProperties,
82
+ title: 'ADD_SUB_PAGE_DIALOG_TITLE',
83
+ pageDescriptor: this.currentPageDescriptor
84
+ }, {
85
+ actionName: this.type,
86
+ telemetryEventIdentifier: this.getTelemetryIdentifier()
87
+ });
88
+ return [];
89
+ }
90
+ }
91
+ var __exports = {
92
+ __esModule: true
93
+ };
94
+ __exports.ADD_NEW_OBJECT_PAGE_ACTION = ADD_NEW_OBJECT_PAGE_ACTION;
95
+ __exports.AddNewSubpageBase = AddNewSubpageBase;
96
+ return __exports;
97
97
  });
98
98
  //# sourceMappingURL=add-new-subpage-quick-action-base.js.map
@@ -1,62 +1,62 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/version", "../../utils", "../../../cpe/quick-actions/utils", "../../dialog-factory", "../../init-dialogs", "../../api-handler", "../simple-quick-action-base", "../dialog-enablement-validator"], function (OverlayRegistry, _____utils_version, ____utils, _____cpe_quick_actions_utils, ____dialog_factory, ____init_dialogs, ____api_handler, ___simple_quick_action_base, ___dialog_enablement_validator) {
4
- "use strict";
5
-
6
- const getUi5Version = _____utils_version["getUi5Version"];
7
- const getAllSyncViewsIds = ____utils["getAllSyncViewsIds"];
8
- const getControllerInfoForControl = ____utils["getControllerInfoForControl"];
9
- const getReuseComponentChecker = ____utils["getReuseComponentChecker"];
10
- const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
11
- const DialogFactory = ____dialog_factory["DialogFactory"];
12
- const DialogNames = ____dialog_factory["DialogNames"];
13
- const isControllerExtensionEnabledForControl = ____init_dialogs["isControllerExtensionEnabledForControl"];
14
- const getExistingController = ____api_handler["getExistingController"];
15
- const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
16
- const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
17
- const ADD_CONTROLLER_TO_PAGE_TYPE = 'add-controller-to-page';
18
- const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
19
-
20
- /**
21
- * Quick Action for adding controller to a page.
22
- */
23
- class AddControllerToPageQuickAction extends SimpleQuickActionDefinitionBase {
24
- constructor(context) {
25
- super(ADD_CONTROLLER_TO_PAGE_TYPE, CONTROL_TYPES, '', context, [DIALOG_ENABLEMENT_VALIDATOR]);
26
- }
27
- controllerExists = false;
28
- async initialize() {
29
- const version = await getUi5Version();
30
- const isReuseComponent = await getReuseComponentChecker(version);
31
- for (const control of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)) {
32
- const syncViewsIds = await getAllSyncViewsIds(version);
33
- const controlInfo = getControllerInfoForControl(control);
34
- const data = await getExistingController(controlInfo.controllerName);
35
- this.controllerExists = data?.controllerExists;
36
- const isActiveAction = isControllerExtensionEnabledForControl(control, syncViewsIds, isReuseComponent, this.context.flexSettings.isCloud);
37
- this.control = isActiveAction ? control : undefined;
38
- break;
39
- }
40
- }
41
- get textKey() {
42
- return this.controllerExists ? 'QUICK_ACTION_SHOW_PAGE_CONTROLLER' : 'QUICK_ACTION_ADD_PAGE_CONTROLLER';
43
- }
44
- async execute() {
45
- if (this.control) {
46
- const overlay = OverlayRegistry.getOverlay(this.control) || [];
47
- await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.CONTROLLER_EXTENSION, undefined, {}, {
48
- actionName: this.type,
49
- telemetryEventIdentifier: this.getTelemetryIdentifier()
50
- });
51
- }
52
- return [];
53
- }
54
- }
55
- var __exports = {
56
- __esModule: true
57
- };
58
- __exports.ADD_CONTROLLER_TO_PAGE_TYPE = ADD_CONTROLLER_TO_PAGE_TYPE;
59
- __exports.AddControllerToPageQuickAction = AddControllerToPageQuickAction;
60
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/version", "../../utils", "../../../cpe/quick-actions/utils", "../../dialog-factory", "../../init-dialogs", "../../api-handler", "../simple-quick-action-base", "../dialog-enablement-validator"], function (OverlayRegistry, _____utils_version, ____utils, _____cpe_quick_actions_utils, ____dialog_factory, ____init_dialogs, ____api_handler, ___simple_quick_action_base, ___dialog_enablement_validator) {
4
+ "use strict";
5
+
6
+ const getUi5Version = _____utils_version["getUi5Version"];
7
+ const getAllSyncViewsIds = ____utils["getAllSyncViewsIds"];
8
+ const getControllerInfoForControl = ____utils["getControllerInfoForControl"];
9
+ const getReuseComponentChecker = ____utils["getReuseComponentChecker"];
10
+ const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
11
+ const DialogFactory = ____dialog_factory["DialogFactory"];
12
+ const DialogNames = ____dialog_factory["DialogNames"];
13
+ const isControllerExtensionEnabledForControl = ____init_dialogs["isControllerExtensionEnabledForControl"];
14
+ const getExistingController = ____api_handler["getExistingController"];
15
+ const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
16
+ const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
17
+ const ADD_CONTROLLER_TO_PAGE_TYPE = 'add-controller-to-page';
18
+ const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
19
+
20
+ /**
21
+ * Quick Action for adding controller to a page.
22
+ */
23
+ class AddControllerToPageQuickAction extends SimpleQuickActionDefinitionBase {
24
+ constructor(context) {
25
+ super(ADD_CONTROLLER_TO_PAGE_TYPE, CONTROL_TYPES, '', context, [DIALOG_ENABLEMENT_VALIDATOR]);
26
+ }
27
+ controllerExists = false;
28
+ async initialize() {
29
+ const version = await getUi5Version();
30
+ const isReuseComponent = await getReuseComponentChecker(version);
31
+ for (const control of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)) {
32
+ const syncViewsIds = await getAllSyncViewsIds(version);
33
+ const controlInfo = getControllerInfoForControl(control);
34
+ const data = await getExistingController(controlInfo.controllerName);
35
+ this.controllerExists = data?.controllerExists;
36
+ const isActiveAction = isControllerExtensionEnabledForControl(control, syncViewsIds, isReuseComponent, this.context.flexSettings.isCloud);
37
+ this.control = isActiveAction ? control : undefined;
38
+ break;
39
+ }
40
+ }
41
+ get textKey() {
42
+ return this.controllerExists ? 'QUICK_ACTION_SHOW_PAGE_CONTROLLER' : 'QUICK_ACTION_ADD_PAGE_CONTROLLER';
43
+ }
44
+ async execute() {
45
+ if (this.control) {
46
+ const overlay = OverlayRegistry.getOverlay(this.control) || [];
47
+ await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.CONTROLLER_EXTENSION, undefined, {}, {
48
+ actionName: this.type,
49
+ telemetryEventIdentifier: this.getTelemetryIdentifier()
50
+ });
51
+ }
52
+ return [];
53
+ }
54
+ }
55
+ var __exports = {
56
+ __esModule: true
57
+ };
58
+ __exports.ADD_CONTROLLER_TO_PAGE_TYPE = ADD_CONTROLLER_TO_PAGE_TYPE;
59
+ __exports.AddControllerToPageQuickAction = AddControllerToPageQuickAction;
60
+ return __exports;
61
61
  });
62
62
  //# sourceMappingURL=add-controller-to-page.js.map
@@ -1,56 +1,56 @@
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
- actionName: this.type,
43
- telemetryEventIdentifier: this.getTelemetryIdentifier()
44
- });
45
- }
46
- return [];
47
- }
48
- }
49
- var __exports = {
50
- __esModule: true
51
- };
52
- __exports.ADD_PAGE_ACTION = ADD_PAGE_ACTION;
53
- __exports.AddPageActionQuickAction = AddPageActionQuickAction;
54
- 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
+ actionName: this.type,
43
+ telemetryEventIdentifier: this.getTelemetryIdentifier()
44
+ });
45
+ }
46
+ return [];
47
+ }
48
+ }
49
+ var __exports = {
50
+ __esModule: true
51
+ };
52
+ __exports.ADD_PAGE_ACTION = ADD_PAGE_ACTION;
53
+ __exports.AddPageActionQuickAction = AddPageActionQuickAction;
54
+ return __exports;
55
55
  });
56
56
  //# sourceMappingURL=create-page-action.js.map
@@ -1,41 +1,41 @@
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
- actionName: this.type,
29
- telemetryEventIdentifier: this.getTelemetryIdentifier()
30
- });
31
- return [];
32
- }
33
- }
34
- var __exports = {
35
- __esModule: true
36
- };
37
- __exports.OP_ADD_CUSTOM_SECTION = OP_ADD_CUSTOM_SECTION;
38
- __exports.AddCustomSectionQuickAction = AddCustomSectionQuickAction;
39
- 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
+ actionName: this.type,
29
+ telemetryEventIdentifier: this.getTelemetryIdentifier()
30
+ });
31
+ return [];
32
+ }
33
+ }
34
+ var __exports = {
35
+ __esModule: true
36
+ };
37
+ __exports.OP_ADD_CUSTOM_SECTION = OP_ADD_CUSTOM_SECTION;
38
+ __exports.AddCustomSectionQuickAction = AddCustomSectionQuickAction;
39
+ return __exports;
40
40
  });
41
41
  //# sourceMappingURL=op-add-custom-section.js.map