@sap-ux/preview-middleware 0.16.159 → 0.16.160

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 (62) hide show
  1. package/dist/client/adp/api-handler.js +142 -142
  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/BaseDialog.controller.js +187 -187
  5. package/dist/client/adp/controllers/ControllerExtension.controller.js +213 -213
  6. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  7. package/dist/client/adp/dialog-factory.js +113 -113
  8. package/dist/client/adp/init-dialogs.js +100 -100
  9. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
  10. package/dist/client/adp/quick-actions/common/create-page-action.js +50 -50
  11. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
  12. package/dist/client/adp/quick-actions/common/op-add-header-field.js +48 -48
  13. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  14. package/dist/client/adp/quick-actions/control-types.js +21 -21
  15. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  16. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  17. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  18. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +70 -70
  19. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
  20. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +60 -60
  21. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  22. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +57 -57
  23. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  24. package/dist/client/adp/quick-actions/fe-v2/registry.js +72 -72
  25. package/dist/client/adp/quick-actions/fe-v2/utils.js +95 -95
  26. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +49 -49
  27. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +47 -47
  28. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
  29. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +55 -55
  30. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
  31. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +52 -52
  32. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  33. package/dist/client/adp/quick-actions/fe-v4/registry.js +56 -56
  34. package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
  35. package/dist/client/adp/quick-actions/load.js +44 -44
  36. package/dist/client/adp/quick-actions/quick-action-base.js +53 -53
  37. package/dist/client/adp/utils.js +160 -160
  38. package/dist/client/cpe/changes/index.js +10 -10
  39. package/dist/client/cpe/changes/validator.js +34 -34
  40. package/dist/client/cpe/documentation.js +164 -164
  41. package/dist/client/cpe/feature-service.js +36 -36
  42. package/dist/client/cpe/logger.js +30 -30
  43. package/dist/client/cpe/outline/editable.js +37 -37
  44. package/dist/client/cpe/outline/nodes.js +217 -217
  45. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  46. package/dist/client/cpe/quick-actions/registry.js +143 -143
  47. package/dist/client/cpe/quick-actions/utils.js +92 -92
  48. package/dist/client/cpe/types.js +4 -4
  49. package/dist/client/cpe/ui5-utils.js +33 -33
  50. package/dist/client/cpe/utils.js +138 -138
  51. package/dist/client/flp/WorkspaceConnector.js +86 -86
  52. package/dist/client/flp/common.js +28 -28
  53. package/dist/client/flp/enableFakeConnector.js +83 -83
  54. package/dist/client/flp/initConnectors.js +30 -30
  55. package/dist/client/flp/initRta.js +178 -178
  56. package/dist/client/i18n.js +56 -56
  57. package/dist/client/utils/application.js +32 -32
  58. package/dist/client/utils/core.js +68 -68
  59. package/dist/client/utils/error.js +19 -19
  60. package/dist/client/utils/fe-v4.js +118 -118
  61. package/dist/client/utils/version.js +102 -102
  62. package/package.json +3 -3
