@hermes-ui/angular 0.1.4

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 (539) hide show
  1. package/README.md +52 -0
  2. package/accordion/_accordion.clarity.scss +81 -0
  3. package/accordion/_properties.accordion.scss +45 -0
  4. package/accordion/_variables.accordion.scss +91 -0
  5. package/addons/a11y/README.md +157 -0
  6. package/addons/a11y/forms/required-field-legend.component.scss +17 -0
  7. package/addons/card-container/card/appfx-card.component.scss +137 -0
  8. package/addons/card-container/container/appfx-card-container.component.scss +17 -0
  9. package/addons/card-container/settings/appfx-card-container-settings.component.scss +62 -0
  10. package/addons/certificate-viewer/certificate-viewer/certificate-viewer.component.scss +69 -0
  11. package/addons/certificate-viewer/certificate-viewer-details/certificate-viewer-details.component.scss +49 -0
  12. package/addons/certificate-viewer/certificate-viewer-general/certificate-viewer-general.component.scss +38 -0
  13. package/addons/datagrid/README.md +289 -0
  14. package/addons/datagrid/addons/action-bar/datagrid-action-bar.component.scss +81 -0
  15. package/addons/datagrid/addons/column-toggle/datagrid-column-toggle.component.scss +99 -0
  16. package/addons/datagrid/addons/export/export-datagrid.component.scss +9 -0
  17. package/addons/datagrid/datagrid.component.scss +339 -0
  18. package/addons/datagrid-filters/README.md +223 -0
  19. package/addons/datagrid-filters/advanced-filters/date-time-filter.component.scss +10 -0
  20. package/addons/datagrid-filters/advanced-filters/enum-filter.component.scss +40 -0
  21. package/addons/datagrid-filters/advanced-filters/users-filter.component.scss +11 -0
  22. package/addons/datagrid-filters/common-styles.scss +98 -0
  23. package/addons/datagrid-filters/composite-filters.component.scss +26 -0
  24. package/addons/datagrid-filters/datagrid-filters.component.scss +22 -0
  25. package/addons/datagrid-filters/manage-filters/manage-filter.component.scss +42 -0
  26. package/addons/dialog/README.md +112 -0
  27. package/addons/dialog/multi-page-dialog.a11y.scss +203 -0
  28. package/addons/dialog/multi-page-dialog.component.scss +102 -0
  29. package/addons/dialog/toggle-component/toggle.component.scss +15 -0
  30. package/addons/drag-and-drop/README.md +48 -0
  31. package/addons/menu/menu.component.scss +120 -0
  32. package/addons/property-view/components/property-view-category.component.scss +38 -0
  33. package/addons/property-view/components/property-view-message.component.scss +48 -0
  34. package/addons/property-view/components/property-view-property.component.scss +122 -0
  35. package/addons/property-view/components/property-view-section.component.scss +59 -0
  36. package/addons/property-view/components/property-view.component.scss +23 -0
  37. package/addons/stepper/stepper.component.scss +53 -0
  38. package/addons/tabs/tab-links/tab-links.component.scss +61 -0
  39. package/addons/tabs/tabs.a11y.scss +26 -0
  40. package/addons/tabs/tabs.component.scss +95 -0
  41. package/addons/theme-builder/README.md +70 -0
  42. package/addons/theme-builder/theme-builder.component.scss +194 -0
  43. package/addons/translate/README.md +124 -0
  44. package/addons/var/debug/workflow-model-monitor.component.scss +50 -0
  45. package/addons/var/error/error.component.scss +38 -0
  46. package/addons/var/spinner/spinner.component.scss +33 -0
  47. package/addons/wizard/summary/summary.component.scss +22 -0
  48. package/addons/wizard/wizard.component.scss +251 -0
  49. package/button/_buttons.clarity.scss +388 -0
  50. package/button/_mixins.buttons.scss +241 -0
  51. package/button/_properties.buttons.scss +387 -0
  52. package/button/_properties.toggles.scss +35 -0
  53. package/button/_variables.buttons.scss +905 -0
  54. package/button/_variables.toggles.scss +41 -0
  55. package/button/button-group/_button-group.clarity.scss +202 -0
  56. package/collapsible-panel/_mixins.collapsible-panel.scss +189 -0
  57. package/collapsible-panel/_properties.collapsible-panel.scss +42 -0
  58. package/collapsible-panel/_variables.collapsible-panel.scss +40 -0
  59. package/data/_mixins.tables.scss +114 -0
  60. package/data/_properties.tables.scss +77 -0
  61. package/data/_tables.clarity.scss +120 -0
  62. package/data/_variables.tables.scss +42 -0
  63. package/data/datagrid/_datagrid.clarity.scss +1871 -0
  64. package/data/datagrid/_mixins.datagrid.scss +102 -0
  65. package/data/datagrid/_properties.datagrid.scss +98 -0
  66. package/data/datagrid/_variables.datagrid.scss +98 -0
  67. package/data/stack-view/_properties.stack-view.scss +50 -0
  68. package/data/stack-view/_stack-view.clarity.scss +267 -0
  69. package/data/stack-view/_variables.stack-view.scss +32 -0
  70. package/data/tree-view/_properties.tree-view.scss +41 -0
  71. package/data/tree-view/_tree-view.clarity.scss +281 -0
  72. package/data/tree-view/_variables.tree-view.scss +51 -0
  73. package/emphasis/alert/_alert.clarity.scss +467 -0
  74. package/emphasis/alert/_mixins.alert.scss +96 -0
  75. package/emphasis/alert/_properties.alert.scss +183 -0
  76. package/emphasis/alert/_variables.alert.scss +502 -0
  77. package/emphasis/badge/_badges.clarity.scss +61 -0
  78. package/emphasis/badge/_mixins.bades.scss +34 -0
  79. package/emphasis/badge/_properties.badges.scss +82 -0
  80. package/emphasis/badge/_variables.badges.scss +160 -0
  81. package/emphasis/label/_labels.clarity.scss +179 -0
  82. package/emphasis/label/_mixins.label.scss +77 -0
  83. package/emphasis/label/_properties.label.scss +105 -0
  84. package/emphasis/label/_variables.label.scss +181 -0
  85. package/fesm2022/hermes-ui-angular-accordion.mjs +355 -0
  86. package/fesm2022/hermes-ui-angular-accordion.mjs.map +1 -0
  87. package/fesm2022/hermes-ui-angular-addons-a11y.mjs +544 -0
  88. package/fesm2022/hermes-ui-angular-addons-a11y.mjs.map +1 -0
  89. package/fesm2022/hermes-ui-angular-addons-card-container.mjs +1082 -0
  90. package/fesm2022/hermes-ui-angular-addons-card-container.mjs.map +1 -0
  91. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs +2520 -0
  92. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs.map +1 -0
  93. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs +2818 -0
  94. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs.map +1 -0
  95. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs +3131 -0
  96. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs.map +1 -0
  97. package/fesm2022/hermes-ui-angular-addons-dialog.mjs +386 -0
  98. package/fesm2022/hermes-ui-angular-addons-dialog.mjs.map +1 -0
  99. package/fesm2022/hermes-ui-angular-addons-drag-and-drop.mjs +78 -0
  100. package/fesm2022/hermes-ui-angular-addons-drag-and-drop.mjs.map +1 -0
  101. package/fesm2022/hermes-ui-angular-addons-menu.mjs +559 -0
  102. package/fesm2022/hermes-ui-angular-addons-menu.mjs.map +1 -0
  103. package/fesm2022/hermes-ui-angular-addons-property-view.mjs +1142 -0
  104. package/fesm2022/hermes-ui-angular-addons-property-view.mjs.map +1 -0
  105. package/fesm2022/hermes-ui-angular-addons-stepper.mjs +716 -0
  106. package/fesm2022/hermes-ui-angular-addons-stepper.mjs.map +1 -0
  107. package/fesm2022/hermes-ui-angular-addons-tabs.mjs +539 -0
  108. package/fesm2022/hermes-ui-angular-addons-tabs.mjs.map +1 -0
  109. package/fesm2022/hermes-ui-angular-addons-testing.mjs +2010 -0
  110. package/fesm2022/hermes-ui-angular-addons-testing.mjs.map +1 -0
  111. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs +922 -0
  112. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs.map +1 -0
  113. package/fesm2022/hermes-ui-angular-addons-translate.mjs +295 -0
  114. package/fesm2022/hermes-ui-angular-addons-translate.mjs.map +1 -0
  115. package/fesm2022/hermes-ui-angular-addons-var.mjs +2028 -0
  116. package/fesm2022/hermes-ui-angular-addons-var.mjs.map +1 -0
  117. package/fesm2022/hermes-ui-angular-addons-wizard.mjs +610 -0
  118. package/fesm2022/hermes-ui-angular-addons-wizard.mjs.map +1 -0
  119. package/fesm2022/hermes-ui-angular-addons-workflow-strings.mjs +121 -0
  120. package/fesm2022/hermes-ui-angular-addons-workflow-strings.mjs.map +1 -0
  121. package/fesm2022/hermes-ui-angular-addons-workflow.mjs +88 -0
  122. package/fesm2022/hermes-ui-angular-addons-workflow.mjs.map +1 -0
  123. package/fesm2022/hermes-ui-angular-button.mjs +719 -0
  124. package/fesm2022/hermes-ui-angular-button.mjs.map +1 -0
  125. package/fesm2022/hermes-ui-angular-collapsible-panel.mjs +201 -0
  126. package/fesm2022/hermes-ui-angular-collapsible-panel.mjs.map +1 -0
  127. package/fesm2022/hermes-ui-angular-data-datagrid.mjs +8045 -0
  128. package/fesm2022/hermes-ui-angular-data-datagrid.mjs.map +1 -0
  129. package/fesm2022/hermes-ui-angular-data-stack-view.mjs +442 -0
  130. package/fesm2022/hermes-ui-angular-data-stack-view.mjs.map +1 -0
  131. package/fesm2022/hermes-ui-angular-data-tree-view.mjs +1106 -0
  132. package/fesm2022/hermes-ui-angular-data-tree-view.mjs.map +1 -0
  133. package/fesm2022/hermes-ui-angular-data.mjs +40 -0
  134. package/fesm2022/hermes-ui-angular-data.mjs.map +1 -0
  135. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs +624 -0
  136. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs.map +1 -0
  137. package/fesm2022/hermes-ui-angular-emphasis-badge.mjs +69 -0
  138. package/fesm2022/hermes-ui-angular-emphasis-badge.mjs.map +1 -0
  139. package/fesm2022/hermes-ui-angular-emphasis-common.mjs +25 -0
  140. package/fesm2022/hermes-ui-angular-emphasis-common.mjs.map +1 -0
  141. package/fesm2022/hermes-ui-angular-emphasis-label.mjs +105 -0
  142. package/fesm2022/hermes-ui-angular-emphasis-label.mjs.map +1 -0
  143. package/fesm2022/hermes-ui-angular-emphasis.mjs +41 -0
  144. package/fesm2022/hermes-ui-angular-emphasis.mjs.map +1 -0
  145. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs +279 -0
  146. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs.map +1 -0
  147. package/fesm2022/hermes-ui-angular-forms-combobox.mjs +1775 -0
  148. package/fesm2022/hermes-ui-angular-forms-combobox.mjs.map +1 -0
  149. package/fesm2022/hermes-ui-angular-forms-common.mjs +1251 -0
  150. package/fesm2022/hermes-ui-angular-forms-common.mjs.map +1 -0
  151. package/fesm2022/hermes-ui-angular-forms-datalist.mjs +263 -0
  152. package/fesm2022/hermes-ui-angular-forms-datalist.mjs.map +1 -0
  153. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs +3274 -0
  154. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs.map +1 -0
  155. package/fesm2022/hermes-ui-angular-forms-file-input.mjs +826 -0
  156. package/fesm2022/hermes-ui-angular-forms-file-input.mjs.map +1 -0
  157. package/fesm2022/hermes-ui-angular-forms-input.mjs +153 -0
  158. package/fesm2022/hermes-ui-angular-forms-input.mjs.map +1 -0
  159. package/fesm2022/hermes-ui-angular-forms-native-select.mjs +153 -0
  160. package/fesm2022/hermes-ui-angular-forms-native-select.mjs.map +1 -0
  161. package/fesm2022/hermes-ui-angular-forms-number-input.mjs +236 -0
  162. package/fesm2022/hermes-ui-angular-forms-number-input.mjs.map +1 -0
  163. package/fesm2022/hermes-ui-angular-forms-password.mjs +233 -0
  164. package/fesm2022/hermes-ui-angular-forms-password.mjs.map +1 -0
  165. package/fesm2022/hermes-ui-angular-forms-radio.mjs +224 -0
  166. package/fesm2022/hermes-ui-angular-forms-radio.mjs.map +1 -0
  167. package/fesm2022/hermes-ui-angular-forms-range.mjs +186 -0
  168. package/fesm2022/hermes-ui-angular-forms-range.mjs.map +1 -0
  169. package/fesm2022/hermes-ui-angular-forms-select.mjs +606 -0
  170. package/fesm2022/hermes-ui-angular-forms-select.mjs.map +1 -0
  171. package/fesm2022/hermes-ui-angular-forms-textarea.mjs +136 -0
  172. package/fesm2022/hermes-ui-angular-forms-textarea.mjs.map +1 -0
  173. package/fesm2022/hermes-ui-angular-forms.mjs +105 -0
  174. package/fesm2022/hermes-ui-angular-forms.mjs.map +1 -0
  175. package/fesm2022/hermes-ui-angular-icon.mjs +7413 -0
  176. package/fesm2022/hermes-ui-angular-icon.mjs.map +1 -0
  177. package/fesm2022/hermes-ui-angular-layout-breadcrumbs.mjs +120 -0
  178. package/fesm2022/hermes-ui-angular-layout-breadcrumbs.mjs.map +1 -0
  179. package/fesm2022/hermes-ui-angular-layout-main-container.mjs +100 -0
  180. package/fesm2022/hermes-ui-angular-layout-main-container.mjs.map +1 -0
  181. package/fesm2022/hermes-ui-angular-layout-nav.mjs +582 -0
  182. package/fesm2022/hermes-ui-angular-layout-nav.mjs.map +1 -0
  183. package/fesm2022/hermes-ui-angular-layout-tabs.mjs +807 -0
  184. package/fesm2022/hermes-ui-angular-layout-tabs.mjs.map +1 -0
  185. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs +507 -0
  186. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs.map +1 -0
  187. package/fesm2022/hermes-ui-angular-layout.mjs +44 -0
  188. package/fesm2022/hermes-ui-angular-layout.mjs.map +1 -0
  189. package/fesm2022/hermes-ui-angular-modal.mjs +619 -0
  190. package/fesm2022/hermes-ui-angular-modal.mjs.map +1 -0
  191. package/fesm2022/hermes-ui-angular-popover-common.mjs +1371 -0
  192. package/fesm2022/hermes-ui-angular-popover-common.mjs.map +1 -0
  193. package/fesm2022/hermes-ui-angular-popover-dropdown.mjs +492 -0
  194. package/fesm2022/hermes-ui-angular-popover-dropdown.mjs.map +1 -0
  195. package/fesm2022/hermes-ui-angular-popover-signpost.mjs +494 -0
  196. package/fesm2022/hermes-ui-angular-popover-signpost.mjs.map +1 -0
  197. package/fesm2022/hermes-ui-angular-popover-tooltip.mjs +293 -0
  198. package/fesm2022/hermes-ui-angular-popover-tooltip.mjs.map +1 -0
  199. package/fesm2022/hermes-ui-angular-popover.mjs +41 -0
  200. package/fesm2022/hermes-ui-angular-popover.mjs.map +1 -0
  201. package/fesm2022/hermes-ui-angular-progress-progress-bars.mjs +217 -0
  202. package/fesm2022/hermes-ui-angular-progress-progress-bars.mjs.map +1 -0
  203. package/fesm2022/hermes-ui-angular-progress-spinner.mjs +132 -0
  204. package/fesm2022/hermes-ui-angular-progress-spinner.mjs.map +1 -0
  205. package/fesm2022/hermes-ui-angular-stepper.mjs +694 -0
  206. package/fesm2022/hermes-ui-angular-stepper.mjs.map +1 -0
  207. package/fesm2022/hermes-ui-angular-timeline.mjs +316 -0
  208. package/fesm2022/hermes-ui-angular-timeline.mjs.map +1 -0
  209. package/fesm2022/hermes-ui-angular-toast.mjs +373 -0
  210. package/fesm2022/hermes-ui-angular-toast.mjs.map +1 -0
  211. package/fesm2022/hermes-ui-angular-utils-conditional.mjs +351 -0
  212. package/fesm2022/hermes-ui-angular-utils-conditional.mjs.map +1 -0
  213. package/fesm2022/hermes-ui-angular-utils-loading.mjs +107 -0
  214. package/fesm2022/hermes-ui-angular-utils-loading.mjs.map +1 -0
  215. package/fesm2022/hermes-ui-angular-utils.mjs +2086 -0
  216. package/fesm2022/hermes-ui-angular-utils.mjs.map +1 -0
  217. package/fesm2022/hermes-ui-angular-wizard.mjs +3074 -0
  218. package/fesm2022/hermes-ui-angular-wizard.mjs.map +1 -0
  219. package/fesm2022/hermes-ui-angular.mjs +130 -0
  220. package/fesm2022/hermes-ui-angular.mjs.map +1 -0
  221. package/forms/combobox/_combobox.clarity.scss +330 -0
  222. package/forms/combobox/_properties.combobox.scss +46 -0
  223. package/forms/combobox/_variables.combobox.scss +32 -0
  224. package/forms/datepicker/_datepicker.clarity.scss +259 -0
  225. package/forms/datepicker/_mixins.datepicker.scss +89 -0
  226. package/forms/datepicker/_properties.datepicker.scss +46 -0
  227. package/forms/datepicker/_variables.datepicker.scss +74 -0
  228. package/forms/styles/_checkbox.clarity.scss +193 -0
  229. package/forms/styles/_containers.clarity.scss +230 -0
  230. package/forms/styles/_datalist.clarity.scss +47 -0
  231. package/forms/styles/_file-input.clarity.scss +134 -0
  232. package/forms/styles/_file.clarity.scss +52 -0
  233. package/forms/styles/_form.clarity.scss +87 -0
  234. package/forms/styles/_input-group.clarity.scss +126 -0
  235. package/forms/styles/_input.clarity.scss +83 -0
  236. package/forms/styles/_mixins.forms.scss +193 -0
  237. package/forms/styles/_native-select.clarity.scss +178 -0
  238. package/forms/styles/_number-input.clarity.scss +58 -0
  239. package/forms/styles/_password.clarity.scss +26 -0
  240. package/forms/styles/_properties.forms.scss +180 -0
  241. package/forms/styles/_radio.clarity.scss +120 -0
  242. package/forms/styles/_range.clarity.scss +124 -0
  243. package/forms/styles/_select.clarity.scss +158 -0
  244. package/forms/styles/_textarea.clarity.scss +71 -0
  245. package/forms/styles/_toggles.clarity.scss +209 -0
  246. package/forms/styles/_variables.forms.scss +156 -0
  247. package/hermes-ui.scss +7 -0
  248. package/icon/icon.component.scss +247 -0
  249. package/image/_icons.clarity.scss +101 -0
  250. package/image/_images.clarity.scss +42 -0
  251. package/image/_mixins.images.scss +11 -0
  252. package/layout/_card.clarity.scss +318 -0
  253. package/layout/_login.clarity.scss +240 -0
  254. package/layout/_properties.card.scss +39 -0
  255. package/layout/_properties.login.scss +32 -0
  256. package/layout/_variables.card.scss +24 -0
  257. package/layout/_variables.login.scss +22 -0
  258. package/layout/breadcrumbs/_breadcrumbs.clarity.scss +60 -0
  259. package/layout/breadcrumbs/_properties.breadcrumbs.scss +18 -0
  260. package/layout/breadcrumbs/_variables.breadcrumbs.scss +11 -0
  261. package/layout/grid/_grid.scss +23 -0
  262. package/layout/grid/grid/_grid.scss +39 -0
  263. package/layout/grid/mixins/_breakpoint.scss +83 -0
  264. package/layout/grid/mixins/_clearfix.scss +13 -0
  265. package/layout/grid/mixins/_grid-framework.scss +91 -0
  266. package/layout/grid/mixins/_grid.scss +39 -0
  267. package/layout/grid/utilities/_align.scss +30 -0
  268. package/layout/grid/utilities/_clearfix.scss +12 -0
  269. package/layout/grid/utilities/_display.scss +18 -0
  270. package/layout/grid/utilities/_flex.scss +222 -0
  271. package/layout/grid/utilities/_float.scss +26 -0
  272. package/layout/grid/utilities/_visibility.scss +60 -0
  273. package/layout/main-container/_layout.clarity.scss +87 -0
  274. package/layout/main-container/_properties.header.scss +55 -0
  275. package/layout/main-container/_variables.header.scss +32 -0
  276. package/layout/nav/_header.clarity.scss +40 -0
  277. package/layout/nav/_links.clarity.scss +84 -0
  278. package/layout/nav/_mixins.header.scss +332 -0
  279. package/layout/nav/_mixins.responsive-nav.scss +75 -0
  280. package/layout/nav/_nav.clarity.scss +100 -0
  281. package/layout/nav/_properties.nav.scss +27 -0
  282. package/layout/nav/_properties.responsive-nav.scss +23 -0
  283. package/layout/nav/_properties.subnav.scss +19 -0
  284. package/layout/nav/_responsive-nav.clarity.scss +490 -0
  285. package/layout/nav/_subnav.clarity.scss +48 -0
  286. package/layout/nav/_variables.nav.scss +13 -0
  287. package/layout/nav/_variables.responsive-nav.scss +28 -0
  288. package/layout/nav/_variables.subnav.scss +21 -0
  289. package/layout/tabs/_mixins.tabs.scss +41 -0
  290. package/layout/tabs/_properties.tabs.scss +25 -0
  291. package/layout/tabs/_tabs.clarity.scss +110 -0
  292. package/layout/tabs/_variables.tabs.scss +17 -0
  293. package/layout/vertical-nav/_mixins.vertical-nav.scss +52 -0
  294. package/layout/vertical-nav/_properties.vertical-nav.scss +73 -0
  295. package/layout/vertical-nav/_variables.vertical-nav.scss +52 -0
  296. package/layout/vertical-nav/_vertical-nav.clarity.scss +469 -0
  297. package/main.scss +14 -0
  298. package/modal/_modal.clarity.scss +379 -0
  299. package/modal/_properties.modal.scss +57 -0
  300. package/modal/_variables.modal.scss +41 -0
  301. package/package.json +325 -0
  302. package/popover/common/README.md +112 -0
  303. package/popover/common/_popover.clarity.scss +28 -0
  304. package/popover/dropdown/_dropdown.clarity.scss +326 -0
  305. package/popover/dropdown/_menu-mixins.clarity.scss +132 -0
  306. package/popover/dropdown/_properties.dropdown.scss +50 -0
  307. package/popover/dropdown/_variables.dropdown.scss +36 -0
  308. package/popover/signpost/_properties.signpost.scss +34 -0
  309. package/popover/signpost/_signposts.clarity.scss +414 -0
  310. package/popover/signpost/_variables.signpost.scss +21 -0
  311. package/popover/tooltip/_mixins.tooltip.scss +186 -0
  312. package/popover/tooltip/_properties.tooltip.scss +28 -0
  313. package/popover/tooltip/_tooltips.clarity.scss +122 -0
  314. package/popover/tooltip/_variables.tooltip.scss +20 -0
  315. package/progress/progress-bars/_progress-bars.clarity.scss +616 -0
  316. package/progress/progress-bars/_properties.progress-bars.scss +24 -0
  317. package/progress/progress-bars/_variables.progress-bars.scss +15 -0
  318. package/progress/progress-bars/utils/_mixins.clarity.scss +18 -0
  319. package/progress/spinner/_mixins.spinner.scss +30 -0
  320. package/progress/spinner/_properties.spinner.scss +37 -0
  321. package/progress/spinner/_spinner.clarity.scss +148 -0
  322. package/progress/spinner/_variables.spinner.scss +25 -0
  323. package/schematics/collection.json +14 -0
  324. package/stepper/_properties.stepper.scss +29 -0
  325. package/stepper/_stepper.clarity.scss +184 -0
  326. package/stepper/_variables.stepper.scss +13 -0
  327. package/styles/_a11y.scss +14 -0
  328. package/styles/_close.clarity.scss +60 -0
  329. package/styles/_components.clarity.scss +189 -0
  330. package/styles/_mixins.scss +460 -0
  331. package/styles/_normalize.scss +292 -0
  332. package/styles/_reboot.clarity.scss +374 -0
  333. package/styles/_variables.clarity.scss +139 -0
  334. package/styles/core/base/base.element.scss +97 -0
  335. package/styles/core/global.scss +12 -0
  336. package/styles/core/layout/_alignments.scss +18 -0
  337. package/styles/core/layout/_container.scss +29 -0
  338. package/styles/core/layout/_display.scss +58 -0
  339. package/styles/core/layout/_optimize.scss +60 -0
  340. package/styles/core/layout/_shadow-dom.scss +47 -0
  341. package/styles/core/layout/_spacing.scss +31 -0
  342. package/styles/core/layout/_type-grid.scss +66 -0
  343. package/styles/core/layout/_type-horizontal.scss +33 -0
  344. package/styles/core/layout/_type-vertical.scss +26 -0
  345. package/styles/core/layout/mixins/_mixins.alignment.scss +35 -0
  346. package/styles/core/layout/mixins/_mixins.display.scss +23 -0
  347. package/styles/core/layout/mixins/_mixins.grid.scss +105 -0
  348. package/styles/core/layout/mixins/_mixins.scss +106 -0
  349. package/styles/core/layout/mixins/_mixins.shadow-dom.scss +106 -0
  350. package/styles/core/layout/mixins/_mixins.type-horizontal.scss +113 -0
  351. package/styles/core/layout/mixins/_mixins.type-vertical.scss +108 -0
  352. package/styles/core/module.layout.scss +22 -0
  353. package/styles/core/module.reset.scss +48 -0
  354. package/styles/core/module.typography.scss +9 -0
  355. package/styles/core/theme.dark.scss +298 -0
  356. package/styles/core/theme.high-contrast.scss +42 -0
  357. package/styles/core/theme.low-motion.scss +20 -0
  358. package/styles/core/tokens/_alias-interaction.scss +74 -0
  359. package/styles/core/tokens/_alias-object-background.scss +29 -0
  360. package/styles/core/tokens/_alias-object-border.scss +21 -0
  361. package/styles/core/tokens/_alias-object-container.scss +20 -0
  362. package/styles/core/tokens/_alias-object-opacity.scss +15 -0
  363. package/styles/core/tokens/_alias-object-shadow.scss +17 -0
  364. package/styles/core/tokens/_alias-primary.scss +21 -0
  365. package/styles/core/tokens/_alias-status.scss +40 -0
  366. package/styles/core/tokens/_alias-typography.scss +107 -0
  367. package/styles/core/tokens/_alias-utility.scss +42 -0
  368. package/styles/core/tokens/_alias-viz-colors.scss +170 -0
  369. package/styles/core/tokens/_global-animation.scss +32 -0
  370. package/styles/core/tokens/_global-colors.scss +249 -0
  371. package/styles/core/tokens/_global-space.scss +52 -0
  372. package/styles/core/tokens/_internal-scale.scss +14 -0
  373. package/styles/core/tokens/_properties.tokens.scss +22 -0
  374. package/styles/core/tokens/_variables.tokens.scss +787 -0
  375. package/styles/core/typography/_legacy-typography.scss +328 -0
  376. package/styles/core/typography/_mixins.typography.scss +18 -0
  377. package/styles/core/typography/_typography.scss +328 -0
  378. package/styles/variables/_properties.density.scss +225 -0
  379. package/styles/variables/_properties.global.scss +51 -0
  380. package/styles/variables/_properties.layout.scss +21 -0
  381. package/styles/variables/_properties.scss +11 -0
  382. package/styles/variables/_properties.typography.scss +164 -0
  383. package/styles/variables/_variables.density.scss +116 -0
  384. package/styles/variables/_variables.global.scss +87 -0
  385. package/styles/variables/_variables.layout.scss +37 -0
  386. package/styles/variables/_variables.scss +11 -0
  387. package/styles/variables/_variables.typography.scss +156 -0
  388. package/timeline/_properties.timeline.scss +38 -0
  389. package/timeline/_timeline.clarity.scss +172 -0
  390. package/timeline/_variables.timeline.scss +29 -0
  391. package/toast/README.md +65 -0
  392. package/toast/_properties.toast.scss +56 -0
  393. package/toast/_toast.clarity.scss +190 -0
  394. package/toast/_variables.toast.scss +33 -0
  395. package/types/hermes-ui-angular-accordion.d.ts +101 -0
  396. package/types/hermes-ui-angular-accordion.d.ts.map +1 -0
  397. package/types/hermes-ui-angular-addons-a11y.d.ts +187 -0
  398. package/types/hermes-ui-angular-addons-a11y.d.ts.map +1 -0
  399. package/types/hermes-ui-angular-addons-card-container.d.ts +482 -0
  400. package/types/hermes-ui-angular-addons-card-container.d.ts.map +1 -0
  401. package/types/hermes-ui-angular-addons-certificate-viewer.d.ts +404 -0
  402. package/types/hermes-ui-angular-addons-certificate-viewer.d.ts.map +1 -0
  403. package/types/hermes-ui-angular-addons-datagrid-filters.d.ts +911 -0
  404. package/types/hermes-ui-angular-addons-datagrid-filters.d.ts.map +1 -0
  405. package/types/hermes-ui-angular-addons-datagrid.d.ts +1529 -0
  406. package/types/hermes-ui-angular-addons-datagrid.d.ts.map +1 -0
  407. package/types/hermes-ui-angular-addons-dialog.d.ts +233 -0
  408. package/types/hermes-ui-angular-addons-dialog.d.ts.map +1 -0
  409. package/types/hermes-ui-angular-addons-drag-and-drop.d.ts +35 -0
  410. package/types/hermes-ui-angular-addons-drag-and-drop.d.ts.map +1 -0
  411. package/types/hermes-ui-angular-addons-menu.d.ts +197 -0
  412. package/types/hermes-ui-angular-addons-menu.d.ts.map +1 -0
  413. package/types/hermes-ui-angular-addons-property-view.d.ts +387 -0
  414. package/types/hermes-ui-angular-addons-property-view.d.ts.map +1 -0
  415. package/types/hermes-ui-angular-addons-stepper.d.ts +298 -0
  416. package/types/hermes-ui-angular-addons-stepper.d.ts.map +1 -0
  417. package/types/hermes-ui-angular-addons-tabs.d.ts +173 -0
  418. package/types/hermes-ui-angular-addons-tabs.d.ts.map +1 -0
  419. package/types/hermes-ui-angular-addons-testing.d.ts +592 -0
  420. package/types/hermes-ui-angular-addons-testing.d.ts.map +1 -0
  421. package/types/hermes-ui-angular-addons-theme-builder.d.ts +200 -0
  422. package/types/hermes-ui-angular-addons-theme-builder.d.ts.map +1 -0
  423. package/types/hermes-ui-angular-addons-translate.d.ts +149 -0
  424. package/types/hermes-ui-angular-addons-translate.d.ts.map +1 -0
  425. package/types/hermes-ui-angular-addons-var.d.ts +923 -0
  426. package/types/hermes-ui-angular-addons-var.d.ts.map +1 -0
  427. package/types/hermes-ui-angular-addons-wizard.d.ts +241 -0
  428. package/types/hermes-ui-angular-addons-wizard.d.ts.map +1 -0
  429. package/types/hermes-ui-angular-addons-workflow-strings.d.ts +124 -0
  430. package/types/hermes-ui-angular-addons-workflow-strings.d.ts.map +1 -0
  431. package/types/hermes-ui-angular-addons-workflow.d.ts +15 -0
  432. package/types/hermes-ui-angular-addons-workflow.d.ts.map +1 -0
  433. package/types/hermes-ui-angular-button.d.ts +170 -0
  434. package/types/hermes-ui-angular-button.d.ts.map +1 -0
  435. package/types/hermes-ui-angular-collapsible-panel.d.ts +74 -0
  436. package/types/hermes-ui-angular-collapsible-panel.d.ts.map +1 -0
  437. package/types/hermes-ui-angular-data-datagrid.d.ts +1938 -0
  438. package/types/hermes-ui-angular-data-datagrid.d.ts.map +1 -0
  439. package/types/hermes-ui-angular-data-stack-view.d.ts +88 -0
  440. package/types/hermes-ui-angular-data-stack-view.d.ts.map +1 -0
  441. package/types/hermes-ui-angular-data-tree-view.d.ts +230 -0
  442. package/types/hermes-ui-angular-data-tree-view.d.ts.map +1 -0
  443. package/types/hermes-ui-angular-data.d.ts +16 -0
  444. package/types/hermes-ui-angular-data.d.ts.map +1 -0
  445. package/types/hermes-ui-angular-emphasis-alert.d.ts +176 -0
  446. package/types/hermes-ui-angular-emphasis-alert.d.ts.map +1 -0
  447. package/types/hermes-ui-angular-emphasis-badge.d.ts +26 -0
  448. package/types/hermes-ui-angular-emphasis-badge.d.ts.map +1 -0
  449. package/types/hermes-ui-angular-emphasis-common.d.ts +7 -0
  450. package/types/hermes-ui-angular-emphasis-common.d.ts.map +1 -0
  451. package/types/hermes-ui-angular-emphasis-label.d.ts +30 -0
  452. package/types/hermes-ui-angular-emphasis-label.d.ts.map +1 -0
  453. package/types/hermes-ui-angular-emphasis.d.ts +16 -0
  454. package/types/hermes-ui-angular-emphasis.d.ts.map +1 -0
  455. package/types/hermes-ui-angular-forms-checkbox.d.ts +73 -0
  456. package/types/hermes-ui-angular-forms-checkbox.d.ts.map +1 -0
  457. package/types/hermes-ui-angular-forms-combobox.d.ts +354 -0
  458. package/types/hermes-ui-angular-forms-combobox.d.ts.map +1 -0
  459. package/types/hermes-ui-angular-forms-common.d.ts +340 -0
  460. package/types/hermes-ui-angular-forms-common.d.ts.map +1 -0
  461. package/types/hermes-ui-angular-forms-datalist.d.ts +60 -0
  462. package/types/hermes-ui-angular-forms-datalist.d.ts.map +1 -0
  463. package/types/hermes-ui-angular-forms-datepicker.d.ts +987 -0
  464. package/types/hermes-ui-angular-forms-datepicker.d.ts.map +1 -0
  465. package/types/hermes-ui-angular-forms-file-input.d.ts +194 -0
  466. package/types/hermes-ui-angular-forms-file-input.d.ts.map +1 -0
  467. package/types/hermes-ui-angular-forms-input.d.ts +30 -0
  468. package/types/hermes-ui-angular-forms-input.d.ts.map +1 -0
  469. package/types/hermes-ui-angular-forms-native-select.d.ts +37 -0
  470. package/types/hermes-ui-angular-forms-native-select.d.ts.map +1 -0
  471. package/types/hermes-ui-angular-forms-number-input.d.ts +44 -0
  472. package/types/hermes-ui-angular-forms-number-input.d.ts.map +1 -0
  473. package/types/hermes-ui-angular-forms-password.d.ts +53 -0
  474. package/types/hermes-ui-angular-forms-password.d.ts.map +1 -0
  475. package/types/hermes-ui-angular-forms-radio.d.ts +50 -0
  476. package/types/hermes-ui-angular-forms-radio.d.ts.map +1 -0
  477. package/types/hermes-ui-angular-forms-range.d.ts +38 -0
  478. package/types/hermes-ui-angular-forms-range.d.ts.map +1 -0
  479. package/types/hermes-ui-angular-forms-select.d.ts +211 -0
  480. package/types/hermes-ui-angular-forms-select.d.ts.map +1 -0
  481. package/types/hermes-ui-angular-forms-textarea.d.ts +30 -0
  482. package/types/hermes-ui-angular-forms-textarea.d.ts.map +1 -0
  483. package/types/hermes-ui-angular-forms.d.ts +39 -0
  484. package/types/hermes-ui-angular-forms.d.ts.map +1 -0
  485. package/types/hermes-ui-angular-icon.d.ts +1504 -0
  486. package/types/hermes-ui-angular-icon.d.ts.map +1 -0
  487. package/types/hermes-ui-angular-layout-breadcrumbs.d.ts +46 -0
  488. package/types/hermes-ui-angular-layout-breadcrumbs.d.ts.map +1 -0
  489. package/types/hermes-ui-angular-layout-main-container.d.ts +29 -0
  490. package/types/hermes-ui-angular-layout-main-container.d.ts.map +1 -0
  491. package/types/hermes-ui-angular-layout-nav.d.ts +143 -0
  492. package/types/hermes-ui-angular-layout-nav.d.ts.map +1 -0
  493. package/types/hermes-ui-angular-layout-tabs.d.ts +159 -0
  494. package/types/hermes-ui-angular-layout-tabs.d.ts.map +1 -0
  495. package/types/hermes-ui-angular-layout-vertical-nav.d.ts +129 -0
  496. package/types/hermes-ui-angular-layout-vertical-nav.d.ts.map +1 -0
  497. package/types/hermes-ui-angular-layout.d.ts +20 -0
  498. package/types/hermes-ui-angular-layout.d.ts.map +1 -0
  499. package/types/hermes-ui-angular-modal.d.ts +161 -0
  500. package/types/hermes-ui-angular-modal.d.ts.map +1 -0
  501. package/types/hermes-ui-angular-popover-common.d.ts +317 -0
  502. package/types/hermes-ui-angular-popover-common.d.ts.map +1 -0
  503. package/types/hermes-ui-angular-popover-dropdown.d.ts +124 -0
  504. package/types/hermes-ui-angular-popover-dropdown.d.ts.map +1 -0
  505. package/types/hermes-ui-angular-popover-signpost.d.ts +158 -0
  506. package/types/hermes-ui-angular-popover-signpost.d.ts.map +1 -0
  507. package/types/hermes-ui-angular-popover-tooltip.d.ts +84 -0
  508. package/types/hermes-ui-angular-popover-tooltip.d.ts.map +1 -0
  509. package/types/hermes-ui-angular-popover.d.ts +17 -0
  510. package/types/hermes-ui-angular-popover.d.ts.map +1 -0
  511. package/types/hermes-ui-angular-progress-progress-bars.d.ts +58 -0
  512. package/types/hermes-ui-angular-progress-progress-bars.d.ts.map +1 -0
  513. package/types/hermes-ui-angular-progress-spinner.d.ts +45 -0
  514. package/types/hermes-ui-angular-progress-spinner.d.ts.map +1 -0
  515. package/types/hermes-ui-angular-stepper.d.ts +180 -0
  516. package/types/hermes-ui-angular-stepper.d.ts.map +1 -0
  517. package/types/hermes-ui-angular-timeline.d.ts +87 -0
  518. package/types/hermes-ui-angular-timeline.d.ts.map +1 -0
  519. package/types/hermes-ui-angular-toast.d.ts +131 -0
  520. package/types/hermes-ui-angular-toast.d.ts.map +1 -0
  521. package/types/hermes-ui-angular-utils-conditional.d.ts +133 -0
  522. package/types/hermes-ui-angular-utils-conditional.d.ts.map +1 -0
  523. package/types/hermes-ui-angular-utils-loading.d.ts +39 -0
  524. package/types/hermes-ui-angular-utils-loading.d.ts.map +1 -0
  525. package/types/hermes-ui-angular-utils.d.ts +914 -0
  526. package/types/hermes-ui-angular-utils.d.ts.map +1 -0
  527. package/types/hermes-ui-angular-wizard.d.ts +1509 -0
  528. package/types/hermes-ui-angular-wizard.d.ts.map +1 -0
  529. package/types/hermes-ui-angular.d.ts +44 -0
  530. package/types/hermes-ui-angular.d.ts.map +1 -0
  531. package/typography/_code.scss +36 -0
  532. package/typography/_font-metropolis.scss +45 -0
  533. package/typography/_lists.scss +81 -0
  534. package/typography/_typography.scss +322 -0
  535. package/utils/animations/_animations.clarity.scss +44 -0
  536. package/utils/animations/_mixins.animations.scss +33 -0
  537. package/wizard/_properties.wizard.scss +54 -0
  538. package/wizard/_variables.wizard.scss +59 -0
  539. package/wizard/_wizard.clarity.scss +692 -0
