@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.
- package/CHANGELOG.md +19 -9
- package/LICENSE.md +1 -1
- package/README.md +309 -175
- package/build/components/dataviews/index.js +12 -1
- package/build/components/dataviews/index.js.map +1 -1
- package/build/components/dataviews-context/index.js +2 -1
- package/build/components/dataviews-context/index.js.map +1 -1
- package/build/components/dataviews-filters/add-filter.js +35 -30
- package/build/components/dataviews-filters/add-filter.js.map +1 -1
- package/build/components/dataviews-filters/index.js +3 -1
- package/build/components/dataviews-filters/index.js.map +1 -1
- package/build/components/dataviews-item-actions/index.js +24 -19
- package/build/components/dataviews-item-actions/index.js.map +1 -1
- package/build/components/dataviews-layout/index.js +2 -0
- package/build/components/dataviews-layout/index.js.map +1 -1
- package/build/components/dataviews-view-config/index.js +48 -43
- package/build/components/dataviews-view-config/index.js.map +1 -1
- package/build/dataviews-layouts/grid/index.js +12 -5
- package/build/dataviews-layouts/grid/index.js.map +1 -1
- package/build/dataviews-layouts/grid/preview-size-picker.js +22 -25
- package/build/dataviews-layouts/grid/preview-size-picker.js.map +1 -1
- package/build/dataviews-layouts/list/index.js +27 -20
- package/build/dataviews-layouts/list/index.js.map +1 -1
- package/build/dataviews-layouts/table/column-header-menu.js +102 -99
- package/build/dataviews-layouts/table/column-header-menu.js.map +1 -1
- package/build/dataviews-layouts/table/column-primary.js +7 -3
- package/build/dataviews-layouts/table/column-primary.js.map +1 -1
- package/build/dataviews-layouts/table/index.js +4 -0
- package/build/dataviews-layouts/table/index.js.map +1 -1
- package/build/types.js.map +1 -1
- package/build-module/components/dataviews/index.js +12 -1
- package/build-module/components/dataviews/index.js.map +1 -1
- package/build-module/components/dataviews-context/index.js +2 -1
- package/build-module/components/dataviews-context/index.js.map +1 -1
- package/build-module/components/dataviews-filters/add-filter.js +36 -31
- package/build-module/components/dataviews-filters/add-filter.js.map +1 -1
- package/build-module/components/dataviews-filters/index.js +3 -1
- package/build-module/components/dataviews-filters/index.js.map +1 -1
- package/build-module/components/dataviews-item-actions/index.js +24 -19
- package/build-module/components/dataviews-item-actions/index.js.map +1 -1
- package/build-module/components/dataviews-layout/index.js +2 -0
- package/build-module/components/dataviews-layout/index.js.map +1 -1
- package/build-module/components/dataviews-view-config/index.js +49 -44
- package/build-module/components/dataviews-view-config/index.js.map +1 -1
- package/build-module/dataviews-layouts/grid/index.js +14 -7
- package/build-module/dataviews-layouts/grid/index.js.map +1 -1
- package/build-module/dataviews-layouts/grid/preview-size-picker.js +22 -25
- package/build-module/dataviews-layouts/grid/preview-size-picker.js.map +1 -1
- package/build-module/dataviews-layouts/list/index.js +27 -20
- package/build-module/dataviews-layouts/list/index.js.map +1 -1
- package/build-module/dataviews-layouts/table/column-header-menu.js +102 -99
- package/build-module/dataviews-layouts/table/column-header-menu.js.map +1 -1
- package/build-module/dataviews-layouts/table/column-primary.js +7 -3
- package/build-module/dataviews-layouts/table/column-primary.js.map +1 -1
- package/build-module/dataviews-layouts/table/index.js +4 -0
- package/build-module/dataviews-layouts/table/index.js.map +1 -1
- package/build-module/types.js.map +1 -1
- package/build-style/style-rtl.css +45 -55
- package/build-style/style.css +45 -55
- package/build-types/components/dataviews/index.d.ts +2 -1
- package/build-types/components/dataviews/index.d.ts.map +1 -1
- package/build-types/components/dataviews-context/index.d.ts +2 -0
- package/build-types/components/dataviews-context/index.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/add-filter.d.ts +3 -2
- package/build-types/components/dataviews-filters/add-filter.d.ts.map +1 -1
- package/build-types/components/dataviews-item-actions/index.d.ts.map +1 -1
- package/build-types/components/dataviews-layout/index.d.ts.map +1 -1
- package/build-types/components/dataviews-view-config/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/grid/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/grid/preview-size-picker.d.ts.map +1 -1
- package/build-types/dataviews-layouts/list/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/table/column-header-menu.d.ts.map +1 -1
- package/build-types/dataviews-layouts/table/column-primary.d.ts +2 -1
- package/build-types/dataviews-layouts/table/column-primary.d.ts.map +1 -1
- package/build-types/dataviews-layouts/table/index.d.ts +1 -1
- package/build-types/dataviews-layouts/table/index.d.ts.map +1 -1
- package/build-types/test/dataform.d.ts +2 -0
- package/build-types/test/dataform.d.ts.map +1 -0
- package/build-types/test/dataviews.d.ts +2 -0
- package/build-types/test/dataviews.d.ts.map +1 -0
- package/build-types/test/normalize-fields.d.ts +2 -0
- package/build-types/test/normalize-fields.d.ts.map +1 -0
- package/build-types/test/validation.d.ts +2 -0
- package/build-types/test/validation.d.ts.map +1 -0
- package/build-types/types.d.ts +5 -0
- package/build-types/types.d.ts.map +1 -1
- package/build-wp/index.js +1209 -999
- package/package.json +13 -12
- package/src/components/dataviews/index.tsx +15 -1
- package/src/components/dataviews/style.scss +0 -1
- package/src/components/dataviews-context/index.ts +3 -0
- package/src/components/dataviews-filters/add-filter.tsx +43 -39
- package/src/components/dataviews-filters/index.tsx +1 -1
- package/src/components/dataviews-footer/style.scss +0 -3
- package/src/components/dataviews-item-actions/index.tsx +25 -27
- package/src/components/dataviews-layout/index.tsx +2 -0
- package/src/components/dataviews-view-config/index.tsx +52 -43
- package/src/components/dataviews-view-config/style.scss +0 -1
- package/src/dataviews-layouts/grid/index.tsx +17 -5
- package/src/dataviews-layouts/grid/preview-size-picker.tsx +25 -30
- package/src/dataviews-layouts/grid/style.scss +24 -33
- package/src/dataviews-layouts/list/index.tsx +35 -27
- package/src/dataviews-layouts/list/style.scss +5 -5
- package/src/dataviews-layouts/table/column-header-menu.tsx +152 -148
- package/src/dataviews-layouts/table/column-primary.tsx +7 -0
- package/src/dataviews-layouts/table/index.tsx +10 -0
- package/src/dataviews-layouts/table/style.scss +0 -1
- package/src/test/dataform.tsx +348 -0
- package/src/test/dataviews.tsx +380 -0
- package/src/types.ts +6 -0
- package/tsconfig.json +14 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/form-field-visibility/index.js +0 -32
- package/build/components/form-field-visibility/index.js.map +0 -1
- package/build-module/components/form-field-visibility/index.js +0 -26
- package/build-module/components/form-field-visibility/index.js.map +0 -1
- package/build-types/components/form-field-visibility/index.d.ts +0 -11
- package/build-types/components/form-field-visibility/index.d.ts.map +0 -1
- 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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
24
|
+
type: 'table',
|
|
25
|
+
titleField: 'title',
|
|
26
|
+
mediaField: 'media',
|
|
27
|
+
descriptionField: 'description',
|
|
28
|
+
fields: [ 'author', 'date' ],
|
|
29
|
+
};
|
|
20
30
|
```
|
|
21
31
|
|
|
22
|
-
|
|
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)).
|