@gears-frontx/ui-kit 0.4.4 → 0.4.6

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 (315) hide show
  1. package/dist/chunks/actions.iasfkjWq.css +1 -0
  2. package/dist/chunks/create-column-auto-size.js +62 -0
  3. package/dist/chunks/create-column-auto-size.js.map +1 -0
  4. package/dist/chunks/data-grid-record-context.js +13 -0
  5. package/dist/chunks/data-grid-record-context.js.map +1 -0
  6. package/dist/chunks/data-grid.-6P4UQGJ.css +1 -0
  7. package/dist/chunks/debounce.js +17 -0
  8. package/dist/chunks/debounce.js.map +1 -0
  9. package/dist/chunks/empty.Cfg5lE0n.css +1 -0
  10. package/dist/chunks/filters.DcFdZpNG.css +1 -0
  11. package/dist/chunks/hooked.js +44 -0
  12. package/dist/chunks/hooked.js.map +1 -0
  13. package/dist/chunks/ignore-row-click.js +5 -0
  14. package/dist/chunks/ignore-row-click.js.map +1 -0
  15. package/dist/chunks/messages.js +34 -3
  16. package/dist/chunks/messages.js.map +1 -1
  17. package/dist/chunks/pagination.DPVITj_D.css +1 -0
  18. package/dist/chunks/resolve-body-cell-props.DGczzk1U.css +1 -0
  19. package/dist/chunks/resolve-body-cell-props.js +140 -0
  20. package/dist/chunks/resolve-body-cell-props.js.map +1 -0
  21. package/dist/chunks/row-actions.BprAXgu2.css +1 -0
  22. package/dist/chunks/row-click.DAYTmSBO.css +1 -0
  23. package/dist/chunks/row-number.C7fNu9Bw.css +1 -0
  24. package/dist/chunks/row-select.BjKdiMf5.css +1 -0
  25. package/dist/chunks/table-configuration.a6C_fp7B.css +1 -0
  26. package/dist/chunks/table-context.js +8 -0
  27. package/dist/chunks/table-context.js.map +1 -0
  28. package/dist/chunks/table-types.js +11 -0
  29. package/dist/chunks/table-types.js.map +1 -0
  30. package/dist/chunks/table.Dmz7LEk7.css +1 -0
  31. package/dist/components/data-grid/components/filter-chip.d.ts +21 -0
  32. package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -0
  33. package/dist/components/data-grid/components/filter-control-area.d.ts +9 -0
  34. package/dist/components/data-grid/components/filter-control-area.d.ts.map +1 -0
  35. package/dist/components/data-grid/components/filter-options-search-input.d.ts +11 -0
  36. package/dist/components/data-grid/components/filter-options-search-input.d.ts.map +1 -0
  37. package/dist/components/data-grid/components/filter-popover-content.d.ts +8 -0
  38. package/dist/components/data-grid/components/filter-popover-content.d.ts.map +1 -0
  39. package/dist/components/data-grid/components/filter-reset-button.d.ts +8 -0
  40. package/dist/components/data-grid/components/filter-reset-button.d.ts.map +1 -0
  41. package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts +8 -0
  42. package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts.map +1 -0
  43. package/dist/components/data-grid/messages.d.ts +31 -0
  44. package/dist/components/data-grid/messages.d.ts.map +1 -1
  45. package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts +4 -0
  46. package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts.map +1 -0
  47. package/dist/components/data-grid/plugins/actions/actions-types.d.ts +11 -0
  48. package/dist/components/data-grid/plugins/actions/actions-types.d.ts.map +1 -0
  49. package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts +3 -0
  50. package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts.map +1 -0
  51. package/dist/components/data-grid/plugins/actions/public.d.ts +3 -0
  52. package/dist/components/data-grid/plugins/actions/public.d.ts.map +1 -0
  53. package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts +3 -0
  54. package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts.map +1 -0
  55. package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts +25 -0
  56. package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts.map +1 -0
  57. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts +3 -0
  58. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -0
  59. package/dist/components/data-grid/plugins/actions-menu/public.d.ts +3 -0
  60. package/dist/components/data-grid/plugins/actions-menu/public.d.ts.map +1 -0
  61. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts +20 -0
  62. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -0
  63. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts +3 -0
  64. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -0
  65. package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts +7 -0
  66. package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts.map +1 -0
  67. package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts +9 -0
  68. package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts.map +1 -0
  69. package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts +7 -0
  70. package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts.map +1 -0
  71. package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts +9 -0
  72. package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts.map +1 -0
  73. package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts +7 -0
  74. package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts.map +1 -0
  75. package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts +3 -0
  76. package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts.map +1 -0
  77. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts +7 -0
  78. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts.map +1 -0
  79. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts +12 -0
  80. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts.map +1 -0
  81. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts +7 -0
  82. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts.map +1 -0
  83. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts +20 -0
  84. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts.map +1 -0
  85. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts +17 -0
  86. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts.map +1 -0
  87. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts +7 -0
  88. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts.map +1 -0
  89. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts +7 -0
  90. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts.map +1 -0
  91. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts +16 -0
  92. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts.map +1 -0
  93. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts +19 -0
  94. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts.map +1 -0
  95. package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts +16 -0
  96. package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts.map +1 -0
  97. package/dist/components/data-grid/plugins/filters/entities/entities.d.ts +7 -0
  98. package/dist/components/data-grid/plugins/filters/entities/entities.d.ts.map +1 -0
  99. package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts +10 -0
  100. package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts.map +1 -0
  101. package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts +7 -0
  102. package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts.map +1 -0
  103. package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts +14 -0
  104. package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts.map +1 -0
  105. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts +7 -0
  106. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts.map +1 -0
  107. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts +11 -0
  108. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts.map +1 -0
  109. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts +7 -0
  110. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts.map +1 -0
  111. package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts +10 -0
  112. package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts.map +1 -0
  113. package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts +7 -0
  114. package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts.map +1 -0
  115. package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts +20 -0
  116. package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts.map +1 -0
  117. package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts +8 -0
  118. package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts.map +1 -0
  119. package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts +7 -0
  120. package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts.map +1 -0
  121. package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts +12 -0
  122. package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts.map +1 -0
  123. package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts +7 -0
  124. package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts.map +1 -0
  125. package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts +13 -0
  126. package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts.map +1 -0
  127. package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts +8 -0
  128. package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts.map +1 -0
  129. package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts +3 -0
  130. package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts.map +1 -0
  131. package/dist/components/data-grid/plugins/filters/filters-types.d.ts +141 -0
  132. package/dist/components/data-grid/plugins/filters/filters-types.d.ts.map +1 -0
  133. package/dist/components/data-grid/plugins/filters/public.d.ts +11 -0
  134. package/dist/components/data-grid/plugins/filters/public.d.ts.map +1 -0
  135. package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts +7 -0
  136. package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts.map +1 -0
  137. package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts +20 -0
  138. package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts.map +1 -0
  139. package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts +12 -0
  140. package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts.map +1 -0
  141. package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts +3 -0
  142. package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts.map +1 -0
  143. package/dist/components/data-grid/plugins/row-actions/public.d.ts +3 -0
  144. package/dist/components/data-grid/plugins/row-actions/public.d.ts.map +1 -0
  145. package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts +6 -0
  146. package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts.map +1 -0
  147. package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts +24 -0
  148. package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts.map +1 -0
  149. package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts +8 -0
  150. package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts.map +1 -0
  151. package/dist/components/data-grid/plugins/row-click/public.d.ts +3 -0
  152. package/dist/components/data-grid/plugins/row-click/public.d.ts.map +1 -0
  153. package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts +14 -0
  154. package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts.map +1 -0
  155. package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts +9 -0
  156. package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts.map +1 -0
  157. package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts +3 -0
  158. package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts.map +1 -0
  159. package/dist/components/data-grid/plugins/row-number/public.d.ts +3 -0
  160. package/dist/components/data-grid/plugins/row-number/public.d.ts.map +1 -0
  161. package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts +4 -0
  162. package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts.map +1 -0
  163. package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts +6 -0
  164. package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts.map +1 -0
  165. package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts +2 -0
  166. package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts.map +1 -0
  167. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts +3 -0
  168. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts.map +1 -0
  169. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts +3 -0
  170. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts.map +1 -0
  171. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts +3 -0
  172. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts.map +1 -0
  173. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts +3 -0
  174. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts.map +1 -0
  175. package/dist/components/data-grid/plugins/row-select/public.d.ts +3 -0
  176. package/dist/components/data-grid/plugins/row-select/public.d.ts.map +1 -0
  177. package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts +5 -0
  178. package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts.map +1 -0
  179. package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts +113 -0
  180. package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts.map +1 -0
  181. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts +10 -0
  182. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts.map +1 -0
  183. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts +10 -0
  184. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts.map +1 -0
  185. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts +8 -0
  186. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts.map +1 -0
  187. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts +3 -0
  188. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -0
  189. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts +3 -0
  190. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts.map +1 -0
  191. package/dist/components/data-grid/plugins/table-configuration/public.d.ts +3 -0
  192. package/dist/components/data-grid/plugins/table-configuration/public.d.ts.map +1 -0
  193. package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts +5 -0
  194. package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts.map +1 -0
  195. package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -1
  196. package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts +2 -0
  197. package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts.map +1 -0
  198. package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -1
  199. package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -1
  200. package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -1
  201. package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -1
  202. package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -1
  203. package/dist/components/data-grid/services/table/table-sticky.d.ts +16 -0
  204. package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -1
  205. package/dist/components/data-grid/tree/components/tree-actions.d.ts +7 -0
  206. package/dist/components/data-grid/tree/components/tree-actions.d.ts.map +1 -0
  207. package/dist/components/data-grid/tree/components/tree-content.d.ts +3 -0
  208. package/dist/components/data-grid/tree/components/tree-content.d.ts.map +1 -0
  209. package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts +9 -0
  210. package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts.map +1 -0
  211. package/dist/components/data-grid/tree/components/tree-left-slot.d.ts +7 -0
  212. package/dist/components/data-grid/tree/components/tree-left-slot.d.ts.map +1 -0
  213. package/dist/components/data-grid/tree/components/tree-list-item.d.ts +10 -0
  214. package/dist/components/data-grid/tree/components/tree-list-item.d.ts.map +1 -0
  215. package/dist/components/data-grid/tree/components/tree-main.d.ts +3 -0
  216. package/dist/components/data-grid/tree/components/tree-main.d.ts.map +1 -0
  217. package/dist/components/data-grid/tree/components/tree-node-content.d.ts +7 -0
  218. package/dist/components/data-grid/tree/components/tree-node-content.d.ts.map +1 -0
  219. package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts +7 -0
  220. package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts.map +1 -0
  221. package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts +7 -0
  222. package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts.map +1 -0
  223. package/dist/components/data-grid/tree/components/tree-nodes.d.ts +7 -0
  224. package/dist/components/data-grid/tree/components/tree-nodes.d.ts.map +1 -0
  225. package/dist/components/data-grid/tree/components/tree-placeholder.d.ts +6 -0
  226. package/dist/components/data-grid/tree/components/tree-placeholder.d.ts.map +1 -0
  227. package/dist/components/data-grid/tree/create-tree.d.ts +5 -0
  228. package/dist/components/data-grid/tree/create-tree.d.ts.map +1 -0
  229. package/dist/components/data-grid/tree/services/core/tree-context.d.ts +21 -0
  230. package/dist/components/data-grid/tree/services/core/tree-context.d.ts.map +1 -0
  231. package/dist/components/data-grid/tree/services/focus/focus-service.d.ts +5 -0
  232. package/dist/components/data-grid/tree/services/focus/focus-service.d.ts.map +1 -0
  233. package/dist/components/data-grid/tree/services/focus/focus-types.d.ts +25 -0
  234. package/dist/components/data-grid/tree/services/focus/focus-types.d.ts.map +1 -0
  235. package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts +27 -0
  236. package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts.map +1 -0
  237. package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts +8 -0
  238. package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts.map +1 -0
  239. package/dist/components/data-grid/tree/services/hooked/hooked.d.ts +3 -0
  240. package/dist/components/data-grid/tree/services/hooked/hooked.d.ts.map +1 -0
  241. package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts +2 -0
  242. package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts.map +1 -0
  243. package/dist/components/data-grid/tree/services/layout/layout-service.d.ts +5 -0
  244. package/dist/components/data-grid/tree/services/layout/layout-service.d.ts.map +1 -0
  245. package/dist/components/data-grid/tree/services/layout/layout-types.d.ts +124 -0
  246. package/dist/components/data-grid/tree/services/layout/layout-types.d.ts.map +1 -0
  247. package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts +50 -0
  248. package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts.map +1 -0
  249. package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts +5 -0
  250. package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts.map +1 -0
  251. package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts +43 -0
  252. package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts.map +1 -0
  253. package/dist/components/data-grid/tree/services/settings/settings-service.d.ts +5 -0
  254. package/dist/components/data-grid/tree/services/settings/settings-service.d.ts.map +1 -0
  255. package/dist/components/data-grid/tree/services/settings/settings-types.d.ts +73 -0
  256. package/dist/components/data-grid/tree/services/settings/settings-types.d.ts.map +1 -0
  257. package/dist/components/data-grid/tree/tree-types.d.ts +44 -0
  258. package/dist/components/data-grid/tree/tree-types.d.ts.map +1 -0
  259. package/dist/components/data-grid/tree/tree.d.ts +4 -0
  260. package/dist/components/data-grid/tree/tree.d.ts.map +1 -0
  261. package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts +89 -0
  262. package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts.map +1 -0
  263. package/dist/components/data-grid/tree-structure/tree-structure.d.ts +19 -0
  264. package/dist/components/data-grid/tree-structure/tree-structure.d.ts.map +1 -0
  265. package/dist/components/data-grid/utils/components-stack.d.ts +12 -0
  266. package/dist/components/data-grid/utils/components-stack.d.ts.map +1 -0
  267. package/dist/components/data-grid/utils/use-is-tablet-up.d.ts +3 -0
  268. package/dist/components/data-grid/utils/use-is-tablet-up.d.ts.map +1 -0
  269. package/dist/components/table/table.d.ts +20 -3
  270. package/dist/components/table/table.d.ts.map +1 -1
  271. package/dist/data-grid/actions-menu.d.ts +1 -0
  272. package/dist/data-grid/actions-menu.js +57 -0
  273. package/dist/data-grid/actions-menu.js.map +1 -0
  274. package/dist/data-grid/actions.d.ts +1 -0
  275. package/dist/data-grid/actions.js +36 -0
  276. package/dist/data-grid/actions.js.map +1 -0
  277. package/dist/data-grid/filters.d.ts +1 -0
  278. package/dist/data-grid/filters.js +1634 -0
  279. package/dist/data-grid/filters.js.map +1 -0
  280. package/dist/data-grid/pagination.js +41 -40
  281. package/dist/data-grid/pagination.js.map +1 -1
  282. package/dist/data-grid/row-actions.d.ts +1 -0
  283. package/dist/data-grid/row-actions.js +52 -0
  284. package/dist/data-grid/row-actions.js.map +1 -0
  285. package/dist/data-grid/row-click.d.ts +1 -0
  286. package/dist/data-grid/row-click.js +69 -0
  287. package/dist/data-grid/row-click.js.map +1 -0
  288. package/dist/data-grid/row-number.d.ts +1 -0
  289. package/dist/data-grid/row-number.js +38 -0
  290. package/dist/data-grid/row-number.js.map +1 -0
  291. package/dist/data-grid/row-select.d.ts +1 -0
  292. package/dist/data-grid/row-select.js +293 -0
  293. package/dist/data-grid/row-select.js.map +1 -0
  294. package/dist/data-grid/table-configuration.d.ts +1 -0
  295. package/dist/data-grid/table-configuration.js +165 -0
  296. package/dist/data-grid/table-configuration.js.map +1 -0
  297. package/dist/data-grid/text-search.js +55 -67
  298. package/dist/data-grid/text-search.js.map +1 -1
  299. package/dist/data-grid.js +901 -1009
  300. package/dist/data-grid.js.map +1 -1
  301. package/dist/docs/data-grid.md +504 -11
  302. package/dist/docs/table.md +57 -2
  303. package/dist/empty.js +34 -34
  304. package/dist/index.d.ts +8 -0
  305. package/dist/index.d.ts.map +1 -1
  306. package/dist/index.js +418 -393
  307. package/dist/index.js.map +1 -1
  308. package/dist/table.js +114 -112
  309. package/dist/table.js.map +1 -1
  310. package/llms.txt +9 -7
  311. package/package.json +1 -1
  312. package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
  313. package/dist/chunks/empty.DWqLrSfF.css +0 -1
  314. package/dist/chunks/pagination.BAAl9D_S.css +0 -1
  315. package/dist/chunks/table.CMm41tvy.css +0 -1