@@ -1,58 +1,58 @@
1
- "use strict";
2
-
3
- sap.ui.define(["../../../cpe/quick-actions/registry", "../common/add-controller-to-page", "./lr-toggle-clear-filter-bar", "./change-table-columns", "../common/op-add-header-field", "../common/op-add-custom-section", "./create-table-custom-column", "../common/create-page-action", "./create-table-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode"], function (_____cpe_quick_actions_registry, ___common_add_controller_to_page, ___lr_toggle_clear_filter_bar, ___change_table_columns, ___common_op_add_header_field, ___common_op_add_custom_section, ___create_table_custom_column, ___common_create_page_action, ___create_table_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode) {
4
- "use strict";
5
-
6
- const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
7
- const AddControllerToPageQuickAction = ___common_add_controller_to_page["AddControllerToPageQuickAction"];
8
- const ToggleClearFilterBarQuickAction = ___lr_toggle_clear_filter_bar["ToggleClearFilterBarQuickAction"];
9
- const ChangeTableColumnsQuickAction = ___change_table_columns["ChangeTableColumnsQuickAction"];
10
- const AddHeaderFieldQuickAction = ___common_op_add_header_field["AddHeaderFieldQuickAction"];
11
- const AddCustomSectionQuickAction = ___common_op_add_custom_section["AddCustomSectionQuickAction"];
12
- const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
13
- const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
14
- const AddTableActionQuickAction = ___create_table_action["AddTableActionQuickAction"];
15
- const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
16
- const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
17
- const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
18
- const LIST_REPORT_TYPE = 'sap.fe.templates.ListReport.ListReport';
19
- const OBJECT_PAGE_TYPE = 'sap.fe.templates.ObjectPage.ObjectPage';
20
-
21
- /**
22
- * Quick Action provider for SAP Fiori Elements V4 applications.
23
- */
24
- class FEV4QuickActionRegistry extends QuickActionDefinitionRegistry {
25
- PAGE_NAME_MAP = {
26
- [LIST_REPORT_TYPE]: 'listReport',
27
- [OBJECT_PAGE_TYPE]: 'objectPage'
28
- };
29
- getDefinitions(context) {
30
- const activePages = this.getActivePageContent(context.controlIndex);
31
- const definitionGroups = [];
32
- for (let index = 0; index < activePages.length; index++) {
33
- const {
34
- name,
35
- view
36
- } = activePages[index];
37
- if (name === 'listReport') {
38
- definitionGroups.push({
39
- title: 'LIST REPORT',
40
- definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction],
41
- view,
42
- key: name + index
43
- });
44
- } else if (name === 'objectPage') {
45
- definitionGroups.push({
46
- title: 'OBJECT PAGE',
47
- definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction],
48
- view,
49
- key: name + index
50
- });
51
- }
52
- }
53
- return definitionGroups;
54
- }
55
- }
56
- return FEV4QuickActionRegistry;
1
+ "use strict";
2
+
3
+ sap.ui.define(["../../../cpe/quick-actions/registry", "../common/add-controller-to-page", "./lr-toggle-clear-filter-bar", "./change-table-columns", "../common/op-add-header-field", "../common/op-add-custom-section", "./create-table-custom-column", "../common/create-page-action", "./create-table-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode"], function (_____cpe_quick_actions_registry, ___common_add_controller_to_page, ___lr_toggle_clear_filter_bar, ___change_table_columns, ___common_op_add_header_field, ___common_op_add_custom_section, ___create_table_custom_column, ___common_create_page_action, ___create_table_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode) {
4
+ "use strict";
5
+
6
+ const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
7
+ const AddControllerToPageQuickAction = ___common_add_controller_to_page["AddControllerToPageQuickAction"];
8
+ const ToggleClearFilterBarQuickAction = ___lr_toggle_clear_filter_bar["ToggleClearFilterBarQuickAction"];
9
+ const ChangeTableColumnsQuickAction = ___change_table_columns["ChangeTableColumnsQuickAction"];
10
+ const AddHeaderFieldQuickAction = ___common_op_add_header_field["AddHeaderFieldQuickAction"];
11
+ const AddCustomSectionQuickAction = ___common_op_add_custom_section["AddCustomSectionQuickAction"];
12
+ const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
13
+ const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
14
+ const AddTableActionQuickAction = ___create_table_action["AddTableActionQuickAction"];
15
+ const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
16
+ const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
17
+ const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
18
+ const LIST_REPORT_TYPE = 'sap.fe.templates.ListReport.ListReport';
19
+ const OBJECT_PAGE_TYPE = 'sap.fe.templates.ObjectPage.ObjectPage';
20
+
21
+ /**
22
+ * Quick Action provider for SAP Fiori Elements V4 applications.
23
+ */
24
+ class FEV4QuickActionRegistry extends QuickActionDefinitionRegistry {
25
+ PAGE_NAME_MAP = {
26
+ [LIST_REPORT_TYPE]: 'listReport',
27
+ [OBJECT_PAGE_TYPE]: 'objectPage'
28
+ };
29
+ getDefinitions(context) {
30
+ const activePages = this.getActivePageContent(context.controlIndex);
31
+ const definitionGroups = [];
32
+ for (let index = 0; index < activePages.length; index++) {
33
+ const {
34
+ name,
35
+ view
36
+ } = activePages[index];
37
+ if (name === 'listReport') {
38
+ definitionGroups.push({
39
+ title: 'LIST REPORT',
40
+ definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction],
41
+ view,
42
+ key: name + index
43
+ });
44
+ } else if (name === 'objectPage') {
45
+ definitionGroups.push({
46
+ title: 'OBJECT PAGE',
47
+ definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction],
48
+ view,
49
+ key: name + index
50
+ });
51
+ }
52
+ }
53
+ return definitionGroups;
54
+ }
55
+ }
56
+ return FEV4QuickActionRegistry;
57
57
  });
58
58
  //# sourceMappingURL=registry.js.map
