@wordpress/dataviews 2.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +23 -8
  3. package/build/components/dataform/index.js +78 -0
  4. package/build/components/dataform/index.js.map +1 -0
  5. package/build/components/dataviews/index.js +115 -0
  6. package/build/components/dataviews/index.js.map +1 -0
  7. package/build/{bulk-actions.js → components/dataviews-bulk-actions/index.js} +39 -16
  8. package/build/components/dataviews-bulk-actions/index.js.map +1 -0
  9. package/build/{bulk-actions-toolbar.js → components/dataviews-bulk-actions-toolbar/index.js} +36 -20
  10. package/build/components/dataviews-bulk-actions-toolbar/index.js.map +1 -0
  11. package/build/components/dataviews-context/index.js +36 -0
  12. package/build/components/dataviews-context/index.js.map +1 -0
  13. package/build/{add-filter.js → components/dataviews-filters/add-filter.js} +3 -3
  14. package/build/components/dataviews-filters/add-filter.js.map +1 -0
  15. package/build/{filter-summary.js → components/dataviews-filters/filter-summary.js} +15 -14
  16. package/build/components/dataviews-filters/filter-summary.js.map +1 -0
  17. package/build/{filters.js → components/dataviews-filters/index.js} +15 -16
  18. package/build/components/dataviews-filters/index.js.map +1 -0
  19. package/build/{reset-filters.js → components/dataviews-filters/reset-filters.js} +1 -1
  20. package/build/components/dataviews-filters/reset-filters.js.map +1 -0
  21. package/build/{search-widget.js → components/dataviews-filters/search-widget.js} +21 -19
  22. package/build/components/dataviews-filters/search-widget.js.map +1 -0
  23. package/build/{item-actions.js → components/dataviews-item-actions/index.js} +3 -3
  24. package/build/components/dataviews-item-actions/index.js.map +1 -0
  25. package/build/components/dataviews-layout/index.js +53 -0
  26. package/build/components/dataviews-layout/index.js.map +1 -0
  27. package/build/{pagination.js → components/dataviews-pagination/index.js} +18 -15
  28. package/build/components/dataviews-pagination/index.js.map +1 -0
  29. package/build/{search.js → components/dataviews-search/index.js} +10 -6
  30. package/build/components/dataviews-search/index.js.map +1 -0
  31. package/build/components/dataviews-selection-checkbox/index.js +52 -0
  32. package/build/components/dataviews-selection-checkbox/index.js.map +1 -0
  33. package/build/{view-actions.js → components/dataviews-view-config/index.js} +94 -80
  34. package/build/components/dataviews-view-config/index.js.map +1 -0
  35. package/build/filter-and-sort-data-view.js +4 -1
  36. package/build/filter-and-sort-data-view.js.map +1 -1
  37. package/build/index.js +8 -1
  38. package/build/index.js.map +1 -1
  39. package/build/layouts/grid/density-picker.js +143 -0
  40. package/build/layouts/grid/density-picker.js.map +1 -0
  41. package/build/{view-grid.js → layouts/grid/index.js} +40 -53
  42. package/build/layouts/grid/index.js.map +1 -0
  43. package/build/layouts/index.js +52 -0
  44. package/build/layouts/index.js.map +1 -0
  45. package/build/{view-list.js → layouts/list/index.js} +31 -27
  46. package/build/layouts/list/index.js.map +1 -0
  47. package/build/layouts/table/column-header-menu.js +196 -0
  48. package/build/layouts/table/column-header-menu.js.map +1 -0
  49. package/build/layouts/table/index.js +350 -0
  50. package/build/layouts/table/index.js.map +1 -0
  51. package/build/normalize-fields.js +1 -1
  52. package/build/normalize-fields.js.map +1 -1
  53. package/build/private-types.js +6 -0
  54. package/build/private-types.js.map +1 -0
  55. package/build/types.js.map +1 -1
  56. package/build/utils.js.map +1 -1
  57. package/build-module/components/dataform/index.js +72 -0
  58. package/build-module/components/dataform/index.js.map +1 -0
  59. package/build-module/components/dataviews/index.js +108 -0
  60. package/build-module/components/dataviews/index.js.map +1 -0
  61. package/build-module/{bulk-actions.js → components/dataviews-bulk-actions/index.js} +39 -17
  62. package/build-module/components/dataviews-bulk-actions/index.js.map +1 -0
  63. package/build-module/{bulk-actions-toolbar.js → components/dataviews-bulk-actions-toolbar/index.js} +35 -20
  64. package/build-module/components/dataviews-bulk-actions-toolbar/index.js.map +1 -0
  65. package/build-module/components/dataviews-context/index.js +30 -0
  66. package/build-module/components/dataviews-context/index.js.map +1 -0
  67. package/build-module/{add-filter.js → components/dataviews-filters/add-filter.js} +3 -3
  68. package/build-module/components/dataviews-filters/add-filter.js.map +1 -0
  69. package/build-module/{filter-summary.js → components/dataviews-filters/filter-summary.js} +15 -14
  70. package/build-module/components/dataviews-filters/filter-summary.js.map +1 -0
  71. package/build-module/{filters.js → components/dataviews-filters/index.js} +16 -17
  72. package/build-module/components/dataviews-filters/index.js.map +1 -0
  73. package/build-module/{reset-filters.js → components/dataviews-filters/reset-filters.js} +1 -1
  74. package/build-module/components/dataviews-filters/reset-filters.js.map +1 -0
  75. package/build-module/{search-widget.js → components/dataviews-filters/search-widget.js} +21 -19
  76. package/build-module/components/dataviews-filters/search-widget.js.map +1 -0
  77. package/build-module/{item-actions.js → components/dataviews-item-actions/index.js} +3 -3
  78. package/build-module/components/dataviews-item-actions/index.js.map +1 -0
  79. package/build-module/components/dataviews-layout/index.js +45 -0
  80. package/build-module/components/dataviews-layout/index.js.map +1 -0
  81. package/build-module/{pagination.js → components/dataviews-pagination/index.js} +19 -17
  82. package/build-module/components/dataviews-pagination/index.js.map +1 -0
  83. package/build-module/{search.js → components/dataviews-search/index.js} +10 -7
  84. package/build-module/components/dataviews-search/index.js.map +1 -0
  85. package/build-module/components/dataviews-selection-checkbox/index.js +45 -0
  86. package/build-module/components/dataviews-selection-checkbox/index.js.map +1 -0
  87. package/build-module/{view-actions.js → components/dataviews-view-config/index.js} +98 -84
  88. package/build-module/components/dataviews-view-config/index.js.map +1 -0
  89. package/build-module/filter-and-sort-data-view.js +4 -1
  90. package/build-module/filter-and-sort-data-view.js.map +1 -1
  91. package/build-module/index.js +2 -1
  92. package/build-module/index.js.map +1 -1
  93. package/build-module/layouts/grid/density-picker.js +138 -0
  94. package/build-module/layouts/grid/density-picker.js.map +1 -0
  95. package/build-module/{view-grid.js → layouts/grid/index.js} +37 -50
  96. package/build-module/layouts/grid/index.js.map +1 -0
  97. package/build-module/layouts/index.js +43 -0
  98. package/build-module/layouts/index.js.map +1 -0
  99. package/build-module/{view-list.js → layouts/list/index.js} +29 -25
  100. package/build-module/layouts/list/index.js.map +1 -0
  101. package/build-module/layouts/table/column-header-menu.js +190 -0
  102. package/build-module/layouts/table/column-header-menu.js.map +1 -0
  103. package/build-module/layouts/table/index.js +344 -0
  104. package/build-module/layouts/table/index.js.map +1 -0
  105. package/build-module/normalize-fields.js +1 -1
  106. package/build-module/normalize-fields.js.map +1 -1
  107. package/build-module/private-types.js +2 -0
  108. package/build-module/private-types.js.map +1 -0
  109. package/build-module/types.js.map +1 -1
  110. package/build-module/utils.js.map +1 -1
  111. package/build-style/style-rtl.css +607 -561
  112. package/build-style/style.css +607 -561
  113. package/build-types/components/dataform/index.d.ts +17 -0
  114. package/build-types/components/dataform/index.d.ts.map +1 -0
  115. package/build-types/components/dataform/stories/index.story.d.ts +11 -0
  116. package/build-types/components/dataform/stories/index.story.d.ts.map +1 -0
  117. package/build-types/components/dataviews/index.d.ts +33 -0
  118. package/build-types/components/dataviews/index.d.ts.map +1 -0
  119. package/build-types/{stories → components/dataviews/stories}/fixtures.d.ts +18 -17
  120. package/build-types/components/dataviews/stories/fixtures.d.ts.map +1 -0
  121. package/build-types/components/dataviews/stories/index.story.d.ts +46 -0
  122. package/build-types/components/dataviews/stories/index.story.d.ts.map +1 -0
  123. package/build-types/components/dataviews-bulk-actions/index.d.ts +5 -0
  124. package/build-types/components/dataviews-bulk-actions/index.d.ts.map +1 -0
  125. package/build-types/components/dataviews-bulk-actions-toolbar/index.d.ts +2 -0
  126. package/build-types/components/dataviews-bulk-actions-toolbar/index.d.ts.map +1 -0
  127. package/build-types/components/dataviews-context/index.d.ts +26 -0
  128. package/build-types/components/dataviews-context/index.d.ts.map +1 -0
  129. package/build-types/{add-filter.d.ts → components/dataviews-filters/add-filter.d.ts} +1 -2
  130. package/build-types/components/dataviews-filters/add-filter.d.ts.map +1 -0
  131. package/build-types/{filter-summary.d.ts → components/dataviews-filters/filter-summary.d.ts} +1 -1
  132. package/build-types/components/dataviews-filters/filter-summary.d.ts.map +1 -0
  133. package/build-types/components/dataviews-filters/index.d.ts +4 -0
  134. package/build-types/components/dataviews-filters/index.d.ts.map +1 -0
  135. package/build-types/{reset-filters.d.ts → components/dataviews-filters/reset-filters.d.ts} +1 -2
  136. package/build-types/components/dataviews-filters/reset-filters.d.ts.map +1 -0
  137. package/build-types/{search-widget.d.ts → components/dataviews-filters/search-widget.d.ts} +1 -2
  138. package/build-types/components/dataviews-filters/search-widget.d.ts.map +1 -0
  139. package/build-types/components/dataviews-item-actions/index.d.ts +35 -0
  140. package/build-types/components/dataviews-item-actions/index.d.ts.map +1 -0
  141. package/build-types/components/dataviews-layout/index.d.ts +2 -0
  142. package/build-types/components/dataviews-layout/index.d.ts.map +1 -0
  143. package/build-types/components/dataviews-pagination/index.d.ts +4 -0
  144. package/build-types/components/dataviews-pagination/index.d.ts.map +1 -0
  145. package/build-types/components/dataviews-search/index.d.ts +6 -0
  146. package/build-types/components/dataviews-search/index.d.ts.map +1 -0
  147. package/build-types/components/dataviews-selection-checkbox/index.d.ts +16 -0
  148. package/build-types/components/dataviews-selection-checkbox/index.d.ts.map +1 -0
  149. package/build-types/components/dataviews-view-config/index.d.ts +8 -0
  150. package/build-types/components/dataviews-view-config/index.d.ts.map +1 -0
  151. package/build-types/filter-and-sort-data-view.d.ts +2 -2
  152. package/build-types/filter-and-sort-data-view.d.ts.map +1 -1
  153. package/build-types/index.d.ts +2 -1
  154. package/build-types/index.d.ts.map +1 -1
  155. package/build-types/layouts/grid/density-picker.d.ts +5 -0
  156. package/build-types/layouts/grid/density-picker.d.ts.map +1 -0
  157. package/build-types/layouts/grid/index.d.ts +3 -0
  158. package/build-types/layouts/grid/index.d.ts.map +1 -0
  159. package/build-types/{layouts.d.ts → layouts/index.d.ts} +6 -5
  160. package/build-types/layouts/index.d.ts.map +1 -0
  161. package/build-types/layouts/list/index.d.ts +3 -0
  162. package/build-types/layouts/list/index.d.ts.map +1 -0
  163. package/build-types/layouts/table/column-header-menu.d.ts +17 -0
  164. package/build-types/layouts/table/column-header-menu.d.ts.map +1 -0
  165. package/build-types/layouts/table/index.d.ts +4 -0
  166. package/build-types/layouts/table/index.d.ts.map +1 -0
  167. package/build-types/normalize-fields.d.ts +2 -2
  168. package/build-types/normalize-fields.d.ts.map +1 -1
  169. package/build-types/private-types.d.ts +3 -0
  170. package/build-types/private-types.d.ts.map +1 -0
  171. package/build-types/types.d.ts +106 -46
  172. package/build-types/types.d.ts.map +1 -1
  173. package/build-types/utils.d.ts +2 -2
  174. package/build-types/utils.d.ts.map +1 -1
  175. package/package.json +10 -10
  176. package/src/components/dataform/index.tsx +106 -0
  177. package/src/components/dataform/stories/index.story.tsx +42 -0
  178. package/src/components/dataviews/index.tsx +149 -0
  179. package/src/{stories → components/dataviews/stories}/fixtures.js +23 -11
  180. package/src/components/dataviews/stories/index.story.js +65 -0
  181. package/src/components/dataviews/style.scss +97 -0
  182. package/src/{bulk-actions.tsx → components/dataviews-bulk-actions/index.tsx} +58 -36
  183. package/src/components/dataviews-bulk-actions/style.scss +7 -0
  184. package/src/{bulk-actions-toolbar.tsx → components/dataviews-bulk-actions-toolbar/index.tsx} +48 -36
  185. package/src/components/dataviews-bulk-actions-toolbar/style.scss +45 -0
  186. package/src/components/dataviews-context/index.ts +49 -0
  187. package/src/{add-filter.tsx → components/dataviews-filters/add-filter.tsx} +4 -4
  188. package/src/{filter-summary.tsx → components/dataviews-filters/filter-summary.tsx} +36 -22
  189. package/src/{filters.tsx → components/dataviews-filters/index.tsx} +11 -25
  190. package/src/{reset-filters.tsx → components/dataviews-filters/reset-filters.tsx} +2 -2
  191. package/src/{search-widget.tsx → components/dataviews-filters/search-widget.tsx} +20 -20
  192. package/src/components/dataviews-filters/style.scss +252 -0
  193. package/src/{item-actions.tsx → components/dataviews-item-actions/index.tsx} +16 -17
  194. package/src/components/dataviews-item-actions/style.scss +3 -0
  195. package/src/components/dataviews-layout/index.tsx +51 -0
  196. package/src/{pagination.tsx → components/dataviews-pagination/index.tsx} +15 -23
  197. package/src/components/dataviews-pagination/style.scss +26 -0
  198. package/src/{search.tsx → components/dataviews-search/index.tsx} +5 -10
  199. package/src/components/dataviews-selection-checkbox/index.tsx +65 -0
  200. package/src/components/dataviews-selection-checkbox/style.scss +14 -0
  201. package/src/{view-actions.tsx → components/dataviews-view-config/index.tsx} +116 -119
  202. package/src/filter-and-sort-data-view.ts +13 -3
  203. package/src/index.ts +2 -1
  204. package/src/layouts/grid/density-picker.tsx +136 -0
  205. package/src/{view-grid.tsx → layouts/grid/index.tsx} +45 -63
  206. package/src/layouts/grid/style.scss +140 -0
  207. package/src/layouts/index.ts +66 -0
  208. package/src/{view-list.tsx → layouts/list/index.tsx} +40 -30
  209. package/src/layouts/list/style.scss +189 -0
  210. package/src/layouts/table/column-header-menu.tsx +268 -0
  211. package/src/layouts/table/index.tsx +471 -0
  212. package/src/layouts/table/style.scss +201 -0
  213. package/src/normalize-fields.ts +6 -4
  214. package/src/private-types.tsx +2 -0
  215. package/src/style.scss +11 -919
  216. package/src/test/filter-and-sort-data-view.js +17 -2
  217. package/src/types.ts +113 -55
  218. package/src/utils.ts +2 -4
  219. package/tsconfig.tsbuildinfo +1 -1
  220. package/build/add-filter.js.map +0 -1
  221. package/build/bulk-actions-toolbar.js.map +0 -1
  222. package/build/bulk-actions.js.map +0 -1
  223. package/build/dataviews.js +0 -136
  224. package/build/dataviews.js.map +0 -1
  225. package/build/filter-summary.js.map +0 -1
  226. package/build/filters.js.map +0 -1
  227. package/build/item-actions.js.map +0 -1
  228. package/build/layouts.js +0 -38
  229. package/build/layouts.js.map +0 -1
  230. package/build/pagination.js.map +0 -1
  231. package/build/reset-filters.js.map +0 -1
  232. package/build/search-widget.js.map +0 -1
  233. package/build/search.js.map +0 -1
  234. package/build/single-selection-checkbox.js +0 -63
  235. package/build/single-selection-checkbox.js.map +0 -1
  236. package/build/view-actions.js.map +0 -1
  237. package/build/view-grid.js.map +0 -1
  238. package/build/view-list.js.map +0 -1
  239. package/build/view-table.js +0 -409
  240. package/build/view-table.js.map +0 -1
  241. package/build-module/add-filter.js.map +0 -1
  242. package/build-module/bulk-actions-toolbar.js.map +0 -1
  243. package/build-module/bulk-actions.js.map +0 -1
  244. package/build-module/dataviews.js +0 -129
  245. package/build-module/dataviews.js.map +0 -1
  246. package/build-module/filter-summary.js.map +0 -1
  247. package/build-module/filters.js.map +0 -1
  248. package/build-module/item-actions.js.map +0 -1
  249. package/build-module/layouts.js +0 -30
  250. package/build-module/layouts.js.map +0 -1
  251. package/build-module/pagination.js.map +0 -1
  252. package/build-module/reset-filters.js.map +0 -1
  253. package/build-module/search-widget.js.map +0 -1
  254. package/build-module/search.js.map +0 -1
  255. package/build-module/single-selection-checkbox.js +0 -56
  256. package/build-module/single-selection-checkbox.js.map +0 -1
  257. package/build-module/view-actions.js.map +0 -1
  258. package/build-module/view-grid.js.map +0 -1
  259. package/build-module/view-list.js.map +0 -1
  260. package/build-module/view-table.js +0 -402
  261. package/build-module/view-table.js.map +0 -1
  262. package/build-types/add-filter.d.ts.map +0 -1
  263. package/build-types/bulk-actions-toolbar.d.ts +0 -12
  264. package/build-types/bulk-actions-toolbar.d.ts.map +0 -1
  265. package/build-types/bulk-actions.d.ts +0 -14
  266. package/build-types/bulk-actions.d.ts.map +0 -1
  267. package/build-types/dataviews.d.ts +0 -24
  268. package/build-types/dataviews.d.ts.map +0 -1
  269. package/build-types/filter-summary.d.ts.map +0 -1
  270. package/build-types/filters.d.ts +0 -13
  271. package/build-types/filters.d.ts.map +0 -1
  272. package/build-types/item-actions.d.ts +0 -35
  273. package/build-types/item-actions.d.ts.map +0 -1
  274. package/build-types/layouts.d.ts.map +0 -1
  275. package/build-types/pagination.d.ts +0 -16
  276. package/build-types/pagination.d.ts.map +0 -1
  277. package/build-types/reset-filters.d.ts.map +0 -1
  278. package/build-types/search-widget.d.ts.map +0 -1
  279. package/build-types/search.d.ts +0 -13
  280. package/build-types/search.d.ts.map +0 -1
  281. package/build-types/single-selection-checkbox.d.ts +0 -17
  282. package/build-types/single-selection-checkbox.d.ts.map +0 -1
  283. package/build-types/stories/fixtures.d.ts.map +0 -1
  284. package/build-types/stories/index.story.d.ts +0 -15
  285. package/build-types/stories/index.story.d.ts.map +0 -1
  286. package/build-types/view-actions.d.ts +0 -12
  287. package/build-types/view-actions.d.ts.map +0 -1
  288. package/build-types/view-grid.d.ts +0 -4
  289. package/build-types/view-grid.d.ts.map +0 -1
  290. package/build-types/view-list.d.ts +0 -4
  291. package/build-types/view-list.d.ts.map +0 -1
  292. package/build-types/view-table.d.ts +0 -5
  293. package/build-types/view-table.d.ts.map +0 -1
  294. package/src/dataviews.tsx +0 -189
  295. package/src/layouts.ts +0 -39
  296. package/src/single-selection-checkbox.tsx +0 -80
  297. package/src/stories/index.story.js +0 -64
  298. package/src/view-table.tsx +0 -603