@@ -0,0 +1,3131 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, ElementRef, Output, Input, ViewChildren, Component, InjectionToken, Injectable, Optional, Inject, Host, Directive, HostListener, HostBinding, ViewChild, ViewContainerRef, Pipe, forwardRef, ChangeDetectionStrategy, NgModule, SkipSelf } from '@angular/core';
3
+ import { BehaviorSubject, interval, Subject, Subscription, map, asyncScheduler, combineLatest } from 'rxjs';
4
+ import { debounce, filter, observeOn, takeUntil, first } from 'rxjs/operators';
5
+ import * as i4 from '@hermes-ui/angular/addons/a11y';
6
+ import { ZoomLevel, AppfxA11yModule } from '@hermes-ui/angular/addons/a11y';
7
+ import * as i2 from '@hermes-ui/angular/icon';
8
+ import { ClarityIcons, angleIcon, banIcon, dragHandleIcon, plusIcon, HermesIcon } from '@hermes-ui/angular/icon';
9
+ import * as i3 from '@hermes-ui/angular/popover/dropdown';
10
+ import { HermesDropdownModule } from '@hermes-ui/angular/popover/dropdown';
11
+ import * as i2$1 from '@hermes-ui/angular/popover/common';
12
+ import * as i13 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
+ import * as i9 from '@hermes-ui/angular/data/datagrid';
15
+ import { HermesDatagridSortOrder, SelectionType, selectionTypeAttribute, HermesDatagridPagination, HermesDatagrid, HermesDatagridModule } from '@hermes-ui/angular/data/datagrid';
16
+ import * as i3$3 from '@hermes-ui/angular/addons/drag-and-drop';
17
+ import * as i5$1 from '@hermes-ui/angular/addons/datagrid-filters';
18
+ import { AppfxDatagridFiltersModule } from '@hermes-ui/angular/addons/datagrid-filters';
19
+ import * as i6 from '@angular/cdk/drag-drop';
20
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
21
+ import * as i4$1 from '@hermes-ui/angular/forms/common';
22
+ import * as i10 from '@hermes-ui/angular/utils';
23
+ import * as i3$1 from '@hermes-ui/angular/forms';
24
+ import { HermesCheckboxModule, HermesInputModule } from '@hermes-ui/angular/forms';
25
+ import * as i3$2 from '@angular/cdk/overlay';
26
+ import { ConnectionPositionPair, OverlayModule } from '@angular/cdk/overlay';
27
+ import * as i2$2 from '@angular/cdk/a11y';
28
+ import { A11yModule } from '@angular/cdk/a11y';
29
+ import * as i5 from '@hermes-ui/angular/utils/loading';
30
+ import { HermesLoadingModule } from '@hermes-ui/angular/utils/loading';
31
+ import { FormsModule } from '@angular/forms';
32
+
33
+ /*
34
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
35
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
36
+ * This software is released under MIT license.
37
+ * The full license information can be found in LICENSE in the root directory of this project.
38
+ */
39
+ const resources = {
40
+ dropdownToggleWidthInRem: 3, // '...' button occupies max dropdownToggleWidthInRem rems in width
41
+ layoutChangesDebounceDuration: 10,
42
+ };
43
+ class DatagridActionBarComponent {
44
+ #subscription;
45
+ constructor(cdr, el, elementResizeService) {
46
+ this.cdr = cdr;
47
+ this.el = el;
48
+ this.elementResizeService = elementResizeService;
49
+ this.btnLayout = 'flex';
50
+ this.dropdownOrientation = 'bottom-left';
51
+ this.invokeAction = new EventEmitter();
52
+ this.actionsSubject = new BehaviorSubject([]);
53
+ this.actions$ = this.actionsSubject.asObservable();
54
+ this.isDropdownOpened = false;
55
+ this.listOfWidths = [];
56
+ }
57
+ ngOnInit() {
58
+ this.updateLayout();
59
+ }
60
+ ngAfterViewInit() {
61
+ const resize$ = this.elementResizeService.getResizeObservable(this.el.nativeElement);
62
+ this.#subscription = resize$
63
+ .pipe(debounce(() => interval(resources.layoutChangesDebounceDuration)))
64
+ .subscribe(() => this.updateLayout());
65
+ this.updateLayout();
66
+ }
67
+ ngOnDestroy() {
68
+ if (this.#subscription && !this.#subscription.closed) {
69
+ this.#subscription.unsubscribe();
70
+ }
71
+ }
72
+ ngOnChanges(changes) {
73
+ if (changes['actions'] && changes['actions'].currentValue) {
74
+ if (this.isActionsIdsEqual(changes['actions'])) {
75
+ this.restoreVisible(changes['actions'].previousValue);
76
+ }
77
+ else {
78
+ // actions with different ids are treated as a new list of actions
79
+ this.initActionsVisibility();
80
+ // update the width of each action btn with the new one
81
+ this.cdr.detectChanges();
82
+ this.updateListOfWidths();
83
+ this.updateLayout();
84
+ }
85
+ }
86
+ }
87
+ getDropdownActions() {
88
+ return this.actions.filter((action) => !action.isVisible);
89
+ }
90
+ hasDropdownActions() {
91
+ return this.getDropdownActions().length > 0;
92
+ }
93
+ onActionClick(action) {
94
+ if (action.enabled) {
95
+ this.invokeAction.emit(action);
96
+ }
97
+ }
98
+ /**
99
+ * Derives the base root element size (REM) in pixels.
100
+ */
101
+ deriveBaseRootElementSize() {
102
+ return parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
103
+ }
104
+ isActionsIdsEqual(change) {
105
+ if (!change.previousValue) {
106
+ return false;
107
+ }
108
+ const a = change.currentValue;
109
+ const b = change.previousValue;
110
+ const aLength = a.length;
111
+ const bLength = b.length;
112
+ if (aLength !== bLength) {
113
+ return false;
114
+ }
115
+ return (a.reduce((length, aValue, i) => (aValue.id === b[i].id ? length - 1 : length), aLength) === 0);
116
+ }
117
+ initActionsVisibility() {
118
+ this.actions.forEach((action) => {
119
+ if (action.isVisible !== false) {
120
+ action.isVisible = true;
121
+ }
122
+ });
123
+ this.actionsSubject.next(this.actions);
124
+ }
125
+ restoreVisible(fromPrevious) {
126
+ if (fromPrevious.length !== this.actions.length) {
127
+ return;
128
+ }
129
+ fromPrevious.forEach((action, i) => (this.actions[i].isVisible = action.isVisible));
130
+ this.actionsSubject.next(this.actions);
131
+ }
132
+ updateListOfWidths() {
133
+ this.listOfWidths.length = 0;
134
+ this.queryActionBtnElementList.forEach(btnElementRef => this.listOfWidths.push(btnElementRef.nativeElement.offsetWidth));
135
+ }
136
+ updateLayout() {
137
+ // If offset is 0, the element is not yet fully loaded, so no need to update the layout
138
+ if (this.el.nativeElement.offsetWidth) {
139
+ const dropdownToggleWidthInPx = this.deriveBaseRootElementSize() * resources.dropdownToggleWidthInRem;
140
+ const maxWidth = this.el.nativeElement.offsetWidth - dropdownToggleWidthInPx;
141
+ // choose which action button is within the dropdown or not
142
+ let totalWidth = 0;
143
+ this.listOfWidths.forEach((actionBtnWidth, i) => {
144
+ totalWidth += actionBtnWidth;
145
+ this.actions[i].isVisible = totalWidth < maxWidth;
146
+ });
147
+ // if the dropdown is opened while the browser window is resized then collapse the dropdown
148
+ if (this.isDropdownOpened) {
149
+ this.isDropdownOpened = false;
150
+ }
151
+ this.actionsSubject.next(this.actions);
152
+ }
153
+ }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridActionBarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i4.ElementResizeService }], target: i0.ɵɵFactoryTarget.Component }); }
155
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatagridActionBarComponent, isStandalone: false, selector: "appfx-datagrid-action-bar", inputs: { actions: "actions", btnLayout: "btnLayout", dropdownOrientation: "dropdownOrientation" }, outputs: { invokeAction: "invokeAction" }, viewQueries: [{ propertyName: "queryActionBtnElementList", predicate: ["actionBtn"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"btn-group\" [ngClass]=\"{ 'btn-flex': btnLayout === 'flex', 'btn-inline': btnLayout === 'inline' }\">\r\n @for (action of actions$ | async; track action; let i = $index) {\r\n @if (action.children && action.isVisible) {\r\n <hermes-dropdown [hermesCloseMenuOnItemClick]=\"true\" #actionBtn [class]=\"i === 0 ? 'has-border-left' : ''\">\r\n <button\r\n type=\"button\"\r\n hermesDropdownTrigger\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"angle\" direction=\"down\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu *hermesIfOpen [hermesPosition]=\"dropdownOrientation\">\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(childAction)\"\r\n [title]=\"childAction.tooltip\"\r\n [attr.data-test-id]=\"childAction.id\"\r\n [hermesDisabled]=\"!childAction.enabled\"\r\n [ngClass]=\"childAction.class\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n }\r\n @if (!action.children && action.isVisible) {\r\n <button\r\n type=\"button\"\r\n #actionBtn\r\n (click)=\"onActionClick(action)\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n }\r\n\r\n <!-- Process the hidden actions due to not enough space on the screen -->\r\n @if (hasDropdownActions()) {\r\n <hermes-dropdown class=\"dropdown-container\" [hermesCloseMenuOnItemClick]=\"true\">\r\n <button type=\"button\" hermesDropdownTrigger [ngClass]=\"actions[0].class\">\r\n <hermes-icon shape=\"ellipsis-horizontal\"></hermes-icon>\r\n </button>\r\n <ng-template [(hermesIfOpen)]=\"isDropdownOpened\">\r\n <hermes-dropdown-menu hermesPosition=\"bottom-right\">\r\n @for (action of getDropdownActions(); track action) {\r\n <!-- Action has children - show a nested dropdown -->\r\n @if (action.children) {\r\n <hermes-dropdown [hermesCloseMenuOnItemClick]=\"true\" #actionBtn>\r\n <button\r\n type=\"button\"\r\n hermesDropdownTrigger\r\n class=\"\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"caret\" direction=\"down\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu *hermesIfOpen hermesPosition=\"bottom-right\">\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(childAction)\"\r\n [title]=\"childAction.tooltip\"\r\n [attr.data-test-id]=\"childAction.id\"\r\n [hermesDisabled]=\"!childAction.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"childAction.class\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n }\r\n <!-- Action has no children -->\r\n @if (!action.children) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(action)\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"!action.enabled\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n }\r\n </hermes-dropdown-menu>\r\n </ng-template>\r\n </hermes-dropdown>\r\n }\r\n</div>\r\n", styles: [":host .dropdown-container{margin-left:auto}:host div.btn-group{width:100%;margin-right:0}:host div.btn-group.btn-inline{display:inline-block}:host button{flex:0 0 auto;max-width:unset}:host hermes-dropdown button.dropdown-toggle{color:var(--hermes-btn-default-color)}:host hermes-dropdown.has-border-left button.dropdown-toggle{border-left-style:solid!important;border-left-width:1px!important}:host hermes-dropdown-menu{max-width:18rem}:host hermes-dropdown-menu button{overflow-wrap:break-word;word-break:normal;white-space:normal}:host-context(.zoom4x) hermes-dropdown-menu{margin-right:.8rem}:host-context(.zoom4x) .dropdown-container{margin-left:0}:host-context(.zoom4x) div.btn-group .btn-flex{display:flex;flex-direction:row;justify-content:flex-start}:host-context(.zoom4x) div.btn-group .btn-inline{display:inline-block}:host-context(.zoom4x) div.btn-group button{padding-left:10px}\n"], dependencies: [{ kind: "component", type: i2.HermesIcon, selector: "hermes-icon, hermes-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "component", type: i3.HermesDropdown, selector: "hermes-dropdown", inputs: ["hermesCloseMenuOnItemClick"] }, { kind: "component", type: i3.HermesDropdownMenu, selector: "hermes-dropdown-menu", inputs: ["hermesPosition"] }, { kind: "directive", type: i3.HermesDropdownTrigger, selector: "[hermesDropdownTrigger],[hermesDropdownToggle]" }, { kind: "directive", type: i3.HermesDropdownItem, selector: "[hermesDropdownItem]", inputs: ["hermesDisabled", "id"] }, { kind: "directive", type: i2$1.HermesIfOpen, selector: "[hermesIfOpen]", inputs: ["hermesIfOpen"], outputs: ["hermesIfOpenChange"] }, { kind: "directive", type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i13.AsyncPipe, name: "async" }] }); }
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridActionBarComponent, decorators: [{
158
+ type: Component,
159
+ args: [{ selector: 'appfx-datagrid-action-bar', standalone: false, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"btn-group\" [ngClass]=\"{ 'btn-flex': btnLayout === 'flex', 'btn-inline': btnLayout === 'inline' }\">\r\n @for (action of actions$ | async; track action; let i = $index) {\r\n @if (action.children && action.isVisible) {\r\n <hermes-dropdown [hermesCloseMenuOnItemClick]=\"true\" #actionBtn [class]=\"i === 0 ? 'has-border-left' : ''\">\r\n <button\r\n type=\"button\"\r\n hermesDropdownTrigger\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"angle\" direction=\"down\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu *hermesIfOpen [hermesPosition]=\"dropdownOrientation\">\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(childAction)\"\r\n [title]=\"childAction.tooltip\"\r\n [attr.data-test-id]=\"childAction.id\"\r\n [hermesDisabled]=\"!childAction.enabled\"\r\n [ngClass]=\"childAction.class\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n }\r\n @if (!action.children && action.isVisible) {\r\n <button\r\n type=\"button\"\r\n #actionBtn\r\n (click)=\"onActionClick(action)\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n }\r\n\r\n <!-- Process the hidden actions due to not enough space on the screen -->\r\n @if (hasDropdownActions()) {\r\n <hermes-dropdown class=\"dropdown-container\" [hermesCloseMenuOnItemClick]=\"true\">\r\n <button type=\"button\" hermesDropdownTrigger [ngClass]=\"actions[0].class\">\r\n <hermes-icon shape=\"ellipsis-horizontal\"></hermes-icon>\r\n </button>\r\n <ng-template [(hermesIfOpen)]=\"isDropdownOpened\">\r\n <hermes-dropdown-menu hermesPosition=\"bottom-right\">\r\n @for (action of getDropdownActions(); track action) {\r\n <!-- Action has children - show a nested dropdown -->\r\n @if (action.children) {\r\n <hermes-dropdown [hermesCloseMenuOnItemClick]=\"true\" #actionBtn>\r\n <button\r\n type=\"button\"\r\n hermesDropdownTrigger\r\n class=\"\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"caret\" direction=\"down\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu *hermesIfOpen hermesPosition=\"bottom-right\">\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(childAction)\"\r\n [title]=\"childAction.tooltip\"\r\n [attr.data-test-id]=\"childAction.id\"\r\n [hermesDisabled]=\"!childAction.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [ngClass]=\"childAction.class\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n }\r\n <!-- Action has no children -->\r\n @if (!action.children) {\r\n <button\r\n hermesDropdownItem\r\n type=\"button\"\r\n (click)=\"onActionClick(action)\"\r\n [title]=\"action.tooltip\"\r\n [attr.data-test-id]=\"action.id\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"!action.enabled\"\r\n [ngClass]=\"action.class\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n }\r\n </hermes-dropdown-menu>\r\n </ng-template>\r\n </hermes-dropdown>\r\n }\r\n</div>\r\n", styles: [":host .dropdown-container{margin-left:auto}:host div.btn-group{width:100%;margin-right:0}:host div.btn-group.btn-inline{display:inline-block}:host button{flex:0 0 auto;max-width:unset}:host hermes-dropdown button.dropdown-toggle{color:var(--hermes-btn-default-color)}:host hermes-dropdown.has-border-left button.dropdown-toggle{border-left-style:solid!important;border-left-width:1px!important}:host hermes-dropdown-menu{max-width:18rem}:host hermes-dropdown-menu button{overflow-wrap:break-word;word-break:normal;white-space:normal}:host-context(.zoom4x) hermes-dropdown-menu{margin-right:.8rem}:host-context(.zoom4x) .dropdown-container{margin-left:0}:host-context(.zoom4x) div.btn-group .btn-flex{display:flex;flex-direction:row;justify-content:flex-start}:host-context(.zoom4x) div.btn-group .btn-inline{display:inline-block}:host-context(.zoom4x) div.btn-group button{padding-left:10px}\n"] }]
160
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i4.ElementResizeService }], propDecorators: { queryActionBtnElementList: [{
161
+ type: ViewChildren,
162
+ args: ['actionBtn', { read: ElementRef }]
163
+ }], actions: [{
164
+ type: Input
165
+ }], btnLayout: [{
166
+ type: Input
167
+ }], dropdownOrientation: [{
168
+ type: Input
169
+ }], invokeAction: [{
170
+ type: Output
171
+ }] } });
172
+
173
+ /*
174
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
175
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
176
+ * This software is released under MIT license.
177
+ * The full license information can be found in LICENSE in the root directory of this project.
178
+ */
179
+ /**
180
+ * Defining the three export types, selected export option is passed to Datagrid Export Component
181
+ * @type {{ALL: string; SELECTED_ONLY: string; MATCHING_FILTERS: string}}
182
+ */
183
+ var ExportType;
184
+ (function (ExportType) {
185
+ ExportType["ALL"] = "ALL";
186
+ ExportType["SELECTED_ONLY"] = "SELECTED_ONLY";
187
+ ExportType["MATCHING_FILTERS"] = "MATCHING_FILTERS";
188
+ })(ExportType || (ExportType = {}));
189
+
190
+ /*
191
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
192
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
193
+ * This software is released under MIT license.
194
+ * The full license information can be found in LICENSE in the root directory of this project.
195
+ */
196
+ const defaultFileExtension = '.csv';
197
+ const defaultFileName = 'exportedData';
198
+
199
+ /*
200
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
201
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
202
+ * This software is released under MIT license.
203
+ * The full license information can be found in LICENSE in the root directory of this project.
204
+ */
205
+ // Injectable service contract for app-specific code that can log and present error notifications
206
+ const appfxDatagridErrorNotifiableToken = new InjectionToken('notifier service that presents errors whenever an unrecoverable event occurs within grid');
207
+
208
+ /*
209
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
210
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
211
+ * This software is released under MIT license.
212
+ * The full license information can be found in LICENSE in the root directory of this project.
213
+ */
214
+ /**
215
+ * Helper functions to convert data into CSV format
216
+ */
217
+ class CsvHelperService {
218
+ getData(rows, columns) {
219
+ let columnCsvData = '', rowsCsvData = '';
220
+ if (columns) {
221
+ columnCsvData = this.getColumnDataFromColumnDef(columns);
222
+ rowsCsvData = this.getRowDataFromColumnDef(rows, columns);
223
+ }
224
+ const csvData = columnCsvData + rowsCsvData;
225
+ return csvData;
226
+ }
227
+ getColumnDataFromColumnDef(columnDefinitions) {
228
+ const columnNames = [];
229
+ for (const columnDef of columnDefinitions) {
230
+ const columnName = this.toCsvFormat(columnDef.displayName.toString());
231
+ columnNames.push(columnName);
232
+ }
233
+ const columnCsvData = columnNames.join(',') + '\n';
234
+ return columnCsvData;
235
+ }
236
+ getRowDataFromColumnDef(exportItems, columnDefinitions) {
237
+ let rowsCsvData = '';
238
+ for (const item of exportItems) {
239
+ const rowValues = [];
240
+ for (const columnDef of columnDefinitions) {
241
+ let exportValue = '';
242
+ const itemValue = this.getItemValueFromColumnField(item, columnDef.field);
243
+ if (!itemValue) {
244
+ exportValue = '';
245
+ }
246
+ else {
247
+ exportValue = itemValue.toString();
248
+ }
249
+ exportValue = this.toCsvFormat(exportValue);
250
+ rowValues.push(exportValue);
251
+ }
252
+ rowsCsvData += rowValues.join(',') + '\n';
253
+ }
254
+ return rowsCsvData;
255
+ }
256
+ toCsvFormat(itemValue) {
257
+ if (itemValue.indexOf('"') > -1) {
258
+ itemValue = itemValue.replace(/"/g, '""');
259
+ }
260
+ itemValue = '"' + itemValue.toString() + '"';
261
+ return itemValue;
262
+ }
263
+ /** To extract value from nested JSON objects."
264
+ * Example =>
265
+ * JSON object to extract value from => { product: {cost: {limit: 100, lowestValue: 0 }}}
266
+ * Field format => "product.cost.limit'
267
+ * Value returned => 100
268
+ */
269
+ getItemValueFromColumnField(item, field) {
270
+ if (field.indexOf('.') > 0) {
271
+ const fieldNames = field.split('.');
272
+ let itemValue = item;
273
+ for (const str of fieldNames) {
274
+ itemValue = itemValue[str];
275
+ if (!itemValue) {
276
+ itemValue = item[field];
277
+ break;
278
+ }
279
+ }
280
+ return itemValue;
281
+ }
282
+ return item[field];
283
+ }
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CsvHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
285
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CsvHelperService }); }
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CsvHelperService, decorators: [{
288
+ type: Injectable
289
+ }] });
290
+
291
+ /*
292
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
293
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
294
+ * This software is released under MIT license.
295
+ * The full license information can be found in LICENSE in the root directory of this project.
296
+ */
297
+ /**
298
+ * User-visible strings used in the 'datagrid' library.
299
+ *
300
+ * Strings are in English only. If you need to provide localized strings:
301
+ * - extend this class
302
+ * - override all fields with localized values
303
+ * - provide instance in the module, where you use the library
304
+ *
305
+ * ```
306
+ * @NgModule({
307
+ * ...
308
+ * providers: [
309
+ * { provide: DatagridStrings, useClass: LocalizedDatagridStrings },
310
+ * ]
311
+ * })
312
+ * export class AppModule {}
313
+ * ```
314
+ */
315
+ class DatagridStrings {
316
+ constructor() {
317
+ /**
318
+ * Text displayed inside the grid when the grid is empty.
319
+ */
320
+ this.noItemsFound = 'No items found';
321
+ /**
322
+ * Label of the column toggle buttons.
323
+ */
324
+ this.showColumns = 'Show Columns';
325
+ /**
326
+ * Label of the button (inside column toggle) that selects all columns.
327
+ */
328
+ this.selectAll = 'Select All';
329
+ /**
330
+ * Tooltip for Show Columns toggle button
331
+ */
332
+ this.pickColumns = 'Manage Columns';
333
+ /**
334
+ * Datagrid Show columns menu description
335
+ */
336
+ this.showColumnsMenuDescription = 'Show columns menu description';
337
+ /**
338
+ * Datagrid Show columns / All columns selected confirmation
339
+ */
340
+ this.allColumnsSelected = 'Select all columns';
341
+ /**
342
+ * Footer label displayed when there is a single item.
343
+ * @example "1 item"
344
+ */
345
+ this.singleItem = '1 item';
346
+ /**
347
+ * Footer label to display total items count.
348
+ * @example "{0} items"
349
+ */
350
+ this.multipleItems = '{0} items';
351
+ /**
352
+ * Footer label when using pagination.
353
+ * @example "{1} - {2} of {0} items"
354
+ */
355
+ this.pagedItems = '{1} - {2} of {0} items';
356
+ /**
357
+ * Label for page size selector.
358
+ */
359
+ this.itemsPerPage = 'Items per page';
360
+ /**
361
+ * Title of the export button.
362
+ */
363
+ this.exportLink = 'Export';
364
+ /**
365
+ * Title of 'Export > Export All' option.
366
+ */
367
+ this.exportAll = 'All Rows';
368
+ /**
369
+ * Title of 'Export > Matching Filters' option.
370
+ */
371
+ this.exportMatchingFilters = 'Matching Filters';
372
+ /**
373
+ * Title of 'Export > Selected Rows' option.
374
+ */
375
+ this.exportSelectedRows = 'Selected Rows';
376
+ /**
377
+ * Error message displayed in case of error during data export.
378
+ */
379
+ this.exportErrorMessage = 'Sorry, the data could not be exported at the moment due to some internal error.';
380
+ /**
381
+ * Title of the error dialog displayed in case of error during data export.
382
+ */
383
+ this.exportErrorTitle = 'Export Data Failure';
384
+ /**
385
+ * Text for close button of column toggler on 4x zoom
386
+ */
387
+ this.closeColumnTogglerText = 'Close';
388
+ /**
389
+ * Label of the button for deselecting all rows.
390
+ */
391
+ this.deselectAll = 'Deselect All';
392
+ /**
393
+ * Details pane label for the collapsed button.
394
+ * @example "Expand the details pane for the {0} item"
395
+ */
396
+ this.expandDetailsPaneLabel = 'Expand the details pane for the {0} item';
397
+ /**
398
+ * Details pane label for the expanded button.
399
+ * @example "Collapse the details pane for the {0} item"
400
+ */
401
+ this.collapseDetailsPaneLabel = 'Collapse the details pane for the {0} item';
402
+ /**
403
+ * Placeholder text for the filter input in each filterable column.
404
+ * @example "Filter items"
405
+ */
406
+ this.filterPlaceholder = 'Filter Items';
407
+ }
408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridStrings, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
409
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridStrings }); }
410
+ }
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridStrings, decorators: [{
412
+ type: Injectable
413
+ }] });
414
+
415
+ /*
416
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
417
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
418
+ * This software is released under MIT license.
419
+ * The full license information can be found in LICENSE in the root directory of this project.
420
+ */
421
+ class ExportProviderService {
422
+ constructor(csvHelperService, renderer, elementRef, dgStrings, errorNotifiableService) {
423
+ this.csvHelperService = csvHelperService;
424
+ this.renderer = renderer;
425
+ this.elementRef = elementRef;
426
+ this.dgStrings = dgStrings;
427
+ this.errorNotifiableService = errorNotifiableService;
428
+ }
429
+ exportUIOnlyData(datagridProperties, exportStatus, datagridItemSet) {
430
+ try {
431
+ exportStatus.inProgress = true;
432
+ let exportItems = datagridItemSet.totalDatagridItems;
433
+ if (exportStatus.exportType === ExportType.SELECTED_ONLY) {
434
+ exportItems = datagridItemSet.selectedItems;
435
+ }
436
+ else if (exportStatus.exportType === ExportType.MATCHING_FILTERS) {
437
+ exportItems = datagridItemSet.filteredDatagridItems;
438
+ }
439
+ if (exportItems.length > 1 && datagridProperties.sort) {
440
+ const sortFunction = datagridProperties.sortFunction || this.sortExportedItems;
441
+ exportItems = sortFunction(exportItems, datagridProperties.sortOrder);
442
+ }
443
+ const csvData = this.csvHelperService.getData(exportItems, datagridProperties?.columnDefinitions || []);
444
+ exportStatus.inProgress = false;
445
+ this.downloadFile(csvData, datagridProperties.exportedFileName);
446
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
447
+ }
448
+ catch (exception) {
449
+ exportStatus.inProgress = false;
450
+ this.showExportError();
451
+ }
452
+ }
453
+ /**
454
+ * Function to create a CSV file from CsvData and download it
455
+ */
456
+ downloadFile(csvData, exportedFileName) {
457
+ try {
458
+ const blob = new Blob([csvData], { type: 'text/plain' });
459
+ let fileName = defaultFileName + defaultFileExtension;
460
+ if (exportedFileName) {
461
+ fileName = exportedFileName + defaultFileExtension;
462
+ }
463
+ const csvDataUrl = URL.createObjectURL(blob);
464
+ const downloadLink = this.renderer.createElement('a');
465
+ downloadLink.setAttribute('href', csvDataUrl);
466
+ downloadLink.setAttribute('download', fileName);
467
+ this.renderer.appendChild(this.elementRef.nativeElement, downloadLink);
468
+ downloadLink.click();
469
+ setTimeout(() => {
470
+ this.renderer.removeChild(this.elementRef.nativeElement, downloadLink);
471
+ URL.revokeObjectURL(csvDataUrl);
472
+ downloadLink.remove();
473
+ }, 100);
474
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
475
+ }
476
+ catch (exception) {
477
+ this.showExportError();
478
+ }
479
+ }
480
+ showExportError() {
481
+ if (this.errorNotifiableService) {
482
+ this.errorNotifiableService.notifyError(this.dgStrings.exportErrorTitle, this.dgStrings.exportErrorMessage);
483
+ }
484
+ else {
485
+ console.error(this.dgStrings.exportErrorTitle, this.dgStrings.exportErrorMessage);
486
+ }
487
+ }
488
+ /**
489
+ * Sort function used internally from ExportProviderService to sort exported items.
490
+ */
491
+ sortExportedItems(gridItems, sortOrder) {
492
+ if (!sortOrder) {
493
+ return gridItems;
494
+ }
495
+ const forField = sortOrder.column.field;
496
+ const sortedItems = gridItems.sort((a, b) => {
497
+ if (!Object.prototype.hasOwnProperty.call(a, forField) || !Object.prototype.hasOwnProperty.call(b, forField)) {
498
+ return 0;
499
+ }
500
+ const valA = a[forField];
501
+ const valB = b[forField];
502
+ if (valA === null || valA === undefined) {
503
+ if (valB === null || valB === undefined) {
504
+ return 0;
505
+ }
506
+ else {
507
+ return 1;
508
+ }
509
+ }
510
+ if (valB === null || valB === undefined) {
511
+ return -1;
512
+ }
513
+ return valA.localeCompare(valB);
514
+ });
515
+ return sortOrder.sortOrder === HermesDatagridSortOrder.DESC ? sortedItems.reverse() : sortedItems;
516
+ }
517
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ExportProviderService, deps: [{ token: CsvHelperService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DatagridStrings }, { token: appfxDatagridErrorNotifiableToken, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
518
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ExportProviderService }); }
519
+ }
520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ExportProviderService, decorators: [{
521
+ type: Injectable
522
+ }], ctorParameters: () => [{ type: CsvHelperService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: DatagridStrings }, { type: undefined, decorators: [{
523
+ type: Optional
524
+ }, {
525
+ type: Inject,
526
+ args: [appfxDatagridErrorNotifiableToken]
527
+ }] }] });
528
+
529
+ /*
530
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
531
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
532
+ * This software is released under MIT license.
533
+ * The full license information can be found in LICENSE in the root directory of this project.
534
+ */
535
+ // Variable to keep track of unique ID instances
536
+ // Using BigInt to avoid overflow.
537
+ let instancesCount = BigInt(0);
538
+ const uniqueIdToken = new InjectionToken('UID generator');
539
+ const uniqueIdProvider = {
540
+ provide: uniqueIdToken,
541
+ useFactory: uniqueIdFactory,
542
+ };
543
+ function uniqueIdFactory() {
544
+ return `${instancesCount++}`;
545
+ }
546
+
547
+ /*
548
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
549
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
550
+ * This software is released under MIT license.
551
+ * The full license information can be found in LICENSE in the root directory of this project.
552
+ */
553
+ /**
554
+ * Safely resolves a nested property path (e.g., "a.b.c") on an object.
555
+ *
556
+ * @param item The object to resolve the property on.
557
+ * @param propertyPath The dot-separated property path.
558
+ * @returns An object containing the resolved value and a boolean indicating if the path was valid.
559
+ */
560
+ function getNestedProperty(item, propertyPath) {
561
+ if (!item || !propertyPath) {
562
+ return { isValid: false };
563
+ }
564
+ let isValid = true;
565
+ const value = propertyPath.split('.').reduce((o, i) => {
566
+ if (o !== null && o !== undefined && typeof o === 'object' && i in o) {
567
+ return o[i];
568
+ }
569
+ isValid = false;
570
+ return undefined;
571
+ }, item);
572
+ return isValid ? { isValid: true, value: value } : { isValid: false };
573
+ }
574
+
575
+ /*
576
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
577
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
578
+ * This software is released under MIT license.
579
+ * The full license information can be found in LICENSE in the root directory of this project.
580
+ */
581
+ /**
582
+ * The problem we want to solve with the common interface and the token below:
583
+ * We don't want this directive to enumerate all its host components by type
584
+ * because we don't want to import and thus depend on components which might
585
+ * use the directive. To reverse the dependency, we use the token. Each
586
+ * component which might host this directive should provide itself as the token.
587
+ */
588
+ const appfxPreselectableComponentToken = new InjectionToken('PRESELECTABLE_COMPONENT_TOKEN');
589
+ /**
590
+ * Preserves selection of datagrid and datagrid-detail by tracking whether some
591
+ * grid item should be selected on the base of the a set "trackByGridItemProperty"
592
+ * input of the datagrid or with the help of the "trackByFunction" function
593
+ * input of the datagrid.
594
+ *
595
+ * After global refresh the data grid receives new items and the selection is lost
596
+ * because the grid doesn't know how to recognize which of the new items are the old one
597
+ * selected before global refresh. This directive tracks the selected items by property and
598
+ * when the grid receives new data update the selected items array with the items from the
599
+ * the new grid data.
600
+ *
601
+ * The server-side driven data grid doesn't receive all data. The directive in this case will
602
+ * update only the items which can be found among the new grid items and leave
603
+ * the old ones which it can't find in the selected grid items array. In this case, the component
604
+ * which host the appfx datagrid has responsibility to remove the old selected items which are
605
+ * not applicable for selection after grid data has been updated.
606
+ *
607
+ * How to use it
608
+ *
609
+ * <appfx-datagrid [appfxPreserveSelection] ="'hostObjectId'" [gridItems]="gridItems" ....>
610
+ *
611
+ * <appfx-datagrid appfxPreserveSelection [trackByGridItemProperty]="'hostObjectId'" [gridItems]="gridItems" ....>
612
+ *
613
+ * <appfx-datagrid appfxPreserveSelection [trackByFunction]="<function>" [gridItems]="gridItems" ....>
614
+ *
615
+ * Where function receives as an argument datagrid item and returns unique identifier for it.
616
+ */
617
+ class DatagridPreserveSelectionDirective {
618
+ constructor(preselectableComponent) {
619
+ this.preselectableComponent = preselectableComponent;
620
+ /**
621
+ * preserveSelection - needed mainly because of list-view component and
622
+ * indicates whether grid should preserve the selection based on 'trackByFunction' or
623
+ * 'trackByGridItemProperty'.
624
+ */
625
+ this.preserveExistingSelection = true;
626
+ this.selectedItemsUpdated = new EventEmitter();
627
+ this.component = preselectableComponent;
628
+ }
629
+ ngAfterViewInit() {
630
+ if (this.preserveExistingSelection) {
631
+ this.selectBy = this.component.trackByGridItemProperty || this.component.trackByFunction;
632
+ if (!this.selectBy) {
633
+ throw Error('The "preserveSelection" directive is not initialized correctly. Provide "trackByFunction" or ' +
634
+ ' "trackByGridItemProperty" of the appfx datagrid.');
635
+ }
636
+ this.gridItemChangeSub = this.component.gridItemsChange.subscribe((items) => {
637
+ if (this.component.selectionType !== SelectionType.None && this.component.selectedItems?.length > 0) {
638
+ this.updateSelectedItems(items);
639
+ }
640
+ });
641
+ }
642
+ }
643
+ ngOnDestroy() {
644
+ if (this.gridItemChangeSub) {
645
+ this.gridItemChangeSub.unsubscribe();
646
+ }
647
+ }
648
+ updateSelectedItems(items) {
649
+ let selectedItems;
650
+ if (this.component.serverDrivenDatagrid) {
651
+ // TODO: Delete this when https://github.com/vmware/clarity/issues/4903 is resolved.
652
+ selectedItems = this.findAndUpdateSelectedItems(items);
653
+ }
654
+ else {
655
+ // TODO: When https://github.com/vmware/clarity/issues/4786 is resolved
656
+ // check if selection works without this directive for client side
657
+ // datagrid and delete this.
658
+ selectedItems = this.findSelectedItems(items);
659
+ }
660
+ if (this.selectedItemsUpdated.observers.length > 0) {
661
+ this.selectedItemsUpdated.emit(selectedItems);
662
+ }
663
+ else {
664
+ this.component.selectedItems = selectedItems;
665
+ }
666
+ }
667
+ findSelectedItems(items) {
668
+ const selectedItemsDic = this.createSelectedItemsDictionary();
669
+ return items.filter((item) => {
670
+ const itemPropertyValue = this.getItemUniquePropertyValue(item);
671
+ return selectedItemsDic.has(itemPropertyValue);
672
+ });
673
+ }
674
+ findAndUpdateSelectedItems(items) {
675
+ // We need to preserve the order of selected items due to strange implementation
676
+ // of selection in the clarity datagrid
677
+ const selectedItems = [];
678
+ const selectedItemIndexByRef = new Map();
679
+ const selectedItemsDic = this.createSelectedItemsDictionary(selectedItems, selectedItemIndexByRef);
680
+ items.forEach((item) => {
681
+ const itemPropertyValue = this.getItemUniquePropertyValue(item);
682
+ if (selectedItemsDic.has(itemPropertyValue)) {
683
+ const index = selectedItemIndexByRef.get(itemPropertyValue);
684
+ selectedItems[index] = item;
685
+ }
686
+ });
687
+ return selectedItems;
688
+ }
689
+ createSelectedItemsDictionary(selectedItems, selectedItemIndexByRef) {
690
+ const selectedItemsDic = new Map();
691
+ const storeItemsAndIndexes = selectedItems && selectedItemIndexByRef;
692
+ this.component.selectedItems.forEach((item, index) => {
693
+ const itemPropertyValue = this.getItemUniquePropertyValue(item);
694
+ selectedItemsDic.set(itemPropertyValue, item);
695
+ if (storeItemsAndIndexes) {
696
+ selectedItems?.push(item);
697
+ selectedItemIndexByRef?.set(itemPropertyValue, index);
698
+ }
699
+ });
700
+ return selectedItemsDic;
701
+ }
702
+ getItemUniquePropertyValue(item) {
703
+ if (typeof this.selectBy === 'function') {
704
+ return this.selectBy(0, item || {});
705
+ }
706
+ const result = getNestedProperty(item, this.selectBy);
707
+ return result.isValid ? String(result.value) : '';
708
+ }
709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPreserveSelectionDirective, deps: [{ token: appfxPreselectableComponentToken, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
710
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DatagridPreserveSelectionDirective, isStandalone: false, selector: "[appfxPreserveSelection]", inputs: { preserveExistingSelection: "preserveExistingSelection" }, outputs: { selectedItemsUpdated: "selectedItemsUpdated" }, ngImport: i0 }); }
711
+ }
712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPreserveSelectionDirective, decorators: [{
713
+ type: Directive,
714
+ args: [{
715
+ selector: '[appfxPreserveSelection]',
716
+ standalone: false,
717
+ }]
718
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
719
+ type: Inject,
720
+ args: [appfxPreselectableComponentToken]
721
+ }, {
722
+ type: Host
723
+ }] }], propDecorators: { preserveExistingSelection: [{
724
+ type: Input
725
+ }], selectedItemsUpdated: [{
726
+ type: Output
727
+ }] } });
728
+
729
+ /*
730
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
731
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
732
+ * This software is released under MIT license.
733
+ * The full license information can be found in LICENSE in the root directory of this project.
734
+ */
735
+ /**
736
+ * Expose most common datagrid actionbar layout styles.
737
+ */
738
+ var ActionBarLayout;
739
+ (function (ActionBarLayout) {
740
+ ActionBarLayout["flatCompact"] = "btn btn-sm btn-link";
741
+ ActionBarLayout["flat"] = "btn btn-link";
742
+ ActionBarLayout["outlined"] = "btn btn-sm btn-secondary";
743
+ })(ActionBarLayout || (ActionBarLayout = {}));
744
+
745
+ /*
746
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
747
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
748
+ * This software is released under MIT license.
749
+ * The full license information can be found in LICENSE in the root directory of this project.
750
+ */
751
+ function getDatagridKeyNavigationController(datagrid) {
752
+ const datagridPrivateMembers = datagrid;
753
+ return datagridPrivateMembers.keyNavigation;
754
+ }
755
+ function isEqualColumns(column, other) {
756
+ return (!!column &&
757
+ !!other &&
758
+ ((!!column.uid && column.uid === other.uid) || (!!column.displayName && column.displayName === other.displayName)));
759
+ }
760
+
761
+ /*
762
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
763
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
764
+ * This software is released under MIT license.
765
+ * The full license information can be found in LICENSE in the root directory of this project.
766
+ */
767
+ /**
768
+ * Provides subjects for communication between appfxDgColumnsOrder and appfxColumnOrder
769
+ * directives.
770
+ */
771
+ class DatagridColumnsOrderService {
772
+ constructor() {
773
+ /**
774
+ * Emits the column which should be marked as grabbed. If the column is null all columns are
775
+ * marked as not grabbed
776
+ */
777
+ this.grabbedColumn = new BehaviorSubject(null);
778
+ /**
779
+ * Emits when the column should be moved as result of left or right arrow key press.
780
+ */
781
+ this.moveVisibleColumn = new Subject();
782
+ /**
783
+ * Event emitter to tell the dragged column to set focus
784
+ */
785
+ this.focusGrabbedColumn = new Subject();
786
+ }
787
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
788
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderService }); }
789
+ }
790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderService, decorators: [{
791
+ type: Injectable
792
+ }] });
793
+
794
+ class ColumnOrderDirective {
795
+ constructor(datagrid, elementRef, columnOrderingService, changeDetectorRef, cdkDrag) {
796
+ this.datagrid = datagrid;
797
+ this.elementRef = elementRef;
798
+ this.columnOrderingService = columnOrderingService;
799
+ this.changeDetectorRef = changeDetectorRef;
800
+ this.cdkDrag = cdkDrag;
801
+ this.isGrabbed = false;
802
+ this.subs = new Subscription();
803
+ cdkDrag.previewContainer = 'parent';
804
+ }
805
+ keydown(event) {
806
+ const isColumnTarget = event.target?.tagName === 'HERMES-DG-COLUMN';
807
+ if (!isColumnTarget) {
808
+ return;
809
+ }
810
+ const isSpace = event.code === 'Space';
811
+ const isLeft = event.code === 'ArrowLeft';
812
+ const isRight = event.code === 'ArrowRight';
813
+ const isUp = event.code === 'ArrowUp';
814
+ const isDown = event.code === 'ArrowDown';
815
+ const isEsc = event.code === 'Escape';
816
+ const isCurrentColumnGrabbed = isEqualColumns(this.columnData, this.columnOrderingService.grabbedColumn.value);
817
+ // A pinned column is rendered in the sticky container instead of the scrollable one, so it is
818
+ // not part of the reorderable group. Mouse dragging is refused through cdkDragDisabled, and
819
+ // keyboard reordering has to be refused here for the same reason. Releasing stays allowed, so a
820
+ // column that gets pinned while it is grabbed can still be let go of.
821
+ const isReorderable = !this.columnData?.pinned;
822
+ if (isCurrentColumnGrabbed && (isLeft || isRight) && isReorderable) {
823
+ event.stopImmediatePropagation();
824
+ event.preventDefault();
825
+ this.moveColumn(isLeft);
826
+ }
827
+ if (isSpace) {
828
+ event.stopImmediatePropagation();
829
+ event.preventDefault();
830
+ }
831
+ if (isCurrentColumnGrabbed && (isEsc || isDown || isUp || isSpace)) {
832
+ // Remove grabbed css of the columns
833
+ this.columnOrderingService.grabbedColumn.next(null);
834
+ }
835
+ if (!isCurrentColumnGrabbed && isSpace && isReorderable) {
836
+ // Set grabbed css of the column provided as parameter
837
+ this.columnOrderingService.grabbedColumn.next(this.columnData);
838
+ }
839
+ }
840
+ ngOnInit() {
841
+ this.subs.add(this.columnOrderingService.grabbedColumn
842
+ .pipe(filter(other => {
843
+ return isEqualColumns(this.columnData, other) !== this.isGrabbed;
844
+ }))
845
+ .subscribe(() => {
846
+ this.updateGrabbedState();
847
+ }));
848
+ this.subs.add(this.columnOrderingService.focusGrabbedColumn.pipe(filter(() => this.isGrabbed)).subscribe(() => {
849
+ this.setActiveCell();
850
+ }));
851
+ this.subs.add(this.cdkDrag.started.subscribe(() => {
852
+ //Remove grabbed css of the columns, when user start dragging with the mouse
853
+ this.columnOrderingService.grabbedColumn.next(null);
854
+ }));
855
+ }
856
+ ngOnDestroy() {
857
+ this.subs.unsubscribe();
858
+ }
859
+ moveColumn(isLeft) {
860
+ this.columnOrderingService.moveVisibleColumn.next({
861
+ moveLeft: isLeft,
862
+ visibleColumnIndex: this.columnIndex,
863
+ });
864
+ }
865
+ updateGrabbedState() {
866
+ this.isGrabbed = !this.isGrabbed;
867
+ this.changeDetectorRef.markForCheck();
868
+ }
869
+ setActiveCell() {
870
+ getDatagridKeyNavigationController(this.datagrid).setActiveCell(this.elementRef.nativeElement);
871
+ getDatagridKeyNavigationController(this.datagrid).focusElement(this.elementRef.nativeElement);
872
+ }
873
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnOrderDirective, deps: [{ token: i9.HermesDatagrid }, { token: i0.ElementRef }, { token: DatagridColumnsOrderService }, { token: i0.ChangeDetectorRef }, { token: i6.CdkDrag }], target: i0.ɵɵFactoryTarget.Directive }); }
874
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ColumnOrderDirective, isStandalone: false, selector: "hermes-dg-column[appfxColumnOrder]", inputs: { columnData: "columnData", columnIndex: "columnIndex" }, host: { listeners: { "keydown": "keydown($event)" }, properties: { "class.grabbed": "this.isGrabbed" } }, ngImport: i0 }); }
875
+ }
876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColumnOrderDirective, decorators: [{
877
+ type: Directive,
878
+ args: [{
879
+ selector: 'hermes-dg-column[appfxColumnOrder]',
880
+ standalone: false,
881
+ }]
882
+ }], ctorParameters: () => [{ type: i9.HermesDatagrid }, { type: i0.ElementRef }, { type: DatagridColumnsOrderService }, { type: i0.ChangeDetectorRef }, { type: i6.CdkDrag }], propDecorators: { isGrabbed: [{
883
+ type: HostBinding,
884
+ args: ['class.grabbed']
885
+ }], columnData: [{
886
+ type: Input
887
+ }], columnIndex: [{
888
+ type: Input
889
+ }], keydown: [{
890
+ type: HostListener,
891
+ args: ['keydown', ['$event']]
892
+ }] } });
893
+
894
+ /*
895
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
896
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
897
+ * This software is released under MIT license.
898
+ * The full license information can be found in LICENSE in the root directory of this project.
899
+ */
900
+ class DatagridColumnsOrderDirective {
901
+ constructor(elementRef, cdkDropList, columnOrderingService) {
902
+ this.elementRef = elementRef;
903
+ this.cdkDropList = cdkDropList;
904
+ this.columnOrderingService = columnOrderingService;
905
+ this.dgColumnsVirtualScrolling = false;
906
+ this.dgColumnsOrderChange = new EventEmitter();
907
+ this.subs = new Subscription();
908
+ cdkDropList.orientation = 'horizontal';
909
+ }
910
+ ngOnInit() {
911
+ this.subs.add(this.cdkDropList.dropped
912
+ .pipe(filter(droppedData => !!droppedData?.item?.data?.displayName), map(droppedData => {
913
+ return this.findColumnIndices(droppedData.item.data, droppedData.currentIndex);
914
+ }), filter(columnIndices => columnIndices.currentIndex !== columnIndices.previousIndex), filter(columnIndices => this.isReorderAllowed(columnIndices)))
915
+ .subscribe(columnIndices => {
916
+ this.reorderColumn(columnIndices);
917
+ }));
918
+ this.subs.add(this.columnOrderingService.moveVisibleColumn
919
+ .pipe(map(visibleColumnIndices => {
920
+ return this.getColumnIndices(visibleColumnIndices.moveLeft, visibleColumnIndices.visibleColumnIndex);
921
+ }), filter(columnIndices => {
922
+ return columnIndices.previousIndex !== columnIndices.currentIndex;
923
+ }), filter(columnIndices => this.isReorderAllowed(columnIndices)))
924
+ .subscribe(columnIndices => {
925
+ this.reorderColumn(columnIndices);
926
+ this.columnOrderingService.focusGrabbedColumn.next();
927
+ }));
928
+ }
929
+ setDgColumnsContainer() {
930
+ // Clarity doesn't expose the scrollable datagrid container, and I didn't find a way to
931
+ // get it from the parent component or directive, so we need to use querySelector
932
+ // When virtualScrolling is enabled grid data and grid header are split into two different
933
+ // scrollable containers. In this case we aim for the grid header.
934
+ let selector = 'div.datagrid';
935
+ if (this.dgColumnsVirtualScrolling) {
936
+ selector += ' div.datagrid-header';
937
+ }
938
+ const scrollableContainer = this.elementRef.nativeElement.querySelector(selector);
939
+ if (scrollableContainer) {
940
+ // A workaround for the cdkDropList directive. The issue is that draggable columns are not direct
941
+ // children of the drop list container on which the cdkDropList directive is applied. The selector
942
+ // that can be provided to the cdkDropList directive and that directive can use to find an alternate
943
+ // element container for the drop list container doesn't work. The clarity column separators are
944
+ // draggable and inside column elements, and the drop list container is not their parent.
945
+ // The correct fix is the clarity to support column reordering as they have better access to the
946
+ // datagrid dom structure.
947
+ this.cdkDropList._dropListRef._container = scrollableContainer;
948
+ this.cdkDropList._dropListRef.element = scrollableContainer;
949
+ this.cdkDropList.element = new ElementRef(scrollableContainer);
950
+ }
951
+ }
952
+ ngOnChanges(changes) {
953
+ if (changes['dgColumnsVirtualScrolling']) {
954
+ this.setDgColumnsContainer();
955
+ }
956
+ }
957
+ ngOnDestroy() {
958
+ this.subs.unsubscribe();
959
+ }
960
+ /**
961
+ * A pinned column is rendered in the datagrid's sticky container while the others are rendered in
962
+ * the scrollable one. Changing the relative order of the two groups cannot be re-rendered: the
963
+ * column elements are moved against a sibling that now lives in the other container, and the DOM
964
+ * insert throws. Until the datagrid can render that, a reorder that would cross a pinned column is
965
+ * refused rather than applied.
966
+ */
967
+ isReorderAllowed(indices) {
968
+ if (indices.previousIndex < 0 || indices.currentIndex < 0) {
969
+ return false;
970
+ }
971
+ const from = Math.min(indices.previousIndex, indices.currentIndex);
972
+ const to = Math.max(indices.previousIndex, indices.currentIndex);
973
+ // Only rendered columns matter, a hidden pinned column is not in either container.
974
+ return !this.dgColumnsOrderColumns.slice(from, to + 1).some(column => column.pinned && !column.hidden);
975
+ }
976
+ reorderColumn(indices) {
977
+ const value = [...this.dgColumnsOrderColumns];
978
+ moveItemInArray(value, indices.previousIndex, indices.currentIndex);
979
+ this.dgColumnsOrderColumns = value;
980
+ this.dgColumnsOrderChange.emit({ ...indices, columns: this.dgColumnsOrderColumns });
981
+ }
982
+ getColumnIndices(moveLeft, previousColumnIndex) {
983
+ const visibleColumns = this.dgColumnsOrderColumns.filter(column => !column.hidden);
984
+ const newVisibleColumnIndex = moveLeft ? previousColumnIndex - 1 : previousColumnIndex + 1;
985
+ let currenColumnIndex = newVisibleColumnIndex >= 0 ? newVisibleColumnIndex : 0;
986
+ currenColumnIndex = currenColumnIndex < visibleColumns.length - 1 ? currenColumnIndex : visibleColumns.length - 1;
987
+ const previousColumn = visibleColumns[previousColumnIndex];
988
+ const currentColumn = visibleColumns[currenColumnIndex];
989
+ return this.createColumnIndices(previousColumn, currentColumn);
990
+ }
991
+ findColumnIndices(previousColumn, currentDroppedItemIndex) {
992
+ const mappedColumnDragItems = this.cdkDropList.getSortedItems().map(item => item.data);
993
+ const currentColumn = mappedColumnDragItems.find((column, index) => {
994
+ //For some reason the index of the dropped item in the dropped event start from 1 not from 0
995
+ return index >= currentDroppedItemIndex - 1 && !!column;
996
+ });
997
+ return this.createColumnIndices(previousColumn, currentColumn);
998
+ }
999
+ createColumnIndices(previousColumn, currentColumn) {
1000
+ const previousIndex = this.findColumnIndex(previousColumn);
1001
+ const currentIndex = this.findColumnIndex(currentColumn);
1002
+ return {
1003
+ previousIndex: previousIndex,
1004
+ currentIndex: currentIndex,
1005
+ };
1006
+ }
1007
+ findColumnIndex(column) {
1008
+ return this.dgColumnsOrderColumns.findIndex(other => {
1009
+ return isEqualColumns(column, other);
1010
+ });
1011
+ }
1012
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderDirective, deps: [{ token: i0.ElementRef }, { token: i6.CdkDropList }, { token: DatagridColumnsOrderService }], target: i0.ɵɵFactoryTarget.Directive }); }
1013
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DatagridColumnsOrderDirective, isStandalone: false, selector: "hermes-datagrid[appfxDgColumnsOrder]", inputs: { dgColumnsOrderColumns: "dgColumnsOrderColumns", dgColumnsVirtualScrolling: "dgColumnsVirtualScrolling" }, outputs: { dgColumnsOrderChange: "dgColumnsOrderChange" }, providers: [DatagridColumnsOrderService], usesOnChanges: true, ngImport: i0 }); }
1014
+ }
1015
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderDirective, decorators: [{
1016
+ type: Directive,
1017
+ args: [{
1018
+ selector: 'hermes-datagrid[appfxDgColumnsOrder]',
1019
+ providers: [DatagridColumnsOrderService],
1020
+ standalone: false,
1021
+ }]
1022
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i6.CdkDropList }, { type: DatagridColumnsOrderService }], propDecorators: { dgColumnsOrderColumns: [{
1023
+ type: Input
1024
+ }], dgColumnsVirtualScrolling: [{
1025
+ type: Input
1026
+ }], dgColumnsOrderChange: [{
1027
+ type: Output
1028
+ }] } });
1029
+
1030
+ /*
1031
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1032
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1033
+ * This software is released under MIT license.
1034
+ * The full license information can be found in LICENSE in the root directory of this project.
1035
+ */
1036
+ class DatagridFilterComponent {
1037
+ constructor(dgStrings, popoverService) {
1038
+ this.dgStrings = dgStrings;
1039
+ this.popoverService = popoverService;
1040
+ this.filterValueChange = new EventEmitter();
1041
+ this.changes = new Subject();
1042
+ }
1043
+ ngOnInit() {
1044
+ this.value = this.filterValue || '';
1045
+ }
1046
+ ngAfterViewInit() {
1047
+ this.popoverService.openChange.pipe(observeOn(asyncScheduler)).subscribe(openChange => {
1048
+ if (openChange) {
1049
+ this.input.nativeElement.focus();
1050
+ }
1051
+ });
1052
+ }
1053
+ onKey(event) {
1054
+ this.value = event.target.value;
1055
+ this.changes.next(true);
1056
+ if (this.filterValue !== this.value) {
1057
+ this.filterValueChange.emit(this.value);
1058
+ }
1059
+ }
1060
+ isActive() {
1061
+ return !!this.value;
1062
+ }
1063
+ accepts(item) {
1064
+ const lowerCaseTrimmedValue = this.value.toLowerCase().trim();
1065
+ let currentItemFieldValue;
1066
+ if (this.stringFilterType) {
1067
+ return this.stringFilterType.accepts(item, lowerCaseTrimmedValue);
1068
+ }
1069
+ else if (this.fieldName) {
1070
+ currentItemFieldValue = '' + item[this.fieldName];
1071
+ return currentItemFieldValue.toLowerCase().indexOf(lowerCaseTrimmedValue) >= 0;
1072
+ }
1073
+ return false;
1074
+ }
1075
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFilterComponent, deps: [{ token: DatagridStrings }, { token: i2$1.HermesPopoverService }], target: i0.ɵɵFactoryTarget.Component }); }
1076
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DatagridFilterComponent, isStandalone: false, selector: "appfx-datagrid-filter", inputs: { filterValue: "filterValue", stringFilterType: "stringFilterType", fieldName: "fieldName" }, outputs: { filterValueChange: "filterValueChange" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: `
1077
+ <hermes-input-container class="mt-0">
1078
+ <input
1079
+ #input
1080
+ hermesInput
1081
+ type="text"
1082
+ name="search"
1083
+ autocomplete="off"
1084
+ [value]="value"
1085
+ (keyup)="onKey($event)"
1086
+ [placeholder]="dgStrings.filterPlaceholder"
1087
+ [attr.aria-label]="dgStrings.filterPlaceholder"
1088
+ />
1089
+ </hermes-input-container>
1090
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3$1.HermesInput, selector: "[hermesInput]" }, { kind: "component", type: i3$1.HermesInputContainer, selector: "hermes-input-container" }] }); }
1091
+ }
1092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFilterComponent, decorators: [{
1093
+ type: Component,
1094
+ args: [{
1095
+ selector: 'appfx-datagrid-filter',
1096
+ standalone: false,
1097
+ template: `
1098
+ <hermes-input-container class="mt-0">
1099
+ <input
1100
+ #input
1101
+ hermesInput
1102
+ type="text"
1103
+ name="search"
1104
+ autocomplete="off"
1105
+ [value]="value"
1106
+ (keyup)="onKey($event)"
1107
+ [placeholder]="dgStrings.filterPlaceholder"
1108
+ [attr.aria-label]="dgStrings.filterPlaceholder"
1109
+ />
1110
+ </hermes-input-container>
1111
+ `,
1112
+ }]
1113
+ }], ctorParameters: () => [{ type: DatagridStrings }, { type: i2$1.HermesPopoverService }], propDecorators: { filterValue: [{
1114
+ type: Input
1115
+ }], stringFilterType: [{
1116
+ type: Input
1117
+ }], fieldName: [{
1118
+ type: Input
1119
+ }], filterValueChange: [{
1120
+ type: Output
1121
+ }], input: [{
1122
+ type: ViewChild,
1123
+ args: ['input']
1124
+ }] } });
1125
+
1126
+ /*
1127
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1128
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1129
+ * This software is released under MIT license.
1130
+ * The full license information can be found in LICENSE in the root directory of this project.
1131
+ */
1132
+ class DatagridCellContainerComponent {
1133
+ ngOnChanges() {
1134
+ if (this.instance && typeof this.instance.onChange === 'function') {
1135
+ this.instance.onChange(this.item || {}, this.column);
1136
+ }
1137
+ }
1138
+ ngOnInit() {
1139
+ if (this.column.columnRenderer) {
1140
+ this.componentRef = this.container.createComponent(this.column.columnRenderer);
1141
+ this.instance = this.componentRef?.instance;
1142
+ this.instance.item = this.item || {};
1143
+ this.instance.column = this.column;
1144
+ }
1145
+ }
1146
+ ngOnDestroy() {
1147
+ if (this.componentRef) {
1148
+ this.componentRef.destroy();
1149
+ this.instance = null;
1150
+ this.componentRef = null;
1151
+ }
1152
+ }
1153
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridCellContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1154
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatagridCellContainerComponent, isStandalone: false, selector: "appfx-dg-cell-container", inputs: { column: "column", item: "item" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["cellContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
1155
+ @if (!column.columnRenderer) {
1156
+ <span [title]="item?.[column.field]">{{ item?.[column.field] }}</span>
1157
+ }
1158
+ <ng-template #cellContainer></ng-template>
1159
+ `, isInline: true, styles: [":host{width:100%}\n"] }); }
1160
+ }
1161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridCellContainerComponent, decorators: [{
1162
+ type: Component,
1163
+ args: [{ selector: 'appfx-dg-cell-container', standalone: false, template: `
1164
+ @if (!column.columnRenderer) {
1165
+ <span [title]="item?.[column.field]">{{ item?.[column.field] }}</span>
1166
+ }
1167
+ <ng-template #cellContainer></ng-template>
1168
+ `, styles: [":host{width:100%}\n"] }]
1169
+ }], propDecorators: { container: [{
1170
+ type: ViewChild,
1171
+ args: ['cellContainer', { read: ViewContainerRef, static: true }]
1172
+ }], column: [{
1173
+ type: Input
1174
+ }], item: [{
1175
+ type: Input
1176
+ }] } });
1177
+
1178
+ /*
1179
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1180
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1181
+ * This software is released under MIT license.
1182
+ * The full license information can be found in LICENSE in the root directory of this project.
1183
+ */
1184
+ class DatagridColumnToggleComponent {
1185
+ constructor(dgStrings) {
1186
+ this.dgStrings = dgStrings;
1187
+ this.layoutClass = 'column-switch-wrapper';
1188
+ this.columnsChange = new EventEmitter();
1189
+ this.columnHiddenStateChange = new EventEmitter();
1190
+ this.positions = [
1191
+ new ConnectionPositionPair({
1192
+ originX: 'start',
1193
+ originY: 'top',
1194
+ }, {
1195
+ overlayX: 'start',
1196
+ overlayY: 'bottom',
1197
+ }),
1198
+ ];
1199
+ this.openState = false;
1200
+ }
1201
+ get hasOnlyOneVisibleColumn() {
1202
+ const hideableColumns = this.hideableColumns();
1203
+ const nonHideableColumns = this.columns.length - hideableColumns.length;
1204
+ return nonHideableColumns === 0 && hideableColumns.filter(column => !column.hidden).length === 1;
1205
+ }
1206
+ ngOnDestroy() {
1207
+ this.openState = false;
1208
+ }
1209
+ onAttach(overlay) {
1210
+ this.overlay = overlay;
1211
+ this.viewId = overlay?.overlayRef?.overlayElement.id;
1212
+ }
1213
+ onDetach() {
1214
+ this.openState = false;
1215
+ this.viewId = undefined;
1216
+ }
1217
+ showColumn(colUid) {
1218
+ this.showHideColumn(colUid, false);
1219
+ }
1220
+ hideColumn(colUid) {
1221
+ this.showHideColumn(colUid, true);
1222
+ }
1223
+ toggleColumnState(columnToToggle, event) {
1224
+ const shouldHide = !!event?.target && !event.target.checked;
1225
+ columnToToggle.hidden = shouldHide;
1226
+ this.columnsChange.emit([...this.columns]);
1227
+ this.columnHiddenStateChange.emit({
1228
+ hidden: shouldHide,
1229
+ column: columnToToggle,
1230
+ });
1231
+ }
1232
+ onSelectAll() {
1233
+ this.hideableColumns()
1234
+ .filter(column => column.hidden)
1235
+ .forEach(column => this.toggleColumnState(column));
1236
+ }
1237
+ allColumnsSelected() {
1238
+ return this.hideableColumns().filter(column => column.hidden).length === 0;
1239
+ }
1240
+ hideableColumns() {
1241
+ // If column.hideable is not set to false explicitly then column is considered visible
1242
+ return this.columns.filter(column => column.hideable !== false);
1243
+ }
1244
+ showHideColumn(colUid, hide) {
1245
+ const columnToToggle = this.columns.find(col => col.uid === colUid);
1246
+ if (!columnToToggle) {
1247
+ return;
1248
+ }
1249
+ columnToToggle.hidden = hide;
1250
+ this.columnsChange.emit([...this.columns]);
1251
+ this.columnHiddenStateChange.emit({
1252
+ hidden: hide,
1253
+ column: columnToToggle,
1254
+ });
1255
+ }
1256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnToggleComponent, deps: [{ token: DatagridStrings }], target: i0.ɵɵFactoryTarget.Component }); }
1257
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatagridColumnToggleComponent, isStandalone: false, selector: "appfx-dg-column-toggle", inputs: { columns: "columns" }, outputs: { columnsChange: "columnsChange", columnHiddenStateChange: "columnHiddenStateChange" }, host: { properties: { "class": "this.layoutClass" } }, viewQueries: [{ propertyName: "closeColumnButtonElement", first: true, predicate: ["closeColumnButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<button\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n role=\"button\"\r\n type=\"button\"\r\n class=\"btn btn-sm btn-link column-toggle-action\"\r\n (click)=\"openState = !openState\"\r\n [attr.aria-owns]=\"viewId\"\r\n [attr.aria-controls]=\"viewId\"\r\n [attr.aria-expanded]=\"openState\"\r\n>\r\n {{ dgStrings.pickColumns }}\r\n</button>\r\n<ng-template\r\n cdkConnectedOverlay\r\n #overlay=\"cdkConnectedOverlay\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"openState\"\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n (detach)=\"onDetach()\"\r\n (attach)=\"onAttach(overlay)\"\r\n (backdropClick)=\"openState = false\"\r\n>\r\n <div\r\n class=\"column-switch\"\r\n role=\"dialog\"\r\n cdkTrapFocus\r\n [cdkTrapFocusAutoCapture]=\"true\"\r\n [attr.aria-label]=\"dgStrings.showColumnsMenuDescription\"\r\n tabindex=\"-1\"\r\n >\r\n <div class=\"switch-header\">\r\n <div class=\"hermes-sr-only\">\r\n {{ dgStrings.allColumnsSelected }}\r\n </div>\r\n <span role=\"heading\" aria-level=\"3\">{{ dgStrings.showColumns }}</span>\r\n <button\r\n class=\"btn btn-sm btn-link\"\r\n cdkFocusInitial\r\n cdkFocusRegionStart\r\n (click)=\"openState = false\"\r\n #closeColumnButton\r\n >\r\n <span class=\"hermes-sr-only\">{{ dgStrings.closeColumnTogglerText }}</span>\r\n <hermes-icon shape=\"window-close\"></hermes-icon>\r\n </button>\r\n </div>\r\n <ul class=\"switch-content list-unstyled\" tabindex=\"-1\">\r\n @for (column of hideableColumns(); track column) {\r\n <li>\r\n <hermes-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n hermesCheckbox\r\n [disabled]=\"hasOnlyOneVisibleColumn && !column.hidden\"\r\n [checked]=\"!column.hidden\"\r\n (change)=\"toggleColumnState(column, $event)\"\r\n />\r\n <label>{{ column.displayName }}</label>\r\n </hermes-checkbox-wrapper>\r\n </li>\r\n }\r\n </ul>\r\n <div class=\"switch-footer\">\r\n <button\r\n class=\"btn btn-sm btn-link switch-button export-link\"\r\n type=\"button\"\r\n cdkFocusRegionEnd\r\n [disabled]=\"allColumnsSelected()\"\r\n (click)=\"onSelectAll()\"\r\n >\r\n {{ dgStrings.selectAll }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["::ng-deep .cdk-overlay-container,::ng-deep .cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000}::ng-deep .cdk-overlay-container:empty{display:none}::ng-deep .cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}::ng-deep .cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}::ng-deep .cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}::ng-deep .cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}::ng-deep .cdk-overlay-dark-backdrop{background:#00000052}::ng-deep .cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}::ng-deep .cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}::ng-deep .cdk-overlay-backdrop-noop-animation{transition:none}::ng-deep .cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}::ng-deep .cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}\n"], dependencies: [{ kind: "directive", type: i2$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i3$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3$2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i4$1.HermesControlLabel, selector: "label", inputs: ["id", "for"] }, { kind: "component", type: i2.HermesIcon, selector: "hermes-icon, hermes-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "directive", type: i3$1.HermesCheckbox, selector: "[hermesCheckbox],[hermesToggle]" }, { kind: "component", type: i3$1.HermesCheckboxWrapper, selector: "hermes-checkbox-wrapper,hermes-toggle-wrapper" }] }); }
1258
+ }
1259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnToggleComponent, decorators: [{
1260
+ type: Component,
1261
+ args: [{ selector: 'appfx-dg-column-toggle', standalone: false, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<button\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n role=\"button\"\r\n type=\"button\"\r\n class=\"btn btn-sm btn-link column-toggle-action\"\r\n (click)=\"openState = !openState\"\r\n [attr.aria-owns]=\"viewId\"\r\n [attr.aria-controls]=\"viewId\"\r\n [attr.aria-expanded]=\"openState\"\r\n>\r\n {{ dgStrings.pickColumns }}\r\n</button>\r\n<ng-template\r\n cdkConnectedOverlay\r\n #overlay=\"cdkConnectedOverlay\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"openState\"\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\r\n (detach)=\"onDetach()\"\r\n (attach)=\"onAttach(overlay)\"\r\n (backdropClick)=\"openState = false\"\r\n>\r\n <div\r\n class=\"column-switch\"\r\n role=\"dialog\"\r\n cdkTrapFocus\r\n [cdkTrapFocusAutoCapture]=\"true\"\r\n [attr.aria-label]=\"dgStrings.showColumnsMenuDescription\"\r\n tabindex=\"-1\"\r\n >\r\n <div class=\"switch-header\">\r\n <div class=\"hermes-sr-only\">\r\n {{ dgStrings.allColumnsSelected }}\r\n </div>\r\n <span role=\"heading\" aria-level=\"3\">{{ dgStrings.showColumns }}</span>\r\n <button\r\n class=\"btn btn-sm btn-link\"\r\n cdkFocusInitial\r\n cdkFocusRegionStart\r\n (click)=\"openState = false\"\r\n #closeColumnButton\r\n >\r\n <span class=\"hermes-sr-only\">{{ dgStrings.closeColumnTogglerText }}</span>\r\n <hermes-icon shape=\"window-close\"></hermes-icon>\r\n </button>\r\n </div>\r\n <ul class=\"switch-content list-unstyled\" tabindex=\"-1\">\r\n @for (column of hideableColumns(); track column) {\r\n <li>\r\n <hermes-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n hermesCheckbox\r\n [disabled]=\"hasOnlyOneVisibleColumn && !column.hidden\"\r\n [checked]=\"!column.hidden\"\r\n (change)=\"toggleColumnState(column, $event)\"\r\n />\r\n <label>{{ column.displayName }}</label>\r\n </hermes-checkbox-wrapper>\r\n </li>\r\n }\r\n </ul>\r\n <div class=\"switch-footer\">\r\n <button\r\n class=\"btn btn-sm btn-link switch-button export-link\"\r\n type=\"button\"\r\n cdkFocusRegionEnd\r\n [disabled]=\"allColumnsSelected()\"\r\n (click)=\"onSelectAll()\"\r\n >\r\n {{ dgStrings.selectAll }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["::ng-deep .cdk-overlay-container,::ng-deep .cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000}::ng-deep .cdk-overlay-container:empty{display:none}::ng-deep .cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}::ng-deep .cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}::ng-deep .cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}::ng-deep .cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}::ng-deep .cdk-overlay-dark-backdrop{background:#00000052}::ng-deep .cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}::ng-deep .cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}::ng-deep .cdk-overlay-backdrop-noop-animation{transition:none}::ng-deep .cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}::ng-deep .cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}\n"] }]
1262
+ }], ctorParameters: () => [{ type: DatagridStrings }], propDecorators: { layoutClass: [{
1263
+ type: HostBinding,
1264
+ args: ['class']
1265
+ }], closeColumnButtonElement: [{
1266
+ type: ViewChild,
1267
+ args: ['closeColumnButton', { read: ElementRef }]
1268
+ }], columns: [{
1269
+ type: Input
1270
+ }], columnsChange: [{
1271
+ type: Output
1272
+ }], columnHiddenStateChange: [{
1273
+ type: Output
1274
+ }] } });
1275
+
1276
+ /*
1277
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1278
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1279
+ * This software is released under MIT license.
1280
+ * The full license information can be found in LICENSE in the root directory of this project.
1281
+ */
1282
+ /**
1283
+ * A component that acts as a container for custom column filters.
1284
+ * It creates an instance of the specified filter component and manages its lifecycle.
1285
+ */
1286
+ class DatagridFilterContainerComponent {
1287
+ constructor(filterContainer) {
1288
+ this.filterContainer = filterContainer;
1289
+ /**
1290
+ * Event emitter to notify the hosting view about changes in the filter value.
1291
+ */
1292
+ this.filterValueChange = new EventEmitter();
1293
+ }
1294
+ ngAfterViewInit() {
1295
+ if (this.filterType) {
1296
+ this.componentRef = this.container.createComponent(this.filterType);
1297
+ this.filter = this.componentRef.instance;
1298
+ this.filter.filterValue = this.filterValue;
1299
+ this.filterChangeSub = this.filter.changes.subscribe((value) => {
1300
+ this.filterValueChange.emit(value);
1301
+ });
1302
+ this.filterContainer.setFilter(this.filter);
1303
+ }
1304
+ }
1305
+ ngOnDestroy() {
1306
+ if (this.filterChangeSub) {
1307
+ this.filterChangeSub.unsubscribe();
1308
+ this.filterChangeSub = null;
1309
+ }
1310
+ if (this.componentRef) {
1311
+ this.componentRef.destroy();
1312
+ this.componentRef = null;
1313
+ }
1314
+ }
1315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFilterContainerComponent, deps: [{ token: i9.HermesDatagridFilter }], target: i0.ɵɵFactoryTarget.Component }); }
1316
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DatagridFilterContainerComponent, isStandalone: false, selector: "appfx-dg-filter-container", inputs: { filterType: "filterType", filterValue: "filterValue" }, outputs: { filterValueChange: "filterValueChange" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["filterContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` <ng-template #filterContainer></ng-template>`, isInline: true }); }
1317
+ }
1318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFilterContainerComponent, decorators: [{
1319
+ type: Component,
1320
+ args: [{
1321
+ selector: 'appfx-dg-filter-container',
1322
+ standalone: false,
1323
+ template: ` <ng-template #filterContainer></ng-template>`,
1324
+ }]
1325
+ }], ctorParameters: () => [{ type: i9.HermesDatagridFilter }], propDecorators: { container: [{
1326
+ type: ViewChild,
1327
+ args: ['filterContainer', { read: ViewContainerRef, static: true }]
1328
+ }], filterType: [{
1329
+ type: Input
1330
+ }], filterValue: [{
1331
+ type: Input
1332
+ }], filterValueChange: [{
1333
+ type: Output
1334
+ }] } });
1335
+
1336
+ /*
1337
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1338
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1339
+ * This software is released under MIT license.
1340
+ * The full license information can be found in LICENSE in the root directory of this project.
1341
+ */
1342
+ class ExportDatagridComponent {
1343
+ constructor(dgStrings) {
1344
+ this.dgStrings = dgStrings;
1345
+ /**
1346
+ * All grid items count
1347
+ */
1348
+ this.allItemsCount = 0;
1349
+ /**
1350
+ * All filtered items count
1351
+ */
1352
+ this.filteredItemsCount = 0;
1353
+ /**
1354
+ * Selected items in the datagrid
1355
+ */
1356
+ this.selectedItemsCount = 0;
1357
+ /**
1358
+ * Event emitter to tell the hosting view that user has requested to export list data
1359
+ */
1360
+ this.exportEventEmitter = new EventEmitter();
1361
+ this.exportStatus = { inProgress: false, exportType: ExportType.ALL };
1362
+ this.exportType = ExportType;
1363
+ }
1364
+ /**
1365
+ * Export event is emitted on Export button click and no dropdown options are available
1366
+ * All Items are Exported.
1367
+ */
1368
+ exportAllIfOnlyOption() {
1369
+ if (this.selectedItemsCount === 0 && this.filteredItemsCount === 0) {
1370
+ this.exportStatus.exportType = this.exportType.ALL;
1371
+ this.exportEventEmitter.emit(this.exportStatus);
1372
+ }
1373
+ else {
1374
+ this.allRowsCount = '';
1375
+ this.selectedRowsCount = '';
1376
+ this.matchedFilterRowsCount = '';
1377
+ if (this.allItemsCount) {
1378
+ this.allRowsCount = `(${this.allItemsCount})`;
1379
+ }
1380
+ else {
1381
+ this.allRowsCount = `(0)`;
1382
+ }
1383
+ if (this.filteredItemsCount) {
1384
+ this.matchedFilterRowsCount = `(${this.filteredItemsCount})`;
1385
+ }
1386
+ else {
1387
+ this.matchedFilterRowsCount = `(0)`;
1388
+ }
1389
+ if (this.selectedItemsCount) {
1390
+ this.selectedRowsCount = `(${this.selectedItemsCount})`;
1391
+ }
1392
+ else {
1393
+ this.selectedRowsCount = `(0)`;
1394
+ }
1395
+ }
1396
+ }
1397
+ /**
1398
+ * Handler function called when one of the export options is clicked
1399
+ */
1400
+ onExportClick(exportType) {
1401
+ this.exportStatus.exportType = exportType;
1402
+ this.exportEventEmitter.emit(this.exportStatus);
1403
+ }
1404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ExportDatagridComponent, deps: [{ token: DatagridStrings }], target: i0.ɵɵFactoryTarget.Component }); }
1405
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ExportDatagridComponent, isStandalone: false, selector: "appfx-dg-export", inputs: { allItemsCount: "allItemsCount", filteredItemsCount: "filteredItemsCount", selectedItemsCount: "selectedItemsCount" }, outputs: { exportEventEmitter: "exportEventEmitter" }, ngImport: i0, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n@if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <hermes-dropdown class=\"column-switch-wrapper\">\r\n <button\r\n data-test-id=\"export-link\"\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm btn-link\"\r\n [hermesLoading]=\"exportStatus.inProgress || false\"\r\n [disabled]=\"!(allItemsCount > 0)\"\r\n (click)=\"exportAllIfOnlyOption()\"\r\n hermesDropdownTrigger\r\n >\r\n {{ dgStrings.exportLink }}\r\n @if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <hermes-icon shape=\"angle\" direction=\"down\"></hermes-icon>\r\n }\r\n </button>\r\n <hermes-dropdown-menu class=\"export-dropdown\" hermesPosition=\"top-left\" *hermesIfOpen>\r\n @if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.ALL)\">\r\n {{ dgStrings.exportAll }} {{ allRowsCount }}\r\n </button>\r\n }\r\n @if (filteredItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.MATCHING_FILTERS)\">\r\n {{ dgStrings.exportMatchingFilters }}\r\n {{ matchedFilterRowsCount }}\r\n </button>\r\n }\r\n @if (selectedItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.SELECTED_ONLY)\">\r\n {{ dgStrings.exportSelectedRows }} {{ selectedRowsCount }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n} @else {\r\n <div class=\"column-switch-wrapper\">\r\n <button\r\n data-test-id=\"export-link\"\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm btn-link\"\r\n [hermesLoading]=\"exportStatus.inProgress || false\"\r\n [disabled]=\"!(allItemsCount > 0)\"\r\n (click)=\"exportAllIfOnlyOption()\"\r\n >\r\n {{ dgStrings.exportLink }}\r\n </button>\r\n </div>\r\n}\r\n", styles: [".export-dropdown{max-width:12rem}\n"], dependencies: [{ kind: "component", type: i2.HermesIcon, selector: "hermes-icon, hermes-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "component", type: i3.HermesDropdown, selector: "hermes-dropdown", inputs: ["hermesCloseMenuOnItemClick"] }, { kind: "component", type: i3.HermesDropdownMenu, selector: "hermes-dropdown-menu", inputs: ["hermesPosition"] }, { kind: "directive", type: i3.HermesDropdownTrigger, selector: "[hermesDropdownTrigger],[hermesDropdownToggle]" }, { kind: "directive", type: i3.HermesDropdownItem, selector: "[hermesDropdownItem]", inputs: ["hermesDisabled", "id"] }, { kind: "directive", type: i2$1.HermesIfOpen, selector: "[hermesIfOpen]", inputs: ["hermesIfOpen"], outputs: ["hermesIfOpenChange"] }, { kind: "directive", type: i5.HermesLoading, selector: "[hermesLoading]", inputs: ["hermesLoading"] }] }); }
1406
+ }
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ExportDatagridComponent, decorators: [{
1408
+ type: Component,
1409
+ args: [{ selector: 'appfx-dg-export', standalone: false, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n@if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <hermes-dropdown class=\"column-switch-wrapper\">\r\n <button\r\n data-test-id=\"export-link\"\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm btn-link\"\r\n [hermesLoading]=\"exportStatus.inProgress || false\"\r\n [disabled]=\"!(allItemsCount > 0)\"\r\n (click)=\"exportAllIfOnlyOption()\"\r\n hermesDropdownTrigger\r\n >\r\n {{ dgStrings.exportLink }}\r\n @if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <hermes-icon shape=\"angle\" direction=\"down\"></hermes-icon>\r\n }\r\n </button>\r\n <hermes-dropdown-menu class=\"export-dropdown\" hermesPosition=\"top-left\" *hermesIfOpen>\r\n @if (selectedItemsCount > 0 || filteredItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.ALL)\">\r\n {{ dgStrings.exportAll }} {{ allRowsCount }}\r\n </button>\r\n }\r\n @if (filteredItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.MATCHING_FILTERS)\">\r\n {{ dgStrings.exportMatchingFilters }}\r\n {{ matchedFilterRowsCount }}\r\n </button>\r\n }\r\n @if (selectedItemsCount > 0) {\r\n <button type=\"button\" hermesDropdownItem (click)=\"onExportClick(exportType.SELECTED_ONLY)\">\r\n {{ dgStrings.exportSelectedRows }} {{ selectedRowsCount }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n} @else {\r\n <div class=\"column-switch-wrapper\">\r\n <button\r\n data-test-id=\"export-link\"\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm btn-link\"\r\n [hermesLoading]=\"exportStatus.inProgress || false\"\r\n [disabled]=\"!(allItemsCount > 0)\"\r\n (click)=\"exportAllIfOnlyOption()\"\r\n >\r\n {{ dgStrings.exportLink }}\r\n </button>\r\n </div>\r\n}\r\n", styles: [".export-dropdown{max-width:12rem}\n"] }]
1410
+ }], ctorParameters: () => [{ type: DatagridStrings }], propDecorators: { allItemsCount: [{
1411
+ type: Input
1412
+ }], filteredItemsCount: [{
1413
+ type: Input
1414
+ }], selectedItemsCount: [{
1415
+ type: Input
1416
+ }], exportEventEmitter: [{
1417
+ type: Output
1418
+ }] } });
1419
+
1420
+ /*
1421
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1422
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1423
+ * This software is released under MIT license.
1424
+ * The full license information can be found in LICENSE in the root directory of this project.
1425
+ */
1426
+ /**
1427
+ * Used to determine whether the datagrid row is locked (disabled) or not, by
1428
+ * returning boolean result. If the disabled state is provided and is true the row
1429
+ * is consider as not selectable. If isLocked function is provided the return
1430
+ * boolean result from it is used to be determine whether the row is selectable.
1431
+ * If isLocked function is not provided the pipe returns null, row is consider
1432
+ * selectable.
1433
+ *
1434
+ * Usage:
1435
+ * rowItem | isRowSelectable: isLockedFunction : disabled
1436
+ */
1437
+ class IsRowSelectablePipe {
1438
+ transform(rowItem, isLocked, disabled) {
1439
+ if (disabled) {
1440
+ return false;
1441
+ }
1442
+ if (isLocked) {
1443
+ return !isLocked(rowItem);
1444
+ }
1445
+ return true;
1446
+ }
1447
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: IsRowSelectablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1448
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: IsRowSelectablePipe, isStandalone: false, name: "isRowSelectable" }); }
1449
+ }
1450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: IsRowSelectablePipe, decorators: [{
1451
+ type: Pipe,
1452
+ args: [{ name: 'isRowSelectable', standalone: false }]
1453
+ }] });
1454
+
1455
+ /**
1456
+ * DatagridComponent represents a data-bound list control that displays items from an array-based source in the form of columns and rows.
1457
+ * The component is built on top of the HermesDatagrid component from Clarity
1458
+ * and provides additional functionality and customization options on top of the base HermesDatagrid.
1459
+ *
1460
+ * @template T - The type of the data being displayed in the datagrid.
1461
+ * This allows the datagrid to enforce type safety for the items passed to it, ensuring
1462
+ * that the `gridItems` and other related inputs conform to a specific structure.
1463
+ *
1464
+ * @example
1465
+ * <appfx-datagrid [gridItems]="data" [columns]="columns"></appfx-datagrid>
1466
+ */
1467
+ class DatagridComponent {
1468
+ #defaultActionButtonClass;
1469
+ #interpolationExpression;
1470
+ #unsubscribeSubject;
1471
+ #zoomLevelSubscription;
1472
+ /**
1473
+ * Array of objects defining the properties of each column in the Datagrid.
1474
+ *
1475
+ * @type ColumnDefinition
1476
+ */
1477
+ #dgColumns;
1478
+ #selectionType;
1479
+ #selectedItems;
1480
+ #rowSelectionMode;
1481
+ #actionBarActions;
1482
+ /**
1483
+ * Disable datagrid rows, has the same value as
1484
+ * 'disabled' input and is changed when this input is changed.
1485
+ * It is needed only because in some modals when the grid is init with
1486
+ * disabled state equal to true this state is not apply on row select column
1487
+ * and row's checkbox/radiobuttons for selection are enabled for disabled grid.
1488
+ * The resolution of this problem is the row disabled state to be init in ngAfterViewInit
1489
+ * method on a base of 'disabled' input.
1490
+ * Default: false
1491
+ */
1492
+ #areRowsDisabled;
1493
+ #pageSize;
1494
+ /**
1495
+ * Whether there are applied advanced filters
1496
+ */
1497
+ #hasAdvancedFilters;
1498
+ #wrapCellText;
1499
+ constructor(datagridStrings, uid, cdr, exportProviderService, groupService, zoomLevelService) {
1500
+ this.uid = uid;
1501
+ this.cdr = cdr;
1502
+ this.exportProviderService = exportProviderService;
1503
+ this.groupService = groupService;
1504
+ this.zoomLevelService = zoomLevelService;
1505
+ this.searchTerm = '';
1506
+ this.draggedItems = [];
1507
+ /**
1508
+ * Shows loading indicator inside the datagrid to prevent user interactions while data is loading.
1509
+ * Set to `true` to display loading; set to `false` to hide the loading indicator.
1510
+ * Defaults to `false`.
1511
+ */
1512
+ this.loading = false;
1513
+ /**
1514
+ * Indicates if additional records are currently being fetched during infinite scrolling.
1515
+ * When `true`, a loading indicator is appended to the end of the datagrid rows.
1516
+ * @default false
1517
+ */
1518
+ this.loadingMoreItems = false;
1519
+ /**
1520
+ * When set to `true`, automatically selects the first item in the datagrid upon initialization.
1521
+ * Defaults to `false`.
1522
+ */
1523
+ this.preSelectFirstItem = false;
1524
+ /**
1525
+ * The totalItems should be provided when the grid is server driven datagrid
1526
+ * (serverDrivenDatagrid = true), otherwise the totalItems is calculated
1527
+ * internally and shouldn't be set.
1528
+ */
1529
+ this.totalItems = 0;
1530
+ /**
1531
+ * Shows the projected custom pagination component from the host component.
1532
+ * Used for infinite pagination scenarios.
1533
+ * Default: false
1534
+ */
1535
+ this.showCustomPagination = false;
1536
+ /**
1537
+ * Enables or disables server-driven mode for the datagrid.
1538
+ * When set to `true`, pagination and filtering should be managed externally.
1539
+ * Defaults to `false`.
1540
+ */
1541
+ this.serverDrivenDatagrid = false;
1542
+ /**
1543
+ * All grid items count when no filter is added.
1544
+ * Used for Export functionality when showExport is true.
1545
+ * Should be provided only when the grid is server driven datagrid
1546
+ * (serverDrivenDatagrid = true), otherwise the listItemsCount is calculated
1547
+ * internally and shouldn't be set.
1548
+ *
1549
+ * @deprecated To be removed with VSUIP-4776
1550
+ */
1551
+ this.listItemsCount = 0;
1552
+ this.rowsExpandedByDefault = false;
1553
+ /**
1554
+ * The state passed to the detail pane. Contains the gridItem for which
1555
+ * detail is shown or null in case detail pane is hidden.
1556
+ */
1557
+ this.detailState = null;
1558
+ /**
1559
+ * Used to notify the hosting view that the detailState value has changed
1560
+ * ( to enable two way data binding )
1561
+ */
1562
+ this.detailStateChange = new EventEmitter(true);
1563
+ /**
1564
+ * An array of properties used for advanced filtering in FilterMode.Advanced
1565
+ */
1566
+ this.filterableProperties = [];
1567
+ /**
1568
+ * Controls whether the datagrid uses virtual scrolling to render data.
1569
+ * Virtual scrolling improves performance with large datasets by only rendering
1570
+ * rows that are currently visible in the viewport.
1571
+ *
1572
+ * @remarks
1573
+ * Virtual scrolling has the following limitations:
1574
+ * - Requires fixed row height for accurate scroll position calculations
1575
+ * - Cell text is always truncated to maintain consistent row heights
1576
+ * - Expandable rows are not supported due to height constraints
1577
+ * - Only works with server-driven data mode
1578
+ *
1579
+ * @default false
1580
+ */
1581
+ this.virtualScrolling = false;
1582
+ /**
1583
+ * Controls whether the "unsort" step is removed from the column sort cycle for
1584
+ * every column in the grid.
1585
+ * - `true` (default): sorting toggles ASC ↔ DESC only; a sorted column cannot
1586
+ * be returned to the unsorted state by clicking its header.
1587
+ * - `false`: sorting cycles ASC → DESC → unsorted (Clarity's default behavior).
1588
+ *
1589
+ * A column may override this grid-level default via
1590
+ * {@link ColumnDefinition.disableUnsort}.
1591
+ *
1592
+ * @default true
1593
+ */
1594
+ this.disableUnsort = true;
1595
+ /**
1596
+ * Input for providing data when virtual scrolling is enabled.
1597
+ * <code>gridItems</code> should not be used in this case.
1598
+ */
1599
+ this.dataRange = {
1600
+ total: 100,
1601
+ skip: 0,
1602
+ data: [],
1603
+ };
1604
+ /**
1605
+ * Emits the updated page size {@link pageSize} to the parent component when changed.
1606
+ */
1607
+ this.pageSizeChange = new EventEmitter();
1608
+ /**
1609
+ * Emits the updated gridItems to the parent component when changed.
1610
+ */
1611
+ this.gridItemsChange = new EventEmitter();
1612
+ /**
1613
+ * Emits when advanced filter criteria changes.
1614
+ */
1615
+ this.advancedFilterChange = new EventEmitter();
1616
+ /**
1617
+ * Emits the updated column definitions {@link columns} to the parent component when changed.
1618
+ */
1619
+ this.columnDefsChange = new EventEmitter();
1620
+ /**
1621
+ * Emits the updated selected items {@link selectedItems} when changed.
1622
+ */
1623
+ this.selectedItemsChange = new EventEmitter();
1624
+ /**
1625
+ * Event emitter to tell the hosting view that user has requested to export list data
1626
+ */
1627
+ this.exportDataEvent = new EventEmitter();
1628
+ /**
1629
+ * Event emitter to tell hosting view that search term, used for filtering has changed.
1630
+ */
1631
+ this.searchTermChange = new EventEmitter();
1632
+ /**
1633
+ * Event emitter to tell hosting view that size of column has changed.
1634
+ */
1635
+ this.columnResize = new EventEmitter();
1636
+ /**
1637
+ * Event emitter to tell hosting view that sort order of column has changed.
1638
+ */
1639
+ this.columnSortOrderChange = new EventEmitter();
1640
+ /**
1641
+ * Event emitter to tell hosting view that hidden state of column has changed.
1642
+ */
1643
+ this.columnHiddenStateChange = new EventEmitter();
1644
+ // Disabled for now: only the hermesDgPinnable header toggle could ever raise this, so it is
1645
+ // commented out along with the toggle, onPinnedChange() below and the ColumnPinnedState
1646
+ // interface. Kept as a line comment rather than a doc comment, so api-extractor does not attach
1647
+ // it to the next output.
1648
+ //
1649
+ // /**
1650
+ // * Event emitter to tell hosting view that the user pinned or unpinned a column.
1651
+ // */
1652
+ // @Output() columnPinnedChange: EventEmitter<ColumnPinnedState> = new EventEmitter<ColumnPinnedState>();
1653
+ /**
1654
+ * Event emitter to tell hosting view that column filtering has changed.
1655
+ */
1656
+ this.columnFilterChange = new EventEmitter();
1657
+ /**
1658
+ * Event emitter emitted when the data needs to be refreshed,
1659
+ * based on user action or external ones.
1660
+ */
1661
+ this.refreshGridData = new EventEmitter();
1662
+ /**
1663
+ * Event emitter emits when data in the grid with virtual scrolling needs to be refreshed.
1664
+ */
1665
+ this.refreshVirtualGridData = new EventEmitter();
1666
+ /**
1667
+ * Event emitter triggered when a single-row action or actionbar action is clicked.
1668
+ * The emitted event contains information about the action that was clicked. {@link ActionClickEvent}
1669
+ */
1670
+ this.actionClick = new EventEmitter();
1671
+ /**
1672
+ * Event emitter triggered when the single-row action menu is opened.
1673
+ * The emitted event contains information about the open state and the actions associated with the menu. {@link SingleRowActionOpen}
1674
+ */
1675
+ this.rowActionMenuOpenChange = new EventEmitter();
1676
+ /**
1677
+ * Event emitter triggered when a right-click event is performed on a grid row.
1678
+ */
1679
+ this.openContextMenu = new EventEmitter();
1680
+ /**
1681
+ * Event emitter to tell hosting view that column order has changed.
1682
+ */
1683
+ this.columnOrderChange = new EventEmitter();
1684
+ this.applyFlexLayout = true;
1685
+ this.zoomLevel = ZoomLevel.none;
1686
+ this.gridLayoutModel = {
1687
+ compact: true,
1688
+ disabled: false,
1689
+ stretchToParentHeight: true,
1690
+ };
1691
+ this.gridFooterModel = {
1692
+ showFooter: true,
1693
+ hideColumnToggle: false,
1694
+ enableCustomExport: false,
1695
+ };
1696
+ this.defaultUnsetValue = undefined;
1697
+ this.defaultUnsortedOrder = HermesDatagridSortOrder.UNSORTED;
1698
+ this.enableSingleRowActions = false;
1699
+ this.#defaultActionButtonClass = ActionBarLayout.flatCompact;
1700
+ this.#interpolationExpression = /\{(\d+)\}/g;
1701
+ this.#unsubscribeSubject = new Subject();
1702
+ this.#zoomLevelSubscription = new Subscription();
1703
+ this.#selectionType = SelectionType.Single;
1704
+ this.#selectedItems = [];
1705
+ this.#rowSelectionMode = true;
1706
+ this.#actionBarActions = [];
1707
+ /**
1708
+ * Disable datagrid rows, has the same value as
1709
+ * 'disabled' input and is changed when this input is changed.
1710
+ * It is needed only because in some modals when the grid is init with
1711
+ * disabled state equal to true this state is not apply on row select column
1712
+ * and row's checkbox/radiobuttons for selection are enabled for disabled grid.
1713
+ * The resolution of this problem is the row disabled state to be init in ngAfterViewInit
1714
+ * method on a base of 'disabled' input.
1715
+ * Default: false
1716
+ */
1717
+ this.#areRowsDisabled = false;
1718
+ this.#pageSize = 0;
1719
+ /**
1720
+ * Whether there are applied advanced filters
1721
+ */
1722
+ this.#hasAdvancedFilters = false;
1723
+ this.#wrapCellText = true;
1724
+ /**
1725
+ * Wrapper around trackByFn intended for identity comparison only.
1726
+ * The index passed (0) is a dummy value and should not be relied upon.
1727
+ */
1728
+ this.trackByGridItemFn = (item) => this.trackByFn(0, (item || {}));
1729
+ this.dgStrings = {
1730
+ ...datagridStrings,
1731
+ };
1732
+ }
1733
+ /**
1734
+ * Input property for the grid layout configuration.
1735
+ * Allows the consumer of the component to provide configuration values.
1736
+ *
1737
+ * @See GridLayoutModel
1738
+ */
1739
+ get layoutModel() {
1740
+ return { ...this.gridLayoutModel };
1741
+ }
1742
+ set layoutModel(config) {
1743
+ this.gridLayoutModel = {
1744
+ ...config,
1745
+ compact: config?.compact ?? true,
1746
+ stretchToParentHeight: config?.stretchToParentHeight ?? true,
1747
+ };
1748
+ this.applyFlexLayout = !!this.gridLayoutModel.stretchToParentHeight;
1749
+ }
1750
+ /**
1751
+ * Input property for the footer configuration.
1752
+ * Allows the consumer of the component to provide configuration values.
1753
+ *
1754
+ * @See GridFooterModel
1755
+ */
1756
+ get footerModel() {
1757
+ return { ...this.gridFooterModel };
1758
+ }
1759
+ set footerModel(config) {
1760
+ this.gridFooterModel = {
1761
+ ...config,
1762
+ showFooter: config?.showFooter ?? true,
1763
+ };
1764
+ }
1765
+ /**
1766
+ * Array of column definitions that configure the appearance and behavior of each column in the Datagrid.
1767
+ *
1768
+ * Each object in this array represents a column {@link ColumnDefinition}.
1769
+ * The required ColumnDefinition properties are:
1770
+ * - `displayName`: The text for the column header.
1771
+ * - `field`: The name of the property in the data source to be shown in the column.
1772
+ */
1773
+ get columns() {
1774
+ return this.#dgColumns;
1775
+ }
1776
+ set columns(columns) {
1777
+ this.#dgColumns = columns;
1778
+ if (columns) {
1779
+ this.visibleColumns = columns.filter((column) => !column.hidden);
1780
+ this.columnDefsChange.emit(this.#dgColumns);
1781
+ }
1782
+ if (this.hermesDatagrid.columns) {
1783
+ this.hermesDatagrid.dataChanged();
1784
+ }
1785
+ }
1786
+ /**
1787
+ * Defines the grid selection type.
1788
+ * Accepts a value from `SelectionType` enum {@link SelectionType}, which specifies the row selection behavior:
1789
+ * - `SelectionType.NONE`: No rows are selectable.
1790
+ * - `SelectionType.SINGLE_SELECT` (default): Only one row can be selected at a time.
1791
+ * - `SelectionType.MULTI_SELECT`: Multiple rows can be selected.
1792
+ *
1793
+ * Defaults to `SelectionType.SINGLE_SELECT`.
1794
+ */
1795
+ get selectionType() {
1796
+ return this.#selectionType;
1797
+ }
1798
+ set selectionType(type) {
1799
+ // guard against malformed component bindings to unset variables
1800
+ if (type !== undefined) {
1801
+ this.#selectionType = selectionTypeAttribute(type);
1802
+ if (this.hermesDatagrid) {
1803
+ this.initGridSelection();
1804
+ }
1805
+ }
1806
+ }
1807
+ /**
1808
+ * Array of grid items {@link gridItems} which to be selected.
1809
+ */
1810
+ get selectedItems() {
1811
+ return this.#selectedItems;
1812
+ }
1813
+ set selectedItems(items) {
1814
+ this.#selectedItems = Array.isArray(items) ? items.filter((item) => item !== undefined) : [];
1815
+ this.cdr.detectChanges();
1816
+ }
1817
+ /**
1818
+ * Enables or disables selection/deselection of rows when a row is clicked.
1819
+ * If `SelectionType` is set to `NONE`, row selection is automatically disabled, regardless of this setting.
1820
+ * Defaults to `true`.
1821
+ */
1822
+ get rowSelectionMode() {
1823
+ // Clarity 15 allows row selection even though the selection mode is none.
1824
+ // Ensure that row selection mode is false when selection mode is none.
1825
+ return this.#selectionType === SelectionType.None ? false : this.#rowSelectionMode;
1826
+ }
1827
+ set rowSelectionMode(value) {
1828
+ this.#rowSelectionMode = value;
1829
+ }
1830
+ /**
1831
+ * Action definitions for the action bar.
1832
+ */
1833
+ get actionBarActions() {
1834
+ return this.#actionBarActions;
1835
+ }
1836
+ set actionBarActions(actions) {
1837
+ if (actions) {
1838
+ actions.forEach((action) => {
1839
+ action.class = action.class || this.#defaultActionButtonClass;
1840
+ });
1841
+ this.#actionBarActions = actions;
1842
+ }
1843
+ }
1844
+ /**
1845
+ * Sets the number of items displayed per page in the datagrid.
1846
+ * By default, no page size is set.
1847
+ */
1848
+ get pageSize() {
1849
+ return this.#pageSize;
1850
+ }
1851
+ set pageSize(value) {
1852
+ this.#pageSize = value;
1853
+ if (value > 0) {
1854
+ this.pageSizeChange.emit(this.#pageSize);
1855
+ }
1856
+ }
1857
+ set datagridLabels(overriddenStrings) {
1858
+ if (overriddenStrings) {
1859
+ for (const key of Object.keys(overriddenStrings)) {
1860
+ this.dgStrings[key] = overriddenStrings[key] || '';
1861
+ }
1862
+ }
1863
+ }
1864
+ /**
1865
+ * Defines whether the content in the cells of the datagrid should be wrapped
1866
+ * {@see DatagridContentNoWrapDirective}.
1867
+ */
1868
+ get wrapText() {
1869
+ return this.#wrapCellText;
1870
+ }
1871
+ set wrapText(value) {
1872
+ if (value !== this.#wrapCellText) {
1873
+ this.#wrapCellText = value;
1874
+ this.cdr.markForCheck();
1875
+ }
1876
+ }
1877
+ get rowsDisabled() {
1878
+ return this.#areRowsDisabled;
1879
+ }
1880
+ get enableToolBar() {
1881
+ return !!this.actionBarActions?.length || (this.filterMode !== null && this.filterMode !== undefined);
1882
+ }
1883
+ get enableExportButton() {
1884
+ return !!this.gridFooterModel.enableCustomExport || !!this.gridFooterModel.clientSideExportConfig;
1885
+ }
1886
+ get selectedItemsCount() {
1887
+ return this.#selectedItems ? this.#selectedItems.length : 0;
1888
+ }
1889
+ get showDeselectAll() {
1890
+ return this.#selectionType === SelectionType.Multi;
1891
+ }
1892
+ get deselectAllDisabled() {
1893
+ return this.selectedItemsCount === 0;
1894
+ }
1895
+ get filteredItemsCount() {
1896
+ let filteredItemsCount = 0;
1897
+ if (this.searchTerm?.length > 0 || this.#hasAdvancedFilters) {
1898
+ filteredItemsCount = this.totalItems;
1899
+ }
1900
+ return filteredItemsCount;
1901
+ }
1902
+ ngOnInit() {
1903
+ this.initGridSelection();
1904
+ this.initTotalItemsCount();
1905
+ if (this.zoomLevelService) {
1906
+ this.zoomLevelService.onChange.subscribe((v) => (this.zoomLevel = v));
1907
+ }
1908
+ }
1909
+ ngAfterViewInit() {
1910
+ this.#areRowsDisabled = !!this.gridLayoutModel.disabled;
1911
+ }
1912
+ ngOnDestroy() {
1913
+ this.#unsubscribeSubject.next();
1914
+ this.#unsubscribeSubject.complete();
1915
+ this.#zoomLevelSubscription.unsubscribe();
1916
+ }
1917
+ resize() {
1918
+ this.hermesDatagrid.resize();
1919
+ }
1920
+ onModelChange() {
1921
+ this.cdr.markForCheck();
1922
+ }
1923
+ onContextMenu($event, item) {
1924
+ if (this.#selectionType !== SelectionType.None &&
1925
+ !this.isItemSelected(item) &&
1926
+ (!this.isRowLocked || !this.isRowLocked(item))) {
1927
+ this.#selectedItems = [];
1928
+ this.updateSelectedItems(item);
1929
+ }
1930
+ const targets = this.#selectionType === SelectionType.Multi ? this.#selectedItems : [item];
1931
+ $event.preventDefault();
1932
+ this.openContextMenu.emit({ event: $event, context: targets });
1933
+ }
1934
+ onColumnOrderChange(data) {
1935
+ this.columns = data.columns;
1936
+ this.visibleColumns = this.columns.filter((column) => !column.hidden);
1937
+ this.cdr.detectChanges();
1938
+ //Without resize when the grid is empty and column is moved
1939
+ //the columns are not displayed correctly
1940
+ this.resize();
1941
+ this.columnOrderChange.emit(data);
1942
+ }
1943
+ /**
1944
+ * Virtual scroll event handler. Called when visible data range has changed
1945
+ */
1946
+ renderedRangeChange($event) {
1947
+ const currentPageState = {
1948
+ page: { size: $event.end - $event.start, from: $event.start },
1949
+ };
1950
+ if ($event.start === 0 && $event.end === 0) {
1951
+ return;
1952
+ }
1953
+ this.refreshVirtualGridData.emit(currentPageState);
1954
+ this.cdr.detectChanges();
1955
+ }
1956
+ /**
1957
+ * Scrolls to a specified index when virtual scrolling is enabled.
1958
+ */
1959
+ scrollToIndex(index, behavior) {
1960
+ if (this.virtualScrolling) {
1961
+ this.hermesDatagrid.virtualScroll.scrollToIndex(index, behavior);
1962
+ }
1963
+ }
1964
+ ngOnChanges(changes) {
1965
+ if (changes['gridItems'] && changes['gridItems'].currentValue) {
1966
+ this.gridItemsChange.emit(this.gridItems);
1967
+ this.preselectDetail();
1968
+ if (!this.serverDrivenDatagrid) {
1969
+ this.totalItems = this.gridItems.length;
1970
+ this.listItemsCount = this.gridItems.length;
1971
+ }
1972
+ else if (!changes['gridItems'].isFirstChange() && this.selectionType === SelectionType.Multi) {
1973
+ this.notifyOnChanges();
1974
+ }
1975
+ }
1976
+ // inform Clarity datagrid component for building headers
1977
+ if (changes['columns'] &&
1978
+ Array.isArray(changes['columns'].currentValue) &&
1979
+ changes['columns'].currentValue.length) {
1980
+ this.cdr.detectChanges();
1981
+ }
1982
+ //Skip first initial change of disabled field, initially the
1983
+ //areRowsDisabled field is updated in ngAfterViewInit method
1984
+ if (changes.layoutModel?.currentValue && !changes.layoutModel.isFirstChange()) {
1985
+ this.#areRowsDisabled = !!this.gridLayoutModel?.disabled;
1986
+ }
1987
+ if (changes['singleRowActions']) {
1988
+ this.initActionTypes();
1989
+ }
1990
+ }
1991
+ trackByColumnId(index, column) {
1992
+ return column.uid || column.displayName;
1993
+ }
1994
+ buildRowDetailContentId(index) {
1995
+ return `datagrid-${this.uid}-row-detail-${index}`;
1996
+ }
1997
+ onAdvancedFilterCriteriaChange(filterCriteria) {
1998
+ // We need to know if there are filters, because of filteredItemsCount
1999
+ this.#hasAdvancedFilters = filterCriteria ? filterCriteria.length > 0 : false;
2000
+ this.advancedFilterChange.emit(filterCriteria);
2001
+ }
2002
+ /**
2003
+ * Handles datagrid selected items changes.
2004
+ * It is public because is use from directives to emit selection
2005
+ * change events (see DatagridPreserveSelection directive).
2006
+ */
2007
+ onSelectedItemsChange(selected) {
2008
+ this.#selectedItems = selected;
2009
+ this.selectedItemsChange.emit(selected);
2010
+ }
2011
+ /**
2012
+ * Return DataGrid footer label.
2013
+ * - Return "datagridLabels.footer" property, if defined.
2014
+ * - If there is one item -> 1 item
2015
+ * - If there is no paging -> {0} items
2016
+ * - Else -> {1} - {2} of {0} items
2017
+ */
2018
+ getFooterMessage(totalItems, pageSize, firstItem, lastItem) {
2019
+ let footer = this.dgStrings.footer;
2020
+ if (footer) {
2021
+ // Footer is overridden.
2022
+ return this.interpolateMessage(footer, [totalItems, firstItem, lastItem]);
2023
+ }
2024
+ // Flag indicating when to show current range of loaded items (e.g. {1} - {2} of {0} items)
2025
+ const showRange = (pageSize !== undefined && pageSize > 0 && totalItems > pageSize) ||
2026
+ (lastItem !== undefined &&
2027
+ firstItem !== undefined &&
2028
+ this.virtualScrolling &&
2029
+ totalItems > 0 &&
2030
+ totalItems > lastItem - firstItem + 1);
2031
+ if (totalItems === 1) {
2032
+ footer = this.dgStrings.singleItem;
2033
+ }
2034
+ else if (showRange) {
2035
+ footer = this.interpolateMessage(this.dgStrings.pagedItems, [totalItems, firstItem, lastItem]);
2036
+ }
2037
+ else {
2038
+ footer = this.interpolateMessage(this.dgStrings.multipleItems, [totalItems]);
2039
+ }
2040
+ return footer;
2041
+ }
2042
+ toggleAll() {
2043
+ if (this.hermesDatagrid) {
2044
+ this.hermesDatagrid.allSelected = !this.hermesDatagrid.allSelected;
2045
+ }
2046
+ }
2047
+ getExpandDetailsLabel(item) {
2048
+ if (!this.hasExpandableRows(item)) {
2049
+ return '';
2050
+ }
2051
+ const itemName = item[this.visibleColumns?.[0]?.field || ''] || '';
2052
+ return this.interpolateMessage(this.dgStrings.expandDetailsPaneLabel, [itemName]);
2053
+ }
2054
+ getCollapseDetailsLabel(item) {
2055
+ if (!this.hasExpandableRows(item)) {
2056
+ return '';
2057
+ }
2058
+ const itemName = item[this.visibleColumns?.[0]?.field || ''] || '';
2059
+ return this.interpolateMessage(this.dgStrings.collapseDetailsPaneLabel, [itemName]);
2060
+ }
2061
+ onColumnResize(columnSize, column) {
2062
+ this.columnResize.emit({ columnSize: columnSize, column: column });
2063
+ }
2064
+ // Disabled along with hermesDgPinnable, which was the only thing that called this.
2065
+ // protected onPinnedChange(pinned: boolean, column: ColumnDefinition<T>): void {
2066
+ // // The column definition is the source of truth for the binding, so it has to be updated or the
2067
+ // // next change detection would push the previous value back onto the column.
2068
+ // column.pinned = pinned;
2069
+ // this.columnPinnedChange.emit({ pinned: pinned, column: column });
2070
+ // }
2071
+ onSortOrderChange(sortOrder, column) {
2072
+ const columnSortOrder = {
2073
+ sortOrder: sortOrder,
2074
+ column: column,
2075
+ };
2076
+ if (this.gridFooterModel?.clientSideExportConfig?.sort) {
2077
+ this.gridFooterModel.clientSideExportConfig.sortOrder = columnSortOrder;
2078
+ }
2079
+ this.columnSortOrderChange.emit(columnSortOrder);
2080
+ this.columns.forEach(col => (col.defaultSortOrder = this.defaultUnsortedOrder));
2081
+ column.defaultSortOrder = sortOrder;
2082
+ }
2083
+ onDeselectAllClick() {
2084
+ this.#selectedItems = [];
2085
+ this.selectedItemsChange.emit(this.#selectedItems);
2086
+ }
2087
+ onSelectAllInVirtualGrid(isSelect) {
2088
+ if (isSelect) {
2089
+ // Select all
2090
+ // Append all currently loaded records to the existing selection
2091
+ const newSelection = [...this.#selectedItems];
2092
+ this.dataRange.data.forEach(item => {
2093
+ if (!this.#selectedItems.some(selected => this.trackByGridItemFn(selected) === this.trackByGridItemFn(item))) {
2094
+ newSelection.push(item);
2095
+ }
2096
+ });
2097
+ this.#selectedItems = newSelection;
2098
+ this.selectedItemsChange.emit(newSelection);
2099
+ }
2100
+ else {
2101
+ // Deselect all
2102
+ this.onDeselectAllClick();
2103
+ }
2104
+ }
2105
+ onDragStart(row) {
2106
+ this.setDraggedItems(row);
2107
+ }
2108
+ onDragMove() {
2109
+ // note mibryamov: since the default strategy for change detection is
2110
+ // OnPush, if we don't mark the view changed on every drag move, when
2111
+ // you stop the dragging without triggering OnDrop on the target area,
2112
+ // the dragging ghost element is not positioned as expected when
2113
+ // disappearing, it goes to the top-left corner of the page instead of
2114
+ // going to the drop handle icon from where the drag is triggered. To
2115
+ // prevent this we should mark the view changed on every move.
2116
+ this.cdr.markForCheck();
2117
+ }
2118
+ onFilterChange(filterValue, column) {
2119
+ this.columnFilterChange.emit({
2120
+ filterValue: filterValue,
2121
+ column: column,
2122
+ });
2123
+ }
2124
+ onColumnHiddenStateChange(value) {
2125
+ this.columnHiddenStateChange.emit(value);
2126
+ if (this.gridItems && this.gridItems.length === 0 && value.hidden === false) {
2127
+ // Force change detection otherwise column is not shown when grid is empty
2128
+ this.cdr.detectChanges();
2129
+ this.resize();
2130
+ }
2131
+ }
2132
+ refreshGrid(state) {
2133
+ if (this.virtualScrolling) {
2134
+ return;
2135
+ }
2136
+ // There is a 'cosmetic' change in Clarity 2 in the page provider.
2137
+ // The change is related to using firstItem & lastItem in generating page info, when there are no items.
2138
+ // However, this breaks our data retrieval. For this reason, we are keeping the page state as it was before.
2139
+ if (state.page && state.page.from === -1) {
2140
+ state.page.from = 0;
2141
+ }
2142
+ if (state.page && state.page.to === -1) {
2143
+ state.page.to = 0;
2144
+ }
2145
+ this.refreshGridData.emit(state);
2146
+ if (this.detailState) {
2147
+ this.cdr.detectChanges();
2148
+ }
2149
+ }
2150
+ onExportEvent(exportStatus) {
2151
+ if (this.footerModel.enableCustomExport || this.footerModel.clientSideExportConfig?.customExport) {
2152
+ // If custom export is enabled, emit the export event and return.
2153
+ this.exportDataEvent.emit(exportStatus);
2154
+ return;
2155
+ }
2156
+ if (this.footerModel.clientSideExportConfig) {
2157
+ // If client-side export configuration is available, process with the export.
2158
+ const datagridItemSet = {
2159
+ totalDatagridItems: this.gridItems,
2160
+ selectedItems: this.selectedItems,
2161
+ filteredDatagridItems: [],
2162
+ };
2163
+ this.exportProviderService.exportUIOnlyData(this.footerModel.clientSideExportConfig, exportStatus, datagridItemSet);
2164
+ }
2165
+ }
2166
+ onActionClick(action, context) {
2167
+ // We have context when is clicked row action
2168
+ // when the action bar action is clicked the context is the selected items
2169
+ if (!context) {
2170
+ context = this.#selectedItems;
2171
+ }
2172
+ this.actionClick.emit({ action: action, context: context });
2173
+ }
2174
+ onRowActionOverflowOpen(open, actions, item) {
2175
+ this.rowActionMenuOpenChange.emit({
2176
+ open: open,
2177
+ actions: actions,
2178
+ context: item,
2179
+ });
2180
+ }
2181
+ onAdvancedSearchTermChange(searchTerm) {
2182
+ // We need the search term, because of filteredItemsCount
2183
+ this.searchTerm = searchTerm;
2184
+ this.searchTermChange.emit(searchTerm);
2185
+ }
2186
+ /**
2187
+ * Update "detailState" with the latest value
2188
+ * @param state
2189
+ */
2190
+ onDetailStateChange(state) {
2191
+ if (state !== this.detailState) {
2192
+ this.detailState = state;
2193
+ this.detailStateChange.emit(state);
2194
+ }
2195
+ }
2196
+ /**
2197
+ * Angular ngFor optimization:
2198
+ * By allowing client to specify a given function or property key lookup expression
2199
+ * the looping and binding over large datasets can now offer performance.
2200
+ * The default Angular differ offered is slower since it does a complete object comparison.
2201
+ */
2202
+ trackByFn(index, gridItem) {
2203
+ if (this.trackByGridItemProperty) {
2204
+ const result = getNestedProperty(gridItem, this.trackByGridItemProperty);
2205
+ if (result.isValid) {
2206
+ return result.value;
2207
+ }
2208
+ }
2209
+ if (this.trackByFunction) {
2210
+ return this.trackByFunction(index, gridItem);
2211
+ }
2212
+ return gridItem;
2213
+ }
2214
+ isItemSelected(item) {
2215
+ for (const selectedItem of this.#selectedItems) {
2216
+ if (selectedItem === item) {
2217
+ return true;
2218
+ }
2219
+ }
2220
+ return false;
2221
+ }
2222
+ dropGroup(group) {
2223
+ return (this.groupService?.getGroupItems(group) || []);
2224
+ }
2225
+ hasExpandableRows(item) {
2226
+ return !!this.detailHeader || !!this.detailBody || !!item?.rowDetailRenderer || !!this.rowDetailContent;
2227
+ }
2228
+ preselectDetail() {
2229
+ const isDetailEnabled = !!this.detailHeader || !!this.detailBody;
2230
+ if (isDetailEnabled && this.detailState && (this.trackByGridItemProperty || this.trackByFunction)) {
2231
+ const gridItems = this.gridItems || [];
2232
+ const matchingItems = gridItems.filter((item) => {
2233
+ return this.trackByGridItemFn(item) === this.trackByGridItemFn(this.detailState);
2234
+ });
2235
+ if (matchingItems.length === 0) {
2236
+ // Hide detail pane when item is no longer present in the dataset
2237
+ this.detailState = null;
2238
+ }
2239
+ else {
2240
+ this.detailState = matchingItems[0];
2241
+ // In order for the datagrid detail caret button to be activated and
2242
+ // detail pane anchor to point to the grid item two change
2243
+ // detection cycles are required. Otherwise the detail pane is shown
2244
+ // but anchor and activated datagrid detail caret button are not.
2245
+ this.cdr.detectChanges();
2246
+ }
2247
+ this.cdr.markForCheck();
2248
+ }
2249
+ }
2250
+ setDraggedItems(row) {
2251
+ this.draggedItems = [];
2252
+ if (this.isItemSelected(row)) {
2253
+ this.draggedItems.push(...this.#selectedItems);
2254
+ }
2255
+ else {
2256
+ this.draggedItems.push(row);
2257
+ }
2258
+ }
2259
+ /**
2260
+ * Notifies clarity datagrid about data changes.
2261
+ * When <code>trackByFunction</code> or <code>trackByGridItemProperty</code>
2262
+ * is provided clarity datagrid is not able to pick up data changes in the
2263
+ * <code>rows</<code> collection and selection is messed up. Angular just
2264
+ * does not emit <code>QueryList<T>.changes</code> in this case.
2265
+ */
2266
+ notifyOnChanges() {
2267
+ // Disable check for this.trackByFunction since the compiler thinks it's always assigned but that's not the case.
2268
+ // In the PreselectComponent interface, trackByFunction is required but in the datagrid it's optional.
2269
+ // @ts-ignore
2270
+ if (this.trackByGridItemProperty || this.trackByFunction) {
2271
+ setTimeout(() => {
2272
+ this.hermesDatagrid?.rows?.notifyOnChanges();
2273
+ }, 0);
2274
+ }
2275
+ }
2276
+ initActionTypes() {
2277
+ if (this.singleRowActions) {
2278
+ this.enableSingleRowActions = true;
2279
+ this.cdr.markForCheck();
2280
+ }
2281
+ }
2282
+ initGridSelection() {
2283
+ if (this.hermesDatagrid) {
2284
+ this.hermesDatagrid.identityFn = this.trackByGridItemFn;
2285
+ }
2286
+ if (this.preSelectFirstItem && this.gridItems && this.gridItems.length > 0) {
2287
+ // TODO: Find better solution, This will not work if we
2288
+ // have some default sorting
2289
+ this.#selectedItems = [this.gridItems[0]];
2290
+ }
2291
+ }
2292
+ updateSelectedItems(item) {
2293
+ if (this.#selectionType === SelectionType.Single) {
2294
+ this.#selectedItems = [item];
2295
+ }
2296
+ else {
2297
+ this.#selectedItems.push(item);
2298
+ }
2299
+ this.selectedItemsChange.emit(this.#selectedItems);
2300
+ }
2301
+ initTotalItemsCount() {
2302
+ if (!this.footerModel.showFooter || this.serverDrivenDatagrid) {
2303
+ return;
2304
+ }
2305
+ if (this.gridItems && this.gridItems.length > 0) {
2306
+ this.totalItems = this.gridItems.length;
2307
+ this.cdr.markForCheck();
2308
+ }
2309
+ // This clarity items (hermesDatagrid.items) are all items if there are no pages
2310
+ // and only the items in the page if there are pages in the grid.
2311
+ // We can listen for changes and update the totalItems only if the grid doesn't use
2312
+ // pages. This is usable for example when the user filer data in the grid which doesn't
2313
+ // have pages, in this case we can show correctly the number of items displayed after filtering
2314
+ this.hermesDatagrid.items.change
2315
+ .pipe(filter(() => this.pageSize <= 0), takeUntil(this.#unsubscribeSubject))
2316
+ .subscribe((value) => {
2317
+ this.totalItems = value.length;
2318
+ });
2319
+ }
2320
+ interpolateMessage(message, parameters) {
2321
+ return message.replace(this.#interpolationExpression, (match, index) => {
2322
+ if (index >= parameters.length) {
2323
+ // There are fewer parameters than there are placeholders,
2324
+ // return the placeholder value.
2325
+ return match;
2326
+ }
2327
+ return String(parameters[index]);
2328
+ });
2329
+ }
2330
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridComponent, deps: [{ token: DatagridStrings }, { token: uniqueIdToken }, { token: i0.ChangeDetectorRef }, { token: ExportProviderService }, { token: i3$3.DragAndDropGroupService, optional: true }, { token: i4.ZoomLevelService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2331
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatagridComponent, isStandalone: false, selector: "appfx-datagrid", inputs: { loading: "loading", loadingMoreItems: "loadingMoreItems", preSelectFirstItem: "preSelectFirstItem", pageSizeOptions: "pageSizeOptions", totalItems: "totalItems", showCustomPagination: "showCustomPagination", serverDrivenDatagrid: "serverDrivenDatagrid", listItemsCount: "listItemsCount", rowDetailContent: "rowDetailContent", rowsExpandedByDefault: "rowsExpandedByDefault", trackByFunction: "trackByFunction", trackByGridItemProperty: "trackByGridItemProperty", detailHeader: "detailHeader", detailBody: "detailBody", detailState: "detailState", isRowLocked: "isRowLocked", dragConfig: "dragConfig", filterableProperties: "filterableProperties", filterMode: "filterMode", singleRowActions: "singleRowActions", preserveExistingSelectionOnFilter: "preserveExistingSelectionOnFilter", virtualScrolling: "virtualScrolling", disableUnsort: "disableUnsort", dataRange: "dataRange", gridItems: "gridItems", layoutModel: "layoutModel", footerModel: "footerModel", columns: "columns", selectionType: "selectionType", selectedItems: "selectedItems", rowSelectionMode: "rowSelectionMode", actionBarActions: "actionBarActions", pageSize: "pageSize", datagridLabels: "datagridLabels" }, outputs: { detailStateChange: "detailStateChange", pageSizeChange: "pageSizeChange", gridItemsChange: "gridItemsChange", advancedFilterChange: "advancedFilterChange", columnDefsChange: "columnDefsChange", selectedItemsChange: "selectedItemsChange", exportDataEvent: "exportDataEvent", searchTermChange: "searchTermChange", columnResize: "columnResize", columnSortOrderChange: "columnSortOrderChange", columnHiddenStateChange: "columnHiddenStateChange", columnFilterChange: "columnFilterChange", refreshGridData: "refreshGridData", refreshVirtualGridData: "refreshVirtualGridData", actionClick: "actionClick", rowActionMenuOpenChange: "rowActionMenuOpenChange", openContextMenu: "openContextMenu", columnOrderChange: "columnOrderChange" }, host: { properties: { "class.embedded-flex-component": "this.applyFlexLayout", "class": "this.zoomLevel" } }, providers: [
2332
+ ExportProviderService,
2333
+ uniqueIdProvider,
2334
+ {
2335
+ provide: appfxPreselectableComponentToken,
2336
+ useExisting: forwardRef(() => DatagridComponent),
2337
+ },
2338
+ ], viewQueries: [{ propertyName: "hermesDatagridPagination", first: true, predicate: HermesDatagridPagination, descendants: true }, { propertyName: "hermesDatagrid", first: true, predicate: HermesDatagrid, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<hermes-datagrid\r\n zoomLevelIndicator\r\n [hermesDgDisablePageFocus]=\"true\"\r\n [hermesDgPreserveSelection]=\"preserveExistingSelectionOnFilter\"\r\n [hermesDgSelectionType]=\"selectionType\"\r\n [hermesDgSelected]=\"selectedItems\"\r\n [hermesDgItemsIdentityFn]=\"trackByGridItemFn\"\r\n (hermesDgRefresh)=\"refreshGrid($event)\"\r\n [hermesDgLoading]=\"loading\"\r\n [hermesLoadingMoreItems]=\"loadingMoreItems\"\r\n [hermesDgRowSelection]=\"rowSelectionMode\"\r\n [ngClass]=\"{\r\n 'disabled-grid': gridLayoutModel.disabled,\r\n 'datagrid-compact': gridLayoutModel.compact,\r\n 'flex-hermes-datagrid': gridLayoutModel.stretchToParentHeight,\r\n 'datagrid-overflow-ellipsis': virtualScrolling || !wrapText,\r\n }\"\r\n cdkDropList\r\n [cdkDropListAutoScrollStep]=\"5\"\r\n appfxDgColumnsOrder\r\n [hermesDgCustomSelectAllEnabled]=\"virtualScrolling\"\r\n (hermesDgCustomSelectAll)=\"onSelectAllInVirtualGrid($event)\"\r\n [dgColumnsOrderColumns]=\"columns\"\r\n [dgColumnsVirtualScrolling]=\"virtualScrolling\"\r\n (dgColumnsOrderChange)=\"onColumnOrderChange($event)\"\r\n (hermesDgSelectedChange)=\"onSelectedItemsChange($event)\"\r\n>\r\n <hermes-dg-action-bar *ngIf=\"enableToolBar\">\r\n @if (!!actionBarActions.length) {\r\n <div class=\"appfx-datagrid-actions-container\">\r\n <appfx-datagrid-action-bar\r\n class=\"action-bar\"\r\n (invokeAction)=\"onActionClick($event)\"\r\n [actions]=\"actionBarActions\"\r\n >\r\n </appfx-datagrid-action-bar>\r\n </div>\r\n }\r\n @if (filterMode !== undefined && filterMode !== null) {\r\n <appfx-datagrid-filters\r\n [filterMode]=\"filterMode\"\r\n [filterableProperties]=\"filterableProperties\"\r\n (searchTermChange)=\"onAdvancedSearchTermChange($event)\"\r\n (propertyFiltersChange)=\"onAdvancedFilterCriteriaChange($event)\"\r\n >\r\n </appfx-datagrid-filters>\r\n }\r\n </hermes-dg-action-bar>\r\n @if (dragConfig) {\r\n <hermes-dg-column class=\"draggableCell\" style=\"width: 20px\"></hermes-dg-column>\r\n }\r\n @for (column of visibleColumns; track trackByColumnId(index, column); let index = $index) {\r\n <!--\r\n hermesDgPinnable is disabled for now, so these two bindings are commented out. Restoring them\r\n means putting them back on the hermes-dg-column below, next to [hermesDgPinned]:\r\n [hermesDgPinnable]=\"!!column.pinnable\"\r\n (hermesDgPinnedChange)=\"onPinnedChange($event, column)\"\r\n -->\r\n <hermes-dg-column\r\n cdkDrag\r\n [cdkDragLockAxis]=\"'x'\"\r\n [cdkDragData]=\"column\"\r\n [cdkDragDisabled]=\"!!column.pinned\"\r\n appfxColumnOrder\r\n [columnData]=\"column\"\r\n [columnIndex]=\"index\"\r\n [style]=\"column.width ? { width: column.width } : null\"\r\n (hermesDgColumnResize)=\"onColumnResize($event, column)\"\r\n [hermesDgField]=\"column.sortAndFilterByField || defaultUnsetValue\"\r\n [hermesDgSortBy]=\"column.sortComparator || defaultUnsetValue\"\r\n [hermesDgSortOrder]=\"column.defaultSortOrder || defaultUnsortedOrder\"\r\n (hermesDgSortOrderChange)=\"onSortOrderChange($event, column)\"\r\n [hermesDgDisableUnsort]=\"column.disableUnsort ?? disableUnsort\"\r\n [hermesDgPinned]=\"!!column.pinned\"\r\n >\r\n <hermes-dg-filter\r\n *ngIf=\"column.stringFilter || column.sortAndFilterByField\"\r\n [hermesDgFilter]=\"appfxDatagridStringFilter\"\r\n >\r\n <appfx-datagrid-filter\r\n #appfxDatagridStringFilter\r\n [stringFilterType]=\"column.stringFilter\"\r\n [filterValue]=\"column.defaultFilterValue\"\r\n [fieldName]=\"column.sortAndFilterByField\"\r\n (filterValueChange)=\"onFilterChange($event, column)\"\r\n ></appfx-datagrid-filter>\r\n </hermes-dg-filter>\r\n <hermes-dg-filter *ngIf=\"column.filter\">\r\n <appfx-dg-filter-container\r\n [filterType]=\"column.filter\"\r\n [filterValue]=\"column.defaultFilterValue\"\r\n (filterValueChange)=\"onFilterChange($event, column)\"\r\n ></appfx-dg-filter-container>\r\n </hermes-dg-filter>\r\n {{ column.displayName }}\r\n </hermes-dg-column>\r\n }\r\n <hermes-dg-placeholder>\r\n {{ dgStrings.noItemsFound }}\r\n <ng-content select=\".custom-placeholder-content\"></ng-content>\r\n </hermes-dg-placeholder>\r\n\r\n <!-- Server driven datagrid with virtual scrolling -->\r\n @if (serverDrivenDatagrid && virtualScrolling) {\r\n <ng-template\r\n HermesVirtualScroll\r\n let-item\r\n let-i=\"index\"\r\n [hermesVirtualDataRange]=\"dataRange\"\r\n [hermesVirtualRowsItemSize]=\"25\"\r\n [hermesVirtualRowsMinBufferPx]=\"400\"\r\n [hermesVirtualRowsMaxBufferPx]=\"800\"\r\n [hermesVirtualRowsTemplateCacheSize]=\"400\"\r\n [hermesVirtualPersistItems]=\"false\"\r\n [hermesVirtualRowsTrackBy]=\"trackByFunction\"\r\n (renderedRangeChange)=\"renderedRangeChange($event)\"\r\n >\r\n <hermes-dg-row\r\n [hermesDgItem]=\"item\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n [hermesDgSkeletonLoading]=\"!item\"\r\n >\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\" style=\"width: 20px\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell class=\"fixed-cell-height\">\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n </hermes-dg-row>\r\n </ng-template>\r\n }\r\n\r\n <!-- Server driven datagrid with paging -->\r\n @if (serverDrivenDatagrid && !virtualScrolling) {\r\n @for (item of gridItems; track trackByFn.bind(this)(i, item); let i = $index) {\r\n <hermes-dg-row\r\n [hermesDgItem]=\"item\"\r\n [hermesDgDetailOpenLabel]=\"getExpandDetailsLabel(item)\"\r\n [hermesDgDetailCloseLabel]=\"getCollapseDetailsLabel(item)\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n <hermes-dg-action-overflow\r\n *ngIf=\"enableSingleRowActions\"\r\n (hermesDgActionOverflowOpenChange)=\"onRowActionOverflowOpen($event, singleRowActions, item)\"\r\n >\r\n @for (action of singleRowActions; track action) {\r\n <button\r\n class=\"action-item\"\r\n (click)=\"onActionClick(action, item)\"\r\n [title]=\"action.tooltip\"\r\n [disabled]=\"!action.enabled\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </hermes-dg-action-overflow>\r\n\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\" style=\"width: 20px\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell>\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n\r\n <ng-container *ngIf=\"rowDetailContent\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail\r\n *hermesIfExpanded=\"rowsExpandedByDefault\"\r\n tabindex=\"0\"\r\n [attr.aria-describedby]=\"detailData.id\"\r\n >\r\n <div [id]=\"detailData.id\" class=\"datagrid-row-flex\">\r\n <ng-container *ngTemplateOutlet=\"rowDetailContent; context: { item: item }\"> </ng-container>\r\n </div>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n </hermes-dg-row>\r\n }\r\n }\r\n\r\n <!-- Client side datagrid with paging -->\r\n @if (!serverDrivenDatagrid) {\r\n <hermes-dg-row\r\n *hermesDgItems=\"let item of gridItems; trackBy: trackByFn.bind(this); index as i\"\r\n [hermesDgItem]=\"item\"\r\n [hermesDgDetailOpenLabel]=\"getExpandDetailsLabel(item)\"\r\n [hermesDgDetailCloseLabel]=\"getCollapseDetailsLabel(item)\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n <hermes-dg-action-overflow\r\n *ngIf=\"enableSingleRowActions\"\r\n (hermesDgActionOverflowOpenChange)=\"onRowActionOverflowOpen($event, singleRowActions, item)\"\r\n >\r\n @for (action of singleRowActions; track action) {\r\n <button\r\n class=\"action-item\"\r\n (click)=\"onActionClick(action, item)\"\r\n [title]=\"action.tooltip\"\r\n [disabled]=\"!action.enabled\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </hermes-dg-action-overflow>\r\n\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell>\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n\r\n <ng-container *ngIf=\"$any(item).rowDetailRenderer\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail *hermesIfExpanded tabindex=\"0\" [attr.aria-describedby]=\"detailData.id\">\r\n <appfx-dg-cell-container\r\n [id]=\"detailData.id\"\r\n [column]=\"{\r\n displayName: '',\r\n field: '',\r\n columnRenderer: $any(item).rowDetailRenderer,\r\n }\"\r\n [item]=\"item\"\r\n ></appfx-dg-cell-container>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"rowDetailContent\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail\r\n *hermesIfExpanded=\"rowsExpandedByDefault\"\r\n tabindex=\"0\"\r\n [attr.aria-describedby]=\"detailData.id\"\r\n >\r\n <div [id]=\"detailData.id\" class=\"datagrid-row-flex\">\r\n <ng-container *ngTemplateOutlet=\"rowDetailContent; context: { item: item }\"> </ng-container>\r\n </div>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n </hermes-dg-row>\r\n }\r\n\r\n <ng-container *ngIf=\"detailHeader || detailBody\" ngProjectAs=\"hermes-dg-detail\">\r\n <ng-template [hermesIfDetail]=\"detailState\" (hermesIfDetailChange)=\"onDetailStateChange($event)\" let-detail>\r\n <hermes-dg-detail>\r\n @if (detailHeader) {\r\n <hermes-dg-detail-header>\r\n <ng-container *ngTemplateOutlet=\"detailHeader; context: { $implicit: detail }\"></ng-container>\r\n </hermes-dg-detail-header>\r\n }\r\n @if (detailBody) {\r\n <hermes-dg-detail-body>\r\n <ng-container *ngTemplateOutlet=\"detailBody; context: { $implicit: detail }\"></ng-container>\r\n </hermes-dg-detail-body>\r\n }\r\n </hermes-dg-detail>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <hermes-dg-footer *ngIf=\"gridFooterModel.showFooter\">\r\n @if (!gridFooterModel.hideColumnToggle) {\r\n <appfx-dg-column-toggle [(columns)]=\"columns\" (columnHiddenStateChange)=\"onColumnHiddenStateChange($event)\">\r\n </appfx-dg-column-toggle>\r\n }\r\n\r\n @if (enableExportButton) {\r\n <appfx-dg-export\r\n [allItemsCount]=\"gridFooterModel.clientSideExportConfig?.allItemsCount || listItemsCount\"\r\n [selectedItemsCount]=\"selectedItemsCount\"\r\n [filteredItemsCount]=\"filteredItemsCount\"\r\n (exportEventEmitter)=\"onExportEvent($event)\"\r\n class=\"footer-actions\"\r\n >\r\n </appfx-dg-export>\r\n }\r\n\r\n @if (showDeselectAll) {\r\n <div class=\"column-switch-wrapper footer-actions\">\r\n <button class=\"btn btn-sm column-toggle-action\" [disabled]=\"deselectAllDisabled\" (click)=\"onDeselectAllClick()\">\r\n {{ dgStrings.deselectAll }}\r\n </button>\r\n </div>\r\n }\r\n <!-- Custom footer actions -->\r\n @if (gridFooterModel?.footerActions) {\r\n @for (action of gridFooterModel.footerActions; track action) {\r\n <div class=\"footer-actions column-switch-wrapper\">\r\n @if (action.children) {\r\n <hermes-dropdown>\r\n <button\r\n class=\"btn btn-sm column-toggle-action\"\r\n hermesDropdownTrigger\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"angle\" direction=\"up\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu hermesPosition=\"top-left\" *hermesIfOpen>\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n type=\"button\"\r\n [disabled]=\"!childAction.enabled\"\r\n [attr.aria-label]=\"childAction.ariaLabel\"\r\n hermesDropdownItem\r\n (click)=\"onActionClick(childAction)\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"!action.enabled\"\r\n (click)=\"onActionClick(action)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n }\r\n <ng-content select=\".custom-footer-content\"></ng-content>\r\n\r\n <ng-container *ngIf=\"pageSize > 0; else missingPageConfig\" ngProjectAs=\"hermes-dg-pagination\">\r\n <hermes-dg-pagination #pagination [hermesDgPageSize]=\"pageSize\" [hermesDgTotalItems]=\"totalItems\">\r\n @if (pageSizeOptions?.length) {\r\n <hermes-dg-page-size #hermesDgPageSize [hermesPageSizeOptions]=\"pageSizeOptions\">\r\n <label [for]=\"hermesDgPageSize.pageSizeOptionsId\"> {{ dgStrings.itemsPerPage }} </label>\r\n </hermes-dg-page-size>\r\n }\r\n {{\r\n getFooterMessage(\r\n pagination.totalItems,\r\n pagination.pageSize,\r\n pagination.firstItem + 1,\r\n pagination.lastItem + 1\r\n )\r\n }}\r\n </hermes-dg-pagination>\r\n </ng-container>\r\n\r\n <ng-template #missingPageConfig>\r\n @if (!showCustomPagination) {\r\n <span class=\"pagination\">\r\n {{ getFooterMessage(totalItems, undefined, dataRange.skip + 1, dataRange.skip + dataRange.data.length) }}\r\n </span>\r\n }\r\n @if (showCustomPagination) {\r\n <div>\r\n <ng-container *ngTemplateOutlet=\"customPagination\"></ng-container>\r\n </div>\r\n }\r\n <ng-template #customPagination>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n </ng-template>\r\n </hermes-dg-footer>\r\n</hermes-datagrid>\r\n\r\n<ng-template #draggableCell let-item>\r\n <div cdkDropList [cdkDropListAutoScrollStep]=\"0\" [cdkDropListConnectedTo]=\"dropGroup(dragConfig.dragGroup || '')\">\r\n <div\r\n cdkDrag\r\n cdkDragPreviewContainer=\"parent\"\r\n [cdkDragData]=\"draggedItems\"\r\n (cdkDragStarted)=\"onDragStart(item)\"\r\n (cdkDragMoved)=\"onDragMove()\"\r\n >\r\n <hermes-icon shape=\"drag-handle\" size=\"22\" cdkDragHandle> </hermes-icon>\r\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\r\n <div class=\"custom-preview\" *cdkDragPreview>\r\n @if (draggedItems.length === 1) {\r\n <div class=\"grid-ghost single-ghost\" [ngClass]=\"{ 'selection-ghost': isItemSelected(item) }\">\r\n <ng-container *ngTemplateOutlet=\"draggableGhostContent; context: { $implicit: item }\"> </ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"grid-ghost multiple-ghost selection-ghost\">\r\n <ng-container *ngTemplateOutlet=\"draggableGhostContent; context: { $implicit: item }\"> </ng-container>\r\n </div>\r\n <span class=\"badge badge-purple ghost-badge\">\r\n {{ draggedItems.length }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #draggableGhostContent let-item>\r\n <hermes-icon class=\"drop-status drop-status-valid\" shape=\"plus\" size=\"18\"></hermes-icon>\r\n <hermes-icon class=\"drop-status drop-status-invalid\" shape=\"ban\" size=\"18\"></hermes-icon>\r\n <i class=\"{{ item.primaryIconId }}\"></i>\r\n <span>{{ item[dragConfig.fieldName] }}</span>\r\n</ng-template>\r\n", styles: ["hermes-datagrid .draggableCell{min-width:20px;width:20px;padding-left:0!important;order:-1;flex:0}:host{min-height:3.6rem}:host ::ng-deep hermes-datagrid{min-height:0}:host(.zoom2x) ::ng-deep hermes-datagrid.flex-hermes-datagrid,:host(.zoom4x) ::ng-deep hermes-datagrid.flex-hermes-datagrid{height:auto!important;flex:1 0 auto!important}:host(.zoom4x){min-height:7.2rem}hermes-datagrid.flex-hermes-datagrid{flex-basis:auto;height:100%}hermes-datagrid .custom-preview{width:250px;overflow:hidden;font-size:var(--hermes-alias-typography-secondary-font-size);line-height:var(--hermes-alias-typography-secondary-line-height)}hermes-datagrid .custom-preview .grid-ghost{border:1px solid var(--hermes-table-border-color);border-left:2px solid var(--hermes-alias-object-interaction-background-highlight);border-radius:3px 0 0 3px;background-color:var(--hermes-global-color-white);padding:5px;max-height:60px;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}hermes-datagrid .custom-preview .grid-ghost .drop-status{margin-top:-4px}hermes-datagrid.datagrid-compact .custom-preview .grid-ghost .drop-status{margin-top:-8px}hermes-datagrid hermes-dg-cell.fixed-cell-height{height:16px}hermes-datagrid .single-ghost{box-shadow:0 3px 4px #7474744d}hermes-datagrid .multiple-ghost{box-shadow:8px 7px var(--hermes-table-bgcolor),8px 7px var(--hermes-table-border-color),8px 8px 4px #7474744d}hermes-datagrid .selection-ghost{color:var(--hermes-global-color-gray-400);background-color:var(--hermes-table-bgcolor)}hermes-datagrid .ghost-badge{float:right}hermes-datagrid.disabled-grid{pointer-events:none;cursor:not-allowed;opacity:.5}hermes-datagrid .draggableCell .draggableIcon{transform:unset}hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions{margin-left:10px;display:flex;align-items:center}hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions:not(:disabled):hover,hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions:not(:disabled):active{cursor:pointer;text-decoration:none}hermes-datagrid hermes-dg-footer ::ng-deep .datagrid-footer-description{display:flex;text-align:left}hermes-datagrid hermes-dg-footer ::ng-deep li{white-space:normal}hermes-datagrid hermes-dg-footer hermes-dg-pagination{display:inline-flex;align-items:center}hermes-datagrid hermes-dg-footer hermes-dg-pagination ::ng-deep>ul{height:auto}hermes-datagrid hermes-dg-column ::ng-deep .datagrid-column-flex{width:100%}hermes-datagrid hermes-dg-column.grabbed:not(.cdk-drag-placeholder,.cdk-drag-preview)::ng-deep .datagrid-column-title{background-color:var(--hermes-datagrid-row-selected-background-color);color:var(--hermes-datagrid-row-selected)}hermes-datagrid hermes-dg-column.grabbed:not(.cdk-drag-placeholder,.cdk-drag-preview){background-color:var(--hermes-datagrid-row-selected-background-color);color:var(--hermes-datagrid-row-selected)}hermes-datagrid hermes-dg-column.cdk-drag-placeholder{outline:var(--hermes-alias-object-interaction-outline);outline-color:-webkit-focus-ring-color;outline-offset:var(--hermes-datagrid-cell-outline-offset);z-index:100}hermes-datagrid hermes-dg-column.cdk-drag-preview{opacity:.75}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container{display:flex;justify-content:space-between}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input{display:flex;flex-direction:row;align-items:center}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-icon{cursor:pointer}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar{flex:1 0 auto;width:.05rem}hermes-datagrid hermes-dg-row-detail appfx-dg-cell-container{width:100%}hermes-datagrid hermes-dg-row-detail::ng-deep appfx-datagrid div.datagrid-header{z-index:500}hermes-datagrid.zoom4x{min-height:7.2rem}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container{flex-direction:column}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar{flex:1 0 auto;width:100%;max-width:100%;min-width:1px}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar ::ng-deep .btn-group button:first-child{padding-left:10px}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input{padding-left:10px;width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-icon{flex:0 1 auto}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container{flex:1 0 auto}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container ::ng-deep .hermes-control-container{width:100%}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container ::ng-deep .hermes-control-container input{width:100%}hermes-datagrid.zoom4x ::ng-deep .column-switch-wrapper hermes-dropdown-menu{position:fixed!important;transform:none!important;width:100%;min-width:100%;height:100%}hermes-datagrid .custom-placeholder{height:0;width:0}hermes-datagrid hermes-icon[shape=drag-handle]{cursor:grab}.drop-status{display:none;margin-left:4px;color:var(--hermes-global-color-black)}:host-context(body.drag-valid-target) .drop-status-valid{display:inline-block}:host-context(body.drag-invalid-target) .drop-status-invalid{display:inline-block}:host-context([data-theme=dark]) hermes-datagrid .custom-preview .grid-ghost{background-color:var(--hermes-table-bgcolor)}:host-context([data-theme=dark]) hermes-datagrid .custom-preview .grid-ghost .drop-status{color:var(--hermes-global-color-white)}\n"], dependencies: [{ kind: "directive", type: i4.ZoomLevelIndicatorDirective, selector: "[zoomLevelIndicator]" }, { kind: "component", type: i5$1.DataGridFiltersComponent, selector: "appfx-datagrid-filters", inputs: ["filterableProperties", "presetFilters", "filterMode"], outputs: ["searchTermChange", "propertyFiltersChange"] }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i6.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: i6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i4$1.HermesControlLabel, selector: "label", inputs: ["id", "for"] }, { kind: "component", type: i2.HermesIcon, selector: "hermes-icon, hermes-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "component", type: i9.HermesDatagrid, selector: "hermes-datagrid", inputs: ["hermesLoadingMoreItems", "hermesDgSingleSelectionAriaLabel", "hermesDgSingleActionableAriaLabel", "hermesDetailExpandableAriaLabel", "hermesDgDisablePageFocus", "hermesDgCustomSelectAllEnabled", "hermesDgSelectAllDisabled", "hermesDgLoading", "hermesDgSelectionType", "hermesDgSelected", "hermesDgPreserveSelection", "hermesDgRowSelection", "hermesDgItemsIdentityFn"], outputs: ["hermesDgSelectedChange", "hermesDgRefresh", "hermesDgCustomSelectAll"] }, { kind: "component", type: i9.HermesDatagridActionBar, selector: "hermes-dg-action-bar" }, { kind: "component", type: i9.HermesDatagridActionOverflow, selector: "hermes-dg-action-overflow", inputs: ["hermesDgActionOverflowButtonLabel", "hermesDgActionOverflowOpen"], outputs: ["hermesDgActionOverflowOpenChange"] }, { kind: "component", type: i9.HermesDatagridCell, selector: "hermes-dg-cell" }, { kind: "component", type: i9.HermesDatagridColumn, selector: "hermes-dg-column", inputs: ["hermesFilterStringPlaceholder", "hermesFilterNumberMaxPlaceholder", "hermesFilterNumberMinPlaceholder", "hermesDgDisableUnsort", "hermesDgPinned", "hermesDgColType", "hermesDgField", "hermesDgSortBy", "hermesDgSortOrder", "hermesFilterValue"], outputs: ["hermesDgSortOrderChange", "hermesFilterValueChange"] }, { kind: "component", type: i9.HermesDatagridDetail, selector: "hermes-dg-detail", inputs: ["hermesDetailAriaLabelledBy", "hermesDetailAriaLabel", "hermesDetailWidth"] }, { kind: "component", type: i9.HermesDatagridDetailBody, selector: "hermes-dg-detail-body" }, { kind: "component", type: i9.HermesDatagridDetailHeader, selector: "hermes-dg-detail-header" }, { kind: "component", type: i9.HermesDatagridFilter, selector: "hermes-dg-filter", inputs: ["hermesDgFilterOpen", "hermesDgFilter"], outputs: ["hermesDgFilterOpenChange"] }, { kind: "component", type: i9.HermesDatagridFooter, selector: "hermes-dg-footer" }, { kind: "directive", type: i9.HermesDatagridItems, selector: "[hermesDgItems][hermesDgItemsOf]", inputs: ["hermesDgItemsOf", "hermesDgItemsTrackBy"] }, { kind: "component", type: i9.HermesDatagridPageSize, selector: "hermes-dg-page-size", inputs: ["hermesPageSizeOptions", "hermesPageSizeOptionsId"] }, { kind: "component", type: i9.HermesDatagridPagination, selector: "hermes-dg-pagination", inputs: ["hermesDgPageInputDisabled", "hermesDgPageSize", "hermesDgTotalItems", "hermesDgLastPage", "hermesDgPage"], outputs: ["hermesDgPageChange"] }, { kind: "component", type: i9.HermesDatagridPlaceholder, selector: "hermes-dg-placeholder" }, { kind: "component", type: i9.HermesDatagridRow, selector: "hermes-dg-row", inputs: ["hermesDgDetailDisabled", "hermesDgDetailHidden", "hermesDgSkeletonLoading", "hermesDgItem", "hermesDgSelectable", "hermesDgSelected", "hermesDgExpanded", "hermesDgDetailOpenLabel", "hermesDgDetailCloseLabel", "hermesDgRowSelectionLabel"], outputs: ["hermesDgSelectedChange", "hermesDgExpandedChange"] }, { kind: "component", type: i9.HermesDatagridRowDetail, selector: "hermes-dg-row-detail", inputs: ["hermesRowDetailBeginningAriaText", "hermesRowDetailEndAriaText", "hermesDgReplace"] }, { kind: "directive", type: i9.HermesDatagridVirtualScrollDirective, selector: "[hermesVirtualScroll],[HermesVirtualScroll]", inputs: ["hermesVirtualPersistItems", "hermesVirtualRowsOf", "hermesVirtualRowsTrackBy", "hermesVirtualRowsTemplate", "hermesVirtualRowsTemplateCacheSize", "hermesVirtualRowsItemSize", "hermesVirtualRowsMinBufferPx", "hermesVirtualRowsMaxBufferPx", "hermesVirtualDataRange"], outputs: ["renderedRangeChange"] }, { kind: "directive", type: i9.HermesIfDetail, selector: "[hermesIfDetail]", inputs: ["hermesIfDetail"], outputs: ["hermesIfDetailChange"] }, { kind: "directive", type: i9.DatagridDetailRegisterer, selector: "[hermesIfExpanded]" }, { kind: "directive", type: i9.DatagridCellRenderer, selector: "hermes-dg-cell" }, { kind: "directive", type: i9.DatagridHeaderRenderer, selector: "hermes-dg-column", outputs: ["hermesDgColumnResize"] }, { kind: "directive", type: i9.DatagridMainRenderer, selector: "hermes-datagrid" }, { kind: "directive", type: i9.DatagridRowDetailRenderer, selector: "hermes-dg-row-detail" }, { kind: "directive", type: i9.DatagridRowRenderer, selector: "hermes-dg-row" }, { kind: "directive", type: i9.ActionableOompaLoompa, selector: "hermes-datagrid, hermes-dg-row" }, { kind: "directive", type: i9.DatagridWillyWonka, selector: "hermes-datagrid" }, { kind: "directive", type: i9.ExpandableOompaLoompa, selector: "hermes-datagrid, hermes-dg-row" }, { kind: "directive", type: i10.HermesIfExpanded, selector: "[hermesIfExpanded]", inputs: ["hermesIfExpanded"], outputs: ["hermesIfExpandedChange"] }, { kind: "component", type: i3.HermesDropdown, selector: "hermes-dropdown", inputs: ["hermesCloseMenuOnItemClick"] }, { kind: "component", type: i3.HermesDropdownMenu, selector: "hermes-dropdown-menu", inputs: ["hermesPosition"] }, { kind: "directive", type: i3.HermesDropdownTrigger, selector: "[hermesDropdownTrigger],[hermesDropdownToggle]" }, { kind: "directive", type: i3.HermesDropdownItem, selector: "[hermesDropdownItem]", inputs: ["hermesDisabled", "id"] }, { kind: "directive", type: i2$1.HermesIfOpen, selector: "[hermesIfOpen]", inputs: ["hermesIfOpen"], outputs: ["hermesIfOpenChange"] }, { kind: "directive", type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i13.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ColumnOrderDirective, selector: "hermes-dg-column[appfxColumnOrder]", inputs: ["columnData", "columnIndex"] }, { kind: "directive", type: DatagridColumnsOrderDirective, selector: "hermes-datagrid[appfxDgColumnsOrder]", inputs: ["dgColumnsOrderColumns", "dgColumnsVirtualScrolling"], outputs: ["dgColumnsOrderChange"] }, { kind: "component", type: DatagridActionBarComponent, selector: "appfx-datagrid-action-bar", inputs: ["actions", "btnLayout", "dropdownOrientation"], outputs: ["invokeAction"] }, { kind: "component", type: DatagridFilterComponent, selector: "appfx-datagrid-filter", inputs: ["filterValue", "stringFilterType", "fieldName"], outputs: ["filterValueChange"] }, { kind: "component", type: DatagridCellContainerComponent, selector: "appfx-dg-cell-container", inputs: ["column", "item"] }, { kind: "component", type: DatagridColumnToggleComponent, selector: "appfx-dg-column-toggle", inputs: ["columns"], outputs: ["columnsChange", "columnHiddenStateChange"] }, { kind: "component", type: DatagridFilterContainerComponent, selector: "appfx-dg-filter-container", inputs: ["filterType", "filterValue"], outputs: ["filterValueChange"] }, { kind: "component", type: ExportDatagridComponent, selector: "appfx-dg-export", inputs: ["allItemsCount", "filteredItemsCount", "selectedItemsCount"], outputs: ["exportEventEmitter"] }, { kind: "pipe", type: IsRowSelectablePipe, name: "isRowSelectable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2339
+ }
2340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridComponent, decorators: [{
2341
+ type: Component,
2342
+ args: [{ selector: 'appfx-datagrid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2343
+ ExportProviderService,
2344
+ uniqueIdProvider,
2345
+ {
2346
+ provide: appfxPreselectableComponentToken,
2347
+ useExisting: forwardRef(() => DatagridComponent),
2348
+ },
2349
+ ], template: "<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<hermes-datagrid\r\n zoomLevelIndicator\r\n [hermesDgDisablePageFocus]=\"true\"\r\n [hermesDgPreserveSelection]=\"preserveExistingSelectionOnFilter\"\r\n [hermesDgSelectionType]=\"selectionType\"\r\n [hermesDgSelected]=\"selectedItems\"\r\n [hermesDgItemsIdentityFn]=\"trackByGridItemFn\"\r\n (hermesDgRefresh)=\"refreshGrid($event)\"\r\n [hermesDgLoading]=\"loading\"\r\n [hermesLoadingMoreItems]=\"loadingMoreItems\"\r\n [hermesDgRowSelection]=\"rowSelectionMode\"\r\n [ngClass]=\"{\r\n 'disabled-grid': gridLayoutModel.disabled,\r\n 'datagrid-compact': gridLayoutModel.compact,\r\n 'flex-hermes-datagrid': gridLayoutModel.stretchToParentHeight,\r\n 'datagrid-overflow-ellipsis': virtualScrolling || !wrapText,\r\n }\"\r\n cdkDropList\r\n [cdkDropListAutoScrollStep]=\"5\"\r\n appfxDgColumnsOrder\r\n [hermesDgCustomSelectAllEnabled]=\"virtualScrolling\"\r\n (hermesDgCustomSelectAll)=\"onSelectAllInVirtualGrid($event)\"\r\n [dgColumnsOrderColumns]=\"columns\"\r\n [dgColumnsVirtualScrolling]=\"virtualScrolling\"\r\n (dgColumnsOrderChange)=\"onColumnOrderChange($event)\"\r\n (hermesDgSelectedChange)=\"onSelectedItemsChange($event)\"\r\n>\r\n <hermes-dg-action-bar *ngIf=\"enableToolBar\">\r\n @if (!!actionBarActions.length) {\r\n <div class=\"appfx-datagrid-actions-container\">\r\n <appfx-datagrid-action-bar\r\n class=\"action-bar\"\r\n (invokeAction)=\"onActionClick($event)\"\r\n [actions]=\"actionBarActions\"\r\n >\r\n </appfx-datagrid-action-bar>\r\n </div>\r\n }\r\n @if (filterMode !== undefined && filterMode !== null) {\r\n <appfx-datagrid-filters\r\n [filterMode]=\"filterMode\"\r\n [filterableProperties]=\"filterableProperties\"\r\n (searchTermChange)=\"onAdvancedSearchTermChange($event)\"\r\n (propertyFiltersChange)=\"onAdvancedFilterCriteriaChange($event)\"\r\n >\r\n </appfx-datagrid-filters>\r\n }\r\n </hermes-dg-action-bar>\r\n @if (dragConfig) {\r\n <hermes-dg-column class=\"draggableCell\" style=\"width: 20px\"></hermes-dg-column>\r\n }\r\n @for (column of visibleColumns; track trackByColumnId(index, column); let index = $index) {\r\n <!--\r\n hermesDgPinnable is disabled for now, so these two bindings are commented out. Restoring them\r\n means putting them back on the hermes-dg-column below, next to [hermesDgPinned]:\r\n [hermesDgPinnable]=\"!!column.pinnable\"\r\n (hermesDgPinnedChange)=\"onPinnedChange($event, column)\"\r\n -->\r\n <hermes-dg-column\r\n cdkDrag\r\n [cdkDragLockAxis]=\"'x'\"\r\n [cdkDragData]=\"column\"\r\n [cdkDragDisabled]=\"!!column.pinned\"\r\n appfxColumnOrder\r\n [columnData]=\"column\"\r\n [columnIndex]=\"index\"\r\n [style]=\"column.width ? { width: column.width } : null\"\r\n (hermesDgColumnResize)=\"onColumnResize($event, column)\"\r\n [hermesDgField]=\"column.sortAndFilterByField || defaultUnsetValue\"\r\n [hermesDgSortBy]=\"column.sortComparator || defaultUnsetValue\"\r\n [hermesDgSortOrder]=\"column.defaultSortOrder || defaultUnsortedOrder\"\r\n (hermesDgSortOrderChange)=\"onSortOrderChange($event, column)\"\r\n [hermesDgDisableUnsort]=\"column.disableUnsort ?? disableUnsort\"\r\n [hermesDgPinned]=\"!!column.pinned\"\r\n >\r\n <hermes-dg-filter\r\n *ngIf=\"column.stringFilter || column.sortAndFilterByField\"\r\n [hermesDgFilter]=\"appfxDatagridStringFilter\"\r\n >\r\n <appfx-datagrid-filter\r\n #appfxDatagridStringFilter\r\n [stringFilterType]=\"column.stringFilter\"\r\n [filterValue]=\"column.defaultFilterValue\"\r\n [fieldName]=\"column.sortAndFilterByField\"\r\n (filterValueChange)=\"onFilterChange($event, column)\"\r\n ></appfx-datagrid-filter>\r\n </hermes-dg-filter>\r\n <hermes-dg-filter *ngIf=\"column.filter\">\r\n <appfx-dg-filter-container\r\n [filterType]=\"column.filter\"\r\n [filterValue]=\"column.defaultFilterValue\"\r\n (filterValueChange)=\"onFilterChange($event, column)\"\r\n ></appfx-dg-filter-container>\r\n </hermes-dg-filter>\r\n {{ column.displayName }}\r\n </hermes-dg-column>\r\n }\r\n <hermes-dg-placeholder>\r\n {{ dgStrings.noItemsFound }}\r\n <ng-content select=\".custom-placeholder-content\"></ng-content>\r\n </hermes-dg-placeholder>\r\n\r\n <!-- Server driven datagrid with virtual scrolling -->\r\n @if (serverDrivenDatagrid && virtualScrolling) {\r\n <ng-template\r\n HermesVirtualScroll\r\n let-item\r\n let-i=\"index\"\r\n [hermesVirtualDataRange]=\"dataRange\"\r\n [hermesVirtualRowsItemSize]=\"25\"\r\n [hermesVirtualRowsMinBufferPx]=\"400\"\r\n [hermesVirtualRowsMaxBufferPx]=\"800\"\r\n [hermesVirtualRowsTemplateCacheSize]=\"400\"\r\n [hermesVirtualPersistItems]=\"false\"\r\n [hermesVirtualRowsTrackBy]=\"trackByFunction\"\r\n (renderedRangeChange)=\"renderedRangeChange($event)\"\r\n >\r\n <hermes-dg-row\r\n [hermesDgItem]=\"item\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n [hermesDgSkeletonLoading]=\"!item\"\r\n >\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\" style=\"width: 20px\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell class=\"fixed-cell-height\">\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n </hermes-dg-row>\r\n </ng-template>\r\n }\r\n\r\n <!-- Server driven datagrid with paging -->\r\n @if (serverDrivenDatagrid && !virtualScrolling) {\r\n @for (item of gridItems; track trackByFn.bind(this)(i, item); let i = $index) {\r\n <hermes-dg-row\r\n [hermesDgItem]=\"item\"\r\n [hermesDgDetailOpenLabel]=\"getExpandDetailsLabel(item)\"\r\n [hermesDgDetailCloseLabel]=\"getCollapseDetailsLabel(item)\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n <hermes-dg-action-overflow\r\n *ngIf=\"enableSingleRowActions\"\r\n (hermesDgActionOverflowOpenChange)=\"onRowActionOverflowOpen($event, singleRowActions, item)\"\r\n >\r\n @for (action of singleRowActions; track action) {\r\n <button\r\n class=\"action-item\"\r\n (click)=\"onActionClick(action, item)\"\r\n [title]=\"action.tooltip\"\r\n [disabled]=\"!action.enabled\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </hermes-dg-action-overflow>\r\n\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\" style=\"width: 20px\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell>\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n\r\n <ng-container *ngIf=\"rowDetailContent\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail\r\n *hermesIfExpanded=\"rowsExpandedByDefault\"\r\n tabindex=\"0\"\r\n [attr.aria-describedby]=\"detailData.id\"\r\n >\r\n <div [id]=\"detailData.id\" class=\"datagrid-row-flex\">\r\n <ng-container *ngTemplateOutlet=\"rowDetailContent; context: { item: item }\"> </ng-container>\r\n </div>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n </hermes-dg-row>\r\n }\r\n }\r\n\r\n <!-- Client side datagrid with paging -->\r\n @if (!serverDrivenDatagrid) {\r\n <hermes-dg-row\r\n *hermesDgItems=\"let item of gridItems; trackBy: trackByFn.bind(this); index as i\"\r\n [hermesDgItem]=\"item\"\r\n [hermesDgDetailOpenLabel]=\"getExpandDetailsLabel(item)\"\r\n [hermesDgDetailCloseLabel]=\"getCollapseDetailsLabel(item)\"\r\n [hermesDgSelectable]=\"item | isRowSelectable: isRowLocked : rowsDisabled\"\r\n [hermesDgRowSelectionLabel]=\"$any(item)?.[visibleColumns && visibleColumns.length ? visibleColumns[0].field : -1]\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n <hermes-dg-action-overflow\r\n *ngIf=\"enableSingleRowActions\"\r\n (hermesDgActionOverflowOpenChange)=\"onRowActionOverflowOpen($event, singleRowActions, item)\"\r\n >\r\n @for (action of singleRowActions; track action) {\r\n <button\r\n class=\"action-item\"\r\n (click)=\"onActionClick(action, item)\"\r\n [title]=\"action.tooltip\"\r\n [disabled]=\"!action.enabled\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </hermes-dg-action-overflow>\r\n\r\n @if (dragConfig) {\r\n <hermes-dg-cell class=\"draggableCell\">\r\n <ng-container *ngTemplateOutlet=\"draggableCell; context: { $implicit: item }\"> </ng-container>\r\n </hermes-dg-cell>\r\n }\r\n @for (column of visibleColumns; track column) {\r\n <hermes-dg-cell>\r\n <appfx-dg-cell-container [column]=\"column\" [item]=\"item\"></appfx-dg-cell-container>\r\n </hermes-dg-cell>\r\n }\r\n\r\n <ng-container *ngIf=\"$any(item).rowDetailRenderer\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail *hermesIfExpanded tabindex=\"0\" [attr.aria-describedby]=\"detailData.id\">\r\n <appfx-dg-cell-container\r\n [id]=\"detailData.id\"\r\n [column]=\"{\r\n displayName: '',\r\n field: '',\r\n columnRenderer: $any(item).rowDetailRenderer,\r\n }\"\r\n [item]=\"item\"\r\n ></appfx-dg-cell-container>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"rowDetailContent\" ngProjectAs=\"hermes-dg-row-detail\">\r\n @if ({ id: buildRowDetailContentId(i) }; as detailData) {\r\n <hermes-dg-row-detail\r\n *hermesIfExpanded=\"rowsExpandedByDefault\"\r\n tabindex=\"0\"\r\n [attr.aria-describedby]=\"detailData.id\"\r\n >\r\n <div [id]=\"detailData.id\" class=\"datagrid-row-flex\">\r\n <ng-container *ngTemplateOutlet=\"rowDetailContent; context: { item: item }\"> </ng-container>\r\n </div>\r\n </hermes-dg-row-detail>\r\n }\r\n </ng-container>\r\n </hermes-dg-row>\r\n }\r\n\r\n <ng-container *ngIf=\"detailHeader || detailBody\" ngProjectAs=\"hermes-dg-detail\">\r\n <ng-template [hermesIfDetail]=\"detailState\" (hermesIfDetailChange)=\"onDetailStateChange($event)\" let-detail>\r\n <hermes-dg-detail>\r\n @if (detailHeader) {\r\n <hermes-dg-detail-header>\r\n <ng-container *ngTemplateOutlet=\"detailHeader; context: { $implicit: detail }\"></ng-container>\r\n </hermes-dg-detail-header>\r\n }\r\n @if (detailBody) {\r\n <hermes-dg-detail-body>\r\n <ng-container *ngTemplateOutlet=\"detailBody; context: { $implicit: detail }\"></ng-container>\r\n </hermes-dg-detail-body>\r\n }\r\n </hermes-dg-detail>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <hermes-dg-footer *ngIf=\"gridFooterModel.showFooter\">\r\n @if (!gridFooterModel.hideColumnToggle) {\r\n <appfx-dg-column-toggle [(columns)]=\"columns\" (columnHiddenStateChange)=\"onColumnHiddenStateChange($event)\">\r\n </appfx-dg-column-toggle>\r\n }\r\n\r\n @if (enableExportButton) {\r\n <appfx-dg-export\r\n [allItemsCount]=\"gridFooterModel.clientSideExportConfig?.allItemsCount || listItemsCount\"\r\n [selectedItemsCount]=\"selectedItemsCount\"\r\n [filteredItemsCount]=\"filteredItemsCount\"\r\n (exportEventEmitter)=\"onExportEvent($event)\"\r\n class=\"footer-actions\"\r\n >\r\n </appfx-dg-export>\r\n }\r\n\r\n @if (showDeselectAll) {\r\n <div class=\"column-switch-wrapper footer-actions\">\r\n <button class=\"btn btn-sm column-toggle-action\" [disabled]=\"deselectAllDisabled\" (click)=\"onDeselectAllClick()\">\r\n {{ dgStrings.deselectAll }}\r\n </button>\r\n </div>\r\n }\r\n <!-- Custom footer actions -->\r\n @if (gridFooterModel?.footerActions) {\r\n @for (action of gridFooterModel.footerActions; track action) {\r\n <div class=\"footer-actions column-switch-wrapper\">\r\n @if (action.children) {\r\n <hermes-dropdown>\r\n <button\r\n class=\"btn btn-sm column-toggle-action\"\r\n hermesDropdownTrigger\r\n [disabled]=\"!action.enabled\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n >\r\n {{ action.label }}\r\n <hermes-icon shape=\"angle\" direction=\"up\"></hermes-icon>\r\n </button>\r\n <hermes-dropdown-menu hermesPosition=\"top-left\" *hermesIfOpen>\r\n @for (childAction of action.children; track childAction) {\r\n <button\r\n type=\"button\"\r\n [disabled]=\"!childAction.enabled\"\r\n [attr.aria-label]=\"childAction.ariaLabel\"\r\n hermesDropdownItem\r\n (click)=\"onActionClick(childAction)\"\r\n >\r\n {{ childAction.label }}\r\n </button>\r\n }\r\n </hermes-dropdown-menu>\r\n </hermes-dropdown>\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"column-toggle-action btn btn-sm\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"!action.enabled\"\r\n (click)=\"onActionClick(action)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n }\r\n <ng-content select=\".custom-footer-content\"></ng-content>\r\n\r\n <ng-container *ngIf=\"pageSize > 0; else missingPageConfig\" ngProjectAs=\"hermes-dg-pagination\">\r\n <hermes-dg-pagination #pagination [hermesDgPageSize]=\"pageSize\" [hermesDgTotalItems]=\"totalItems\">\r\n @if (pageSizeOptions?.length) {\r\n <hermes-dg-page-size #hermesDgPageSize [hermesPageSizeOptions]=\"pageSizeOptions\">\r\n <label [for]=\"hermesDgPageSize.pageSizeOptionsId\"> {{ dgStrings.itemsPerPage }} </label>\r\n </hermes-dg-page-size>\r\n }\r\n {{\r\n getFooterMessage(\r\n pagination.totalItems,\r\n pagination.pageSize,\r\n pagination.firstItem + 1,\r\n pagination.lastItem + 1\r\n )\r\n }}\r\n </hermes-dg-pagination>\r\n </ng-container>\r\n\r\n <ng-template #missingPageConfig>\r\n @if (!showCustomPagination) {\r\n <span class=\"pagination\">\r\n {{ getFooterMessage(totalItems, undefined, dataRange.skip + 1, dataRange.skip + dataRange.data.length) }}\r\n </span>\r\n }\r\n @if (showCustomPagination) {\r\n <div>\r\n <ng-container *ngTemplateOutlet=\"customPagination\"></ng-container>\r\n </div>\r\n }\r\n <ng-template #customPagination>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n </ng-template>\r\n </hermes-dg-footer>\r\n</hermes-datagrid>\r\n\r\n<ng-template #draggableCell let-item>\r\n <div cdkDropList [cdkDropListAutoScrollStep]=\"0\" [cdkDropListConnectedTo]=\"dropGroup(dragConfig.dragGroup || '')\">\r\n <div\r\n cdkDrag\r\n cdkDragPreviewContainer=\"parent\"\r\n [cdkDragData]=\"draggedItems\"\r\n (cdkDragStarted)=\"onDragStart(item)\"\r\n (cdkDragMoved)=\"onDragMove()\"\r\n >\r\n <hermes-icon shape=\"drag-handle\" size=\"22\" cdkDragHandle> </hermes-icon>\r\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\r\n <div class=\"custom-preview\" *cdkDragPreview>\r\n @if (draggedItems.length === 1) {\r\n <div class=\"grid-ghost single-ghost\" [ngClass]=\"{ 'selection-ghost': isItemSelected(item) }\">\r\n <ng-container *ngTemplateOutlet=\"draggableGhostContent; context: { $implicit: item }\"> </ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"grid-ghost multiple-ghost selection-ghost\">\r\n <ng-container *ngTemplateOutlet=\"draggableGhostContent; context: { $implicit: item }\"> </ng-container>\r\n </div>\r\n <span class=\"badge badge-purple ghost-badge\">\r\n {{ draggedItems.length }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #draggableGhostContent let-item>\r\n <hermes-icon class=\"drop-status drop-status-valid\" shape=\"plus\" size=\"18\"></hermes-icon>\r\n <hermes-icon class=\"drop-status drop-status-invalid\" shape=\"ban\" size=\"18\"></hermes-icon>\r\n <i class=\"{{ item.primaryIconId }}\"></i>\r\n <span>{{ item[dragConfig.fieldName] }}</span>\r\n</ng-template>\r\n", styles: ["hermes-datagrid .draggableCell{min-width:20px;width:20px;padding-left:0!important;order:-1;flex:0}:host{min-height:3.6rem}:host ::ng-deep hermes-datagrid{min-height:0}:host(.zoom2x) ::ng-deep hermes-datagrid.flex-hermes-datagrid,:host(.zoom4x) ::ng-deep hermes-datagrid.flex-hermes-datagrid{height:auto!important;flex:1 0 auto!important}:host(.zoom4x){min-height:7.2rem}hermes-datagrid.flex-hermes-datagrid{flex-basis:auto;height:100%}hermes-datagrid .custom-preview{width:250px;overflow:hidden;font-size:var(--hermes-alias-typography-secondary-font-size);line-height:var(--hermes-alias-typography-secondary-line-height)}hermes-datagrid .custom-preview .grid-ghost{border:1px solid var(--hermes-table-border-color);border-left:2px solid var(--hermes-alias-object-interaction-background-highlight);border-radius:3px 0 0 3px;background-color:var(--hermes-global-color-white);padding:5px;max-height:60px;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}hermes-datagrid .custom-preview .grid-ghost .drop-status{margin-top:-4px}hermes-datagrid.datagrid-compact .custom-preview .grid-ghost .drop-status{margin-top:-8px}hermes-datagrid hermes-dg-cell.fixed-cell-height{height:16px}hermes-datagrid .single-ghost{box-shadow:0 3px 4px #7474744d}hermes-datagrid .multiple-ghost{box-shadow:8px 7px var(--hermes-table-bgcolor),8px 7px var(--hermes-table-border-color),8px 8px 4px #7474744d}hermes-datagrid .selection-ghost{color:var(--hermes-global-color-gray-400);background-color:var(--hermes-table-bgcolor)}hermes-datagrid .ghost-badge{float:right}hermes-datagrid.disabled-grid{pointer-events:none;cursor:not-allowed;opacity:.5}hermes-datagrid .draggableCell .draggableIcon{transform:unset}hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions{margin-left:10px;display:flex;align-items:center}hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions:not(:disabled):hover,hermes-datagrid hermes-dg-footer ::ng-deep .footer-actions:not(:disabled):active{cursor:pointer;text-decoration:none}hermes-datagrid hermes-dg-footer ::ng-deep .datagrid-footer-description{display:flex;text-align:left}hermes-datagrid hermes-dg-footer ::ng-deep li{white-space:normal}hermes-datagrid hermes-dg-footer hermes-dg-pagination{display:inline-flex;align-items:center}hermes-datagrid hermes-dg-footer hermes-dg-pagination ::ng-deep>ul{height:auto}hermes-datagrid hermes-dg-column ::ng-deep .datagrid-column-flex{width:100%}hermes-datagrid hermes-dg-column.grabbed:not(.cdk-drag-placeholder,.cdk-drag-preview)::ng-deep .datagrid-column-title{background-color:var(--hermes-datagrid-row-selected-background-color);color:var(--hermes-datagrid-row-selected)}hermes-datagrid hermes-dg-column.grabbed:not(.cdk-drag-placeholder,.cdk-drag-preview){background-color:var(--hermes-datagrid-row-selected-background-color);color:var(--hermes-datagrid-row-selected)}hermes-datagrid hermes-dg-column.cdk-drag-placeholder{outline:var(--hermes-alias-object-interaction-outline);outline-color:-webkit-focus-ring-color;outline-offset:var(--hermes-datagrid-cell-outline-offset);z-index:100}hermes-datagrid hermes-dg-column.cdk-drag-preview{opacity:.75}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container{display:flex;justify-content:space-between}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input{display:flex;flex-direction:row;align-items:center}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-icon{cursor:pointer}hermes-datagrid hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar{flex:1 0 auto;width:.05rem}hermes-datagrid hermes-dg-row-detail appfx-dg-cell-container{width:100%}hermes-datagrid hermes-dg-row-detail::ng-deep appfx-datagrid div.datagrid-header{z-index:500}hermes-datagrid.zoom4x{min-height:7.2rem}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container{flex-direction:column}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar{flex:1 0 auto;width:100%;max-width:100%;min-width:1px}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .action-bar ::ng-deep .btn-group button:first-child{padding-left:10px}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input{padding-left:10px;width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-icon{flex:0 1 auto}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container{flex:1 0 auto}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container ::ng-deep .hermes-control-container{width:100%}hermes-datagrid.zoom4x hermes-dg-action-bar .appfx-datagrid-actions-container .filter-input hermes-input-container ::ng-deep .hermes-control-container input{width:100%}hermes-datagrid.zoom4x ::ng-deep .column-switch-wrapper hermes-dropdown-menu{position:fixed!important;transform:none!important;width:100%;min-width:100%;height:100%}hermes-datagrid .custom-placeholder{height:0;width:0}hermes-datagrid hermes-icon[shape=drag-handle]{cursor:grab}.drop-status{display:none;margin-left:4px;color:var(--hermes-global-color-black)}:host-context(body.drag-valid-target) .drop-status-valid{display:inline-block}:host-context(body.drag-invalid-target) .drop-status-invalid{display:inline-block}:host-context([data-theme=dark]) hermes-datagrid .custom-preview .grid-ghost{background-color:var(--hermes-table-bgcolor)}:host-context([data-theme=dark]) hermes-datagrid .custom-preview .grid-ghost .drop-status{color:var(--hermes-global-color-white)}\n"] }]
2350
+ }], ctorParameters: () => [{ type: DatagridStrings }, { type: undefined, decorators: [{
2351
+ type: Inject,
2352
+ args: [uniqueIdToken]
2353
+ }] }, { type: i0.ChangeDetectorRef }, { type: ExportProviderService }, { type: i3$3.DragAndDropGroupService, decorators: [{
2354
+ type: Optional
2355
+ }] }, { type: i4.ZoomLevelService, decorators: [{
2356
+ type: Optional
2357
+ }] }], propDecorators: { hermesDatagridPagination: [{
2358
+ type: ViewChild,
2359
+ args: [HermesDatagridPagination]
2360
+ }], loading: [{
2361
+ type: Input
2362
+ }], loadingMoreItems: [{
2363
+ type: Input
2364
+ }], preSelectFirstItem: [{
2365
+ type: Input
2366
+ }], pageSizeOptions: [{
2367
+ type: Input
2368
+ }], totalItems: [{
2369
+ type: Input
2370
+ }], showCustomPagination: [{
2371
+ type: Input
2372
+ }], serverDrivenDatagrid: [{
2373
+ type: Input
2374
+ }], listItemsCount: [{
2375
+ type: Input
2376
+ }], rowDetailContent: [{
2377
+ type: Input
2378
+ }], rowsExpandedByDefault: [{
2379
+ type: Input
2380
+ }], trackByFunction: [{
2381
+ type: Input
2382
+ }], trackByGridItemProperty: [{
2383
+ type: Input
2384
+ }], detailHeader: [{
2385
+ type: Input
2386
+ }], detailBody: [{
2387
+ type: Input
2388
+ }], detailState: [{
2389
+ type: Input
2390
+ }], detailStateChange: [{
2391
+ type: Output
2392
+ }], isRowLocked: [{
2393
+ type: Input
2394
+ }], dragConfig: [{
2395
+ type: Input
2396
+ }], filterableProperties: [{
2397
+ type: Input
2398
+ }], filterMode: [{
2399
+ type: Input
2400
+ }], singleRowActions: [{
2401
+ type: Input
2402
+ }], preserveExistingSelectionOnFilter: [{
2403
+ type: Input
2404
+ }], virtualScrolling: [{
2405
+ type: Input
2406
+ }], disableUnsort: [{
2407
+ type: Input
2408
+ }], dataRange: [{
2409
+ type: Input
2410
+ }], gridItems: [{
2411
+ type: Input
2412
+ }], pageSizeChange: [{
2413
+ type: Output
2414
+ }], gridItemsChange: [{
2415
+ type: Output
2416
+ }], advancedFilterChange: [{
2417
+ type: Output
2418
+ }], columnDefsChange: [{
2419
+ type: Output
2420
+ }], selectedItemsChange: [{
2421
+ type: Output
2422
+ }], exportDataEvent: [{
2423
+ type: Output
2424
+ }], searchTermChange: [{
2425
+ type: Output
2426
+ }], columnResize: [{
2427
+ type: Output
2428
+ }], columnSortOrderChange: [{
2429
+ type: Output
2430
+ }], columnHiddenStateChange: [{
2431
+ type: Output
2432
+ }], columnFilterChange: [{
2433
+ type: Output
2434
+ }], refreshGridData: [{
2435
+ type: Output
2436
+ }], refreshVirtualGridData: [{
2437
+ type: Output
2438
+ }], actionClick: [{
2439
+ type: Output
2440
+ }], rowActionMenuOpenChange: [{
2441
+ type: Output
2442
+ }], openContextMenu: [{
2443
+ type: Output
2444
+ }], columnOrderChange: [{
2445
+ type: Output
2446
+ }], applyFlexLayout: [{
2447
+ type: HostBinding,
2448
+ args: ['class.embedded-flex-component']
2449
+ }], zoomLevel: [{
2450
+ type: HostBinding,
2451
+ args: ['class']
2452
+ }], hermesDatagrid: [{
2453
+ type: ViewChild,
2454
+ args: [HermesDatagrid, { static: true }]
2455
+ }], layoutModel: [{
2456
+ type: Input
2457
+ }], footerModel: [{
2458
+ type: Input
2459
+ }], columns: [{
2460
+ type: Input
2461
+ }], selectionType: [{
2462
+ type: Input
2463
+ }], selectedItems: [{
2464
+ type: Input
2465
+ }], rowSelectionMode: [{
2466
+ type: Input
2467
+ }], actionBarActions: [{
2468
+ type: Input
2469
+ }], pageSize: [{
2470
+ type: Input
2471
+ }], datagridLabels: [{
2472
+ type: Input
2473
+ }] } });
2474
+
2475
+ /*
2476
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2477
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2478
+ * This software is released under MIT license.
2479
+ * The full license information can be found in LICENSE in the root directory of this project.
2480
+ */
2481
+ /**
2482
+ * Datagrid page directive which set the page which to be shown when the appfx datagrid is display.
2483
+ * Supports setting of arbitrary grid page as current page and emits the new page
2484
+ * number when the page is change.
2485
+ * Supports this functionality for server side and client side grids.
2486
+ */
2487
+ class DatagridPageDirective {
2488
+ constructor(datagrid) {
2489
+ this.datagridPageChange = new EventEmitter(false);
2490
+ this.initCompleted = false;
2491
+ this.component = datagrid;
2492
+ }
2493
+ set datagridPage(value) {
2494
+ if (this.initCompleted) {
2495
+ this.component.hermesDatagridPagination.currentPage = value;
2496
+ }
2497
+ else {
2498
+ this.initialPage = value;
2499
+ }
2500
+ }
2501
+ ngAfterViewInit() {
2502
+ this.subscription = this.component.hermesDatagridPagination.currentChanged.subscribe((page) => this.datagridPageChange.emit(page));
2503
+ if (this.initialPage > 1) {
2504
+ if (this.component.serverDrivenDatagrid) {
2505
+ this.component.hermesDatagridPagination.currentPage = this.initialPage;
2506
+ }
2507
+ else {
2508
+ // Client side grids work with clarity smart iterators, which initially create all rows, then
2509
+ // destroy them and again create them.
2510
+ // This I think make the clarity grid to throw ExpressionChangedAfterItHasBeenCheckedError
2511
+ // error when this small timout is not set.
2512
+ setTimeout(() => {
2513
+ this.component.hermesDatagridPagination.currentPage = this.initialPage;
2514
+ }, 0);
2515
+ }
2516
+ }
2517
+ this.initCompleted = true;
2518
+ }
2519
+ ngOnDestroy() {
2520
+ if (this.subscription) {
2521
+ this.subscription.unsubscribe();
2522
+ }
2523
+ }
2524
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPageDirective, deps: [{ token: DatagridComponent, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2525
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DatagridPageDirective, isStandalone: false, selector: "[datagridPage]", inputs: { datagridPage: "datagridPage" }, outputs: { datagridPageChange: "datagridPageChange" }, ngImport: i0 }); }
2526
+ }
2527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPageDirective, decorators: [{
2528
+ type: Directive,
2529
+ args: [{
2530
+ selector: '[datagridPage]',
2531
+ standalone: false,
2532
+ }]
2533
+ }], ctorParameters: () => [{ type: DatagridComponent, decorators: [{
2534
+ type: Host
2535
+ }] }], propDecorators: { datagridPageChange: [{
2536
+ type: Output
2537
+ }], datagridPage: [{
2538
+ type: Input
2539
+ }] } });
2540
+
2541
+ /*
2542
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2543
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2544
+ * This software is released under MIT license.
2545
+ * The full license information can be found in LICENSE in the root directory of this project.
2546
+ */
2547
+ // injectable service contract for app-specific code that can store and read data from local browser storage
2548
+ const appfxDatagridPersistSettingsToken = new InjectionToken('service that store and read data from local browser storage');
2549
+
2550
+ /*
2551
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2552
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2553
+ * This software is released under MIT license.
2554
+ * The full license information can be found in LICENSE in the root directory of this project.
2555
+ */
2556
+ /**
2557
+ * Sets the grid up with page size, column visibility and width from user-defined storage that is provided
2558
+ * Reacts to user changes in the Clarity datagrid to notify the injected storage to persist the grid properties
2559
+ * So reloading the application in automatically restore these preferences as a convenience
2560
+ */
2561
+ class DatagridPersistSettingsDirective {
2562
+ constructor(grid, persistDatagridSettingsService) {
2563
+ this.grid = grid;
2564
+ this.persistDatagridSettingsService = persistDatagridSettingsService;
2565
+ this.subs = new Subscription();
2566
+ this.datagridKeyChange$ = new Subject();
2567
+ this.storePageSize = true;
2568
+ this.storeSortOrder = true;
2569
+ this.initialiseDatagridWithPersistedSettings();
2570
+ }
2571
+ /**
2572
+ * Directive takes unique identifier input to describe the grid
2573
+ */
2574
+ set appfxPersistDatagridSettings(key) {
2575
+ this.datagridKey = key;
2576
+ this.datagridKeyChange$.next(key);
2577
+ }
2578
+ /**
2579
+ * Flag indicates whether to be persisted the grid page size.
2580
+ */
2581
+ set persistPageSize(value) {
2582
+ this.storePageSize = value;
2583
+ }
2584
+ /**
2585
+ * Flag indicates whether to be persisted the grid page size.
2586
+ */
2587
+ set persistSortOrder(value) {
2588
+ this.storeSortOrder = value;
2589
+ }
2590
+ ngAfterViewInit() {
2591
+ if (!this.datagridKey) {
2592
+ return;
2593
+ }
2594
+ // Listen for column resize
2595
+ this.subs.add(this.grid.columnResize.subscribe((data) => {
2596
+ data.column.width = data.columnSize + 'px';
2597
+ this.saveColumnStates();
2598
+ }));
2599
+ // Listen for column order changes
2600
+ this.subs.add(this.grid.columnOrderChange.subscribe(() => {
2601
+ this.saveColumnStates();
2602
+ }));
2603
+ // Listen for column hidden state changes
2604
+ this.subs.add(this.grid.columnHiddenStateChange.subscribe((data) => {
2605
+ data.column.hidden = data.hidden;
2606
+ this.saveColumnStates();
2607
+ }));
2608
+ if (this.storeSortOrder) {
2609
+ // Listen for column sort order changes
2610
+ this.subs.add(this.grid.columnSortOrderChange.subscribe((data) => {
2611
+ this.saveColumnSortOrder(data);
2612
+ }));
2613
+ }
2614
+ if (this.storePageSize) {
2615
+ // Listen for datagrid refresh event which contains page size info
2616
+ this.subs.add(this.grid.refreshGridData.subscribe((hermesDatagridState) => {
2617
+ const hermesPageSize = hermesDatagridState?.page?.size || 0;
2618
+ if (hermesPageSize > 0 && hermesPageSize !== this.grid.pageSize) {
2619
+ this.grid.pageSize = hermesPageSize;
2620
+ this.savePageSize(hermesPageSize);
2621
+ }
2622
+ }));
2623
+ }
2624
+ }
2625
+ ngOnDestroy() {
2626
+ this.subs.unsubscribe();
2627
+ }
2628
+ saveColumnStates() {
2629
+ if (this.saveColumnsStateTimerId) {
2630
+ clearTimeout(this.saveColumnsStateTimerId);
2631
+ }
2632
+ this.saveColumnsStateTimerId = setTimeout(() => {
2633
+ this.saveColumnsData();
2634
+ }, 100);
2635
+ }
2636
+ saveColumnsData() {
2637
+ const persistedData = this.getPersistedData();
2638
+ persistedData.columns = this.grid.columns.map((column) => this.createPersistedColumnState(column));
2639
+ //Update sort column if it is persisted as it may become hidden
2640
+ if (persistedData.sorting) {
2641
+ const columnDef = persistedData.columns.find(column => {
2642
+ return column.uid === persistedData.sorting?.column.uid;
2643
+ });
2644
+ if (columnDef) {
2645
+ persistedData.sorting.column = columnDef;
2646
+ }
2647
+ }
2648
+ this.setPersistedData(persistedData);
2649
+ }
2650
+ saveColumnSortOrder(columnSortOrder) {
2651
+ const persistedData = this.getPersistedData();
2652
+ const column = this.createPersistedColumnState(columnSortOrder.column);
2653
+ persistedData.sorting = {
2654
+ sortOrder: columnSortOrder?.sortOrder,
2655
+ column: column,
2656
+ };
2657
+ this.setPersistedData(persistedData);
2658
+ }
2659
+ savePageSize(pageSize) {
2660
+ const data = this.getPersistedData();
2661
+ data.pageSize = pageSize;
2662
+ this.setPersistedData(data);
2663
+ }
2664
+ createPersistedColumnState(column) {
2665
+ const width = column.width ? parseInt(column.width, 10) : undefined;
2666
+ return {
2667
+ headerText: column.displayName,
2668
+ visible: column.hidden !== true,
2669
+ width: width,
2670
+ uid: this.getColumnUid(column),
2671
+ };
2672
+ }
2673
+ /**
2674
+ * Preserve data in the persistence storage.
2675
+ * @param data the data that is going to be persisted.
2676
+ */
2677
+ setPersistedData(data) {
2678
+ if (!this.datagridKey) {
2679
+ return;
2680
+ }
2681
+ if (!this.persistDatagridSettingsService) {
2682
+ console.error('Persist datagrid service is not provided.');
2683
+ return;
2684
+ }
2685
+ //save into the userdata, using a key based on the listViewId
2686
+ this.persistDatagridSettingsService.setUserData(this.getListViewColumnDefKey(this.datagridKey), data);
2687
+ }
2688
+ /**
2689
+ * Retrieves the data from the persistence storage.
2690
+ * @returns a promise which when resolved will contain the ListView columns data.
2691
+ */
2692
+ getPersistedData() {
2693
+ if (!this.datagridKey || !this.persistDatagridSettingsService) {
2694
+ return {};
2695
+ }
2696
+ return this.persistDatagridSettingsService.getUserDataSync(this.getListViewColumnDefKey(this.datagridKey)) || {};
2697
+ }
2698
+ getListViewColumnDefKey(datagridId) {
2699
+ return datagridId + '_AppfxDatagridSettingsDef';
2700
+ }
2701
+ initialiseDatagridWithPersistedSettings() {
2702
+ //Update datagrid column definitions with the persisted data immediately after
2703
+ //the datagrid key is set and the column definitions of the datagrid are set
2704
+ this.subs.add(combineLatest([this.datagridKeyChange$.asObservable(), this.grid.columnDefsChange.pipe(first())]).subscribe(() => {
2705
+ this.updateDatagridColumnDefinitions();
2706
+ }));
2707
+ //Update datagrid page size with the persisted page size immediately after
2708
+ //the datagrid key is set and the page size of the datagrid is set
2709
+ this.subs.add(combineLatest([this.datagridKeyChange$.asObservable(), this.grid.pageSizeChange.pipe(first())]).subscribe(() => {
2710
+ this.updateDatagridPageSize();
2711
+ }));
2712
+ }
2713
+ /**
2714
+ * Set initial page size read from the local storage on the datagrid.
2715
+ */
2716
+ updateDatagridPageSize() {
2717
+ const data = this.getPersistedData();
2718
+ const persistedPageSize = data?.pageSize || 0;
2719
+ if (persistedPageSize > 0 && this.grid.pageSize !== persistedPageSize) {
2720
+ this.grid.pageSize = persistedPageSize;
2721
+ }
2722
+ }
2723
+ /**
2724
+ * Set width of datagrid columns, its visible and sort states.
2725
+ */
2726
+ updateDatagridColumnDefinitions() {
2727
+ const data = this.getPersistedData();
2728
+ if (!data.columns && !data.sorting) {
2729
+ return;
2730
+ }
2731
+ const columnsMap = new Map();
2732
+ this.grid.columns.forEach((column) => {
2733
+ const uid = this.getColumnUid(column);
2734
+ this.applySorting(uid, column, data.sorting);
2735
+ // Store a copy of the column definitions, as this will allow all the
2736
+ // changes to be discarded at once if this is needed.
2737
+ columnsMap.set(uid, { ...column });
2738
+ });
2739
+ //Apply persisted data only if the column size of persisted data is equal
2740
+ // to datagrid column size
2741
+ if (data.columns && columnsMap.size === data.columns.length) {
2742
+ this.applyPersistedColumnSettings(data.columns, columnsMap);
2743
+ }
2744
+ }
2745
+ applyPersistedColumnSettings(columns, columnsDefinitionsMap) {
2746
+ const columnsOrder = [];
2747
+ columns.forEach((columnPersistedState) => {
2748
+ const column = columnsDefinitionsMap.get(columnPersistedState.uid);
2749
+ if (column) {
2750
+ column.width = columnPersistedState.width ? columnPersistedState.width + 'px' : undefined;
2751
+ column.hidden = !columnPersistedState.visible;
2752
+ columnsOrder.push(column);
2753
+ columnsDefinitionsMap.delete(columnPersistedState.uid);
2754
+ }
2755
+ });
2756
+ //Update columns only if persisted columns are the same as
2757
+ //the set columns of the datagrid
2758
+ if (columnsOrder && columnsOrder.length === this.grid.columns.length && columnsDefinitionsMap.size === 0) {
2759
+ this.grid.columns = columnsOrder;
2760
+ // Update datagrid visible columns after applying persisted columns settings
2761
+ this.grid.visibleColumns = this.grid.columns.filter((column) => !column.hidden);
2762
+ }
2763
+ }
2764
+ /**
2765
+ * Set column default sort order read from the local storage on the datagrid
2766
+ */
2767
+ applySorting(columnUid, column, sorting) {
2768
+ if (!sorting?.column.visible) {
2769
+ return;
2770
+ }
2771
+ if (columnUid === sorting?.column?.uid) {
2772
+ column.defaultSortOrder = sorting.sortOrder;
2773
+ }
2774
+ // Clear default column by which the grid is sorted if there is
2775
+ // other visible column by which should be sorted the grid
2776
+ if (column.defaultSortOrder && columnUid !== sorting?.column?.uid) {
2777
+ column.defaultSortOrder = undefined;
2778
+ }
2779
+ }
2780
+ getColumnUid(column) {
2781
+ return column.uid || column.field || column.displayName;
2782
+ }
2783
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPersistSettingsDirective, deps: [{ token: DatagridComponent, host: true }, { token: appfxDatagridPersistSettingsToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2784
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DatagridPersistSettingsDirective, isStandalone: false, selector: "appfx-datagrid[appfxPersistDatagridSettings]", inputs: { appfxPersistDatagridSettings: "appfxPersistDatagridSettings", persistPageSize: "persistPageSize", persistSortOrder: "persistSortOrder" }, ngImport: i0 }); }
2785
+ }
2786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridPersistSettingsDirective, decorators: [{
2787
+ type: Directive,
2788
+ args: [{
2789
+ selector: 'appfx-datagrid[appfxPersistDatagridSettings]',
2790
+ standalone: false,
2791
+ }]
2792
+ }], ctorParameters: () => [{ type: DatagridComponent, decorators: [{
2793
+ type: Host
2794
+ }] }, { type: undefined, decorators: [{
2795
+ type: Optional
2796
+ }, {
2797
+ type: Inject,
2798
+ args: [appfxDatagridPersistSettingsToken]
2799
+ }] }], propDecorators: { appfxPersistDatagridSettings: [{
2800
+ type: Input
2801
+ }], persistPageSize: [{
2802
+ type: Input
2803
+ }], persistSortOrder: [{
2804
+ type: Input
2805
+ }] } });
2806
+
2807
+ /*
2808
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2809
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2810
+ * This software is released under MIT license.
2811
+ * The full license information can be found in LICENSE in the root directory of this project.
2812
+ */
2813
+ // Injectable service contract for app-specific code that can get user preferences
2814
+ const appfxDatagridUserPreferencesToken = new InjectionToken('Service that stores and reads user preferences related to the datagrid.');
2815
+
2816
+ /*
2817
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2818
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2819
+ * This software is released under MIT license.
2820
+ * The full license information can be found in LICENSE in the root directory of this project.
2821
+ */
2822
+ class DatagridContentNoWrapDirective {
2823
+ /**
2824
+ * Constructor, if DatagridUserPreferencesService is provided get wrap grid cell
2825
+ * user preference.
2826
+ *
2827
+ * @param grid
2828
+ * @param userPreferencesService - optional, because external projects which use appfx-datagrid may decide not
2829
+ * to use this directive and allow their customers to select whether to wrap
2830
+ * or not text in columns, in this case, they don't need to provide this service
2831
+ * and the grid will have default behavior that will not wrap the text in list columns.
2832
+ */
2833
+ constructor(grid, userPreferencesService) {
2834
+ this.grid = grid;
2835
+ this.userPreferencesService = userPreferencesService;
2836
+ this.subs = new Subscription();
2837
+ if (userPreferencesService) {
2838
+ this.subs.add(userPreferencesService.getWrapGridCellTextPreference$().subscribe((data) => {
2839
+ grid.wrapText = data;
2840
+ }));
2841
+ }
2842
+ }
2843
+ ngOnDestroy() {
2844
+ this.subs.unsubscribe();
2845
+ }
2846
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridContentNoWrapDirective, deps: [{ token: DatagridComponent, host: true }, { token: appfxDatagridUserPreferencesToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2847
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DatagridContentNoWrapDirective, isStandalone: false, selector: "appfx-datagrid", ngImport: i0 }); }
2848
+ }
2849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridContentNoWrapDirective, decorators: [{
2850
+ type: Directive,
2851
+ args: [{
2852
+ selector: 'appfx-datagrid',
2853
+ standalone: false,
2854
+ }]
2855
+ }], ctorParameters: () => [{ type: DatagridComponent, decorators: [{
2856
+ type: Host
2857
+ }] }, { type: undefined, decorators: [{
2858
+ type: Optional
2859
+ }, {
2860
+ type: Inject,
2861
+ args: [appfxDatagridUserPreferencesToken]
2862
+ }] }] });
2863
+
2864
+ /*
2865
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2866
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2867
+ * This software is released under MIT license.
2868
+ * The full license information can be found in LICENSE in the root directory of this project.
2869
+ */
2870
+ // Handle sorting on 'null | undefined | ""' value on the property
2871
+ class FieldComparator {
2872
+ constructor(compareField) {
2873
+ this.field = compareField;
2874
+ }
2875
+ compare(a, b) {
2876
+ if (!a[this.field] && !b[this.field]) {
2877
+ return 0;
2878
+ }
2879
+ else if (!a[this.field] && b[this.field]) {
2880
+ return 1;
2881
+ }
2882
+ else if (a[this.field] && !b[this.field]) {
2883
+ return -1;
2884
+ }
2885
+ else {
2886
+ if (a[this.field] > b[this.field]) {
2887
+ return 1;
2888
+ }
2889
+ else if (a[this.field] < b[this.field]) {
2890
+ return -1;
2891
+ }
2892
+ else {
2893
+ return 0;
2894
+ }
2895
+ }
2896
+ }
2897
+ }
2898
+ // Handle sorting on field that is a list
2899
+ class ListComparator {
2900
+ constructor(compareField) {
2901
+ this.field = compareField;
2902
+ }
2903
+ compare(a, b) {
2904
+ if (!a[this.field] && !b[this.field]) {
2905
+ return 0;
2906
+ }
2907
+ else if (!a[this.field] && b[this.field]) {
2908
+ return 1;
2909
+ }
2910
+ else if (a[this.field] && !b[this.field]) {
2911
+ return -1;
2912
+ }
2913
+ else {
2914
+ return a[this.field].length > b[this.field].length ? -1 : 1;
2915
+ }
2916
+ }
2917
+ }
2918
+
2919
+ /*
2920
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2921
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2922
+ * This software is released under MIT license.
2923
+ * The full license information can be found in LICENSE in the root directory of this project.
2924
+ */
2925
+ function compareNumericValues(itemA, itemB, fieldName) {
2926
+ const firstValue = Number(itemA[fieldName]);
2927
+ const secondValue = Number(itemB[fieldName]);
2928
+ if (isNaN(firstValue) && isNaN(secondValue)) {
2929
+ return 0;
2930
+ }
2931
+ if (isNaN(firstValue)) {
2932
+ return -1;
2933
+ }
2934
+ if (isNaN(secondValue)) {
2935
+ return 1;
2936
+ }
2937
+ return firstValue - secondValue;
2938
+ }
2939
+ class SimpleNumericComparator {
2940
+ constructor(fieldName) {
2941
+ this.fieldName = fieldName;
2942
+ }
2943
+ compare(first, second) {
2944
+ return compareNumericValues(first, second, this.fieldName);
2945
+ }
2946
+ }
2947
+
2948
+ /*
2949
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2950
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2951
+ * This software is released under MIT license.
2952
+ * The full license information can be found in LICENSE in the root directory of this project.
2953
+ */
2954
+ class DatagridColumnsOrderModule {
2955
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2956
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderModule, declarations: [ColumnOrderDirective, DatagridColumnsOrderDirective], imports: [HermesDatagridModule, CommonModule, DragDropModule], exports: [ColumnOrderDirective, DatagridColumnsOrderDirective] }); }
2957
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderModule, imports: [HermesDatagridModule, CommonModule, DragDropModule] }); }
2958
+ }
2959
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridColumnsOrderModule, decorators: [{
2960
+ type: NgModule,
2961
+ args: [{
2962
+ declarations: [ColumnOrderDirective, DatagridColumnsOrderDirective],
2963
+ imports: [HermesDatagridModule, CommonModule, DragDropModule],
2964
+ exports: [ColumnOrderDirective, DatagridColumnsOrderDirective],
2965
+ }]
2966
+ }] });
2967
+
2968
+ /*
2969
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
2970
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
2971
+ * This software is released under MIT license.
2972
+ * The full license information can be found in LICENSE in the root directory of this project.
2973
+ */
2974
+ function datagridStringsServiceFactory(existing) {
2975
+ return existing || new DatagridStrings();
2976
+ }
2977
+ const exportedComponents = [DatagridComponent, DatagridActionBarComponent, DatagridFilterComponent];
2978
+ const exportedDirectives = [
2979
+ DatagridPageDirective,
2980
+ DatagridPersistSettingsDirective,
2981
+ DatagridPreserveSelectionDirective,
2982
+ DatagridContentNoWrapDirective,
2983
+ ];
2984
+ class AppfxDatagridModule {
2985
+ constructor() {
2986
+ ClarityIcons.addIcons(angleIcon, banIcon, dragHandleIcon, plusIcon);
2987
+ }
2988
+ static forRoot(errorNotifiableService) {
2989
+ return {
2990
+ ngModule: AppfxDatagridModule,
2991
+ providers: [{ provide: appfxDatagridErrorNotifiableToken, useClass: errorNotifiableService }],
2992
+ };
2993
+ }
2994
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AppfxDatagridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2995
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: AppfxDatagridModule, declarations: [DatagridComponent, DatagridActionBarComponent, DatagridFilterComponent, DatagridPageDirective,
2996
+ DatagridPersistSettingsDirective,
2997
+ DatagridPreserveSelectionDirective,
2998
+ DatagridContentNoWrapDirective, DatagridCellContainerComponent,
2999
+ DatagridColumnToggleComponent,
3000
+ DatagridFilterContainerComponent,
3001
+ ExportDatagridComponent,
3002
+ IsRowSelectablePipe], imports: [AppfxA11yModule,
3003
+ AppfxDatagridFiltersModule,
3004
+ A11yModule,
3005
+ DragDropModule,
3006
+ OverlayModule,
3007
+ HermesCheckboxModule,
3008
+ HermesDatagridModule,
3009
+ HermesDropdownModule,
3010
+ HermesIcon,
3011
+ HermesInputModule,
3012
+ HermesLoadingModule,
3013
+ CommonModule,
3014
+ DatagridColumnsOrderModule,
3015
+ FormsModule], exports: [DatagridComponent, DatagridActionBarComponent, DatagridFilterComponent, DatagridPageDirective,
3016
+ DatagridPersistSettingsDirective,
3017
+ DatagridPreserveSelectionDirective,
3018
+ DatagridContentNoWrapDirective] }); }
3019
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AppfxDatagridModule, providers: [
3020
+ CsvHelperService,
3021
+ ExportProviderService,
3022
+ {
3023
+ // This pattern allows the importer of this module to specify its own DatagridStrings.
3024
+ provide: DatagridStrings,
3025
+ useFactory: datagridStringsServiceFactory,
3026
+ deps: [[new Optional(), new SkipSelf(), DatagridStrings]],
3027
+ },
3028
+ ], imports: [AppfxA11yModule,
3029
+ AppfxDatagridFiltersModule,
3030
+ A11yModule,
3031
+ DragDropModule,
3032
+ OverlayModule,
3033
+ HermesCheckboxModule,
3034
+ HermesDatagridModule,
3035
+ HermesDropdownModule,
3036
+ HermesIcon,
3037
+ HermesInputModule,
3038
+ HermesLoadingModule,
3039
+ CommonModule,
3040
+ DatagridColumnsOrderModule,
3041
+ FormsModule] }); }
3042
+ }
3043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AppfxDatagridModule, decorators: [{
3044
+ type: NgModule,
3045
+ args: [{
3046
+ declarations: [
3047
+ ...exportedComponents,
3048
+ ...exportedDirectives,
3049
+ DatagridCellContainerComponent,
3050
+ DatagridColumnToggleComponent,
3051
+ DatagridFilterContainerComponent,
3052
+ ExportDatagridComponent,
3053
+ IsRowSelectablePipe,
3054
+ ],
3055
+ imports: [
3056
+ AppfxA11yModule,
3057
+ AppfxDatagridFiltersModule,
3058
+ A11yModule,
3059
+ DragDropModule,
3060
+ OverlayModule,
3061
+ HermesCheckboxModule,
3062
+ HermesDatagridModule,
3063
+ HermesDropdownModule,
3064
+ HermesIcon,
3065
+ HermesInputModule,
3066
+ HermesLoadingModule,
3067
+ CommonModule,
3068
+ DatagridColumnsOrderModule,
3069
+ FormsModule,
3070
+ ],
3071
+ exports: [...exportedComponents, ...exportedDirectives],
3072
+ providers: [
3073
+ CsvHelperService,
3074
+ ExportProviderService,
3075
+ {
3076
+ // This pattern allows the importer of this module to specify its own DatagridStrings.
3077
+ provide: DatagridStrings,
3078
+ useFactory: datagridStringsServiceFactory,
3079
+ deps: [[new Optional(), new SkipSelf(), DatagridStrings]],
3080
+ },
3081
+ ],
3082
+ }]
3083
+ }], ctorParameters: () => [] });
3084
+
3085
+ /*
3086
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3087
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3088
+ * This software is released under MIT license.
3089
+ * The full license information can be found in LICENSE in the root directory of this project.
3090
+ */
3091
+ /**
3092
+ * Feature states populated on application level during app initialization.
3093
+ * This is needed, because datagrid module does not have direct access to feature-state-service.
3094
+ */
3095
+ class DatagridFeatureStates {
3096
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFeatureStates, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3097
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFeatureStates }); }
3098
+ }
3099
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatagridFeatureStates, decorators: [{
3100
+ type: Injectable
3101
+ }] });
3102
+
3103
+ /*
3104
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3105
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3106
+ * This software is released under MIT license.
3107
+ * The full license information can be found in LICENSE in the root directory of this project.
3108
+ */
3109
+ class CaseInsensitiveContainsStringFilter {
3110
+ constructor(fieldName) {
3111
+ this.fieldName = fieldName;
3112
+ }
3113
+ accepts(item, search) {
3114
+ const currentItem = '' + item[this.fieldName];
3115
+ return currentItem === search || currentItem.toLowerCase().indexOf(search) >= 0;
3116
+ }
3117
+ }
3118
+
3119
+ /*
3120
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3121
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3122
+ * This software is released under MIT license.
3123
+ * The full license information can be found in LICENSE in the root directory of this project.
3124
+ */
3125
+
3126
+ /**
3127
+ * Generated bundle index. Do not edit.
3128
+ */
3129
+
3130
+ export { ActionBarLayout, AppfxDatagridModule, CaseInsensitiveContainsStringFilter, CsvHelperService, DatagridActionBarComponent, DatagridComponent, DatagridContentNoWrapDirective, DatagridFeatureStates, DatagridFilterComponent, DatagridPageDirective, DatagridPersistSettingsDirective, DatagridPreserveSelectionDirective, DatagridStrings, ExportProviderService, ExportType, FieldComparator, ListComparator, SimpleNumericComparator, appfxDatagridErrorNotifiableToken, appfxDatagridPersistSettingsToken, appfxDatagridUserPreferencesToken, appfxPreselectableComponentToken };
3131
+ //# sourceMappingURL=hermes-ui-angular-addons-datagrid.mjs.map