@wordpress/dataviews 11.0.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +140 -93
  3. package/build/components/dataviews-filters/filter.js +25 -267
  4. package/build/components/dataviews-filters/filter.js.map +2 -2
  5. package/build/components/dataviews-filters/input-widget.js +1 -4
  6. package/build/components/dataviews-filters/input-widget.js.map +2 -2
  7. package/build/components/dataviews-filters/use-filters.js +3 -3
  8. package/build/components/dataviews-filters/use-filters.js.map +2 -2
  9. package/build/constants.js +5 -142
  10. package/build/constants.js.map +2 -2
  11. package/build/dataform-controls/number.js +2 -1
  12. package/build/dataform-controls/number.js.map +2 -2
  13. package/build/dataform-controls/textarea.js +3 -1
  14. package/build/dataform-controls/textarea.js.map +2 -2
  15. package/build/dataform-controls/utils/get-custom-validity.js +8 -0
  16. package/build/dataform-controls/utils/get-custom-validity.js.map +2 -2
  17. package/build/dataform-controls/utils/validated-input.js +4 -2
  18. package/build/dataform-controls/utils/validated-input.js.map +2 -2
  19. package/build/dataform-controls/utils/validated-number.js +4 -2
  20. package/build/dataform-controls/utils/validated-number.js.map +2 -2
  21. package/build/dataform-layouts/panel/modal.js +14 -5
  22. package/build/dataform-layouts/panel/modal.js.map +2 -2
  23. package/build/dataviews-layouts/grid/composite-grid.js +39 -37
  24. package/build/dataviews-layouts/grid/composite-grid.js.map +3 -3
  25. package/build/dataviews-layouts/table/index.js +8 -3
  26. package/build/dataviews-layouts/table/index.js.map +2 -2
  27. package/build/field-types/array.js +27 -14
  28. package/build/field-types/array.js.map +3 -3
  29. package/build/field-types/boolean.js +13 -10
  30. package/build/field-types/boolean.js.map +3 -3
  31. package/build/field-types/color.js +14 -11
  32. package/build/field-types/color.js.map +3 -3
  33. package/build/field-types/date.js +11 -8
  34. package/build/field-types/date.js.map +3 -3
  35. package/build/field-types/datetime.js +7 -5
  36. package/build/field-types/datetime.js.map +3 -3
  37. package/build/field-types/email.js +20 -11
  38. package/build/field-types/email.js.map +3 -3
  39. package/build/field-types/index.js +12 -14
  40. package/build/field-types/index.js.map +3 -3
  41. package/build/field-types/integer.js +63 -14
  42. package/build/field-types/integer.js.map +3 -3
  43. package/build/field-types/media.js +5 -5
  44. package/build/field-types/media.js.map +2 -2
  45. package/build/field-types/no-type.js +9 -6
  46. package/build/field-types/no-type.js.map +3 -3
  47. package/build/field-types/number.js +51 -15
  48. package/build/field-types/number.js.map +3 -3
  49. package/build/field-types/password.js +13 -5
  50. package/build/field-types/password.js.map +3 -3
  51. package/build/field-types/telephone.js +13 -5
  52. package/build/field-types/telephone.js.map +3 -3
  53. package/build/field-types/text.js +13 -5
  54. package/build/field-types/text.js.map +3 -3
  55. package/build/field-types/url.js +13 -5
  56. package/build/field-types/url.js.map +3 -3
  57. package/build/field-types/utils/get-is-valid.js +89 -0
  58. package/build/field-types/utils/get-is-valid.js.map +7 -0
  59. package/build/field-types/utils/is-valid-elements.js +35 -0
  60. package/build/field-types/utils/is-valid-elements.js.map +7 -0
  61. package/build/field-types/utils/is-valid-max-length.js +36 -0
  62. package/build/field-types/utils/is-valid-max-length.js.map +7 -0
  63. package/build/field-types/utils/is-valid-max.js +36 -0
  64. package/build/field-types/utils/is-valid-max.js.map +7 -0
  65. package/build/field-types/utils/is-valid-min-length.js +36 -0
  66. package/build/field-types/utils/is-valid-min-length.js.map +7 -0
  67. package/build/field-types/utils/is-valid-min.js +36 -0
  68. package/build/field-types/utils/is-valid-min.js.map +7 -0
  69. package/build/field-types/utils/is-valid-pattern.js +41 -0
  70. package/build/field-types/utils/is-valid-pattern.js.map +7 -0
  71. package/build/field-types/utils/is-valid-required-for-array.js +32 -0
  72. package/build/field-types/utils/is-valid-required-for-array.js.map +7 -0
  73. package/build/field-types/utils/is-valid-required-for-bool.js +30 -0
  74. package/build/field-types/utils/is-valid-required-for-bool.js.map +7 -0
  75. package/build/field-types/utils/is-valid-required.js +30 -0
  76. package/build/field-types/utils/is-valid-required.js.map +7 -0
  77. package/build/hooks/use-form-validity.js +52 -102
  78. package/build/hooks/use-form-validity.js.map +2 -2
  79. package/build/types/field-api.js.map +1 -1
  80. package/build/types/private.js.map +1 -1
  81. package/build/utils/filter-sort-and-paginate.js +5 -0
  82. package/build/utils/filter-sort-and-paginate.js.map +3 -3
  83. package/build/utils/operators.js +399 -0
  84. package/build/utils/operators.js.map +7 -0
  85. package/build-module/components/dataviews-filters/filter.js +26 -292
  86. package/build-module/components/dataviews-filters/filter.js.map +2 -2
  87. package/build-module/components/dataviews-filters/input-widget.js +1 -4
  88. package/build-module/components/dataviews-filters/input-widget.js.map +2 -2
  89. package/build-module/components/dataviews-filters/use-filters.js +6 -3
  90. package/build-module/components/dataviews-filters/use-filters.js.map +2 -2
  91. package/build-module/constants.js +5 -139
  92. package/build-module/constants.js.map +2 -2
  93. package/build-module/dataform-controls/number.js +2 -1
  94. package/build-module/dataform-controls/number.js.map +2 -2
  95. package/build-module/dataform-controls/textarea.js +3 -1
  96. package/build-module/dataform-controls/textarea.js.map +2 -2
  97. package/build-module/dataform-controls/utils/get-custom-validity.js +8 -0
  98. package/build-module/dataform-controls/utils/get-custom-validity.js.map +2 -2
  99. package/build-module/dataform-controls/utils/validated-input.js +4 -2
  100. package/build-module/dataform-controls/utils/validated-input.js.map +2 -2
  101. package/build-module/dataform-controls/utils/validated-number.js +4 -2
  102. package/build-module/dataform-controls/utils/validated-number.js.map +2 -2
  103. package/build-module/dataform-layouts/panel/modal.js +14 -5
  104. package/build-module/dataform-layouts/panel/modal.js.map +2 -2
  105. package/build-module/dataviews-layouts/grid/composite-grid.js +40 -38
  106. package/build-module/dataviews-layouts/grid/composite-grid.js.map +3 -3
  107. package/build-module/dataviews-layouts/table/index.js +8 -3
  108. package/build-module/dataviews-layouts/table/index.js.map +2 -2
  109. package/build-module/field-types/array.js +17 -14
  110. package/build-module/field-types/array.js.map +2 -2
  111. package/build-module/field-types/boolean.js +13 -10
  112. package/build-module/field-types/boolean.js.map +2 -2
  113. package/build-module/field-types/color.js +14 -11
  114. package/build-module/field-types/color.js.map +2 -2
  115. package/build-module/field-types/date.js +11 -8
  116. package/build-module/field-types/date.js.map +2 -2
  117. package/build-module/field-types/datetime.js +7 -5
  118. package/build-module/field-types/datetime.js.map +2 -2
  119. package/build-module/field-types/email.js +20 -11
  120. package/build-module/field-types/email.js.map +2 -2
  121. package/build-module/field-types/index.js +12 -14
  122. package/build-module/field-types/index.js.map +2 -2
  123. package/build-module/field-types/integer.js +58 -13
  124. package/build-module/field-types/integer.js.map +2 -2
  125. package/build-module/field-types/media.js +5 -5
  126. package/build-module/field-types/media.js.map +2 -2
  127. package/build-module/field-types/no-type.js +10 -7
  128. package/build-module/field-types/no-type.js.map +2 -2
  129. package/build-module/field-types/number.js +47 -15
  130. package/build-module/field-types/number.js.map +2 -2
  131. package/build-module/field-types/password.js +13 -5
  132. package/build-module/field-types/password.js.map +2 -2
  133. package/build-module/field-types/telephone.js +13 -5
  134. package/build-module/field-types/telephone.js.map +2 -2
  135. package/build-module/field-types/text.js +13 -5
  136. package/build-module/field-types/text.js.map +2 -2
  137. package/build-module/field-types/url.js +13 -5
  138. package/build-module/field-types/url.js.map +2 -2
  139. package/build-module/field-types/utils/get-is-valid.js +68 -0
  140. package/build-module/field-types/utils/get-is-valid.js.map +7 -0
  141. package/build-module/field-types/utils/is-valid-elements.js +14 -0
  142. package/build-module/field-types/utils/is-valid-elements.js.map +7 -0
  143. package/build-module/field-types/utils/is-valid-max-length.js +15 -0
  144. package/build-module/field-types/utils/is-valid-max-length.js.map +7 -0
  145. package/build-module/field-types/utils/is-valid-max.js +15 -0
  146. package/build-module/field-types/utils/is-valid-max.js.map +7 -0
  147. package/build-module/field-types/utils/is-valid-min-length.js +15 -0
  148. package/build-module/field-types/utils/is-valid-min-length.js.map +7 -0
  149. package/build-module/field-types/utils/is-valid-min.js +15 -0
  150. package/build-module/field-types/utils/is-valid-min.js.map +7 -0
  151. package/build-module/field-types/utils/is-valid-pattern.js +20 -0
  152. package/build-module/field-types/utils/is-valid-pattern.js.map +7 -0
  153. package/build-module/field-types/utils/is-valid-required-for-array.js +11 -0
  154. package/build-module/field-types/utils/is-valid-required-for-array.js.map +7 -0
  155. package/build-module/field-types/utils/is-valid-required-for-bool.js +9 -0
  156. package/build-module/field-types/utils/is-valid-required-for-bool.js.map +7 -0
  157. package/build-module/field-types/utils/is-valid-required.js +9 -0
  158. package/build-module/field-types/utils/is-valid-required.js.map +7 -0
  159. package/build-module/hooks/use-form-validity.js +52 -102
  160. package/build-module/hooks/use-form-validity.js.map +2 -2
  161. package/build-module/utils/filter-sort-and-paginate.js +5 -0
  162. package/build-module/utils/filter-sort-and-paginate.js.map +2 -2
  163. package/build-module/utils/operators.js +394 -0
  164. package/build-module/utils/operators.js.map +7 -0
  165. package/build-style/style-rtl.css +13 -80
  166. package/build-style/style.css +13 -80
  167. package/build-types/components/dataviews-filters/filter.d.ts.map +1 -1
  168. package/build-types/components/dataviews-filters/input-widget.d.ts.map +1 -1
  169. package/build-types/components/dataviews-filters/use-filters.d.ts.map +1 -1
  170. package/build-types/constants.d.ts +6 -12
  171. package/build-types/constants.d.ts.map +1 -1
  172. package/build-types/dataform-controls/number.d.ts.map +1 -1
  173. package/build-types/dataform-controls/textarea.d.ts.map +1 -1
  174. package/build-types/dataform-controls/utils/get-custom-validity.d.ts +2 -2
  175. package/build-types/dataform-controls/utils/get-custom-validity.d.ts.map +1 -1
  176. package/build-types/dataform-controls/utils/validated-input.d.ts.map +1 -1
  177. package/build-types/dataform-controls/utils/validated-number.d.ts.map +1 -1
  178. package/build-types/dataform-layouts/panel/modal.d.ts.map +1 -1
  179. package/build-types/dataviews-layouts/grid/composite-grid.d.ts.map +1 -1
  180. package/build-types/dataviews-layouts/table/index.d.ts.map +1 -1
  181. package/build-types/field-types/array.d.ts +9 -2
  182. package/build-types/field-types/array.d.ts.map +1 -1
  183. package/build-types/field-types/boolean.d.ts +9 -2
  184. package/build-types/field-types/boolean.d.ts.map +1 -1
  185. package/build-types/field-types/color.d.ts +9 -2
  186. package/build-types/field-types/color.d.ts.map +1 -1
  187. package/build-types/field-types/date.d.ts +6 -4
  188. package/build-types/field-types/date.d.ts.map +1 -1
  189. package/build-types/field-types/datetime.d.ts +6 -4
  190. package/build-types/field-types/datetime.d.ts.map +1 -1
  191. package/build-types/field-types/email.d.ts +15 -2
  192. package/build-types/field-types/email.d.ts.map +1 -1
  193. package/build-types/field-types/index.d.ts.map +1 -1
  194. package/build-types/field-types/integer.d.ts +17 -4
  195. package/build-types/field-types/integer.d.ts.map +1 -1
  196. package/build-types/field-types/media.d.ts +1 -4
  197. package/build-types/field-types/media.d.ts.map +1 -1
  198. package/build-types/field-types/no-type.d.ts +6 -4
  199. package/build-types/field-types/no-type.d.ts.map +1 -1
  200. package/build-types/field-types/number.d.ts +17 -4
  201. package/build-types/field-types/number.d.ts.map +1 -1
  202. package/build-types/field-types/password.d.ts +12 -4
  203. package/build-types/field-types/password.d.ts.map +1 -1
  204. package/build-types/field-types/telephone.d.ts +12 -4
  205. package/build-types/field-types/telephone.d.ts.map +1 -1
  206. package/build-types/field-types/text.d.ts +12 -4
  207. package/build-types/field-types/text.d.ts.map +1 -1
  208. package/build-types/field-types/url.d.ts +12 -4
  209. package/build-types/field-types/url.d.ts.map +1 -1
  210. package/build-types/field-types/utils/get-is-valid.d.ts +7 -0
  211. package/build-types/field-types/utils/get-is-valid.d.ts.map +1 -0
  212. package/build-types/field-types/utils/is-valid-elements.d.ts +6 -0
  213. package/build-types/field-types/utils/is-valid-elements.d.ts.map +1 -0
  214. package/build-types/field-types/utils/is-valid-max-length.d.ts +6 -0
  215. package/build-types/field-types/utils/is-valid-max-length.d.ts.map +1 -0
  216. package/build-types/field-types/utils/is-valid-max.d.ts +6 -0
  217. package/build-types/field-types/utils/is-valid-max.d.ts.map +1 -0
  218. package/build-types/field-types/utils/is-valid-min-length.d.ts +6 -0
  219. package/build-types/field-types/utils/is-valid-min-length.d.ts.map +1 -0
  220. package/build-types/field-types/utils/is-valid-min.d.ts +6 -0
  221. package/build-types/field-types/utils/is-valid-min.d.ts.map +1 -0
  222. package/build-types/field-types/utils/is-valid-pattern.d.ts +6 -0
  223. package/build-types/field-types/utils/is-valid-pattern.d.ts.map +1 -0
  224. package/build-types/field-types/utils/is-valid-required-for-array.d.ts +6 -0
  225. package/build-types/field-types/utils/is-valid-required-for-array.d.ts.map +1 -0
  226. package/build-types/field-types/utils/is-valid-required-for-bool.d.ts +6 -0
  227. package/build-types/field-types/utils/is-valid-required-for-bool.d.ts.map +1 -0
  228. package/build-types/field-types/utils/is-valid-required.d.ts +6 -0
  229. package/build-types/field-types/utils/is-valid-required.d.ts.map +1 -0
  230. package/build-types/hooks/use-form-validity.d.ts.map +1 -1
  231. package/build-types/stories/dataform.story.d.ts +9 -1
  232. package/build-types/stories/dataform.story.d.ts.map +1 -1
  233. package/build-types/stories/dataviews-picker.story.d.ts.map +1 -1
  234. package/build-types/stories/dataviews.story.d.ts +27 -2
  235. package/build-types/stories/dataviews.story.d.ts.map +1 -1
  236. package/build-types/stories/field-types.story.d.ts +39 -2
  237. package/build-types/stories/field-types.story.d.ts.map +1 -1
  238. package/build-types/types/field-api.d.ts +72 -4
  239. package/build-types/types/field-api.d.ts.map +1 -1
  240. package/build-types/types/private.d.ts +13 -3
  241. package/build-types/types/private.d.ts.map +1 -1
  242. package/build-types/utils/filter-sort-and-paginate.d.ts.map +1 -1
  243. package/build-types/utils/operators.d.ts +16 -0
  244. package/build-types/utils/operators.d.ts.map +1 -0
  245. package/build-wp/index.js +1548 -1452
  246. package/package.json +17 -16
  247. package/src/components/dataviews/style.scss +3 -28
  248. package/src/components/dataviews-filters/filter.tsx +34 -321
  249. package/src/components/dataviews-filters/input-widget.tsx +7 -5
  250. package/src/components/dataviews-filters/use-filters.ts +6 -3
  251. package/src/components/dataviews-footer/style.scss +1 -7
  252. package/src/constants.ts +6 -140
  253. package/src/dataform-controls/number.tsx +3 -3
  254. package/src/dataform-controls/textarea.tsx +7 -1
  255. package/src/dataform-controls/utils/get-custom-validity.ts +10 -2
  256. package/src/dataform-controls/utils/validated-input.tsx +8 -2
  257. package/src/dataform-controls/utils/validated-number.tsx +3 -1
  258. package/src/dataform-layouts/panel/modal.tsx +14 -5
  259. package/src/dataviews-layouts/activity/style.scss +1 -1
  260. package/src/dataviews-layouts/grid/composite-grid.tsx +64 -57
  261. package/src/dataviews-layouts/grid/style.scss +3 -12
  262. package/src/dataviews-layouts/table/index.tsx +9 -3
  263. package/src/dataviews-layouts/table/style.scss +4 -15
  264. package/src/dataviews-layouts/utils/grid-items.scss +1 -9
  265. package/src/field-types/array.tsx +26 -19
  266. package/src/field-types/boolean.tsx +22 -15
  267. package/src/field-types/color.tsx +22 -15
  268. package/src/field-types/date.tsx +14 -11
  269. package/src/field-types/datetime.tsx +6 -4
  270. package/src/field-types/email.tsx +24 -15
  271. package/src/field-types/index.tsx +12 -14
  272. package/src/field-types/integer.tsx +83 -17
  273. package/src/field-types/media.tsx +4 -4
  274. package/src/field-types/no-type.tsx +9 -6
  275. package/src/field-types/number.tsx +82 -16
  276. package/src/field-types/password.tsx +12 -4
  277. package/src/field-types/telephone.tsx +12 -4
  278. package/src/field-types/text.tsx +12 -4
  279. package/src/field-types/url.tsx +12 -4
  280. package/src/field-types/utils/get-is-valid.ts +103 -0
  281. package/src/field-types/utils/is-valid-elements.ts +20 -0
  282. package/src/field-types/utils/is-valid-max-length.ts +23 -0
  283. package/src/field-types/utils/is-valid-max.ts +23 -0
  284. package/src/field-types/utils/is-valid-min-length.ts +23 -0
  285. package/src/field-types/utils/is-valid-min.ts +23 -0
  286. package/src/field-types/utils/is-valid-pattern.ts +29 -0
  287. package/src/field-types/utils/is-valid-required-for-array.ts +18 -0
  288. package/src/field-types/utils/is-valid-required-for-bool.ts +13 -0
  289. package/src/field-types/utils/is-valid-required.ts +13 -0
  290. package/src/hooks/use-form-validity.ts +78 -156
  291. package/src/stories/dataform.story.tsx +126 -30
  292. package/src/stories/dataviews-picker.story.tsx +27 -17
  293. package/src/stories/dataviews.story.tsx +79 -30
  294. package/src/stories/field-types.story.tsx +86 -4
  295. package/src/test/filter-sort-and-paginate.js +2 -1
  296. package/src/test/normalize-fields.ts +87 -11
  297. package/src/test/use-form-validity.ts +796 -31
  298. package/src/types/field-api.ts +90 -4
  299. package/src/types/private.ts +26 -8
  300. package/src/utils/filter-sort-and-paginate.ts +5 -0
  301. package/src/utils/operators.tsx +448 -0
  302. package/tsconfig.json +1 -0
  303. package/tsconfig.tsbuildinfo +1 -1
