@wordpress/dataviews 4.10.0 → 4.11.1

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 (119) hide show
  1. package/CHANGELOG.md +19 -9
  2. package/LICENSE.md +1 -1
  3. package/README.md +309 -175
  4. package/build/components/dataviews/index.js +12 -1
  5. package/build/components/dataviews/index.js.map +1 -1
  6. package/build/components/dataviews-context/index.js +2 -1
  7. package/build/components/dataviews-context/index.js.map +1 -1
  8. package/build/components/dataviews-filters/add-filter.js +35 -30
  9. package/build/components/dataviews-filters/add-filter.js.map +1 -1
  10. package/build/components/dataviews-filters/index.js +3 -1
  11. package/build/components/dataviews-filters/index.js.map +1 -1
  12. package/build/components/dataviews-item-actions/index.js +24 -19
  13. package/build/components/dataviews-item-actions/index.js.map +1 -1
  14. package/build/components/dataviews-layout/index.js +2 -0
  15. package/build/components/dataviews-layout/index.js.map +1 -1
  16. package/build/components/dataviews-view-config/index.js +48 -43
  17. package/build/components/dataviews-view-config/index.js.map +1 -1
  18. package/build/dataviews-layouts/grid/index.js +12 -5
  19. package/build/dataviews-layouts/grid/index.js.map +1 -1
  20. package/build/dataviews-layouts/grid/preview-size-picker.js +22 -25
  21. package/build/dataviews-layouts/grid/preview-size-picker.js.map +1 -1
  22. package/build/dataviews-layouts/list/index.js +27 -20
  23. package/build/dataviews-layouts/list/index.js.map +1 -1
  24. package/build/dataviews-layouts/table/column-header-menu.js +102 -99
  25. package/build/dataviews-layouts/table/column-header-menu.js.map +1 -1
  26. package/build/dataviews-layouts/table/column-primary.js +7 -3
  27. package/build/dataviews-layouts/table/column-primary.js.map +1 -1
  28. package/build/dataviews-layouts/table/index.js +4 -0
  29. package/build/dataviews-layouts/table/index.js.map +1 -1
  30. package/build/types.js.map +1 -1
  31. package/build-module/components/dataviews/index.js +12 -1
  32. package/build-module/components/dataviews/index.js.map +1 -1
  33. package/build-module/components/dataviews-context/index.js +2 -1
  34. package/build-module/components/dataviews-context/index.js.map +1 -1
  35. package/build-module/components/dataviews-filters/add-filter.js +36 -31
  36. package/build-module/components/dataviews-filters/add-filter.js.map +1 -1
  37. package/build-module/components/dataviews-filters/index.js +3 -1
  38. package/build-module/components/dataviews-filters/index.js.map +1 -1
  39. package/build-module/components/dataviews-item-actions/index.js +24 -19
  40. package/build-module/components/dataviews-item-actions/index.js.map +1 -1
  41. package/build-module/components/dataviews-layout/index.js +2 -0
  42. package/build-module/components/dataviews-layout/index.js.map +1 -1
  43. package/build-module/components/dataviews-view-config/index.js +49 -44
  44. package/build-module/components/dataviews-view-config/index.js.map +1 -1
  45. package/build-module/dataviews-layouts/grid/index.js +14 -7
  46. package/build-module/dataviews-layouts/grid/index.js.map +1 -1
  47. package/build-module/dataviews-layouts/grid/preview-size-picker.js +22 -25
  48. package/build-module/dataviews-layouts/grid/preview-size-picker.js.map +1 -1
  49. package/build-module/dataviews-layouts/list/index.js +27 -20
  50. package/build-module/dataviews-layouts/list/index.js.map +1 -1
  51. package/build-module/dataviews-layouts/table/column-header-menu.js +102 -99
  52. package/build-module/dataviews-layouts/table/column-header-menu.js.map +1 -1
  53. package/build-module/dataviews-layouts/table/column-primary.js +7 -3
  54. package/build-module/dataviews-layouts/table/column-primary.js.map +1 -1
  55. package/build-module/dataviews-layouts/table/index.js +4 -0
  56. package/build-module/dataviews-layouts/table/index.js.map +1 -1
  57. package/build-module/types.js.map +1 -1
  58. package/build-style/style-rtl.css +45 -55
  59. package/build-style/style.css +45 -55
  60. package/build-types/components/dataviews/index.d.ts +2 -1
  61. package/build-types/components/dataviews/index.d.ts.map +1 -1
  62. package/build-types/components/dataviews-context/index.d.ts +2 -0
  63. package/build-types/components/dataviews-context/index.d.ts.map +1 -1
  64. package/build-types/components/dataviews-filters/add-filter.d.ts +3 -2
  65. package/build-types/components/dataviews-filters/add-filter.d.ts.map +1 -1
  66. package/build-types/components/dataviews-item-actions/index.d.ts.map +1 -1
  67. package/build-types/components/dataviews-layout/index.d.ts.map +1 -1
  68. package/build-types/components/dataviews-view-config/index.d.ts.map +1 -1
  69. package/build-types/dataviews-layouts/grid/index.d.ts.map +1 -1
  70. package/build-types/dataviews-layouts/grid/preview-size-picker.d.ts.map +1 -1
  71. package/build-types/dataviews-layouts/list/index.d.ts.map +1 -1
  72. package/build-types/dataviews-layouts/table/column-header-menu.d.ts.map +1 -1
  73. package/build-types/dataviews-layouts/table/column-primary.d.ts +2 -1
  74. package/build-types/dataviews-layouts/table/column-primary.d.ts.map +1 -1
  75. package/build-types/dataviews-layouts/table/index.d.ts +1 -1
  76. package/build-types/dataviews-layouts/table/index.d.ts.map +1 -1
  77. package/build-types/test/dataform.d.ts +2 -0
  78. package/build-types/test/dataform.d.ts.map +1 -0
  79. package/build-types/test/dataviews.d.ts +2 -0
  80. package/build-types/test/dataviews.d.ts.map +1 -0
  81. package/build-types/test/normalize-fields.d.ts +2 -0
  82. package/build-types/test/normalize-fields.d.ts.map +1 -0
  83. package/build-types/test/validation.d.ts +2 -0
  84. package/build-types/test/validation.d.ts.map +1 -0
  85. package/build-types/types.d.ts +5 -0
  86. package/build-types/types.d.ts.map +1 -1
  87. package/build-wp/index.js +1209 -999
  88. package/package.json +13 -12
  89. package/src/components/dataviews/index.tsx +15 -1
  90. package/src/components/dataviews/style.scss +0 -1
  91. package/src/components/dataviews-context/index.ts +3 -0
  92. package/src/components/dataviews-filters/add-filter.tsx +43 -39
  93. package/src/components/dataviews-filters/index.tsx +1 -1
  94. package/src/components/dataviews-footer/style.scss +0 -3
  95. package/src/components/dataviews-item-actions/index.tsx +25 -27
  96. package/src/components/dataviews-layout/index.tsx +2 -0
  97. package/src/components/dataviews-view-config/index.tsx +52 -43
  98. package/src/components/dataviews-view-config/style.scss +0 -1
  99. package/src/dataviews-layouts/grid/index.tsx +17 -5
  100. package/src/dataviews-layouts/grid/preview-size-picker.tsx +25 -30
  101. package/src/dataviews-layouts/grid/style.scss +24 -33
  102. package/src/dataviews-layouts/list/index.tsx +35 -27
  103. package/src/dataviews-layouts/list/style.scss +5 -5
  104. package/src/dataviews-layouts/table/column-header-menu.tsx +152 -148
  105. package/src/dataviews-layouts/table/column-primary.tsx +7 -0
  106. package/src/dataviews-layouts/table/index.tsx +10 -0
  107. package/src/dataviews-layouts/table/style.scss +0 -1
  108. package/src/test/dataform.tsx +348 -0
  109. package/src/test/dataviews.tsx +380 -0
  110. package/src/types.ts +6 -0
  111. package/tsconfig.json +14 -4
  112. package/tsconfig.tsbuildinfo +1 -1
  113. package/build/components/form-field-visibility/index.js +0 -32
  114. package/build/components/form-field-visibility/index.js.map +0 -1
  115. package/build-module/components/form-field-visibility/index.js +0 -26
  116. package/build-module/components/form-field-visibility/index.js.map +0 -1
  117. package/build-types/components/form-field-visibility/index.d.ts +0 -11
  118. package/build-types/components/form-field-visibility/index.d.ts.map +0 -1
  119. package/src/components/form-field-visibility/index.tsx +0 -32
