@ngstarter-ui/components 1.0.21

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 (415) hide show
  1. package/README.md +0 -0
  2. package/fesm2022/ngstarter-ui-components-action-required.mjs +42 -0
  3. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -0
  4. package/fesm2022/ngstarter-ui-components-alert.mjs +132 -0
  5. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -0
  6. package/fesm2022/ngstarter-ui-components-announcement.mjs +86 -0
  7. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -0
  8. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +360 -0
  9. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -0
  10. package/fesm2022/ngstarter-ui-components-avatar.mjs +235 -0
  11. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -0
  12. package/fesm2022/ngstarter-ui-components-badge.mjs +97 -0
  13. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -0
  14. package/fesm2022/ngstarter-ui-components-block-loader.mjs +48 -0
  15. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -0
  16. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +327 -0
  17. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -0
  18. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +209 -0
  19. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -0
  20. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +175 -0
  21. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -0
  22. package/fesm2022/ngstarter-ui-components-button.mjs +70 -0
  23. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -0
  24. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +49 -0
  25. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -0
  26. package/fesm2022/ngstarter-ui-components-card.mjs +199 -0
  27. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -0
  28. package/fesm2022/ngstarter-ui-components-carousel.mjs +614 -0
  29. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -0
  30. package/fesm2022/ngstarter-ui-components-checkbox.mjs +300 -0
  31. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -0
  32. package/fesm2022/ngstarter-ui-components-chips.mjs +589 -0
  33. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -0
  34. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +347 -0
  35. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -0
  36. package/fesm2022/ngstarter-ui-components-color-picker.mjs +713 -0
  37. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +106 -0
  39. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -0
  40. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +72 -0
  41. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -0
  42. package/fesm2022/ngstarter-ui-components-command-bar.mjs +57 -0
  43. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -0
  44. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +1024 -0
  45. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -0
  46. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +177 -0
  47. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -0
  48. package/fesm2022/ngstarter-ui-components-confirm.mjs +85 -0
  49. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -0
  50. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs +173 -0
  51. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs.map +1 -0
  52. package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs +124 -0
  53. package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs.map +1 -0
  54. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +99 -0
  55. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +1 -0
  56. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs +33 -0
  57. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs.map +1 -0
  58. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs +354 -0
  59. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs.map +1 -0
  60. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs +114 -0
  61. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs.map +1 -0
  62. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs +146 -0
  63. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs.map +1 -0
  64. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs +215 -0
  65. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs.map +1 -0
  66. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs +2548 -0
  67. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs.map +1 -0
  68. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs +110 -0
  69. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs.map +1 -0
  70. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs +141 -0
  71. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs.map +1 -0
  72. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs +1604 -0
  73. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs.map +1 -0
  74. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs +175 -0
  75. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs.map +1 -0
  76. package/fesm2022/ngstarter-ui-components-content-editor.mjs +2 -0
  77. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -0
  78. package/fesm2022/ngstarter-ui-components-content-fade.mjs +35 -0
  79. package/fesm2022/ngstarter-ui-components-content-fade.mjs.map +1 -0
  80. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +107 -0
  81. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -0
  82. package/fesm2022/ngstarter-ui-components-core.mjs +1330 -0
  83. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -0
  84. package/fesm2022/ngstarter-ui-components-country-select.mjs +489 -0
  85. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -0
  86. package/fesm2022/ngstarter-ui-components-crop.mjs +183 -0
  87. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -0
  88. package/fesm2022/ngstarter-ui-components-currency-select.mjs +397 -0
  89. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -0
  90. package/fesm2022/ngstarter-ui-components-data-view.mjs +1494 -0
  91. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -0
  92. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +154 -0
  93. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -0
  94. package/fesm2022/ngstarter-ui-components-datepicker.mjs +1159 -0
  95. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -0
  96. package/fesm2022/ngstarter-ui-components-dialog.mjs +357 -0
  97. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -0
  98. package/fesm2022/ngstarter-ui-components-divider.mjs +42 -0
  99. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -0
  100. package/fesm2022/ngstarter-ui-components-drawer.mjs +132 -0
  101. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -0
  102. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +245 -0
  103. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -0
  104. package/fesm2022/ngstarter-ui-components-empty-state.mjs +75 -0
  105. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -0
  106. package/fesm2022/ngstarter-ui-components-expand.mjs +56 -0
  107. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -0
  108. package/fesm2022/ngstarter-ui-components-expansion.mjs +193 -0
  109. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -0
  110. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +333 -0
  111. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -0
  112. package/fesm2022/ngstarter-ui-components-form-field.mjs +230 -0
  113. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -0
  114. package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs +124 -0
  115. package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs.map +1 -0
  116. package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs +22 -0
  117. package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs.map +1 -0
  118. package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs +44 -0
  119. package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs.map +1 -0
  120. package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs +17 -0
  121. package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs.map +1 -0
  122. package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs +17 -0
  123. package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs.map +1 -0
  124. package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs +35 -0
  125. package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs.map +1 -0
  126. package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs +38 -0
  127. package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs.map +1 -0
  128. package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs +39 -0
  129. package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs.map +1 -0
  130. package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs +24 -0
  131. package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs.map +1 -0
  132. package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs +37 -0
  133. package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs.map +1 -0
  134. package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs +35 -0
  135. package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs.map +1 -0
  136. package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs +22 -0
  137. package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs.map +1 -0
  138. package/fesm2022/ngstarter-ui-components-form-renderer.mjs +317 -0
  139. package/fesm2022/ngstarter-ui-components-form-renderer.mjs.map +1 -0
  140. package/fesm2022/ngstarter-ui-components-gauge.mjs +44 -0
  141. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -0
  142. package/fesm2022/ngstarter-ui-components-grid.mjs +78 -0
  143. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -0
  144. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +736 -0
  145. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -0
  146. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +192 -0
  147. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -0
  148. package/fesm2022/ngstarter-ui-components-icon.mjs +61 -0
  149. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -0
  150. package/fesm2022/ngstarter-ui-components-image-designer.mjs +4016 -0
  151. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -0
  152. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +20 -0
  153. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -0
  154. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +151 -0
  155. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -0
  156. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +349 -0
  157. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -0
  158. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +162 -0
  159. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -0
  160. package/fesm2022/ngstarter-ui-components-incidents.mjs +257 -0
  161. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -0
  162. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +179 -0
  163. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -0
  164. package/fesm2022/ngstarter-ui-components-input-mask.mjs +180 -0
  165. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -0
  166. package/fesm2022/ngstarter-ui-components-input-validator.mjs +24 -0
  167. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -0
  168. package/fesm2022/ngstarter-ui-components-input.mjs +152 -0
  169. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -0
  170. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +156 -0
  171. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -0
  172. package/fesm2022/ngstarter-ui-components-kbd.mjs +31 -0
  173. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -0
  174. package/fesm2022/ngstarter-ui-components-layout.mjs +199 -0
  175. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -0
  176. package/fesm2022/ngstarter-ui-components-list.mjs +279 -0
  177. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -0
  178. package/fesm2022/ngstarter-ui-components-logo.mjs +51 -0
  179. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -0
  180. package/fesm2022/ngstarter-ui-components-marquee.mjs +76 -0
  181. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -0
  182. package/fesm2022/ngstarter-ui-components-menu.mjs +851 -0
  183. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -0
  184. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +928 -0
  185. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -0
  186. package/fesm2022/ngstarter-ui-components-navigation.mjs +439 -0
  187. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -0
  188. package/fesm2022/ngstarter-ui-components-notifications.mjs +181 -0
  189. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -0
  190. package/fesm2022/ngstarter-ui-components-number-input.mjs +293 -0
  191. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -0
  192. package/fesm2022/ngstarter-ui-components-option.mjs +157 -0
  193. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -0
  194. package/fesm2022/ngstarter-ui-components-overlay.mjs +112 -0
  195. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -0
  196. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +77 -0
  197. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -0
  198. package/fesm2022/ngstarter-ui-components-paginator.mjs +297 -0
  199. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -0
  200. package/fesm2022/ngstarter-ui-components-panel.mjs +123 -0
  201. package/fesm2022/ngstarter-ui-components-panel.mjs.map +1 -0
  202. package/fesm2022/ngstarter-ui-components-password-strength.mjs +335 -0
  203. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -0
  204. package/fesm2022/ngstarter-ui-components-phone-input.mjs +651 -0
  205. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -0
  206. package/fesm2022/ngstarter-ui-components-pin-input.mjs +193 -0
  207. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -0
  208. package/fesm2022/ngstarter-ui-components-popover.mjs +302 -0
  209. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -0
  210. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +68 -0
  211. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -0
  212. package/fesm2022/ngstarter-ui-components-radio-card.mjs +102 -0
  213. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -0
  214. package/fesm2022/ngstarter-ui-components-radio.mjs +147 -0
  215. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -0
  216. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +87 -0
  217. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -0
  218. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +74 -0
  219. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -0
  220. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +95 -0
  221. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -0
  222. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +219 -0
  223. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -0
  224. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +459 -0
  225. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -0
  226. package/fesm2022/ngstarter-ui-components-segmented.mjs +218 -0
  227. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -0
  228. package/fesm2022/ngstarter-ui-components-select.mjs +496 -0
  229. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -0
  230. package/fesm2022/ngstarter-ui-components-side-panel.mjs +107 -0
  231. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -0
  232. package/fesm2022/ngstarter-ui-components-sidebar.mjs +435 -0
  233. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -0
  234. package/fesm2022/ngstarter-ui-components-sidenav.mjs +354 -0
  235. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -0
  236. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +452 -0
  237. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -0
  238. package/fesm2022/ngstarter-ui-components-skeleton.mjs +22 -0
  239. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -0
  240. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +93 -0
  241. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -0
  242. package/fesm2022/ngstarter-ui-components-slider.mjs +481 -0
  243. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -0
  244. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +354 -0
  245. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -0
  246. package/fesm2022/ngstarter-ui-components-sort.mjs +140 -0
  247. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -0
  248. package/fesm2022/ngstarter-ui-components-spinner.mjs +75 -0
  249. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -0
  250. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +93 -0
  251. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -0
  252. package/fesm2022/ngstarter-ui-components-split.mjs +948 -0
  253. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -0
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs +103 -0
  255. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -0
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs +72 -0
  257. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -0
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +265 -0
  259. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -0
  260. package/fesm2022/ngstarter-ui-components-table.mjs +648 -0
  261. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -0
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs +591 -0
  263. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -0
  264. package/fesm2022/ngstarter-ui-components-text-editor.mjs +1012 -0
  265. package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -0
  266. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +212 -0
  267. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -0
  268. package/fesm2022/ngstarter-ui-components-tiles.mjs +634 -0
  269. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -0
  270. package/fesm2022/ngstarter-ui-components-timeline.mjs +122 -0
  271. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -0
  272. package/fesm2022/ngstarter-ui-components-timepicker.mjs +486 -0
  273. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -0
  274. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +371 -0
  275. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -0
  276. package/fesm2022/ngstarter-ui-components-toolbar.mjs +299 -0
  277. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -0
  278. package/fesm2022/ngstarter-ui-components-tooltip.mjs +506 -0
  279. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -0
  280. package/fesm2022/ngstarter-ui-components-tree.mjs +200 -0
  281. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -0
  282. package/fesm2022/ngstarter-ui-components-upload.mjs +330 -0
  283. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -0
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs +516 -0
  285. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -0
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +218 -0
  287. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -0
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +18 -0
  289. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -0
  290. package/fesm2022/ngstarter-ui-components.mjs +6 -0
  291. package/fesm2022/ngstarter-ui-components.mjs.map +1 -0
  292. package/package.json +535 -0
  293. package/styles/_common.scss +456 -0
  294. package/styles/_global.scss +91 -0
  295. package/styles/themes/default.scss +2 -0
  296. package/types/ngstarter-ui-components-action-required.d.ts +14 -0
  297. package/types/ngstarter-ui-components-alert.d.ts +50 -0
  298. package/types/ngstarter-ui-components-announcement.d.ts +59 -0
  299. package/types/ngstarter-ui-components-autocomplete.d.ts +83 -0
  300. package/types/ngstarter-ui-components-avatar.d.ts +69 -0
  301. package/types/ngstarter-ui-components-badge.d.ts +38 -0
  302. package/types/ngstarter-ui-components-block-loader.d.ts +21 -0
  303. package/types/ngstarter-ui-components-bottom-sheet.d.ts +149 -0
  304. package/types/ngstarter-ui-components-breadcrumbs.d.ts +104 -0
  305. package/types/ngstarter-ui-components-button-toggle.d.ts +54 -0
  306. package/types/ngstarter-ui-components-button.d.ts +27 -0
  307. package/types/ngstarter-ui-components-card-overlay.d.ts +20 -0
  308. package/types/ngstarter-ui-components-card.d.ts +85 -0
  309. package/types/ngstarter-ui-components-carousel.d.ts +76 -0
  310. package/types/ngstarter-ui-components-checkbox.d.ts +94 -0
  311. package/types/ngstarter-ui-components-chips.d.ts +189 -0
  312. package/types/ngstarter-ui-components-code-highlighter.d.ts +28 -0
  313. package/types/ngstarter-ui-components-color-picker.d.ts +92 -0
  314. package/types/ngstarter-ui-components-color-scheme.d.ts +44 -0
  315. package/types/ngstarter-ui-components-color-switcher.d.ts +26 -0
  316. package/types/ngstarter-ui-components-command-bar.d.ts +28 -0
  317. package/types/ngstarter-ui-components-comment-editor.d.ts +194 -0
  318. package/types/ngstarter-ui-components-comparison-slider.d.ts +42 -0
  319. package/types/ngstarter-ui-components-confirm.d.ts +34 -0
  320. package/types/ngstarter-ui-components-content-editor.d.ts +321 -0
  321. package/types/ngstarter-ui-components-content-fade.d.ts +17 -0
  322. package/types/ngstarter-ui-components-cookie-popup.d.ts +41 -0
  323. package/types/ngstarter-ui-components-core.d.ts +421 -0
  324. package/types/ngstarter-ui-components-country-select.d.ts +78 -0
  325. package/types/ngstarter-ui-components-crop.d.ts +59 -0
  326. package/types/ngstarter-ui-components-currency-select.d.ts +82 -0
  327. package/types/ngstarter-ui-components-data-view.d.ts +391 -0
  328. package/types/ngstarter-ui-components-date-format-select.d.ts +59 -0
  329. package/types/ngstarter-ui-components-datepicker.d.ts +384 -0
  330. package/types/ngstarter-ui-components-dialog.d.ts +115 -0
  331. package/types/ngstarter-ui-components-divider.d.ts +18 -0
  332. package/types/ngstarter-ui-components-drawer.d.ts +32 -0
  333. package/types/ngstarter-ui-components-emoji-picker.d.ts +49 -0
  334. package/types/ngstarter-ui-components-empty-state.d.ts +33 -0
  335. package/types/ngstarter-ui-components-expand.d.ts +26 -0
  336. package/types/ngstarter-ui-components-expansion.d.ts +68 -0
  337. package/types/ngstarter-ui-components-filter-builder.d.ts +106 -0
  338. package/types/ngstarter-ui-components-form-field.d.ts +107 -0
  339. package/types/ngstarter-ui-components-form-renderer.d.ts +121 -0
  340. package/types/ngstarter-ui-components-gauge.d.ts +21 -0
  341. package/types/ngstarter-ui-components-grid.d.ts +45 -0
  342. package/types/ngstarter-ui-components-guided-tour.d.ts +227 -0
  343. package/types/ngstarter-ui-components-headless-stepper.d.ts +65 -0
  344. package/types/ngstarter-ui-components-icon.d.ts +17 -0
  345. package/types/ngstarter-ui-components-image-designer.d.ts +357 -0
  346. package/types/ngstarter-ui-components-image-placeholder.d.ts +8 -0
  347. package/types/ngstarter-ui-components-image-resizer.d.ts +35 -0
  348. package/types/ngstarter-ui-components-image-viewer.d.ts +63 -0
  349. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +34 -0
  350. package/types/ngstarter-ui-components-incidents.d.ts +119 -0
  351. package/types/ngstarter-ui-components-inline-text-edit.d.ts +39 -0
  352. package/types/ngstarter-ui-components-input-mask.d.ts +36 -0
  353. package/types/ngstarter-ui-components-input-validator.d.ts +5 -0
  354. package/types/ngstarter-ui-components-input.d.ts +53 -0
  355. package/types/ngstarter-ui-components-kanban-board.d.ts +68 -0
  356. package/types/ngstarter-ui-components-kbd.d.ts +13 -0
  357. package/types/ngstarter-ui-components-layout.d.ts +83 -0
  358. package/types/ngstarter-ui-components-list.d.ts +98 -0
  359. package/types/ngstarter-ui-components-logo.d.ts +26 -0
  360. package/types/ngstarter-ui-components-marquee.d.ts +27 -0
  361. package/types/ngstarter-ui-components-menu.d.ts +199 -0
  362. package/types/ngstarter-ui-components-micro-chart.d.ts +195 -0
  363. package/types/ngstarter-ui-components-navigation.d.ts +136 -0
  364. package/types/ngstarter-ui-components-notifications.d.ts +84 -0
  365. package/types/ngstarter-ui-components-number-input.d.ts +99 -0
  366. package/types/ngstarter-ui-components-option.d.ts +61 -0
  367. package/types/ngstarter-ui-components-overlay.d.ts +12 -0
  368. package/types/ngstarter-ui-components-page-loading-bar.d.ts +20 -0
  369. package/types/ngstarter-ui-components-paginator.d.ts +145 -0
  370. package/types/ngstarter-ui-components-panel.d.ts +59 -0
  371. package/types/ngstarter-ui-components-password-strength.d.ts +109 -0
  372. package/types/ngstarter-ui-components-phone-input.d.ts +103 -0
  373. package/types/ngstarter-ui-components-pin-input.d.ts +48 -0
  374. package/types/ngstarter-ui-components-popover.d.ts +94 -0
  375. package/types/ngstarter-ui-components-progress-bar.d.ts +30 -0
  376. package/types/ngstarter-ui-components-radio-card.d.ts +37 -0
  377. package/types/ngstarter-ui-components-radio.d.ts +45 -0
  378. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -0
  379. package/types/ngstarter-ui-components-resizable-container.d.ts +25 -0
  380. package/types/ngstarter-ui-components-screen-loader.d.ts +34 -0
  381. package/types/ngstarter-ui-components-scroll-spy.d.ts +63 -0
  382. package/types/ngstarter-ui-components-scrollbar-area.d.ts +67 -0
  383. package/types/ngstarter-ui-components-segmented.d.ts +65 -0
  384. package/types/ngstarter-ui-components-select.d.ts +126 -0
  385. package/types/ngstarter-ui-components-side-panel.d.ts +42 -0
  386. package/types/ngstarter-ui-components-sidebar.d.ts +143 -0
  387. package/types/ngstarter-ui-components-sidenav.d.ts +86 -0
  388. package/types/ngstarter-ui-components-signature-pad.d.ts +49 -0
  389. package/types/ngstarter-ui-components-skeleton.d.ts +9 -0
  390. package/types/ngstarter-ui-components-slide-toggle.d.ts +41 -0
  391. package/types/ngstarter-ui-components-slider.d.ts +85 -0
  392. package/types/ngstarter-ui-components-snack-bar.d.ts +142 -0
  393. package/types/ngstarter-ui-components-sort.d.ts +66 -0
  394. package/types/ngstarter-ui-components-spinner.d.ts +28 -0
  395. package/types/ngstarter-ui-components-splash-screen.d.ts +31 -0
  396. package/types/ngstarter-ui-components-split.d.ts +210 -0
  397. package/types/ngstarter-ui-components-stepper.d.ts +44 -0
  398. package/types/ngstarter-ui-components-suggestions.d.ts +32 -0
  399. package/types/ngstarter-ui-components-tab-panel.d.ts +96 -0
  400. package/types/ngstarter-ui-components-table.d.ts +277 -0
  401. package/types/ngstarter-ui-components-tabs.d.ts +145 -0
  402. package/types/ngstarter-ui-components-text-editor.d.ts +191 -0
  403. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +35 -0
  404. package/types/ngstarter-ui-components-tiles.d.ts +109 -0
  405. package/types/ngstarter-ui-components-timeline.d.ts +57 -0
  406. package/types/ngstarter-ui-components-timepicker.d.ts +115 -0
  407. package/types/ngstarter-ui-components-timezone-select.d.ts +75 -0
  408. package/types/ngstarter-ui-components-toolbar.d.ts +74 -0
  409. package/types/ngstarter-ui-components-tooltip.d.ts +52 -0
  410. package/types/ngstarter-ui-components-tree.d.ts +60 -0
  411. package/types/ngstarter-ui-components-upload.d.ts +134 -0
  412. package/types/ngstarter-ui-components-video-player.d.ts +67 -0
  413. package/types/ngstarter-ui-components-video-viewer.d.ts +98 -0
  414. package/types/ngstarter-ui-components-visual-builder.d.ts +8 -0
  415. package/types/ngstarter-ui-components.d.ts +2 -0
