@sap-ux/preview-middleware 0.19.27 → 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 +4 -4
@@ -1,145 +1,145 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/m/NavContainer", "sap/f/FlexibleColumnLayout", "sap/f/library", "sap/base/Log", "sap/ui/core/ComponentContainer", "../../utils/core", "../utils"], function (NavContainer, FlexibleColumnLayout, sap_f_library, Log, ComponentContainer, ____utils_core, ___utils) {
4
- "use strict";
5
-
6
- const LayoutType = sap_f_library["LayoutType"];
7
- const getControlById = ____utils_core["getControlById"];
8
- const getRootControlFromComponentContainer = ___utils["getRootControlFromComponentContainer"];
9
- const NAV_CONTAINER_CONTROL_TYPE = 'sap.m.NavContainer';
10
- const FLEXIBLE_COLUMN_LAYOUT_CONTROL_TYPE = 'sap.f.FlexibleColumnLayout';
11
- /**
12
- * Base class for Quick Action definition providers.
13
- *
14
- */
15
- class QuickActionDefinitionRegistry {
16
- /**
17
- * Mapping of page view name to page type name.
18
- */
19
- PAGE_NAME_MAP = {};
20
-
21
- /**
22
- * Provides a list of Quick Action definitions that are applicable for the given context.
23
- *
24
- * @param _context - Activation context.
25
- */
26
- getDefinitions(_context) {
27
- throw new Error('Not implemented!');
28
- }
29
-
30
- /**
31
- * Finds component container from the page control.
32
- *
33
- * @param page - Page control provided by containers.
34
- * @returns ComponentContainer control.
35
- */
36
- getComponentContainerFromPage(page) {
37
- if (page instanceof ComponentContainer) {
38
- return page;
39
- }
40
- return undefined;
41
- }
42
-
43
- /**
44
- * Returns a list of Active pages based on the provided control index.
45
- *
46
- * @param controlIndex - Control tree index.
47
- * @returns A list of Active pages.
48
- */
49
- getActivePageContent(controlIndex) {
50
- const views = this.getActiveViews(controlIndex);
51
- const pages = [];
52
- for (const view of views) {
53
- const name = view.getViewName();
54
- const pageName = this.PAGE_NAME_MAP[name];
55
- if (pageName) {
56
- pages.push({
57
- name: pageName,
58
- view
59
- });
60
- } else {
61
- Log.warning(`Could not find matching page for view of type "${name}".`);
62
- }
63
- }
64
- return pages;
65
- }
66
-
67
- /**
68
- * Get all the root views of currently active pages.
69
- *
70
- * @param controlIndex - Control index.
71
- * @returns List of page root views.
72
- */
73
- getActiveViews(controlIndex) {
74
- const pages = this.getActivePages(controlIndex);
75
- const views = [];
76
- for (const page of pages) {
77
- if (page) {
78
- const container = this.getComponentContainerFromPage(page);
79
- const rootControl = getRootControlFromComponentContainer(container);
80
- if (rootControl) {
81
- views.push(rootControl);
82
- }
83
- }
84
- }
85
- return views;
86
- }
87
-
88
- /**
89
- * Finds active page controls from the control tree index.
90
- *
91
- * @param controlIndex - Control tree index.
92
- * @returns A list of page controls.
93
- */
94
- getActivePages(controlIndex) {
95
- const navContainerNode = controlIndex[NAV_CONTAINER_CONTROL_TYPE]?.[0];
96
- if (navContainerNode) {
97
- const control = getControlById(navContainerNode.controlId);
98
- if (control instanceof NavContainer) {
99
- return [control.getCurrentPage()];
100
- }
101
- }
102
- const flexibleLayoutNode = controlIndex[FLEXIBLE_COLUMN_LAYOUT_CONTROL_TYPE]?.[0];
103
- if (flexibleLayoutNode) {
104
- const control = getControlById(flexibleLayoutNode.controlId);
105
- if (control instanceof FlexibleColumnLayout) {
106
- return this.getVisibleFlexibleColumnLayoutPages(control);
107
- }
108
- }
109
- return [];
110
- }
111
-
112
- /**
113
- * Finds the visible Flexible Column Layout pages.
114
- * @param control - Flexible Column Layout control.
115
- * @returns A list of visible pages.
116
- */
117
-
118
- getVisibleFlexibleColumnLayoutPages(control) {
119
- const layout = control.getLayout();
120
- switch (layout) {
121
- case LayoutType.OneColumn:
122
- return [control.getCurrentBeginColumnPage()];
123
- case LayoutType.MidColumnFullScreen:
124
- return [control.getCurrentMidColumnPage()];
125
- case LayoutType.EndColumnFullScreen:
126
- return [control.getCurrentEndColumnPage()];
127
- case LayoutType.ThreeColumnsBeginExpandedEndHidden:
128
- case LayoutType.ThreeColumnsMidExpanded:
129
- case LayoutType.ThreeColumnsMidExpandedEndHidden:
130
- case LayoutType.ThreeColumnsEndExpanded:
131
- return [control.getCurrentBeginColumnPage(), control.getCurrentMidColumnPage(), control.getCurrentEndColumnPage()];
132
- case LayoutType.TwoColumnsMidExpanded:
133
- case LayoutType.TwoColumnsBeginExpanded:
134
- return [control.getCurrentBeginColumnPage(), control.getCurrentMidColumnPage()];
135
- }
136
- return [];
137
- }
138
- }
139
- var __exports = {
140
- __esModule: true
141
- };
142
- __exports.QuickActionDefinitionRegistry = QuickActionDefinitionRegistry;
143
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/m/NavContainer", "sap/f/FlexibleColumnLayout", "sap/f/library", "sap/base/Log", "sap/ui/core/ComponentContainer", "../../utils/core", "../utils"], function (NavContainer, FlexibleColumnLayout, sap_f_library, Log, ComponentContainer, ____utils_core, ___utils) {
4
+ "use strict";
5
+
6
+ const LayoutType = sap_f_library["LayoutType"];
7
+ const getControlById = ____utils_core["getControlById"];
8
+ const getRootControlFromComponentContainer = ___utils["getRootControlFromComponentContainer"];
9
+ const NAV_CONTAINER_CONTROL_TYPE = 'sap.m.NavContainer';
10
+ const FLEXIBLE_COLUMN_LAYOUT_CONTROL_TYPE = 'sap.f.FlexibleColumnLayout';
11
+ /**
12
+ * Base class for Quick Action definition providers.
13
+ *
14
+ */
15
+ class QuickActionDefinitionRegistry {
16
+ /**
17
+ * Mapping of page view name to page type name.
18
+ */
19
+ PAGE_NAME_MAP = {};
20
+
21
+ /**
22
+ * Provides a list of Quick Action definitions that are applicable for the given context.
23
+ *
24
+ * @param _context - Activation context.
25
+ */
26
+ getDefinitions(_context) {
27
+ throw new Error('Not implemented!');
28
+ }
29
+
30
+ /**
31
+ * Finds component container from the page control.
32
+ *
33
+ * @param page - Page control provided by containers.
34
+ * @returns ComponentContainer control.
35
+ */
36
+ getComponentContainerFromPage(page) {
37
+ if (page instanceof ComponentContainer) {
38
+ return page;
39
+ }
40
+ return undefined;
41
+ }
42
+
43
+ /**
44
+ * Returns a list of Active pages based on the provided control index.
45
+ *
46
+ * @param controlIndex - Control tree index.
47
+ * @returns A list of Active pages.
48
+ */
49
+ getActivePageContent(controlIndex) {
50
+ const views = this.getActiveViews(controlIndex);
51
+ const pages = [];
52
+ for (const view of views) {
53
+ const name = view.getViewName();
54
+ const pageName = this.PAGE_NAME_MAP[name];
55
+ if (pageName) {
56
+ pages.push({
57
+ name: pageName,
58
+ view
59
+ });
60
+ } else {
61
+ Log.warning(`Could not find matching page for view of type "${name}".`);
62
+ }
63
+ }
64
+ return pages;
65
+ }
66
+
67
+ /**
68
+ * Get all the root views of currently active pages.
69
+ *
70
+ * @param controlIndex - Control index.
71
+ * @returns List of page root views.
72
+ */
73
+ getActiveViews(controlIndex) {
74
+ const pages = this.getActivePages(controlIndex);
75
+ const views = [];
76
+ for (const page of pages) {
77
+ if (page) {
78
+ const container = this.getComponentContainerFromPage(page);
79
+ const rootControl = getRootControlFromComponentContainer(container);
80
+ if (rootControl) {
81
+ views.push(rootControl);
82
+ }
83
+ }
84
+ }
85
+ return views;
86
+ }
87
+
88
+ /**
89
+ * Finds active page controls from the control tree index.
90
+ *
91
+ * @param controlIndex - Control tree index.
92
+ * @returns A list of page controls.
93
+ */
94
+ getActivePages(controlIndex) {
95
+ const navContainerNode = controlIndex[NAV_CONTAINER_CONTROL_TYPE]?.[0];
96
+ if (navContainerNode) {
97
+ const control = getControlById(navContainerNode.controlId);
98
+ if (control instanceof NavContainer) {
99
+ return [control.getCurrentPage()];
100
+ }
101
+ }
102
+ const flexibleLayoutNode = controlIndex[FLEXIBLE_COLUMN_LAYOUT_CONTROL_TYPE]?.[0];
103
+ if (flexibleLayoutNode) {
104
+ const control = getControlById(flexibleLayoutNode.controlId);
105
+ if (control instanceof FlexibleColumnLayout) {
106
+ return this.getVisibleFlexibleColumnLayoutPages(control);
107
+ }
108
+ }
109
+ return [];
110
+ }
111
+
112
+ /**
113
+ * Finds the visible Flexible Column Layout pages.
114
+ * @param control - Flexible Column Layout control.
115
+ * @returns A list of visible pages.
116
+ */
117
+
118
+ getVisibleFlexibleColumnLayoutPages(control) {
119
+ const layout = control.getLayout();
120
+ switch (layout) {
121
+ case LayoutType.OneColumn:
122
+ return [control.getCurrentBeginColumnPage()];
123
+ case LayoutType.MidColumnFullScreen:
124
+ return [control.getCurrentMidColumnPage()];
125
+ case LayoutType.EndColumnFullScreen:
126
+ return [control.getCurrentEndColumnPage()];
127
+ case LayoutType.ThreeColumnsBeginExpandedEndHidden:
128
+ case LayoutType.ThreeColumnsMidExpanded:
129
+ case LayoutType.ThreeColumnsMidExpandedEndHidden:
130
+ case LayoutType.ThreeColumnsEndExpanded:
131
+ return [control.getCurrentBeginColumnPage(), control.getCurrentMidColumnPage(), control.getCurrentEndColumnPage()];
132
+ case LayoutType.TwoColumnsMidExpanded:
133
+ case LayoutType.TwoColumnsBeginExpanded:
134
+ return [control.getCurrentBeginColumnPage(), control.getCurrentMidColumnPage()];
135
+ }
136
+ return [];
137
+ }
138
+ }
139
+ var __exports = {
140
+ __esModule: true
141
+ };
142
+ __exports.QuickActionDefinitionRegistry = QuickActionDefinitionRegistry;
143
+ return __exports;
144
144
  });
