@openui5/sap.ui.mdc 1.98.0 → 1.101.0

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 (267) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +6 -3
  5. package/src/sap/ui/mdc/AggregationBaseDelegate.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +186 -102
  7. package/src/sap/ui/mdc/ChartDelegate.js +85 -30
  8. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  9. package/src/sap/ui/mdc/Control.js +11 -6
  10. package/src/sap/ui/mdc/Element.js +10 -6
  11. package/src/sap/ui/mdc/Field.js +19 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  14. package/src/sap/ui/mdc/FilterField.js +41 -3
  15. package/src/sap/ui/mdc/Link.js +22 -4
  16. package/src/sap/ui/mdc/LinkDelegate.js +9 -7
  17. package/src/sap/ui/mdc/MultiValueField.js +30 -6
  18. package/src/sap/ui/mdc/Table.js +332 -316
  19. package/src/sap/ui/mdc/TableDelegate.js +146 -31
  20. package/src/sap/ui/mdc/ValueHelp.js +136 -624
  21. package/src/sap/ui/mdc/ValueHelpDelegate.js +154 -7
  22. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartToolbar.js +56 -11
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +24 -10
  27. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  29. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  30. package/src/sap/ui/mdc/condition/Condition.js +14 -9
  31. package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
  32. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  34. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +393 -68
  35. package/src/sap/ui/mdc/condition/Operator.js +14 -2
  36. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  37. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  38. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  39. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +6 -0
  41. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
  42. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  43. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +36 -9
  44. package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
  45. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  46. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  47. package/src/sap/ui/mdc/field/ConditionType.js +44 -13
  48. package/src/sap/ui/mdc/field/ConditionsType.js +3 -1
  49. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  50. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  51. package/src/sap/ui/mdc/field/DefineConditionPanel.js +31 -9
  52. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  53. package/src/sap/ui/mdc/field/FieldBase.js +69 -14
  54. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
  55. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  56. package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
  57. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldValueHelp.js +9 -4
  61. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  69. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  70. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  71. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  72. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  73. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  74. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  75. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  76. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  77. package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
  78. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  79. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  80. package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
  81. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  82. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +137 -216
  83. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  84. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
  85. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  86. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
  87. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
  88. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +144 -64
  89. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  90. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  91. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
  93. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  94. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +7 -42
  96. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  97. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
  98. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
  99. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  101. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  102. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +5 -5
  104. package/src/sap/ui/mdc/library.js +41 -30
  105. package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
  106. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  107. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  108. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  109. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  110. package/src/sap/ui/mdc/link/ContactDetailsRenderer.js +26 -0
  111. package/src/sap/ui/mdc/link/Factory.js +1 -1
  112. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  113. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  114. package/src/sap/ui/mdc/link/Log.js +1 -1
  115. package/src/sap/ui/mdc/link/Panel.js +205 -29
  116. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  117. package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
  118. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  120. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  121. package/src/sap/ui/mdc/messagebundle.properties +59 -6
  122. package/src/sap/ui/mdc/messagebundle_ar.properties +40 -6
  123. package/src/sap/ui/mdc/messagebundle_bg.properties +58 -24
  124. package/src/sap/ui/mdc/messagebundle_ca.properties +40 -6
  125. package/src/sap/ui/mdc/messagebundle_cs.properties +40 -6
  126. package/src/sap/ui/mdc/messagebundle_cy.properties +40 -6
  127. package/src/sap/ui/mdc/messagebundle_da.properties +40 -6
  128. package/src/sap/ui/mdc/messagebundle_de.properties +40 -6
  129. package/src/sap/ui/mdc/messagebundle_el.properties +39 -5
  130. package/src/sap/ui/mdc/messagebundle_en.properties +40 -6
  131. package/src/sap/ui/mdc/messagebundle_en_GB.properties +40 -6
  132. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +40 -6
  133. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +68 -9
  134. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +41 -7
  135. package/src/sap/ui/mdc/messagebundle_es.properties +40 -6
  136. package/src/sap/ui/mdc/messagebundle_es_MX.properties +41 -7
  137. package/src/sap/ui/mdc/messagebundle_et.properties +40 -6
  138. package/src/sap/ui/mdc/messagebundle_fi.properties +40 -6
  139. package/src/sap/ui/mdc/messagebundle_fr.properties +41 -7
  140. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +40 -6
  141. package/src/sap/ui/mdc/messagebundle_hi.properties +40 -6
  142. package/src/sap/ui/mdc/messagebundle_hr.properties +40 -6
  143. package/src/sap/ui/mdc/messagebundle_hu.properties +40 -6
  144. package/src/sap/ui/mdc/messagebundle_id.properties +40 -6
  145. package/src/sap/ui/mdc/messagebundle_it.properties +41 -7
  146. package/src/sap/ui/mdc/messagebundle_iw.properties +39 -5
  147. package/src/sap/ui/mdc/messagebundle_ja.properties +41 -7
  148. package/src/sap/ui/mdc/messagebundle_kk.properties +40 -6
  149. package/src/sap/ui/mdc/messagebundle_ko.properties +39 -5
  150. package/src/sap/ui/mdc/messagebundle_lt.properties +40 -6
  151. package/src/sap/ui/mdc/messagebundle_lv.properties +44 -10
  152. package/src/sap/ui/mdc/messagebundle_ms.properties +40 -6
  153. package/src/sap/ui/mdc/messagebundle_nl.properties +40 -6
  154. package/src/sap/ui/mdc/messagebundle_no.properties +40 -6
  155. package/src/sap/ui/mdc/messagebundle_pl.properties +40 -6
  156. package/src/sap/ui/mdc/messagebundle_pt.properties +41 -7
  157. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +40 -6
  158. package/src/sap/ui/mdc/messagebundle_ro.properties +40 -6
  159. package/src/sap/ui/mdc/messagebundle_ru.properties +40 -6
  160. package/src/sap/ui/mdc/messagebundle_sh.properties +43 -9
  161. package/src/sap/ui/mdc/messagebundle_sk.properties +40 -6
  162. package/src/sap/ui/mdc/messagebundle_sl.properties +41 -7
  163. package/src/sap/ui/mdc/messagebundle_sv.properties +41 -7
  164. package/src/sap/ui/mdc/messagebundle_th.properties +43 -9
  165. package/src/sap/ui/mdc/messagebundle_tr.properties +41 -7
  166. package/src/sap/ui/mdc/messagebundle_uk.properties +43 -9
  167. package/src/sap/ui/mdc/messagebundle_vi.properties +40 -6
  168. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +40 -6
  169. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +40 -6
  170. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +24 -15
  171. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  172. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  173. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  174. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
  175. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  176. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  177. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
  178. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  179. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  180. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -69
  181. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  182. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
  183. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +412 -326
  184. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  185. package/src/sap/ui/mdc/p13n/Engine.js +169 -66
  186. package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
  187. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -6
  188. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  189. package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
  190. package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
  191. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
  192. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +2 -2
  193. package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
  194. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  195. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  196. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +76 -16
  197. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  198. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  199. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  200. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  201. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  202. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
  203. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
  204. package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
  205. package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
  206. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +40 -12
  207. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
  208. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  209. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
  210. package/src/sap/ui/mdc/table/Column.js +271 -132
  211. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  212. package/src/sap/ui/mdc/table/GridTableType.js +75 -27
  213. package/src/sap/ui/mdc/table/PropertyHelper.js +71 -95
  214. package/src/sap/ui/mdc/table/ResponsiveTableType.js +121 -40
  215. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  216. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  217. package/src/sap/ui/mdc/table/TableSettings.js +10 -22
  218. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  219. package/src/sap/ui/mdc/table/menu/Item.js +78 -0
  220. package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
  221. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
  222. package/src/sap/ui/mdc/themes/base/Chart.less +6 -0
  223. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  224. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  225. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +4 -3
  226. package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
  227. package/src/sap/ui/mdc/ui/Container.js +0 -240
  228. package/src/sap/ui/mdc/util/DateUtil.js +32 -7
  229. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  230. package/src/sap/ui/mdc/util/FormatUtil.js +2 -2
  231. package/src/sap/ui/mdc/util/IdentifierUtil.js +7 -7
  232. package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
  233. package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
  234. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  235. package/src/sap/ui/mdc/valuehelp/Dialog.js +234 -44
  236. package/src/sap/ui/mdc/valuehelp/Popover.js +7 -4
  237. package/src/sap/ui/mdc/valuehelp/base/Container.js +63 -48
  238. package/src/sap/ui/mdc/valuehelp/base/Content.js +35 -16
  239. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  240. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +161 -284
  241. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +4 -4
  242. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  243. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
  244. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
  245. package/src/sap/ui/mdc/valuehelp/content/ListCollection.js +205 -0
  246. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +67 -66
  247. package/src/sap/ui/mdc/valuehelp/content/MTable.js +94 -185
  248. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
  249. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
  250. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
  251. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
  252. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +8 -8
  253. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +43 -27
  254. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  255. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  256. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  258. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  259. package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
  260. package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
  261. package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
  262. package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
  263. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  264. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  265. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  266. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  267. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -1,408 +0,0 @@