@@ -1,112 +1,100 @@
1
1
  "use client";
2
- import { jsx as n } from "react/jsx-runtime";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { d as W } from "../chunks/debounce.js";
3
4
  import { create as d } from "zustand";
4
- import { u as v, c as W } from "../chunks/plugins-helpers.js";
5
- import { cx as F } from "class-variance-authority";
6
- import { XIcon as q, SearchIcon as I } from "lucide-react";
7
- import { useRef as P } from "react";
5
+ import { u as F, c as q } from "../chunks/plugins-helpers.js";
6
+ import { cx as I } from "class-variance-authority";
7
+ import { XIcon as v, SearchIcon as P } from "lucide-react";
8
+ import { useRef as x } from "react";
8
9
  import { m as f } from "../chunks/messages.js";
9
- import { Input as x } from "../input.js";
10
- import { Button as k } from "../button.js";
11
- import '../chunks/text-search.BeZYac6V.css';function T(l, o) {
12
- let t, r, s;
13
- function a() {
14
- const c = r;
15
- return t = void 0, r = void 0, c && (s = l(...c)), s;
16
- }
17
- function i(...c) {
18
- return r = c, clearTimeout(t), t = setTimeout(a, o), s;
19
- }
20
- return i.cancel = () => {
21
- clearTimeout(t), t = void 0, r = void 0;
22
- }, i.flush = () => t === void 0 ? s : (clearTimeout(t), a()), i;
23
- }
24
- const b = "_searchInput_1wk82_1", K = "_searchInputFullWidth_1wk82_8", m = {
25
- searchInput: b,
26
- searchInputFullWidth: K
10
+ import { Input as k } from "../input.js";
11
+ import { Button as K } from "../button.js";
12
+ import '../chunks/text-search.BeZYac6V.css';const _ = "_searchInput_1wk82_1", b = "_searchInputFullWidth_1wk82_8", m = {
13
+ searchInput: _,
14
+ searchInputFullWidth: b
27
15
  };
28
- function _() {
29
- const l = v(), o = P(null), t = l.getPlugin("textSearch"), r = t.usePlaceholder(), s = t.useQuery(), a = t.useFullWidth(), i = r || f.textSearch.placeholder;
30
- function c() {
31
- var h;
32
- (h = o.current) == null || h.focus(), t.setSearch("");
16
+ function C() {
17
+ const r = F(), l = x(null), t = r.getPlugin("textSearch"), s = t.usePlaceholder(), a = t.useQuery(), i = t.useFullWidth(), n = s || f.textSearch.placeholder;
18
+ function h() {
19
+ var u;
20
+ (u = l.current) == null || u.focus(), t.setSearch("");
33
21
  }
34
- return /* @__PURE__ */ n("div", { className: F(m.searchInput, a && m.searchInputFullWidth), children: /* @__PURE__ */ n(
35
- x,
22
+ return /* @__PURE__ */ o("div", { className: I(m.searchInput, i && m.searchInputFullWidth), children: /* @__PURE__ */ o(
23
+ k,
36
24
  {
37
- ref: o,
25
+ ref: l,
38
26
  type: "search",
39
- value: s,
40
- placeholder: i,
41
- icon: /* @__PURE__ */ n(I, {}),
42
- end: s ? /* @__PURE__ */ n(
43
- k,
27
+ value: a,
28
+ placeholder: n,
29
+ icon: /* @__PURE__ */ o(P, {}),
30
+ end: a ? /* @__PURE__ */ o(
31
+ K,
44
32
  {
45
33
  variant: "ghost",
46
34
  size: "sm",
47
- icon: /* @__PURE__ */ n(q, {}),
35
+ icon: /* @__PURE__ */ o(v, {}),
48
36
  "aria-label": f.textSearch.clear,
49
- onClick: c
37
+ onClick: h
50
38
  }
51
39
  ) : void 0,
52
40
  onValueChange: t.updateSearch
53
41
  }
54
42
  ) });
55
43
  }
56
- const C = 300, D = "textSearch", M = W("textSearch", (l) => {
57
- const o = d(() => ({
44
+ const D = 300, V = "textSearch", O = q("textSearch", (r) => {
45
+ const l = d(() => ({
58
46
  placeholder: "",
59
- filterKey: D,
47
+ filterKey: V,
60
48
  fullWidth: !1
61
- })), t = l.registerPersistentState("textSearch", {
49
+ })), t = r.registerPersistentState("textSearch", {
62
50
  schema: { query: "string" }
63
- }), r = d(() => {
51
+ }), s = d(() => {
64
52
  var e;
65
53
  return {
66
54
  query: ((e = t.value) == null ? void 0 : e.query) ?? ""
67
55
  };
68
56
  });
69
- l.registerSlot("top-start", {
57
+ r.registerSlot("top-start", {
70
58
  id: "textSearch",
71
- component: () => /* @__PURE__ */ n(_, {})
59
+ component: () => /* @__PURE__ */ o(C, {})
72
60
  });
73
- const s = T(
74
- h,
75
- C
61
+ const a = W(
62
+ u,
63
+ D
76
64
  );
77
- return l.hook("load:context", () => {
78
- const { query: e } = r.getState();
65
+ return r.hook("load:context", () => {
66
+ const { query: e } = s.getState();
79
67
  if (!e) return;
80
- const { filterKey: u } = o.getState(), g = { value: e };
81
- return { filters: { [u]: g } };
82
- }), l.hook("refresh", (e) => {
83
- "resetFilters" in e && e.resetFilters && (s.cancel(), r.setState({ query: "" }), t.setValue(void 0));
84
- }), l.hook("destroy", () => {
85
- s.flush();
68
+ const { filterKey: c } = l.getState(), g = { value: e };
69
+ return { filters: { [c]: g } };
70
+ }), r.hook("refresh", (e) => {
71
+ "resetFilters" in e && e.resetFilters && (a.cancel(), s.setState({ query: "" }), t.setValue(void 0));
72
+ }), r.hook("destroy", () => {
73
+ a.flush();
86
74
  }), {
87
- useQuery: () => r((e) => e.query),
88
- usePlaceholder: () => o((e) => e.placeholder),
89
- useFullWidth: () => o((e) => e.fullWidth),
75
+ useQuery: () => s((e) => e.query),
76
+ usePlaceholder: () => l((e) => e.placeholder),
77
+ useFullWidth: () => l((e) => e.fullWidth),
90
78
  onPropsChange: y,
91
79
  setSearch: p,
92
80
  updateSearch: S
93
81
  };
94
- function h() {
95
- const { query: e } = r.getState();
96
- t.setValue(e ? { query: e } : void 0), l.refresh({ resetFilters: !1 });
82
+ function u() {
83
+ const { query: e } = s.getState();
84
+ t.setValue(e ? { query: e } : void 0), r.refresh({ resetFilters: !1 });
97
85
  }
98
86
  function S(e) {
99
- r.setState({ query: e }), s();
87
+ s.setState({ query: e }), a();
100
88
  }
101
89
  function p(e) {
102
- s.cancel(), r.setState({ query: e }), t.setValue(e ? { query: e } : void 0), l.refresh({ resetFilters: !1 });
90
+ a.cancel(), s.setState({ query: e }), t.setValue(e ? { query: e } : void 0), r.refresh({ resetFilters: !1 });
103
91
  }
104
92
  function y(e) {
105
- const u = {};
106
- e.filterKey !== void 0 && (u.filterKey = e.filterKey), e.placeholder !== void 0 && (u.placeholder = e.placeholder), e.fullWidth !== void 0 && (u.fullWidth = e.fullWidth), Object.keys(u).length > 0 && o.setState(u);
93
+ const c = {};
94
+ e.filterKey !== void 0 && (c.filterKey = e.filterKey), e.placeholder !== void 0 && (c.placeholder = e.placeholder), e.fullWidth !== void 0 && (c.fullWidth = e.fullWidth), Object.keys(c).length > 0 && l.setState(c);
107
95
  }
108
96
  });
109
97
  export {
110
- M as DataGridTextSearchPlugin
98
+ O as DataGridTextSearchPlugin
111
99
  };
112
100
  //# sourceMappingURL=text-search.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-search.js","sources":["../../src/components/data-grid/utils/debounce.ts","../../src/components/data-grid/plugins/text-search/components/data-grid-text-search.tsx","../../src/components/data-grid/plugins/text-search/text-search-plugin.tsx"],"sourcesContent":["/*\n * A trailing-edge debounce with `cancel` and `flush`: the part of lodash.debounce's default\n * behaviour the grid relies on. A call restarts the wait, the last call's arguments are the\n * ones that run, `flush` runs a pending call now, and `cancel` drops it.\n */\nexport interface Debounced<Args extends unknown[], Result> {\n (...args: Args): Result | undefined;\n cancel: () => void;\n flush: () => Result | undefined;\n}\n\nexport function debounce<Args extends unknown[], Result>(\n fn: (...args: Args) => Result,\n waitMs: number,\n): Debounced<Args, Result> {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let pendingArgs: Args | undefined;\n let result: Result | undefined;\n\n function run() {\n const args = pendingArgs;\n timer = undefined;\n pendingArgs = undefined;\n if (args) {\n result = fn(...args);\n }\n return result;\n }\n\n function debounced(...args: Args) {\n pendingArgs = args;\n clearTimeout(timer);\n timer = setTimeout(run, waitMs);\n return result;\n }\n\n debounced.cancel = () => {\n clearTimeout(timer);\n timer = undefined;\n pendingArgs = undefined;\n };\n\n debounced.flush = () => {\n if (timer === undefined) return result;\n clearTimeout(timer);\n return run();\n };\n\n return debounced;\n}\n","import { cx } from 'class-variance-authority';\nimport { SearchIcon, XIcon } from 'lucide-react';\nimport { useRef } from 'react';\n\nimport { Button } from '../../../../button/public.js';\nimport { Input } from '../../../../input/public.js';\nimport { messages } from '../../../messages';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport type { DataGridTextSearchPluginApi } from '../text-search-plugin';\nimport styles from './data-grid-text-search.module.css';\n\nexport function DataGridTextSearch() {\n const grid = useDataGrid();\n const inputRef = useRef<HTMLInputElement>(null);\n const textSearchPlugin = grid.getPlugin<DataGridTextSearchPluginApi>('textSearch')!;\n\n const customPlaceholder = textSearchPlugin.usePlaceholder();\n const query = textSearchPlugin.useQuery();\n const fullWidth = textSearchPlugin.useFullWidth();\n\n const placeholder = customPlaceholder || messages.textSearch.placeholder;\n\n function handleClear() {\n // Focus first: the clear button unmounts once the query is empty, and a focused element that\n // unmounts leaves focus on the page behind.\n inputRef.current?.focus();\n textSearchPlugin.setSearch('');\n }\n\n return (\n <div className={cx(styles.searchInput, fullWidth && styles.searchInputFullWidth)}>\n <Input\n ref={inputRef}\n type=\"search\"\n value={query}\n placeholder={placeholder}\n icon={<SearchIcon />}\n end={\n query ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<XIcon />}\n aria-label={messages.textSearch.clear}\n onClick={handleClear}\n />\n ) : undefined\n }\n onValueChange={textSearchPlugin.updateSearch}\n />\n </div>\n );\n}\n","// Load-bearing: a plugin is rendered as a child of <DataGrid>, so a Server Component can import\n// and render it, and the component it returns calls hooks. This directive puts the banner on the\n// plugin's own entry chunk (dist/data-grid/<plugin>.js). client-boundaries.test.ts only scans a\n// component's top-level files, so scripts/verify-consumer.sh is what checks the built banner of\n// every plugin entry.\n'use client';\n\nimport { debounce, type Debounced } from '../../utils/debounce';\nimport { create } from 'zustand';\nimport type { DataGridItem } from '../../data-grid-types';\nimport { createDataGridPlugin } from '../../services/plugins/plugins-helpers';\nimport { DataGridTextSearch } from './components/data-grid-text-search';\n\ninterface TextSearchStore {\n query: string;\n}\n\ninterface TextSearchConfigStore {\n placeholder: string;\n filterKey: string;\n fullWidth: boolean;\n}\n\n/**\n * The value this plugin contributes to the grid's load context, keyed by `filterKey`\n * (default `\"textSearch\"`). The `load` callback reads it as `filters[filterKey]` and\n * forwards `value` to the request — the plugin renders the search box but does not wire\n * the value to the backend itself.\n */\nexport interface DataGridTextSearchFilterValue {\n value: string;\n}\n\nexport interface DataGridTextSearchPluginProps {\n /**\n * Key this plugin writes its value under in the load context (default `\"textSearch\"`).\n * Read it in `load` as `filters[filterKey]`, typed {@link DataGridTextSearchFilterValue}.\n */\n filterKey?: string;\n placeholder?: string;\n fullWidth?: boolean;\n}\n\nexport interface DataGridTextSearchPluginApi {\n useQuery: () => string;\n usePlaceholder: () => string;\n useFullWidth: () => boolean;\n onPropsChange: (props: DataGridTextSearchPluginProps) => void;\n setSearch: (value: string) => void;\n updateSearch: (value: string) => void;\n}\n\nconst defaultDebounceMs = 300;\nconst defaultFilterKey = 'textSearch';\n\n/**\n * Text-search toolbar plugin for `DataGrid`. Renders a debounced search box and\n * contributes its value to the load context as `filters[filterKey] = { value }`\n * (default key `\"textSearch\"`).\n *\n * Wiring is not automatic: the grid's `load` callback must read the value and pass it to\n * the request — e.g. `const query = filters.textSearch?.value` — otherwise the box renders\n * but search does nothing. See {@link DataGridTextSearchFilterValue}.\n */\nexport const DataGridTextSearchPlugin = createDataGridPlugin<\n DataGridItem,\n 'textSearch',\n DataGridTextSearchPluginProps\n>('textSearch', (context) => {\n const useConfigStore = create<TextSearchConfigStore>(() => ({\n placeholder: '',\n filterKey: defaultFilterKey,\n fullWidth: false,\n }));\n\n const persistent = context.registerPersistentState<{ query?: string }>('textSearch', {\n schema: { query: 'string' },\n });\n\n const useTextSearchStore = create<TextSearchStore>(() => ({\n query: persistent.value?.query ?? '',\n }));\n\n context.registerSlot('top-start', {\n id: 'textSearch',\n component: () => <DataGridTextSearch />,\n });\n\n const debouncedRefresh: Debounced<[], void> = debounce(\n commitSearch,\n defaultDebounceMs,\n );\n\n context.hook('load:context', () => {\n const { query } = useTextSearchStore.getState();\n if (!query) return;\n const { filterKey } = useConfigStore.getState();\n const filterValue: DataGridTextSearchFilterValue = { value: query };\n return { filters: { [filterKey]: filterValue } };\n });\n\n context.hook('refresh', (options: object) => {\n if ('resetFilters' in options && options.resetFilters) {\n debouncedRefresh.cancel();\n useTextSearchStore.setState({ query: '' });\n persistent.setValue(undefined);\n }\n });\n\n context.hook('destroy', () => {\n debouncedRefresh.flush();\n });\n\n const useQuery = () => useTextSearchStore((s) => s.query);\n const usePlaceholder = () => useConfigStore((s) => s.placeholder);\n const useFullWidth = () => useConfigStore((s) => s.fullWidth);\n\n return {\n useQuery,\n usePlaceholder,\n useFullWidth,\n onPropsChange,\n setSearch,\n updateSearch,\n };\n\n function commitSearch() {\n const { query } = useTextSearchStore.getState();\n persistent.setValue(query ? { query } : undefined);\n context.refresh({ resetFilters: false });\n }\n\n function updateSearch(value: string) {\n useTextSearchStore.setState({ query: value });\n debouncedRefresh();\n }\n\n function setSearch(value: string) {\n debouncedRefresh.cancel();\n useTextSearchStore.setState({ query: value });\n persistent.setValue(value ? { query: value } : undefined);\n context.refresh({ resetFilters: false });\n }\n\n function onPropsChange(props: DataGridTextSearchPluginProps) {\n const configUpdates: Partial<TextSearchConfigStore> = {};\n\n if (props.filterKey !== undefined) {\n configUpdates.filterKey = props.filterKey;\n }\n if (props.placeholder !== undefined) {\n configUpdates.placeholder = props.placeholder;\n }\n if (props.fullWidth !== undefined) {\n configUpdates.fullWidth = props.fullWidth;\n }\n\n if (Object.keys(configUpdates).length > 0) {\n useConfigStore.setState(configUpdates);\n }\n }\n});\n"],"names":["debounce","fn","waitMs","timer","pendingArgs","result","run","args","debounced","DataGridTextSearch","grid","useDataGrid","inputRef","useRef","textSearchPlugin","customPlaceholder","query","fullWidth","placeholder","messages","handleClear","_a","jsx","cx","styles","Input","SearchIcon","Button","XIcon","defaultDebounceMs","defaultFilterKey","DataGridTextSearchPlugin","createDataGridPlugin","context","useConfigStore","create","persistent","useTextSearchStore","debouncedRefresh","commitSearch","filterKey","filterValue","options","s","onPropsChange","setSearch","updateSearch","value","props","configUpdates"],"mappings":";;;;;;;;;;AAWO,SAASA,EACdC,GACAC,GACyB;AACzB,MAAIC,GACAC,GACAC;AAEJ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gBALqB,MAAMT,EAAe,CAACS,MAAMA,EAAE,WAAW;AAAA,IAM9D,cALmB,MAAMT,EAAe,CAACS,MAAMA,EAAE,SAAS;AAAA,IAM1D,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EAAA;AAGF,WAASP,IAAe;AACtB,UAAM,EAAE,OAAAvB,EAAA,IAAUqB,EAAmB,SAAA;AACrC,IAAAD,EAAW,SAASpB,IAAQ,EAAE,OAAAA,EAAA,IAAU,MAAS,GACjDiB,EAAQ,QAAQ,EAAE,cAAc,GAAA,CAAO;AAAA,EACzC;AAEA,WAASa,EAAaC,GAAe;AACnC,IAAAV,EAAmB,SAAS,EAAE,OAAOU,EAAA,CAAO,GAC5CT,EAAA;AAAA,EACF;AAEA,WAASO,EAAUE,GAAe;AAChC,IAAAT,EAAiB,OAAA,GACjBD,EAAmB,SAAS,EAAE,OAAOU,EAAA,CAAO,GAC5CX,EAAW,SAASW,IAAQ,EAAE,OAAOA,EAAA,IAAU,MAAS,GACxDd,EAAQ,QAAQ,EAAE,cAAc,GAAA,CAAO;AAAA,EACzC;AAEA,WAASW,EAAcI,GAAsC;AAC3D,UAAMC,IAAgD,CAAA;AAEtD,IAAID,EAAM,cAAc,WACtBC,EAAc,YAAYD,EAAM,YAE9BA,EAAM,gBAAgB,WACxBC,EAAc,cAAcD,EAAM,cAEhCA,EAAM,cAAc,WACtBC,EAAc,YAAYD,EAAM,YAG9B,OAAO,KAAKC,CAAa,EAAE,SAAS,KACtCf,EAAe,SAASe,CAAa;AAAA,EAEzC;AACF,CAAC;"}
1
+ {"version":3,"file":"text-search.js","sources":["../../src/components/data-grid/plugins/text-search/components/data-grid-text-search.tsx","../../src/components/data-grid/plugins/text-search/text-search-plugin.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { SearchIcon, XIcon } from 'lucide-react';\nimport { useRef } from 'react';\n\nimport { Button } from '../../../../button/public.js';\nimport { Input } from '../../../../input/public.js';\nimport { messages } from '../../../messages';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport type { DataGridTextSearchPluginApi } from '../text-search-plugin';\nimport styles from './data-grid-text-search.module.css';\n\nexport function DataGridTextSearch() {\n const grid = useDataGrid();\n const inputRef = useRef<HTMLInputElement>(null);\n const textSearchPlugin = grid.getPlugin<DataGridTextSearchPluginApi>('textSearch')!;\n\n const customPlaceholder = textSearchPlugin.usePlaceholder();\n const query = textSearchPlugin.useQuery();\n const fullWidth = textSearchPlugin.useFullWidth();\n\n const placeholder = customPlaceholder || messages.textSearch.placeholder;\n\n function handleClear() {\n // Focus first: the clear button unmounts once the query is empty, and a focused element that\n // unmounts leaves focus on the page behind.\n inputRef.current?.focus();\n textSearchPlugin.setSearch('');\n }\n\n return (\n <div className={cx(styles.searchInput, fullWidth && styles.searchInputFullWidth)}>\n <Input\n ref={inputRef}\n type=\"search\"\n value={query}\n placeholder={placeholder}\n icon={<SearchIcon />}\n end={\n query ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<XIcon />}\n aria-label={messages.textSearch.clear}\n onClick={handleClear}\n />\n ) : undefined\n }\n onValueChange={textSearchPlugin.updateSearch}\n />\n </div>\n );\n}\n","// Load-bearing: a plugin is rendered as a child of <DataGrid>, so a Server Component can import\n// and render it, and the component it returns calls hooks. This directive puts the banner on the\n// plugin's own entry chunk (dist/data-grid/<plugin>.js). client-boundaries.test.ts only scans a\n// component's top-level files, so scripts/verify-consumer.sh is what checks the built banner of\n// every plugin entry.\n'use client';\n\nimport { debounce, type Debounced } from '../../utils/debounce';\nimport { create } from 'zustand';\nimport type { DataGridItem } from '../../data-grid-types';\nimport { createDataGridPlugin } from '../../services/plugins/plugins-helpers';\nimport { DataGridTextSearch } from './components/data-grid-text-search';\n\ninterface TextSearchStore {\n query: string;\n}\n\ninterface TextSearchConfigStore {\n placeholder: string;\n filterKey: string;\n fullWidth: boolean;\n}\n\n/**\n * The value this plugin contributes to the grid's load context, keyed by `filterKey`\n * (default `\"textSearch\"`). The `load` callback reads it as `filters[filterKey]` and\n * forwards `value` to the request — the plugin renders the search box but does not wire\n * the value to the backend itself.\n */\nexport interface DataGridTextSearchFilterValue {\n value: string;\n}\n\nexport interface DataGridTextSearchPluginProps {\n /**\n * Key this plugin writes its value under in the load context (default `\"textSearch\"`).\n * Read it in `load` as `filters[filterKey]`, typed {@link DataGridTextSearchFilterValue}.\n */\n filterKey?: string;\n placeholder?: string;\n fullWidth?: boolean;\n}\n\nexport interface DataGridTextSearchPluginApi {\n useQuery: () => string;\n usePlaceholder: () => string;\n useFullWidth: () => boolean;\n onPropsChange: (props: DataGridTextSearchPluginProps) => void;\n setSearch: (value: string) => void;\n updateSearch: (value: string) => void;\n}\n\nconst defaultDebounceMs = 300;\nconst defaultFilterKey = 'textSearch';\n\n/**\n * Text-search toolbar plugin for `DataGrid`. Renders a debounced search box and\n * contributes its value to the load context as `filters[filterKey] = { value }`\n * (default key `\"textSearch\"`).\n *\n * Wiring is not automatic: the grid's `load` callback must read the value and pass it to\n * the request — e.g. `const query = filters.textSearch?.value` — otherwise the box renders\n * but search does nothing. See {@link DataGridTextSearchFilterValue}.\n */\nexport const DataGridTextSearchPlugin = createDataGridPlugin<\n DataGridItem,\n 'textSearch',\n DataGridTextSearchPluginProps\n>('textSearch', (context) => {\n const useConfigStore = create<TextSearchConfigStore>(() => ({\n placeholder: '',\n filterKey: defaultFilterKey,\n fullWidth: false,\n }));\n\n const persistent = context.registerPersistentState<{ query?: string }>('textSearch', {\n schema: { query: 'string' },\n });\n\n const useTextSearchStore = create<TextSearchStore>(() => ({\n query: persistent.value?.query ?? '',\n }));\n\n context.registerSlot('top-start', {\n id: 'textSearch',\n component: () => <DataGridTextSearch />,\n });\n\n const debouncedRefresh: Debounced<[], void> = debounce(\n commitSearch,\n defaultDebounceMs,\n );\n\n context.hook('load:context', () => {\n const { query } = useTextSearchStore.getState();\n if (!query) return;\n const { filterKey } = useConfigStore.getState();\n const filterValue: DataGridTextSearchFilterValue = { value: query };\n return { filters: { [filterKey]: filterValue } };\n });\n\n context.hook('refresh', (options: object) => {\n if ('resetFilters' in options && options.resetFilters) {\n debouncedRefresh.cancel();\n useTextSearchStore.setState({ query: '' });\n persistent.setValue(undefined);\n }\n });\n\n context.hook('destroy', () => {\n debouncedRefresh.flush();\n });\n\n const useQuery = () => useTextSearchStore((s) => s.query);\n const usePlaceholder = () => useConfigStore((s) => s.placeholder);\n const useFullWidth = () => useConfigStore((s) => s.fullWidth);\n\n return {\n useQuery,\n usePlaceholder,\n useFullWidth,\n onPropsChange,\n setSearch,\n updateSearch,\n };\n\n function commitSearch() {\n const { query } = useTextSearchStore.getState();\n persistent.setValue(query ? { query } : undefined);\n context.refresh({ resetFilters: false });\n }\n\n function updateSearch(value: string) {\n useTextSearchStore.setState({ query: value });\n debouncedRefresh();\n }\n\n function setSearch(value: string) {\n debouncedRefresh.cancel();\n useTextSearchStore.setState({ query: value });\n persistent.setValue(value ? { query: value } : undefined);\n context.refresh({ resetFilters: false });\n }\n\n function onPropsChange(props: DataGridTextSearchPluginProps) {\n const configUpdates: Partial<TextSearchConfigStore> = {};\n\n if (props.filterKey !== undefined) {\n configUpdates.filterKey = props.filterKey;\n }\n if (props.placeholder !== undefined) {\n configUpdates.placeholder = props.placeholder;\n }\n if (props.fullWidth !== undefined) {\n configUpdates.fullWidth = props.fullWidth;\n }\n\n if (Object.keys(configUpdates).length > 0) {\n useConfigStore.setState(configUpdates);\n }\n }\n});\n"],"names":["DataGridTextSearch","grid","useDataGrid","inputRef","useRef","textSearchPlugin","customPlaceholder","query","fullWidth","placeholder","messages","handleClear","_a","jsx","cx","styles","Input","SearchIcon","Button","XIcon","defaultDebounceMs","defaultFilterKey","DataGridTextSearchPlugin","createDataGridPlugin","context","useConfigStore","create","persistent","useTextSearchStore","debouncedRefresh","debounce","commitSearch","filterKey","filterValue","options","s","onPropsChange","setSearch","updateSearch","value","props","configUpdates"],"mappings":";;;;;;;;;;;;;;;AAWO,SAASA,IAAqB;AACnC,QAAMC,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