package/CHANGELOG.md CHANGED
@@ -2,24 +2,34 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.11.0 (2025-01-02)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Fixed commonjs export ([#67962](https://github.com/WordPress/gutenberg/pull/67962))
10
+
11
+ ### Features
12
+
13
+ - Add support for hierarchical visualization of data. `DataViews` gets a new prop `getItemLevel` that should return the hierarchical level of the item. The view can use `view.showLevels` to display the levels. It's up to the consumer data source to prepare this information.
14
+
5
15
  ## 4.10.0 (2024-12-11)
6
16
 
7
- ## Breaking Changes
17
+ ### Breaking Changes
8
18
 
9
19
  - Support showing or hiding title, media and description fields ([#67477](https://github.com/WordPress/gutenberg/pull/67477)).
10
- - Unify the `title`, `media` and `description` fields for the different layouts. So instead of the previous `view.layout.mediaField`, `view.layout.primaryField` and `view.layout.columnFields`, all the layouts now support these three fields with the following config ([#67477](https://github.com/WordPress/gutenberg/pull/67477)):
20
+ - Unify the `title`, `media` and `description` fields for the different layouts. So instead of the previous `view.layout.mediaField`, `view.layout.primaryField` and `view.layout.columnFields`, all the layouts now support these three fields with the following config ([#67477](https://github.com/WordPress/gutenberg/pull/67477)):
11
21
 
12
22
  ```js
13
23
  const view = {
14
- type: 'table',
15
- titleField: 'title',
16
- mediaField: 'media',
17
- descriptionField: 'description',
18
- fields: [ 'author', 'date' ],
19
- }
24
+ type: 'table',
25
+ titleField: 'title',
26
+ mediaField: 'media',
27
+ descriptionField: 'description',
28
+ fields: [ 'author', 'date' ],
29
+ };
20
30
  ```
21
31
 
22
- ## Internal
32
+ ### Internal
23
33
 
24
34
  - Upgraded `@ariakit/react` (v0.4.13) and `@ariakit/test` (v0.4.5) ([#65907](https://github.com/WordPress/gutenberg/pull/65907)).
25
35
  - Upgraded `@ariakit/react` (v0.4.15) and `@ariakit/test` (v0.4.7) ([#67404](https://github.com/WordPress/gutenberg/pull/67404)).
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Gutenberg
2
2
 
3
- Copyright 2016-2024 by the contributors
3
+ Copyright 2016-2025 by the contributors
4
4
 
5
5
  **License for Contributions (on and after April 15, 2021)**
6
6