@@ -101,7 +101,7 @@
101
101
  .dataviews__view-actions,
102
102
  .dataviews-filters__container {
103
103
  box-sizing: border-box;
104
- padding: 16px 48px;
104
+ padding: 16px 24px;
105
105
  flex-shrink: 0;
106
106
  position: sticky;
107
107
  left: 0;
@@ -116,7 +116,7 @@
116
116
 
117
117
  .dataviews-no-results,
118
118
  .dataviews-loading {
119
- padding: 0 48px;
119
+ padding: 0 24px;
120
120
  flex-grow: 1;
121
121
  display: flex;
122
122
  align-items: center;
@@ -138,11 +138,6 @@
138
138
  .dataviews-filters__container {
139
139
  padding: 12px 24px;
140
140
  }
141
- .dataviews-no-results,
142
- .dataviews-loading {
143
- padding-left: 24px;
144
- padding-right: 24px;
145
- }
146
141
  }
147
142
  .dataviews-title-field {
148
143
  font-size: 13px;
@@ -197,39 +192,13 @@
197
192
  }
198
193
 
199
194
  /**
200
- * Applying a consistent 24px padding when DataViews are placed within cards.
195
+ * When DataViews are placed within cards, apply a consistent top padding.
201
196
  */
202
197
  .components-card__body:has(> .dataviews-wrapper),
203
198
  .components-card__body:has(> .dataviews-picker-wrapper) {
204
199
  padding: 8px 0 0;
205
200
  overflow: hidden;
206
201
  }
207
- .components-card__body:has(> .dataviews-wrapper) .dataviews__view-actions,
208
- .components-card__body:has(> .dataviews-wrapper) .dataviews-filters__container,
209
- .components-card__body:has(> .dataviews-wrapper) .dataviews-footer,
210
- .components-card__body:has(> .dataviews-wrapper) .dataviews-view-grid,
211
- .components-card__body:has(> .dataviews-wrapper) .dataviews-loading,
212
- .components-card__body:has(> .dataviews-wrapper) .dataviews-no-results,
213
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews__view-actions,
214
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-filters__container,
215
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-footer,
216
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-view-grid,
217
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-loading,
218
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-no-results {
219
- padding-inline: 24px;
220
- }
221
- .components-card__body:has(> .dataviews-wrapper) .dataviews-view-table tr td:first-child,
222
- .components-card__body:has(> .dataviews-wrapper) .dataviews-view-table tr th:first-child,
223
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,
224
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-view-table tr th:first-child {
225
- padding-inline-start: 24px;
226
- }
227
- .components-card__body:has(> .dataviews-wrapper) .dataviews-view-table tr td:last-child,
228
- .components-card__body:has(> .dataviews-wrapper) .dataviews-view-table tr th:last-child,
229
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,
230
- .components-card__body:has(> .dataviews-picker-wrapper) .dataviews-view-table tr th:last-child {
231
- padding-inline-end: 24px;
232
- }
233
202
 
234
203
  .dataviews-bulk-actions-footer__item-count {
235
204
  color: #1e1e1e;
@@ -767,7 +736,7 @@
767
736
  bottom: 0;
768
737
  left: 0;
769
738
  background-color: inherit;
770
- padding: 12px 48px;
739
+ padding: 12px 24px;
771
740
  border-top: 1px solid #f0f0f0;
772
741
  flex-shrink: 0;
773
742
  }
@@ -780,11 +749,6 @@
780
749
  z-index: 2;
781
750
  }