@@ -1,49 +1,49 @@
1
- "use strict";
2
-
3
- sap.ui.define(["../../../utils/core", "sap/ui/rta/command/CommandFactory", "../../../utils/fe-v4"], function (_____utils_core, CommandFactory, _____utils_fe_v4) {
4
- "use strict";
5
-
6
- const getControlById = _____utils_core["getControlById"];
7
- const getAppComponent = _____utils_fe_v4["getAppComponent"];
8
- const getPageName = _____utils_fe_v4["getPageName"];
9
- const getReference = _____utils_fe_v4["getReference"];
10
- async function executeToggleAction(context, isButtonEnabled, controlType, propertyPath) {
11
- const controls = context.controlIndex[controlType] ?? [];
12
- const control = controls[0];
13
- if (control) {
14
- const modifiedControl = getControlById(control.controlId);
15
- if (!modifiedControl) {
16
- return [];
17
- }
18
- const {
19
- flexSettings
20
- } = context;
21
- const parent = modifiedControl.getParent();
22
- if (!parent) {
23
- return [];
24
- }
25
- const modifiedValue = {
26
- reference: getReference(modifiedControl),
27
- appComponent: getAppComponent(modifiedControl),
28
- changeType: 'appdescr_fe_changePageConfiguration',
29
- parameters: {
30
- page: getPageName(parent),
31
- entityPropertyChange: {
32
- propertyPath: propertyPath,
33
- propertyValue: !isButtonEnabled,
34
- operation: 'UPSERT'
35
- }
36
- }
37
- };
38
- const command = await CommandFactory.getCommandFor(modifiedControl, 'appDescriptor', modifiedValue, null, flexSettings);
39
- return [command];
40
- }
41
- return [];
42
- }
43
- var __exports = {
44
- __esModule: true
45
- };
46
- __exports.executeToggleAction = executeToggleAction;
47
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["../../../utils/core", "sap/ui/rta/command/CommandFactory", "../../../utils/fe-v4"], function (_____utils_core, CommandFactory, _____utils_fe_v4) {
4
+ "use strict";
5
+
6
+ const getControlById = _____utils_core["getControlById"];
7
+ const getAppComponent = _____utils_fe_v4["getAppComponent"];
8
+ const getPageName = _____utils_fe_v4["getPageName"];
9
+ const getReference = _____utils_fe_v4["getReference"];
10
+ async function executeToggleAction(context, isButtonEnabled, controlType, propertyPath) {
11
+ const controls = context.controlIndex[controlType] ?? [];
12
+ const control = controls[0];
13
+ if (control) {
14
+ const modifiedControl = getControlById(control.controlId);
15
+ if (!modifiedControl) {
16
+ return [];
17
+ }
18
+ const {
19
+ flexSettings
20
+ } = context;
21
+ const parent = modifiedControl.getParent();
22
+ if (!parent) {
23
+ return [];
24
+ }
25
+ const modifiedValue = {
26
+ reference: getReference(modifiedControl),
27
+ appComponent: getAppComponent(modifiedControl),
28
+ changeType: 'appdescr_fe_changePageConfiguration',
29
+ parameters: {
30
+ page: getPageName(parent),
31
+ entityPropertyChange: {
32
+ propertyPath: propertyPath,
33
+ propertyValue: !isButtonEnabled,
34
+ operation: 'UPSERT'
35
+ }
36
+ }
37
+ };
38
+ const command = await CommandFactory.getCommandFor(modifiedControl, 'appDescriptor', modifiedValue, null, flexSettings);
39
+ return [command];
40
+ }
41
+ return [];
42
+ }
43
+ var __exports = {
44
+ __esModule: true
45
+ };
46
+ __exports.executeToggleAction = executeToggleAction;
47
+ return __exports;
48
48
  });
49
49
  //# sourceMappingURL=utils.js.map
@@ -1,46 +1,46 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- function __ui5_require_async(path) {
7
- return new Promise(function (resolve, reject) {
8
- sap.ui.require([path], function (module) {
9
- if (!(module && module.__esModule)) {
10
- module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
11
- default: module
12
- } : module;
13
- Object.defineProperty(module, "__esModule", {
14
- value: true
15
- });
16
- }
17
- resolve(module);
18
- }, function (err) {
19
- reject(err);
20
- });
21
- });
22
- }
23
- /**
24
- * Loads the appropriate Quick Action registries for the given application type.
25
- *
26
- * @param appType - Application type.
27
- * @returns Quick Action registries.
28
- */
29
- async function loadDefinitions(appType) {
30
- if (appType === 'fe-v2') {
31
- const FEV2QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v2/registry')).default;
32
- return [new FEV2QuickActionRegistry()];
33
- }
34
- if (appType === 'fe-v4') {
35
- const FEV4QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v4/registry')).default;
36
- return [new FEV4QuickActionRegistry()];
37
- }
38
- return [];
39
- }
40
- var __exports = {
41
- __esModule: true
42
- };
43
- __exports.loadDefinitions = loadDefinitions;
44
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ function __ui5_require_async(path) {
7
+ return new Promise(function (resolve, reject) {
8
+ sap.ui.require([path], function (module) {
9
+ if (!(module && module.__esModule)) {
10
+ module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
11
+ default: module
12
+ } : module;
13
+ Object.defineProperty(module, "__esModule", {
14
+ value: true
15
+ });
16
+ }
17
+ resolve(module);
18
+ }, function (err) {
19
+ reject(err);
20
+ });
21
+ });
22
+ }
23
+ /**
24
+ * Loads the appropriate Quick Action registries for the given application type.
25
+ *
26
+ * @param appType - Application type.
27
+ * @returns Quick Action registries.
28
+ */
29
+ async function loadDefinitions(appType) {
30
+ if (appType === 'fe-v2') {
31
+ const FEV2QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v2/registry')).default;
32
+ return [new FEV2QuickActionRegistry()];
33
+ }
34
+ if (appType === 'fe-v4') {
35
+ const FEV4QuickActionRegistry = (await __ui5_require_async('open/ux/preview/client/adp/quick-actions/fe-v4/registry')).default;
36
+ return [new FEV4QuickActionRegistry()];
37
+ }
38
+ return [];
39
+ }
40
+ var __exports = {
41
+ __esModule: true
42
+ };
43
+ __exports.loadDefinitions = loadDefinitions;
44
+ return __exports;
45
45
  });