1
- /*
2
- * ! OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
- sap.ui.define([
7
- "./BasePanel",
8
- "sap/m/Label",
9
- "sap/m/ColumnListItem",
10
- "sap/m/HBox",
11
- "sap/m/VBox",
12
- "sap/ui/core/Icon",
13
- "sap/ui/core/library",
14
- "sap/m/Text",
15
- "sap/m/Column",
16
- "sap/m/Table",
17
- "sap/m/library",
18
- "sap/m/ToolbarSpacer",
19
- "sap/m/Button",
20
- "sap/m/OverflowToolbar",
21
- "sap/ui/model/Filter"
22
- ], function(BasePanel, Label, ColumnListItem, HBox, VBox, Icon, coreLibrary, Text, Column, Table, mLibrary, ToolbarSpacer, Button, OverflowToolbar, Filter) {
23
- "use strict";
24
-
25
- // shortcut for sap.m.ListKeyboardMode
26
- var ListKeyboardMode = mLibrary.ListKeyboardMode;
27
-
28
- // shortcut for sap.m.FlexJustifyContent
29
- var FlexJustifyContent = mLibrary.FlexJustifyContent;
30
-
31
- // shortcut for sap.m.ListType
32
- var ListType = mLibrary.ListType;
33
-
34
- // shortcut for sap.ui.core.IconColor;
35
- var IconColor = coreLibrary.IconColor;
36
-
37
- /**
38
- * Constructor for a new ListView
39
- *
40
- * @param {string} [sId] ID for the new control, generated automatically if no ID is given
41
- * @param {object} [mSettings] initial settings for the new control
42
- * @class The ListView is a list based view to personalize selection and ordering of a Control aggregation.
43
- * @extends sap.ui.mdc.p13n.panels.BasePanel
44
- * @author SAP SE
45
- * @private
46
- * @experimental
47
- * @since 1.85
48
- * @alias sap.ui.mdc.p13n.panels.ListView
49
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
50
- */
51
- var ListView = BasePanel.extend("sap.ui.mdc.p13n.panels.ListView", {
52
- metadata: {
53
- library: "sap.ui.mdc",
54
- properties: {
55
- /**
56
- * Shows an additional header with a SearchField and 'Show Selected' button
57
- */
58
- showHeader: {
59
- type: "boolean",
60
- defaultValue: false
61
- },
62
- /**
63
- * Enables a count for selected items compared to available items as '<fields> (3 / 12)' in addition
64
- * for the first provided column text
65
- */
66
- enableCount: {
67
- type: "boolean",
68
- defaultValue: false
69
- }
70
- }
71
- },
72
- renderer: {
73
- apiVersion: 2
74
- }
75
- });
76
-
77
- ListView.prototype.applySettings = function(){
78
- this.setTemplate(this._getListTemplate());
79
- BasePanel.prototype.applySettings.apply(this, arguments);
80
- this.addStyleClass("sapUiMDCListView");
81
-
82
- this._aInitializedFields = [];
83
-
84
- //Do not show the factory by default
85
- this._bShowFactory = false;
86
- this.addStyleClass("listViewHover");
87
-
88
- this.displayColumns();
89
- this.setEnableReorder(true);
90
- };
91
-
92
- ListView.prototype.setItemFactory = function(fnItemFactory) {
93
- this.setProperty("itemFactory", fnItemFactory);
94
- this._oListControl.setGrowing(!!fnItemFactory);
95
- return this;
96
- };
97
-
98
- ListView.prototype._getListTemplate = function() {
99
- return new ColumnListItem({
100
- selected: "{" + this.P13N_MODEL + ">visible}",
101
- type: ListType.Active,
102
- cells: [
103
- new VBox({
104
- items: [
105
- new Label({
106
- wrapping: true,
107
- required: "{" + this.P13N_MODEL + ">required}",
108
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
109
- text: "{" + this.P13N_MODEL + ">label}"
110
- })
111
- ]
112
- }),
113
- new HBox({
114
- justifyContent: FlexJustifyContent.Center,
115
- items: [
116
- new Icon({
117
- src: "sap-icon://circle-task-2",
118
- size: "0.5rem",
119
- color: IconColor.Neutral,
120
- visible: {
121
- path: this.P13N_MODEL + ">isFiltered",
122
- formatter: function(bIsFiltered) {
123
- if (bIsFiltered){
124
- return true;
125
- } else {
126
- return false;
127
- }
128
- }
129
- }
130
- })
131
- ]
132
- })
133
- ]
134
- });
135
- };
136
-
137
- ListView.prototype.setShowHeader = function(bShowHeader) {
138
- if (bShowHeader){
139
- var sShowSelected = this.getResourceText("p13nDialog.SHOW_SELECTED");
140
- var sShowAll = this.getResourceText("p13nDialog.SHOW_ALL");
141
- this._oListControl.setHeaderToolbar(new OverflowToolbar({
142
- content: [
143
- this._getSearchField(),
144
- new ToolbarSpacer(),
145
- new Button({
146
- press: function(oEvt){
147
- this._bShowSelected = oEvt.getSource().getText() == sShowSelected;
148
- this._filterList(this._bShowSelected, this._sSearch);
149
- oEvt.getSource().setText(this._bShowSelected ? sShowAll : sShowSelected);
150
- }.bind(this),
151
- text: sShowSelected
152
- })
153
- ]
154
- }));
155
- }
156
-
157
- this.setProperty("showHeader", bShowHeader);
158
-
159
- return this;
160
- };
161
-
162
- ListView.prototype._filterList = function(bShowSelected, sSarch) {
163
- var oSearchFilter = [], oSelectedFilter = [];
164
- if (bShowSelected) {
165
- oSelectedFilter = new Filter(this._getPresenceAttribute(), "EQ", true);
166
- }
167
- if (sSarch) {
168
- oSearchFilter = new Filter("label", "Contains", sSarch);
169
- }
170
- this._oListControl.getBinding("items").filter(new Filter([].concat(oSelectedFilter, oSearchFilter), true));
171
- };
172
-
173
- ListView.prototype._onSearchFieldLiveChange = function(oEvent) {
174
- this._sSearch = oEvent.getSource().getValue();
175
- this._filterList(this._bShowSelected, this._sSearch);
176
- };
177
-
178
- ListView.prototype._handleActivated = function(oHoveredItem) {
179
- //remove move buttons if unselected item is hovered (not covered by updateStarted)
180
- this.removeMoveButtons();
181
-
182
- //Check if the prior hovered item had a visible icon and renable it if required
183
- if (this._oHoveredItem && this._oHoveredItem.getBindingContextPath()){
184
- var bVisible = !!this.getP13nModel().getProperty(this._oHoveredItem.getBindingContextPath()).isFiltered;
185
- var oOldIcon = this._oHoveredItem.getCells()[1].getItems()[0];
186
- oOldIcon.setVisible(bVisible);
187
- }
188
-
189
- //Store (new) hovered item and set its icon to visible: false + add move buttons to it
190
- var oIcon = oHoveredItem.getCells()[1].getItems()[0];
191
- oIcon.setVisible(false);
192
- this._oHoveredItem = oHoveredItem;
193
- this._updateEnableOfMoveButtons(oHoveredItem, false);
194
- this._addMoveButtons(oHoveredItem);
195
- };
196
-
197
- ListView.prototype.removeMoveButtons = function() {
198
- var oMoveButtonBox = this._getMoveButtonContainer();
199
-
200
- if (oMoveButtonBox){
201
- oMoveButtonBox.removeItem(this._getMoveTopButton());
202
- oMoveButtonBox.removeItem(this._getMoveUpButton());
203
- oMoveButtonBox.removeItem(this._getMoveDownButton());
204
- oMoveButtonBox.removeItem(this._getMoveBottomButton());
205
- }
206
-
207
- };
208
-
209
- ListView.prototype._getMoveButtonContainer = function() {
210
- if (this._oMoveBottomButton &&
211
- this._oMoveBottomButton.getParent() &&
212
- this._oMoveBottomButton.getParent().isA("sap.m.FlexBox")
213
- ){
214
- return this._oMoveBottomButton.getParent();
215
- }
216
- };
217
-
218
- ListView.prototype.showFactory = function(bShow) {
219
-
220
- this._bShowFactory = bShow;
221
- this.displayColumns();
222
-
223
- if (bShow){
224
- this.removeStyleClass("listViewHover");
225
- this._oListControl.setKeyboardMode(ListKeyboardMode.Edit); //--> tab through editable fields (fields shown)
226
- this._addFactoryControl();
227
- } else {
228
- this.addStyleClass("listViewHover");
229
- this._oListControl.setKeyboardMode(ListKeyboardMode.Navigation); //--> tab through list items (fields hidden)
230
- this._removeFactoryControl();
231
- }
232
- };
233
-
234
- ListView.prototype._updateCount = function() {
235
- this.getP13nModel().setProperty("/selectedItems", this._oListControl.getSelectedContexts(true).length);
236
- };
237
-
238
- ListView.prototype._selectTableItem = function(oTableItem, bSelectAll) {
239
- BasePanel.prototype._selectTableItem.apply(this, arguments);
240
- this._updateCount();
241
- };
242
-
243
- ListView.prototype.setP13nModel = function(oModel) {
244
- this.setModel(oModel, "$p13n");
245
- this._updateCount();
246
- this.setPanelMode(true);
247
- this._getDragDropConfig().setEnabled(this.getEnableReorder());
248
- };
249
-
250
- ListView.prototype._removeFactoryControl = function() {
251
- var aItems = this._oListControl.getItems().filter(function(oItem) {
252
- return !oItem._bGroupHeader;
253
- });
254
-
255
- aItems.forEach(function(oItem){
256
- var oFirstCell = oItem.getCells()[0];
257
- if (oFirstCell.getItems().length > 1){
258
- oFirstCell.removeItem(oFirstCell.getItems()[1]);
259
- }
260
- });
261
- this.removeStyleClass("sapUiMDCAFLabelMarkingList");
262
-
263
- return this._aInitializedFields;
264
-
265
- };
266
-
267
- ListView.prototype._moveSelectedItem = function(){
268
- this._oSelectedItem = this._getMoveButtonContainer().getParent();
269
- BasePanel.prototype._moveSelectedItem.apply(this, arguments);
270
- };
271
-
272
- ListView.prototype.getShowFactory = function() {
273
- return this._bShowFactory;
274
- };
275
-
276
- ListView.prototype.displayColumns = function() {
277
-
278
- var aColumns = [
279
- this.getResourceText("p13nDialog.LIST_VIEW_COLUMN")
280
- ];
281
-
282
- if (!this._bShowFactory) {
283
- aColumns.push(new Column({
284
- width: "25%",
285
- hAlign: "Center",
286
- vAlign: "Middle",
287
- header: new Text({
288
- text: this.getResourceText("p13nDialog.LIST_VIEW_ACTIVE")
289
- })
290
- }));
291
- }
292
-
293
- this.setPanelColumns(aColumns);
294
- };
295
-
296
- ListView.prototype.setPanelColumns = function(aColumns) {
297
- this._sText = aColumns[0];
298
- var bEnableCount = this.getEnableCount();
299
-
300
- if (bEnableCount) {
301
- var oColumn = new Column({
302
- header: new Text({
303
- text: {
304
- parts: [
305
- {
306
- path: this.P13N_MODEL + '>/selectedItems'
307
- }, {
308
- path: this.P13N_MODEL + '>/items'
309
- }
310
- ],
311
- formatter: function(iSelected, aAll) {
312
- return this._sText + " " + this.getResourceText('p13nDialog.HEADER_COUNT', [
313
- iSelected, aAll.length
314
- ]);
315
- }.bind(this)
316
- }
317
- })
318
- });
319
- aColumns[0] = oColumn;
320
- }
321
-
322
- BasePanel.prototype.setPanelColumns.apply(this, arguments);
323
- };
324
-
325
- ListView.prototype._addFactoryControl = function(oList) {
326
-
327
- this._oListControl.getItems().forEach(function(oItem){
328
- var oContext = oItem.getBindingContext(this.P13N_MODEL);
329
- var oField = this.getItemFactory().call(this, oContext);
330
- var oCell = oItem.getCells()[0];
331
- oCell.addItem(oField);
332
- }.bind(this));
333
-
334
- this.addStyleClass("sapUiMDCAFLabelMarkingList");
335
- };
336
-
337
- ListView.prototype._createInnerListControl = function() {
338
- return new Table(this.getId() + "-innerListViewTable", Object.assign({
339
- growing: false,
340
- growingThreshold: 25,
341
- growingScrollToLoad: true,
342
- updateStarted: function() {
343
- this.removeMoveButtons();
344
- this._removeFactoryControl();
345
- }.bind(this),
346
- updateFinished: function() {
347
- if (this.getShowFactory()) {
348
- this._addFactoryControl();
349
- }
350
- }.bind(this)
351
- }, this._getListControlConfig()));
352
- };
353
-
354
- ListView.prototype.getSelectedFields = function() {
355
- var aSelectedItems = [];
356
- this._loopItems(this._oListControl, function(oItem, sKey){
357
- if (oItem.getSelected()){
358
- aSelectedItems.push(sKey);
359
- }
360
- });
361
-
362
- return aSelectedItems;
363
- };
364
-
365
- ListView.prototype._loopItems = function(oList, fnItemCallback) {
366
- oList.getItems().forEach(function(oItem){
367
-
368
- var sPath = oItem.getBindingContextPath();
369
- var sKey = this.getP13nModel().getProperty(sPath).name;
370
-
371
- fnItemCallback.call(this, oItem, sKey);
372
- }.bind(this));
373
- };
374
-
375
- ListView.prototype.filterWithoutDestroy = function(aFilter) {
376
- if (this._oListControl.getBinding("items")){
377
- this._oListControl.getBinding("items").filter(aFilter, true);
378
- }
379
- };
380
-
381
- ListView.prototype._addMoveButtons = function(oItem) {
382
- var oTableItem = oItem;
383
- if (!oTableItem){
384
- return;
385
- }
386
-
387
- var bItemSelected = this.getP13nModel().getProperty(oTableItem.getBindingContextPath()).visible;
388
-
389
- if (bItemSelected){
390
- oTableItem.getCells()[1].addItem(this._getMoveTopButton());
391
- oTableItem.getCells()[1].addItem(this._getMoveUpButton());
392
- oTableItem.getCells()[1].addItem(this._getMoveDownButton());
393
- oTableItem.getCells()[1].addItem(this._getMoveBottomButton());
394
- }
395
- };
396
-
397
- ListView.prototype.exit = function() {
398
- BasePanel.prototype.exit.apply(this, arguments);
399
- this._aInitializedFields = null;
400
- this._oHoveredItem = null;
401
- this._bShowFactory = null;
402
- this._sSearch = null;
403
- this._bShowSelected = null;
404
- };
405
-
406
- return ListView;
407
-
408
- });
@@ -1,92 +0,0 @@
1
- /*
2
- * ! OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
- sap.ui.define([
7
- "./BasePanel", "sap/m/Label", "sap/m/ColumnListItem", "sap/m/HBox", "sap/m/VBox", "sap/ui/model/Filter"
8
- ], function(BasePanel, Label, ColumnListItem, HBox, VBox, Filter) {
9
- "use strict";
10
-
11
- /**
12
- * Constructor for SelectionPanel
13
- *
14
- * @param {string} [sId] ID for the new control, generated automatically if no ID is given
15
- * @param {object} [mSettings] initial settings for the new control
16
- * @class TODO
17
- * <h3><b>Note:</b></h3>
18
- * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
19
- * @extends sap.ui.mdc.p13n.panels.BasePanel
20
- * @author SAP SE
21
- * @private
22
- * @experimental
23
- * @since 1.66
24
- * @alias sap.ui.mdc.p13n.panels.SelectionPanel
25
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
26
- */
27
- var SelectionPanel = BasePanel.extend("sap.ui.mdc.p13n.panels.SelectionPanel", {
28
- metadata: {
29
- library: "sap.ui.mdc"
30
- },
31
- init: function() {
32
-
33
- // Initialize the BasePanel
34
- BasePanel.prototype.init.apply(this, arguments);
35
-
36
- this.setPanelColumns(this.getResourceText("fieldsui.COLUMNS"));
37
-
38
- },
39
- renderer: {}
40
- });
41
-
42
- SelectionPanel.prototype.setP13nModel = function(oModel) {
43
- BasePanel.prototype.setP13nModel.apply(this, arguments);
44
-
45
- var oSelectionPanelTemplate = new ColumnListItem({
46
- selected: "{" + this.P13N_MODEL + ">" + this._getPresenceAttribute() + "}",
47
- cells: new VBox({
48
- items: [
49
- new Label({
50
- design: {
51
- path: this.P13N_MODEL + ">groupLabel",
52
- formatter: function(sGroupLabel){
53
- return sGroupLabel ? "Bold" : "Standard";
54
- }
55
- },
56
- wrapping: true,
57
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
58
- text: "{" + this.P13N_MODEL + ">label}"
59
- }),
60
- new Label({
61
- visible: {
62
- path: this.P13N_MODEL + ">groupLabel",
63
- formatter: function(sGroupLabel){
64
- return sGroupLabel ? true : false;
65
- }
66
- },
67
- wrapping: true,
68
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
69
- text: "{" + this.P13N_MODEL + ">groupLabel}"
70
- })
71
-
72
- ]
73
- })
74
-
75
- });
76
-
77
- this.setTemplate(oSelectionPanelTemplate);
78
- };
79
-
80
- SelectionPanel.prototype._onSearchFieldLiveChange = function(oEvent) {
81
- //TODO: implement in BasePanel
82
- var aFilters = new Filter([
83
- new Filter("label", "Contains", oEvent.getSource().getValue()),
84
- new Filter("groupLabel", "Contains", oEvent.getSource().getValue())
85
- ]);
86
-
87
- this._oListControl.getBinding("items").filter(aFilters, false);
88
- };
89
-
90
- return SelectionPanel;
91
-
92
- });
@@ -1,150 +0,0 @@
1
- /*
2
- * ! OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
- sap.ui.define([
7
- "./BasePanel", "sap/m/ColumnListItem", "sap/m/Label", "sap/m/Select", "sap/ui/core/Item", "sap/m/HBox", "sap/m/VBox", "sap/ui/model/Filter"
8
- ], function(BasePanel, ColumnListItem, Label, Select, Item, HBox, VBox, Filter) {
9
- "use strict";
10
-
11
- /**
12
- * Constructor for SortPanel
13
- *
14
- * @param {string} [sId] ID for the new control, generated automatically if no ID is given
15
- * @param {object} [mSettings] initial settings for the new control
16
- * @class TODO
17
- * <h3><b>Note:</b></h3>
18
- * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
19
- * @extends sap.ui.mdc.p13n.panels.BasePanel
20
- * @author SAP SE
21
- * @private
22
- * @experimental
23
- * @since 1.66
24
- * @alias sap.ui.mdc.p13n.panels.SortPanel
25
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
26
- */
27
- var SortPanel = BasePanel.extend("sap.ui.mdc.p13n.panels.SortPanel", {
28
- metadata: {
29
- library: "sap.ui.mdc"
30
- },
31
- init: function() {
32
- // Initialize the BasePanel
33
- BasePanel.prototype.init.apply(this, arguments);
34
-
35
- var oSortPanelTemplate = new ColumnListItem({
36
- selected: "{" + this.P13N_MODEL + ">sorted}",
37
- cells: [
38
- new VBox({
39
- items: [
40
- new Label({
41
- design: {
42
- path: this.P13N_MODEL + ">groupLabel",
43
- formatter: function(sGroupLabel){
44
- return sGroupLabel ? "Bold" : "Standard";
45
- }
46
- },
47
- wrapping: true,
48
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
49
- text: "{" + this.P13N_MODEL + ">label}"
50
- }),
51
- new Label({
52
- visible: {
53
- path: this.P13N_MODEL + ">groupLabel",
54
- formatter: function(sGroupLabel){
55
- return sGroupLabel ? true : false;
56
- }
57
- },
58
- wrapping: true,
59
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
60
- text: "{" + this.P13N_MODEL + ">groupLabel}"
61
- })
62
-
63
- ]
64
- }),
65
- new Select("IDsortOrderSelect", {
66
- width: "100%",
67
- selectedKey: "{" + this.P13N_MODEL + ">descending}",
68
- change: [this.onChangeOfSortOrder, this],
69
- enabled: {
70
- path: this.P13N_MODEL + ">sorted",
71
- formatter: function(bEnabled) {
72
- return !!bEnabled;
73
- }
74
- },
75
- items: [
76
- new Item({
77
- key: false,
78
- text: this.getResourceText("sort.PERSONALIZATION_DIALOG_OPTION_ASCENDING")
79
- }),
80
- new Item({
81
- key: true,
82
- text: this.getResourceText("sort.PERSONALIZATION_DIALOG_OPTION_DESCENDING")
83
- })
84
- ]
85
- })
86
- ]
87
- });
88
-
89
- this.setTemplate(oSortPanelTemplate);
90
- this.setPanelColumns([
91
- this.getResourceText("sort.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION"), this.getResourceText("sort.PERSONALIZATION_DIALOG_COLUMN_SORTORDER")
92
- ]);
93
- },
94
- renderer: {}
95
- });
96
-
97
- SortPanel.prototype._filterBySelected = function(bShowSelected) {
98
- this._oListControl.getBinding("items").filter(bShowSelected ? new Filter("sorted", "EQ", true) : []);
99
- };
100
-
101
- SortPanel.prototype._updateModelItems = function() {
102
- // Sort and update the model items to ensure selected ones, are at the top
103
- var aFields = this.getP13nModel().getProperty("/items");
104
- var aSelectedFields = [], aOtherFields = [];
105
- aFields.forEach(function(oField) {
106
- if (oField.sorted) {
107
- aSelectedFields.push(oField);
108
- } else {
109
- aOtherFields.push(oField);
110
- }
111
- });
112
- this.getP13nModel().setProperty("/items", aSelectedFields.concat(aOtherFields));
113
- };
114
-
115
- SortPanel.prototype.onChangeOfSortOrder = function(oEvent) {
116
- var oSelectedItem = oEvent.getParameter("selectedItem");
117
- // Fire event only for valid selection
118
- if (oSelectedItem) {
119
- var oBindingContext = oSelectedItem.getBindingContext(this.P13N_MODEL);
120
- if (oBindingContext) {
121
- var sPath = oBindingContext.getPath();
122
-
123
- //convert stringified boolean back to boolean instance type
124
- this.getP13nModel().setProperty(sPath + "/descending", oSelectedItem.getKey() === "true");
125
- }
126
- this.fireChange();
127
- }
128
- };
129
-
130
- SortPanel.prototype._onSearchFieldLiveChange = function(oEvent) {
131
- //TODO: implement in BasePanel
132
- var aFilters = new Filter([
133
- new Filter("label", "Contains", oEvent.getSource().getValue()),
134
- new Filter("groupLabel", "Contains", oEvent.getSource().getValue())
135
- ]);
136
-
137
- this._oListControl.getBinding("items").filter(aFilters, false);
138
- };
139
-
140
- SortPanel.prototype._onPressToggleMode = function(oEvent) {
141
- var aPanelColumns = this.getPanelMode() ?
142
- [this.getResourceText("sort.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION"), this.getResourceText("sort.PERSONALIZATION_DIALOG_COLUMN_SORTORDER")] :
143
- this.getResourceText("sort.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION");
144
- this.setPanelColumns(aPanelColumns);
145
- this._togglePanelMode();
146
- };
147
-
148
- return SortPanel;
149
-
150
- });