@wordpress/dataviews 9.1.1-next.f56bd8138.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 +44 -1
- package/README.md +140 -38
- 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 -156
- 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 +46 -0
- package/build/components/dataviews-filters/filters-toggled.js.map +7 -0
- package/build/components/dataviews-filters/filters.js +101 -0
- package/build/components/dataviews-filters/filters.js.map +7 -0
- package/build/components/dataviews-filters/index.js +46 -197
- 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 +124 -0
- package/build/components/dataviews-filters/toggle.js.map +7 -0
- package/build/components/dataviews-filters/use-filters.js +74 -0
- package/build/components/dataviews-filters/use-filters.js.map +7 -0
- 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 -147
- 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 -297
- 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 +156 -131
- 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 +16 -0
- package/build-module/components/dataviews-filters/filters-toggled.js.map +7 -0
- package/build-module/components/dataviews-filters/filters.js +71 -0
- package/build-module/components/dataviews-filters/filters.js.map +7 -0
- package/build-module/components/dataviews-filters/index.js +11 -187
- 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 +94 -0
- package/build-module/components/dataviews-filters/toggle.js.map +7 -0
- package/build-module/components/dataviews-filters/use-filters.js +54 -0
- package/build-module/components/dataviews-filters/use-filters.js.map +7 -0
- 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 +139 -125
- 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 -288
- 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/index.d.ts +3 -2
- package/build-types/components/dataviews/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/filters-toggled.d.ts +5 -0
- package/build-types/components/dataviews-filters/filters-toggled.d.ts.map +1 -0
- package/build-types/components/dataviews-filters/filters.d.ts +6 -0
- package/build-types/components/dataviews-filters/filters.d.ts.map +1 -0
- package/build-types/components/dataviews-filters/index.d.ts +4 -8
- package/build-types/components/dataviews-filters/index.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/search-widget.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/toggle.d.ts +3 -0
- package/build-types/components/dataviews-filters/toggle.d.ts.map +1 -0
- package/build-types/components/dataviews-filters/use-filters.d.ts +4 -0
- package/build-types/components/dataviews-filters/use-filters.d.ts.map +1 -0
- 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-picker/index.d.ts +3 -2
- package/build-types/components/dataviews-picker/index.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/picker-grid/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 +3241 -2787
- 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 +10 -16
- 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/filters-toggled.tsx +20 -0
- package/src/components/dataviews-filters/filters.tsx +73 -0
- package/src/components/dataviews-filters/index.tsx +4 -246
- package/src/components/dataviews-filters/search-widget.tsx +30 -3
- package/src/components/dataviews-filters/style.scss +21 -6
- package/src/components/dataviews-filters/toggle.tsx +118 -0
- package/src/components/dataviews-filters/use-filters.ts +75 -0
- 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 +10 -16
- 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 +16 -9
- 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} +8 -9
- 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,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export const DEFAULT_LAYOUT = {
|
|
6
|
-
type: 'regular',
|
|
7
|
-
labelPosition: 'top'
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Normalizes a layout configuration based on its type.
|
|
12
|
-
*
|
|
13
|
-
* @param layout The layout object to normalize.
|
|
14
|
-
* @return The normalized layout object.
|
|
15
|
-
*/
|
|
16
|
-
export function normalizeLayout(layout) {
|
|
17
|
-
let normalizedLayout = DEFAULT_LAYOUT;
|
|
18
|
-
if (layout?.type === 'regular') {
|
|
19
|
-
var _layout$labelPosition;
|
|
20
|
-
normalizedLayout = {
|
|
21
|
-
type: 'regular',
|
|
22
|
-
labelPosition: (_layout$labelPosition = layout?.labelPosition) !== null && _layout$labelPosition !== void 0 ? _layout$labelPosition : 'top'
|
|
23
|
-
};
|
|
24
|
-
} else if (layout?.type === 'panel') {
|
|
25
|
-
var _layout$labelPosition2, _layout$openAs;
|
|
26
|
-
normalizedLayout = {
|
|
27
|
-
type: 'panel',
|
|
28
|
-
labelPosition: (_layout$labelPosition2 = layout?.labelPosition) !== null && _layout$labelPosition2 !== void 0 ? _layout$labelPosition2 : 'side',
|
|
29
|
-
openAs: (_layout$openAs = layout?.openAs) !== null && _layout$openAs !== void 0 ? _layout$openAs : 'dropdown'
|
|
30
|
-
};
|
|
31
|
-
} else if (layout?.type === 'card') {
|
|
32
|
-
if (layout.withHeader === false) {
|
|
33
|
-
// Don't let isOpened be false if withHeader is false.
|
|
34
|
-
// Otherwise, the card will not be visible.
|
|
35
|
-
normalizedLayout = {
|
|
36
|
-
type: 'card',
|
|
37
|
-
withHeader: false,
|
|
38
|
-
isOpened: true
|
|
39
|
-
};
|
|
40
|
-
} else {
|
|
41
|
-
normalizedLayout = {
|
|
42
|
-
type: 'card',
|
|
43
|
-
withHeader: true,
|
|
44
|
-
isOpened: typeof layout.isOpened === 'boolean' ? layout.isOpened : true
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
} else if (layout?.type === 'row') {
|
|
48
|
-
var _layout$alignment;
|
|
49
|
-
normalizedLayout = {
|
|
50
|
-
type: 'row',
|
|
51
|
-
alignment: (_layout$alignment = layout?.alignment) !== null && _layout$alignment !== void 0 ? _layout$alignment : 'center'
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
return normalizedLayout;
|
|
55
|
-
}
|
|
56
|
-
export default function normalizeFormFields(form) {
|
|
57
|
-
var _form$fields;
|
|
58
|
-
const formLayout = normalizeLayout(form?.layout);
|
|
59
|
-
return ((_form$fields = form.fields) !== null && _form$fields !== void 0 ? _form$fields : []).map(field => {
|
|
60
|
-
if (typeof field === 'string') {
|
|
61
|
-
return {
|
|
62
|
-
id: field,
|
|
63
|
-
layout: formLayout
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const fieldLayout = field.layout ? normalizeLayout(field.layout) : formLayout;
|
|
67
|
-
return {
|
|
68
|
-
...field,
|
|
69
|
-
layout: fieldLayout
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=normalize-form-fields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_LAYOUT","type","labelPosition","normalizeLayout","layout","normalizedLayout","_layout$labelPosition","_layout$labelPosition2","_layout$openAs","openAs","withHeader","isOpened","_layout$alignment","alignment","normalizeFormFields","form","_form$fields","formLayout","fields","map","field","id","fieldLayout"],"sources":["@wordpress/dataviews/src/normalize-form-fields.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tForm,\n\tLayout,\n\tNormalizedLayout,\n\tNormalizedRegularLayout,\n\tNormalizedPanelLayout,\n\tNormalizedCardLayout,\n\tNormalizedRowLayout,\n} from './types';\n\ninterface NormalizedFormField {\n\tid: string;\n\tlayout: Layout;\n}\n\nexport const DEFAULT_LAYOUT: NormalizedLayout = {\n\ttype: 'regular',\n\tlabelPosition: 'top',\n};\n\n/**\n * Normalizes a layout configuration based on its type.\n *\n * @param layout The layout object to normalize.\n * @return The normalized layout object.\n */\nexport function normalizeLayout( layout?: Layout ): NormalizedLayout {\n\tlet normalizedLayout = DEFAULT_LAYOUT;\n\n\tif ( layout?.type === 'regular' ) {\n\t\tnormalizedLayout = {\n\t\t\ttype: 'regular',\n\t\t\tlabelPosition: layout?.labelPosition ?? 'top',\n\t\t} satisfies NormalizedRegularLayout;\n\t} else if ( layout?.type === 'panel' ) {\n\t\tnormalizedLayout = {\n\t\t\ttype: 'panel',\n\t\t\tlabelPosition: layout?.labelPosition ?? 'side',\n\t\t\topenAs: layout?.openAs ?? 'dropdown',\n\t\t} satisfies NormalizedPanelLayout;\n\t} else if ( layout?.type === 'card' ) {\n\t\tif ( layout.withHeader === false ) {\n\t\t\t// Don't let isOpened be false if withHeader is false.\n\t\t\t// Otherwise, the card will not be visible.\n\t\t\tnormalizedLayout = {\n\t\t\t\ttype: 'card',\n\t\t\t\twithHeader: false,\n\t\t\t\tisOpened: true,\n\t\t\t} satisfies NormalizedCardLayout;\n\t\t} else {\n\t\t\tnormalizedLayout = {\n\t\t\t\ttype: 'card',\n\t\t\t\twithHeader: true,\n\t\t\t\tisOpened:\n\t\t\t\t\ttypeof layout.isOpened === 'boolean'\n\t\t\t\t\t\t? layout.isOpened\n\t\t\t\t\t\t: true,\n\t\t\t} satisfies NormalizedCardLayout;\n\t\t}\n\t} else if ( layout?.type === 'row' ) {\n\t\tnormalizedLayout = {\n\t\t\ttype: 'row',\n\t\t\talignment: layout?.alignment ?? 'center',\n\t\t} satisfies NormalizedRowLayout;\n\t}\n\n\treturn normalizedLayout;\n}\n\nexport default function normalizeFormFields(\n\tform: Form\n): NormalizedFormField[] {\n\tconst formLayout = normalizeLayout( form?.layout );\n\n\treturn ( form.fields ?? [] ).map( ( field ) => {\n\t\tif ( typeof field === 'string' ) {\n\t\t\treturn {\n\t\t\t\tid: field,\n\t\t\t\tlayout: formLayout,\n\t\t\t};\n\t\t}\n\n\t\tconst fieldLayout = field.layout\n\t\t\t? normalizeLayout( field.layout )\n\t\t\t: formLayout;\n\t\treturn {\n\t\t\t...field,\n\t\t\tlayout: fieldLayout,\n\t\t};\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;;AAgBA,OAAO,MAAMA,cAAgC,GAAG;EAC/CC,IAAI,EAAE,SAAS;EACfC,aAAa,EAAE;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,MAAe,EAAqB;EACpE,IAAIC,gBAAgB,GAAGL,cAAc;EAErC,IAAKI,MAAM,EAAEH,IAAI,KAAK,SAAS,EAAG;IAAA,IAAAK,qBAAA;IACjCD,gBAAgB,GAAG;MAClBJ,IAAI,EAAE,SAAS;MACfC,aAAa,GAAAI,qBAAA,GAAEF,MAAM,EAAEF,aAAa,cAAAI,qBAAA,cAAAA,qBAAA,GAAI;IACzC,CAAmC;EACpC,CAAC,MAAM,IAAKF,MAAM,EAAEH,IAAI,KAAK,OAAO,EAAG;IAAA,IAAAM,sBAAA,EAAAC,cAAA;IACtCH,gBAAgB,GAAG;MAClBJ,IAAI,EAAE,OAAO;MACbC,aAAa,GAAAK,sBAAA,GAAEH,MAAM,EAAEF,aAAa,cAAAK,sBAAA,cAAAA,sBAAA,GAAI,MAAM;MAC9CE,MAAM,GAAAD,cAAA,GAAEJ,MA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OAAO;MACN,GAAGG,KAAK;MACRhB,MAAM,EAAEkB;IACT,CAAC;EACF,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/dataviews/src/private-types.tsx"],"sourcesContent":["export type SelectionOrUpdater = string[] | ( ( prev: string[] ) => string[] );\nexport type SetSelection = ( selection: SelectionOrUpdater ) => void;\n"],"mappings":"","ignoreList":[]}
|
package/build-module/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/dataviews/src/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tReactElement,\n\tReactNode,\n\tComponentType,\n\tComponentProps,\n} from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { SetSelection } from './private-types';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\n/**\n * Utility type that makes all properties of T optional recursively.\n * Used by field setValue functions to allow partial item updates.\n */\nexport type DeepPartial< T > = {\n\t[ P in keyof T ]?: T[ P ] extends object ? DeepPartial< T[ P ] > : T[ P ];\n};\n\nexport type SortDirection = 'asc' | 'desc';\n\n/**\n * Generic option type.\n */\nexport interface Option< Value extends any = any > {\n\tvalue: Value;\n\tlabel: string;\n\tdescription?: string;\n}\n\nexport interface FilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators?: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\nexport interface NormalizedFilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\ninterface FilterConfigForType {\n\t/**\n\t * What operators are used by default.\n\t */\n\tdefaultOperators: Operator[];\n\n\t/**\n\t * What operators are supported by the field.\n\t */\n\tvalidOperators: Operator[];\n}\n\nexport type Operator =\n\t| 'is'\n\t| 'isNot'\n\t| 'isAny'\n\t| 'isNone'\n\t| 'isAll'\n\t| 'isNotAll'\n\t| 'lessThan'\n\t| 'greaterThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThanOrEqual'\n\t| 'before'\n\t| 'after'\n\t| 'beforeInc'\n\t| 'afterInc'\n\t| 'contains'\n\t| 'notContains'\n\t| 'startsWith'\n\t| 'between'\n\t| 'on'\n\t| 'notOn'\n\t| 'inThePast'\n\t| 'over';\n\nexport type FieldType =\n\t| 'text'\n\t| 'integer'\n\t| 'datetime'\n\t| 'date'\n\t| 'media'\n\t| 'boolean'\n\t| 'email'\n\t| 'password'\n\t| 'telephone'\n\t| 'color'\n\t| 'url'\n\t| 'array';\n\n/**\n * An abstract interface for Field based on the field type.\n */\nexport type FieldTypeDefinition< Item > = {\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid: Rules< Item >;\n\n\t/**\n\t * Callback used to render an edit control for the field or control name.\n\t */\n\tEdit:\n\t\t| ComponentType< DataFormControlProps< Item > >\n\t\t| string\n\t\t| EditConfig\n\t\t| null;\n\n\t/**\n\t * Callback used to render the field.\n\t */\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * The filter config for the field.\n\t */\n\tfilterBy: FilterConfigForType | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting: boolean;\n};\n\nexport type Rules< Item > = {\n\trequired?: boolean;\n\telements?: boolean;\n\tcustom?: ( item: Item, field: NormalizedField< Item > ) => null | string;\n};\n\n/**\n * Edit configuration for textarea controls.\n */\nexport type EditConfigTextarea = {\n\tcontrol: 'textarea';\n\t/**\n\t * Number of rows for the textarea.\n\t */\n\trows?: number;\n};\n\n/**\n * Edit configuration for text controls.\n */\nexport type EditConfigText = {\n\tcontrol: 'text';\n\t/**\n\t * Prefix component to display before the input.\n\t */\n\tprefix?: React.ComponentType;\n\t/**\n\t * Suffix component to display after the input.\n\t */\n\tsuffix?: React.ComponentType;\n};\n\n/**\n * Edit configuration for other control types (excluding 'text' and 'textarea').\n */\nexport type EditConfigGeneric = {\n\tcontrol: Exclude< FieldType, 'text' | 'textarea' >;\n};\n\n/**\n * Edit configuration object with type-safe control options.\n * Each control type has its own specific configuration properties.\n */\nexport type EditConfig =\n\t| EditConfigTextarea\n\t| EditConfigText\n\t| EditConfigGeneric;\n\n/**\n * A dataview field for a specific property of a data type.\n */\nexport type Field< Item > = {\n\t/**\n\t * Type of the fields.\n\t */\n\ttype?: FieldType;\n\n\t/**\n\t * The unique identifier of the field.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the field. Defaults to the id.\n\t */\n\tlabel?: string;\n\n\t/**\n\t * The header of the field. Defaults to the label.\n\t * It allows the usage of a React Element to render the field labels.\n\t */\n\theader?: string | ReactElement;\n\n\t/**\n\t * A description of the field.\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Placeholder for the field.\n\t */\n\tplaceholder?: string;\n\n\t/**\n\t * Callback used to render the field. Defaults to `field.getValue`.\n\t */\n\trender?: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * Callback used to render an edit control for the field.\n\t */\n\tEdit?: ComponentType< DataFormControlProps< Item > > | string | EditConfig;\n\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort?: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid?: Rules< Item >;\n\n\t/**\n\t * Callback used to decide if a field should be displayed.\n\t */\n\tisVisible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting?: boolean;\n\n\t/**\n\t * Whether the field is searchable.\n\t */\n\tenableGlobalSearch?: boolean;\n\n\t/**\n\t * Whether the field can be hidden in the UI.\n\t */\n\tenableHiding?: boolean;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements?: Option[];\n\n\t/**\n\t * Filter config for the field.\n\t */\n\tfilterBy?: FilterByConfig | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Callback used to retrieve the value of the field from the item.\n\t * Defaults to `item[ field.id ]`.\n\t */\n\tgetValue?: ( args: { item: Item } ) => any;\n\n\t/**\n\t * Callback used to set the value of the field on the item.\n\t * Used for editing operations to update field values.\n\t */\n\tsetValue?: ( args: { item: Item; value: any } ) => DeepPartial< Item >;\n};\n\nexport type NormalizedField< Item > = Omit< Field< Item >, 'Edit' > & {\n\tlabel: string;\n\theader: string | ReactElement;\n\tgetValue: ( args: { item: Item } ) => any;\n\tsetValue: ( args: { item: Item; value: any } ) => DeepPartial< Item >;\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\tEdit: ComponentType< DataFormControlProps< Item > > | null;\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\tisValid: Rules< Item >;\n\tenableHiding: boolean;\n\tenableSorting: boolean;\n\tfilterBy: NormalizedFilterByConfig | false;\n\treadOnly: boolean;\n};\n\n/**\n * A collection of dataview fields for a data type.\n */\nexport type Fields< Item > = Field< Item >[];\n\nexport type Data< Item > = Item[];\n\nexport type DataFormControlProps< Item > = {\n\tdata: Item;\n\tfield: NormalizedField< Item >;\n\tonChange: ( value: DeepPartial< Item > ) => void;\n\thideLabelFromVision?: boolean;\n\t/**\n\t * The currently selected filter operator for this field.\n\t *\n\t * Used by DataViews filters to determine which control to render based on the operator type.\n\t */\n\toperator?: Operator;\n\t/**\n\t * Configuration object for the control.\n\t */\n\tconfig?: {\n\t\tprefix?: React.ComponentType;\n\t\tsuffix?: React.ComponentType;\n\t\trows?: number;\n\t};\n};\n\nexport type DataViewRenderFieldProps< Item > = {\n\titem: Item;\n\tfield: NormalizedField< Item >;\n\tconfig?: {\n\t\tsizes: string;\n\t};\n};\n\n/**\n * The filters applied to the dataset.\n */\nexport interface Filter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The operator to use.\n\t */\n\toperator: Operator;\n\n\t/**\n\t * The value to filter by.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked?: boolean;\n}\n\nexport interface NormalizedFilter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The field name.\n\t */\n\tname: string;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements: Option[];\n\n\t/**\n\t * Is a single selection filter.\n\t */\n\tsingleSelection: boolean;\n\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether the filter is visible.\n\t */\n\tisVisible: boolean;\n\n\t/**\n\t * Whether it is a primary filter.\n\t */\n\tisPrimary: boolean;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked: boolean;\n}\n\ninterface ViewBase {\n\t/**\n\t * The layout of the view.\n\t */\n\ttype: string;\n\n\t/**\n\t * The global search term.\n\t */\n\tsearch?: string;\n\n\t/**\n\t * The filters to apply.\n\t */\n\tfilters?: Filter[];\n\n\t/**\n\t * The sorting configuration.\n\t */\n\tsort?: {\n\t\t/**\n\t\t * The field to sort by.\n\t\t */\n\t\tfield: string;\n\n\t\t/**\n\t\t * The direction to sort by.\n\t\t */\n\t\tdirection: SortDirection;\n\t};\n\n\t/**\n\t * The active page\n\t */\n\tpage?: number;\n\n\t/**\n\t * The number of items per page\n\t */\n\tperPage?: number;\n\n\t/**\n\t * The fields to render\n\t */\n\tfields?: string[];\n\n\t/**\n\t * Title field\n\t */\n\ttitleField?: string;\n\n\t/**\n\t * Media field\n\t */\n\tmediaField?: string;\n\n\t/**\n\t * Description field\n\t */\n\tdescriptionField?: string;\n\n\t/**\n\t * Whether to show the title\n\t */\n\tshowTitle?: boolean;\n\n\t/**\n\t * Whether to show the media\n\t */\n\tshowMedia?: boolean;\n\n\t/**\n\t * Whether to show the description\n\t */\n\tshowDescription?: boolean;\n\n\t/**\n\t * Whether to show the hierarchical levels.\n\t */\n\tshowLevels?: boolean;\n\n\t/**\n\t * The field to group by.\n\t */\n\tgroupByField?: string;\n\n\t/**\n\t * Whether infinite scroll is enabled.\n\t */\n\tinfiniteScrollEnabled?: boolean;\n}\n\nexport interface ColumnStyle {\n\t/**\n\t * The width of the field column.\n\t */\n\twidth?: string | number;\n\n\t/**\n\t * The minimum width of the field column.\n\t */\n\tmaxWidth?: string | number;\n\n\t/**\n\t * The maximum width of the field column.\n\t */\n\tminWidth?: string | number;\n\n\t/**\n\t * The alignment of the field column, defaults to left.\n\t */\n\talign?: 'start' | 'center' | 'end';\n}\n\nexport type Density = 'compact' | 'balanced' | 'comfortable';\n\nexport interface ViewTable extends ViewBase {\n\ttype: 'table';\n\n\tlayout?: {\n\t\t/**\n\t\t * The styles for the columns.\n\t\t */\n\t\tstyles?: Record< string, ColumnStyle >;\n\n\t\t/**\n\t\t * The density of the view.\n\t\t */\n\t\tdensity?: Density;\n\n\t\t/**\n\t\t * Whether the view allows column moving.\n\t\t */\n\t\tenableMoving?: boolean;\n\t};\n}\n\nexport interface ViewList extends ViewBase {\n\ttype: 'list';\n}\n\nexport interface ViewGrid extends ViewBase {\n\ttype: 'grid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport interface ViewPickerGrid extends ViewBase {\n\ttype: 'pickerGrid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport type View = ViewList | ViewGrid | ViewTable | ViewPickerGrid;\n\ninterface ActionBase< Item > {\n\t/**\n\t * The unique identifier of the action.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the action.\n\t * In case we want to adjust the label based on the selected items,\n\t * a function can be provided.\n\t */\n\tlabel: string | ( ( items: Item[] ) => string );\n\n\t/**\n\t * The icon of the action. (Either a string or an SVG element)\n\t * This should be IconType from the components package\n\t * but that import is breaking typescript build for the moment.\n\t */\n\ticon?: any;\n\n\t/**\n\t * Whether the action is disabled.\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Whether the action is destructive.\n\t */\n\tisDestructive?: boolean;\n\n\t/**\n\t * Whether the action is a primary action.\n\t */\n\tisPrimary?: boolean;\n\n\t/**\n\t * Whether the item passed as an argument supports the current action.\n\t */\n\tisEligible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the action can be used as a bulk action.\n\t */\n\tsupportsBulk?: boolean;\n\n\t/**\n\t * The context in which the action is visible.\n\t * This is only a \"meta\" information for now.\n\t */\n\tcontext?: 'list' | 'single';\n}\n\nexport interface RenderModalProps< Item > {\n\titems: Item[];\n\tcloseModal?: () => void;\n\tonActionPerformed?: ( items: Item[] ) => void;\n}\n\nexport interface ActionModal< Item > extends ActionBase< Item > {\n\t/**\n\t * Modal to render when the action is triggered.\n\t */\n\tRenderModal: ( {\n\t\titems,\n\t\tcloseModal,\n\t\tonActionPerformed,\n\t}: RenderModalProps< Item > ) => ReactElement;\n\n\t/**\n\t * Whether to hide the modal header.\n\t */\n\thideModalHeader?: boolean;\n\n\t/**\n\t * The header of the modal.\n\t */\n\tmodalHeader?: string;\n\n\t/**\n\t * The size of the modal.\n\t *\n\t * @default 'medium'\n\t */\n\tmodalSize?: 'small' | 'medium' | 'large' | 'fill';\n\n\t/**\n\t * The focus on mount property of the modal.\n\t */\n\tmodalFocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n}\n\nexport interface ActionButton< Item > extends ActionBase< Item > {\n\t/**\n\t * The callback to execute when the action is triggered.\n\t */\n\tcallback: (\n\t\titems: Item[],\n\t\tcontext: {\n\t\t\tregistry: any;\n\t\t\tonActionPerformed?: ( items: Item[] ) => void;\n\t\t}\n\t) => void;\n}\n\nexport type Action< Item > = ActionModal< Item > | ActionButton< Item >;\n\nexport interface ViewBaseProps< Item > {\n\tclassName?: string;\n\tactions: Action< Item >[];\n\tdata: Item[];\n\tfields: NormalizedField< Item >[];\n\tgetItemId: ( item: Item ) => string;\n\tgetItemLevel?: ( item: Item ) => number;\n\tisLoading?: boolean;\n\tonChangeView: ( view: View ) => void;\n\tonChangeSelection: SetSelection;\n\tselection: string[];\n\tsetOpenedFilter: ( fieldId: 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\tview: View;\n\tempty: ReactNode;\n}\n\nexport type ViewPickerBaseProps< Item > = Omit<\n\tViewBaseProps< Item >,\n\t| 'view'\n\t| 'onChangeView'\n\t// The following props are not supported for pickers.\n\t| 'isItemClickable'\n\t| 'onClickItem'\n\t| 'renderItemLink'\n\t| 'getItemLevel'\n> & {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n};\n\nexport interface ViewTableProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewTable;\n}\n\nexport interface ViewListProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewList;\n}\n\nexport interface ViewGridProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewGrid;\n}\n\nexport interface ViewPickerGridProps< Item >\n\textends Omit< ViewPickerBaseProps< Item >, 'view' > {\n\tview: ViewPickerGrid;\n}\n\nexport type ViewProps< Item > =\n\t| ViewTableProps< Item >\n\t| ViewGridProps< Item >\n\t| ViewListProps< Item >;\n\nexport type ViewPickerProps< Item > = ViewPickerGridProps< Item >;\n\nexport interface SupportedLayouts {\n\tlist?: Omit< ViewList, 'type' >;\n\tgrid?: Omit< ViewGrid, 'type' >;\n\ttable?: Omit< ViewTable, 'type' >;\n\tpickerGrid?: Omit< ViewPickerGrid, 'type' >;\n}\n\n/**\n * DataForm layouts.\n */\nexport type LayoutType = 'regular' | 'panel' | 'card' | 'row';\nexport type LabelPosition = 'top' | 'side' | 'none';\n\nexport type RegularLayout = {\n\ttype: 'regular';\n\tlabelPosition?: LabelPosition;\n};\nexport type NormalizedRegularLayout = {\n\ttype: 'regular';\n\tlabelPosition: LabelPosition;\n};\n\nexport type PanelLayout = {\n\ttype: 'panel';\n\tlabelPosition?: LabelPosition;\n\topenAs?: 'dropdown' | 'modal';\n};\nexport type NormalizedPanelLayout = {\n\ttype: 'panel';\n\tlabelPosition: LabelPosition;\n\topenAs: 'dropdown' | 'modal';\n};\n\nexport type CardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened?: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader?: true | undefined;\n\t\t\tisOpened?: boolean;\n\t };\nexport type NormalizedCardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: true;\n\t\t\tisOpened: boolean;\n\t };\n\nexport type RowLayout = {\n\ttype: 'row';\n\talignment?: 'start' | 'center' | 'end';\n};\nexport type NormalizedRowLayout = {\n\ttype: 'row';\n\talignment: 'start' | 'center' | 'end';\n};\n\nexport type Layout = RegularLayout | PanelLayout | CardLayout | RowLayout;\nexport type NormalizedLayout =\n\t| NormalizedRegularLayout\n\t| NormalizedPanelLayout\n\t| NormalizedCardLayout\n\t| NormalizedRowLayout;\n\nexport type SimpleFormField = {\n\tid: string;\n\tlayout?: Layout;\n};\n\nexport type CombinedFormField = {\n\tid: string;\n\tlabel?: string;\n\tdescription?: string;\n\tlayout?: Layout;\n\tchildren: Array< FormField | string >;\n\tsummary?: string | string[];\n};\n\nexport type FormField = SimpleFormField | CombinedFormField;\n\n/**\n * The form configuration.\n */\nexport type Form = {\n\tlayout?: Layout;\n\tfields?: Array< FormField | string >;\n};\n\nexport interface DataFormProps< Item > {\n\tdata: Item;\n\tfields: Field< Item >[];\n\tform: Form;\n\tonChange: ( value: Record< string, any > ) => void;\n}\n\nexport interface FieldLayoutProps< Item > {\n\tdata: Item;\n\tfield: FormField;\n\tonChange: ( value: any ) => void;\n\thideLabelFromVision?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
package/build-module/utils.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export function renderFromElements({
|
|
6
|
-
item,
|
|
7
|
-
field
|
|
8
|
-
}) {
|
|
9
|
-
const value = field.getValue({
|
|
10
|
-
item
|
|
11
|
-
});
|
|
12
|
-
return field?.elements?.find(element => element.value === value)?.label || field.getValue({
|
|
13
|
-
item
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["renderFromElements","item","field","value","getValue","elements","find","element","label"],"sources":["@wordpress/dataviews/src/utils.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { DataViewRenderFieldProps } from './types';\n\nexport function renderFromElements< Item >( {\n\titem,\n\tfield,\n}: DataViewRenderFieldProps< Item > ) {\n\tconst value = field.getValue( { item } );\n\treturn (\n\t\tfield?.elements?.find( ( element ) => element.value === value )\n\t\t\t?.label || field.getValue( { item } )\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;;AAGA,OAAO,SAASA,kBAAkBA,CAAU;EAC3CC,IAAI;EACJC;AACiC,CAAC,EAAG;EACrC,MAAMC,KAAK,GAAGD,KAAK,CAACE,QAAQ,CAAE;IAAEH;EAAK,CAAE,CAAC;EACxC,OACCC,KAAK,EAAEG,QAAQ,EAAEC,IAAI,CAAIC,OAAO,IAAMA,OAAO,CAACJ,KAAK,KAAKA,KAAM,CAAC,EAC5DK,KAAK,IAAIN,KAAK,CAACE,QAAQ,CAAE;IAAEH;EAAK,CAAE,CAAC;AAExC","ignoreList":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { normalizeFields } from './normalize-fields';
|
|
5
|
-
/**
|
|
6
|
-
* Whether or not the given item's value is valid according to the fields and form config.
|
|
7
|
-
*
|
|
8
|
-
* @param item The item to validate.
|
|
9
|
-
* @param fields Fields config.
|
|
10
|
-
* @param form Form config.
|
|
11
|
-
*
|
|
12
|
-
* @return A boolean indicating if the item is valid (true) or not (false).
|
|
13
|
-
*/
|
|
14
|
-
export function isItemValid(item, fields, form) {
|
|
15
|
-
const _fields = normalizeFields(fields.filter(({
|
|
16
|
-
id
|
|
17
|
-
}) => !!form.fields?.includes(id)));
|
|
18
|
-
const isEmptyNullOrUndefined = value => [undefined, '', null].includes(value);
|
|
19
|
-
const isArrayOrElementsEmptyNullOrUndefined = value => {
|
|
20
|
-
return !Array.isArray(value) || value.length === 0 || value.every(element => isEmptyNullOrUndefined(element));
|
|
21
|
-
};
|
|
22
|
-
return _fields.every(field => {
|
|
23
|
-
const value = field.getValue({
|
|
24
|
-
item
|
|
25
|
-
});
|
|
26
|
-
if (field.isValid.required) {
|
|
27
|
-
if (field.type === 'text' && isEmptyNullOrUndefined(value) || field.type === 'email' && isEmptyNullOrUndefined(value) || field.type === 'url' && isEmptyNullOrUndefined(value) || field.type === 'telephone' && isEmptyNullOrUndefined(value) || field.type === 'password' && isEmptyNullOrUndefined(value) || field.type === 'integer' && isEmptyNullOrUndefined(value) || field.type === 'array' && isArrayOrElementsEmptyNullOrUndefined(value) || field.type === undefined && isEmptyNullOrUndefined(value)) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
if (field.type === 'boolean' && value !== true) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (field.isValid.elements) {
|
|
35
|
-
if (field.elements) {
|
|
36
|
-
const validValues = field.elements.map(element => element.value);
|
|
37
|
-
if (field.type === 'array') {
|
|
38
|
-
// For arrays, check if all values are valid elements
|
|
39
|
-
if (Array.isArray(value)) {
|
|
40
|
-
return value.every(arrayItem => validValues.includes(arrayItem));
|
|
41
|
-
}
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
// For single-value fields, check if the value is a valid element
|
|
45
|
-
return validValues.includes(value);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (typeof field.isValid.custom === 'function' && field.isValid.custom(item, field) !== null) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["normalizeFields","isItemValid","item","fields","form","_fields","filter","id","includes","isEmptyNullOrUndefined","value","undefined","isArrayOrElementsEmptyNullOrUndefined","Array","isArray","length","every","element","field","getValue","isValid","required","type","elements","validValues","map","arrayItem","custom"],"sources":["@wordpress/dataviews/src/validation.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { normalizeFields } from './normalize-fields';\nimport type { Field, Form } from './types';\n\n/**\n * Whether or not the given item's value is valid according to the fields and form config.\n *\n * @param item The item to validate.\n * @param fields Fields config.\n * @param form Form config.\n *\n * @return A boolean indicating if the item is valid (true) or not (false).\n */\nexport function isItemValid< Item >(\n\titem: Item,\n\tfields: Field< Item >[],\n\tform: Form\n): boolean {\n\tconst _fields = normalizeFields(\n\t\tfields.filter( ( { id } ) => !! form.fields?.includes( id ) )\n\t);\n\n\tconst isEmptyNullOrUndefined = ( value: any ) =>\n\t\t[ undefined, '', null ].includes( value );\n\n\tconst isArrayOrElementsEmptyNullOrUndefined = ( value: any ) => {\n\t\treturn (\n\t\t\t! Array.isArray( value ) ||\n\t\t\tvalue.length === 0 ||\n\t\t\tvalue.every( ( element: any ) => isEmptyNullOrUndefined( element ) )\n\t\t);\n\t};\n\n\treturn _fields.every( ( field ) => {\n\t\tconst value = field.getValue( { item } );\n\n\t\tif ( field.isValid.required ) {\n\t\t\tif (\n\t\t\t\t( field.type === 'text' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'email' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'url' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'telephone' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'password' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'integer' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'array' &&\n\t\t\t\t\tisArrayOrElementsEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === undefined && isEmptyNullOrUndefined( value ) )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( field.type === 'boolean' && value !== true ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif ( field.isValid.elements ) {\n\t\t\tif ( field.elements ) {\n\t\t\t\tconst validValues = field.elements.map(\n\t\t\t\t\t( element ) => element.value\n\t\t\t\t);\n\n\t\t\t\tif ( field.type === 'array' ) {\n\t\t\t\t\t// For arrays, check if all values are valid elements\n\t\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\t\treturn value.every( ( arrayItem ) =>\n\t\t\t\t\t\t\tvalidValues.includes( arrayItem )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// For single-value fields, check if the value is a valid element\n\t\t\t\treturn validValues.includes( value );\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\ttypeof field.isValid.custom === 'function' &&\n\t\t\tfield.isValid.custom( item, field ) !== null\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,oBAAoB;AAGpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAC1BC,IAAU,EACVC,MAAuB,EACvBC,IAAU,EACA;EACV,MAAMC,OAAO,GAAGL,eAAe,CAC9BG,MAAM,CAACG,MAAM,CAAE,CAAE;IAAEC;EAAG,CAAC,KAAM,CAAC,CAAEH,IAAI,CAACD,MAAM,EAAEK,QAAQ,CAAED,EAAG,CAAE,CAC7D,CAAC;EAED,MAAME,sBAAsB,GAAKC,KAAU,IAC1C,CAAEC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAE,CAACH,QAAQ,CAAEE,KAAM,CAAC;EAE1C,MAAME,qCAAqC,GAAKF,KAAU,IAAM;IAC/D,OACC,CAAEG,KAAK,CAACC,OAAO,CAAEJ,KAAM,CAAC,IACxBA,KAAK,CAACK,MAAM,KAAK,CAAC,IAClBL,KAAK,CAACM,KAAK,CAAIC,OAAY,IAAMR,sBAAsB,CAAEQ,OAAQ,CAAE,CAAC;EAEtE,CAAC;EAED,OAAOZ,OAAO,CAACW,KAAK,CAAIE,KAAK,IAAM;IAClC,MAAMR,KAAK,GAAGQ,KAAK,CAACC,QAAQ,CAAE;MAAEjB;IAAK,CAAE,C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A,OAAOF,WAAW,CAAChB,QAAQ,CAAEE,KAAM,CAAC;MACrC;IACD;IAEA,IACC,OAAOQ,KAAK,CAACE,OAAO,CAACO,MAAM,KAAK,UAAU,IAC1CT,KAAK,CAACE,OAAO,CAACO,MAAM,CAAEzB,IAAI,EAAEgB,KAAM,CAAC,KAAK,IAAI,EAC3C;MACD,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataform/stories/index.story.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,QAAQ,MAAM,UAAU,CAAC;AAu6ChC,QAAA,MAAM,IAAI;;;CAGT,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,UAAU;6BAxfuB;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;;;CAmgBpE,CAAC;AAEF,eAAO,MAAM,WAAW;yCA9kCrB;QACF,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;QAC/C,aAAa,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QACnD,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;KACzC;;;;;;;;;;;;;;;;;CAwlCA,CAAC;AAEF,eAAO,MAAM,aAAa;iCA9sCvB;QACF,aAAa,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KACnD;;;;;;;;;;CAqtCA,CAAC;AAEF,eAAO,MAAM,SAAS;6BA1VnB;QACF,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;KACtC;;;;;;;;;;;;;CAoWA,CAAC;AAEF,eAAO,MAAM,WAAW;;CAEvB,CAAC;AAEF,eAAO,MAAM,UAAU;0CA3/BpB;QACF,QAAQ,EAAE,OAAO,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AY;;;;;;;;;;;;;CAaxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAE,WAAW,CAAE,EAwC1C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAE,WAAW,CAAE,EA0HxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAyB7C;;GAEG;AACH,OAAO,SAAS,MAAM,UAAU,CAAC;AAYjC,OAAO,aAAa,CAAC;AAErB,QAAA,MAAM,IAAI,EAiBL,IAAI,CAAE,OAAO,SAAS,CAAE,CAAC;AAE9B,eAAe,IAAI,CAAC;AAQpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAoCnB,CAAC;AAaF,eAAO,MAAM,KAAK,mCAkBjB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAmBvB,CAAC;AA+CF,eAAO,MAAM,SAAS;0BA3CnB;QACF,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;KAClC;;;;;;;;CAkDA,CAAC;AA8EF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,mCAiD3B,CAAC;AAEF,eAAO,MAAM,QAAQ,mCA8BpB,CAAC;AAEF,eAAO,MAAM,aAAa,mCAmCzB,CAAC;AAEF,eAAO,MAAM,cAAc,mCA2H1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews-picker/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO7C;;GAEG;AACH,OAAO,eAAe,MAAM,UAAU,CAAC;AAUvC,QAAA,MAAM,IAAI,EAGL,IAAI,CAAE,OAAO,eAAe,CAAE,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;6EAKjB;QACF,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,SAAS,EAAE,OAAO,CAAC;QACnB,qBAAqB,EAAE,OAAO,CAAC;KAC/B;;;;;;;;;;;;;;;;;;;;;;;;CAsGA,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export type DateRelative = {
|
|
2
|
-
value?: string | number;
|
|
3
|
-
unit?: string;
|
|
4
|
-
};
|
|
5
|
-
interface RelativeDateControlProps {
|
|
6
|
-
id: string;
|
|
7
|
-
value: DateRelative;
|
|
8
|
-
onChange: (args: DateRelative) => void;
|
|
9
|
-
label: string;
|
|
10
|
-
hideLabelFromVision?: boolean;
|
|
11
|
-
options: {
|
|
12
|
-
value: string;
|
|
13
|
-
label: string;
|
|
14
|
-
}[];
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare const TIME_UNITS_OPTIONS: {
|
|
18
|
-
inThePast: ({
|
|
19
|
-
value: string;
|
|
20
|
-
label: import("@wordpress/i18n").TranslatableText<"Days">;
|
|
21
|
-
} | {
|
|
22
|
-
value: string;
|
|
23
|
-
label: import("@wordpress/i18n").TranslatableText<"Weeks">;
|
|
24
|
-
} | {
|
|
25
|
-
value: string;
|
|
26
|
-
label: import("@wordpress/i18n").TranslatableText<"Months">;
|
|
27
|
-
} | {
|
|
28
|
-
value: string;
|
|
29
|
-
label: import("@wordpress/i18n").TranslatableText<"Years">;
|
|
30
|
-
})[];
|
|
31
|
-
over: ({
|
|
32
|
-
value: string;
|
|
33
|
-
label: import("@wordpress/i18n").TranslatableText<"Days ago">;
|
|
34
|
-
} | {
|
|
35
|
-
value: string;
|
|
36
|
-
label: import("@wordpress/i18n").TranslatableText<"Weeks ago">;
|
|
37
|
-
} | {
|
|
38
|
-
value: string;
|
|
39
|
-
label: import("@wordpress/i18n").TranslatableText<"Months ago">;
|
|
40
|
-
} | {
|
|
41
|
-
value: string;
|
|
42
|
-
label: import("@wordpress/i18n").TranslatableText<"Years ago">;
|
|
43
|
-
})[];
|
|
44
|
-
};
|
|
45
|
-
export default function RelativeDateControl({ id, value, onChange, label, hideLabelFromVision, options, className, }: RelativeDateControlProps): import("react").JSX.Element;
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=relative-date-control.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"relative-date-control.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/relative-date-control.tsx"],"names":[],"mappings":"AAsBA,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,UAAU,wBAAwB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,CAAE,IAAI,EAAE,YAAY,KAAM,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,EAC5C,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,OAAO,EACP,SAAS,GACT,EAAE,wBAAwB,+BA8C1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/card/index.tsx"],"names":[],"mappings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S,CAAA;KAAE,CAAE,CAAC;CAC1D,+BA2DA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dataforms-layouts/index.tsx"],"names":[],"mappings":"AAQA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAa,MAAM,UAAU,CAAC;AAClD,OAAO,gBAAgB,MAAM,WAAW,CAAC;AAGzC,OAAO,YAAY,MAAM,OAAO,CAAC;AA0CjC,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,MAAM;;;;;;;qCAlB3C;QACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC;KACf;cAiBF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-combined-field.d.ts","sourceRoot":"","sources":["../../src/dataforms-layouts/is-combined-field.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7D,wBAAgB,eAAe,CAC9B,KAAK,EAAE,SAAS,GACd,KAAK,IAAI,iBAAiB,CAE5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/dropdown.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,KAAK,EAAQ,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsCpE,iBAAS,aAAa,CAAE,IAAI,EAAI,EAC/B,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAsB,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,GACL,EAAE;IACF,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IACzC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;CACjB,+BA0EA;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/index.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EACX,gBAAgB,EAGhB,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAAI,EAC/C,IAAI,EACJ,KAAK,EACL,QAAQ,GACR,EAAE,gBAAgB,CAAE,IAAI,CAAE,sCAgI1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/modal.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,OAAO,KAAK,EAAQ,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAkFpE,iBAAS,UAAU,CAAE,IAAI,EAAI,EAC5B,eAAe,EACf,aAAa,EACb,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,KAAK,GACL,EAAE;IACF,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IACzC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;CACjB,+BAwCA;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summary-button.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/summary-button.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,iBAAS,aAAa,CAAE,IAAI,EAAI,EAC/B,aAAa,EACb,IAAI,EACJ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EAAE,YAAY,GAC7B,EAAE;IACF,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,+BA8DA;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/regular/index.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,OAAO,KAAK,EAEX,gBAAgB,EAEhB,MAAM,aAAa,CAAC;AAmBrB,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,IAAI,EAAI,EACjD,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,gBAAgB,CAAE,IAAI,CAAE,sCAmG1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/row/index.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAA6B,MAAM,aAAa,CAAC;AAwB/E,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,IAAI,EAAI,EAC7C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,gBAAgB,CAAE,IAAI,CAAE,sCAuE1B"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import DataForm from '../../components/dataform/index';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: typeof DataForm;
|
|
5
|
-
argTypes: {
|
|
6
|
-
type: {
|
|
7
|
-
control: {
|
|
8
|
-
type: string;
|
|
9
|
-
};
|
|
10
|
-
description: string;
|
|
11
|
-
options: string[];
|
|
12
|
-
};
|
|
13
|
-
Edit: {
|
|
14
|
-
control: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
description: string;
|
|
18
|
-
options: string[];
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
args: {
|
|
22
|
-
type: string;
|
|
23
|
-
Edit: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export default meta;
|
|
27
|
-
type PanelTypes = 'regular' | 'panel';
|
|
28
|
-
type ControlTypes = 'default' | 'array' | 'checkbox' | 'color' | 'date' | 'datetime' | 'email' | 'integer' | 'password' | 'radio' | 'select' | 'telephone' | 'url' | 'text' | 'toggle' | 'toggleGroup';
|
|
29
|
-
export declare const All: ({ type, Edit, }: {
|
|
30
|
-
type: PanelTypes;
|
|
31
|
-
Edit: ControlTypes;
|
|
32
|
-
}) => import("react").JSX.Element;
|
|
33
|
-
export declare const Text: ({ type, Edit, }: {
|
|
34
|
-
type: PanelTypes;
|
|
35
|
-
Edit: ControlTypes;
|
|
36
|
-
}) => import("react").JSX.Element;
|
|
37
|
-
export declare const Integer: ({ type, Edit, }: {
|
|
38
|
-
type: PanelTypes;
|
|
39
|
-
Edit: ControlTypes;
|
|
40
|
-
}) => import("react").JSX.Element;
|
|
41
|
-
export declare const Boolean: ({ type, Edit, }: {
|
|
42
|
-
type: PanelTypes;
|
|
43
|
-
Edit: ControlTypes;
|
|
44
|
-
}) => import("react").JSX.Element;
|
|
45
|
-
export declare const DateTime: ({ type, Edit, }: {
|
|
46
|
-
type: PanelTypes;
|
|
47
|
-
Edit: ControlTypes;
|
|
48
|
-
}) => import("react").JSX.Element;
|
|
49
|
-
export declare const Date: ({ type, Edit, }: {
|
|
50
|
-
type: PanelTypes;
|
|
51
|
-
Edit: ControlTypes;
|
|
52
|
-
}) => import("react").JSX.Element;
|
|
53
|
-
export declare const Email: ({ type, Edit, }: {
|
|
54
|
-
type: PanelTypes;
|
|
55
|
-
Edit: ControlTypes;
|
|
56
|
-
}) => import("react").JSX.Element;
|
|
57
|
-
export declare const Telephone: ({ type, Edit, }: {
|
|
58
|
-
type: PanelTypes;
|
|
59
|
-
Edit: ControlTypes;
|
|
60
|
-
}) => import("react").JSX.Element;
|
|
61
|
-
export declare const Url: ({ type, Edit, }: {
|
|
62
|
-
type: PanelTypes;
|
|
63
|
-
Edit: ControlTypes;
|
|
64
|
-
}) => import("react").JSX.Element;
|
|
65
|
-
export declare const Color: ({ type, Edit, }: {
|
|
66
|
-
type: PanelTypes;
|
|
67
|
-
Edit: ControlTypes;
|
|
68
|
-
}) => import("react").JSX.Element;
|
|
69
|
-
export declare const Media: ({ type, Edit, }: {
|
|
70
|
-
type: PanelTypes;
|
|
71
|
-
Edit: ControlTypes;
|
|
72
|
-
}) => import("react").JSX.Element;
|
|
73
|
-
export declare const Array: ({ type, Edit, }: {
|
|
74
|
-
type: PanelTypes;
|
|
75
|
-
Edit: ControlTypes;
|
|
76
|
-
}) => import("react").JSX.Element;
|
|
77
|
-
export declare const Password: ({ type, Edit, }: {
|
|
78
|
-
type: PanelTypes;
|
|
79
|
-
Edit: ControlTypes;
|
|
80
|
-
}) => import("react").JSX.Element;
|
|
81
|
-
export declare const NoType: ({ type, Edit, }: {
|
|
82
|
-
type: PanelTypes;
|
|
83
|
-
Edit: ControlTypes;
|
|
84
|
-
}) => import("react").JSX.Element;
|
|
85
|
-
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/field-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
|
|
1
|
-
import type { Field, NormalizedField } from './types';
|
|
2
|
-
export declare const setValueFromId: (id: string) => ({ value }: {
|
|
3
|
-
value: any;
|
|
4
|
-
}) => any;
|
|
5
|
-
/**
|
|
6
|
-
* Apply default values and normalize the fields config.
|
|
7
|
-
*
|
|
8
|
-
* @param fields Fields config.
|
|
9
|
-
* @return Normalized fields config.
|
|
10
|
-
*/
|
|
11
|
-
export declare function normalizeFields<Item>(fields: Field<Item>[]): NormalizedField<Item>[];
|
|
12
|
-
//# sourceMappingURL=normalize-fields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-fields.d.ts","sourceRoot":"","sources":["../src/normalize-fields.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAEX,KAAK,EAGL,eAAe,EACf,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,cAAc,OACpB,MAAM,iBACC;IAAE,KAAK,EAAE,GAAG,CAAA;CAAE,QAY1B,CAAC;AA+EH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,IAAI,EACpC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CA2D3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-form-fields.d.ts","sourceRoot":"","sources":["../src/normalize-form-fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,IAAI,EACJ,MAAM,EACN,gBAAgB,EAKhB,MAAM,SAAS,CAAC;AAEjB,UAAU,mBAAmB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,gBAG5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,MAAM,CAAC,EAAE,MAAM,GAAI,gBAAgB,CAyCnE;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAC1C,IAAI,EAAE,IAAI,GACR,mBAAmB,EAAE,CAmBvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private-types.d.ts","sourceRoot":"","sources":["../src/private-types.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,MAAM,EAAE,GAAG,CAAE,CAAE,IAAI,EAAE,MAAM,EAAE,KAAM,MAAM,EAAE,CAAE,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAE,SAAS,EAAE,kBAAkB,KAAM,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/test/validation.ts"],"names":[],"mappings":""}
|