145
145
  //# sourceMappingURL=registry.js.map
@@ -1,94 +1,94 @@
1
- "use strict";
2
-
3
- sap.ui.define(["../../utils/core"], function (____utils_core) {
4
- "use strict";
5
-
6
- const getControlById = ____utils_core["getControlById"];
7
- const isA = ____utils_core["isA"];
8
- /**
9
- * Checks if control is visible in the page.
10
- *
11
- * @param page - Page control.
12
- * @param controlId - UI5 control id.
13
- * @returns True if control is visible in the page.
14
- */
15
- function pageHasControlId(page, controlId) {
16
- const controlDomElement = getControlById(controlId)?.getDomRef();
17
- return !!controlDomElement && !!page?.getDomRef()?.contains(controlDomElement);
18
- }
19
-
20
- /**
21
- * Checks if control is a child element of the rootControl.
22
- *
23
- * @param control - UI5 Control to be tested.
24
- * @param rootControl - UI5 root control.
25
- * @returns True if control is the child of the specified rootControl.
26
- */
27
- function isDescendantOfPage(control, rootControl) {
28
- let currentControl = control;
29
- while (currentControl) {
30
- if (currentControl === rootControl) {
31
- return true;
32
- }
33
- // if parent is a reusable component, use oContainer to find the parent
34
- if (isA('sap.ui.core.Component', currentControl) && currentControl?.oContainer) {
35
- currentControl = currentControl.oContainer.getParent();
36
- } else {
37
- currentControl = currentControl.getParent();
38
- }
39
- }
40
- return false;
41
- }
42
-
43
- /**
44
- * Find all controls in page that match the provided types.
45
- *
46
- * @param controlIndex - Control tree index.
47
- * @param activePage - Active page control.
48
- * @param controlTypes - Relevant control types.
49
- * @returns A list of UI5 controls.
50
- */
51
- function getRelevantControlFromActivePage(controlIndex, activePage, controlTypes) {
52
- const relevantControls = [];
53
- for (const type of controlTypes) {
54
- const controls = controlIndex[type] ?? [];
55
- for (const control of controls) {
56
- const ui5Control = getControlById(control.controlId);
57
- const parent = ui5Control?.getParent();
58
- const isActionApplicable = isDescendantOfPage(parent, activePage);
59
- if (isActionApplicable && ui5Control) {
60
- // if parent control added, discard adding child control.
61
- // Relevant for cases where wrapper exists eg: sap.m.Table exist in sap.ui.comp.smarttable.SmartTable
62
- const parentFound = relevantControls.findIndex(relevantControl => relevantControl.getId() === ui5Control.getParent()?.getId());
63
- if (parentFound === -1) {
64
- relevantControls.push(ui5Control);
65
- }
66
- }
67
- }
68
- }
69
- return relevantControls;
70
- }
71
- function getParentContainer(control, type) {
72
- let currentControl = control;
73
- while (currentControl) {
74
- if (isA(type, currentControl)) {
75
- return currentControl;
76
- }
77
- // if parent is a reusable component, use oContainer to find the parent
78
- if (isA('sap.ui.core.Component', currentControl) && currentControl?.oContainer) {
79
- currentControl = currentControl.oContainer.getParent();
80
- } else {
81
- currentControl = currentControl.getParent();
82
- }
83
- }
84
- return undefined;
85
- }
86
- var __exports = {
87
- __esModule: true
88
- };
89
- __exports.pageHasControlId = pageHasControlId;
90
- __exports.getRelevantControlFromActivePage = getRelevantControlFromActivePage;
91
- __exports.getParentContainer = getParentContainer;
92
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["../../utils/core"], function (____utils_core) {
4
+ "use strict";
5
+
6
+ const getControlById = ____utils_core["getControlById"];
7
+ const isA = ____utils_core["isA"];
8
+ /**
9
+ * Checks if control is visible in the page.
10
+ *
11
+ * @param page - Page control.
12
+ * @param controlId - UI5 control id.
13
+ * @returns True if control is visible in the page.
14
+ */
15
+ function pageHasControlId(page, controlId) {
16
+ const controlDomElement = getControlById(controlId)?.getDomRef();
17
+ return !!controlDomElement && !!page?.getDomRef()?.contains(controlDomElement);
18
+ }
19
+
20
+ /**
21
+ * Checks if control is a child element of the rootControl.
22
+ *
23
+ * @param control - UI5 Control to be tested.
24
+ * @param rootControl - UI5 root control.
25
+ * @returns True if control is the child of the specified rootControl.
26
+ */
27
+ function isDescendantOfPage(control, rootControl) {
28
+ let currentControl = control;
29
+ while (currentControl) {
30
+ if (currentControl === rootControl) {
31
+ return true;
32
+ }
33
+ // if parent is a reusable component, use oContainer to find the parent
34
+ if (isA('sap.ui.core.Component', currentControl) && currentControl?.oContainer) {
35
+ currentControl = currentControl.oContainer.getParent();
36
+ } else {
37
+ currentControl = currentControl.getParent();
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ /**
44
+ * Find all controls in page that match the provided types.
45
+ *
46
+ * @param controlIndex - Control tree index.
47
+ * @param activePage - Active page control.
48
+ * @param controlTypes - Relevant control types.
49
+ * @returns A list of UI5 controls.
50
+ */
51
+ function getRelevantControlFromActivePage(controlIndex, activePage, controlTypes) {
52
+ const relevantControls = [];
53
+ for (const type of controlTypes) {
54
+ const controls = controlIndex[type] ?? [];
55
+ for (const control of controls) {
56
+ const ui5Control = getControlById(control.controlId);
57
+ const parent = ui5Control?.getParent();
58
+ const isActionApplicable = isDescendantOfPage(parent, activePage);
59
+ if (isActionApplicable && ui5Control) {
60
+ // if parent control added, discard adding child control.
61
+ // Relevant for cases where wrapper exists eg: sap.m.Table exist in sap.ui.comp.smarttable.SmartTable
62
+ const parentFound = relevantControls.findIndex(relevantControl => relevantControl.getId() === ui5Control.getParent()?.getId());
63
+ if (parentFound === -1) {
64
+ relevantControls.push(ui5Control);
65
+ }
66
+ }
67
+ }
68
+ }
69
+ return relevantControls;
70
+ }
71
+ function getParentContainer(control, type) {
72
+ let currentControl = control;
73
+ while (currentControl) {
74
+ if (isA(type, currentControl)) {
75
+ return currentControl;
76
+ }
77
+ // if parent is a reusable component, use oContainer to find the parent
78
+ if (isA('sap.ui.core.Component', currentControl) && currentControl?.oContainer) {
79
+ currentControl = currentControl.oContainer.getParent();
80
+ } else {
81
+ currentControl = currentControl.getParent();
82
+ }
83
+ }
84
+ return undefined;
85
+ }
86
+ var __exports = {
87
+ __esModule: true
88
+ };
89
+ __exports.pageHasControlId = pageHasControlId;
90
+ __exports.getRelevantControlFromActivePage = getRelevantControlFromActivePage;
91
+ __exports.getParentContainer = getParentContainer;
92
+ return __exports;
93
93
  });
94
94
  //# sourceMappingURL=utils.js.map
@@ -1,6 +1,6 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
5
  });
6
6
  //# sourceMappingURL=types.js.map
@@ -1,35 +1,35 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/core/IconPool"], function (IconPool) {
4
- "use strict";
5
-
6
- /**
7
- * Get ui5 icons.
8
- *
9
- * @returns IconDetails[]
10
- */
11
- function getIcons() {
12
- return IconPool.getIconNames('undefined').map(icon => {
13
- const iconInfo = IconPool.getIconInfo(icon);
14
- return {
15
- name: icon.toLowerCase(),
16
- content: iconInfo.content,
17
- fontFamily: iconInfo.fontFamily
18
- };
19
- }).sort((item1, item2) => {
20
- if (item1.name < item2.name) {
21
- return -1;
22
- }
23
- if (item1.name > item2.name) {
24
- return 1;
25
- }
26
- return 0;
27
- });
28
- }
29
- var __exports = {
30
- __esModule: true
31
- };
32
- __exports.getIcons = getIcons;
33
- return __exports;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/core/IconPool"], function (IconPool) {
4
+ "use strict";
5
+
6
+ /**
7
+ * Get ui5 icons.
8
+ *
9
+ * @returns IconDetails[]
10
+ */
11
+ function getIcons() {
12
+ return IconPool.getIconNames('undefined').map(icon => {
13
+ const iconInfo = IconPool.getIconInfo(icon);
14
+ return {
15
+ name: icon.toLowerCase(),
16
+ content: iconInfo.content,
17
+ fontFamily: iconInfo.fontFamily
18
+ };
19
+ }).sort((item1, item2) => {
20
+ if (item1.name < item2.name) {
21
+ return -1;
22
+ }
23
+ if (item1.name > item2.name) {
24
+ return 1;
25
+ }
26
+ return 0;
27
+ });
28
+ }
29
+ var __exports = {
30
+ __esModule: true
31
+ };
32
+ __exports.getIcons = getIcons;
33
+ return __exports;
34
34
  });
35
35
  //# sourceMappingURL=ui5-utils.js.map