@@ -0,0 +1,17 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { Dispatch, SetStateAction } from 'react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { Form, Field } from '../../types';
9
+ type DataFormProps<Item> = {
10
+ data: Item;
11
+ fields: Field<Item>[];
12
+ form: Form;
13
+ onChange: Dispatch<SetStateAction<Item>>;
14
+ };
15
+ export default function DataForm<Item>({ data, fields, form, onChange, }: DataFormProps<Item>): (import("react").JSX.Element | null)[];
16
+ export {};
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataform/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQtD;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAmB,MAAM,aAAa,CAAC;AAGhE,KAAK,aAAa,CAAE,IAAI,IAAK;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,CAAC;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAE,cAAc,CAAE,IAAI,CAAE,CAAE,CAAC;CAC7C,CAAC;AAwDF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,GACR,EAAE,aAAa,CAAE,IAAI,CAAE,0CAsBvB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import DataForm from '../index';
5
+ declare const meta: {
6
+ title: string;
7
+ component: typeof DataForm;
8
+ };
9
+ export default meta;
10
+ export declare const Default: () => import("react").JSX.Element;
11
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataform/stories/index.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,QAAA,MAAM,IAAI;;;CAGT,CAAC;AACF,eAAe,IAAI,CAAC;AAUpB,eAAO,MAAM,OAAO,mCAiBnB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ import type { Action, Field, View, SupportedLayouts } from '../../types';
6
+ type ItemWithId = {
7
+ id: string;
8
+ };
9
+ type DataViewsProps<Item> = {
10
+ view: View;
11
+ onChangeView: (view: View) => void;
12
+ fields: Field<Item>[];
13
+ search?: boolean;
14
+ searchLabel?: string;
15
+ actions?: Action<Item>[];
16
+ data: Item[];
17
+ isLoading?: boolean;
18
+ paginationInfo: {
19
+ totalItems: number;
20
+ totalPages: number;
21
+ };
22
+ defaultLayouts: SupportedLayouts;
23
+ selection?: string[];
24
+ onChangeSelection?: (items: string[]) => void;
25
+ header?: ReactNode;
26
+ } & (Item extends ItemWithId ? {
27
+ getItemId?: (item: Item) => string;
28
+ } : {
29
+ getItemId: (item: Item) => string;
30
+ });
31
+ export default function DataViews<Item>({ view, onChangeView, fields, search, searchLabel, actions, data, getItemId, isLoading, paginationInfo, defaultLayouts, selection: selectionProperty, onChangeSelection, header, }: DataViewsProps<Item>): import("react").JSX.Element;
32
+ export {};
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKzE,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,KAAK,cAAc,CAAE,IAAI,IAAK;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC3B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,cAAc,EAAE,gBAAgB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,KAAM,IAAI,CAAC;IAChD,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB,GAAG,CAAE,IAAI,SAAS,UAAU,GAC1B;IAAE,SAAS,CAAC,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,GACxC;IAAE,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,CAAE,CAAC;AAI7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,MAAa,EACb,WAAuB,EACvB,OAAY,EACZ,IAAI,EACJ,SAA4B,EAC5B,SAAiB,EACjB,cAAc,EACd,cAAc,EACd,SAAS,EAAE,iBAAiB,EAC5B,iBAAiB,EACjB,MAAM,GACN,EAAE,cAAc,CAAE,IAAI,CAAE,+BAgFxB"}
@@ -5,13 +5,14 @@ export const data: {
5
5
  image: string;
6
6
  type: string;
7
7
  categories: string[];
8
+ satellites: number;
8
9
  }[];