46
46
  //# sourceMappingURL=load.js.map
@@ -1,55 +1,55 @@
1
- "use strict";
2
-
3
- sap.ui.define([], function () {
4
- "use strict";
5
-
6
- /**
7
- * Base class for all quick actions.
8
- */
9
- class QuickActionDefinitionBase {
10
- get id() {
11
- return `${this.context.key}-${this.type}`;
12
- }
13
-
14
- /**
15
- * Quick Actions tooltip.
16
- */
17
- get tooltip() {
18
- if (this.validationResult) {
19
- const validationErrors = this.validationResult.filter(result => result?.type === 'error');
20
- if (validationErrors.length > 0) {
21
- const error = validationErrors[0];
22
- return error.message;
23
- }
24
- }
25
- return undefined;
26
- }
27
- get isDisabled() {
28
- if (this.validationResult === undefined) {
29
- return false;
30
- }
31
- const validationErrors = this.validationResult.filter(result => result?.type === 'error');
32
- return validationErrors.length > 0;
33
- }
34
- get textKey() {
35
- return this.defaultTextKey;
36
- }
37
- constructor(type, kind, defaultTextKey, context) {
38
- let enablementValidators = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
39
- this.type = type;
40
- this.kind = kind;
41
- this.defaultTextKey = defaultTextKey;
42
- this.context = context;
43
- this.enablementValidators = enablementValidators;
44
- }
45
- async runEnablementValidators() {
46
- this.validationResult = await Promise.all(this.enablementValidators.map(async validator => await validator.run()));
47
- }
48
- }
49
- var __exports = {
50
- __esModule: true
51
- };
52
- __exports.QuickActionDefinitionBase = QuickActionDefinitionBase;
53
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Base class for all quick actions.
8
+ */
9
+ class QuickActionDefinitionBase {
10
+ get id() {
11
+ return `${this.context.key}-${this.type}`;
12
+ }
13
+
14
+ /**
15
+ * Quick Actions tooltip.
16
+ */
17
+ get tooltip() {
18
+ if (this.validationResult) {
19
+ const validationErrors = this.validationResult.filter(result => result?.type === 'error');
20
+ if (validationErrors.length > 0) {
21
+ const error = validationErrors[0];
22
+ return error.message;
23
+ }
24
+ }
25
+ return undefined;
26
+ }
27
+ get isDisabled() {
28
+ if (this.validationResult === undefined) {
29
+ return false;
30
+ }
31
+ const validationErrors = this.validationResult.filter(result => result?.type === 'error');
32
+ return validationErrors.length > 0;
33
+ }
34
+ get textKey() {
35
+ return this.defaultTextKey;
36
+ }
37
+ constructor(type, kind, defaultTextKey, context) {
38
+ let enablementValidators = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
39
+ this.type = type;
40
+ this.kind = kind;
41
+ this.defaultTextKey = defaultTextKey;
42
+ this.context = context;
43
+ this.enablementValidators = enablementValidators;
44
+ }
45
+ async runEnablementValidators() {
46
+ this.validationResult = await Promise.all(this.enablementValidators.map(async validator => await validator.run()));
47
+ }
48
+ }
49
+ var __exports = {
50
+ __esModule: true
51
+ };
52
+ __exports.QuickActionDefinitionBase = QuickActionDefinitionBase;
53
+ return __exports;
54
54
  });
55
55
  //# sourceMappingURL=quick-action-base.js.map