@wordpress/dataviews 9.1.1-next.233ccab9b.0 → 10.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.
- package/CHANGELOG.md +42 -1
- package/README.md +137 -36
- package/build/components/dataform/index.js +52 -28
- package/build/components/dataform/index.js.map +7 -1
- package/build/components/dataform-context/index.js +33 -25
- package/build/components/dataform-context/index.js.map +7 -1
- package/build/components/dataviews/index.js +193 -154
- package/build/components/dataviews/index.js.map +7 -1
- package/build/components/dataviews-bulk-actions/index.js +264 -155
- package/build/components/dataviews-bulk-actions/index.js.map +7 -1
- package/build/components/dataviews-context/index.js +40 -36
- package/build/components/dataviews-context/index.js.map +7 -1
- package/build/components/dataviews-filters/add-filter.js +78 -73
- package/build/components/dataviews-filters/add-filter.js.map +7 -1
- package/build/components/dataviews-filters/filter.js +473 -263
- package/build/components/dataviews-filters/filter.js.map +7 -1
- package/build/components/dataviews-filters/filters-toggled.js +39 -25
- package/build/components/dataviews-filters/filters-toggled.js.map +7 -1
- package/build/components/dataviews-filters/filters.js +95 -67
- package/build/components/dataviews-filters/filters.js.map +7 -1
- package/build/components/dataviews-filters/index.js +44 -31
- package/build/components/dataviews-filters/index.js.map +7 -1
- package/build/components/dataviews-filters/input-widget.js +88 -89
- package/build/components/dataviews-filters/input-widget.js.map +7 -1
- package/build/components/dataviews-filters/reset-filters.js +50 -34
- package/build/components/dataviews-filters/reset-filters.js.map +7 -1
- package/build/components/dataviews-filters/search-widget.js +301 -205
- package/build/components/dataviews-filters/search-widget.js.map +7 -1
- package/build/components/dataviews-filters/toggle.js +88 -63
- package/build/components/dataviews-filters/toggle.js.map +7 -1
- package/build/components/dataviews-filters/use-filters.js +40 -29
- package/build/components/dataviews-filters/use-filters.js.map +7 -1
- package/build/components/dataviews-filters/utils.js +26 -10
- package/build/components/dataviews-filters/utils.js.map +7 -1
- package/build/components/dataviews-footer/index.js +54 -33
- package/build/components/dataviews-footer/index.js.map +7 -1
- package/build/components/dataviews-item-actions/index.js +188 -150
- package/build/components/dataviews-item-actions/index.js.map +7 -1
- package/build/components/dataviews-layout/index.js +64 -49
- package/build/components/dataviews-layout/index.js.map +7 -1
- package/build/components/dataviews-pagination/index.js +143 -99
- package/build/components/dataviews-pagination/index.js.map +7 -1
- package/build/components/dataviews-picker/footer.js +152 -101
- package/build/components/dataviews-picker/footer.js.map +7 -1
- package/build/components/dataviews-picker/index.js +173 -145
- package/build/components/dataviews-picker/index.js.map +7 -1
- package/build/components/dataviews-search/index.js +63 -46
- package/build/components/dataviews-search/index.js.map +7 -1
- package/build/components/dataviews-selection-checkbox/index.js +45 -35
- package/build/components/dataviews-selection-checkbox/index.js.map +7 -1
- package/build/components/dataviews-view-config/index.js +587 -512
- package/build/components/dataviews-view-config/index.js.map +7 -1
- package/build/components/dataviews-view-config/infinite-scroll-toggle.js +56 -39
- package/build/components/dataviews-view-config/infinite-scroll-toggle.js.map +7 -1
- package/build/constants.js +215 -108
- package/build/constants.js.map +7 -1
- package/build/dataform-controls/array.js +109 -145
- package/build/dataform-controls/array.js.map +7 -1
- package/build/dataform-controls/checkbox.js +56 -66
- package/build/dataform-controls/checkbox.js.map +7 -1
- package/build/dataform-controls/color.js +112 -119
- package/build/dataform-controls/color.js.map +7 -1
- package/build/dataform-controls/date.js +531 -349
- package/build/dataform-controls/date.js.map +7 -1
- package/build/dataform-controls/datetime.js +189 -148
- package/build/dataform-controls/datetime.js.map +7 -1
- package/build/dataform-controls/email.js +52 -32
- package/build/dataform-controls/email.js.map +7 -1
- package/build/dataform-controls/index.js +83 -63
- package/build/dataform-controls/index.js.map +7 -1
- package/build/dataform-controls/integer.js +36 -129
- package/build/dataform-controls/integer.js.map +7 -1
- package/build/dataform-controls/number.js +39 -0
- package/build/dataform-controls/number.js.map +7 -0
- package/build/dataform-controls/password.js +66 -38
- package/build/dataform-controls/password.js.map +7 -1
- package/build/dataform-controls/radio.js +61 -64
- package/build/dataform-controls/radio.js.map +7 -1
- package/build/dataform-controls/select.js +70 -88
- package/build/dataform-controls/select.js.map +7 -1
- package/build/dataform-controls/telephone.js +52 -32
- package/build/dataform-controls/telephone.js.map +7 -1
- package/build/dataform-controls/text.js +52 -30
- package/build/dataform-controls/text.js.map +7 -1
- package/build/dataform-controls/textarea.js +62 -71
- package/build/dataform-controls/textarea.js.map +7 -1
- package/build/dataform-controls/toggle-group.js +73 -66
- package/build/dataform-controls/toggle-group.js.map +7 -1
- package/build/dataform-controls/toggle.js +57 -67
- package/build/dataform-controls/toggle.js.map +7 -1
- package/build/dataform-controls/url.js +52 -32
- package/build/dataform-controls/url.js.map +7 -1
- package/build/dataform-controls/utils/get-custom-validity.js +35 -0
- package/build/dataform-controls/utils/get-custom-validity.js.map +7 -0
- package/build/dataform-controls/utils/relative-date-control.js +122 -0
- package/build/dataform-controls/utils/relative-date-control.js.map +7 -0
- package/build/dataform-controls/utils/validated-input.js +67 -71
- package/build/dataform-controls/utils/validated-input.js.map +7 -1
- package/build/dataform-controls/utils/validated-number.js +167 -0
- package/build/dataform-controls/utils/validated-number.js.map +7 -0
- package/build/dataform-layouts/card/index.js +217 -0
- package/build/dataform-layouts/card/index.js.map +7 -0
- package/build/dataform-layouts/data-form-layout.js +95 -0
- package/build/dataform-layouts/data-form-layout.js.map +7 -0
- package/build/dataform-layouts/get-summary-fields.js +45 -0
- package/build/dataform-layouts/get-summary-fields.js.map +7 -0
- package/build/dataform-layouts/index.js +99 -0
- package/build/dataform-layouts/index.js.map +7 -0
- package/build/dataform-layouts/is-combined-field.js +31 -0
- package/build/dataform-layouts/is-combined-field.js.map +7 -0
- package/build/dataform-layouts/normalize-form-fields.js +104 -0
- package/build/dataform-layouts/normalize-form-fields.js.map +7 -0
- package/build/dataform-layouts/panel/dropdown.js +159 -0
- package/build/dataform-layouts/panel/dropdown.js.map +7 -0
- package/build/dataform-layouts/panel/index.js +152 -0
- package/build/dataform-layouts/panel/index.js.map +7 -0
- package/build/dataform-layouts/panel/modal.js +176 -0
- package/build/dataform-layouts/panel/modal.js.map +7 -0
- package/build/dataform-layouts/panel/summary-button.js +93 -0
- package/build/dataform-layouts/panel/summary-button.js.map +7 -0
- package/build/dataform-layouts/regular/index.js +139 -0
- package/build/dataform-layouts/regular/index.js.map +7 -0
- package/build/dataform-layouts/row/index.js +120 -0
- package/build/dataform-layouts/row/index.js.map +7 -0
- package/build/dataviews-layouts/grid/index.js +337 -278
- package/build/dataviews-layouts/grid/index.js.map +7 -1
- package/build/dataviews-layouts/grid/preview-size-picker.js +94 -69
- package/build/dataviews-layouts/grid/preview-size-picker.js.map +7 -1
- package/build/dataviews-layouts/index.js +75 -48
- package/build/dataviews-layouts/index.js.map +7 -1
- package/build/dataviews-layouts/list/index.js +441 -354
- package/build/dataviews-layouts/list/index.js.map +7 -1
- package/build/dataviews-layouts/picker-grid/index.js +366 -300
- package/build/dataviews-layouts/picker-grid/index.js.map +7 -1
- package/build/dataviews-layouts/table/column-header-menu.js +144 -133
- package/build/dataviews-layouts/table/column-header-menu.js.map +7 -1
- package/build/dataviews-layouts/table/column-primary.js +86 -66
- package/build/dataviews-layouts/table/column-primary.js.map +7 -1
- package/build/dataviews-layouts/table/density-picker.js +86 -46
- package/build/dataviews-layouts/table/density-picker.js.map +7 -1
- package/build/dataviews-layouts/table/index.js +354 -319
- package/build/dataviews-layouts/table/index.js.map +7 -1
- package/build/dataviews-layouts/table/use-is-horizontal-scroll-end.js +55 -47
- package/build/dataviews-layouts/table/use-is-horizontal-scroll-end.js.map +7 -1
- package/build/dataviews-layouts/utils/get-data-by-group.js +24 -13
- package/build/dataviews-layouts/utils/get-data-by-group.js.map +7 -1
- package/build/dataviews-layouts/utils/grid-items.js +51 -34
- package/build/dataviews-layouts/utils/grid-items.js.map +7 -1
- package/build/dataviews-layouts/utils/item-click-wrapper.js +53 -31
- package/build/dataviews-layouts/utils/item-click-wrapper.js.map +7 -1
- package/build/dataviews-layouts/utils/preview-size-picker.js +94 -69
- package/build/dataviews-layouts/utils/preview-size-picker.js.map +7 -1
- package/build/field-types/array.js +46 -41
- package/build/field-types/array.js.map +7 -1
- package/build/field-types/boolean.js +52 -47
- package/build/field-types/boolean.js.map +7 -1
- package/build/field-types/color.js +79 -81
- package/build/field-types/color.js.map +7 -1
- package/build/field-types/date.js +69 -48
- package/build/field-types/date.js.map +7 -1
- package/build/field-types/datetime.js +62 -43
- package/build/field-types/datetime.js.map +7 -1
- package/build/field-types/email.js +58 -47
- package/build/field-types/email.js.map +7 -1
- package/build/field-types/index.js +84 -89
- package/build/field-types/index.js.map +7 -1
- package/build/field-types/integer.js +68 -45
- package/build/field-types/integer.js.map +7 -1
- package/build/field-types/media.js +25 -27
- package/build/field-types/media.js.map +7 -1
- package/build/field-types/number.js +95 -0
- package/build/field-types/number.js.map +7 -0
- package/build/field-types/password.js +40 -39
- package/build/field-types/password.js.map +7 -1
- package/build/field-types/telephone.js +55 -45
- package/build/field-types/telephone.js.map +7 -1
- package/build/field-types/text.js +55 -46
- package/build/field-types/text.js.map +7 -1
- package/build/field-types/url.js +55 -45
- package/build/field-types/url.js.map +7 -1
- package/build/field-types/utils/render-from-elements.js +52 -0
- package/build/field-types/utils/render-from-elements.js.map +7 -0
- package/build/hooks/index.js +39 -0
- package/build/hooks/index.js.map +7 -0
- package/build/hooks/use-elements.js +63 -0
- package/build/hooks/use-elements.js.map +7 -0
- package/build/hooks/use-form-validity.js +426 -0
- package/build/hooks/use-form-validity.js.map +7 -0
- package/build/index.js +50 -45
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/types/dataform.js +17 -0
- package/build/types/dataform.js.map +7 -0
- package/build/types/dataviews.js +17 -0
- package/build/types/dataviews.js.map +7 -0
- package/build/types/field-api.js +17 -0
- package/build/types/field-api.js.map +7 -0
- package/build/types/index.js +17 -0
- package/build/types/index.js.map +7 -0
- package/build/types/private.js +17 -0
- package/build/types/private.js.map +7 -0
- package/build/utils/filter-sort-and-paginate.js +285 -0
- package/build/utils/filter-sort-and-paginate.js.map +7 -0
- package/build/utils/has-elements.js +27 -0
- package/build/utils/has-elements.js.map +7 -0
- package/build/utils/normalize-fields.js +160 -0
- package/build/utils/normalize-fields.js.map +7 -0
- package/build-module/components/dataform/index.js +25 -25
- package/build-module/components/dataform/index.js.map +7 -1
- package/build-module/components/dataform-context/index.js +11 -19
- package/build-module/components/dataform-context/index.js.map +7 -1
- package/build-module/components/dataviews/index.js +154 -127
- package/build-module/components/dataviews/index.js.map +7 -1
- package/build-module/components/dataviews-bulk-actions/index.js +227 -140
- package/build-module/components/dataviews-bulk-actions/index.js.map +7 -1
- package/build-module/components/dataviews-context/index.js +20 -30
- package/build-module/components/dataviews-context/index.js.map +7 -1
- package/build-module/components/dataviews-filters/add-filter.js +60 -68
- package/build-module/components/dataviews-filters/add-filter.js.map +7 -1
- package/build-module/components/dataviews-filters/filter.js +454 -232
- package/build-module/components/dataviews-filters/filter.js.map +7 -1
- package/build-module/components/dataviews-filters/filters-toggled.js +11 -19
- package/build-module/components/dataviews-filters/filters-toggled.js.map +7 -1
- package/build-module/components/dataviews-filters/filters.js +65 -59
- package/build-module/components/dataviews-filters/filters.js.map +7 -1
- package/build-module/components/dataviews-filters/index.js +11 -5
- package/build-module/components/dataviews-filters/index.js.map +7 -1
- package/build-module/components/dataviews-filters/input-widget.js +57 -81
- package/build-module/components/dataviews-filters/input-widget.js.map +7 -1
- package/build-module/components/dataviews-filters/reset-filters.js +33 -30
- package/build-module/components/dataviews-filters/reset-filters.js.map +7 -1
- package/build-module/components/dataviews-filters/search-widget.js +276 -195
- package/build-module/components/dataviews-filters/search-widget.js.map +7 -1
- package/build-module/components/dataviews-filters/toggle.js +58 -55
- package/build-module/components/dataviews-filters/toggle.js.map +7 -1
- package/build-module/components/dataviews-filters/use-filters.js +21 -23
- package/build-module/components/dataviews-filters/use-filters.js.map +7 -1
- package/build-module/components/dataviews-filters/utils.js +5 -6
- package/build-module/components/dataviews-filters/utils.js.map +7 -1
- package/build-module/components/dataviews-footer/index.js +28 -26
- package/build-module/components/dataviews-footer/index.js.map +7 -1
- package/build-module/components/dataviews-item-actions/index.js +171 -144
- package/build-module/components/dataviews-item-actions/index.js.map +7 -1
- package/build-module/components/dataviews-layout/index.js +35 -42
- package/build-module/components/dataviews-layout/index.js.map +7 -1
- package/build-module/components/dataviews-pagination/index.js +115 -92
- package/build-module/components/dataviews-pagination/index.js.map +7 -1
- package/build-module/components/dataviews-picker/footer.js +122 -93
- package/build-module/components/dataviews-picker/footer.js.map +7 -1
- package/build-module/components/dataviews-picker/index.js +137 -121
- package/build-module/components/dataviews-picker/index.js.map +7 -1
- package/build-module/components/dataviews-search/index.js +30 -35
- package/build-module/components/dataviews-search/index.js.map +7 -1
- package/build-module/components/dataviews-selection-checkbox/index.js +28 -31
- package/build-module/components/dataviews-selection-checkbox/index.js.map +7 -1
- package/build-module/components/dataviews-view-config/index.js +579 -504
- package/build-module/components/dataviews-view-config/index.js.map +7 -1
- package/build-module/components/dataviews-view-config/infinite-scroll-toggle.js +28 -33
- package/build-module/components/dataviews-view-config/infinite-scroll-toggle.js.map +7 -1
- package/build-module/constants.js +157 -101
- package/build-module/constants.js.map +7 -1
- package/build-module/dataform-controls/array.js +82 -141
- package/build-module/dataform-controls/array.js.map +7 -1
- package/build-module/dataform-controls/checkbox.js +28 -61
- package/build-module/dataform-controls/checkbox.js.map +7 -1
- package/build-module/dataform-controls/color.js +89 -115
- package/build-module/dataform-controls/color.js.map +7 -1
- package/build-module/dataform-controls/date.js +524 -337
- package/build-module/dataform-controls/date.js.map +7 -1
- package/build-module/dataform-controls/datetime.js +162 -139
- package/build-module/dataform-controls/datetime.js.map +7 -1
- package/build-module/dataform-controls/email.js +28 -28
- package/build-module/dataform-controls/email.js.map +7 -1
- package/build-module/dataform-controls/index.js +36 -43
- package/build-module/dataform-controls/index.js.map +7 -1
- package/build-module/dataform-controls/integer.js +8 -123
- package/build-module/dataform-controls/integer.js.map +7 -1
- package/build-module/dataform-controls/number.js +9 -0
- package/build-module/dataform-controls/number.js.map +7 -0
- package/build-module/dataform-controls/password.js +37 -30
- package/build-module/dataform-controls/password.js.map +7 -1
- package/build-module/dataform-controls/radio.js +34 -60
- package/build-module/dataform-controls/radio.js.map +7 -1
- package/build-module/dataform-controls/select.js +43 -84
- package/build-module/dataform-controls/select.js.map +7 -1
- package/build-module/dataform-controls/telephone.js +28 -28
- package/build-module/dataform-controls/telephone.js.map +7 -1
- package/build-module/dataform-controls/text.js +25 -26
- package/build-module/dataform-controls/text.js.map +7 -1
- package/build-module/dataform-controls/textarea.js +35 -67
- package/build-module/dataform-controls/textarea.js.map +7 -1
- package/build-module/dataform-controls/toggle-group.js +50 -62
- package/build-module/dataform-controls/toggle-group.js.map +7 -1
- package/build-module/dataform-controls/toggle.js +29 -62
- package/build-module/dataform-controls/toggle.js.map +7 -1
- package/build-module/dataform-controls/url.js +28 -28
- package/build-module/dataform-controls/url.js.map +7 -1
- package/build-module/dataform-controls/utils/get-custom-validity.js +15 -0
- package/build-module/dataform-controls/utils/get-custom-validity.js.map +7 -0
- package/build-module/dataform-controls/utils/relative-date-control.js +97 -0
- package/build-module/dataform-controls/utils/relative-date-control.js.map +7 -0
- package/build-module/dataform-controls/utils/validated-input.js +40 -67
- package/build-module/dataform-controls/utils/validated-input.js.map +7 -1
- package/build-module/dataform-controls/utils/validated-number.js +142 -0
- package/build-module/dataform-controls/utils/validated-number.js.map +7 -0
- package/build-module/dataform-layouts/card/index.js +183 -0
- package/build-module/dataform-layouts/card/index.js.map +7 -0
- package/build-module/dataform-layouts/data-form-layout.js +61 -0
- package/build-module/dataform-layouts/data-form-layout.js.map +7 -0
- package/build-module/dataform-layouts/get-summary-fields.js +21 -0
- package/build-module/dataform-layouts/get-summary-fields.js.map +7 -0
- package/build-module/dataform-layouts/index.js +68 -0
- package/build-module/dataform-layouts/index.js.map +7 -0
- package/build-module/dataform-layouts/is-combined-field.js +7 -0
- package/build-module/dataform-layouts/is-combined-field.js.map +7 -0
- package/build-module/dataform-layouts/normalize-form-fields.js +79 -0
- package/build-module/dataform-layouts/normalize-form-fields.js.map +7 -0
- package/build-module/dataform-layouts/panel/dropdown.js +136 -0
- package/build-module/dataform-layouts/panel/dropdown.js.map +7 -0
- package/build-module/dataform-layouts/panel/index.js +125 -0
- package/build-module/dataform-layouts/panel/index.js.map +7 -0
- package/build-module/dataform-layouts/panel/modal.js +151 -0
- package/build-module/dataform-layouts/panel/modal.js.map +7 -0
- package/build-module/dataform-layouts/panel/summary-button.js +73 -0
- package/build-module/dataform-layouts/panel/summary-button.js.map +7 -0
- package/build-module/dataform-layouts/regular/index.js +115 -0
- package/build-module/dataform-layouts/regular/index.js.map +7 -0
- package/build-module/dataform-layouts/row/index.js +95 -0
- package/build-module/dataform-layouts/row/index.js.map +7 -0
- package/build-module/dataviews-layouts/grid/index.js +316 -267
- package/build-module/dataviews-layouts/grid/index.js.map +7 -1
- package/build-module/dataviews-layouts/grid/preview-size-picker.js +66 -63
- package/build-module/dataviews-layouts/grid/preview-size-picker.js.map +7 -1
- package/build-module/dataviews-layouts/index.js +53 -42
- package/build-module/dataviews-layouts/index.js.map +7 -1
- package/build-module/dataviews-layouts/list/index.js +422 -339
- package/build-module/dataviews-layouts/list/index.js.map +7 -1
- package/build-module/dataviews-layouts/picker-grid/index.js +344 -291
- package/build-module/dataviews-layouts/picker-grid/index.js.map +7 -1
- package/build-module/dataviews-layouts/table/column-header-menu.js +129 -127
- package/build-module/dataviews-layouts/table/column-header-menu.js.map +7 -1
- package/build-module/dataviews-layouts/table/column-primary.js +71 -62
- package/build-module/dataviews-layouts/table/column-primary.js.map +7 -1
- package/build-module/dataviews-layouts/table/density-picker.js +61 -40
- package/build-module/dataviews-layouts/table/density-picker.js.map +7 -1
- package/build-module/dataviews-layouts/table/index.js +326 -302
- package/build-module/dataviews-layouts/table/index.js.map +7 -1
- package/build-module/dataviews-layouts/table/use-is-horizontal-scroll-end.js +31 -40
- package/build-module/dataviews-layouts/table/use-is-horizontal-scroll-end.js.map +7 -1
- package/build-module/dataviews-layouts/utils/get-data-by-group.js +7 -10
- package/build-module/dataviews-layouts/utils/get-data-by-group.js.map +7 -1
- package/build-module/dataviews-layouts/utils/grid-items.js +19 -28
- package/build-module/dataviews-layouts/utils/grid-items.js.map +7 -1
- package/build-module/dataviews-layouts/utils/item-click-wrapper.js +32 -28
- package/build-module/dataviews-layouts/utils/item-click-wrapper.js.map +7 -1
- package/build-module/dataviews-layouts/utils/preview-size-picker.js +66 -63
- package/build-module/dataviews-layouts/utils/preview-size-picker.js.map +7 -1
- package/build-module/field-types/array.js +32 -37
- package/build-module/field-types/array.js.map +7 -1
- package/build-module/field-types/boolean.js +22 -41
- package/build-module/field-types/boolean.js.map +7 -1
- package/build-module/field-types/color.js +51 -72
- package/build-module/field-types/color.js.map +7 -1
- package/build-module/field-types/date.js +51 -44
- package/build-module/field-types/date.js.map +7 -1
- package/build-module/field-types/datetime.js +43 -39
- package/build-module/field-types/datetime.js.map +7 -1
- package/build-module/field-types/email.js +39 -42
- package/build-module/field-types/email.js.map +7 -1
- package/build-module/field-types/index.js +43 -72
- package/build-module/field-types/index.js.map +7 -1
- package/build-module/field-types/integer.js +52 -41
- package/build-module/field-types/integer.js.map +7 -1
- package/build-module/field-types/media.js +7 -23
- package/build-module/field-types/media.js.map +7 -1
- package/build-module/field-types/number.js +77 -0
- package/build-module/field-types/number.js.map +7 -0
- package/build-module/field-types/password.js +12 -36
- package/build-module/field-types/password.js.map +7 -1
- package/build-module/field-types/telephone.js +36 -40
- package/build-module/field-types/telephone.js.map +7 -1
- package/build-module/field-types/text.js +36 -41
- package/build-module/field-types/text.js.map +7 -1
- package/build-module/field-types/url.js +36 -40
- package/build-module/field-types/url.js.map +7 -1
- package/build-module/field-types/utils/render-from-elements.js +22 -0
- package/build-module/field-types/utils/render-from-elements.js.map +7 -0
- package/build-module/hooks/index.js +5 -0
- package/build-module/hooks/index.js.map +7 -0
- package/build-module/hooks/use-elements.js +43 -0
- package/build-module/hooks/use-elements.js.map +7 -0
- package/build-module/hooks/use-form-validity.js +392 -0
- package/build-module/hooks/use-form-validity.js.map +7 -0
- package/build-module/index.js +15 -7
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/types/dataform.js +1 -0
- package/build-module/types/dataform.js.map +7 -0
- package/build-module/types/dataviews.js +1 -0
- package/build-module/types/dataviews.js.map +7 -0
- package/build-module/types/field-api.js +1 -0
- package/build-module/types/field-api.js.map +7 -0
- package/build-module/types/index.js +1 -0
- package/build-module/types/index.js.map +7 -0
- package/build-module/types/private.js +1 -0
- package/build-module/types/private.js.map +7 -0
- package/build-module/utils/filter-sort-and-paginate.js +278 -0
- package/build-module/utils/filter-sort-and-paginate.js.map +7 -0
- package/build-module/utils/has-elements.js +7 -0
- package/build-module/utils/has-elements.js.map +7 -0
- package/build-module/utils/normalize-fields.js +134 -0
- package/build-module/utils/normalize-fields.js.map +7 -0
- package/build-style/style-rtl.css +81 -217
- package/build-style/style.css +81 -217
- package/build-types/components/dataform/index.d.ts +1 -1
- package/build-types/components/dataform/index.d.ts.map +1 -1
- package/build-types/components/dataform-context/index.d.ts.map +1 -1
- package/build-types/components/dataviews-bulk-actions/index.d.ts +1 -1
- package/build-types/components/dataviews-bulk-actions/index.d.ts.map +1 -1
- package/build-types/components/dataviews-context/index.d.ts +1 -1
- package/build-types/components/dataviews-filters/filter.d.ts +1 -1
- package/build-types/components/dataviews-filters/filter.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/search-widget.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/use-filters.d.ts.map +1 -1
- package/build-types/components/dataviews-item-actions/index.d.ts.map +1 -1
- package/build-types/components/dataviews-picker/footer.d.ts.map +1 -1
- package/build-types/components/dataviews-selection-checkbox/index.d.ts +1 -1
- package/build-types/dataform-controls/array.d.ts +1 -1
- package/build-types/dataform-controls/array.d.ts.map +1 -1
- package/build-types/dataform-controls/checkbox.d.ts +1 -1
- package/build-types/dataform-controls/checkbox.d.ts.map +1 -1
- package/build-types/dataform-controls/color.d.ts +1 -1
- package/build-types/dataform-controls/color.d.ts.map +1 -1
- package/build-types/dataform-controls/date.d.ts +1 -1
- package/build-types/dataform-controls/date.d.ts.map +1 -1
- package/build-types/dataform-controls/datetime.d.ts +1 -1
- package/build-types/dataform-controls/datetime.d.ts.map +1 -1
- package/build-types/dataform-controls/email.d.ts +1 -1
- package/build-types/dataform-controls/email.d.ts.map +1 -1
- package/build-types/dataform-controls/index.d.ts.map +1 -1
- package/build-types/dataform-controls/integer.d.ts +4 -1
- package/build-types/dataform-controls/integer.d.ts.map +1 -1
- package/build-types/dataform-controls/number.d.ts +6 -0
- package/build-types/dataform-controls/number.d.ts.map +1 -0
- package/build-types/dataform-controls/password.d.ts +1 -1
- package/build-types/dataform-controls/password.d.ts.map +1 -1
- package/build-types/dataform-controls/radio.d.ts +1 -1
- package/build-types/dataform-controls/radio.d.ts.map +1 -1
- package/build-types/dataform-controls/select.d.ts +1 -1
- package/build-types/dataform-controls/select.d.ts.map +1 -1
- package/build-types/dataform-controls/telephone.d.ts +1 -1
- package/build-types/dataform-controls/telephone.d.ts.map +1 -1
- package/build-types/dataform-controls/text.d.ts +1 -1
- package/build-types/dataform-controls/text.d.ts.map +1 -1
- package/build-types/dataform-controls/textarea.d.ts +1 -1
- package/build-types/dataform-controls/textarea.d.ts.map +1 -1
- package/build-types/dataform-controls/toggle-group.d.ts +1 -1
- package/build-types/dataform-controls/toggle-group.d.ts.map +1 -1
- package/build-types/dataform-controls/toggle.d.ts +1 -1
- package/build-types/dataform-controls/toggle.d.ts.map +1 -1
- package/build-types/dataform-controls/url.d.ts +1 -1
- package/build-types/dataform-controls/url.d.ts.map +1 -1
- package/build-types/dataform-controls/utils/get-custom-validity.d.ts +9 -0
- package/build-types/dataform-controls/utils/get-custom-validity.d.ts.map +1 -0
- package/build-types/dataform-controls/utils/relative-date-control.d.ts +5 -0
- package/build-types/dataform-controls/utils/relative-date-control.d.ts.map +1 -0
- package/build-types/dataform-controls/utils/validated-input.d.ts +1 -1
- package/build-types/dataform-controls/utils/validated-input.d.ts.map +1 -1
- package/build-types/dataform-controls/utils/validated-number.d.ts +9 -0
- package/build-types/dataform-controls/utils/validated-number.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/card/index.d.ts +1 -1
- package/build-types/dataform-layouts/card/index.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/data-form-layout.d.ts +5 -3
- package/build-types/dataform-layouts/data-form-layout.d.ts.map +1 -0
- package/build-types/dataform-layouts/get-summary-fields.d.ts +12 -0
- package/build-types/dataform-layouts/get-summary-fields.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/index.d.ts +0 -5
- package/build-types/dataform-layouts/index.d.ts.map +1 -0
- package/build-types/dataform-layouts/is-combined-field.d.ts.map +1 -0
- package/build-types/{normalize-form-fields.d.ts → dataform-layouts/normalize-form-fields.d.ts} +1 -1
- package/build-types/dataform-layouts/normalize-form-fields.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/panel/dropdown.d.ts +8 -7
- package/build-types/dataform-layouts/panel/dropdown.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/panel/index.d.ts +1 -1
- package/build-types/dataform-layouts/panel/index.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/panel/modal.d.ts +5 -5
- package/build-types/dataform-layouts/panel/modal.d.ts.map +1 -0
- package/build-types/dataform-layouts/panel/summary-button.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/regular/index.d.ts +1 -1
- package/build-types/dataform-layouts/regular/index.d.ts.map +1 -0
- package/build-types/{dataforms-layouts → dataform-layouts}/row/index.d.ts +1 -1
- package/build-types/dataform-layouts/row/index.d.ts.map +1 -0
- package/build-types/dataviews-layouts/list/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/utils/item-click-wrapper.d.ts +1 -1
- package/build-types/dataviews-layouts/utils/item-click-wrapper.d.ts.map +1 -1
- package/build-types/field-types/array.d.ts.map +1 -1
- package/build-types/field-types/boolean.d.ts +2 -1
- package/build-types/field-types/boolean.d.ts.map +1 -1
- package/build-types/field-types/color.d.ts +2 -1
- package/build-types/field-types/color.d.ts.map +1 -1
- package/build-types/field-types/date.d.ts +4 -3
- package/build-types/field-types/date.d.ts.map +1 -1
- package/build-types/field-types/datetime.d.ts +3 -2
- package/build-types/field-types/datetime.d.ts.map +1 -1
- package/build-types/field-types/email.d.ts +3 -2
- package/build-types/field-types/email.d.ts.map +1 -1
- package/build-types/field-types/index.d.ts.map +1 -1
- package/build-types/field-types/integer.d.ts +2 -1
- package/build-types/field-types/integer.d.ts.map +1 -1
- package/build-types/field-types/media.d.ts +2 -5
- package/build-types/field-types/media.d.ts.map +1 -1
- package/build-types/field-types/number.d.ts +21 -0
- package/build-types/field-types/number.d.ts.map +1 -0
- package/build-types/field-types/password.d.ts +4 -3
- package/build-types/field-types/password.d.ts.map +1 -1
- package/build-types/field-types/telephone.d.ts +4 -3
- package/build-types/field-types/telephone.d.ts.map +1 -1
- package/build-types/field-types/text.d.ts +4 -3
- package/build-types/field-types/text.d.ts.map +1 -1
- package/build-types/field-types/url.d.ts +4 -3
- package/build-types/field-types/url.d.ts.map +1 -1
- package/build-types/field-types/utils/render-from-elements.d.ts +6 -0
- package/build-types/field-types/utils/render-from-elements.d.ts.map +1 -0
- package/build-types/hooks/index.d.ts +5 -0
- package/build-types/hooks/index.d.ts.map +1 -0
- package/build-types/hooks/use-elements.d.ts +12 -0
- package/build-types/hooks/use-elements.d.ts.map +1 -0
- package/build-types/hooks/use-form-validity.d.ts +16 -0
- package/build-types/hooks/use-form-validity.d.ts.map +1 -0
- package/build-types/index.d.ts +2 -2
- package/build-types/index.d.ts.map +1 -1
- package/build-types/{components/dataform/stories/index.story.d.ts → stories/dataform.story.d.ts} +16 -6
- package/build-types/stories/dataform.story.d.ts.map +1 -0
- package/build-types/{components/dataviews-picker/stories/index.story.d.ts → stories/dataviews-picker.story.d.ts} +2 -2
- package/build-types/stories/dataviews-picker.story.d.ts.map +1 -0
- package/build-types/{components/dataviews/stories/fixtures.d.ts → stories/dataviews.fixtures.d.ts} +2 -2
- package/build-types/stories/dataviews.fixtures.d.ts.map +1 -0
- package/build-types/{components/dataviews/stories/index.story.d.ts → stories/dataviews.story.d.ts} +3 -3
- package/build-types/stories/dataviews.story.d.ts.map +1 -0
- package/build-types/stories/field-types.story.d.ts +157 -0
- package/build-types/stories/field-types.story.d.ts.map +1 -0
- package/build-types/test/use-form-validity.d.ts +2 -0
- package/build-types/test/use-form-validity.d.ts.map +1 -0
- package/build-types/types/dataform.d.ts +112 -0
- package/build-types/types/dataform.d.ts.map +1 -0
- package/build-types/types/dataviews.d.ts +341 -0
- package/build-types/types/dataviews.d.ts.map +1 -0
- package/build-types/types/field-api.d.ts +298 -0
- package/build-types/types/field-api.d.ts.map +1 -0
- package/build-types/types/index.d.ts +4 -0
- package/build-types/types/index.d.ts.map +1 -0
- package/build-types/{private-types.d.ts → types/private.d.ts} +1 -1
- package/build-types/types/private.d.ts.map +1 -0
- package/build-types/{filter-and-sort-data-view.d.ts → utils/filter-sort-and-paginate.d.ts} +3 -3
- package/build-types/utils/filter-sort-and-paginate.d.ts.map +1 -0
- package/build-types/utils/has-elements.d.ts +6 -0
- package/build-types/utils/has-elements.d.ts.map +1 -0
- package/build-types/utils/normalize-fields.d.ts +9 -0
- package/build-types/utils/normalize-fields.d.ts.map +1 -0
- package/build-wp/index.js +3151 -2714
- package/package.json +16 -18
- package/src/components/dataform/index.tsx +9 -3
- package/src/components/dataform-context/index.tsx +3 -1
- package/src/components/dataviews/index.tsx +2 -2
- package/src/components/dataviews/style.scss +4 -0
- package/src/components/dataviews-bulk-actions/index.tsx +1 -2
- package/src/components/dataviews-bulk-actions/style.scss +3 -0
- package/src/components/dataviews-context/index.ts +1 -1
- package/src/components/dataviews-filters/filter.tsx +11 -5
- package/src/components/dataviews-filters/search-widget.tsx +30 -3
- package/src/components/dataviews-filters/style.scss +21 -6
- package/src/components/dataviews-filters/use-filters.ts +4 -2
- package/src/components/dataviews-footer/style.scss +4 -0
- package/src/components/dataviews-item-actions/index.tsx +6 -2
- package/src/components/dataviews-item-actions/style.scss +3 -0
- package/src/components/dataviews-pagination/style.scss +3 -0
- package/src/components/dataviews-picker/footer.tsx +2 -4
- package/src/components/dataviews-picker/index.tsx +2 -2
- package/src/components/dataviews-picker/style.scss +2 -0
- package/src/components/dataviews-selection-checkbox/index.tsx +1 -1
- package/src/components/dataviews-selection-checkbox/style.scss +3 -0
- package/src/components/dataviews-view-config/style.scss +3 -0
- package/src/dataform-controls/array.tsx +16 -82
- package/src/dataform-controls/checkbox.tsx +5 -41
- package/src/dataform-controls/color.tsx +5 -37
- package/src/dataform-controls/date.tsx +375 -238
- package/src/dataform-controls/datetime.tsx +92 -60
- package/src/dataform-controls/email.tsx +2 -0
- package/src/dataform-controls/index.tsx +4 -1
- package/src/dataform-controls/integer.tsx +3 -179
- package/src/dataform-controls/number.tsx +10 -0
- package/src/dataform-controls/password.tsx +2 -0
- package/src/dataform-controls/radio.tsx +24 -55
- package/src/dataform-controls/select.tsx +14 -61
- package/src/dataform-controls/style.scss +2 -0
- package/src/dataform-controls/telephone.tsx +2 -0
- package/src/dataform-controls/text.tsx +2 -0
- package/src/dataform-controls/textarea.tsx +6 -42
- package/src/dataform-controls/toggle-group.tsx +38 -64
- package/src/dataform-controls/toggle.tsx +6 -42
- package/src/dataform-controls/url.tsx +2 -0
- package/src/dataform-controls/utils/get-custom-validity.ts +24 -0
- package/src/dataform-controls/{relative-date-control.tsx → utils/relative-date-control.tsx} +37 -25
- package/src/dataform-controls/utils/validated-input.tsx +4 -40
- package/src/dataform-controls/utils/validated-number.tsx +171 -0
- package/src/{dataforms-layouts → dataform-layouts}/card/index.tsx +106 -8
- package/src/dataform-layouts/card/style.scss +24 -0
- package/src/{dataforms-layouts → dataform-layouts}/data-form-layout.tsx +22 -5
- package/src/dataform-layouts/get-summary-fields.ts +42 -0
- package/src/{dataforms-layouts → dataform-layouts}/index.tsx +32 -2
- package/src/{normalize-form-fields.ts → dataform-layouts/normalize-form-fields.ts} +28 -1
- package/src/{dataforms-layouts → dataform-layouts}/panel/dropdown.tsx +36 -15
- package/src/{dataforms-layouts → dataform-layouts}/panel/index.tsx +88 -55
- package/src/{dataforms-layouts → dataform-layouts}/panel/modal.tsx +42 -31
- package/src/{dataforms-layouts → dataform-layouts}/panel/style.scss +3 -0
- package/src/{dataforms-layouts → dataform-layouts}/regular/index.tsx +5 -1
- package/src/{dataforms-layouts → dataform-layouts}/regular/style.scss +2 -0
- package/src/{dataforms-layouts → dataform-layouts}/row/index.tsx +9 -4
- package/src/dataform-layouts/style.scss +5 -0
- package/src/dataviews-layouts/grid/index.tsx +1 -1
- package/src/dataviews-layouts/grid/style.scss +8 -3
- package/src/dataviews-layouts/list/index.tsx +0 -2
- package/src/dataviews-layouts/list/style.scss +3 -0
- package/src/dataviews-layouts/picker-grid/index.tsx +1 -1
- package/src/dataviews-layouts/picker-grid/style.scss +8 -4
- package/src/dataviews-layouts/table/column-header-menu.tsx +1 -1
- package/src/dataviews-layouts/table/index.tsx +1 -1
- package/src/dataviews-layouts/table/style.scss +9 -0
- package/src/dataviews-layouts/utils/grid-items.scss +2 -0
- package/src/dataviews-layouts/utils/item-click-wrapper.tsx +40 -2
- package/src/field-types/array.tsx +1 -0
- package/src/field-types/boolean.tsx +4 -3
- package/src/field-types/color.tsx +4 -10
- package/src/field-types/{date.ts → date.tsx} +5 -16
- package/src/field-types/datetime.tsx +8 -21
- package/src/field-types/email.tsx +7 -11
- package/src/field-types/index.tsx +13 -23
- package/src/field-types/integer.tsx +7 -11
- package/src/field-types/media.tsx +3 -17
- package/src/field-types/number.tsx +92 -0
- package/src/field-types/password.tsx +8 -21
- package/src/field-types/telephone.tsx +8 -21
- package/src/field-types/text.tsx +8 -21
- package/src/field-types/url.tsx +8 -21
- package/src/field-types/utils/render-from-elements.tsx +29 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-elements.ts +66 -0
- package/src/hooks/use-form-validity.ts +571 -0
- package/src/index.ts +2 -2
- package/src/{components/dataform/stories/index.story.tsx → stories/dataform.story.tsx} +455 -63
- package/src/{components/dataviews-picker/stories/index.story.tsx → stories/dataviews-picker.story.tsx} +5 -9
- package/src/{components/dataviews/stories/fixtures.tsx → stories/dataviews.fixtures.tsx} +36 -5
- package/src/{components/dataviews/stories/index.story.tsx → stories/dataviews.story.tsx} +7 -8
- package/src/{field-types/stories/index.story.tsx → stories/field-types.story.tsx} +244 -48
- package/src/style.scss +19 -18
- package/src/test/dataform.tsx +36 -0
- package/src/test/dataviews-picker.tsx +1 -1
- package/src/test/dataviews.tsx +1 -2
- package/src/test/{filter-and-sort-data-view.js → filter-sort-and-paginate.js} +63 -16
- package/src/test/normalize-fields.ts +23 -1
- package/src/test/normalize-form-fields.ts +54 -5
- package/src/test/use-form-validity.ts +546 -0
- package/src/types/dataform.ts +144 -0
- package/src/types/dataviews.ts +443 -0
- package/src/types/field-api.ts +381 -0
- package/src/types/index.ts +3 -0
- package/src/{filter-and-sort-data-view.ts → utils/filter-sort-and-paginate.ts} +4 -4
- package/src/utils/has-elements.ts +11 -0
- package/src/{normalize-fields.ts → utils/normalize-fields.ts} +13 -8
- package/tsconfig.tsbuildinfo +1 -1
- package/build/dataform-controls/relative-date-control.js +0 -105
- package/build/dataform-controls/relative-date-control.js.map +0 -1
- package/build/dataforms-layouts/card/index.js +0 -136
- package/build/dataforms-layouts/card/index.js.map +0 -1
- package/build/dataforms-layouts/data-form-layout.js +0 -71
- package/build/dataforms-layouts/data-form-layout.js.map +0 -1
- package/build/dataforms-layouts/index.js +0 -58
- package/build/dataforms-layouts/index.js.map +0 -1
- package/build/dataforms-layouts/is-combined-field.js +0 -14
- package/build/dataforms-layouts/is-combined-field.js.map +0 -1
- package/build/dataforms-layouts/panel/dropdown.js +0 -120
- package/build/dataforms-layouts/panel/dropdown.js.map +0 -1
- package/build/dataforms-layouts/panel/index.js +0 -126
- package/build/dataforms-layouts/panel/index.js.map +0 -1
- package/build/dataforms-layouts/panel/modal.js +0 -120
- package/build/dataforms-layouts/panel/modal.js.map +0 -1
- package/build/dataforms-layouts/panel/summary-button.js +0 -67
- package/build/dataforms-layouts/panel/summary-button.js.map +0 -1
- package/build/dataforms-layouts/regular/index.js +0 -116
- package/build/dataforms-layouts/regular/index.js.map +0 -1
- package/build/dataforms-layouts/row/index.js +0 -113
- package/build/dataforms-layouts/row/index.js.map +0 -1
- package/build/filter-and-sort-data-view.js +0 -313
- package/build/filter-and-sort-data-view.js.map +0 -1
- package/build/normalize-fields.js +0 -155
- package/build/normalize-fields.js.map +0 -1
- package/build/normalize-form-fields.js +0 -81
- package/build/normalize-form-fields.js.map +0 -1
- package/build/private-types.js +0 -6
- package/build/private-types.js.map +0 -1
- package/build/types.js +0 -6
- package/build/types.js.map +0 -1
- package/build/utils.js +0 -22
- package/build/utils.js.map +0 -1
- package/build/validation.js +0 -61
- package/build/validation.js.map +0 -1
- package/build-module/dataform-controls/relative-date-control.js +0 -96
- package/build-module/dataform-controls/relative-date-control.js.map +0 -1
- package/build-module/dataforms-layouts/card/index.js +0 -127
- package/build-module/dataforms-layouts/card/index.js.map +0 -1
- package/build-module/dataforms-layouts/data-form-layout.js +0 -62
- package/build-module/dataforms-layouts/data-form-layout.js.map +0 -1
- package/build-module/dataforms-layouts/index.js +0 -51
- package/build-module/dataforms-layouts/index.js.map +0 -1
- package/build-module/dataforms-layouts/is-combined-field.js +0 -8
- package/build-module/dataforms-layouts/is-combined-field.js.map +0 -1
- package/build-module/dataforms-layouts/panel/dropdown.js +0 -113
- package/build-module/dataforms-layouts/panel/dropdown.js.map +0 -1
- package/build-module/dataforms-layouts/panel/index.js +0 -119
- package/build-module/dataforms-layouts/panel/index.js.map +0 -1
- package/build-module/dataforms-layouts/panel/modal.js +0 -113
- package/build-module/dataforms-layouts/panel/modal.js.map +0 -1
- package/build-module/dataforms-layouts/panel/summary-button.js +0 -60
- package/build-module/dataforms-layouts/panel/summary-button.js.map +0 -1
- package/build-module/dataforms-layouts/regular/index.js +0 -109
- package/build-module/dataforms-layouts/regular/index.js.map +0 -1
- package/build-module/dataforms-layouts/row/index.js +0 -106
- package/build-module/dataforms-layouts/row/index.js.map +0 -1
- package/build-module/filter-and-sort-data-view.js +0 -305
- package/build-module/filter-and-sort-data-view.js.map +0 -1
- package/build-module/normalize-fields.js +0 -145
- package/build-module/normalize-fields.js.map +0 -1
- package/build-module/normalize-form-fields.js +0 -73
- package/build-module/normalize-form-fields.js.map +0 -1
- package/build-module/private-types.js +0 -2
- package/build-module/private-types.js.map +0 -1
- package/build-module/types.js +0 -2
- package/build-module/types.js.map +0 -1
- package/build-module/utils.js +0 -16
- package/build-module/utils.js.map +0 -1
- package/build-module/validation.js +0 -54
- package/build-module/validation.js.map +0 -1
- package/build-types/components/dataform/stories/index.story.d.ts.map +0 -1
- package/build-types/components/dataviews/stories/fixtures.d.ts.map +0 -1
- package/build-types/components/dataviews/stories/index.story.d.ts.map +0 -1
- package/build-types/components/dataviews-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/dataform-controls/relative-date-control.d.ts +0 -47
- package/build-types/dataform-controls/relative-date-control.d.ts.map +0 -1
- package/build-types/dataforms-layouts/card/index.d.ts.map +0 -1
- package/build-types/dataforms-layouts/data-form-layout.d.ts.map +0 -1
- package/build-types/dataforms-layouts/index.d.ts.map +0 -1
- package/build-types/dataforms-layouts/is-combined-field.d.ts.map +0 -1
- package/build-types/dataforms-layouts/panel/dropdown.d.ts.map +0 -1
- package/build-types/dataforms-layouts/panel/index.d.ts.map +0 -1
- package/build-types/dataforms-layouts/panel/modal.d.ts.map +0 -1
- package/build-types/dataforms-layouts/panel/summary-button.d.ts.map +0 -1
- package/build-types/dataforms-layouts/regular/index.d.ts.map +0 -1
- package/build-types/dataforms-layouts/row/index.d.ts.map +0 -1
- package/build-types/field-types/stories/index.story.d.ts +0 -85
- package/build-types/field-types/stories/index.story.d.ts.map +0 -1
- package/build-types/filter-and-sort-data-view.d.ts.map +0 -1
- package/build-types/normalize-fields.d.ts +0 -12
- package/build-types/normalize-fields.d.ts.map +0 -1
- package/build-types/normalize-form-fields.d.ts.map +0 -1
- package/build-types/private-types.d.ts.map +0 -1
- package/build-types/test/validation.d.ts +0 -2
- package/build-types/test/validation.d.ts.map +0 -1
- package/build-types/types.d.ts +0 -688
- package/build-types/types.d.ts.map +0 -1
- package/build-types/utils.d.ts +0 -6
- package/build-types/utils.d.ts.map +0 -1
- package/build-types/validation.d.ts +0 -12
- package/build-types/validation.d.ts.map +0 -1
- package/src/dataforms-layouts/card/style.scss +0 -10
- package/src/test/validation.ts +0 -312
- package/src/types.ts +0 -891
- package/src/utils.ts +0 -15
- package/src/validation.ts +0 -91
- /package/build-types/{dataforms-layouts → dataform-layouts}/is-combined-field.d.ts +0 -0
- /package/build-types/{dataforms-layouts → dataform-layouts}/panel/summary-button.d.ts +0 -0
- /package/src/{dataforms-layouts → dataform-layouts}/is-combined-field.ts +0 -0
- /package/src/{dataforms-layouts → dataform-layouts}/panel/summary-button.tsx +0 -0
- /package/src/{dataforms-layouts → dataform-layouts}/row/style.scss +0 -0
- /package/src/{components/dataviews/stories/style.css → stories/dataviews.style.css} +0 -0
- /package/src/{private-types.tsx → types/private.ts} +0 -0
|
@@ -1,79 +1,108 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var dataviews_exports = {};
|
|
30
|
+
__export(dataviews_exports, {
|
|
31
|
+
default: () => dataviews_default
|
|
6
32
|
});
|
|
7
|
-
exports
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
-
/**
|
|
25
|
-
* External dependencies
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* WordPress dependencies
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Internal dependencies
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
const defaultGetItemId = item => item.id;
|
|
33
|
+
module.exports = __toCommonJS(dataviews_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_components = require("@wordpress/components");
|
|
36
|
+
var import_element = require("@wordpress/element");
|
|
37
|
+
var import_compose = require("@wordpress/compose");
|
|
38
|
+
var import_dataviews_context = __toESM(require("../dataviews-context"));
|
|
39
|
+
var import_dataviews_layouts = require("../../dataviews-layouts");
|
|
40
|
+
var import_dataviews_filters = require("../dataviews-filters");
|
|
41
|
+
var import_dataviews_layout = __toESM(require("../dataviews-layout"));
|
|
42
|
+
var import_dataviews_footer = __toESM(require("../dataviews-footer"));
|
|
43
|
+
var import_dataviews_search = __toESM(require("../dataviews-search"));
|
|
44
|
+
var import_dataviews_bulk_actions = require("../dataviews-bulk-actions");
|
|
45
|
+
var import_dataviews_pagination = require("../dataviews-pagination");
|
|
46
|
+
var import_dataviews_view_config = __toESM(require("../dataviews-view-config"));
|
|
47
|
+
var import_normalize_fields = __toESM(require("../../utils/normalize-fields"));
|
|
48
|
+
const defaultGetItemId = (item) => item.id;
|
|
37
49
|
const defaultIsItemClickable = () => true;
|
|
38
50
|
const EMPTY_ARRAY = [];
|
|
39
|
-
const dataViewsLayouts =
|
|
51
|
+
const dataViewsLayouts = import_dataviews_layouts.VIEW_LAYOUTS.filter(
|
|
52
|
+
(viewLayout) => !viewLayout.isPicker
|
|
53
|
+
);
|
|
40
54
|
function DefaultUI({
|
|
41
55
|
header,
|
|
42
56
|
search = true,
|
|
43
|
-
searchLabel =
|
|
57
|
+
searchLabel = void 0
|
|
44
58
|
}) {
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
justify: "start",
|
|
53
|
-
expanded: false,
|
|
54
|
-
className: "dataviews__search",
|
|
55
|
-
children: [search && /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataviewsSearch.default, {
|
|
56
|
-
label: searchLabel
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataviewsFilters.FiltersToggle, {})]
|
|
58
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
61
|
+
import_components.__experimentalHStack,
|
|
62
|
+
{
|
|
63
|
+
alignment: "top",
|
|
64
|
+
justify: "space-between",
|
|
65
|
+
className: "dataviews__view-actions",
|
|
59
66
|
spacing: 1,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
69
|
+
import_components.__experimentalHStack,
|
|
70
|
+
{
|
|
71
|
+
justify: "start",
|
|
72
|
+
expanded: false,
|
|
73
|
+
className: "dataviews__search",
|
|
74
|
+
children: [
|
|
75
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_search.default, { label: searchLabel }),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_filters.FiltersToggle, {})
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
81
|
+
import_components.__experimentalHStack,
|
|
82
|
+
{
|
|
83
|
+
spacing: 1,
|
|
84
|
+
expanded: false,
|
|
85
|
+
style: { flexShrink: 0 },
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_view_config.default, {}),
|
|
88
|
+
header
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_filters.FiltersToggled, { className: "dataviews-filters__container" }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_layout.default, {}),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dataviews_footer.default, {})
|
|
98
|
+
] });
|
|
70
99
|
}
|
|
71
100
|
function DataViews({
|
|
72
101
|
view,
|
|
73
102
|
onChangeView,
|
|
74
103
|
fields,
|
|
75
104
|
search = true,
|
|
76
|
-
searchLabel =
|
|
105
|
+
searchLabel = void 0,
|
|
77
106
|
actions = EMPTY_ARRAY,
|
|
78
107
|
data,
|
|
79
108
|
getItemId = defaultGetItemId,
|
|
@@ -88,27 +117,26 @@ function DataViews({
|
|
|
88
117
|
isItemClickable = defaultIsItemClickable,
|
|
89
118
|
header,
|
|
90
119
|
children,
|
|
91
|
-
config = {
|
|
92
|
-
perPageSizes: [10, 20, 50, 100]
|
|
93
|
-
},
|
|
120
|
+
config = { perPageSizes: [10, 20, 50, 100] },
|
|
94
121
|
empty
|
|
95
122
|
}) {
|
|
96
|
-
const {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const
|
|
123
|
+
const { infiniteScrollHandler } = paginationInfo;
|
|
124
|
+
const containerRef = (0, import_element.useRef)(null);
|
|
125
|
+
const [containerWidth, setContainerWidth] = (0, import_element.useState)(0);
|
|
126
|
+
const resizeObserverRef = (0, import_compose.useResizeObserver)(
|
|
127
|
+
(resizeObserverEntries) => {
|
|
128
|
+
setContainerWidth(
|
|
129
|
+
resizeObserverEntries[0].borderBoxSize[0].inlineSize
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
{ box: "border-box" }
|
|
133
|
+
);
|
|
134
|
+
const [selectionState, setSelectionState] = (0, import_element.useState)([]);
|
|
135
|
+
const isUncontrolled = selectionProperty === void 0 || onChangeSelection === void 0;
|
|
108
136
|
const selection = isUncontrolled ? selectionState : selectionProperty;
|
|
109
|
-
const [openedFilter, setOpenedFilter] = (0,
|
|
137
|
+
const [openedFilter, setOpenedFilter] = (0, import_element.useState)(null);
|
|
110
138
|
function setSelectionWithChange(value) {
|
|
111
|
-
const newValue = typeof value ===
|
|
139
|
+
const newValue = typeof value === "function" ? value(selection) : value;
|
|
112
140
|
if (isUncontrolled) {
|
|
113
141
|
setSelectionState(newValue);
|
|
114
142
|
}
|
|
@@ -116,103 +144,114 @@ function DataViews({
|
|
|
116
144
|
onChangeSelection(newValue);
|
|
117
145
|
}
|
|
118
146
|
}
|
|
119
|
-
const _fields = (0,
|
|
120
|
-
const _selection = (0,
|
|
121
|
-
return selection.filter(
|
|
147
|
+
const _fields = (0, import_element.useMemo)(() => (0, import_normalize_fields.default)(fields), [fields]);
|
|
148
|
+
const _selection = (0, import_element.useMemo)(() => {
|
|
149
|
+
return selection.filter(
|
|
150
|
+
(id) => data.some((item) => getItemId(item) === id)
|
|
151
|
+
);
|
|
122
152
|
}, [selection, data, getItemId]);
|
|
123
|
-
const filters = (0,
|
|
124
|
-
const hasPrimaryOrLockedFilters = (0,
|
|
125
|
-
|
|
126
|
-
|
|
153
|
+
const filters = (0, import_dataviews_filters.useFilters)(_fields, view);
|
|
154
|
+
const hasPrimaryOrLockedFilters = (0, import_element.useMemo)(
|
|
155
|
+
() => (filters || []).some(
|
|
156
|
+
(filter) => filter.isPrimary || filter.isLocked
|
|
157
|
+
),
|
|
158
|
+
[filters]
|
|
159
|
+
);
|
|
160
|
+
const [isShowingFilter, setIsShowingFilter] = (0, import_element.useState)(
|
|
161
|
+
hasPrimaryOrLockedFilters
|
|
162
|
+
);
|
|
163
|
+
(0, import_element.useEffect)(() => {
|
|
127
164
|
if (hasPrimaryOrLockedFilters && !isShowingFilter) {
|
|
128
165
|
setIsShowingFilter(true);
|
|
129
166
|
}
|
|
130
167
|
}, [hasPrimaryOrLockedFilters, isShowingFilter]);
|
|
131
|
-
|
|
132
|
-
// Attach scroll event listener for infinite scroll
|
|
133
|
-
(0, _element.useEffect)(() => {
|
|
168
|
+
(0, import_element.useEffect)(() => {
|
|
134
169
|
if (!view.infiniteScrollEnabled || !containerRef.current) {
|
|
135
170
|
return;
|
|
136
171
|
}
|
|
137
|
-
const handleScroll = (0,
|
|
172
|
+
const handleScroll = (0, import_compose.throttle)((event) => {
|
|
138
173
|
const target = event.target;
|
|
139
174
|
const scrollTop = target.scrollTop;
|
|
140
175
|
const scrollHeight = target.scrollHeight;
|
|
141
176
|
const clientHeight = target.clientHeight;
|
|
142
|
-
|
|
143
|
-
// Check if user has scrolled near the bottom
|
|
144
177
|
if (scrollTop + clientHeight >= scrollHeight - 100) {
|
|
145
178
|
infiniteScrollHandler?.();
|
|
146
179
|
}
|
|
147
|
-
}, 100);
|
|
148
|
-
|
|
180
|
+
}, 100);
|
|
149
181
|
const container = containerRef.current;
|
|
150
|
-
container.addEventListener(
|
|
182
|
+
container.addEventListener("scroll", handleScroll);
|
|
151
183
|
return () => {
|
|
152
|
-
container.removeEventListener(
|
|
153
|
-
handleScroll.cancel();
|
|
184
|
+
container.removeEventListener("scroll", handleScroll);
|
|
185
|
+
handleScroll.cancel();
|
|
154
186
|
};
|
|
155
187
|
}, [infiniteScrollHandler, view.infiniteScrollEnabled]);
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
188
|
+
const defaultLayouts = (0, import_element.useMemo)(
|
|
189
|
+
() => Object.fromEntries(
|
|
190
|
+
Object.entries(defaultLayoutsProperty).filter(
|
|
191
|
+
([layoutType]) => {
|
|
192
|
+
return dataViewsLayouts.some(
|
|
193
|
+
(viewLayout) => viewLayout.type === layoutType
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
),
|
|
198
|
+
[defaultLayoutsProperty]
|
|
199
|
+
);
|
|
161
200
|
if (!defaultLayouts[view.type]) {
|
|
162
201
|
return null;
|
|
163
202
|
}
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
ref: containerRef,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
204
|
+
import_dataviews_context.default.Provider,
|
|
205
|
+
{
|
|
206
|
+
value: {
|
|
207
|
+
view,
|
|
208
|
+
onChangeView,
|
|
209
|
+
fields: _fields,
|
|
210
|
+
actions,
|
|
211
|
+
data,
|
|
212
|
+
isLoading,
|
|
213
|
+
paginationInfo,
|
|
214
|
+
selection: _selection,
|
|
215
|
+
onChangeSelection: setSelectionWithChange,
|
|
216
|
+
openedFilter,
|
|
217
|
+
setOpenedFilter,
|
|
218
|
+
getItemId,
|
|
219
|
+
getItemLevel,
|
|
220
|
+
isItemClickable,
|
|
221
|
+
onClickItem,
|
|
222
|
+
renderItemLink,
|
|
223
|
+
containerWidth,
|
|
224
|
+
containerRef,
|
|
225
|
+
resizeObserverRef,
|
|
226
|
+
defaultLayouts,
|
|
227
|
+
filters,
|
|
228
|
+
isShowingFilter,
|
|
229
|
+
setIsShowingFilter,
|
|
230
|
+
config,
|
|
231
|
+
empty,
|
|
232
|
+
hasInfiniteScrollHandler: !!infiniteScrollHandler
|
|
233
|
+
},
|
|
234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dataviews-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
235
|
+
DefaultUI,
|
|
236
|
+
{
|
|
237
|
+
header,
|
|
238
|
+
search,
|
|
239
|
+
searchLabel
|
|
240
|
+
}
|
|
241
|
+
) })
|
|
242
|
+
}
|
|
243
|
+
);
|
|
203
244
|
}
|
|
204
|
-
|
|
205
|
-
// Populate the DataViews sub components
|
|
206
245
|
const DataViewsSubComponents = DataViews;
|
|
207
|
-
DataViewsSubComponents.BulkActionToolbar =
|
|
208
|
-
DataViewsSubComponents.Filters =
|
|
209
|
-
DataViewsSubComponents.FiltersToggled =
|
|
210
|
-
DataViewsSubComponents.FiltersToggle =
|
|
211
|
-
DataViewsSubComponents.Layout =
|
|
212
|
-
DataViewsSubComponents.LayoutSwitcher =
|
|
213
|
-
DataViewsSubComponents.Pagination =
|
|
214
|
-
DataViewsSubComponents.Search =
|
|
215
|
-
DataViewsSubComponents.ViewConfig =
|
|
216
|
-
DataViewsSubComponents.Footer =
|
|
217
|
-
var
|
|
218
|
-
//# sourceMappingURL=index.js.map
|
|
246
|
+
DataViewsSubComponents.BulkActionToolbar = import_dataviews_bulk_actions.BulkActionsFooter;
|
|
247
|
+
DataViewsSubComponents.Filters = import_dataviews_filters.Filters;
|
|
248
|
+
DataViewsSubComponents.FiltersToggled = import_dataviews_filters.FiltersToggled;
|
|
249
|
+
DataViewsSubComponents.FiltersToggle = import_dataviews_filters.FiltersToggle;
|
|
250
|
+
DataViewsSubComponents.Layout = import_dataviews_layout.default;
|
|
251
|
+
DataViewsSubComponents.LayoutSwitcher = import_dataviews_view_config.ViewTypeMenu;
|
|
252
|
+
DataViewsSubComponents.Pagination = import_dataviews_pagination.DataViewsPagination;
|
|
253
|
+
DataViewsSubComponents.Search = import_dataviews_search.default;
|
|
254
|
+
DataViewsSubComponents.ViewConfig = import_dataviews_view_config.DataviewsViewConfigDropdown;
|
|
255
|
+
DataViewsSubComponents.Footer = import_dataviews_footer.default;
|
|
256
|
+
var dataviews_default = DataViewsSubComponents;
|
|
257
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_element","_compose","_dataviewsContext","_interopRequireDefault","_dataviewsLayouts","_dataviewsFilters","_dataviewsLayout","_dataviewsFooter","_dataviewsSearch","_dataviewsBulkActions","_dataviewsPagination","_dataviewsViewConfig","_interopRequireWildcard","_normalizeFields","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","defaultGetItemId","item","id","defaultIsItemClickable","EMPTY_ARRAY","dataViewsLayouts","VIEW_LAYOUTS","filter","viewLayout","isPicker","DefaultUI","header","search","searchLabel","undefined","jsxs","Fragment","children","__experimentalHStack","alignment","justify","className","spacing","expanded","jsx","label","FiltersToggle","style","flexShrink","FiltersToggled","DataViews","view","onChangeView","fields","actions","data","getItemId","getItemLevel","isLoading","paginationInfo","defaultLayouts","defaultLayoutsProperty","selection","selectionProperty","onChangeSelection","onClickItem","renderItemLink","isItemClickable","config","perPageSizes","empty","infiniteScrollHandler","containerRef","useRef","containerWidth","setContainerWidth","useState","resizeObserverRef","useResizeObserver","resizeObserverEntries","borderBoxSize","inlineSize","box","selectionState","setSelectionState","isUncontrolled","openedFilter","setOpenedFilter","setSelectionWithChange","value","newValue","_fields","useMemo","normalizeFields","_selection","some","filters","useFilters","hasPrimaryOrLockedFilters","isPrimary","isLocked","isShowingFilter","setIsShowingFilter","useEffect","infiniteScrollEnabled","current","handleScroll","throttle","event","target","scrollTop","scrollHeight","clientHeight","container","addEventListener","removeEventListener","cancel","fromEntries","entries","layoutType","type","Provider","hasInfiniteScrollHandler","ref","DataViewsSubComponents","BulkActionToolbar","BulkActionsFooter","Filters","Layout","DataViewsLayout","LayoutSwitcher","ViewTypeMenu","Pagination","DataViewsPagination","Search","DataViewsSearch","ViewConfig","DataviewsViewConfigDropdown","Footer","DataViewsFooter","_default","exports"],"sources":["@wordpress/dataviews/src/components/dataviews/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode, ComponentProps, ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { useEffect, useMemo, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver, throttle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\nimport { VIEW_LAYOUTS } from '../../dataviews-layouts';\nimport {\n\tFilters,\n\tFiltersToggled,\n\tuseFilters,\n\tFiltersToggle,\n} from '../dataviews-filters';\nimport DataViewsLayout from '../dataviews-layout';\nimport DataViewsFooter from '../dataviews-footer';\nimport DataViewsSearch from '../dataviews-search';\nimport { BulkActionsFooter } from '../dataviews-bulk-actions';\nimport { DataViewsPagination } from '../dataviews-pagination';\nimport DataViewsViewConfig, {\n\tDataviewsViewConfigDropdown,\n\tViewTypeMenu,\n} from '../dataviews-view-config';\nimport { normalizeFields } from '../../normalize-fields';\nimport type { Action, Field, View, SupportedLayouts } from '../../types';\nimport type { SelectionOrUpdater } from '../../private-types';\ntype ItemWithId = { id: string };\n\ntype DataViewsProps< Item > = {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tfields: Field< Item >[];\n\tsearch?: boolean;\n\tsearchLabel?: string;\n\tactions?: Action< Item >[];\n\tdata: Item[];\n\tisLoading?: boolean;\n\tpaginationInfo: {\n\t\ttotalItems: number;\n\t\ttotalPages: number;\n\t\tinfiniteScrollHandler?: () => void;\n\t};\n\tdefaultLayouts: SupportedLayouts;\n\tselection?: string[];\n\tonChangeSelection?: ( items: string[] ) => void;\n\tonClickItem?: ( item: Item ) => void;\n\trenderItemLink?: (\n\t\tprops: {\n\t\t\titem: Item;\n\t\t} & ComponentProps< 'a' >\n\t) => ReactElement;\n\tisItemClickable?: ( item: Item ) => boolean;\n\theader?: ReactNode;\n\tgetItemLevel?: ( item: Item ) => number;\n\tchildren?: ReactNode;\n\tconfig?: {\n\t\tperPageSizes: number[];\n\t};\n\tempty?: ReactNode;\n} & ( Item extends ItemWithId\n\t? { getItemId?: ( item: Item ) => string }\n\t: { getItemId: ( item: Item ) => string } );\n\nconst defaultGetItemId = ( item: ItemWithId ) => item.id;\nconst defaultIsItemClickable = () => true;\nconst EMPTY_ARRAY: any[] = [];\n\nconst dataViewsLayouts = VIEW_LAYOUTS.filter(\n\t( viewLayout ) => ! viewLayout.isPicker\n);\n\ntype DefaultUIProps = Pick<\n\tDataViewsProps< any >,\n\t'header' | 'search' | 'searchLabel'\n>;\n\nfunction DefaultUI( {\n\theader,\n\tsearch = true,\n\tsearchLabel = undefined,\n}: DefaultUIProps ) {\n\treturn (\n\t\t<>\n\t\t\t<HStack\n\t\t\t\talignment=\"top\"\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\tclassName=\"dataviews__view-actions\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"start\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tclassName=\"dataviews__search\"\n\t\t\t\t>\n\t\t\t\t\t{ search && <DataViewsSearch label={ searchLabel } /> }\n\t\t\t\t\t<FiltersToggle />\n\t\t\t\t</HStack>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tstyle={ { flexShrink: 0 } }\n\t\t\t\t>\n\t\t\t\t\t<DataViewsViewConfig />\n\t\t\t\t\t{ header }\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t\t<FiltersToggled className=\"dataviews-filters__container\" />\n\t\t\t<DataViewsLayout />\n\t\t\t<DataViewsFooter />\n\t\t</>\n\t);\n}\n\nfunction DataViews< Item >( {\n\tview,\n\tonChangeView,\n\tfields,\n\tsearch = true,\n\tsearchLabel = undefined,\n\tactions = EMPTY_ARRAY,\n\tdata,\n\tgetItemId = defaultGetItemId,\n\tgetItemLevel,\n\tisLoading = false,\n\tpaginationInfo,\n\tdefaultLayouts: defaultLayoutsProperty,\n\tselection: selectionProperty,\n\tonChangeSelection,\n\tonClickItem,\n\trenderItemLink,\n\tisItemClickable = defaultIsItemClickable,\n\theader,\n\tchildren,\n\tconfig = { perPageSizes: [ 10, 20, 50, 100 ] },\n\tempty,\n}: DataViewsProps< Item > ) {\n\tconst { infiniteScrollHandler } = paginationInfo;\n\tconst containerRef = useRef< HTMLDivElement | null >( null );\n\tconst [ containerWidth, setContainerWidth ] = useState( 0 );\n\tconst resizeObserverRef = useResizeObserver(\n\t\t( resizeObserverEntries: any ) => {\n\t\t\tsetContainerWidth(\n\t\t\t\tresizeObserverEntries[ 0 ].borderBoxSize[ 0 ].inlineSize\n\t\t\t);\n\t\t},\n\t\t{ box: 'border-box' }\n\t);\n\tconst [ selectionState, setSelectionState ] = useState< string[] >( [] );\n\tconst isUncontrolled =\n\t\tselectionProperty === undefined || onChangeSelection === undefined;\n\tconst selection = isUncontrolled ? selectionState : selectionProperty;\n\tconst [ openedFilter, setOpenedFilter ] = useState< string | null >( null );\n\tfunction setSelectionWithChange( value: SelectionOrUpdater ) {\n\t\tconst newValue =\n\t\t\ttypeof value === 'function' ? value( selection ) : value;\n\t\tif ( isUncontrolled ) {\n\t\t\tsetSelectionState( newValue );\n\t\t}\n\t\tif ( onChangeSelection ) {\n\t\t\tonChangeSelection( newValue );\n\t\t}\n\t}\n\tconst _fields = useMemo( () => normalizeFields( fields ), [ fields ] );\n\tconst _selection = useMemo( () => {\n\t\treturn selection.filter( ( id ) =>\n\t\t\tdata.some( ( item ) => getItemId( item ) === id )\n\t\t);\n\t}, [ selection, data, getItemId ] );\n\n\tconst filters = useFilters( _fields, view );\n\tconst hasPrimaryOrLockedFilters = useMemo(\n\t\t() =>\n\t\t\t( filters || [] ).some(\n\t\t\t\t( filter ) => filter.isPrimary || filter.isLocked\n\t\t\t),\n\t\t[ filters ]\n\t);\n\tconst [ isShowingFilter, setIsShowingFilter ] = useState< boolean >(\n\t\thasPrimaryOrLockedFilters\n\t);\n\n\tuseEffect( () => {\n\t\tif ( hasPrimaryOrLockedFilters && ! isShowingFilter ) {\n\t\t\tsetIsShowingFilter( true );\n\t\t}\n\t}, [ hasPrimaryOrLockedFilters, isShowingFilter ] );\n\n\t// Attach scroll event listener for infinite scroll\n\tuseEffect( () => {\n\t\tif ( ! view.infiniteScrollEnabled || ! containerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst handleScroll = throttle( ( event: unknown ) => {\n\t\t\tconst target = ( event as Event ).target as HTMLElement;\n\t\t\tconst scrollTop = target.scrollTop;\n\t\t\tconst scrollHeight = target.scrollHeight;\n\t\t\tconst clientHeight = target.clientHeight;\n\n\t\t\t// Check if user has scrolled near the bottom\n\t\t\tif ( scrollTop + clientHeight >= scrollHeight - 100 ) {\n\t\t\t\tinfiniteScrollHandler?.();\n\t\t\t}\n\t\t}, 100 ); // Throttle to 100ms\n\n\t\tconst container = containerRef.current;\n\t\tcontainer.addEventListener( 'scroll', handleScroll );\n\n\t\treturn () => {\n\t\t\tcontainer.removeEventListener( 'scroll', handleScroll );\n\t\t\thandleScroll.cancel(); // Cancel any pending throttled calls\n\t\t};\n\t}, [ infiniteScrollHandler, view.infiniteScrollEnabled ] );\n\n\t// Filter out DataViewsPicker layouts.\n\tconst defaultLayouts = useMemo(\n\t\t() =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( defaultLayoutsProperty ).filter(\n\t\t\t\t\t( [ layoutType ] ) => {\n\t\t\t\t\t\treturn dataViewsLayouts.some(\n\t\t\t\t\t\t\t( viewLayout ) => viewLayout.type === layoutType\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t),\n\t\t[ defaultLayoutsProperty ]\n\t);\n\n\tif ( ! defaultLayouts[ view.type ] ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DataViewsContext.Provider\n\t\t\tvalue={ {\n\t\t\t\tview,\n\t\t\t\tonChangeView,\n\t\t\t\tfields: _fields,\n\t\t\t\tactions,\n\t\t\t\tdata,\n\t\t\t\tisLoading,\n\t\t\t\tpaginationInfo,\n\t\t\t\tselection: _selection,\n\t\t\t\tonChangeSelection: setSelectionWithChange,\n\t\t\t\topenedFilter,\n\t\t\t\tsetOpenedFilter,\n\t\t\t\tgetItemId,\n\t\t\t\tgetItemLevel,\n\t\t\t\tisItemClickable,\n\t\t\t\tonClickItem,\n\t\t\t\trenderItemLink,\n\t\t\t\tcontainerWidth,\n\t\t\t\tcontainerRef,\n\t\t\t\tresizeObserverRef,\n\t\t\t\tdefaultLayouts,\n\t\t\t\tfilters,\n\t\t\t\tisShowingFilter,\n\t\t\t\tsetIsShowingFilter,\n\t\t\t\tconfig,\n\t\t\t\tempty,\n\t\t\t\thasInfiniteScrollHandler: !! infiniteScrollHandler,\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"dataviews-wrapper\" ref={ containerRef }>\n\t\t\t\t{ children ?? (\n\t\t\t\t\t<DefaultUI\n\t\t\t\t\t\theader={ header }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\tsearchLabel={ searchLabel }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</DataViewsContext.Provider>\n\t);\n}\n\n// Populate the DataViews sub components\nconst DataViewsSubComponents = DataViews as typeof DataViews & {\n\tBulkActionToolbar: typeof BulkActionsFooter;\n\tFilters: typeof Filters;\n\tFiltersToggle: typeof FiltersToggle;\n\tFiltersToggled: typeof FiltersToggled;\n\tLayout: typeof DataViewsLayout;\n\tLayoutSwitcher: typeof ViewTypeMenu;\n\tPagination: typeof DataViewsPagination;\n\tSearch: typeof DataViewsSearch;\n\tViewConfig: typeof DataviewsViewConfigDropdown;\n\tFooter: typeof DataViewsFooter;\n};\n\nDataViewsSubComponents.BulkActionToolbar = BulkActionsFooter;\nDataViewsSubComponents.Filters = Filters;\nDataViewsSubComponents.FiltersToggled = FiltersToggled;\nDataViewsSubComponents.FiltersToggle = FiltersToggle;\nDataViewsSubComponents.Layout = DataViewsLayout;\nDataViewsSubComponents.LayoutSwitcher = ViewTypeMenu;\nDataViewsSubComponents.Pagination = DataViewsPagination;\nDataViewsSubComponents.Search = DataViewsSearch;\nDataViewsSubComponents.ViewConfig = DataviewsViewConfigDropdown;\nDataViewsSubComponents.Footer = DataViewsFooter;\n\nexport default DataViewsSubComponents;\n"],"mappings":";;;;;;;AAQA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAMA,IAAAO,gBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,gBAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,gBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AACA,IAAAY,oBAAA,GAA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W9B;AAED0E,sBAAsB,CAACC,iBAAiB,GAAGC,uCAAiB;AAC5DF,sBAAsB,CAACG,OAAO,GAAGA,yBAAO;AACxCH,sBAAsB,CAAC3E,cAAc,GAAGA,gCAAc;AACtD2E,sBAAsB,CAAC9E,aAAa,GAAGA,+BAAa;AACpD8E,sBAAsB,CAACI,MAAM,GAAGC,wBAAe;AAC/CL,sBAAsB,CAACM,cAAc,GAAGC,iCAAY;AACpDP,sBAAsB,CAACQ,UAAU,GAAGC,wCAAmB;AACvDT,sBAAsB,CAACU,MAAM,GAAGC,wBAAe;AAC/CX,sBAAsB,CAACY,UAAU,GAAGC,gDAA2B;AAC/Db,sBAAsB,CAACc,MAAM,GAAGC,wBAAe;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvI,OAAA,GAEjCsH,sBAAsB","ignoreList":[]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/dataviews/index.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport type { ReactNode, ComponentProps, ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { useEffect, useMemo, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver, throttle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\nimport { VIEW_LAYOUTS } from '../../dataviews-layouts';\nimport {\n\tFilters,\n\tFiltersToggled,\n\tuseFilters,\n\tFiltersToggle,\n} from '../dataviews-filters';\nimport DataViewsLayout from '../dataviews-layout';\nimport DataViewsFooter from '../dataviews-footer';\nimport DataViewsSearch from '../dataviews-search';\nimport { BulkActionsFooter } from '../dataviews-bulk-actions';\nimport { DataViewsPagination } from '../dataviews-pagination';\nimport DataViewsViewConfig, {\n\tDataviewsViewConfigDropdown,\n\tViewTypeMenu,\n} from '../dataviews-view-config';\nimport normalizeFields from '../../utils/normalize-fields';\nimport type { Action, Field, View, SupportedLayouts } from '../../types';\nimport type { SelectionOrUpdater } from '../../types/private';\ntype ItemWithId = { id: string };\n\ntype DataViewsProps< Item > = {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tfields: Field< Item >[];\n\tsearch?: boolean;\n\tsearchLabel?: string;\n\tactions?: Action< Item >[];\n\tdata: Item[];\n\tisLoading?: boolean;\n\tpaginationInfo: {\n\t\ttotalItems: number;\n\t\ttotalPages: number;\n\t\tinfiniteScrollHandler?: () => void;\n\t};\n\tdefaultLayouts: SupportedLayouts;\n\tselection?: string[];\n\tonChangeSelection?: ( items: string[] ) => void;\n\tonClickItem?: ( item: Item ) => void;\n\trenderItemLink?: (\n\t\tprops: {\n\t\t\titem: Item;\n\t\t} & ComponentProps< 'a' >\n\t) => ReactElement;\n\tisItemClickable?: ( item: Item ) => boolean;\n\theader?: ReactNode;\n\tgetItemLevel?: ( item: Item ) => number;\n\tchildren?: ReactNode;\n\tconfig?: {\n\t\tperPageSizes: number[];\n\t};\n\tempty?: ReactNode;\n} & ( Item extends ItemWithId\n\t? { getItemId?: ( item: Item ) => string }\n\t: { getItemId: ( item: Item ) => string } );\n\nconst defaultGetItemId = ( item: ItemWithId ) => item.id;\nconst defaultIsItemClickable = () => true;\nconst EMPTY_ARRAY: any[] = [];\n\nconst dataViewsLayouts = VIEW_LAYOUTS.filter(\n\t( viewLayout ) => ! viewLayout.isPicker\n);\n\ntype DefaultUIProps = Pick<\n\tDataViewsProps< any >,\n\t'header' | 'search' | 'searchLabel'\n>;\n\nfunction DefaultUI( {\n\theader,\n\tsearch = true,\n\tsearchLabel = undefined,\n}: DefaultUIProps ) {\n\treturn (\n\t\t<>\n\t\t\t<HStack\n\t\t\t\talignment=\"top\"\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\tclassName=\"dataviews__view-actions\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"start\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tclassName=\"dataviews__search\"\n\t\t\t\t>\n\t\t\t\t\t{ search && <DataViewsSearch label={ searchLabel } /> }\n\t\t\t\t\t<FiltersToggle />\n\t\t\t\t</HStack>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tstyle={ { flexShrink: 0 } }\n\t\t\t\t>\n\t\t\t\t\t<DataViewsViewConfig />\n\t\t\t\t\t{ header }\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t\t<FiltersToggled className=\"dataviews-filters__container\" />\n\t\t\t<DataViewsLayout />\n\t\t\t<DataViewsFooter />\n\t\t</>\n\t);\n}\n\nfunction DataViews< Item >( {\n\tview,\n\tonChangeView,\n\tfields,\n\tsearch = true,\n\tsearchLabel = undefined,\n\tactions = EMPTY_ARRAY,\n\tdata,\n\tgetItemId = defaultGetItemId,\n\tgetItemLevel,\n\tisLoading = false,\n\tpaginationInfo,\n\tdefaultLayouts: defaultLayoutsProperty,\n\tselection: selectionProperty,\n\tonChangeSelection,\n\tonClickItem,\n\trenderItemLink,\n\tisItemClickable = defaultIsItemClickable,\n\theader,\n\tchildren,\n\tconfig = { perPageSizes: [ 10, 20, 50, 100 ] },\n\tempty,\n}: DataViewsProps< Item > ) {\n\tconst { infiniteScrollHandler } = paginationInfo;\n\tconst containerRef = useRef< HTMLDivElement | null >( null );\n\tconst [ containerWidth, setContainerWidth ] = useState( 0 );\n\tconst resizeObserverRef = useResizeObserver(\n\t\t( resizeObserverEntries: any ) => {\n\t\t\tsetContainerWidth(\n\t\t\t\tresizeObserverEntries[ 0 ].borderBoxSize[ 0 ].inlineSize\n\t\t\t);\n\t\t},\n\t\t{ box: 'border-box' }\n\t);\n\tconst [ selectionState, setSelectionState ] = useState< string[] >( [] );\n\tconst isUncontrolled =\n\t\tselectionProperty === undefined || onChangeSelection === undefined;\n\tconst selection = isUncontrolled ? selectionState : selectionProperty;\n\tconst [ openedFilter, setOpenedFilter ] = useState< string | null >( null );\n\tfunction setSelectionWithChange( value: SelectionOrUpdater ) {\n\t\tconst newValue =\n\t\t\ttypeof value === 'function' ? value( selection ) : value;\n\t\tif ( isUncontrolled ) {\n\t\t\tsetSelectionState( newValue );\n\t\t}\n\t\tif ( onChangeSelection ) {\n\t\t\tonChangeSelection( newValue );\n\t\t}\n\t}\n\tconst _fields = useMemo( () => normalizeFields( fields ), [ fields ] );\n\tconst _selection = useMemo( () => {\n\t\treturn selection.filter( ( id ) =>\n\t\t\tdata.some( ( item ) => getItemId( item ) === id )\n\t\t);\n\t}, [ selection, data, getItemId ] );\n\n\tconst filters = useFilters( _fields, view );\n\tconst hasPrimaryOrLockedFilters = useMemo(\n\t\t() =>\n\t\t\t( filters || [] ).some(\n\t\t\t\t( filter ) => filter.isPrimary || filter.isLocked\n\t\t\t),\n\t\t[ filters ]\n\t);\n\tconst [ isShowingFilter, setIsShowingFilter ] = useState< boolean >(\n\t\thasPrimaryOrLockedFilters\n\t);\n\n\tuseEffect( () => {\n\t\tif ( hasPrimaryOrLockedFilters && ! isShowingFilter ) {\n\t\t\tsetIsShowingFilter( true );\n\t\t}\n\t}, [ hasPrimaryOrLockedFilters, isShowingFilter ] );\n\n\t// Attach scroll event listener for infinite scroll\n\tuseEffect( () => {\n\t\tif ( ! view.infiniteScrollEnabled || ! containerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst handleScroll = throttle( ( event: unknown ) => {\n\t\t\tconst target = ( event as Event ).target as HTMLElement;\n\t\t\tconst scrollTop = target.scrollTop;\n\t\t\tconst scrollHeight = target.scrollHeight;\n\t\t\tconst clientHeight = target.clientHeight;\n\n\t\t\t// Check if user has scrolled near the bottom\n\t\t\tif ( scrollTop + clientHeight >= scrollHeight - 100 ) {\n\t\t\t\tinfiniteScrollHandler?.();\n\t\t\t}\n\t\t}, 100 ); // Throttle to 100ms\n\n\t\tconst container = containerRef.current;\n\t\tcontainer.addEventListener( 'scroll', handleScroll );\n\n\t\treturn () => {\n\t\t\tcontainer.removeEventListener( 'scroll', handleScroll );\n\t\t\thandleScroll.cancel(); // Cancel any pending throttled calls\n\t\t};\n\t}, [ infiniteScrollHandler, view.infiniteScrollEnabled ] );\n\n\t// Filter out DataViewsPicker layouts.\n\tconst defaultLayouts = useMemo(\n\t\t() =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries( defaultLayoutsProperty ).filter(\n\t\t\t\t\t( [ layoutType ] ) => {\n\t\t\t\t\t\treturn dataViewsLayouts.some(\n\t\t\t\t\t\t\t( viewLayout ) => viewLayout.type === layoutType\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t),\n\t\t[ defaultLayoutsProperty ]\n\t);\n\n\tif ( ! defaultLayouts[ view.type ] ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DataViewsContext.Provider\n\t\t\tvalue={ {\n\t\t\t\tview,\n\t\t\t\tonChangeView,\n\t\t\t\tfields: _fields,\n\t\t\t\tactions,\n\t\t\t\tdata,\n\t\t\t\tisLoading,\n\t\t\t\tpaginationInfo,\n\t\t\t\tselection: _selection,\n\t\t\t\tonChangeSelection: setSelectionWithChange,\n\t\t\t\topenedFilter,\n\t\t\t\tsetOpenedFilter,\n\t\t\t\tgetItemId,\n\t\t\t\tgetItemLevel,\n\t\t\t\tisItemClickable,\n\t\t\t\tonClickItem,\n\t\t\t\trenderItemLink,\n\t\t\t\tcontainerWidth,\n\t\t\t\tcontainerRef,\n\t\t\t\tresizeObserverRef,\n\t\t\t\tdefaultLayouts,\n\t\t\t\tfilters,\n\t\t\t\tisShowingFilter,\n\t\t\t\tsetIsShowingFilter,\n\t\t\t\tconfig,\n\t\t\t\tempty,\n\t\t\t\thasInfiniteScrollHandler: !! infiniteScrollHandler,\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"dataviews-wrapper\" ref={ containerRef }>\n\t\t\t\t{ children ?? (\n\t\t\t\t\t<DefaultUI\n\t\t\t\t\t\theader={ header }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\tsearchLabel={ searchLabel }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</DataViewsContext.Provider>\n\t);\n}\n\n// Populate the DataViews sub components\nconst DataViewsSubComponents = DataViews as typeof DataViews & {\n\tBulkActionToolbar: typeof BulkActionsFooter;\n\tFilters: typeof Filters;\n\tFiltersToggle: typeof FiltersToggle;\n\tFiltersToggled: typeof FiltersToggled;\n\tLayout: typeof DataViewsLayout;\n\tLayoutSwitcher: typeof ViewTypeMenu;\n\tPagination: typeof DataViewsPagination;\n\tSearch: typeof DataViewsSearch;\n\tViewConfig: typeof DataviewsViewConfigDropdown;\n\tFooter: typeof DataViewsFooter;\n};\n\nDataViewsSubComponents.BulkActionToolbar = BulkActionsFooter;\nDataViewsSubComponents.Filters = Filters;\nDataViewsSubComponents.FiltersToggled = FiltersToggled;\nDataViewsSubComponents.FiltersToggle = FiltersToggle;\nDataViewsSubComponents.Layout = DataViewsLayout;\nDataViewsSubComponents.LayoutSwitcher = ViewTypeMenu;\nDataViewsSubComponents.Pagination = DataViewsPagination;\nDataViewsSubComponents.Search = DataViewsSearch;\nDataViewsSubComponents.ViewConfig = DataviewsViewConfigDropdown;\nDataViewsSubComponents.Footer = DataViewsFooter;\n\nexport default DataViewsSubComponents;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2FE;AAnFF,wBAA+C;AAC/C,qBAAqD;AACrD,qBAA4C;AAK5C,+BAA6B;AAC7B,+BAA6B;AAC7B,+BAKO;AACP,8BAA4B;AAC5B,8BAA4B;AAC5B,8BAA4B;AAC5B,oCAAkC;AAClC,kCAAoC;AACpC,mCAGO;AACP,8BAA4B;AAwC5B,MAAM,mBAAmB,CAAE,SAAsB,KAAK;AACtD,MAAM,yBAAyB,MAAM;AACrC,MAAM,cAAqB,CAAC;AAE5B,MAAM,mBAAmB,sCAAa;A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AAA,QACA;AAAA,QACA;AAAA,QACA,0BAA0B,CAAC,CAAE;AAAA,MAC9B;AAAA,MAEA,sDAAC,SAAI,WAAU,qBAAoB,KAAM,cACtC,sBACD;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACD,GAEF;AAAA;AAAA,EACD;AAEF;AAGA,MAAM,yBAAyB;AAa/B,uBAAuB,oBAAoB;AAC3C,uBAAuB,UAAU;AACjC,uBAAuB,iBAAiB;AACxC,uBAAuB,gBAAgB;AACvC,uBAAuB,SAAS,wBAAAH;AAChC,uBAAuB,iBAAiB;AACxC,uBAAuB,aAAa;AACpC,uBAAuB,SAAS,wBAAAF;AAChC,uBAAuB,aAAa;AACpC,uBAAuB,SAAS,wBAAAG;AAEhC,IAAO,oBAAQ;",
|
|
6
|
+
"names": ["HStack", "DataViewsSearch", "DataViewsViewConfig", "DataViewsLayout", "DataViewsFooter", "normalizeFields", "DataViewsContext"]
|
|
7
|
+
}
|