9
10
  export namespace DEFAULT_VIEW {
10
11
  export { LAYOUT_TABLE as type };
11
12
  export let search: string;
12
13
  export let page: number;
13
14
  export let perPage: number;
14
- export let hiddenFields: string[];
15
+ export let fields: string[];
15
16
  export let layout: {};
16
17
  export let filters: never[];
17
18
  }
@@ -36,60 +37,62 @@ export const actions: ({
36
37
  RenderModal?: undefined;
37
38
  })[];
38
39
  export const fields: ({
39
- header: string;
40
+ label: string;
40
41
  id: string;
41
42
  render: ({ item }: {
42
43
  item: any;
43
44
  }) => import("react").JSX.Element;
44
- width: number;
45
45
  enableSorting: boolean;
46
- maxWidth?: undefined;
47
46
  enableHiding?: undefined;
48
47
  enableGlobalSearch?: undefined;
49
48
  elements?: undefined;
50
49
  filterBy?: undefined;
51
50
  getValue?: undefined;
52
51
  } | {
53
- header: string;
52
+ label: string;
54
53
  id: string;
55
- maxWidth: number;
56
54
  enableHiding: boolean;
57
55
  enableGlobalSearch: boolean;
58
56
  render?: undefined;
59
- width?: undefined;
60
57
  enableSorting?: undefined;
61
58
  elements?: undefined;
62
59
  filterBy?: undefined;
63
60
  getValue?: undefined;
64
61
  } | {
65
- header: string;
62
+ label: string;
66
63
  id: string;
67
- maxWidth: number;
68
64
  enableHiding: boolean;
69
65
  elements: {
70
66
  value: string;
71
67
  label: string;
72
68
  }[];
73
69
  render?: undefined;
74
- width?: undefined;
75
70
  enableSorting?: undefined;
76
71
  enableGlobalSearch?: undefined;
77
72
  filterBy?: undefined;
78
73
  getValue?: undefined;
79
74
  } | {
80
- header: string;
75
+ label: string;
76
+ id: string;
77
+ enableSorting: boolean;
78
+ render?: undefined;
79
+ enableHiding?: undefined;
80
+ enableGlobalSearch?: undefined;
81
+ elements?: undefined;
82
+ filterBy?: undefined;
83
+ getValue?: undefined;
84
+ } | {
85
+ label: string;
81
86
  id: string;
82
- maxWidth: number;
83
87
  enableSorting: boolean;
84
88
  enableGlobalSearch: boolean;
85
89
  render?: undefined;
86
- width?: undefined;
87
90
  enableHiding?: undefined;
88
91
  elements?: undefined;
89
92
  filterBy?: undefined;
90
93
  getValue?: undefined;
91
94
  } | {
92
- header: string;
95
+ label: string;
93
96
  id: string;
94
97
  elements: {
95
98
  value: string;
@@ -105,10 +108,8 @@ export const fields: ({
105
108
  item: any;
106
109
  }) => any;
107
110
  enableSorting: boolean;
108
- width?: undefined;
109
- maxWidth?: undefined;
110
111
  enableHiding?: undefined;
111
112
  enableGlobalSearch?: undefined;
112
113
  })[];
113
- import { LAYOUT_TABLE } from '../constants';
114
+ import { LAYOUT_TABLE } from '../../../constants';
114
115
  //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/fixtures.js"],"names":[],"mappings":"AAgBA;;;;;;;;IAoGE;;;;;;;;;;AAYF;;;;;;;;;;;;;;;;;;;KA8BE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4DE;6BA9M2B,oBAAoB"}
@@ -0,0 +1,46 @@
1
+ export default meta;
2
+ export function Default(props: any): import("react").JSX.Element;
3
+ export namespace Default {
4
+ namespace args {
5
+ export { actions };
6
+ export namespace defaultLayouts {
7
+ namespace table {
8
+ namespace layout {
9
+ let primaryField: string;
10
+ namespace styles {
11
+ namespace image {
12
+ let width: number;
13
+ }
14
+ namespace title {
15
+ let maxWidth: number;
16
+ }
17
+ namespace type {
18
+ let maxWidth_1: number;
19
+ export { maxWidth_1 as maxWidth };
20
+ }
21
+ namespace description {
22
+ let maxWidth_2: number;
23
+ export { maxWidth_2 as maxWidth };
24
+ }
25
+ }
26
+ }
27
+ }
28
+ namespace grid {
29
+ export namespace layout_1 {
30
+ export let mediaField: string;
31
+ let primaryField_1: string;
32
+ export { primaryField_1 as primaryField };
33
+ }
34
+ export { layout_1 as layout };
35
+ }
36
+ }
37
+ }
38
+ }
39
+ declare namespace meta {
40
+ let title_1: string;
41
+ export { title_1 as title };
42
+ export { DataViews as component };
43
+ }
44
+ import { actions } from './fixtures';
45
+ import DataViews from '../index';
46
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/index.story.js"],"names":[],"mappings":";AAmBO,iEAeN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAzBmD,YAAY;sBAD1C,UAAU"}
@@ -0,0 +1,5 @@
1
+ import type { Action } from '../../types';
2
+ export declare function useHasAPossibleBulkAction<Item>(actions: Action<Item>[], item: Item): boolean;
3
+ export declare function useSomeItemHasAPossibleBulkAction<Item>(actions: Action<Item>[], data: Item[]): boolean;
4
+ export default function BulkActions(): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-bulk-actions/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AA4BvD,wBAAgB,yBAAyB,CAAE,IAAI,EAC9C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,WAUV;AAED,wBAAgB,iCAAiC,CAAE,IAAI,EACtD,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,EAAE,WAYZ;AAmND,MAAM,CAAC,OAAO,UAAU,WAAW,uCAclC"}
@@ -0,0 +1,2 @@
1
+ export default function BulkActionsToolbar(): import("react").JSX.Element | null;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-bulk-actions-toolbar/index.tsx"],"names":[],"mappings":"AAiRA,MAAM,CAAC,OAAO,UAAU,kBAAkB,uCAczC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { View, Action, NormalizedField } from '../../types';
5
+ import type { SetSelection } from '../../private-types';
6
+ type DataViewsContextType<Item> = {
7
+ view: View;
8
+ onChangeView: (view: View) => void;
9
+ fields: NormalizedField<Item>[];
10
+ actions?: Action<Item>[];
11
+ data: Item[];
12
+ isLoading?: boolean;
13
+ paginationInfo: {
14
+ totalItems: number;
15
+ totalPages: number;
16
+ };
17
+ selection: string[];
18
+ onChangeSelection: SetSelection;
19
+ openedFilter: string | null;
20
+ setOpenedFilter: (openedFilter: string | null) => void;
21
+ getItemId: (item: Item) => string;
22
+ density: number;
23
+ };
24
+ declare const DataViewsContext: import("react").Context<DataViewsContextType<any>>;
25
+ export default DataViewsContext;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-context/index.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,KAAK,oBAAoB,CAAE,IAAI,IAAK;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC3B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,YAAY,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,CAAE,YAAY,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;IACzD,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,gBAAgB,oDAenB,CAAC;AAEJ,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type { NormalizedFilter, View } from './types';
1
+ import type { NormalizedFilter, View } from '../../types';
3
2
  interface AddFilterProps {
4
3
  filters: NormalizedFilter[];
5
4
  view: View;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-filter.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/add-filter.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQ1D,UAAU,cAAc;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,eAAe,EAAE,CAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;CACnD;;AAuDD,wBAAuC"}
@@ -1,5 +1,5 @@
1
1
  import type { RefObject } from 'react';
2
- import type { NormalizedFilter, View } from './types';
2
+ import type { NormalizedFilter, View } from '../../types';
3
3
  interface OperatorSelectorProps {
4
4
  filter: NormalizedFilter;
5
5
  view: View;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-summary.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/filter-summary.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAkCvC,OAAO,KAAK,EAEX,gBAAgB,EAGhB,IAAI,EACJ,MAAM,aAAa,CAAC;AAQrB,UAAU,qBAAqB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAED,UAAU,kBAAmB,SAAQ,qBAAqB;IACzD,YAAY,EAAE,SAAS,CAAE,iBAAiB,CAAE,CAAC;IAC7C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAsKD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,EACtC,YAAY,EACZ,YAAY,EACZ,GAAG,WAAW,EACd,EAAE,kBAAkB,+BA0GpB"}
@@ -0,0 +1,4 @@
1
+ declare function Filters(): import("react").JSX.Element;
2
+ declare const _default: import("react").MemoExoticComponent<typeof Filters>;
3
+ export default _default;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/index.tsx"],"names":[],"mappings":"AAiBA,iBAAS,OAAO,gCA2Ff;;AAED,wBAA+B"}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Internal dependencies
4
3
  */
5
- import type { NormalizedFilter, View } from './types';
4
+ import type { NormalizedFilter, View } from '../../types';
6
5
  interface ResetFilterProps {
7
6
  filters: NormalizedFilter[];
8
7
  view: View;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-filters.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/reset-filters.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE1D,UAAU,gBAAgB;IACzB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,OAAO,EACP,IAAI,EACJ,YAAY,GACZ,EAAE,gBAAgB,+BA8BlB"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type { NormalizedFilter, View } from './types';
1
+ import type { NormalizedFilter, View } from '../../types';
3
2
  interface SearchWidgetProps {
4
3
  view: View;
5
4
  filter: NormalizedFilter;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/search-widget.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAU,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQlE,UAAU,iBAAiB;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAoRD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAG7D"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { MouseEventHandler, ReactElement } from 'react';
5
+ import type { Action, ActionModal as ActionModalType } from '../../types';
6
+ export interface ActionTriggerProps<Item> {
7
+ action: Action<Item>;
8
+ onClick: MouseEventHandler;
9
+ isBusy?: boolean;
10
+ items: Item[];
11
+ }
12
+ interface ActionModalProps<Item> {
13
+ action: ActionModalType<Item>;
14
+ items: Item[];
15
+ closeModal?: () => void;
16
+ }
17
+ interface ActionWithModalProps<Item> extends ActionModalProps<Item> {
18
+ ActionTrigger: (props: ActionTriggerProps<Item>) => ReactElement;
19
+ isBusy?: boolean;
20
+ }
21
+ interface ActionsDropdownMenuGroupProps<Item> {
22
+ actions: Action<Item>[];
23
+ item: Item;
24
+ }
25
+ interface ItemActionsProps<Item> {
26
+ item: Item;
27
+ actions: Action<Item>[];
28
+ isCompact?: boolean;
29
+ }
30
+ export declare function ActionModal<Item>({ action, items, closeModal, }: ActionModalProps<Item>): import("react").JSX.Element;
31
+ export declare function ActionWithModal<Item>({ action, items, ActionTrigger, isBusy, }: ActionWithModalProps<Item>): import("react").JSX.Element;
32
+ export declare function ActionsDropdownMenuGroup<Item>({ actions, item, }: ActionsDropdownMenuGroupProps<Item>): import("react").JSX.Element;
33
+ export default function ItemActions<Item>({ item, actions, isCompact, }: ItemActionsProps<Item>): import("react").JSX.Element;
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-item-actions/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAoB7D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAU1E,MAAM,WAAW,kBAAkB,CAAE,IAAI;IACxC,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE,CAAC;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACd;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,UAAU,oBAAoB,CAAE,IAAI,CAAG,SAAQ,gBAAgB,CAAE,IAAI,CAAE;IACtE,aAAa,EAAE,CAAE,KAAK,EAAE,kBAAkB,CAAE,IAAI,CAAE,KAAM,YAAY,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,6BAA6B,CAAE,IAAI;IAC5C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,IAAI,EAAE,IAAI,CAAC;CACX;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AA0CD,wBAAgB,WAAW,CAAE,IAAI,EAAI,EACpC,MAAM,EACN,KAAK,EACL,UAAU,GACV,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAiB1B;AAED,wBAAgB,eAAe,CAAE,IAAI,EAAI,EACxC,MAAM,EACN,KAAK,EACL,aAAa,EACb,MAAM,GACN,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAsB9B;AAED,wBAAgB,wBAAwB,CAAE,IAAI,EAAI,EACjD,OAAO,EACP,IAAI,GACJ,EAAE,6BAA6B,CAAE,IAAI,CAAE,+BA4BvC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAI,EAC5C,IAAI,EACJ,OAAO,EACP,SAAS,GACT,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAuD1B"}
@@ -0,0 +1,2 @@
1
+ export default function DataViewsLayout(): import("react").JSX.Element;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-layout/index.tsx"],"names":[],"mappings":"AAiBA,MAAM,CAAC,OAAO,UAAU,eAAe,gCAiCtC"}
@@ -0,0 +1,4 @@
1
+ declare function DataViewsPagination(): false | import("react").JSX.Element | null;
2
+ declare const _default: import("react").MemoExoticComponent<typeof DataViewsPagination>;
3
+ export default _default;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-pagination/index.tsx"],"names":[],"mappings":"AAiBA,iBAAS,mBAAmB,+CA0F3B;;AAED,wBAA2C"}
@@ -0,0 +1,6 @@
1
+ interface SearchProps {
2
+ label?: string;
3
+ }
4
+ declare const DataViewsSearch: import("react").NamedExoticComponent<SearchProps>;
5
+ export default DataViewsSearch;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-search/index.tsx"],"names":[],"mappings":"AAaA,UAAU,WAAW;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,eAAe,mDAgClB,CAAC;AAEJ,eAAe,eAAe,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Field } from '../../types';
5
+ import type { SetSelection } from '../../private-types';
6
+ interface DataViewsSelectionCheckboxProps<Item> {
7
+ selection: string[];
8
+ onChangeSelection: SetSelection;
9
+ item: Item;
10
+ getItemId: (item: Item) => string;
11
+ primaryField?: Field<Item>;
12
+ disabled: boolean;
13
+ }
14
+ export default function DataViewsSelectionCheckbox<Item>({ selection, onChangeSelection, item, getItemId, primaryField, disabled, }: DataViewsSelectionCheckboxProps<Item>): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-selection-checkbox/index.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,UAAU,+BAA+B,CAAE,IAAI;IAC9C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,YAAY,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAC;IACpC,YAAY,CAAC,EAAE,KAAK,CAAE,IAAI,CAAE,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAE,IAAI,EAAI,EAC3D,SAAS,EACT,iBAAiB,EACjB,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,QAAQ,GACR,EAAE,+BAA+B,CAAE,IAAI,CAAE,+BAoCzC"}
@@ -0,0 +1,8 @@
1
+ import type { SupportedLayouts } from '../../types';
2
+ interface ViewActionsProps {
3
+ defaultLayouts?: SupportedLayouts;
4
+ }
5
+ declare function _DataViewsViewConfig({ defaultLayouts }: ViewActionsProps): import("react").JSX.Element;
6
+ declare const DataViewsViewConfig: import("react").MemoExoticComponent<typeof _DataViewsViewConfig>;
7
+ export default DataViewsViewConfig;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-view-config/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAyB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAmC3E,UAAU,gBAAgB;IACzB,cAAc,CAAC,EAAE,gBAAgB,CAAC;CAClC;AA8ND,iBAAS,oBAAoB,CAAE,EAAE,cAAc,EAAE,EAAE,gBAAgB,+BAyDlE;AAED,QAAA,MAAM,mBAAmB,kEAA+B,CAAC;AAEzD,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Field, AnyItem, View } from './types';
1
+ import type { Field, View } from './types';
2
2
  /**
3
3
  * Applies the filtering, sorting and pagination to the raw data based on the view configuration.
4
4
  *
@@ -8,7 +8,7 @@ import type { Field, AnyItem, View } from './types';
8
8
  *
9
9
  * @return Filtered, sorted and paginated data.
10
10
  */
11
- export declare function filterSortAndPaginate<Item extends AnyItem>(data: Item[], view: View, fields: Field<Item>[]): {
11
+ export declare function filterSortAndPaginate<Item>(data: Item[], view: View, fields: Field<Item>[]): {
12
12
  data: Item[];
13
13
  paginationInfo: {
14
14
  totalItems: number;
@@ -1 +1 @@
1
- {"version":3,"file":"filter-and-sort-data-view.d.ts","sourceRoot":"","sources":["../src/filter-and-sort-data-view.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAQpD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAE,IAAI,SAAS,OAAO,EAC1D,IAAI,EAAE,IAAI,EAAE,EACZ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB;IACF,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,cAAc,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D,CA+HA"}
1
+ {"version":3,"file":"filter-and-sort-data-view.d.ts","sourceRoot":"","sources":["../src/filter-and-sort-data-view.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAQ3C;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAE,IAAI,EAC1C,IAAI,EAAE,IAAI,EAAE,EACZ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB;IACF,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,cAAc,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D,CAyIA"}
@@ -1,4 +1,5 @@
1
- export { default as DataViews } from './dataviews';
1
+ export { default as DataViews } from './components/dataviews';
2
+ export { default as DataForm } from './components/dataform';
2
3
  export { VIEW_LAYOUTS } from './layouts';
3
4
  export { filterSortAndPaginate } from './filter-and-sort-data-view';
4
5
  export type * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,mBAAmB,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function DensityPicker({ density, setDensity, }: {
2
+ density: number;
3
+ setDensity: React.Dispatch<React.SetStateAction<number>>;
4
+ }): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=density-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"density-picker.d.ts","sourceRoot":"","sources":["../../../src/layouts/grid/density-picker.tsx"],"names":[],"mappings":"AAyDA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,EACtC,OAAO,EACP,UAAU,GACV,EAAE;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAE,KAAK,CAAC,cAAc,CAAE,MAAM,CAAE,CAAE,CAAC;CAC7D,sCAwEA"}
@@ -0,0 +1,3 @@
1
+ import type { ViewGridProps } from '../../types';
2
+ export default function ViewGrid<Item>({ actions, data, fields, getItemId, isLoading, onChangeSelection, selection, view, density, }: ViewGridProps<Item>): import("react").JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/grid/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,aAAa,CAAC;AA6I1E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,IAAI,EACJ,OAAO,GACP,EAAE,aAAa,CAAE,IAAI,CAAE,+BA2EvB"}
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Internal dependencies
4
3
  */
5
- import ViewTable from './view-table';
6
- import ViewGrid from './view-grid';
7
- import ViewList from './view-list';
4
+ import ViewTable from './table';
5
+ import ViewGrid from './grid';
6
+ import ViewList from './list';
7
+ import type { View } from '../types';
8
8
  export declare const VIEW_LAYOUTS: ({
9
9
  type: string;
10
10
  label: string;
@@ -21,4 +21,5 @@ export declare const VIEW_LAYOUTS: ({
21
21
  component: typeof ViewList;
22
22
  icon: import("react").JSX.Element;
23
23
  })[];
24
- //# sourceMappingURL=layouts.d.ts.map
24
+ export declare function getMandatoryFields(view: View): string[];
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,SAAS,MAAM,SAAS,CAAC;AAChC,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAC9B,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAE9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;IAmBxB,CAAC;AAEF,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,IAAI,GAAI,MAAM,EAAE,CAwBzD"}
@@ -0,0 +1,3 @@
1
+ import type { ViewListProps } from '../../types';
2
+ export default function ViewList<Item>(props: ViewListProps<Item>): import("react").JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/list/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,aAAa,CAAC;AAuR1E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,KAAK,EAAE,aAAa,CAAE,IAAI,CAAE,+BAyGrE"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { PropsWithoutRef, RefAttributes } from 'react';
5
+ import type { NormalizedField, ViewTable as ViewTableType } from '../../types';
6
+ interface HeaderMenuProps<Item> {
7
+ fieldId: string;
8
+ view: ViewTableType;
9
+ fields: NormalizedField<Item>[];
10
+ onChangeView: (view: ViewTableType) => void;
11
+ onHide: (field: NormalizedField<Item>) => void;
12
+ setOpenedFilter: (fieldId: string) => void;
13
+ }
14
+ declare const _HeaderMenu: import("react").ForwardRefExoticComponent<HeaderMenuProps<unknown> & RefAttributes<HTMLButtonElement>>;
15
+ declare const ColumnHeaderMenu: <Item>(props: PropsWithoutRef<HeaderMenuProps<Item>> & RefAttributes<HTMLButtonElement>) => ReturnType<typeof _HeaderMenu>;
16
+ export default ColumnHeaderMenu;
17
+ //# sourceMappingURL=column-header-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-header-menu.d.ts","sourceRoot":"","sources":["../../../src/layouts/table/column-header-menu.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAkB,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAoB5E,OAAO,KAAK,EACX,eAAe,EAEf,SAAS,IAAI,aAAa,EAC1B,MAAM,aAAa,CAAC;AAWrB,UAAU,eAAe,CAAE,IAAI;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,YAAY,EAAE,CAAE,IAAI,EAAE,aAAa,KAAM,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,KAAM,IAAI,CAAC;IACnD,eAAe,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;CAC7C;AAaD,QAAA,MAAM,WAAW,wGAyMd,CAAC;AAGJ,QAAA,MAAM,gBAAgB,EAAE,CAAE,IAAI,EAC7B,KAAK,EAAE,eAAe,CAAE,eAAe,CAAE,IAAI,CAAE,CAAE,GAChD,aAAa,CAAE,iBAAiB,CAAE,KAC/B,UAAU,CAAE,OAAO,WAAW,CAAgB,CAAC;AAEpD,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ViewTableProps } from '../../types';
2
+ declare function ViewTable<Item>({ actions, data, fields, getItemId, isLoading, onChangeView, onChangeSelection, selection, setOpenedFilter, view, }: ViewTableProps<Item>): import("react").JSX.Element | undefined;
3
+ export default ViewTable;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/table/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAIX,cAAc,EAEd,MAAM,aAAa,CAAC;AAsQrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,IAAI,GACJ,EAAE,cAAc,CAAE,IAAI,CAAE,2CA4JxB;AAED,eAAe,SAAS,CAAC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Field, AnyItem, NormalizedField } from './types';
4
+ import type { Field, NormalizedField } from './types';
5
5
  /**
6
6
  * Apply default values and normalize the fields config.
7
7
  *
8
8
  * @param fields Fields config.
9
9
  * @return Normalized fields config.
10
10
  */
11
- export declare function normalizeFields<Item extends AnyItem>(fields: Field<Item>[]): NormalizedField<Item>[];
11
+ export declare function normalizeFields<Item>(fields: Field<Item>[]): NormalizedField<Item>[];
12
12
  //# sourceMappingURL=normalize-fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-fields.d.ts","sourceRoot":"","sources":["../src/normalize-fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,IAAI,SAAS,OAAO,EACpD,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CAW3B"}
1
+ {"version":3,"file":"normalize-fields.d.ts","sourceRoot":"","sources":["../src/normalize-fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAc,MAAM,SAAS,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,IAAI,EACpC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CAa3B"}
@@ -0,0 +1,3 @@
1
+ export type SelectionOrUpdater = string[] | ((prev: string[]) => string[]);
2
+ export type SetSelection = (selection: SelectionOrUpdater) => void;
3
+ //# sourceMappingURL=private-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-types.d.ts","sourceRoot":"","sources":["../src/private-types.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,MAAM,EAAE,GAAG,CAAE,CAAE,IAAI,EAAE,MAAM,EAAE,KAAM,MAAM,EAAE,CAAE,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAE,SAAS,EAAE,kBAAkB,KAAM,IAAI,CAAC"}