@@ -0,0 +1,1494 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, TemplateRef, Directive, input, numberAttribute, booleanAttribute, Component, signal, ChangeDetectionStrategy, makeEnvironmentProviders, ChangeDetectorRef, DestroyRef, PLATFORM_ID, NgZone, ElementRef, contentChild, viewChild, model, computed, effect, untracked, Injector, output, forwardRef } from '@angular/core';
3
+ import { TableDataSource } from '@ngstarter-ui/components/table';
4
+ import { EmptyState, EmptyStateIcon, EmptyStateContent } from '@ngstarter-ui/components/empty-state';
5
+ import { Icon } from '@ngstarter-ui/components/icon';
6
+ import { SelectionModel } from '@angular/cdk/collections';
7
+ import { Paginator } from '@ngstarter-ui/components/paginator';
8
+ import { SortDirective, SortHeader } from '@ngstarter-ui/components/sort';
9
+ import { DOCUMENT, isPlatformBrowser, NgComponentOutlet, NgTemplateOutlet, NgStyle } from '@angular/common';
10
+ import { Checkbox } from '@ngstarter-ui/components/checkbox';
11
+ import { ScrollbarArea } from '@ngstarter-ui/components/scrollbar-area';
12
+ import { BlockLoader, BlockLoaderContainerDirective } from '@ngstarter-ui/components/block-loader';
13
+ import { Button } from '@ngstarter-ui/components/button';
14
+ import { Menu, MenuTrigger, MenuContent, MenuItem, MenuDivider } from '@ngstarter-ui/components/menu';
15
+ import { DialogRef, DIALOG_DATA, DialogTitle, DialogContent, DialogActions, Dialog } from '@ngstarter-ui/components/dialog';
16
+ import * as i1 from '@angular/cdk/drag-drop';
17
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
18
+ import { fromEvent, Subject, takeUntil, timer, take, merge } from 'rxjs';
19
+
20
+ const DATA_VIEW = new InjectionToken('DATA_VIEW');
21
+
22
+ class DataViewEmptyDataDirective {
23
+ templateRef = inject(TemplateRef);
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewEmptyDataDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: DataViewEmptyDataDirective, isStandalone: true, selector: "[ngsDataViewEmptyData]", host: { classAttribute: "ngs-data-view-empty-data" }, exportAs: ["ngsDataViewEmptyData"], ngImport: i0 });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewEmptyDataDirective, decorators: [{
28
+ type: Directive,
29
+ args: [{
30
+ selector: '[ngsDataViewEmptyData]',
31
+ exportAs: 'ngsDataViewEmptyData',
32
+ standalone: true,
33
+ host: {
34
+ 'class': 'ngs-data-view-empty-data',
35
+ }
36
+ }]
37
+ }] });
38
+
39
+ class DataViewEmptyFilterResultsDirective {
40
+ templateRef = inject(TemplateRef);
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewEmptyFilterResultsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
42
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: DataViewEmptyFilterResultsDirective, isStandalone: true, selector: "[ngsDataViewEmptyFilterResults]", host: { classAttribute: "ngs-data-view-empty-filter-results" }, exportAs: ["ngsDataViewEmptyFilterResults"], ngImport: i0 });
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewEmptyFilterResultsDirective, decorators: [{
45
+ type: Directive,
46
+ args: [{
47
+ selector: '[ngsDataViewEmptyFilterResults]',
48
+ exportAs: 'ngsDataViewEmptyFilterResults',
49
+ standalone: true,
50
+ host: {
51
+ 'class': 'ngs-data-view-empty-filter-results',
52
+ }
53
+ }]
54
+ }] });
55
+
56
+ class DataViewActionBarDirective {
57
+ templateRef = inject(TemplateRef);
58
+ width = input(100, { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), alias: 'ngsDataViewActionBarWidth',
59
+ transform: numberAttribute });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewActionBarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
61
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: DataViewActionBarDirective, isStandalone: true, selector: "[ngsDataViewActionBar]", inputs: { width: { classPropertyName: "width", publicName: "ngsDataViewActionBarWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewActionBarDirective, decorators: [{
64
+ type: Directive,
65
+ args: [{
66
+ selector: '[ngsDataViewActionBar]',
67
+ standalone: true
68
+ }]
69
+ }], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsDataViewActionBarWidth", required: false }] }] } });
70
+
71
+ class DataViewActionBar {
72
+ forceVisible = input(false, { ...(ngDevMode ? { debugName: "forceVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
73
+ width = input(100, { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: numberAttribute });
74
+ _forceVisible = false;
75
+ get api() {
76
+ return {
77
+ setForceVisible: (forceVisible) => {
78
+ this._forceVisible = forceVisible;
79
+ },
80
+ };
81
+ }
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewActionBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
83
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: DataViewActionBar, isStandalone: true, selector: "ngs-data-view-action-bar", inputs: { forceVisible: { classPropertyName: "forceVisible", publicName: "forceVisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.force-visible": "forceVisible() || _forceVisible" }, classAttribute: "ngs-data-view-action-bar" }, exportAs: ["ngsDataViewActionBar"], ngImport: i0, template: "<ng-content/>\n", styles: [":host{height:100%;display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);position:relative}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
84
+ }
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewActionBar, decorators: [{
86
+ type: Component,
87
+ args: [{ selector: 'ngs-data-view-action-bar', exportAs: 'ngsDataViewActionBar', host: {
88
+ 'class': 'ngs-data-view-action-bar',
89
+ '[class.force-visible]': 'forceVisible() || _forceVisible'
90
+ }, template: "<ng-content/>\n", styles: [":host{height:100%;display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);position:relative}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
91
+ }], propDecorators: { forceVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceVisible", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
92
+
93
+ class DataViewColumnSettingsDialog {
94
+ _dialogRef = inject((DialogRef));
95
+ _data = inject(DIALOG_DATA);
96
+ columns = signal(this._data.columns
97
+ .filter(c => c.withColumnSettings !== false)
98
+ .map(c => ({ ...c })), ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
99
+ drop(event) {
100
+ const updated = [...this.columns()];
101
+ moveItemInArray(updated, event.previousIndex, event.currentIndex);
102
+ this.columns.set(updated);
103
+ }
104
+ toggleVisibility(index, visible) {
105
+ const updated = [...this.columns()];
106
+ updated[index] = { ...updated[index], visible };
107
+ this.columns.set(updated);
108
+ }
109
+ pinColumn(index, align) {
110
+ const updated = [...this.columns()];
111
+ if (align === null) {
112
+ updated[index] = { ...updated[index], pinned: false, pinAlign: undefined };
113
+ }
114
+ else {
115
+ updated[index] = { ...updated[index], pinned: true, pinAlign: align };
116
+ }
117
+ this.columns.set(updated);
118
+ }
119
+ apply() {
120
+ this._dialogRef.close({ columns: this.columns() });
121
+ }
122
+ cancel() {
123
+ this._dialogRef.close();
124
+ }
125
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewColumnSettingsDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
126
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DataViewColumnSettingsDialog, isStandalone: true, selector: "ngs-data-view-column-settings-dialog", ngImport: i0, template: "<h3 ngsDialogTitle>Choose Columns</h3>\n<div ngsDialogContent>\n <div class=\"columns flex flex-col gap-2 min-w-[300px]\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n @for (col of columns(); track col.field; let i = $index) {\n <div class=\"flex items-center gap-1 px-1 py-2 bg-surface-container rounded-lg cursor-default\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragBoundary=\"columns\">\n <div class=\"cursor-move text-[var(--ngs-text-secondary)] flex items-center\" cdkDragHandle>\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </div>\n <ngs-checkbox [checked]=\"col.visible !== false\"\n (change)=\"toggleVisibility(i, $event.checked)\">\n {{ col.name }}\n </ngs-checkbox>\n <div class=\"grow\"></div>\n <button ngsIconButton\n class=\"shrink-0\"\n [ngsMenuTriggerFor]=\"pinMenu\"\n [ngsMenuTriggerData]=\"{ col: col, index: i }\">\n <ngs-icon [name]=\"col.pinned ? (col.pinAlign === 'end' ? 'fluent:pin-off-24-filled' : 'fluent:pin-24-filled') : 'fluent:pin-24-regular'\"\n size=\"20\"/>\n </button>\n </div>\n }\n </div>\n</div>\n\n<ngs-menu #pinMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n <button ngs-menu-item\n [selected]=\"!col.pinned\"\n (click)=\"pinColumn(col, null)\">\n No Pin\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'start'\"\n (click)=\"pinColumn(col, 'start')\">\n Pin Left\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'end'\"\n (click)=\"pinColumn(col, 'end')\">\n Pin Right\n </button>\n </ng-template>\n</ngs-menu>\n<div ngsDialogActions align=\"end\">\n <button ngsButton (click)=\"cancel()\">Cancel</button>\n <button ngsButton=\"filled\" (click)=\"apply()\">Apply</button>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: DialogTitle, selector: "ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]", inputs: ["id"], exportAs: ["ngsDialogTitle"] }, { kind: "component", type: DialogContent, selector: "ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]" }, { kind: "component", type: DialogActions, selector: "ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]", inputs: ["align"] }, { kind: "component", type: Checkbox, selector: "ngs-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["checkedChange", "disabledChange", "indeterminateChange", "change"], exportAs: ["ngsCheckbox"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: MenuContent, selector: "[ngsMenuContent]" }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1.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: i1.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: i1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataViewColumnSettingsDialog, decorators: [{
129
+ type: Component,
130
+ args: [{ selector: 'ngs-data-view-column-settings-dialog', imports: [
131
+ DialogTitle,
132
+ DialogContent,
133
+ DialogActions,
134
+ Checkbox,
135
+ Button,
136
+ Icon,
137
+ Menu,
138
+ MenuTrigger,
139
+ MenuContent,
140
+ MenuItem,
141
+ DragDropModule
142
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3 ngsDialogTitle>Choose Columns</h3>\n<div ngsDialogContent>\n <div class=\"columns flex flex-col gap-2 min-w-[300px]\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n @for (col of columns(); track col.field; let i = $index) {\n <div class=\"flex items-center gap-1 px-1 py-2 bg-surface-container rounded-lg cursor-default\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragBoundary=\"columns\">\n <div class=\"cursor-move text-[var(--ngs-text-secondary)] flex items-center\" cdkDragHandle>\n <ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/>\n </div>\n <ngs-checkbox [checked]=\"col.visible !== false\"\n (change)=\"toggleVisibility(i, $event.checked)\">\n {{ col.name }}\n </ngs-checkbox>\n <div class=\"grow\"></div>\n <button ngsIconButton\n class=\"shrink-0\"\n [ngsMenuTriggerFor]=\"pinMenu\"\n [ngsMenuTriggerData]=\"{ col: col, index: i }\">\n <ngs-icon [name]=\"col.pinned ? (col.pinAlign === 'end' ? 'fluent:pin-off-24-filled' : 'fluent:pin-24-filled') : 'fluent:pin-24-regular'\"\n size=\"20\"/>\n </button>\n </div>\n }\n </div>\n</div>\n\n<ngs-menu #pinMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n <button ngs-menu-item\n [selected]=\"!col.pinned\"\n (click)=\"pinColumn(col, null)\">\n No Pin\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'start'\"\n (click)=\"pinColumn(col, 'start')\">\n Pin Left\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'end'\"\n (click)=\"pinColumn(col, 'end')\">\n Pin Right\n </button>\n </ng-template>\n</ngs-menu>\n<div ngsDialogActions align=\"end\">\n <button ngsButton (click)=\"cancel()\">Cancel</button>\n <button ngsButton=\"filled\" (click)=\"apply()\">Apply</button>\n</div>\n" }]
143
+ }] });
144
+
145
+ const DATA_VIEW_CONFIG = new InjectionToken('DATA_VIEW_CONFIG');
146
+ function provideDataView(config) {
147
+ return makeEnvironmentProviders([
148
+ { provide: DATA_VIEW_CONFIG, useValue: config }
149
+ ]);
150
+ }
151
+
152
+ class DataView {
153
+ _cdr = inject(ChangeDetectorRef);
154
+ _destroyRef = inject(DestroyRef);
155
+ _platformId = inject(PLATFORM_ID);
156
+ _ngZone = inject(NgZone);
157
+ _doc = inject(DOCUMENT);
158
+ _config = inject(DATA_VIEW_CONFIG, { optional: true });
159
+ _elRef = inject(ElementRef);
160
+ _dialog = inject(Dialog);
161
+ _isDestroyed = false;
162
+ _requestId = 0;
163
+ _lastRequestKey = null;
164
+ _refreshTrigger = signal(0, ...(ngDevMode ? [{ debugName: "_refreshTrigger" }] : /* istanbul ignore next */ []));
165
+ _serverSideRowCount = signal(0, ...(ngDevMode ? [{ debugName: "_serverSideRowCount" }] : /* istanbul ignore next */ []));
166
+ _manualOrder = signal(null, ...(ngDevMode ? [{ debugName: "_manualOrder" }] : /* istanbul ignore next */ []));
167
+ _manualVisibility = signal({}, ...(ngDevMode ? [{ debugName: "_manualVisibility" }] : /* istanbul ignore next */ []));
168
+ _hasDataOnServer = signal(undefined, ...(ngDevMode ? [{ debugName: "_hasDataOnServer" }] : /* istanbul ignore next */ []));
169
+ _internalLoading = signal(false, ...(ngDevMode ? [{ debugName: "_internalLoading" }] : /* istanbul ignore next */ []));
170
+ _isFiltering = signal(false, ...(ngDevMode ? [{ debugName: "_isFiltering" }] : /* istanbul ignore next */ []));
171
+ _isSorting = signal(false, ...(ngDevMode ? [{ debugName: "_isSorting" }] : /* istanbul ignore next */ []));
172
+ _emptyDataRef = contentChild(DataViewEmptyDataDirective, ...(ngDevMode ? [{ debugName: "_emptyDataRef" }] : /* istanbul ignore next */ []));
173
+ _emptyFilterResults = contentChild(DataViewEmptyFilterResultsDirective, ...(ngDevMode ? [{ debugName: "_emptyFilterResults" }] : /* istanbul ignore next */ []));
174
+ _actionBarRef = contentChild(DataViewActionBarDirective, ...(ngDevMode ? [{ debugName: "_actionBarRef" }] : /* istanbul ignore next */ []));
175
+ _actionBarComp = contentChild(DataViewActionBarDirective, { ...(ngDevMode ? { debugName: "_actionBarComp" } : /* istanbul ignore next */ {}), read: DataViewActionBar });
176
+ _table = viewChild('table', ...(ngDevMode ? [{ debugName: "_table" }] : /* istanbul ignore next */ []));
177
+ _ngsSort = viewChild(SortDirective, ...(ngDevMode ? [{ debugName: "_ngsSort" }] : /* istanbul ignore next */ []));
178
+ _internalPaginator = viewChild(Paginator, ...(ngDevMode ? [{ debugName: "_internalPaginator" }] : /* istanbul ignore next */ []));
179
+ // Optional external paginator passed from parent. If provided, it overrides the internal one.
180
+ paginator = input(null, ...(ngDevMode ? [{ debugName: "paginator" }] : /* istanbul ignore next */ []));
181
+ _dataSource = new TableDataSource([]);
182
+ // ViewChildren for scroll synchronization
183
+ _headerCenter = viewChild('headerCenter', { ...(ngDevMode ? { debugName: "_headerCenter" } : /* istanbul ignore next */ {}), read: (ElementRef) });
184
+ _headerCenterInner = viewChild('headerCenterInner', { ...(ngDevMode ? { debugName: "_headerCenterInner" } : /* istanbul ignore next */ {}), read: (ElementRef) });
185
+ _bodyLeftContent = viewChild('bodyLeftContent', { ...(ngDevMode ? { debugName: "_bodyLeftContent" } : /* istanbul ignore next */ {}), read: (ElementRef) });
186
+ _scrollbarArea = viewChild(ScrollbarArea, ...(ngDevMode ? [{ debugName: "_scrollbarArea" }] : /* istanbul ignore next */ []));
187
+ _bodyCenterContent = viewChild('bodyCenterContent', { ...(ngDevMode ? { debugName: "_bodyCenterContent" } : /* istanbul ignore next */ {}), read: (ElementRef) });
188
+ _bodyRightContent = viewChild('bodyRightContent', { ...(ngDevMode ? { debugName: "_bodyRightContent" } : /* istanbul ignore next */ {}), read: (ElementRef) });
189
+ columnDefs = input([], ...(ngDevMode ? [{ debugName: "columnDefs" }] : /* istanbul ignore next */ []));
190
+ defaultColDef = input(this._config?.defaultColDef ?? {}, ...(ngDevMode ? [{ debugName: "defaultColDef" }] : /* istanbul ignore next */ []));
191
+ data = input([], ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
192
+ datasource = input(null, ...(ngDevMode ? [{ debugName: "datasource" }] : /* istanbul ignore next */ []));
193
+ rowHeight = input(this._config?.rowHeight ?? 50, { ...(ngDevMode ? { debugName: "rowHeight" } : /* istanbul ignore next */ {}), transform: (v) => parseInt(v, 10) || this._config?.rowHeight || 50 });
194
+ headerHeight = input(this._config?.headerHeight ?? 50, { ...(ngDevMode ? { debugName: "headerHeight" } : /* istanbul ignore next */ {}), transform: (v) => parseInt(v, 10) || this._config?.headerHeight || 50 });
195
+ bufferRows = input(this._config?.bufferRows ?? 10, { ...(ngDevMode ? { debugName: "bufferRows" } : /* istanbul ignore next */ {}), transform: (v) => parseInt(v, 10) || this._config?.bufferRows || 10 });
196
+ withSelection = input(false, { ...(ngDevMode ? { debugName: "withSelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
197
+ highlightHeader = input(false, { ...(ngDevMode ? { debugName: "highlightHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
198
+ rowModelType = input('clientSide', ...(ngDevMode ? [{ debugName: "rowModelType" }] : /* istanbul ignore next */ []));
199
+ autoHeight = input(this._config?.autoHeight ?? false, { ...(ngDevMode ? { debugName: "autoHeight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
200
+ stickyHeader = input(this._config?.stickyHeader ?? true, { ...(ngDevMode ? { debugName: "stickyHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
201
+ withPagination = input(this._config?.withPagination ?? false, { ...(ngDevMode ? { debugName: "withPagination" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
202
+ bodyScroll = input(false, { ...(ngDevMode ? { debugName: "bodyScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
203
+ pageSizeOptions = input(this._config?.pageSizeOptions ?? [5, 10, 20], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
204
+ showFirstLastButtons = input(this._config?.showFirstLastButtons ?? false, { ...(ngDevMode ? { debugName: "showFirstLastButtons" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
205
+ paginatorAriaLabel = input('', ...(ngDevMode ? [{ debugName: "paginatorAriaLabel" }] : /* istanbul ignore next */ []));
206
+ pageSize = model(this._config?.pageSize ?? 10, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
207
+ pageIndex = model(0, ...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
208
+ snapshot = input(null, ...(ngDevMode ? [{ debugName: "snapshot" }] : /* istanbul ignore next */ []));
209
+ withColumnSettings = input(false, { ...(ngDevMode ? { debugName: "withColumnSettings" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
210
+ embedded = input(this._config?.embedded ?? false, { ...(ngDevMode ? { debugName: "embedded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
211
+ rowSelection = input(this._config?.rowSelection ?? 'multiple', ...(ngDevMode ? [{ debugName: "rowSelection" }] : /* istanbul ignore next */ []));
212
+ selectionWidth = input(this._config?.selectionWidth ?? 52, { ...(ngDevMode ? { debugName: "selectionWidth" } : /* istanbul ignore next */ {}), transform: (v) => parseInt(v, 10) || this._config?.selectionWidth || 52 });
213
+ minColumnWidth = input(this._config?.minColumnWidth ?? 50, { ...(ngDevMode ? { debugName: "minColumnWidth" } : /* istanbul ignore next */ {}), transform: (v) => parseInt(v, 10) || this._config?.minColumnWidth || 40 });
214
+ _lastScrollTop = 0;
215
+ _lastScrollLeft = 0;
216
+ // Virtualization state
217
+ _scrollTop = signal(0, ...(ngDevMode ? [{ debugName: "_scrollTop" }] : /* istanbul ignore next */ []));
218
+ _viewportHeight = signal(0, ...(ngDevMode ? [{ debugName: "_viewportHeight" }] : /* istanbul ignore next */ []));
219
+ _viewportWidth = signal(0, ...(ngDevMode ? [{ debugName: "_viewportWidth" }] : /* istanbul ignore next */ []));
220
+ loaded = signal(false, ...(ngDevMode ? [{ debugName: "loaded" }] : /* istanbul ignore next */ []));
221
+ isBrowser = signal(false, ...(ngDevMode ? [{ debugName: "isBrowser" }] : /* istanbul ignore next */ []));
222
+ hoveredRowIndex = signal(null, ...(ngDevMode ? [{ debugName: "hoveredRowIndex" }] : /* istanbul ignore next */ []));
223
+ _initialViewState = signal([], ...(ngDevMode ? [{ debugName: "_initialViewState" }] : /* istanbul ignore next */ []));
224
+ // Resize and Pin state
225
+ _manualWidths = signal({}, ...(ngDevMode ? [{ debugName: "_manualWidths" }] : /* istanbul ignore next */ []));
226
+ _manualPinned = signal({}, ...(ngDevMode ? [{ debugName: "_manualPinned" }] : /* istanbul ignore next */ []));
227
+ _isResizing = signal(false, ...(ngDevMode ? [{ debugName: "_isResizing" }] : /* istanbul ignore next */ []));
228
+ _resizeLineLeft = signal(0, ...(ngDevMode ? [{ debugName: "_resizeLineLeft" }] : /* istanbul ignore next */ []));
229
+ _resizeStartX = 0;
230
+ _resizeStartWidth = 0;
231
+ _resizeColField = null;
232
+ isResizing() { return this._isResizing(); }
233
+ resizeLineLeft() { return this._resizeLineLeft(); }
234
+ _normalizeWidth(width) {
235
+ if (width === null || width === undefined || width === '')
236
+ return undefined;
237
+ const sWidth = String(width);
238
+ return /^\d+$/.test(sWidth) ? `${sWidth}px` : sWidth;
239
+ }
240
+ normalizedColumns = computed(() => {
241
+ const overrides = this._manualWidths();
242
+ const pinOverrides = this._manualPinned();
243
+ const order = this._manualOrder();
244
+ const visibility = this._manualVisibility();
245
+ const defs = this.columnDefs();
246
+ let orderedDefs = [...defs];
247
+ if (order) {
248
+ orderedDefs.sort((a, b) => {
249
+ const indexA = order.indexOf(a.field);
250
+ const indexB = order.indexOf(b.field);
251
+ if (indexA === -1 && indexB === -1)
252
+ return 0;
253
+ if (indexA === -1)
254
+ return 1;
255
+ if (indexB === -1)
256
+ return -1;
257
+ return indexA - indexB;
258
+ });
259
+ }
260
+ const defaultColDef = this.defaultColDef() || {};
261
+ return orderedDefs.map(col => {
262
+ const mergedCol = {
263
+ ...defaultColDef,
264
+ ...col
265
+ };
266
+ const overrideWidth = overrides[mergedCol.field];
267
+ const pinOverride = pinOverrides[mergedCol.field];
268
+ const visibleOverride = visibility[mergedCol.field];
269
+ const width = this._normalizeWidth(overrideWidth ?? mergedCol.width);
270
+ const flex = (overrideWidth ? undefined : mergedCol.flex) ?? (width ? undefined : 1);
271
+ const pinned = pinOverride ? pinOverride.pinned : mergedCol.pinned;
272
+ const pinAlign = pinOverride ? pinOverride.pinAlign : mergedCol.pinAlign;
273
+ return {
274
+ ...mergedCol,
275
+ visible: visibleOverride ?? mergedCol.visible ?? true,
276
+ width,
277
+ flex,
278
+ pinned,
279
+ pinAlign: pinned && !pinAlign ? 'start' : pinAlign
280
+ };
281
+ });
282
+ }, ...(ngDevMode ? [{ debugName: "normalizedColumns" }] : /* istanbul ignore next */ []));
283
+ isSortingEnabled = computed(() => {
284
+ return this.normalizedColumns().some(col => col.sortable);
285
+ }, ...(ngDevMode ? [{ debugName: "isSortingEnabled" }] : /* istanbul ignore next */ []));
286
+ pinnedLeftColumns = computed(() => this.normalizedColumns().filter(c => c.visible && c.pinned && c.pinAlign === 'start'), ...(ngDevMode ? [{ debugName: "pinnedLeftColumns" }] : /* istanbul ignore next */ []));
287
+ pinnedRightColumns = computed(() => this.normalizedColumns().filter(c => c.visible && c.pinned && c.pinAlign === 'end'), ...(ngDevMode ? [{ debugName: "pinnedRightColumns" }] : /* istanbul ignore next */ []));
288
+ centerColumns = computed(() => this.normalizedColumns().filter(c => c.visible && !c.pinned), ...(ngDevMode ? [{ debugName: "centerColumns" }] : /* istanbul ignore next */ []));
289
+ leftPinnedWidth = computed(() => {
290
+ let width = 0;
291
+ if (this.withSelection()) {
292
+ width += this.selectionWidth();
293
+ }
294
+ width += this.pinnedLeftColumns().reduce((acc, col) => acc + (col.width ? parseInt(col.width, 10) : (col.flex ? 150 : 0)), 0);
295
+ return width;
296
+ }, ...(ngDevMode ? [{ debugName: "leftPinnedWidth" }] : /* istanbul ignore next */ []));
297
+ leftPinnedWidthStyles = computed(() => {
298
+ return {
299
+ 'width.px': this.leftPinnedWidth(),
300
+ 'min-width.px': this.leftPinnedWidth()
301
+ };
302
+ }, ...(ngDevMode ? [{ debugName: "leftPinnedWidthStyles" }] : /* istanbul ignore next */ []));
303
+ rightPinnedWidth = computed(() => {
304
+ let width = 0;
305
+ width += this.pinnedRightColumns().reduce((acc, col) => acc + (col.width ? parseInt(col.width, 10) : (col.flex ? 150 : 0)), 0);
306
+ if (this.actionBarTemplateRef)
307
+ width += this.actionBarWidth();
308
+ return width;
309
+ }, ...(ngDevMode ? [{ debugName: "rightPinnedWidth" }] : /* istanbul ignore next */ []));
310
+ rightPinnedWidthStyles = computed(() => {
311
+ return {
312
+ 'width.px': this.rightPinnedWidth(),
313
+ 'min-width.px': this.rightPinnedWidth()
314
+ };
315
+ }, ...(ngDevMode ? [{ debugName: "rightPinnedWidthStyles" }] : /* istanbul ignore next */ []));
316
+ centerWidth = computed(() => {
317
+ const totalFixed = this.centerColumns().reduce((acc, col) => acc + (col.width ? parseInt(col.width, 10) : 0), 0);
318
+ const hasFlex = this.centerColumns().some(c => !!c.flex);
319
+ const availableWidth = this._viewportWidth();
320
+ if (hasFlex) {
321
+ const isBrowser = this.isBrowser();
322
+ // Ensure we have at least some width for flex columns, and handle initial zero viewportWidth
323
+ if (availableWidth === 0 && !isBrowser) {
324
+ // In SSR, we don't know the viewport width, but we want flex columns to expand.
325
+ // Returning totalFixed might cause the center to collapse if all columns are flex.
326
+ return '100%';
327
+ }
328
+ return Math.max(totalFixed, availableWidth, 300);
329
+ }
330
+ return Math.max(totalFixed, availableWidth);
331
+ }, ...(ngDevMode ? [{ debugName: "centerWidth" }] : /* istanbul ignore next */ []));
332
+ onColumnResizeStart(event, col) {
333
+ if (!this.isBrowser() || !col?.resizable || event.button !== 0 || this._isResizing())
334
+ return;
335
+ event.preventDefault();
336
+ event.stopPropagation();
337
+ // Determine initial width from DOM if not fixed yet
338
+ const target = event.currentTarget;
339
+ const cell = target.closest('.header-cell');
340
+ const startWidth = (col?.width ? parseInt(col.width, 10) : (cell ? cell.getBoundingClientRect().width : 0)) || 0;
341
+ // Before starting resize — freeze widths of all columns to the left within the same section
342
+ try {
343
+ const overrides = { ...this._manualWidths() };
344
+ const gridRoot = this._elRef.nativeElement.querySelector('.grid-root');
345
+ const leftCols = this.pinnedLeftColumns();
346
+ const centerCols = this.centerColumns();
347
+ const rightCols = this.pinnedRightColumns();
348
+ const byField = (arr) => arr.findIndex(c => c.field === col.field);
349
+ const leftIdx = byField(leftCols);
350
+ const centerIdx = byField(centerCols);
351
+ const rightIdx = byField(rightCols);
352
+ const freezeAll = (cols, containerSelector, extraOffset = 0) => {
353
+ const container = gridRoot?.querySelector(containerSelector);
354
+ if (!container)
355
+ return;
356
+ const cells = Array.from(container.querySelectorAll(':scope .header-cell'));
357
+ for (let i = 0; i < cols.length; i++) {
358
+ const colDef = cols[i];
359
+ if (!colDef)
360
+ continue;
361
+ if (!overrides[colDef.field]) {
362
+ const domIndex = i + extraOffset;
363
+ const cellEl = cells[domIndex];
364
+ const w = cellEl ? Math.round(cellEl.getBoundingClientRect().width) : (colDef.width ? parseInt(colDef.width, 10) : undefined);
365
+ if (w && w > 0) {
366
+ overrides[colDef.field] = `${w}px`;
367
+ }
368
+ }
369
+ }
370
+ };
371
+ const extraLeft = this.withSelection() ? 1 : 0;
372
+ freezeAll(leftCols, '.grid-header-left .header-inner', extraLeft);
373
+ freezeAll(centerCols, '.grid-header-center .header-inner');
374
+ freezeAll(rightCols, '.grid-header-right .header-inner');
375
+ this._manualWidths.set(overrides);
376
+ }
377
+ catch {
378
+ // best-effort freezing; ignore errors and continue
379
+ }
380
+ let nextCol = null;
381
+ let nextColStartWidth = 0;
382
+ try {
383
+ const leftCols = this.pinnedLeftColumns();
384
+ const centerCols = this.centerColumns();
385
+ const rightCols = this.pinnedRightColumns();
386
+ const byField = (arr) => arr.findIndex(c => c.field === col.field);
387
+ const leftIdx = byField(leftCols);
388
+ const centerIdx = byField(centerCols);
389
+ const rightIdx = byField(rightCols);
390
+ const findNextInfo = (cols, idx, containerSelector, extraOffset = 0) => {
391
+ if (idx < 0 || idx >= cols.length - 1)
392
+ return null;
393
+ const next = cols[idx + 1];
394
+ const gridRoot = this._elRef.nativeElement.querySelector('.grid-root');
395
+ const container = gridRoot?.querySelector(containerSelector);
396
+ const cells = container ? Array.from(container.querySelectorAll(':scope .header-cell')) : [];
397
+ const domIndex = idx + 1 + extraOffset;
398
+ const cellEl = cells[domIndex];
399
+ const width = cellEl ? Math.round(cellEl.getBoundingClientRect().width) : (next.width ? parseInt(next.width, 10) : 0);
400
+ return { col: next, width };
401
+ };
402
+ let nextInfo = null;
403
+ if (leftIdx >= 0) {
404
+ nextInfo = findNextInfo(leftCols, leftIdx, '.grid-header-left .header-inner', this.withSelection() ? 1 : 0);
405
+ }
406
+ else if (rightIdx >= 0) {
407
+ nextInfo = findNextInfo(rightCols, rightIdx, '.grid-header-right .header-inner');
408
+ }
409
+ if (nextInfo) {
410
+ nextCol = nextInfo.col;
411
+ nextColStartWidth = nextInfo.width;
412
+ }
413
+ }
414
+ catch { }
415
+ const gridRoot = this._elRef.nativeElement.querySelector('.grid-root');
416
+ const hostRect = gridRoot.getBoundingClientRect();
417
+ const handleRect = target.getBoundingClientRect();
418
+ const borderLeft = gridRoot.clientLeft || 0;
419
+ const initialManualWidths = { ...this._manualWidths() };
420
+ this._resizeStartX = event.clientX;
421
+ this._resizeStartWidth = startWidth;
422
+ this._resizeColField = col?.field ?? null;
423
+ this._resizeLineLeft.set(handleRect.right - hostRect.left - borderLeft);
424
+ this._isResizing.set(true);
425
+ const rightPinnedWidth = this.rightPinnedWidth();
426
+ const maxLineLeft = hostRect.width - borderLeft - rightPinnedWidth;
427
+ const leftPinnedWidth = this.leftPinnedWidth();
428
+ const minLineLeft = leftPinnedWidth;
429
+ let moved = false;
430
+ const colStartInHost = (handleRect.right - this._resizeStartWidth) - hostRect.left - borderLeft;
431
+ this._ngZone.runOutsideAngular(() => {
432
+ const mouseMove$ = fromEvent(this._doc, 'mousemove', { capture: true });
433
+ const mouseUp$ = fromEvent(this._doc, 'mouseup', { capture: true });
434
+ const blur$ = fromEvent(window, 'blur');
435
+ const dragStart$ = fromEvent(window, 'dragstart');
436
+ const selectStart$ = fromEvent(window, 'selectstart');
437
+ const stopResize$ = new Subject();
438
+ // Prevent native drag and selection
439
+ dragStart$.pipe(takeUntil(stopResize$)).subscribe(e => e.preventDefault());
440
+ selectStart$.pipe(takeUntil(stopResize$)).subscribe(e => e.preventDefault());
441
+ // Fix cursor for the whole document and block interactions
442
+ const originalCursor = this._doc.body.style.cursor;
443
+ this._doc.body.style.cursor = 'col-resize';
444
+ this._doc.body.style.userSelect = 'none';
445
+ const overlay = this._doc.createElement('div');
446
+ overlay.style.position = 'fixed';
447
+ overlay.style.top = '0';
448
+ overlay.style.left = '0';
449
+ overlay.style.width = '100%';
450
+ overlay.style.height = '100%';
451
+ overlay.style.zIndex = '9999';
452
+ overlay.style.cursor = 'col-resize';
453
+ this._doc.body.appendChild(overlay);
454
+ const endResize = () => {
455
+ stopResize$.next();
456
+ stopResize$.complete();
457
+ this._doc.body.style.cursor = originalCursor;
458
+ this._doc.body.style.userSelect = '';
459
+ if (overlay.parentNode) {
460
+ overlay.parentNode.removeChild(overlay);
461
+ }
462
+ if (moved) {
463
+ // More aggressive click suppression
464
+ const clickSub = fromEvent(this._doc, 'click', { capture: true })
465
+ .pipe(takeUntil(timer(50)), take(1))
466
+ .subscribe(clickEvent => {
467
+ clickEvent.stopImmediatePropagation();
468
+ clickEvent.preventDefault();
469
+ });
470
+ }
471
+ this._ngZone.run(() => {
472
+ this._isResizing.set(false);
473
+ if (!moved) {
474
+ this._manualWidths.set(initialManualWidths);
475
+ }
476
+ else {
477
+ // Restore flex for columns that were not manually resized but were frozen
478
+ const finalManualWidths = { ...this._manualWidths() };
479
+ const currentFields = new Set([this._resizeColField, nextCol?.field].filter(Boolean));
480
+ for (const field of Object.keys(finalManualWidths)) {
481
+ if (!currentFields.has(field) && !initialManualWidths[field]) {
482
+ delete finalManualWidths[field];
483
+ }
484
+ }
485
+ this._manualWidths.set(finalManualWidths);
486
+ }
487
+ this._resizeColField = null;
488
+ });
489
+ };
490
+ merge(mouseUp$, blur$).pipe(take(1)).subscribe(e => {
491
+ if (e instanceof MouseEvent) {
492
+ e.stopImmediatePropagation();
493
+ e.preventDefault();
494
+ }
495
+ endResize();
496
+ });
497
+ mouseMove$.pipe(takeUntil(stopResize$)).subscribe(e => {
498
+ if (!this._isResizing())
499
+ return;
500
+ const dx = e.clientX - this._resizeStartX;
501
+ if (Math.abs(dx) > 2)
502
+ moved = true;
503
+ const minWidthVal = col.minWidth !== undefined ? parseInt(col.minWidth, 10) : this.minColumnWidth();
504
+ const maxWidthVal = col.maxWidth !== undefined ? parseInt(col.maxWidth, 10) : Infinity;
505
+ let newWidth = Math.round(this._resizeStartWidth + dx);
506
+ newWidth = Math.max(minWidthVal, Math.min(maxWidthVal, newWidth));
507
+ const lineLeft = colStartInHost + newWidth;
508
+ const isCenterCol = !col.pinned;
509
+ const isLeftPinned = col.pinned && col.pinAlign !== 'end';
510
+ const isRightPinned = col.pinned && col.pinAlign === 'end';
511
+ if (isCenterCol) {
512
+ if (lineLeft > maxLineLeft) {
513
+ newWidth = maxLineLeft - colStartInHost;
514
+ }
515
+ else if (lineLeft < minLineLeft) {
516
+ newWidth = minLineLeft - colStartInHost;
517
+ }
518
+ }
519
+ else if (isLeftPinned) {
520
+ // Can't push beyond the start of right pinned columns (maxLineLeft)
521
+ // Also if we are pushing into the center columns, they will be pushed or next col in pinned will be squeezed.
522
+ if (lineLeft > maxLineLeft) {
523
+ newWidth = maxLineLeft - colStartInHost;
524
+ }
525
+ }
526
+ else if (isRightPinned) {
527
+ // For right pinned, colStartInHost is relative to grid-root left.
528
+ // The line shouldn't go to the left of leftPinnedWidth.
529
+ if (lineLeft < minLineLeft) {
530
+ newWidth = minLineLeft - colStartInHost;
531
+ }
532
+ // Also can't push beyond table right edge if there is an action bar
533
+ const hostWidth = hostRect.width - borderLeft;
534
+ if (lineLeft > hostWidth) {
535
+ newWidth = hostWidth - colStartInHost;
536
+ }
537
+ }
538
+ // Final check on newWidth after all constraints
539
+ newWidth = Math.max(minWidthVal, newWidth);
540
+ // If we are resizing a column that has a next column, we must ensure next column doesn't shrink below its minWidth
541
+ if (nextCol) {
542
+ const nextMinWidth = nextCol.minWidth !== undefined ? parseInt(nextCol.minWidth, 10) : this.minColumnWidth();
543
+ const maxPossibleWidth = (this._resizeStartWidth + nextColStartWidth) - nextMinWidth;
544
+ if (newWidth > maxPossibleWidth) {
545
+ newWidth = maxPossibleWidth;
546
+ }
547
+ }
548
+ // Ensure lineLeft doesn't go over bounds after nextCol check
549
+ const finalLineLeft = colStartInHost + newWidth;
550
+ if (isCenterCol || isLeftPinned) {
551
+ if (finalLineLeft > maxLineLeft) {
552
+ newWidth = maxLineLeft - colStartInHost;
553
+ }
554
+ }
555
+ if (isCenterCol || isRightPinned) {
556
+ if (finalLineLeft < minLineLeft) {
557
+ newWidth = minLineLeft - colStartInHost;
558
+ }
559
+ }
560
+ if (isRightPinned) {
561
+ const hostWidth = hostRect.width - borderLeft;
562
+ if (colStartInHost + newWidth > hostWidth) {
563
+ newWidth = hostWidth - colStartInHost;
564
+ }
565
+ }
566
+ this._ngZone.run(() => {
567
+ this._resizeLineLeft.set(colStartInHost + newWidth);
568
+ if (this._resizeColField) {
569
+ const map = { ...this._manualWidths() };
570
+ map[this._resizeColField] = `${newWidth}px`;
571
+ // If we have a next column, it gets squeezed until its minimum, then it just shifts
572
+ if (nextCol) {
573
+ const currentNextWidth = Math.max(0, // Already checked minWidth in newWidth calculation
574
+ nextColStartWidth - (newWidth - this._resizeStartWidth));
575
+ map[nextCol.field] = `${currentNextWidth}px`;
576
+ }
577
+ this._manualWidths.set(map);
578
+ // Force recalculation of centerWidth if it's based on fixed columns
579
+ // by triggering signal update if needed
580
+ }
581
+ });
582
+ });
583
+ });
584
+ }
585
+ effectiveDataLength = computed(() => {
586
+ // depend on data source render changes
587
+ this._dsRenderTick();
588
+ const dataSource = this.dataSource();
589
+ // Use filteredData because it contains all items that passed filtering
590
+ // and is what we should base pagination on.
591
+ const totalDataLength = (this.rowModelType() === 'serverSide' ? dataSource.data : dataSource.filteredData)?.length || 0;
592
+ const pSize = this.pageSize();
593
+ const pIndex = this.pageIndex();
594
+ if (this.rowModelType() === 'serverSide') {
595
+ return totalDataLength;
596
+ }
597
+ if (this.withPagination()) {
598
+ const start = pIndex * pSize;
599
+ const end = Math.min(start + pSize, totalDataLength);
600
+ return Math.max(0, end - start);
601
+ }
602
+ return totalDataLength;
603
+ }, ...(ngDevMode ? [{ debugName: "effectiveDataLength" }] : /* istanbul ignore next */ []));
604
+ effectivePaginatorLength = computed(() => {
605
+ this._dsRenderTick();
606
+ if (this.rowModelType() === 'serverSide') {
607
+ return this._serverSideRowCount() || 0;
608
+ }
609
+ // Since we now manage pagination ourselves and don't set dataSource.paginator,
610
+ // we should use the length of filtered data for the paginator.
611
+ const ds = this.dataSource();
612
+ return ds.filteredData?.length || 0;
613
+ }, ...(ngDevMode ? [{ debugName: "effectivePaginatorLength" }] : /* istanbul ignore next */ []));
614
+ totalHeight = computed(() => {
615
+ return this.effectiveDataLength() * this.rowHeight();
616
+ }, ...(ngDevMode ? [{ debugName: "totalHeight" }] : /* istanbul ignore next */ []));
617
+ visibleRange = computed(() => {
618
+ // We still use signals here for parts that should trigger re-computation
619
+ // like dataSource changes, but we access _scrollTop and _viewportHeight
620
+ // which are updated manually.
621
+ const top = this._scrollTop();
622
+ const height = this._viewportHeight();
623
+ const rowHeight = this.rowHeight();
624
+ const buffer = this.bufferRows();
625
+ const dataSource = this.dataSource();
626
+ const dataLength = this.effectiveDataLength();
627
+ let start = Math.floor(top / rowHeight) - buffer;
628
+ let end = Math.ceil((top + height) / rowHeight) + buffer;
629
+ start = Math.max(0, start);
630
+ end = Math.min(dataLength, end);
631
+ return { start, end };
632
+ }, ...(ngDevMode ? [{ debugName: "visibleRange" }] : /* istanbul ignore next */ []));
633
+ visibleRows = computed(() => {
634
+ // depend on data source render changes
635
+ this._dsRenderTick();
636
+ this.columnDefs(); // depend on columns
637
+ this.data(); // depend on data
638
+ this.loaded(); // depend on loaded state to ensure re-calculation after loading
639
+ const pIndex = this.pageIndex();
640
+ const pSize = this.pageSize();
641
+ const { start, end } = this.visibleRange();
642
+ const dataSource = this.dataSource();
643
+ let data;
644
+ if (this.rowModelType() === 'serverSide') {
645
+ data = dataSource.data;
646
+ }
647
+ else if (this.withPagination()) {
648
+ data = dataSource.sortedData.slice(pIndex * pSize, (pIndex + 1) * pSize);
649
+ }
650
+ else {
651
+ data = dataSource.sortedData;
652
+ }
653
+ // For serverSide, if we are loading but have some data already, we might want to keep it or show a loader.
654
+ // The current logic in noFilteredResults handles the switch between table and empty state.
655
+ // We only clear rows here if we are NOT in serverSide and loading, or if we want to force empty.
656
+ if (this.rowModelType() !== 'serverSide' && (this._isLoading() || this._isFiltering()) && data.length === 0) {
657
+ data = [];
658
+ }
659
+ return data.slice(start, end).map((item, index) => ({
660
+ item,
661
+ index: start + index,
662
+ top: (start + index) * this.rowHeight(),
663
+ isLast: (start + index) === data.length - 1
664
+ }));
665
+ }, ...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
666
+ displayedColumns = computed(() => {
667
+ const displayedColumns = this
668
+ .normalizedColumns()
669
+ .filter(colDef => colDef.visible)
670
+ .map(colDef => colDef.field);
671
+ if (this.withSelection()) {
672
+ displayedColumns.unshift('selection');
673
+ }
674
+ if (this.actionBarTemplateRef) {
675
+ displayedColumns.push('__actionBar');
676
+ }
677
+ return [...displayedColumns];
678
+ }, ...(ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []));
679
+ isSelectionSticky = computed(() => {
680
+ if (!this.withSelection()) {
681
+ return false;
682
+ }
683
+ return this.normalizedColumns().some(col => col.pinned && (col.pinAlign === 'start' || !col.pinAlign));
684
+ }, ...(ngDevMode ? [{ debugName: "isSelectionSticky" }] : /* istanbul ignore next */ []));
685
+ hasHorizontalScroll = computed(() => {
686
+ return this.centerWidth() > this._viewportWidth() + 1;
687
+ }, ...(ngDevMode ? [{ debugName: "hasHorizontalScroll" }] : /* istanbul ignore next */ []));
688
+ dataSource = computed(() => {
689
+ return this._dataSource;
690
+ }, ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
691
+ _syncEffect = effect(() => {
692
+ const data = this.data();
693
+ const search = this.search().trim().toLowerCase();
694
+ const rowModelType = this.rowModelType();
695
+ const refreshTriggerValue = this._refreshTrigger();
696
+ if (rowModelType === 'serverSide') {
697
+ return;
698
+ }
699
+ untracked(() => {
700
+ this._dataSource.data = data;
701
+ if (rowModelType === 'clientSide') {
702
+ this._dataSource.filter = search;
703
+ }
704
+ if (refreshTriggerValue > 0) {
705
+ this.refreshEnd.emit();
706
+ }
707
+ else {
708
+ this.loadEnd.emit();
709
+ }
710
+ });
711
+ }, ...(ngDevMode ? [{ debugName: "_syncEffect" }] : /* istanbul ignore next */ []));
712
+ _loadDataEffect = effect(() => {
713
+ const datasource = this.datasource();
714
+ if (!datasource || this.rowModelType() !== 'serverSide' || this._isDestroyed) {
715
+ return;
716
+ }
717
+ const pIndex = this.pageIndex();
718
+ const pSize = this.pageSize();
719
+ const search = this._debouncedSearch()?.trim() || '';
720
+ // Capture sort params outside untracked but avoid triggering when sort is null due to @if toggling
721
+ const sort = this._ngsSort();
722
+ const sortActive = sort?.active();
723
+ const sortDirection = sort?.direction();
724
+ const sortModel = sortActive ? [{ colId: sortActive, sort: sortDirection || '' }] : [];
725
+ const refreshTriggerValue = this._refreshTrigger();
726
+ // Build a stable request key to avoid refetch loops when the view toggles (e.g. empty state removes ngsSort)
727
+ const requestKey = `${pIndex}|${pSize}|${JSON.stringify(sortModel)}|${search}|${refreshTriggerValue}`;
728
+ if (this._lastRequestKey === requestKey) {
729
+ return; // no meaningful params change — skip triggering a new request
730
+ }
731
+ // Special case: if sort was active and now is undefined because component was removed from DOM,
732
+ // but we ARE loading or in a state where we expect it to come back, we might want to wait.
733
+ // However, the requestKey should handle it. If sortActive becomes undefined, requestKey changes.
734
+ const isFilterRequest = this._lastRequestKey !== null && this._lastRequestKey.split('|')[3] !== search;
735
+ const isSortRequest = this._lastRequestKey !== null && this._lastRequestKey.split('|')[2] !== JSON.stringify(sortModel);
736
+ this._lastRequestKey = requestKey;
737
+ untracked(() => {
738
+ const currentRequestId = ++this._requestId;
739
+ if (isFilterRequest) {
740
+ this._isFiltering.set(true);
741
+ }
742
+ if (isSortRequest) {
743
+ this._isSorting.set(true);
744
+ }
745
+ this._internalLoading.set(true);
746
+ const params = {
747
+ startRow: pIndex * pSize,
748
+ endRow: (pIndex + 1) * pSize,
749
+ page: pIndex,
750
+ pageSize: pSize,
751
+ sortModel,
752
+ filterModel: search,
753
+ successCallback: (rows, lastRow) => {
754
+ this._ngZone.run(() => {
755
+ if (this._isDestroyed || currentRequestId !== this._requestId)
756
+ return;
757
+ this._dataSource.data = rows;
758
+ if (lastRow !== undefined) {
759
+ this._serverSideRowCount.set(lastRow);
760
+ // Update _hasDataOnServer if we have any rows OR if we are doing a clean request (no filters)
761
+ if (lastRow > 0) {
762
+ this._hasDataOnServer.set(true);
763
+ }
764
+ else if (!search && !sortModel.length) {
765
+ this._hasDataOnServer.set(false);
766
+ }
767
+ }
768
+ else {
769
+ // If lastRow is not provided, we can only infer _hasDataOnServer if we actually got rows
770
+ if (rows.length > 0) {
771
+ this._hasDataOnServer.set(true);
772
+ }
773
+ else if (!search && !sortModel.length) {
774
+ this._hasDataOnServer.set(false);
775
+ }
776
+ }
777
+ this.loaded.set(true);
778
+ this._internalLoading.set(false);
779
+ this._isFiltering.set(false);
780
+ this._isSorting.set(false);
781
+ if (refreshTriggerValue > 0) {
782
+ this.refreshEnd.emit();
783
+ }
784
+ else {
785
+ this.loadEnd.emit();
786
+ }
787
+ this._cdr.markForCheck();
788
+ });
789
+ },
790
+ failCallback: () => {
791
+ this._ngZone.run(() => {
792
+ if (this._isDestroyed || currentRequestId !== this._requestId)
793
+ return;
794
+ this.loaded.set(true);
795
+ this._internalLoading.set(false);
796
+ this._isFiltering.set(false);
797
+ this._isSorting.set(false);
798
+ if (refreshTriggerValue > 0) {
799
+ this.refreshEnd.emit();
800
+ }
801
+ else {
802
+ this.loadEnd.emit();
803
+ }
804
+ this._cdr.markForCheck();
805
+ });
806
+ }
807
+ };
808
+ this._ngZone.runOutsideAngular(() => {
809
+ datasource.getItems(params);
810
+ });
811
+ });
812
+ }, ...(ngDevMode ? [{ debugName: "_loadDataEffect" }] : /* istanbul ignore next */ []));
813
+ _dsRenderTick = signal(0, ...(ngDevMode ? [{ debugName: "_dsRenderTick" }] : /* istanbul ignore next */ []));
814
+ _connectEffect = effect((onCleanup) => {
815
+ const ds = this.dataSource();
816
+ const sub = ds.connect().subscribe(() => {
817
+ // bump a signal to re-compute derived values depending on sortedData
818
+ this._dsRenderTick.update(v => v + 1);
819
+ untracked(() => this._cdr.markForCheck());
820
+ });
821
+ onCleanup(() => sub.unsubscribe());
822
+ }, ...(ngDevMode ? [{ debugName: "_connectEffect" }] : /* istanbul ignore next */ []));
823
+ cellRenderers = input([], ...(ngDevMode ? [{ debugName: "cellRenderers" }] : /* istanbul ignore next */ []));
824
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
825
+ hoverRows = input(false, { ...(ngDevMode ? { debugName: "hoverRows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
826
+ search = input('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
827
+ _debouncedSearch = signal('', ...(ngDevMode ? [{ debugName: "_debouncedSearch" }] : /* istanbul ignore next */ []));
828
+ _debounceSearchEffect = effect((onCleanup) => {
829
+ const search = this.search();
830
+ if (this.rowModelType() === 'clientSide') {
831
+ this._isFiltering.set(true);
832
+ }
833
+ const timeout = setTimeout(() => {
834
+ untracked(() => {
835
+ this._debouncedSearch.set(search);
836
+ if (this.rowModelType() === 'clientSide') {
837
+ this._isFiltering.set(false);
838
+ }
839
+ });
840
+ }, 300);
841
+ onCleanup(() => clearTimeout(timeout));
842
+ }, ...(ngDevMode ? [{ debugName: "_debounceSearchEffect" }] : /* istanbul ignore next */ []));
843
+ emptyIcon = input('fluent:document-search-24-regular', ...(ngDevMode ? [{ debugName: "emptyIcon" }] : /* istanbul ignore next */ []));
844
+ emptyText = input('There are no data to display', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
845
+ emptyFilterResultsIcon = input('fluent:search-info-24-regular', ...(ngDevMode ? [{ debugName: "emptyFilterResultsIcon" }] : /* istanbul ignore next */ []));
846
+ emptyFilterResultsText = input('No data matching the filter "{{ search }}"', ...(ngDevMode ? [{ debugName: "emptyFilterResultsText" }] : /* istanbul ignore next */ []));
847
+ interpolatedEmptyFilterResultsText = computed(() => {
848
+ return this.emptyFilterResultsText().replace('{{ search }}', this.search());
849
+ }, ...(ngDevMode ? [{ debugName: "interpolatedEmptyFilterResultsText" }] : /* istanbul ignore next */ []));
850
+ _isLoading = computed(() => (this.loading() || this._internalLoading() || this._isFiltering()), ...(ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []));
851
+ injector = inject(Injector);
852
+ selection = new SelectionModel(this.rowSelection() === 'multiple', []);
853
+ cellRenderersMap = new Map();
854
+ loadingCellRenderers = signal(false, ...(ngDevMode ? [{ debugName: "loadingCellRenderers" }] : /* istanbul ignore next */ []));
855
+ rowSelectionChanged = output();
856
+ selectionChanged = output();
857
+ allRowsSelectionChanged = output();
858
+ sortChange = output();
859
+ loadEnd = output();
860
+ refreshEnd = output();
861
+ get api() {
862
+ return {
863
+ search: (value) => {
864
+ this.dataSource().filter = value.trim().toLowerCase();
865
+ },
866
+ selectAll: () => {
867
+ this._selectAll();
868
+ },
869
+ unselectAll: () => {
870
+ this._unselectAll();
871
+ },
872
+ refresh: () => {
873
+ this.refresh();
874
+ },
875
+ getSnapshot: () => {
876
+ return this.getSnapshot();
877
+ }
878
+ };
879
+ }
880
+ refresh() {
881
+ this._lastRequestKey = null;
882
+ this._refreshTrigger.update(v => v + 1);
883
+ }
884
+ get noFilteredResults() {
885
+ const dataSource = this.dataSource();
886
+ const isClientSide = this.rowModelType() === 'clientSide';
887
+ const rawDataLength = isClientSide ? this.data().length : (dataSource.data?.length ?? 0);
888
+ const currentlyEmpty = rawDataLength === 0;
889
+ // During client-side filtering, immediately show empty state if filtered data is empty,
890
+ // to avoid a short flash of an empty table before debounce takes effect.
891
+ if (isClientSide && (this._isFiltering() || this.hasFilterValue)) {
892
+ const filteredEmpty = (dataSource.filteredData?.length ?? 0) === 0;
893
+ if (filteredEmpty) {
894
+ return true;
895
+ }
896
+ }
897
+ if (this._isLoading() || this.loadingCellRenderers()) {
898
+ // For serverSide, while loading the first time (when we don't know yet if we have data),
899
+ // we show the table (potentially for skeletons) instead of empty state.
900
+ if (this.rowModelType() === 'serverSide' && this._hasDataOnServer() === undefined) {
901
+ return false;
902
+ }
903
+ // If we are already in an empty state (data is empty and no previous data was confirmed on server),
904
+ // keep showing it during loading/filtering to avoid flashing the table headers/structure.
905
+ if (currentlyEmpty && !this.isBrowser()) {
906
+ return true;
907
+ }
908
+ return false;
909
+ }
910
+ if (this.rowModelType() === 'serverSide' && this._hasDataOnServer() === undefined) {
911
+ return false;
912
+ }
913
+ return this.isNoData || this.isNoResults;
914
+ }
915
+ get isNoResults() {
916
+ const dataSource = this.dataSource();
917
+ const isClientSide = this.rowModelType() === 'clientSide';
918
+ const rawDataLength = isClientSide ? this.data().length : (dataSource.data?.length ?? 0);
919
+ const dataLength = dataSource.data?.length ?? 0;
920
+ const filteredDataLength = dataSource.filteredData?.length ?? 0;
921
+ if (isClientSide) {
922
+ return filteredDataLength === 0 && (this.hasFilterValue || this._isSorting());
923
+ }
924
+ if (this.rowModelType() === 'serverSide') {
925
+ const loadingTransition = this._isLoading() && this._hasDataOnServer() === true;
926
+ // If we have 0 data, but loading is in progress (and we don't know if there will be data), we show skeletons, so isNoResults should be false
927
+ if (this._isLoading() && this._hasDataOnServer() === undefined) {
928
+ return false;
929
+ }
930
+ return dataLength === 0 && (this.hasFilterValue || this._isSorting() || loadingTransition) && this._hasDataOnServer() !== false;
931
+ }
932
+ return false;
933
+ }
934
+ get isNoData() {
935
+ const dataSource = this.dataSource();
936
+ const isClientSide = this.rowModelType() === 'clientSide';
937
+ const rawDataLength = isClientSide ? this.data().length : (dataSource.data?.length ?? 0);
938
+ const dataLength = dataSource.data?.length ?? 0;
939
+ if (isClientSide) {
940
+ return rawDataLength === 0 && !this.hasFilterValue && !this._isSorting();
941
+ }
942
+ if (this.rowModelType() === 'serverSide') {
943
+ if (this._isLoading() && this._hasDataOnServer() === undefined) {
944
+ return false;
945
+ }
946
+ return dataLength === 0 && !this.hasFilterValue && !this._isSorting() && this._hasDataOnServer() === false;
947
+ }
948
+ return false;
949
+ }
950
+ get actionBarTemplateRef() {
951
+ return this._actionBarRef()?.templateRef;
952
+ }
953
+ actionBarWidth = computed(() => {
954
+ return this._actionBarComp()?.width() ?? this._actionBarRef()?.width() ?? 100;
955
+ }, ...(ngDevMode ? [{ debugName: "actionBarWidth" }] : /* istanbul ignore next */ []));
956
+ get emptyTemplateRef() {
957
+ return this._emptyDataRef()?.templateRef;
958
+ }
959
+ get emptyFilterResultsTemplateRef() {
960
+ return this._emptyFilterResults()?.templateRef;
961
+ }
962
+ get hasFilterValue() {
963
+ return !!this.search().trim();
964
+ }
965
+ getNestedValue(item, path) {
966
+ if (!item || !path) {
967
+ return null;
968
+ }
969
+ if (!path.includes('.')) {
970
+ return item[path];
971
+ }
972
+ return path.split('.').reduce((obj, key) => obj?.[key], item);
973
+ }
974
+ constructor() {
975
+ effect(() => {
976
+ const mode = this.rowSelection();
977
+ untracked(() => {
978
+ const currentSelection = this.selection.selected;
979
+ this.selection = new SelectionModel(mode === 'multiple', currentSelection);
980
+ });
981
+ });
982
+ this._destroyRef.onDestroy(() => {
983
+ this._isDestroyed = true;
984
+ });
985
+ // Reactively bind scroll-sync and ResizeObserver to the current ScrollbarArea,
986
+ // to work correctly with conditional rendering (empty state / table)
987
+ effect((onCleanup) => {
988
+ const scrollbarArea = this._scrollbarArea();
989
+ const isBrowser = this.isBrowser();
990
+ if (!scrollbarArea || !isBrowser || this._isDestroyed) {
991
+ return;
992
+ }
993
+ const centerEl = scrollbarArea.scrollableContentRef().nativeElement;
994
+ // Set initial viewport dimensions to avoid 0 width after returning from empty state
995
+ const rect = centerEl.getBoundingClientRect();
996
+ this._viewportHeight.set(rect.height);
997
+ this._viewportWidth.set(rect.width);
998
+ // Attach scroll-sync
999
+ const scrollHandler = () => {
1000
+ if (this._isDestroyed)
1001
+ return;
1002
+ this._syncScrolls(centerEl);
1003
+ };
1004
+ this._ngZone.runOutsideAngular(() => {
1005
+ centerEl.addEventListener('scroll', scrollHandler, { passive: true });
1006
+ });
1007
+ // Bind ResizeObserver with safe layout
1008
+ const observer = new ResizeObserver((entries) => {
1009
+ this._ngZone.runOutsideAngular(() => {
1010
+ requestAnimationFrame(() => {
1011
+ if (this._isDestroyed)
1012
+ return;
1013
+ this._ngZone.run(() => {
1014
+ try {
1015
+ for (const entry of entries) {
1016
+ const { height, width } = entry.contentRect;
1017
+ // Use 1px threshold to prevent infinite loops due to subpixels
1018
+ if (Math.abs(this._viewportHeight() - height) > 1) {
1019
+ this._viewportHeight.set(height);
1020
+ }
1021
+ if (Math.abs(this._viewportWidth() - width) > 1) {
1022
+ this._viewportWidth.set(width);
1023
+ }
1024
+ }
1025
+ }
1026
+ catch {
1027
+ // ignore, dimensions will be delivered on the next tick
1028
+ }
1029
+ });
1030
+ });
1031
+ });
1032
+ });
1033
+ observer.observe(centerEl);
1034
+ // Synchronize transforms immediately after rebinding
1035
+ this._lastScrollTop = centerEl.scrollTop;
1036
+ this._lastScrollLeft = centerEl.scrollLeft;
1037
+ this._syncTransforms();
1038
+ onCleanup(() => {
1039
+ try {
1040
+ centerEl.removeEventListener('scroll', scrollHandler);
1041
+ }
1042
+ catch { }
1043
+ try {
1044
+ observer.disconnect();
1045
+ }
1046
+ catch { }
1047
+ });
1048
+ });
1049
+ effect(() => {
1050
+ const sort = this._ngsSort();
1051
+ const dataSource = this.dataSource();
1052
+ if (sort && dataSource && !this._isDestroyed && this.rowModelType() !== 'serverSide') {
1053
+ dataSource.sort = sort;
1054
+ dataSource._updateChangeSubscription();
1055
+ }
1056
+ });
1057
+ effect(() => {
1058
+ const active = this.paginator() ?? this._internalPaginator();
1059
+ const dataSource = this.dataSource();
1060
+ if (dataSource && !this._isDestroyed) {
1061
+ if (this.withPagination() && this.rowModelType() !== 'serverSide' && active && this.isBrowser()) {
1062
+ // We handle pagination manually in visibleRows to have better control over virtualization.
1063
+ // If we assign it to dataSource.paginator, TableDataSource would also start paging data,
1064
+ // which would cause issues when we also slice data in visibleRows (double paging).
1065
+ dataSource.paginator = null;
1066
+ }
1067
+ else {
1068
+ dataSource.paginator = null;
1069
+ }
1070
+ }
1071
+ });
1072
+ // Sync external paginator page events with internal page state when provided
1073
+ effect((onCleanup) => {
1074
+ const ext = this.paginator();
1075
+ if (ext) {
1076
+ const sub = ext.page.subscribe(event => this.onPageChange(event));
1077
+ onCleanup(() => sub.unsubscribe());
1078
+ }
1079
+ });
1080
+ effect(() => {
1081
+ this.dataSource().sortingDataAccessor = (item, property) => {
1082
+ const columnDef = this.columnDefs().find(colDef => colDef.field === property);
1083
+ if (columnDef) {
1084
+ if (columnDef.valueGetter) {
1085
+ return columnDef.valueGetter(this.getNestedValue(item, property));
1086
+ }
1087
+ }
1088
+ switch (property) {
1089
+ default: {
1090
+ return this.getNestedValue(item, property);
1091
+ }
1092
+ }
1093
+ };
1094
+ });
1095
+ effect(() => {
1096
+ // Force table to re-render when column definitions change
1097
+ // to avoid "Could not find column" errors when using signals
1098
+ this.columnDefs();
1099
+ this.displayedColumns();
1100
+ untracked(() => {
1101
+ this.table?.renderRows();
1102
+ // CdkTable uses _cacheColumnDefs internally, but it's private.
1103
+ // renderRows should trigger it if definitions changed.
1104
+ });
1105
+ });
1106
+ effect(() => {
1107
+ this.hoveredRowIndex();
1108
+ this._syncHoverState();
1109
+ });
1110
+ }
1111
+ ngOnDestroy() {
1112
+ this._isDestroyed = true;
1113
+ }
1114
+ ngOnInit() {
1115
+ this._initialViewState.set(this.columnDefs().map(col => ({
1116
+ field: col.field,
1117
+ visible: col.visible ?? true,
1118
+ width: col.width,
1119
+ pinned: col.pinned,
1120
+ pinAlign: col.pinAlign
1121
+ })));
1122
+ const snapshot = this.snapshot();
1123
+ if (snapshot) {
1124
+ this.applyState(snapshot);
1125
+ }
1126
+ if (this.rowModelType() !== 'serverSide') {
1127
+ this.loaded.set(true);
1128
+ }
1129
+ if (this.rowModelType() === 'serverSide' && this._dataSource.data.length === 0) {
1130
+ this._internalLoading.set(true);
1131
+ }
1132
+ if (this.cellRenderers().length === 0) {
1133
+ return;
1134
+ }
1135
+ this.loadingCellRenderers.set(true);
1136
+ const components = this.cellRenderers().map(cellRenderer => cellRenderer.component());
1137
+ Promise.all(components).then(components => {
1138
+ components.forEach((component, index) => {
1139
+ this.cellRenderersMap.set(this.cellRenderers()[index].cellRenderer, component);
1140
+ });
1141
+ this.loadingCellRenderers.set(false);
1142
+ this._cdr.detectChanges();
1143
+ }).catch(() => {
1144
+ this.loadingCellRenderers.set(false);
1145
+ this._cdr.detectChanges();
1146
+ });
1147
+ }
1148
+ ngAfterViewInit() {
1149
+ this.isBrowser.set(isPlatformBrowser(this._platformId));
1150
+ this._cdr.detectChanges();
1151
+ }
1152
+ _syncScrolls(source) {
1153
+ const scrollTop = source.scrollTop;
1154
+ const scrollLeft = source.scrollLeft;
1155
+ this._lastScrollTop = scrollTop;
1156
+ this._lastScrollLeft = scrollLeft;
1157
+ if (this._isDestroyed)
1158
+ return;
1159
+ this._syncTransforms();
1160
+ this._ngZone.run(() => {
1161
+ this._scheduleVirtualUpdate(scrollTop);
1162
+ });
1163
+ }
1164
+ _scheduleVirtualUpdate(scrollTop) {
1165
+ const delta = Math.abs(this._scrollTop() - scrollTop);
1166
+ const threshold = this.rowHeight() * (this.bufferRows() / 2);
1167
+ if (delta >= threshold || scrollTop === 0 || scrollTop + this._viewportHeight() >= this.totalHeight()) {
1168
+ this._scrollTop.set(scrollTop);
1169
+ this._syncTransforms();
1170
+ }
1171
+ }
1172
+ _syncTransforms() {
1173
+ const scrollTop = this._lastScrollTop;
1174
+ const scrollLeft = this._lastScrollLeft;
1175
+ const headerCenterInner = this._headerCenterInner()?.nativeElement;
1176
+ if (headerCenterInner) {
1177
+ headerCenterInner.style.transform = `translate3d(${-scrollLeft}px, 0, 0)`;
1178
+ }
1179
+ const bodyLeftContent = this._bodyLeftContent()?.nativeElement;
1180
+ const bodyRightContent = this._bodyRightContent()?.nativeElement;
1181
+ const bodyCenterContent = this._bodyCenterContent()?.nativeElement;
1182
+ if (bodyLeftContent) {
1183
+ bodyLeftContent.style.transform = `translate3d(0, ${-scrollTop}px, 0)`;
1184
+ }
1185
+ if (bodyRightContent) {
1186
+ bodyRightContent.style.transform = `translate3d(0, ${-scrollTop}px, 0)`;
1187
+ }
1188
+ if (bodyCenterContent) {
1189
+ bodyCenterContent.style.transform = `translate3d(${-scrollLeft}px, ${-scrollTop}px, 0)`;
1190
+ }
1191
+ // Sync hovered row if needed
1192
+ this._syncHoverState();
1193
+ }
1194
+ _syncHoverState() {
1195
+ // if (!isPlatformBrowser(this._platformId)) return;
1196
+ //
1197
+ // this._ngZone.runOutsideAngular(() => {
1198
+ // const rows = Array.from(document.querySelectorAll('.ngs-data-view .grid-row'));
1199
+ // const hoveredIndex = this.hoveredRowIndex();
1200
+ // rows.forEach(row => {
1201
+ // const indexAttr = row.getAttribute('data-row-index');
1202
+ // if (indexAttr !== null) {
1203
+ // const index = parseInt(indexAttr, 10);
1204
+ // if (index === hoveredIndex) {
1205
+ // row.classList.add('is-hovered');
1206
+ // } else {
1207
+ // row.classList.remove('is-hovered');
1208
+ // }
1209
+ // }
1210
+ // });
1211
+ // });
1212
+ }
1213
+ get table() {
1214
+ return this._table();
1215
+ }
1216
+ get ngsSort() {
1217
+ return this._ngsSort();
1218
+ }
1219
+ hasCellRenderer(cellRenderer) {
1220
+ return this.cellRenderersMap.has(cellRenderer);
1221
+ }
1222
+ getCellRenderer(cellRenderer) {
1223
+ return this.cellRenderersMap.get(cellRenderer);
1224
+ }
1225
+ isAllSelected() {
1226
+ const data = this.rowModelType() === 'serverSide' ? this.dataSource().data : this.data();
1227
+ return this.selection.selected.length === data.length;
1228
+ }
1229
+ toggleAllRows() {
1230
+ if (this.isAllSelected()) {
1231
+ this._unselectAll();
1232
+ }
1233
+ else {
1234
+ this._selectAll();
1235
+ }
1236
+ }
1237
+ rowSelectionToggle(event, row) {
1238
+ if (event.checked) {
1239
+ this.selection.select(row);
1240
+ }
1241
+ else {
1242
+ this.selection.deselect(row);
1243
+ }
1244
+ this.rowSelectionChanged.emit({
1245
+ checkboxChange: event,
1246
+ row,
1247
+ checked: event.checked
1248
+ });
1249
+ this.selectionChanged.emit(this.selection.selected);
1250
+ }
1251
+ onPageChange(event) {
1252
+ this.pageIndex.set(event.pageIndex);
1253
+ this.pageSize.set(event.pageSize);
1254
+ }
1255
+ sortColumn(col, direction) {
1256
+ const sort = this.ngsSort;
1257
+ if (sort) {
1258
+ sort.active.set(col.field);
1259
+ sort.direction.set(direction);
1260
+ sort.sortChange.emit({ active: col.field, direction });
1261
+ }
1262
+ this.onSortChange({ active: col.field, direction });
1263
+ }
1264
+ getSnapshot() {
1265
+ return this.normalizedColumns().map(col => ({
1266
+ field: col.field,
1267
+ visible: col.visible ?? true,
1268
+ width: col.width,
1269
+ pinned: col.pinned,
1270
+ pinAlign: col.pinAlign
1271
+ }));
1272
+ }
1273
+ applyState(state) {
1274
+ if (!state || state.length === 0)
1275
+ return;
1276
+ const pinOverrides = { ...this._manualPinned() };
1277
+ const widthOverrides = { ...this._manualWidths() };
1278
+ this.columnDefs().forEach(col => {
1279
+ const colState = state.find(s => s.field === col.field);
1280
+ if (colState) {
1281
+ if (colState.width !== undefined) {
1282
+ widthOverrides[col.field] = colState.width;
1283
+ }
1284
+ pinOverrides[col.field] = {
1285
+ pinned: !!colState.pinned,
1286
+ pinAlign: colState.pinAlign
1287
+ };
1288
+ }
1289
+ });
1290
+ this._manualPinned.set(pinOverrides);
1291
+ this._manualWidths.set(widthOverrides);
1292
+ this._cdr.markForCheck();
1293
+ }
1294
+ pinColumn(col, align) {
1295
+ const pinOverrides = { ...this._manualPinned() };
1296
+ if (align === null) {
1297
+ pinOverrides[col.field] = { pinned: false, pinAlign: undefined };
1298
+ }
1299
+ else {
1300
+ pinOverrides[col.field] = { pinned: true, pinAlign: align };
1301
+ }
1302
+ this._manualPinned.set(pinOverrides);
1303
+ this._cdr.markForCheck();
1304
+ }
1305
+ autosizeColumn(col) {
1306
+ const width = this._calculateColumnAutosize(col);
1307
+ if (width > 0) {
1308
+ const widths = { ...this._manualWidths() };
1309
+ widths[col.field] = `${width}px`;
1310
+ this._manualWidths.set(widths);
1311
+ this._cdr.markForCheck();
1312
+ }
1313
+ }
1314
+ autosizeAllColumns() {
1315
+ const widths = { ...this._manualWidths() };
1316
+ let changed = false;
1317
+ this.normalizedColumns().forEach(col => {
1318
+ if (col.visible) {
1319
+ const width = this._calculateColumnAutosize(col);
1320
+ if (width > 0) {
1321
+ widths[col.field] = `${width}px`;
1322
+ changed = true;
1323
+ }
1324
+ }
1325
+ });
1326
+ if (changed) {
1327
+ this._manualWidths.set(widths);
1328
+ this._cdr.markForCheck();
1329
+ }
1330
+ }
1331
+ _calculateColumnAutosize(col) {
1332
+ if (!isPlatformBrowser(this._platformId))
1333
+ return 0;
1334
+ const gridRoot = this._elRef.nativeElement;
1335
+ const headerCells = Array.from(gridRoot.querySelectorAll(`.header-cell`));
1336
+ const targetHeaderCell = headerCells.find(cell => {
1337
+ const sortHeader = cell.querySelector('[ngs-sort-header]');
1338
+ return sortHeader?.getAttribute('ngs-sort-header') === col.field;
1339
+ });
1340
+ if (!targetHeaderCell)
1341
+ return 0;
1342
+ const headerContent = targetHeaderCell.querySelector('.grow');
1343
+ const headerWidth = (headerContent?.scrollWidth ?? 0)
1344
+ + 32 // padding-left/right
1345
+ + 32; // extra space for sort icon and menu button
1346
+ let maxContentWidth = headerWidth;
1347
+ const visibleCols = this.normalizedColumns().filter(c => c.visible);
1348
+ const colIndex = visibleCols.indexOf(visibleCols.find(c => c.field === col.field));
1349
+ if (colIndex !== -1) {
1350
+ const rows = Array.from(gridRoot.querySelectorAll('.grid-row'));
1351
+ const rowsToMeasure = rows.slice(0, 50);
1352
+ rowsToMeasure.forEach(row => {
1353
+ const cells = Array.from(row.querySelectorAll('.cell'));
1354
+ const cell = cells[colIndex];
1355
+ if (cell) {
1356
+ const content = cell.firstElementChild;
1357
+ if (content) {
1358
+ const width = content.scrollWidth + 32; // + padding
1359
+ if (width > maxContentWidth) {
1360
+ maxContentWidth = width;
1361
+ }
1362
+ }
1363
+ }
1364
+ });
1365
+ }
1366
+ return Math.min(Math.max(maxContentWidth, 60), 500);
1367
+ }
1368
+ resetColumns() {
1369
+ const initialState = this._initialViewState();
1370
+ if (initialState.length > 0) {
1371
+ this.applyState(initialState);
1372
+ }
1373
+ this._manualWidths.set({});
1374
+ this._manualPinned.set({});
1375
+ this._manualOrder.set(null);
1376
+ this._manualVisibility.set({});
1377
+ this._cdr.markForCheck();
1378
+ }
1379
+ openColumnSettingsDialog() {
1380
+ const dialogRef = this._dialog.open(DataViewColumnSettingsDialog, {
1381
+ minWidth: '400px',
1382
+ data: {
1383
+ columns: this.normalizedColumns(),
1384
+ },
1385
+ });
1386
+ dialogRef.afterClosed().subscribe((result) => {
1387
+ if (result) {
1388
+ const newOrder = result.columns.map((c) => c.field);
1389
+ const newVisibility = { ...this._manualVisibility() };
1390
+ const newPinned = { ...this._manualPinned() };
1391
+ result.columns.forEach((c) => {
1392
+ newVisibility[c.field] = c.visible !== false;
1393
+ newPinned[c.field] = { pinned: !!c.pinned, pinAlign: c.pinAlign };
1394
+ });
1395
+ // Add back missing columns that were filtered out in dialog
1396
+ const currentOrder = this._manualOrder() || this.columnDefs().map(c => c.field);
1397
+ const resultFields = new Set(newOrder);
1398
+ const fullOrder = [...newOrder];
1399
+ currentOrder.forEach(field => {
1400
+ if (!resultFields.has(field)) {
1401
+ // Find where it should be inserted to keep relative order if possible,
1402
+ // but just appending is also a common strategy for "static" columns.
1403
+ // Let's try to maintain the original relative order.
1404
+ fullOrder.push(field);
1405
+ }
1406
+ });
1407
+ this._manualOrder.set(fullOrder);
1408
+ this._manualVisibility.set(newVisibility);
1409
+ this._manualPinned.set(newPinned);
1410
+ this._cdr.markForCheck();
1411
+ }
1412
+ });
1413
+ }
1414
+ onSortChange(event) {
1415
+ if (this.rowModelType() !== 'serverSide') {
1416
+ this.dataSource().sort = this.ngsSort || null;
1417
+ }
1418
+ this.sortChange.emit(event);
1419
+ }
1420
+ _selectAll() {
1421
+ const data = this.rowModelType() === 'serverSide' ? this.dataSource().data : this.data();
1422
+ this.selection.select(...data);
1423
+ this.selectionChanged.emit(data);
1424
+ this.allRowsSelectionChanged.emit(true);
1425
+ }
1426
+ _unselectAll() {
1427
+ this.selection.clear();
1428
+ this.selectionChanged.emit([]);
1429
+ this.allRowsSelectionChanged.emit(false);
1430
+ }
1431
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataView, deps: [], target: i0.ɵɵFactoryTarget.Component });
1432
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DataView, isStandalone: true, selector: "ngs-data-view", inputs: { paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: false, transformFunction: null }, defaultColDef: { classPropertyName: "defaultColDef", publicName: "defaultColDef", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, datasource: { classPropertyName: "datasource", publicName: "datasource", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, headerHeight: { classPropertyName: "headerHeight", publicName: "headerHeight", isSignal: true, isRequired: false, transformFunction: null }, bufferRows: { classPropertyName: "bufferRows", publicName: "bufferRows", isSignal: true, isRequired: false, transformFunction: null }, withSelection: { classPropertyName: "withSelection", publicName: "withSelection", isSignal: true, isRequired: false, transformFunction: null }, highlightHeader: { classPropertyName: "highlightHeader", publicName: "highlightHeader", isSignal: true, isRequired: false, transformFunction: null }, rowModelType: { classPropertyName: "rowModelType", publicName: "rowModelType", isSignal: true, isRequired: false, transformFunction: null }, autoHeight: { classPropertyName: "autoHeight", publicName: "autoHeight", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, withPagination: { classPropertyName: "withPagination", publicName: "withPagination", isSignal: true, isRequired: false, transformFunction: null }, bodyScroll: { classPropertyName: "bodyScroll", publicName: "bodyScroll", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastButtons: { classPropertyName: "showFirstLastButtons", publicName: "showFirstLastButtons", isSignal: true, isRequired: false, transformFunction: null }, paginatorAriaLabel: { classPropertyName: "paginatorAriaLabel", publicName: "paginatorAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, snapshot: { classPropertyName: "snapshot", publicName: "snapshot", isSignal: true, isRequired: false, transformFunction: null }, withColumnSettings: { classPropertyName: "withColumnSettings", publicName: "withColumnSettings", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, selectionWidth: { classPropertyName: "selectionWidth", publicName: "selectionWidth", isSignal: true, isRequired: false, transformFunction: null }, minColumnWidth: { classPropertyName: "minColumnWidth", publicName: "minColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, cellRenderers: { classPropertyName: "cellRenderers", publicName: "cellRenderers", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, hoverRows: { classPropertyName: "hoverRows", publicName: "hoverRows", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterResultsIcon: { classPropertyName: "emptyFilterResultsIcon", publicName: "emptyFilterResultsIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterResultsText: { classPropertyName: "emptyFilterResultsText", publicName: "emptyFilterResultsText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", pageIndex: "pageIndexChange", rowSelectionChanged: "rowSelectionChanged", selectionChanged: "selectionChanged", allRowsSelectionChanged: "allRowsSelectionChanged", sortChange: "sortChange", loadEnd: "loadEnd", refreshEnd: "refreshEnd" }, host: { properties: { "class.highlight-header": "highlightHeader()", "class.pinned-header": "stickyHeader()", "class.hover-rows": "hoverRows()", "class.is-loading": "_isLoading()", "class.embedded": "embedded()", "class.has-horizontal-scroll": "hasHorizontalScroll()", "class.is-browser": "isBrowser()", "style.--ngs-data-view-header-height.px": "headerHeight()", "style.--ngs-data-view-selection-column-width.px": "selectionWidth()", "class.is-auto-height": "autoHeight()" }, classAttribute: "ngs-data-view" }, providers: [
1433
+ {
1434
+ provide: DATA_VIEW,
1435
+ useExisting: forwardRef(() => DataView),
1436
+ },
1437
+ ], queries: [{ propertyName: "_emptyDataRef", first: true, predicate: DataViewEmptyDataDirective, descendants: true, isSignal: true }, { propertyName: "_emptyFilterResults", first: true, predicate: DataViewEmptyFilterResultsDirective, descendants: true, isSignal: true }, { propertyName: "_actionBarRef", first: true, predicate: DataViewActionBarDirective, descendants: true, isSignal: true }, { propertyName: "_actionBarComp", first: true, predicate: DataViewActionBarDirective, descendants: true, read: DataViewActionBar, isSignal: true }], viewQueries: [{ propertyName: "_table", first: true, predicate: ["table"], descendants: true, isSignal: true }, { propertyName: "_ngsSort", first: true, predicate: SortDirective, descendants: true, isSignal: true }, { propertyName: "_internalPaginator", first: true, predicate: Paginator, descendants: true, isSignal: true }, { propertyName: "_headerCenter", first: true, predicate: ["headerCenter"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_headerCenterInner", first: true, predicate: ["headerCenterInner"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_bodyLeftContent", first: true, predicate: ["bodyLeftContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_scrollbarArea", first: true, predicate: ScrollbarArea, descendants: true, isSignal: true }, { propertyName: "_bodyCenterContent", first: true, predicate: ["bodyCenterContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_bodyRightContent", first: true, predicate: ["bodyRightContent"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["ngsDataView"], ngImport: i0, template: "<div class=\"flex flex-col h-full overflow-hidden relative\"\n ngsBlockLoaderContainer>\n <ngs-block-loader [loading]=\"_isLoading()\"/>\n @if (loaded()) {\n @if (!noFilteredResults) {\n <div class=\"grid-root flex flex-col grow overflow-hidden relative\">\n @if (isResizing()) {\n <div class=\"ngs-data-view-resize-line\" [style.left.px]=\"resizeLineLeft()\"></div>\n }\n\n <!-- GRID HEADER -->\n <div class=\"grid-header pinned top-0 z-20 flex overflow-hidden shrink-0 font-medium\"\n ngsSort\n [style.height.px]=\"headerHeight()\"\n [ngsSortDisabled]=\"!isSortingEnabled() || _isLoading() || _isFiltering()\"\n (ngsSortChange)=\"onSortChange($event)\">\n @if (pinnedLeftColumns().length > 0 || withSelection()) {\n <div class=\"grid-header-left shrink-0 flex z-30\"\n [ngStyle]=\"leftPinnedWidthStyles()\">\n <div class=\"header-inner flex\" [style.width.px]=\"leftPinnedWidth()\">\n @if (withSelection()) {\n <div class=\"header-cell cell-selection flex items-center justify-center shrink-0\">\n @if (rowSelection() === 'multiple') {\n <ngs-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\" />\n }\n </div>\n }\n @for (col of pinnedLeftColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <div #headerCenter class=\"grid-header-center grow flex overflow-hidden\">\n <div #headerCenterInner class=\"flex header-inner\" [style.width.px]=\"centerWidth()\">\n @for (col of centerColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n </div>\n </div>\n\n @if (pinnedRightColumns().length > 0 || actionBarTemplateRef) {\n <div class=\"grid-header-right shrink-0 flex z-30\"\n [ngStyle]=\"rightPinnedWidthStyles()\">\n <div class=\"header-inner flex\" [style.width.px]=\"rightPinnedWidth()\">\n @for (col of pinnedRightColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n @if (actionBarTemplateRef) {\n <div class=\"header-cell flex items-center shrink-0\"\n [style.width.px]=\"actionBarWidth()\"\n [style.min-width.px]=\"actionBarWidth()\"\n [style.max-width.px]=\"actionBarWidth()\">\n &nbsp;\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"grid-body grow flex relative\">\n @if (pinnedLeftColumns().length > 0 || withSelection()) {\n <div #bodyLeft class=\"grid-body-left pinned-viewport shrink-0 overflow-hidden z-10 pinned left-0\"\n [ngStyle]=\"leftPinnedWidthStyles()\">\n <div #bodyLeftCanvas class=\"pinned-canvas\">\n <div #bodyLeftContent class=\"pinned-content relative\" [style.height.px]=\"totalHeight()\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 right-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @if (withSelection()) {\n <div class=\"cell cell-selection flex items-center justify-center shrink-0\">\n <ngs-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelectionToggle($event, row.item) : null\"\n [checked]=\"selection.isSelected(row.item)\" />\n </div>\n }\n @for (col of pinnedLeftColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"></ng-container>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <div #bodyCenter class=\"grid-body-center grow overflow-hidden relative\">\n <ngs-scrollbar-area>\n <div #bodyCenterContent class=\"rows-container\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [style.width.px]=\"centerWidth()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @for (col of centerColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"/>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"virtual-spacer relative\" [style.height.px]=\"totalHeight()\" [style.width.px]=\"centerWidth()\"></div>\n </ngs-scrollbar-area>\n </div>\n\n @if (pinnedRightColumns().length > 0 || actionBarTemplateRef) {\n <div #bodyRight class=\"grid-body-right pinned-viewport shrink-0 overflow-hidden z-10 pinned right-0\"\n [ngStyle]=\"rightPinnedWidthStyles()\">\n <div #bodyRightCanvas class=\"pinned-canvas\">\n <div #bodyRightContent class=\"pinned-content relative\" [style.height.px]=\"totalHeight()\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 right-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @for (col of pinnedRightColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"></ng-container>\n </div>\n }\n @if (actionBarTemplateRef) {\n <div class=\"cell flex items-center shrink-0\"\n [style.width.px]=\"actionBarWidth()\"\n [style.min-width.px]=\"actionBarWidth()\"\n [style.max-width.px]=\"actionBarWidth()\">\n <ng-container [ngTemplateOutlet]=\"actionBarTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (withPagination() && !paginator()) {\n <ngs-paginator [pageSizeOptions]=\"pageSizeOptions()\"\n [showFirstLastButtons]=\"showFirstLastButtons()\"\n [pageSize]=\"pageSize()\"\n [pageIndex]=\"pageIndex()\"\n [length]=\"effectivePaginatorLength()\"\n [disabled]=\"_isLoading() || _isFiltering()\"\n (page)=\"onPageChange($event)\"/>\n }\n </div>\n } @else {\n @if (isNoResults) {\n @if (emptyFilterResultsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"emptyFilterResultsTemplateRef\"/>\n } @else {\n <ngs-empty-state>\n <ngs-empty-state-icon>\n <ngs-icon [name]=\"emptyFilterResultsIcon()\"/>\n </ngs-empty-state-icon>\n <ngs-empty-state-content>{{ interpolatedEmptyFilterResultsText() }}</ngs-empty-state-content>\n </ngs-empty-state>\n }\n } @else {\n @if (emptyTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplateRef\"/>\n } @else {\n <ngs-empty-state>\n <ngs-empty-state-icon>\n <ngs-icon [name]=\"emptyIcon()\"/>\n </ngs-empty-state-icon>\n <ngs-empty-state-content>{{ emptyText() }}</ngs-empty-state-content>\n </ngs-empty-state>\n }\n }\n }\n }\n</div>\n\n<ng-template #cellContent let-row=\"row\" let-col=\"col\">\n <div class=\"overflow-hidden w-full\">\n @if (col.cellRenderer && hasCellRenderer(col.cellRenderer)) {\n <ng-container [ngComponentOutlet]=\"getCellRenderer(col.cellRenderer)\"\n [ngComponentOutletInputs]=\"{ element: row, columnDef: col, fieldData: getNestedValue(row, col.field) }\"\n [ngComponentOutletInjector]=\"injector\"/>\n } @else {\n {{ getNestedValue(row, col.field) }}\n }\n </div>\n</ng-template>\n\n<ngs-menu #columnMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n @if (col.sortable) {\n <button ngs-menu-item (click)=\"sortColumn(col, 'asc')\">\n <ngs-icon name=\"fluent:arrow-sort-up-24-regular\" size=\"20\"/>\n Sort Ascending\n </button>\n <button ngs-menu-item (click)=\"sortColumn(col, 'desc')\">\n <ngs-icon name=\"fluent:arrow-sort-down-24-regular\" size=\"20\"/>\n Sort Descending\n </button>\n <ngs-menu-divider/>\n }\n <button ngs-menu-item [ngsMenuTriggerFor]=\"pinMenu\" [ngsMenuTriggerData]=\"{ col: col }\">\n <ngs-icon name=\"fluent:pin-24-regular\" size=\"20\"/>\n Pin Column\n </button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"autosizeColumn(col)\">\n Autosize This Column\n </button>\n <button ngs-menu-item (click)=\"autosizeAllColumns()\">\n Autosize All Columns\n </button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"openColumnSettingsDialog()\">\n Choose Columns\n </button>\n <button ngs-menu-item (click)=\"resetColumns()\">\n Reset Columns\n </button>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #pinMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n <button ngs-menu-item\n [selected]=\"!col.pinned\"\n (click)=\"pinColumn(col, null)\">\n No Pin\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'start'\"\n (click)=\"pinColumn(col, 'start')\">\n Pin Left\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'end'\"\n (click)=\"pinColumn(col, 'end')\">\n Pin Right\n </button>\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-data-view-header-height: 48px;--ngs-data-view-selection-column-width: 48px;--ngs-data-view-header-bg: var(--color-surface-container-low, #f8fafc);--ngs-data-view-body-bg: var(--color-background);--ngs-data-view-row-bg: var(--color-background);--ngs-data-view-row-hover-bg: var(--color-surface-container-low, #f8fafc);--ngs-data-view-hl-header-row-bg: var(--color-surface-container);--ngs-data-view-border-color: var(--color-border);--ngs-data-view-bg: transparent;--ngs-data-view-min-height: 300px;--ngs-table-row-item-outline-width: 0;--ngs-table-background: var(--ngs-data-view-bg);--ngs-content-fade-color: var(--ngs-data-view-row-bg);--ngs-table-header-cell-background: var(--ngs-data-view-header-bg);--ngs-data-view-radius: .75rem;--ngs-data-view-root-border: 1px solid var(--ngs-data-view-border-color);--ngs-data-view-cell-padding: 0 calc(var(--spacing, .25rem) * 4)}:host .ngs-data-view-resize-line{position:absolute;top:0;bottom:0;width:1px;background-color:var(--color-primary);z-index:1000;pointer-events:none;margin-left:-1px}:host.embedded{--ngs-data-view-radius: 0;--ngs-data-view-root-border: none}:host.highlight-header{--ngs-data-view-header-bg: var(--ngs-data-view-hl-header-row-bg)}:host{display:flex;flex-direction:column;min-height:var(--ngs-data-view-min-height)}:host:not(.is-auto-height){height:var(--ngs-data-view-min-height)}:host>div:first-child{flex:1 1 auto}:host.is-loading{pointer-events:none;-webkit-user-select:none;user-select:none}:host .grid-root{background-color:var(--ngs-data-view-body-bg);border:var(--ngs-data-view-root-border);border-radius:var(--ngs-data-view-radius);min-height:inherit;flex:1 1 auto}:host .grid-header,:host .grid-body,:host ngs-paginator{transition:opacity .3s ease-in-out;opacity:1}:host:not(.is-browser) .grid-header,:host:not(.is-browser) .grid-body,:host:not(.is-browser) ngs-paginator{opacity:0;transition:none}:host .grid-header-center,:host .grid-body-center{flex:1 1 0;min-width:0}:host .grid-header .header-cell .ngs-data-view-column-settings-btn{z-index:10;margin-inline-end:calc(calc(var(--spacing, .25rem) * 2.5) * -1);display:none;transition:opacity .2s,color .2s}:host .grid-header .header-cell .ngs-data-view-column-settings-btn:not(:hover) ngs-icon{color:var(--color-neutral-500)}:host .grid-header .header-cell:hover .ngs-data-view-column-settings-btn{display:inline-flex}:host .grid-header .header-cell .ngs-data-view-column-settings-btn.is-menu-open{display:inline-flex}:host ::ng-deep .header-cell,:host ::ng-deep .cell{box-sizing:border-box;padding:var(--ngs-data-view-cell-padding);border-right:1px solid transparent;overflow:hidden;min-width:40px}:host ::ng-deep .header-cell.cell-selection,:host ::ng-deep .cell.cell-selection{padding:0 calc(var(--spacing, .25rem) * 2);width:var(--ngs-data-view-selection-column-width);min-width:var(--ngs-data-view-selection-column-width)}:host ::ng-deep .header-cell{background-color:var(--ngs-data-view-header-bg)}:host ::ng-deep .cell{background-color:transparent}:host ::ng-deep .ngs-header-cell,:host ::ng-deep .ngs-cell{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .grid-header{-webkit-user-select:text;user-select:text;background-color:var(--ngs-data-view-header-bg);color:var(--color-on-background);font-size:.875rem;position:sticky;top:0;z-index:20;border-bottom:1px solid var(--ngs-data-view-border-color)}:host .grid-header .header-cell{height:var(--ngs-data-view-header-height);position:relative}:host .grid-header .header-cell .col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:10;border-right:1px solid var(--color-border);transition:border-color .2s}:host .grid-header .header-cell .col-resize-handle:hover{border-right-color:var(--color-primary)}:host .grid-header .grid-header-left{box-sizing:border-box;position:relative}:host .grid-header .grid-header-left:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-header .grid-header-right{box-sizing:border-box;position:relative}:host .grid-header .grid-header-right:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body{font-size:.875rem;overflow:hidden;flex:1 1 auto;min-height:100px}:host .grid-body .grid-body-left,:host .grid-body .grid-body-center,:host .grid-body .grid-body-right{background-color:var(--ngs-data-view-body-bg, var(--color-background))}:host .grid-body .grid-row{background-color:var(--ngs-data-view-row-bg);box-sizing:border-box;color:var(--color-on-background);border-bottom:1px solid var(--ngs-data-view-border-color)}:host .grid-body .grid-row.is-last{border-bottom:none}:host .grid-body .grid-row.is-selected{background-color:var(--color-primary)}@supports (color: color-mix(in lab,red,red)){:host .grid-body .grid-row.is-selected{background-color:color-mix(in srgb,var(--color-primary) 10%,transparent)}}:host .grid-body .grid-row.is-selected:hover,:host .grid-body .grid-row.is-selected.is-hovered{background-color:var(--color-primary)}@supports (color: color-mix(in lab,red,red)){:host .grid-body .grid-row.is-selected:hover,:host .grid-body .grid-row.is-selected.is-hovered{background-color:color-mix(in srgb,var(--color-primary) 20%,transparent)}}:host .grid-body .grid-row:hover,:host .grid-body .grid-row.is-hovered{background-color:var(--ngs-data-view-row-hover-bg)}:host .grid-body .grid-body-left,:host .grid-body .grid-body-right{scrollbar-width:none}:host .grid-body .grid-body-left::-webkit-scrollbar,:host .grid-body .grid-body-right::-webkit-scrollbar{display:none}:host .grid-body .grid-body-left.grid-body-left,:host .grid-body .grid-body-right.grid-body-left{box-sizing:border-box;position:relative}:host .grid-body .grid-body-left.grid-body-left:after,:host .grid-body .grid-body-right.grid-body-left:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body .grid-body-left.grid-body-right,:host .grid-body .grid-body-right.grid-body-right{box-sizing:border-box;position:relative}:host .grid-body .grid-body-left.grid-body-right:after,:host .grid-body .grid-body-right.grid-body-right:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body .grid-body-left.pinned-viewport,:host .grid-body .grid-body-right.pinned-viewport{overflow:hidden;position:sticky;top:0;z-index:10;contain:layout paint}:host .grid-body .grid-body-left .pinned-canvas,:host .grid-body .grid-body-right .pinned-canvas{will-change:transform;height:100%;width:100%;contain:layout paint}:host .grid-body .grid-body-left .pinned-content,:host .grid-body .grid-body-right .pinned-content{position:relative}:host .grid-body .grid-body-center{contain:layout paint}:host .grid-body .grid-body-center .rows-container{position:sticky;top:0;left:0;will-change:transform;width:100%;z-index:1}:host .grid-header-center{scrollbar-width:none}:host .grid-header-center::-webkit-scrollbar{display:none}:host .grid-header-center{contain:layout paint}:host .grid-header-center .header-inner{will-change:transform;contain:layout paint}:host:not(.has-horizontal-scroll) .grid-header-left:after,:host:not(.has-horizontal-scroll) .grid-body-left:after,:host:not(.has-horizontal-scroll) .grid-header-right:after,:host:not(.has-horizontal-scroll) .grid-body-right:after{display:none}:host ngs-paginator{padding:calc(var(--spacing, .25rem) * 2.5) 0;border-top:1px solid var(--ngs-data-view-border-color)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Checkbox, selector: "ngs-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["checkedChange", "disabledChange", "indeterminateChange", "change"], exportAs: ["ngsCheckbox"] }, { kind: "component", type: SortHeader, selector: "[ngs-sort-header]", inputs: ["ngs-sort-header", "sortActionDescription", "disabled"], exportAs: ["ngsSortHeader"] }, { kind: "directive", type: SortDirective, selector: "[ngsSort]", inputs: ["ngsSortActive", "ngsSortStart", "ngsSortDirection", "ngsSortDisableClear", "ngsSortDisabled"], outputs: ["ngsSortActiveChange", "ngsSortDirectionChange", "ngsSortChange"], exportAs: ["ngsSort"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Paginator, selector: "ngs-paginator", inputs: ["pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "disabled"], outputs: ["page"], exportAs: ["ngsPaginator"] }, { kind: "component", type: ScrollbarArea, selector: "ngs-scrollbar-area", inputs: ["scrollbarWidth", "autoHide", "absolute"], outputs: ["scrolled"], exportAs: ["ngsScrollbarArea"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: EmptyState, selector: "ngs-empty-state", exportAs: ["ngsEmptyState"] }, { kind: "component", type: EmptyStateIcon, selector: "ngs-empty-state-icon", exportAs: ["ngsEmptyStateIcon"] }, { kind: "component", type: EmptyStateContent, selector: "ngs-empty-state-content", exportAs: ["ngsEmptyStateContent"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: BlockLoader, selector: "ngs-block-loader", inputs: ["loading", "spinnerDiameter", "spinnerStrokeWidth"], exportAs: ["ngsBlockLoader"] }, { kind: "directive", type: BlockLoaderContainerDirective, selector: "[ngsBlockLoaderContainer]" }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: MenuDivider, selector: "ngs-menu-divider" }, { kind: "directive", type: MenuContent, selector: "[ngsMenuContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1438
+ }
1439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DataView, decorators: [{
1440
+ type: Component,
1441
+ args: [{ selector: 'ngs-data-view', exportAs: 'ngsDataView', imports: [
1442
+ Checkbox,
1443
+ SortHeader,
1444
+ SortDirective,
1445
+ NgComponentOutlet,
1446
+ NgTemplateOutlet,
1447
+ Paginator,
1448
+ ScrollbarArea,
1449
+ NgStyle,
1450
+ EmptyState,
1451
+ EmptyStateIcon,
1452
+ EmptyStateContent,
1453
+ Icon,
1454
+ BlockLoader,
1455
+ BlockLoaderContainerDirective,
1456
+ Button,
1457
+ Menu,
1458
+ MenuItem,
1459
+ MenuTrigger,
1460
+ MenuDivider,
1461
+ MenuContent,
1462
+ ], providers: [
1463
+ {
1464
+ provide: DATA_VIEW,
1465
+ useExisting: forwardRef(() => DataView),
1466
+ },
1467
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1468
+ 'class': 'ngs-data-view',
1469
+ '[class.highlight-header]': 'highlightHeader()',
1470
+ '[class.pinned-header]': 'stickyHeader()',
1471
+ '[class.hover-rows]': 'hoverRows()',
1472
+ '[class.is-loading]': '_isLoading()',
1473
+ '[class.embedded]': 'embedded()',
1474
+ '[class.has-horizontal-scroll]': 'hasHorizontalScroll()',
1475
+ '[class.is-browser]': 'isBrowser()',
1476
+ '[style.--ngs-data-view-header-height.px]': 'headerHeight()',
1477
+ '[style.--ngs-data-view-selection-column-width.px]': 'selectionWidth()',
1478
+ '[class.is-auto-height]': 'autoHeight()',
1479
+ }, template: "<div class=\"flex flex-col h-full overflow-hidden relative\"\n ngsBlockLoaderContainer>\n <ngs-block-loader [loading]=\"_isLoading()\"/>\n @if (loaded()) {\n @if (!noFilteredResults) {\n <div class=\"grid-root flex flex-col grow overflow-hidden relative\">\n @if (isResizing()) {\n <div class=\"ngs-data-view-resize-line\" [style.left.px]=\"resizeLineLeft()\"></div>\n }\n\n <!-- GRID HEADER -->\n <div class=\"grid-header pinned top-0 z-20 flex overflow-hidden shrink-0 font-medium\"\n ngsSort\n [style.height.px]=\"headerHeight()\"\n [ngsSortDisabled]=\"!isSortingEnabled() || _isLoading() || _isFiltering()\"\n (ngsSortChange)=\"onSortChange($event)\">\n @if (pinnedLeftColumns().length > 0 || withSelection()) {\n <div class=\"grid-header-left shrink-0 flex z-30\"\n [ngStyle]=\"leftPinnedWidthStyles()\">\n <div class=\"header-inner flex\" [style.width.px]=\"leftPinnedWidth()\">\n @if (withSelection()) {\n <div class=\"header-cell cell-selection flex items-center justify-center shrink-0\">\n @if (rowSelection() === 'multiple') {\n <ngs-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\" />\n }\n </div>\n }\n @for (col of pinnedLeftColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <div #headerCenter class=\"grid-header-center grow flex overflow-hidden\">\n <div #headerCenterInner class=\"flex header-inner\" [style.width.px]=\"centerWidth()\">\n @for (col of centerColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n </div>\n </div>\n\n @if (pinnedRightColumns().length > 0 || actionBarTemplateRef) {\n <div class=\"grid-header-right shrink-0 flex z-30\"\n [ngStyle]=\"rightPinnedWidthStyles()\">\n <div class=\"header-inner flex\" [style.width.px]=\"rightPinnedWidth()\">\n @for (col of pinnedRightColumns(); track col.field) {\n <div class=\"header-cell flex items-center truncate relative\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <div class=\"flex items-center grow truncate\"\n [ngs-sort-header]=\"col.field\"\n [disabled]=\"!col.sortable\">\n <span class=\"truncate\">{{ col.name }}</span>\n </div>\n @if (col.withColumnSettings !== false && withColumnSettings()) {\n <button ngsIconButton\n #menuTrigger=\"ngsMenuTrigger\"\n [ngsMenuTriggerFor]=\"columnMenu\"\n [ngsMenuTriggerData]=\"{ col: col }\"\n class=\"ngs-data-view-column-settings-btn shrink-0\"\n [class.is-menu-open]=\"menuTrigger.menuOpen()\">\n <ngs-icon name=\"fluent:more-vertical-24-regular\" size=\"20\"/>\n </button>\n }\n @if (col.resizable) {\n <div class=\"col-resize-handle\" (mousedown)=\"onColumnResizeStart($event, col)\"></div>\n }\n </div>\n }\n @if (actionBarTemplateRef) {\n <div class=\"header-cell flex items-center shrink-0\"\n [style.width.px]=\"actionBarWidth()\"\n [style.min-width.px]=\"actionBarWidth()\"\n [style.max-width.px]=\"actionBarWidth()\">\n &nbsp;\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"grid-body grow flex relative\">\n @if (pinnedLeftColumns().length > 0 || withSelection()) {\n <div #bodyLeft class=\"grid-body-left pinned-viewport shrink-0 overflow-hidden z-10 pinned left-0\"\n [ngStyle]=\"leftPinnedWidthStyles()\">\n <div #bodyLeftCanvas class=\"pinned-canvas\">\n <div #bodyLeftContent class=\"pinned-content relative\" [style.height.px]=\"totalHeight()\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 right-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @if (withSelection()) {\n <div class=\"cell cell-selection flex items-center justify-center shrink-0\">\n <ngs-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelectionToggle($event, row.item) : null\"\n [checked]=\"selection.isSelected(row.item)\" />\n </div>\n }\n @for (col of pinnedLeftColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"></ng-container>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <div #bodyCenter class=\"grid-body-center grow overflow-hidden relative\">\n <ngs-scrollbar-area>\n <div #bodyCenterContent class=\"rows-container\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [style.width.px]=\"centerWidth()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @for (col of centerColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"/>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"virtual-spacer relative\" [style.height.px]=\"totalHeight()\" [style.width.px]=\"centerWidth()\"></div>\n </ngs-scrollbar-area>\n </div>\n\n @if (pinnedRightColumns().length > 0 || actionBarTemplateRef) {\n <div #bodyRight class=\"grid-body-right pinned-viewport shrink-0 overflow-hidden z-10 pinned right-0\"\n [ngStyle]=\"rightPinnedWidthStyles()\">\n <div #bodyRightCanvas class=\"pinned-canvas\">\n <div #bodyRightContent class=\"pinned-content relative\" [style.height.px]=\"totalHeight()\">\n @for (row of visibleRows(); track row.index) {\n <div class=\"grid-row flex absolute left-0 right-0 hover:bg-[var(--ngs-data-view-row-hover-bg)]\"\n [style.top.px]=\"row.top\"\n [style.height.px]=\"rowHeight()\"\n [attr.data-row-index]=\"row.index\"\n [class.is-selected]=\"selection.isSelected(row.item)\"\n [class.is-hovered]=\"hoveredRowIndex() === row.index\"\n [class.is-last]=\"row.isLast\"\n (mouseenter)=\"hoveredRowIndex.set(row.index)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\">\n @for (col of pinnedRightColumns(); track col.field) {\n <div class=\"cell flex items-center truncate\"\n [class.shrink-0]=\"!col.flex\"\n [style.flex]=\"col.flex\"\n [style.width]=\"col.width\"\n [style.min-width]=\"col.width\"\n [style.max-width]=\"col.width\">\n <ng-container *ngTemplateOutlet=\"cellContent; context: { row: row.item, col: col }\"></ng-container>\n </div>\n }\n @if (actionBarTemplateRef) {\n <div class=\"cell flex items-center shrink-0\"\n [style.width.px]=\"actionBarWidth()\"\n [style.min-width.px]=\"actionBarWidth()\"\n [style.max-width.px]=\"actionBarWidth()\">\n <ng-container [ngTemplateOutlet]=\"actionBarTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (withPagination() && !paginator()) {\n <ngs-paginator [pageSizeOptions]=\"pageSizeOptions()\"\n [showFirstLastButtons]=\"showFirstLastButtons()\"\n [pageSize]=\"pageSize()\"\n [pageIndex]=\"pageIndex()\"\n [length]=\"effectivePaginatorLength()\"\n [disabled]=\"_isLoading() || _isFiltering()\"\n (page)=\"onPageChange($event)\"/>\n }\n </div>\n } @else {\n @if (isNoResults) {\n @if (emptyFilterResultsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"emptyFilterResultsTemplateRef\"/>\n } @else {\n <ngs-empty-state>\n <ngs-empty-state-icon>\n <ngs-icon [name]=\"emptyFilterResultsIcon()\"/>\n </ngs-empty-state-icon>\n <ngs-empty-state-content>{{ interpolatedEmptyFilterResultsText() }}</ngs-empty-state-content>\n </ngs-empty-state>\n }\n } @else {\n @if (emptyTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplateRef\"/>\n } @else {\n <ngs-empty-state>\n <ngs-empty-state-icon>\n <ngs-icon [name]=\"emptyIcon()\"/>\n </ngs-empty-state-icon>\n <ngs-empty-state-content>{{ emptyText() }}</ngs-empty-state-content>\n </ngs-empty-state>\n }\n }\n }\n }\n</div>\n\n<ng-template #cellContent let-row=\"row\" let-col=\"col\">\n <div class=\"overflow-hidden w-full\">\n @if (col.cellRenderer && hasCellRenderer(col.cellRenderer)) {\n <ng-container [ngComponentOutlet]=\"getCellRenderer(col.cellRenderer)\"\n [ngComponentOutletInputs]=\"{ element: row, columnDef: col, fieldData: getNestedValue(row, col.field) }\"\n [ngComponentOutletInjector]=\"injector\"/>\n } @else {\n {{ getNestedValue(row, col.field) }}\n }\n </div>\n</ng-template>\n\n<ngs-menu #columnMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n @if (col.sortable) {\n <button ngs-menu-item (click)=\"sortColumn(col, 'asc')\">\n <ngs-icon name=\"fluent:arrow-sort-up-24-regular\" size=\"20\"/>\n Sort Ascending\n </button>\n <button ngs-menu-item (click)=\"sortColumn(col, 'desc')\">\n <ngs-icon name=\"fluent:arrow-sort-down-24-regular\" size=\"20\"/>\n Sort Descending\n </button>\n <ngs-menu-divider/>\n }\n <button ngs-menu-item [ngsMenuTriggerFor]=\"pinMenu\" [ngsMenuTriggerData]=\"{ col: col }\">\n <ngs-icon name=\"fluent:pin-24-regular\" size=\"20\"/>\n Pin Column\n </button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"autosizeColumn(col)\">\n Autosize This Column\n </button>\n <button ngs-menu-item (click)=\"autosizeAllColumns()\">\n Autosize All Columns\n </button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"openColumnSettingsDialog()\">\n Choose Columns\n </button>\n <button ngs-menu-item (click)=\"resetColumns()\">\n Reset Columns\n </button>\n </ng-template>\n</ngs-menu>\n\n<ngs-menu #pinMenu=\"ngsMenu\">\n <ng-template ngsMenuContent let-col=\"col\">\n <button ngs-menu-item\n [selected]=\"!col.pinned\"\n (click)=\"pinColumn(col, null)\">\n No Pin\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'start'\"\n (click)=\"pinColumn(col, 'start')\">\n Pin Left\n </button>\n <button ngs-menu-item\n [selected]=\"col.pinned && col.pinAlign === 'end'\"\n (click)=\"pinColumn(col, 'end')\">\n Pin Right\n </button>\n </ng-template>\n</ngs-menu>\n", styles: [":host{--ngs-data-view-header-height: 48px;--ngs-data-view-selection-column-width: 48px;--ngs-data-view-header-bg: var(--color-surface-container-low, #f8fafc);--ngs-data-view-body-bg: var(--color-background);--ngs-data-view-row-bg: var(--color-background);--ngs-data-view-row-hover-bg: var(--color-surface-container-low, #f8fafc);--ngs-data-view-hl-header-row-bg: var(--color-surface-container);--ngs-data-view-border-color: var(--color-border);--ngs-data-view-bg: transparent;--ngs-data-view-min-height: 300px;--ngs-table-row-item-outline-width: 0;--ngs-table-background: var(--ngs-data-view-bg);--ngs-content-fade-color: var(--ngs-data-view-row-bg);--ngs-table-header-cell-background: var(--ngs-data-view-header-bg);--ngs-data-view-radius: .75rem;--ngs-data-view-root-border: 1px solid var(--ngs-data-view-border-color);--ngs-data-view-cell-padding: 0 calc(var(--spacing, .25rem) * 4)}:host .ngs-data-view-resize-line{position:absolute;top:0;bottom:0;width:1px;background-color:var(--color-primary);z-index:1000;pointer-events:none;margin-left:-1px}:host.embedded{--ngs-data-view-radius: 0;--ngs-data-view-root-border: none}:host.highlight-header{--ngs-data-view-header-bg: var(--ngs-data-view-hl-header-row-bg)}:host{display:flex;flex-direction:column;min-height:var(--ngs-data-view-min-height)}:host:not(.is-auto-height){height:var(--ngs-data-view-min-height)}:host>div:first-child{flex:1 1 auto}:host.is-loading{pointer-events:none;-webkit-user-select:none;user-select:none}:host .grid-root{background-color:var(--ngs-data-view-body-bg);border:var(--ngs-data-view-root-border);border-radius:var(--ngs-data-view-radius);min-height:inherit;flex:1 1 auto}:host .grid-header,:host .grid-body,:host ngs-paginator{transition:opacity .3s ease-in-out;opacity:1}:host:not(.is-browser) .grid-header,:host:not(.is-browser) .grid-body,:host:not(.is-browser) ngs-paginator{opacity:0;transition:none}:host .grid-header-center,:host .grid-body-center{flex:1 1 0;min-width:0}:host .grid-header .header-cell .ngs-data-view-column-settings-btn{z-index:10;margin-inline-end:calc(calc(var(--spacing, .25rem) * 2.5) * -1);display:none;transition:opacity .2s,color .2s}:host .grid-header .header-cell .ngs-data-view-column-settings-btn:not(:hover) ngs-icon{color:var(--color-neutral-500)}:host .grid-header .header-cell:hover .ngs-data-view-column-settings-btn{display:inline-flex}:host .grid-header .header-cell .ngs-data-view-column-settings-btn.is-menu-open{display:inline-flex}:host ::ng-deep .header-cell,:host ::ng-deep .cell{box-sizing:border-box;padding:var(--ngs-data-view-cell-padding);border-right:1px solid transparent;overflow:hidden;min-width:40px}:host ::ng-deep .header-cell.cell-selection,:host ::ng-deep .cell.cell-selection{padding:0 calc(var(--spacing, .25rem) * 2);width:var(--ngs-data-view-selection-column-width);min-width:var(--ngs-data-view-selection-column-width)}:host ::ng-deep .header-cell{background-color:var(--ngs-data-view-header-bg)}:host ::ng-deep .cell{background-color:transparent}:host ::ng-deep .ngs-header-cell,:host ::ng-deep .ngs-cell{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .grid-header{-webkit-user-select:text;user-select:text;background-color:var(--ngs-data-view-header-bg);color:var(--color-on-background);font-size:.875rem;position:sticky;top:0;z-index:20;border-bottom:1px solid var(--ngs-data-view-border-color)}:host .grid-header .header-cell{height:var(--ngs-data-view-header-height);position:relative}:host .grid-header .header-cell .col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:10;border-right:1px solid var(--color-border);transition:border-color .2s}:host .grid-header .header-cell .col-resize-handle:hover{border-right-color:var(--color-primary)}:host .grid-header .grid-header-left{box-sizing:border-box;position:relative}:host .grid-header .grid-header-left:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-header .grid-header-right{box-sizing:border-box;position:relative}:host .grid-header .grid-header-right:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body{font-size:.875rem;overflow:hidden;flex:1 1 auto;min-height:100px}:host .grid-body .grid-body-left,:host .grid-body .grid-body-center,:host .grid-body .grid-body-right{background-color:var(--ngs-data-view-body-bg, var(--color-background))}:host .grid-body .grid-row{background-color:var(--ngs-data-view-row-bg);box-sizing:border-box;color:var(--color-on-background);border-bottom:1px solid var(--ngs-data-view-border-color)}:host .grid-body .grid-row.is-last{border-bottom:none}:host .grid-body .grid-row.is-selected{background-color:var(--color-primary)}@supports (color: color-mix(in lab,red,red)){:host .grid-body .grid-row.is-selected{background-color:color-mix(in srgb,var(--color-primary) 10%,transparent)}}:host .grid-body .grid-row.is-selected:hover,:host .grid-body .grid-row.is-selected.is-hovered{background-color:var(--color-primary)}@supports (color: color-mix(in lab,red,red)){:host .grid-body .grid-row.is-selected:hover,:host .grid-body .grid-row.is-selected.is-hovered{background-color:color-mix(in srgb,var(--color-primary) 20%,transparent)}}:host .grid-body .grid-row:hover,:host .grid-body .grid-row.is-hovered{background-color:var(--ngs-data-view-row-hover-bg)}:host .grid-body .grid-body-left,:host .grid-body .grid-body-right{scrollbar-width:none}:host .grid-body .grid-body-left::-webkit-scrollbar,:host .grid-body .grid-body-right::-webkit-scrollbar{display:none}:host .grid-body .grid-body-left.grid-body-left,:host .grid-body .grid-body-right.grid-body-left{box-sizing:border-box;position:relative}:host .grid-body .grid-body-left.grid-body-left:after,:host .grid-body .grid-body-right.grid-body-left:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body .grid-body-left.grid-body-right,:host .grid-body .grid-body-right.grid-body-right{box-sizing:border-box;position:relative}:host .grid-body .grid-body-left.grid-body-right:after,:host .grid-body .grid-body-right.grid-body-right:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:1px;background-color:var(--ngs-data-view-border-color);z-index:100;pointer-events:none}:host .grid-body .grid-body-left.pinned-viewport,:host .grid-body .grid-body-right.pinned-viewport{overflow:hidden;position:sticky;top:0;z-index:10;contain:layout paint}:host .grid-body .grid-body-left .pinned-canvas,:host .grid-body .grid-body-right .pinned-canvas{will-change:transform;height:100%;width:100%;contain:layout paint}:host .grid-body .grid-body-left .pinned-content,:host .grid-body .grid-body-right .pinned-content{position:relative}:host .grid-body .grid-body-center{contain:layout paint}:host .grid-body .grid-body-center .rows-container{position:sticky;top:0;left:0;will-change:transform;width:100%;z-index:1}:host .grid-header-center{scrollbar-width:none}:host .grid-header-center::-webkit-scrollbar{display:none}:host .grid-header-center{contain:layout paint}:host .grid-header-center .header-inner{will-change:transform;contain:layout paint}:host:not(.has-horizontal-scroll) .grid-header-left:after,:host:not(.has-horizontal-scroll) .grid-body-left:after,:host:not(.has-horizontal-scroll) .grid-header-right:after,:host:not(.has-horizontal-scroll) .grid-body-right:after{display:none}:host ngs-paginator{padding:calc(var(--spacing, .25rem) * 2.5) 0;border-top:1px solid var(--ngs-data-view-border-color)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
1480
+ }], ctorParameters: () => [], propDecorators: { _emptyDataRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataViewEmptyDataDirective), { isSignal: true }] }], _emptyFilterResults: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataViewEmptyFilterResultsDirective), { isSignal: true }] }], _actionBarRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataViewActionBarDirective), { isSignal: true }] }], _actionBarComp: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataViewActionBarDirective), { ...{ read: DataViewActionBar }, isSignal: true }] }], _table: [{ type: i0.ViewChild, args: ['table', { isSignal: true }] }], _ngsSort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SortDirective), { isSignal: true }] }], _internalPaginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Paginator), { isSignal: true }] }], paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }], _headerCenter: [{ type: i0.ViewChild, args: ['headerCenter', { ...{ read: (ElementRef) }, isSignal: true }] }], _headerCenterInner: [{ type: i0.ViewChild, args: ['headerCenterInner', { ...{ read: (ElementRef) }, isSignal: true }] }], _bodyLeftContent: [{ type: i0.ViewChild, args: ['bodyLeftContent', { ...{ read: (ElementRef) }, isSignal: true }] }], _scrollbarArea: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ScrollbarArea), { isSignal: true }] }], _bodyCenterContent: [{ type: i0.ViewChild, args: ['bodyCenterContent', { ...{ read: (ElementRef) }, isSignal: true }] }], _bodyRightContent: [{ type: i0.ViewChild, args: ['bodyRightContent', { ...{ read: (ElementRef) }, isSignal: true }] }], columnDefs: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefs", required: false }] }], defaultColDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultColDef", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], datasource: [{ type: i0.Input, args: [{ isSignal: true, alias: "datasource", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], headerHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerHeight", required: false }] }], bufferRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "bufferRows", required: false }] }], withSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "withSelection", required: false }] }], highlightHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightHeader", required: false }] }], rowModelType: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowModelType", required: false }] }], autoHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHeight", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], withPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "withPagination", required: false }] }], bodyScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "bodyScroll", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showFirstLastButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLastButtons", required: false }] }], paginatorAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorAriaLabel", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }], snapshot: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapshot", required: false }] }], withColumnSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "withColumnSettings", required: false }] }], embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }], selectionWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionWidth", required: false }] }], minColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minColumnWidth", required: false }] }], cellRenderers: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellRenderers", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], hoverRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverRows", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], emptyFilterResultsIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterResultsIcon", required: false }] }], emptyFilterResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterResultsText", required: false }] }], rowSelectionChanged: [{ type: i0.Output, args: ["rowSelectionChanged"] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], allRowsSelectionChanged: [{ type: i0.Output, args: ["allRowsSelectionChanged"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], loadEnd: [{ type: i0.Output, args: ["loadEnd"] }], refreshEnd: [{ type: i0.Output, args: ["refreshEnd"] }] } });
1481
+
1482
+ function cellRenderer(cellRenderer, component) {
1483
+ return {
1484
+ cellRenderer,
1485
+ component
1486
+ };
1487
+ }
1488
+
1489
+ /**
1490
+ * Generated bundle index. Do not edit.
1491
+ */
1492
+
1493
+ export { DATA_VIEW, DATA_VIEW_CONFIG, DataView, DataViewActionBar, DataViewActionBarDirective, DataViewEmptyDataDirective, DataViewEmptyFilterResultsDirective, cellRenderer, provideDataView };
1494
+ //# sourceMappingURL=ngstarter-ui-components-data-view.mjs.map