782
751
 
783
- @container (max-width: 430px) {
784
- .dataviews-footer {
785
- padding: 12px 24px;
786
- }
787
- }
788
752
  @container (max-width: 560px) {
789
753
  .dataviews-footer {
790
754
  flex-direction: column !important;
@@ -907,18 +871,8 @@
907
871
  gap: 32px;
908
872
  grid-template-rows: max-content;
909
873
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
910
- padding: 0 48px 24px;
874
+ padding: 0 24px 24px;
911
875
  container-type: inline-size;
912
- /**
913
- * Breakpoints were adjusted from media queries breakpoints to account for
914
- * the sidebar width. This was done to match the existing styles we had.
915
- */
916
- }
917
- @container (max-width: 430px) {
918
- .dataviews-view-grid-items {
919
- padding-left: 24px;
920
- padding-right: 24px;
921
- }
922
876
  }
923
877
  @media not (prefers-reduced-motion) {
924
878
  .dataviews-view-grid-items {
@@ -927,23 +881,18 @@
927
881
  }
928
882
 
929
883
  .dataviews-view-grid {
930
- padding: 0 48px 24px;
884
+ padding: 0 24px 24px;
931
885
  display: flex;
932
886
  flex-direction: column;
933
887
  gap: 32px;
934
888
  container-type: inline-size;
889
+ margin-bottom: auto;
935
890
  }
936
891
  @media not (prefers-reduced-motion) {
937
892
  .dataviews-view-grid {
938
893
  transition: padding ease-out 0.1s;
939
894
  }
940
895
  }
941
- @container (max-width: 430px) {
942
- .dataviews-view-grid {
943
- padding-left: 24px;
944
- padding-right: 24px;
945
- }
946
- }
947
896
  .dataviews-view-grid .dataviews-view-grid__row {
948
897
  display: grid;
949
898
  gap: 32px;
@@ -1122,15 +1071,9 @@
1122
1071
  font-weight: 499;
1123
1072
  color: #1e1e1e;
1124
1073
  margin: 0 0 8px 0;
1125
- padding: 0 48px;
1074
+ padding: 0 24px;
1126
1075
  container-type: inline-size;
1127
1076
  }
1128
- @container (max-width: 430px) {
1129
- .dataviews-view-grid__group-header {
1130
- padding-left: 24px;
1131
- padding-right: 24px;
1132
- }
1133
- }
1134
1077
 
1135
1078
  div.dataviews-view-list {
1136
1079
  list-style-type: none;
@@ -1383,11 +1326,11 @@ div.dataviews-view-list {
1383
1326
  }
1384
1327
  .dataviews-view-table tr td:first-child,
1385
1328
  .dataviews-view-table tr th:first-child {
1386
- padding-left: 48px;
1329
+ padding-left: 24px;
1387
1330
  }
1388
1331
  .dataviews-view-table tr td:last-child,
1389
1332
  .dataviews-view-table tr th:last-child {
1390
- padding-right: 48px;
1333
+ padding-right: 24px;
1391
1334
  }
1392
1335
  .dataviews-view-table tr:last-child {
1393
1336
  border-bottom: 0;
@@ -1518,16 +1461,6 @@ div.dataviews-view-list {
1518
1461
  padding-right: 0;
1519
1462
  }
1520
1463
 
1521
- @container (max-width: 430px) {
1522
- .dataviews-view-table tr td:first-child,
1523
- .dataviews-view-table tr th:first-child {
1524
- padding-left: 24px;
1525
- }
1526
- .dataviews-view-table tr td:last-child,
1527
- .dataviews-view-table tr th:last-child {
1528
- padding-right: 24px;
1529
- }
1530
- }
1531
1464
  .dataviews-view-table-selection-checkbox {
1532
1465
  --checkbox-input-size: 24px;
1533
1466
  }
@@ -1569,12 +1502,12 @@ div.dataviews-view-list {
1569
1502
 
1570
1503
  .dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell {
1571
1504
  font-weight: 499;
1572
- padding: 12px 48px;
1505
+ padding: 12px 24px;
1573
1506
  color: #1e1e1e;
1574
1507
  }
1575
1508
 
1576
1509
  /* Column width intents via colgroup: make non-primary columns shrink-to-fit */
1577
- .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary) {
1510
+ .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-first-data) {
1578
1511
  width: 1%;
1579
1512
  }
1580
1513
 
@@ -1743,7 +1676,7 @@ div.dataviews-view-list {
1743
1676
 
1744
1677
  .dataviews-view-activity {
1745
1678
  margin: 0 0 auto;
1746
- padding: 8px 48px;
1679
+ padding: 8px 24px;
1747
1680
  }
1748
1681
  .dataviews-view-activity .dataviews-view-activity__group-header {
1749
1682
  font-size: 15px;
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/filter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiDvC,OAAO,KAAK,EAEX,eAAe,EAEf,gBAAgB,EAGhB,IAAI,EACJ,MAAM,aAAa,CAAC;AAarB,UAAU,qBAAqB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAED,UAAU,WAAY,SAAQ,qBAAqB;IAClD,YAAY,EAAE,SAAS,CAAE,iBAAiB,CAAE,CAAC;IAC7C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAoYD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,EAC/B,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,GAAG,WAAW,EACd,EAAE,WAAW,+BA0Kb"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/filter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBvC,OAAO,KAAK,EAEX,eAAe,EAIf,gBAAgB,EAGhB,IAAI,EACJ,MAAM,aAAa,CAAC;AAerB,UAAU,qBAAqB;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAED,UAAU,WAAY,SAAQ,qBAAqB;IAClD,YAAY,EAAE,SAAS,CAAE,iBAAiB,CAAE,CAAC;IAC7C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAmHD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,EAC/B,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,GAAG,WAAW,EACd,EAAE,WAAW,+BAgLb"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/input-widget.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG3E,UAAU,oBAAoB;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,GACN,EAAE,oBAAoB,sCAyGtB"}
1
+ {"version":3,"file":"input-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/input-widget.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EACX,IAAI,EACJ,gBAAgB,EAChB,eAAe,EAEf,MAAM,aAAa,CAAC;AAGrB,UAAU,oBAAoB;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,GACN,EAAE,oBAAoB,sCAsGtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-filters.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/use-filters.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE3E,iBAAS,UAAU,CAAE,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,EAAE,IAAI,EAAE,IAAI,sBA6DhE;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"use-filters.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/use-filters.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE3E,iBAAS,UAAU,CAAE,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,EAAE,IAAI,EAAE,IAAI,sBA6DhE;AAED,eAAe,UAAU,CAAC"}
@@ -1,13 +1,16 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Operator, DayNumber } from './types';
5
- export declare const OPERATOR_IS = "is";
6
- export declare const OPERATOR_IS_NOT = "isNot";
4
+ import type { DayNumber } from './types';
7
5
  export declare const OPERATOR_IS_ANY = "isAny";
8
6
  export declare const OPERATOR_IS_NONE = "isNone";
9
7
  export declare const OPERATOR_IS_ALL = "isAll";
10
8
  export declare const OPERATOR_IS_NOT_ALL = "isNotAll";
9
+ export declare const OPERATOR_BETWEEN = "between";
10
+ export declare const OPERATOR_IN_THE_PAST = "inThePast";
11
+ export declare const OPERATOR_OVER = "over";
12
+ export declare const OPERATOR_IS = "is";
13
+ export declare const OPERATOR_IS_NOT = "isNot";
11
14
  export declare const OPERATOR_LESS_THAN = "lessThan";
12
15
  export declare const OPERATOR_GREATER_THAN = "greaterThan";
13
16
  export declare const OPERATOR_LESS_THAN_OR_EQUAL = "lessThanOrEqual";
@@ -19,17 +22,8 @@ export declare const OPERATOR_AFTER_INC = "afterInc";
19
22
  export declare const OPERATOR_CONTAINS = "contains";
20
23
  export declare const OPERATOR_NOT_CONTAINS = "notContains";
21
24
  export declare const OPERATOR_STARTS_WITH = "startsWith";
22
- export declare const OPERATOR_BETWEEN = "between";
23
25
  export declare const OPERATOR_ON = "on";
24
26
  export declare const OPERATOR_NOT_ON = "notOn";
25
- export declare const OPERATOR_IN_THE_PAST = "inThePast";
26
- export declare const OPERATOR_OVER = "over";
27
- export declare const ALL_OPERATORS: Operator[];
28
- export declare const SINGLE_SELECTION_OPERATORS: Operator[];
29
- export declare const OPERATORS: Record<Operator, {
30
- key: string;
31
- label: string;
32
- }>;
33
27
  export declare const SORTING_DIRECTIONS: readonly ["asc", "desc"];
34
28
  export declare const sortArrows: {
35
29
  asc: string;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGnD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAC5C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,eAAO,MAAM,aAAa,EAAE,QAAQ,EAuBnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,EAgBhD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAE,QAAQ,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAyFvE,CAAC;AAEF,eAAO,MAAM,kBAAkB,0BAA6B,CAAC;AAC7D,eAAO,MAAM,UAAU;;;CAA0B,CAAC;AAClD,eAAO,MAAM,UAAU;;;CAAoD,CAAC;AAC5E,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AACF,eAAO,MAAM,SAAS;;;CAGrB,CAAC;AAGF,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,SAAS,EAA4B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAC5C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC,eAAO,MAAM,kBAAkB,0BAA6B,CAAC;AAC7D,eAAO,MAAM,UAAU;;;CAA0B,CAAC;AAClD,eAAO,MAAM,UAAU;;;CAAoD,CAAC;AAC5E,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AACF,eAAO,MAAM,SAAS;;;CAGrB,CAAC;AAGF,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,eAAe,aAAa,CAAC;AAG1C,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,SAAS,EAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/number.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,IAAI,EAAI,KAAK,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAG1E"}
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/number.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAgB,MAAM,UAAU,CAAC;AAGnE,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,IAAI,EAAI,KAAK,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAG1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/textarea.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAMrD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACR,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BA0B9B"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/textarea.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAMrD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACR,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAgC9B"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Rules, FieldValidity } from '../../types';
5
- export default function getCustomValidity<Item>(isValid: Rules<Item>, validity: FieldValidity | undefined): {
4
+ import type { NormalizedRules, FieldValidity } from '../../types';
5
+ export default function getCustomValidity<Item>(isValid: NormalizedRules<Item>, validity: FieldValidity | undefined): {
6
6
  type: "valid" | "invalid" | "validating";
7
7
  message?: string;
8
8
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"get-custom-validity.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/get-custom-validity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,IAAI,EAC9C,OAAO,EAAE,KAAK,CAAE,IAAI,CAAE,EACtB,QAAQ,EAAE,aAAa,GAAG,SAAS;;;cAkBnC"}
1
+ {"version":3,"file":"get-custom-validity.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/get-custom-validity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,IAAI,EAC9C,OAAO,EAAE,eAAe,CAAE,IAAI,CAAE,EAChC,QAAQ,EAAE,aAAa,GAAG,SAAS;;;cA0BnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validated-input.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/validated-input.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMxD,MAAM,MAAM,iCAAiC,CAAE,IAAI,IAClD,oBAAoB,CAAE,IAAI,CAAE,GAAG;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC5B,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAI,EAC9C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,GACR,EAAE,iCAAiC,CAAE,IAAI,CAAE,+BAiC3C"}
1
+ {"version":3,"file":"validated-input.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/validated-input.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMxD,MAAM,MAAM,iCAAiC,CAAE,IAAI,IAClD,oBAAoB,CAAE,IAAI,CAAE,GAAG;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC5B,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAI,EAC9C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,GACR,EAAE,iCAAiC,CAAE,IAAI,CAAE,+BAuC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"validated-number.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/validated-number.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsExD,MAAM,MAAM,mCAAmC,CAAE,IAAI,IACpD,oBAAoB,CAAE,IAAI,CAAE,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,IAAI,EAAI,EAChD,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACR,EAAE,mCAAmC,CAAE,IAAI,CAAE,+BAoE7C"}
1
+ {"version":3,"file":"validated-number.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/validated-number.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsExD,MAAM,MAAM,mCAAmC,CAAE,IAAI,IACpD,oBAAoB,CAAE,IAAI,CAAE,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,IAAI,EAAI,EAChD,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACR,EAAE,mCAAmC,CAAE,IAAI,CAAE,+BAsE7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/dataform-layouts/panel/modal.tsx"],"names":[],"mappings":"AAkBA;;GAEG;AACH,OAAO,KAAK,EAGX,mBAAmB,EACnB,eAAe,EACf,MAAM,aAAa,CAAC;AA+GrB,iBAAS,UAAU,CAAE,IAAI,EAAI,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,aAAa,EACb,aAAa,EACb,eAAe,GACf,EAAE;IACF,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;CACzC,+BA2BA;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/dataform-layouts/panel/modal.tsx"],"names":[],"mappings":"AAkBA;;GAEG;AACH,OAAO,KAAK,EAGX,mBAAmB,EACnB,eAAe,EACf,MAAM,aAAa,CAAC;AAwHrB,iBAAS,UAAU,CAAE,IAAI,EAAI,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,aAAa,EACb,aAAa,EACb,eAAe,GACf,EAAE;IACF,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;CACzC,+BA2BA;AAED,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"composite-grid.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/grid/composite-grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA8B1D,OAAO,KAAK,EACX,MAAM,EACN,eAAe,EACf,QAAQ,IAAI,YAAY,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA2OxD,UAAU,kBAAkB,CAAE,IAAI;IACjC,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,YAAY,CAAC;IAChC,WAAW,CAAC,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,eAAe,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,OAAO,CAAC;IAC3C,cAAc,CAAC,EAAE,CAChB,KAAK,EAAE;QACN,IAAI,EAAE,IAAI,CAAC;KACX,GAAG,cAAc,CAAE,GAAG,CAAE,KACrB,YAAY,CAAC;IAClB,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAI,EAC9C,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,OAAO,GACP,EAAE,kBAAkB,CAAE,IAAI,CAAE,+BAkI5B"}
1
+ {"version":3,"file":"composite-grid.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/grid/composite-grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAkB,MAAM,OAAO,CAAC;AA8B1E,OAAO,KAAK,EACX,MAAM,EACN,eAAe,EACf,QAAQ,IAAI,YAAY,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA0PxD,UAAU,kBAAkB,CAAE,IAAI;IACjC,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,YAAY,CAAC;IAChC,WAAW,CAAC,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,eAAe,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,OAAO,CAAC;IAC3C,cAAc,CAAC,EAAE,CAChB,KAAK,EAAE;QACN,IAAI,EAAE,IAAI,CAAC;KACX,GAAG,cAAc,CAAE,GAAG,CAAE,KACrB,YAAY,CAAC;IAClB,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAI,EAC9C,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,OAAO,GACP,EAAE,kBAAkB,CAAE,IAAI,CAAE,+BA0H5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAIX,cAAc,EACd,MAAM,aAAa,CAAC;AA4OrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,EACd,IAAI,EACJ,SAAS,EACT,KAAK,GACL,EAAE,cAAc,CAAE,IAAI,CAAE,2CAkWxB;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAIX,cAAc,EACd,MAAM,aAAa,CAAC;AA4OrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,EACd,IAAI,EACJ,SAAS,EACT,KAAK,GACL,EAAE,cAAc,CAAE,IAAI,CAAE,2CAwWxB;AAED,eAAe,SAAS,CAAC"}
@@ -1,19 +1,26 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { DataViewRenderFieldProps, Rules, SortDirection } from '../types';
4
+ import type { DataViewRenderFieldProps, NormalizedField, SortDirection } from '../types';
5
+ import isValidRequiredForArray from './utils/is-valid-required-for-array';
6
+ import isValidElements from './utils/is-valid-elements';
5
7
  declare function render({ item, field }: DataViewRenderFieldProps<any>): any;
8
+ declare function isValidCustom<Item>(item: Item, field: NormalizedField<Item>): import("@wordpress/i18n").TranslatableText<"Value must be an array."> | import("@wordpress/i18n").TranslatableText<"Every value must be a string."> | null;
6
9
  declare const _default: {
7
10
  type: "array";
8
11
  render: typeof render;
9
12
  Edit: string;
10
13
  sort: (a: any, b: any, direction: SortDirection) => number;
11
- isValid: Rules<any>;
12
14
  enableSorting: true;
13
15
  enableGlobalSearch: false;
14
16
  defaultOperators: ("isAny" | "isNone")[];
15
17
  validOperators: ("isAny" | "isNone" | "isAll" | "isNotAll")[];
16
18
  getFormat: () => {};
19
+ validate: {
20
+ required: typeof isValidRequiredForArray;
21
+ elements: typeof isValidElements;
22
+ custom: typeof isValidCustom;
23
+ };
17
24
  };
18
25
  export default _default;
19
26
  //# sourceMappingURL=array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/field-types/array.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAS/E,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,OAGhE;;;;;cAuBiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;AAiBvD,wBAgB6B"}
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/field-types/array.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,MAAM,UAAU,CAAC;AAQlB,OAAO,uBAAuB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,OAGhE;AAED,iBAAS,aAAa,CAAE,IAAI,EAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,8JAgBzE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;;AAiBvD,wBAoB6B"}
@@ -1,14 +1,21 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { DataViewRenderFieldProps, Rules, SortDirection } from '../types';
4
+ import type { DataViewRenderFieldProps, NormalizedField, SortDirection } from '../types';
5
+ import isValidElements from './utils/is-valid-elements';
6
+ import isValidRequiredForBool from './utils/is-valid-required-for-bool';
5
7
  declare function render({ item, field }: DataViewRenderFieldProps<any>): import("react").JSX.Element | import("@wordpress/i18n").TranslatableText<"True"> | import("@wordpress/i18n").TranslatableText<"False"> | null;
8
+ declare function isValidCustom<Item>(item: Item, field: NormalizedField<Item>): import("@wordpress/i18n").TranslatableText<"Value must be true, false, or undefined"> | null;
6
9
  declare const _default: {
7
10
  type: "boolean";
8
11
  render: typeof render;
9
12
  Edit: string;
10
13
  sort: (a: any, b: any, direction: SortDirection) => 0 | 1 | -1;
11
- isValid: Rules<any>;
14
+ validate: {
15
+ required: typeof isValidRequiredForBool;
16
+ elements: typeof isValidElements;
17
+ custom: typeof isValidCustom;
18
+ };
12
19
  enableSorting: true;
13
20
  enableGlobalSearch: false;
14
21
  defaultOperators: ("is" | "isNot")[];
@@ -1 +1 @@
1
- {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/field-types/boolean.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK/E,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,iJAchE;;;;;cAkBiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;AAiBvD,wBAW6B"}
1
+ {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/field-types/boolean.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,MAAM,UAAU,CAAC;AAIlB,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAExE,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,iJAchE;AAED,iBAAS,aAAa,CAAE,IAAI,EAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,gGAWzE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;;AAiBvD,wBAe6B"}
@@ -1,19 +1,26 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { DataViewRenderFieldProps, Rules, SortDirection } from '../types';
4
+ import type { DataViewRenderFieldProps, NormalizedField, SortDirection } from '../types';
5
+ import isValidElements from './utils/is-valid-elements';
6
+ import isValidRequired from './utils/is-valid-required';
5
7
  declare function render({ item, field }: DataViewRenderFieldProps<any>): any;
8
+ declare function isValidCustom<Item>(item: Item, field: NormalizedField<Item>): import("@wordpress/i18n").TranslatableText<"Value must be a valid color."> | null;
6
9
  declare const _default: {
7
10
  type: "color";
8
11
  render: typeof render;
9
12
  Edit: string;
10
13
  sort: (a: any, b: any, direction: SortDirection) => number;
11
- isValid: Rules<any>;
12
14
  enableSorting: true;
13
15
  enableGlobalSearch: false;
14
16
  defaultOperators: ("isAny" | "isNone")[];
15
17
  validOperators: ("is" | "isNot" | "isAny" | "isNone")[];
16
18
  getFormat: () => {};
19
+ validate: {
20
+ required: typeof isValidRequired;
21
+ elements: typeof isValidElements;
22
+ custom: typeof isValidCustom;
23
+ };
17
24
  };
18
25
  export default _default;
19
26
  //# sourceMappingURL=color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/field-types/color.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAU/E,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,OA2BhE;;;;;cAkBiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;AA4BvD,wBAgB6B"}
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/field-types/color.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,MAAM,UAAU,CAAC;AASlB,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,OA2BhE;AAED,iBAAS,aAAa,CAAE,IAAI,EAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,qFAWzE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;;AA4BvD,wBAoB6B"}
@@ -2,6 +2,8 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import type { DataViewRenderFieldProps, Field, FormatDate, SortDirection } from '../types';
5
+ import isValidElements from './utils/is-valid-elements';
6
+ import isValidRequired from './utils/is-valid-required';
5
7
  declare function getFormat<Item>(field: Field<Item>): Required<FormatDate>;
6
8
  declare function render({ item, field }: DataViewRenderFieldProps<any>): string | import("react").JSX.Element;
7
9
  declare const _default: {
@@ -9,15 +11,15 @@ declare const _default: {
9
11
  render: typeof render;
10
12
  Edit: string;
11
13
  sort: (a: any, b: any, direction: SortDirection) => number;
12
- isValid: {
13
- elements: true;
14
- custom: () => null;
15
- };
16
14
  enableSorting: true;
17
15
  enableGlobalSearch: false;
18
16
  defaultOperators: ("over" | "after" | "on" | "before" | "beforeInc" | "afterInc" | "between" | "notOn" | "inThePast")[];
19
17
  validOperators: ("over" | "after" | "on" | "before" | "beforeInc" | "afterInc" | "between" | "notOn" | "inThePast")[];
20
18
  getFormat: typeof getFormat;
19
+ validate: {
20
+ required: typeof isValidRequired;
21
+ elements: typeof isValidElements;
22
+ };
21
23
  };
22
24
  export default _default;
23
25
  //# sourceMappingURL=date.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/field-types/date.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,KAAK,EACL,UAAU,EACV,aAAa,EACb,MAAM,UAAU,CAAC;AAgBlB,iBAAS,SAAS,CAAE,IAAI,EAAI,KAAK,EAAE,KAAK,CAAE,IAAI,CAAE,GAAI,QAAQ,CAAE,UAAU,CAAE,CAazE;AAED,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,wCAuBhE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;AAOvD,wBAkC6B"}
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/field-types/date.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,KAAK,EACL,UAAU,EACV,aAAa,EACb,MAAM,UAAU,CAAC;AAGlB,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAaxD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,iBAAS,SAAS,CAAE,IAAI,EAAI,KAAK,EAAE,KAAK,CAAE,IAAI,CAAE,GAAI,QAAQ,CAAE,UAAU,CAAE,CAczE;AAED,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,wCAuBhE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;AAOvD,wBAkC6B"}
@@ -2,21 +2,23 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import type { DataViewRenderFieldProps, SortDirection } from '../types';
5
+ import isValidElements from './utils/is-valid-elements';
6
+ import isValidRequired from './utils/is-valid-required';
5
7
  declare function render({ item, field }: DataViewRenderFieldProps<any>): string | import("react").JSX.Element | null | undefined;
6
8
  declare const _default: {
7
9
  type: "datetime";
8
10
  render: typeof render;
9
11
  Edit: string;
10
12
  sort: (a: any, b: any, direction: SortDirection) => number;
11
- isValid: {
12
- elements: true;
13
- custom: () => null;
14
- };
15
13
  enableSorting: true;
16
14
  enableGlobalSearch: false;
17
15
  defaultOperators: ("over" | "after" | "on" | "before" | "beforeInc" | "afterInc" | "notOn" | "inThePast")[];
18
16
  validOperators: ("over" | "after" | "on" | "before" | "beforeInc" | "afterInc" | "notOn" | "inThePast")[];
19
17
  getFormat: () => {};
18
+ validate: {
19
+ required: typeof isValidRequired;
20
+ elements: typeof isValidElements;
21
+ };
20
22
  };
21
23
  export default _default;
22
24
  //# sourceMappingURL=datetime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/field-types/datetime.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAexE,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,2DAgBhE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;AAOvD,wBAgC6B"}
1
+ {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/field-types/datetime.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIxE,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAWxD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,2DAgBhE;;;;;cAEiB,GAAG,KAAK,GAAG,aAAa,aAAa;;;;;;;;;;;AAOvD,wBAgC6B"}
@@ -1,19 +1,32 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Rules } from '../types';
4
+ import type { NormalizedField } from '../types';
5
5
  import render from './utils/render-default';
6
+ import isValidRequired from './utils/is-valid-required';
7
+ import isValidMinLength from './utils/is-valid-min-length';
8
+ import isValidMaxLength from './utils/is-valid-max-length';
9
+ import isValidPattern from './utils/is-valid-pattern';
10
+ import isValidElements from './utils/is-valid-elements';
11
+ declare function isValidCustom<Item>(item: Item, field: NormalizedField<Item>): import("@wordpress/i18n").TranslatableText<"Value must be a valid email address."> | null;
6
12
  declare const _default: {
7
13
  type: "email";
8
14
  render: typeof render;
9
15
  Edit: string;
10
16
  sort: (a: any, b: any, direction: import("../types").SortDirection) => any;
11
- isValid: Rules<any>;
12
17
  enableSorting: true;
13
18
  enableGlobalSearch: false;
14
19
  defaultOperators: ("isAny" | "isNone")[];
15
20
  validOperators: ("is" | "startsWith" | "isNot" | "isAny" | "isNone" | "isAll" | "isNotAll" | "contains" | "notContains")[];
16
21
  getFormat: () => {};
22
+ validate: {
23
+ required: typeof isValidRequired;
24
+ pattern: typeof isValidPattern;
25
+ minLength: typeof isValidMinLength;
26
+ maxLength: typeof isValidMaxLength;
27
+ elements: typeof isValidElements;
28
+ custom: typeof isValidCustom;
29
+ };
17
30
  };
18
31
  export default _default;
19
32
  //# sourceMappingURL=email.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/field-types/email.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAatC,OAAO,MAAM,MAAM,wBAAwB,CAAC;;;;;;;;;;;;;AAwB5C,wBAsB6B"}
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/field-types/email.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAahD,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAE5C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAOxD,iBAAS,aAAa,CAAE,IAAI,EAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,6FAWzE;;;;;;;;;;;;;;;;;;;;AAED,wBA6B6B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field-types/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,KAAK,EAEL,eAAe,EAEf,MAAM,UAAU,CAAC;AAsDlB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,IAAI,EAC5C,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CA+C3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field-types/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACX,KAAK,EAEL,eAAe,EAEf,MAAM,UAAU,CAAC;AAuDlB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,IAAI,EAC5C,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CA4C3B"}
@@ -1,19 +1,32 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Rules } from '../types';
5
- import render from './utils/render-default';
4
+ import type { DataViewRenderFieldProps, Field, FormatInteger, NormalizedField } from '../types';
5
+ import isValidRequired from './utils/is-valid-required';
6
+ import isValidMin from './utils/is-valid-min';
7
+ import isValidMax from './utils/is-valid-max';
8
+ import isValidElements from './utils/is-valid-elements';
9
+ declare function getFormat<Item>(field: Field<Item>): Required<FormatInteger>;
10
+ export declare function formatInteger(value: number, format: Required<FormatInteger>): string;
11
+ declare function render({ item, field }: DataViewRenderFieldProps<any>): string | import("react").JSX.Element;
12
+ declare function isValidCustom<Item>(item: Item, field: NormalizedField<Item>): import("@wordpress/i18n").TranslatableText<"Value must be an integer."> | null;
6
13
  declare const _default: {
7
14
  type: "integer";
8
15
  render: typeof render;
9
16
  Edit: string;
10
17
  sort: (a: any, b: any, direction: import("../types").SortDirection) => number;
11
- isValid: Rules<any>;
12
18
  enableSorting: true;
13
19
  enableGlobalSearch: false;
14
20
  defaultOperators: ("is" | "isNot" | "lessThan" | "greaterThan" | "lessThanOrEqual" | "greaterThanOrEqual" | "between")[];
15
21
  validOperators: ("is" | "isNot" | "isAny" | "isNone" | "isAll" | "isNotAll" | "lessThan" | "greaterThan" | "lessThanOrEqual" | "greaterThanOrEqual" | "between")[];
16
- getFormat: () => {};
22
+ getFormat: typeof getFormat;
23
+ validate: {
24
+ required: typeof isValidRequired;
25
+ min: typeof isValidMin;
26
+ max: typeof isValidMax;
27
+ elements: typeof isValidElements;
28
+ custom: typeof isValidCustom;
29
+ };
17
30
  };
18
31
  export default _default;
19
32
  //# sourceMappingURL=integer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../src/field-types/integer.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAetC,OAAO,MAAM,MAAM,wBAAwB,CAAC;;;;;;;;;;;;;AAkB5C,wBAiC6B"}
1
+ {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../src/field-types/integer.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,KAAK,EACL,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAiBlB,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,iBAAS,SAAS,CAAE,IAAI,EAAI,KAAK,EAAE,KAAK,CAAE,IAAI,CAAE,GAAI,QAAQ,CAAE,aAAa,CAAE,CAS5E;AAED,wBAAgB,aAAa,CAC5B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,QAAQ,CAAE,aAAa,CAAE,GAC/B,MAAM,CAcR;AAED,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAE,GAAG,CAAE,wCAuBhE;AAED,iBAAS,aAAa,CAAE,IAAI,EAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,kFASzE;;;;;;;;;;;;;;;;;;;AAED,wBAuC6B"}
@@ -3,15 +3,12 @@ declare const _default: {
3
3
  render: () => null;
4
4
  Edit: null;
5
5
  sort: () => number;
6
- isValid: {
7
- elements: true;
8
- custom: () => null;
9
- };
10
6
  enableSorting: false;
11
7
  enableGlobalSearch: false;
12
8
  defaultOperators: never[];
13
9
  validOperators: never[];
14
10
  getFormat: () => {};
11
+ validate: {};
15
12
  };
16
13
  export default _default;
17
14
  //# sourceMappingURL=media.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/field-types/media.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,wBAc6B"}
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/field-types/media.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAKA,wBAc6B"}