@wordpress/dataviews 9.0.1-next.a730c9c8c.0 → 9.1.1-next.233ccab9b.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 (100) hide show
  1. package/CHANGELOG.md +19 -3
  2. package/README.md +4 -2
  3. package/build/components/dataviews/index.js +4 -6
  4. package/build/components/dataviews/index.js.map +1 -1
  5. package/build/components/dataviews-filters/filters-toggled.js +32 -0
  6. package/build/components/dataviews-filters/filters-toggled.js.map +1 -0
  7. package/build/components/dataviews-filters/filters.js +73 -0
  8. package/build/components/dataviews-filters/filters.js.map +1 -0
  9. package/build/components/dataviews-filters/index.js +26 -190
  10. package/build/components/dataviews-filters/index.js.map +1 -1
  11. package/build/components/dataviews-filters/toggle.js +99 -0
  12. package/build/components/dataviews-filters/toggle.js.map +1 -0
  13. package/build/components/dataviews-filters/use-filters.js +63 -0
  14. package/build/components/dataviews-filters/use-filters.js.map +1 -0
  15. package/build/components/dataviews-picker/index.js +4 -6
  16. package/build/components/dataviews-picker/index.js.map +1 -1
  17. package/build/components/dataviews-view-config/index.js +22 -3
  18. package/build/components/dataviews-view-config/index.js.map +1 -1
  19. package/build/dataform-controls/array.js +110 -24
  20. package/build/dataform-controls/array.js.map +1 -1
  21. package/build/dataviews-layouts/picker-grid/index.js +4 -1
  22. package/build/dataviews-layouts/picker-grid/index.js.map +1 -1
  23. package/build/field-types/array.js +0 -6
  24. package/build/field-types/array.js.map +1 -1
  25. package/build/index.js +7 -0
  26. package/build/index.js.map +1 -1
  27. package/build/types.js.map +1 -1
  28. package/build/validation.js +18 -1
  29. package/build/validation.js.map +1 -1
  30. package/build-module/components/dataviews/index.js +5 -7
  31. package/build-module/components/dataviews/index.js.map +1 -1
  32. package/build-module/components/dataviews-filters/filters-toggled.js +24 -0
  33. package/build-module/components/dataviews-filters/filters-toggled.js.map +1 -0
  34. package/build-module/components/dataviews-filters/filters.js +65 -0
  35. package/build-module/components/dataviews-filters/filters.js.map +1 -0
  36. package/build-module/components/dataviews-filters/index.js +4 -186
  37. package/build-module/components/dataviews-filters/index.js.map +1 -1
  38. package/build-module/components/dataviews-filters/toggle.js +91 -0
  39. package/build-module/components/dataviews-filters/toggle.js.map +1 -0
  40. package/build-module/components/dataviews-filters/use-filters.js +56 -0
  41. package/build-module/components/dataviews-filters/use-filters.js.map +1 -0
  42. package/build-module/components/dataviews-picker/index.js +5 -7
  43. package/build-module/components/dataviews-picker/index.js.map +1 -1
  44. package/build-module/components/dataviews-view-config/index.js +22 -3
  45. package/build-module/components/dataviews-view-config/index.js.map +1 -1
  46. package/build-module/dataform-controls/array.js +112 -26
  47. package/build-module/dataform-controls/array.js.map +1 -1
  48. package/build-module/dataviews-layouts/picker-grid/index.js +4 -1
  49. package/build-module/dataviews-layouts/picker-grid/index.js.map +1 -1
  50. package/build-module/field-types/array.js +0 -6
  51. package/build-module/field-types/array.js.map +1 -1
  52. package/build-module/index.js +1 -0
  53. package/build-module/index.js.map +1 -1
  54. package/build-module/types.js.map +1 -1
  55. package/build-module/validation.js +18 -1
  56. package/build-module/validation.js.map +1 -1
  57. package/build-types/components/dataform/stories/index.story.d.ts.map +1 -1
  58. package/build-types/components/dataviews/index.d.ts +3 -2
  59. package/build-types/components/dataviews/index.d.ts.map +1 -1
  60. package/build-types/components/dataviews-filters/filters-toggled.d.ts +5 -0
  61. package/build-types/components/dataviews-filters/filters-toggled.d.ts.map +1 -0
  62. package/build-types/components/dataviews-filters/filters.d.ts +6 -0
  63. package/build-types/components/dataviews-filters/filters.d.ts.map +1 -0
  64. package/build-types/components/dataviews-filters/index.d.ts +4 -8
  65. package/build-types/components/dataviews-filters/index.d.ts.map +1 -1
  66. package/build-types/components/dataviews-filters/toggle.d.ts +3 -0
  67. package/build-types/components/dataviews-filters/toggle.d.ts.map +1 -0
  68. package/build-types/components/dataviews-filters/use-filters.d.ts +4 -0
  69. package/build-types/components/dataviews-filters/use-filters.d.ts.map +1 -0
  70. package/build-types/components/dataviews-picker/index.d.ts +3 -2
  71. package/build-types/components/dataviews-picker/index.d.ts.map +1 -1
  72. package/build-types/components/dataviews-view-config/index.d.ts.map +1 -1
  73. package/build-types/dataform-controls/array.d.ts.map +1 -1
  74. package/build-types/dataviews-layouts/picker-grid/index.d.ts.map +1 -1
  75. package/build-types/field-types/array.d.ts.map +1 -1
  76. package/build-types/index.d.ts +1 -0
  77. package/build-types/index.d.ts.map +1 -1
  78. package/build-types/types.d.ts +2 -1
  79. package/build-types/types.d.ts.map +1 -1
  80. package/build-types/validation.d.ts.map +1 -1
  81. package/build-wp/index.js +899 -408
  82. package/package.json +15 -15
  83. package/src/components/dataform/stories/index.story.tsx +73 -1
  84. package/src/components/dataviews/index.tsx +8 -14
  85. package/src/components/dataviews/stories/index.story.tsx +1 -1
  86. package/src/components/dataviews-filters/filters-toggled.tsx +20 -0
  87. package/src/components/dataviews-filters/filters.tsx +73 -0
  88. package/src/components/dataviews-filters/index.tsx +4 -246
  89. package/src/components/dataviews-filters/toggle.tsx +118 -0
  90. package/src/components/dataviews-filters/use-filters.ts +73 -0
  91. package/src/components/dataviews-picker/index.tsx +8 -14
  92. package/src/components/dataviews-view-config/index.tsx +18 -3
  93. package/src/dataform-controls/array.tsx +137 -40
  94. package/src/dataviews-layouts/picker-grid/index.tsx +15 -8
  95. package/src/field-types/array.tsx +0 -8
  96. package/src/index.ts +1 -0
  97. package/src/test/validation.ts +192 -0
  98. package/src/types.ts +2 -1
  99. package/src/validation.ts +30 -0
  100. package/tsconfig.tsbuildinfo +1 -1
package/build-wp/index.js CHANGED
@@ -4837,7 +4837,8 @@ function UnforwardedButton(props, ref) {
4837
4837
  "is-link": variant === "link",
4838
4838
  "is-destructive": isDestructive,
4839
4839
  "has-text": !!icon && (hasChildren || text),
4840
- "has-icon": !!icon
4840
+ "has-icon": !!icon,
4841
+ "has-icon-right": iconPosition === "right"
4841
4842
  });
4842
4843
  const trulyDisabled = disabled && !accessibleWhenDisabled;
4843
4844
  const Tag = href !== void 0 && !disabled ? "a" : "button";
@@ -10158,7 +10159,6 @@ function FormTokenField(props) {
10158
10159
  })]
10159
10160
  });
10160
10161
  }
10161
- var form_token_field_default = FormTokenField;
10162
10162
 
10163
10163
  // ../components/build-module/search-control/index.js
10164
10164
  import clsx21 from "clsx";
@@ -10409,14 +10409,14 @@ import clsx24 from "clsx";
10409
10409
  // ../components/build-module/textarea-control/styles/textarea-control-styles.js
10410
10410
  import _styled13 from "@emotion/styled/base";
10411
10411
  import { css as css30 } from "@emotion/react";
10412
- var inputStyleNeutral = /* @__PURE__ */ css30("box-shadow:0 0 0 transparent;border-radius:", config_values_default.radiusSmall, ";border:", config_values_default.borderWidth, " solid ", COLORS.ui.border, ";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}" + (false ? "" : ";label:inputStyleNeutral;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYzZCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvbnQgfSBmcm9tICcuLi8uLi91dGlscy9mb250JztcbmltcG9ydCB7IENPTE9SUyB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ZWhvbGRlciB9O1xuXHR9XG5cblx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQuaXMtZGFyay10aGVtZSAmIHtcblx0XHQmOjotd2Via2l0LWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXHR9XG5gO1xuIl19 */");
10413
- var inputStyleFocus = /* @__PURE__ */ css30("border-color:", COLORS.theme.accent, ";box-shadow:0 0 0 calc( ", config_values_default.borderWidthFocus, " - ", config_values_default.borderWidth, " ) ", COLORS.theme.accent, ";outline:2px solid transparent;" + (false ? "" : ";label:inputStyleFocus;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0IyQiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RleHRhcm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pemUnICkgfTtcblxuXHQkeyBicmVha3BvaW50KCAnc21hbGwnICkgfSB7XG5cdFx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHR9XG5cblx0Jjpmb2N1cyB7XG5cdFx0JHsgaW5wdXRTdHlsZUZvY3VzIH1cblx0fVxuXG5cdC8vIFVzZSBvcGFjaXR5IHRvIHdvcmsgaW4gdmFyaW91cyBlZGl0b3Igc3R5bGVzLlxuXHQmOjotd2Via2l0LWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0fVxuXG5cdCY6Oi1tb3otcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0JjotbXMtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0LmlzLWRhcmstdGhlbWUgJiB7XG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0JjotbXMtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5saWdodEdyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
10412
+ var inputStyleNeutral = /* @__PURE__ */ css30("box-shadow:0 0 0 transparent;border-radius:", config_values_default.radiusSmall, ";border:", config_values_default.borderWidth, " solid ", COLORS.ui.border, ";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}" + (false ? "" : ";label:inputStyleNeutral;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBYzZCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvbnQgfSBmcm9tICcuLi8uLi91dGlscy9mb250JztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzL2NvbG9ycy12YWx1ZXMnO1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgYnJlYWtwb2ludCB9IGZyb20gJy4uLy4uL3V0aWxzL2JyZWFrcG9pbnQnO1xuXG5jb25zdCBpbnB1dFN0eWxlTmV1dHJhbCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3J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VyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXHR9XG5gO1xuIl19 */");
10413
+ var inputStyleFocus = /* @__PURE__ */ css30("border-color:", COLORS.theme.accent, ";box-shadow:0 0 0 calc( ", config_values_default.borderWidthFocus, " - ", config_values_default.borderWidth, " ) ", COLORS.theme.accent, ";outline:2px solid transparent;" + (false ? "" : ";label:inputStyleFocus;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0IyQiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RleHRhcmVhLWNvbnRyb2wvc3R5bGVzL3RleHRhcmVhLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBmb250I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lucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0fVxuXG5cdCY6Oi1tb3otcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0JjotbXMtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0LmlzLWRhcmstdGhlbWUgJiB7XG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0JjotbXMtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5saWdodEdyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
10414
10414
  var StyledTextarea = /* @__PURE__ */ _styled13("textarea", false ? {
10415
10415
  target: "e1w5nnrk0"
10416
10416
  } : {
10417
10417
  target: "e1w5nnrk0",
10418
10418
  label: "StyledTextarea"
10419
- })("width:100%;display:block;font-family:", font("default.fontFamily"), ";line-height:20px;background:", COLORS.theme.background, ";color:", COLORS.theme.foreground, ";padding:9px 11px;", inputStyleNeutral, ";font-size:", font("mobileTextMinFontSize"), ";", breakpoint("small"), "{font-size:", font("default.fontSize"), ";}&:focus{", inputStyleFocus, ";}&::-webkit-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}.is-dark-theme &{&::-webkit-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0M2QyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RleHRhcmVhLWNvbnRyb2wvc3R5bGVzL3RleHRhcmVhLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBmb250IH0gZnJvbSAnLi4vLi4vdXRpbHMvZm9udCc7XG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscy9jb2xvcnMtdmFsdWVzJztcbmltcG9ydCB7IENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IGJyZWFrcG9pbnQgfSBmcm9tICcuLi8uLi91dGlscy9icmVha3BvaW50JztcblxuY29uc3QgaW5wdXRTdHlsZU5ldXRyYWwgPSBjc3NgXG5cdGJveC1zaGFk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R9XG5cblx0LmlzLWRhcmstdGhlbWUgJiB7XG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0JjotbXMtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5saWdodEdyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */"));
10419
+ })("width:100%;display:block;font-family:", font("default.fontFamily"), ";line-height:20px;background:", COLORS.theme.background, ";color:", COLORS.theme.foreground, ";resize:vertical;padding:9px 11px;", inputStyleNeutral, ";font-size:", font("mobileTextMinFontSize"), ";", breakpoint("small"), "{font-size:", font("default.fontSize"), ";}&:focus{", inputStyleFocus, ";}&::-webkit-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}.is-dark-theme &{&::-webkit-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGV4dGFyZWEtY29udHJvbC9zdHlsZXMvdGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkF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uXHRcdH1cblx0fVxuYDtcbiJdfQ== */"));
10420
10420
 
10421
10421
  // ../components/build-module/textarea-control/index.js
10422
10422
  import { jsx as _jsx114 } from "react/jsx-runtime";
@@ -12364,8 +12364,57 @@ var UnforwardedValidatedCheckboxControl = ({
12364
12364
  };
12365
12365
  var ValidatedCheckboxControl = forwardRef(UnforwardedValidatedCheckboxControl);
12366
12366
 
12367
+ // ../components/build-module/validated-form-controls/components/form-token-field.js
12368
+ import { jsx as _jsx140, jsxs as _jsxs32 } from "react/jsx-runtime";
12369
+ var UnforwardedValidatedFormTokenField = ({
12370
+ required,
12371
+ onValidate,
12372
+ customValidity,
12373
+ onChange,
12374
+ markWhenOptional,
12375
+ ...restProps
12376
+ }, forwardedRef) => {
12377
+ const validityTargetRef = useRef(null);
12378
+ const valueRef = useRef(restProps.value);
12379
+ return /* @__PURE__ */ _jsxs32("div", {
12380
+ className: "components-validated-control__wrapper-with-error-delegate",
12381
+ ref: forwardedRef,
12382
+ children: [/* @__PURE__ */ _jsx140(ControlWithError, {
12383
+ required,
12384
+ markWhenOptional,
12385
+ onValidate: () => {
12386
+ return onValidate?.(valueRef.current);
12387
+ },
12388
+ customValidity,
12389
+ getValidityTarget: () => validityTargetRef.current,
12390
+ children: /* @__PURE__ */ _jsx140(FormTokenField, {
12391
+ __next40pxDefaultSize: true,
12392
+ __nextHasNoMarginBottom: true,
12393
+ ...restProps,
12394
+ onChange: (value, ...args) => {
12395
+ valueRef.current = value;
12396
+ onChange?.(value, ...args);
12397
+ }
12398
+ })
12399
+ }), /* @__PURE__ */ _jsx140("input", {
12400
+ className: "components-validated-control__error-delegate",
12401
+ type: "text",
12402
+ ref: validityTargetRef,
12403
+ required,
12404
+ value: valueRef.current && valueRef.current.length > 0 ? "hasvalue" : "",
12405
+ tabIndex: -1,
12406
+ onChange: () => {
12407
+ },
12408
+ onFocus: (e) => {
12409
+ e.target.previousElementSibling?.querySelector('input[type="text"]')?.focus();
12410
+ }
12411
+ })]
12412
+ });
12413
+ };
12414
+ var ValidatedFormTokenField = forwardRef(UnforwardedValidatedFormTokenField);
12415
+
12367
12416
  // ../components/build-module/validated-form-controls/components/input-control.js
12368
- import { jsx as _jsx140 } from "react/jsx-runtime";
12417
+ import { jsx as _jsx141 } from "react/jsx-runtime";
12369
12418
  var UnforwardedValidatedInputControl = ({
12370
12419
  required,
12371
12420
  onValidate,
@@ -12377,7 +12426,7 @@ var UnforwardedValidatedInputControl = ({
12377
12426
  const validityTargetRef = useRef(null);
12378
12427
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12379
12428
  const valueRef = useRef(restProps.value);
12380
- return /* @__PURE__ */ _jsx140(ControlWithError, {
12429
+ return /* @__PURE__ */ _jsx141(ControlWithError, {
12381
12430
  required,
12382
12431
  markWhenOptional,
12383
12432
  onValidate: () => {
@@ -12385,7 +12434,7 @@ var UnforwardedValidatedInputControl = ({
12385
12434
  },
12386
12435
  customValidity,
12387
12436
  getValidityTarget: () => validityTargetRef.current,
12388
- children: /* @__PURE__ */ _jsx140(input_control_default, {
12437
+ children: /* @__PURE__ */ _jsx141(input_control_default, {
12389
12438
  __next40pxDefaultSize: true,
12390
12439
  ref: mergedRefs,
12391
12440
  onChange: (value, ...args) => {
@@ -12399,7 +12448,7 @@ var UnforwardedValidatedInputControl = ({
12399
12448
  var ValidatedInputControl = forwardRef(UnforwardedValidatedInputControl);
12400
12449
 
12401
12450
  // ../components/build-module/validated-form-controls/components/number-control.js
12402
- import { jsx as _jsx141 } from "react/jsx-runtime";
12451
+ import { jsx as _jsx142 } from "react/jsx-runtime";
12403
12452
  var UnforwardedValidatedNumberControl = ({
12404
12453
  required,
12405
12454
  onValidate,
@@ -12411,7 +12460,7 @@ var UnforwardedValidatedNumberControl = ({
12411
12460
  const validityTargetRef = useRef(null);
12412
12461
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12413
12462
  const valueRef = useRef(restProps.value);
12414
- return /* @__PURE__ */ _jsx141(ControlWithError, {
12463
+ return /* @__PURE__ */ _jsx142(ControlWithError, {
12415
12464
  required,
12416
12465
  markWhenOptional,
12417
12466
  onValidate: () => {
@@ -12419,7 +12468,7 @@ var UnforwardedValidatedNumberControl = ({
12419
12468
  },
12420
12469
  customValidity,
12421
12470
  getValidityTarget: () => validityTargetRef.current,
12422
- children: /* @__PURE__ */ _jsx141(number_control_default, {
12471
+ children: /* @__PURE__ */ _jsx142(number_control_default, {
12423
12472
  __next40pxDefaultSize: true,
12424
12473
  ref: mergedRefs,
12425
12474
  onChange: (value, ...args) => {
@@ -12433,7 +12482,7 @@ var UnforwardedValidatedNumberControl = ({
12433
12482
  var ValidatedNumberControl = forwardRef(UnforwardedValidatedNumberControl);
12434
12483
 
12435
12484
  // ../components/build-module/validated-form-controls/components/radio-control.js
12436
- import { jsx as _jsx142 } from "react/jsx-runtime";
12485
+ import { jsx as _jsx143 } from "react/jsx-runtime";
12437
12486
  var UnforwardedValidatedRadioControl = ({
12438
12487
  required,
12439
12488
  onValidate,
@@ -12445,7 +12494,7 @@ var UnforwardedValidatedRadioControl = ({
12445
12494
  const validityTargetRef = useRef(null);
12446
12495
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12447
12496
  const valueRef = useRef(restProps.selected);
12448
- return /* @__PURE__ */ _jsx142(ControlWithError, {
12497
+ return /* @__PURE__ */ _jsx143(ControlWithError, {
12449
12498
  required,
12450
12499
  markWhenOptional,
12451
12500
  ref: mergedRefs,
@@ -12454,7 +12503,7 @@ var UnforwardedValidatedRadioControl = ({
12454
12503
  },
12455
12504
  customValidity,
12456
12505
  getValidityTarget: () => validityTargetRef.current?.querySelector('input[type="radio"]'),
12457
- children: /* @__PURE__ */ _jsx142(radio_control_default, {
12506
+ children: /* @__PURE__ */ _jsx143(radio_control_default, {
12458
12507
  onChange: (value) => {
12459
12508
  valueRef.current = value;
12460
12509
  onChange?.(value);
@@ -12466,7 +12515,7 @@ var UnforwardedValidatedRadioControl = ({
12466
12515
  var ValidatedRadioControl = forwardRef(UnforwardedValidatedRadioControl);
12467
12516
 
12468
12517
  // ../components/build-module/validated-form-controls/components/select-control.js
12469
- import { jsx as _jsx143 } from "react/jsx-runtime";
12518
+ import { jsx as _jsx144 } from "react/jsx-runtime";
12470
12519
  var UnforwardedValidatedSelectControl = ({
12471
12520
  required,
12472
12521
  onValidate,
@@ -12478,7 +12527,7 @@ var UnforwardedValidatedSelectControl = ({
12478
12527
  const validityTargetRef = useRef(null);
12479
12528
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12480
12529
  const valueRef = useRef(restProps.value);
12481
- return /* @__PURE__ */ _jsx143(ControlWithError, {
12530
+ return /* @__PURE__ */ _jsx144(ControlWithError, {
12482
12531
  required,
12483
12532
  markWhenOptional,
12484
12533
  onValidate: () => {
@@ -12486,7 +12535,7 @@ var UnforwardedValidatedSelectControl = ({
12486
12535
  },
12487
12536
  customValidity,
12488
12537
  getValidityTarget: () => validityTargetRef.current,
12489
- children: /* @__PURE__ */ _jsx143(select_control_default, {
12538
+ children: /* @__PURE__ */ _jsx144(select_control_default, {
12490
12539
  __nextHasNoMarginBottom: true,
12491
12540
  __next40pxDefaultSize: true,
12492
12541
  ref: mergedRefs,
@@ -12501,7 +12550,7 @@ var UnforwardedValidatedSelectControl = ({
12501
12550
  var ValidatedSelectControl = forwardRef(UnforwardedValidatedSelectControl);
12502
12551
 
12503
12552
  // ../components/build-module/validated-form-controls/components/text-control.js
12504
- import { jsx as _jsx144 } from "react/jsx-runtime";
12553
+ import { jsx as _jsx145 } from "react/jsx-runtime";
12505
12554
  var UnforwardedValidatedTextControl = ({
12506
12555
  required,
12507
12556
  onValidate,
@@ -12513,7 +12562,7 @@ var UnforwardedValidatedTextControl = ({
12513
12562
  const validityTargetRef = useRef(null);
12514
12563
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12515
12564
  const valueRef = useRef(restProps.value);
12516
- return /* @__PURE__ */ _jsx144(ControlWithError, {
12565
+ return /* @__PURE__ */ _jsx145(ControlWithError, {
12517
12566
  required,
12518
12567
  markWhenOptional,
12519
12568
  onValidate: () => {
@@ -12521,7 +12570,7 @@ var UnforwardedValidatedTextControl = ({
12521
12570
  },
12522
12571
  customValidity,
12523
12572
  getValidityTarget: () => validityTargetRef.current,
12524
- children: /* @__PURE__ */ _jsx144(text_control_default, {
12573
+ children: /* @__PURE__ */ _jsx145(text_control_default, {
12525
12574
  __next40pxDefaultSize: true,
12526
12575
  __nextHasNoMarginBottom: true,
12527
12576
  ref: mergedRefs,
@@ -12536,7 +12585,7 @@ var UnforwardedValidatedTextControl = ({
12536
12585
  var ValidatedTextControl = forwardRef(UnforwardedValidatedTextControl);
12537
12586
 
12538
12587
  // ../components/build-module/validated-form-controls/components/textarea-control.js
12539
- import { jsx as _jsx145 } from "react/jsx-runtime";
12588
+ import { jsx as _jsx146 } from "react/jsx-runtime";
12540
12589
  var UnforwardedValidatedTextareaControl = ({
12541
12590
  required,
12542
12591
  onValidate,
@@ -12548,7 +12597,7 @@ var UnforwardedValidatedTextareaControl = ({
12548
12597
  const validityTargetRef = useRef(null);
12549
12598
  const mergedRefs = useMergeRefs([forwardedRef, validityTargetRef]);
12550
12599
  const valueRef = useRef(restProps.value);
12551
- return /* @__PURE__ */ _jsx145(ControlWithError, {
12600
+ return /* @__PURE__ */ _jsx146(ControlWithError, {
12552
12601
  required,
12553
12602
  markWhenOptional,
12554
12603
  onValidate: () => {
@@ -12556,7 +12605,7 @@ var UnforwardedValidatedTextareaControl = ({
12556
12605
  },
12557
12606
  customValidity,
12558
12607
  getValidityTarget: () => validityTargetRef.current,
12559
- children: /* @__PURE__ */ _jsx145(textarea_control_default, {
12608
+ children: /* @__PURE__ */ _jsx146(textarea_control_default, {
12560
12609
  __nextHasNoMarginBottom: true,
12561
12610
  ref: mergedRefs,
12562
12611
  onChange: (value) => {
@@ -12570,7 +12619,7 @@ var UnforwardedValidatedTextareaControl = ({
12570
12619
  var ValidatedTextareaControl = forwardRef(UnforwardedValidatedTextareaControl);
12571
12620
 
12572
12621
  // ../components/build-module/validated-form-controls/components/toggle-control.js
12573
- import { jsx as _jsx146 } from "react/jsx-runtime";
12622
+ import { jsx as _jsx147 } from "react/jsx-runtime";
12574
12623
  var UnforwardedValidatedToggleControl = ({
12575
12624
  required,
12576
12625
  onValidate,
@@ -12587,7 +12636,7 @@ var UnforwardedValidatedToggleControl = ({
12587
12636
  validityTargetRef.current.required = required !== null && required !== void 0 ? required : false;
12588
12637
  }
12589
12638
  }, [required]);
12590
- return /* @__PURE__ */ _jsx146(ControlWithError, {
12639
+ return /* @__PURE__ */ _jsx147(ControlWithError, {
12591
12640
  required,
12592
12641
  markWhenOptional,
12593
12642
  onValidate: () => {
@@ -12595,7 +12644,7 @@ var UnforwardedValidatedToggleControl = ({
12595
12644
  },
12596
12645
  customValidity,
12597
12646
  getValidityTarget: () => validityTargetRef.current,
12598
- children: /* @__PURE__ */ _jsx146(toggle_control_default, {
12647
+ children: /* @__PURE__ */ _jsx147(toggle_control_default, {
12599
12648
  __nextHasNoMarginBottom: true,
12600
12649
  ref: mergedRefs,
12601
12650
  onChange: (value) => {
@@ -12609,7 +12658,7 @@ var UnforwardedValidatedToggleControl = ({
12609
12658
  var ValidatedToggleControl = forwardRef(UnforwardedValidatedToggleControl);
12610
12659
 
12611
12660
  // ../components/build-module/validated-form-controls/components/toggle-group-control.js
12612
- import { jsx as _jsx147, jsxs as _jsxs32 } from "react/jsx-runtime";
12661
+ import { jsx as _jsx148, jsxs as _jsxs33 } from "react/jsx-runtime";
12613
12662
  var UnforwardedValidatedToggleGroupControl = ({
12614
12663
  required,
12615
12664
  onValidate,
@@ -12621,9 +12670,9 @@ var UnforwardedValidatedToggleGroupControl = ({
12621
12670
  const validityTargetRef = useRef(null);
12622
12671
  const valueRef = useRef(restProps.value);
12623
12672
  const nameAttr = useId();
12624
- return /* @__PURE__ */ _jsxs32("div", {
12673
+ return /* @__PURE__ */ _jsxs33("div", {
12625
12674
  className: "components-validated-control__wrapper-with-error-delegate",
12626
- children: [/* @__PURE__ */ _jsx147(ControlWithError, {
12675
+ children: [/* @__PURE__ */ _jsx148(ControlWithError, {
12627
12676
  required,
12628
12677
  markWhenOptional,
12629
12678
  onValidate: () => {
@@ -12631,7 +12680,7 @@ var UnforwardedValidatedToggleGroupControl = ({
12631
12680
  },
12632
12681
  customValidity,
12633
12682
  getValidityTarget: () => validityTargetRef.current,
12634
- children: /* @__PURE__ */ _jsx147(component_default10, {
12683
+ children: /* @__PURE__ */ _jsx148(component_default10, {
12635
12684
  __nextHasNoMarginBottom: true,
12636
12685
  __next40pxDefaultSize: true,
12637
12686
  ref: forwardedRef,
@@ -12641,7 +12690,7 @@ var UnforwardedValidatedToggleGroupControl = ({
12641
12690
  },
12642
12691
  ...restProps
12643
12692
  })
12644
- }), /* @__PURE__ */ _jsx147("input", {
12693
+ }), /* @__PURE__ */ _jsx148("input", {
12645
12694
  className: "components-validated-control__error-delegate",
12646
12695
  type: "radio",
12647
12696
  ref: validityTargetRef,
@@ -12683,7 +12732,8 @@ lock3(privateApis, {
12683
12732
  ValidatedTextControl,
12684
12733
  ValidatedTextareaControl,
12685
12734
  ValidatedToggleControl,
12686
- ValidatedToggleGroupControl
12735
+ ValidatedToggleGroupControl,
12736
+ ValidatedFormTokenField
12687
12737
  });
12688
12738
 
12689
12739
  // src/constants.ts
@@ -13649,11 +13699,11 @@ var column_header_menu_default = ColumnHeaderMenu;
13649
13699
  import { jsx as jsx5 } from "react/jsx-runtime";
13650
13700
  function getClickableItemProps({
13651
13701
  item: item2,
13652
- isItemClickable,
13702
+ isItemClickable: isItemClickable2,
13653
13703
  onClickItem,
13654
13704
  className
13655
13705
  }) {
13656
- if (!isItemClickable(item2) || !onClickItem) {
13706
+ if (!isItemClickable2(item2) || !onClickItem) {
13657
13707
  return { className };
13658
13708
  }
13659
13709
  return {
@@ -13674,14 +13724,14 @@ function getClickableItemProps({
13674
13724
  }
13675
13725
  function ItemClickWrapper({
13676
13726
  item: item2,
13677
- isItemClickable,
13727
+ isItemClickable: isItemClickable2,
13678
13728
  onClickItem,
13679
13729
  renderItemLink,
13680
13730
  className,
13681
13731
  children,
13682
13732
  ...extraProps
13683
13733
  }) {
13684
- if (!isItemClickable(item2)) {
13734
+ if (!isItemClickable2(item2)) {
13685
13735
  return children;
13686
13736
  }
13687
13737
  if (renderItemLink) {
@@ -13694,7 +13744,7 @@ function ItemClickWrapper({
13694
13744
  }
13695
13745
  const clickProps = getClickableItemProps({
13696
13746
  item: item2,
13697
- isItemClickable,
13747
+ isItemClickable: isItemClickable2,
13698
13748
  onClickItem,
13699
13749
  className
13700
13750
  });
@@ -13712,14 +13762,14 @@ function ColumnPrimary({
13712
13762
  descriptionField,
13713
13763
  onClickItem,
13714
13764
  renderItemLink,
13715
- isItemClickable
13765
+ isItemClickable: isItemClickable2
13716
13766
  }) {
13717
13767
  return /* @__PURE__ */ jsxs4(component_default9, { spacing: 3, justify: "flex-start", children: [
13718
13768
  mediaField && /* @__PURE__ */ jsx6(
13719
13769
  ItemClickWrapper,
13720
13770
  {
13721
13771
  item: item2,
13722
- isItemClickable,
13772
+ isItemClickable: isItemClickable2,
13723
13773
  onClickItem,
13724
13774
  renderItemLink,
13725
13775
  className: "dataviews-view-table__cell-content-wrapper dataviews-column-primary__media",
@@ -13749,7 +13799,7 @@ function ColumnPrimary({
13749
13799
  ItemClickWrapper,
13750
13800
  {
13751
13801
  item: item2,
13752
- isItemClickable,
13802
+ isItemClickable: isItemClickable2,
13753
13803
  onClickItem,
13754
13804
  renderItemLink,
13755
13805
  className: "dataviews-view-table__cell-content-wrapper dataviews-title-field",
@@ -13864,7 +13914,7 @@ function TableRow({
13864
13914
  descriptionField,
13865
13915
  selection,
13866
13916
  getItemId,
13867
- isItemClickable,
13917
+ isItemClickable: isItemClickable2,
13868
13918
  onClickItem,
13869
13919
  renderItemLink,
13870
13920
  onChangeSelection,
@@ -13946,7 +13996,7 @@ function TableRow({
13946
13996
  titleField: showTitle ? titleField : void 0,
13947
13997
  mediaField: showMedia ? mediaField : void 0,
13948
13998
  descriptionField: showDescription ? descriptionField : void 0,
13949
- isItemClickable,
13999
+ isItemClickable: isItemClickable2,
13950
14000
  onClickItem,
13951
14001
  renderItemLink
13952
14002
  }
@@ -14007,7 +14057,7 @@ function ViewTable({
14007
14057
  selection,
14008
14058
  setOpenedFilter,
14009
14059
  onClickItem,
14010
- isItemClickable,
14060
+ isItemClickable: isItemClickable2,
14011
14061
  renderItemLink,
14012
14062
  view,
14013
14063
  className,
@@ -14185,7 +14235,7 @@ function ViewTable({
14185
14235
  onChangeSelection,
14186
14236
  onClickItem,
14187
14237
  renderItemLink,
14188
- isItemClickable,
14238
+ isItemClickable: isItemClickable2,
14189
14239
  isActionsColumnSticky: !isHorizontalScrollEnd
14190
14240
  },
14191
14241
  getItemId(item2)
@@ -14209,7 +14259,7 @@ function ViewTable({
14209
14259
  onChangeSelection,
14210
14260
  onClickItem,
14211
14261
  renderItemLink,
14212
- isItemClickable,
14262
+ isItemClickable: isItemClickable2,
14213
14263
  isActionsColumnSticky: !isHorizontalScrollEnd,
14214
14264
  posinset: isInfiniteScroll ? index + 1 : void 0
14215
14265
  },
@@ -14265,7 +14315,7 @@ function GridItem({
14265
14315
  selection,
14266
14316
  onChangeSelection,
14267
14317
  onClickItem,
14268
- isItemClickable,
14318
+ isItemClickable: isItemClickable2,
14269
14319
  renderItemLink,
14270
14320
  getItemId,
14271
14321
  item: item2,
@@ -14301,7 +14351,7 @@ function GridItem({
14301
14351
  const shouldRenderMedia = showMedia && renderedMediaField;
14302
14352
  let mediaA11yProps;
14303
14353
  let titleA11yProps;
14304
- if (isItemClickable(item2) && onClickItem) {
14354
+ if (isItemClickable2(item2) && onClickItem) {
14305
14355
  if (renderedTitleField) {
14306
14356
  mediaA11yProps = {
14307
14357
  "aria-labelledby": `dataviews-view-grid__title-field-${instanceId}`
@@ -14343,7 +14393,7 @@ function GridItem({
14343
14393
  ItemClickWrapper,
14344
14394
  {
14345
14395
  item: item2,
14346
- isItemClickable,
14396
+ isItemClickable: isItemClickable2,
14347
14397
  onClickItem,
14348
14398
  renderItemLink,
14349
14399
  className: "dataviews-view-grid__media",
@@ -14373,7 +14423,7 @@ function GridItem({
14373
14423
  ItemClickWrapper,
14374
14424
  {
14375
14425
  item: item2,
14376
- isItemClickable,
14426
+ isItemClickable: isItemClickable2,
14377
14427
  onClickItem,
14378
14428
  renderItemLink,
14379
14429
  className: "dataviews-view-grid__title-field dataviews-title-field",
@@ -14478,7 +14528,7 @@ function ViewGrid({
14478
14528
  isLoading,
14479
14529
  onChangeSelection,
14480
14530
  onClickItem,
14481
- isItemClickable,
14531
+ isItemClickable: isItemClickable2,
14482
14532
  renderItemLink,
14483
14533
  selection,
14484
14534
  view,
@@ -14544,7 +14594,7 @@ function ViewGrid({
14544
14594
  selection,
14545
14595
  onChangeSelection,
14546
14596
  onClickItem,
14547
- isItemClickable,
14597
+ isItemClickable: isItemClickable2,
14548
14598
  renderItemLink,
14549
14599
  getItemId,
14550
14600
  item: item2,
@@ -14583,7 +14633,7 @@ function ViewGrid({
14583
14633
  selection,
14584
14634
  onChangeSelection,
14585
14635
  onClickItem,
14586
- isItemClickable,
14636
+ isItemClickable: isItemClickable2,
14587
14637
  renderItemLink,
14588
14638
  getItemId,
14589
14639
  item: item2,
@@ -15236,11 +15286,156 @@ var dataviews_pagination_default = memo(DataViewsPagination);
15236
15286
 
15237
15287
  // src/components/dataviews-picker/footer.tsx
15238
15288
  import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
15289
+ var EMPTY_ARRAY2 = [];
15239
15290
  function useIsMultiselectPicker(actions) {
15240
15291
  return useMemo(() => {
15241
15292
  return actions?.every((action) => action.supportsBulk);
15242
15293
  }, [actions]);
15243
15294
  }
15295
+ function BulkSelectionCheckbox2({
15296
+ selection,
15297
+ selectedItems,
15298
+ onChangeSelection,
15299
+ data,
15300
+ getItemId
15301
+ }) {
15302
+ const areAllSelected = selectedItems.length === data.length;
15303
+ return /* @__PURE__ */ jsx12(
15304
+ checkbox_control_default,
15305
+ {
15306
+ className: "dataviews-view-table-selection-checkbox",
15307
+ __nextHasNoMarginBottom: true,
15308
+ checked: areAllSelected,
15309
+ indeterminate: !areAllSelected && !!selectedItems.length,
15310
+ onChange: () => {
15311
+ if (areAllSelected) {
15312
+ onChangeSelection(
15313
+ selection.filter(
15314
+ (id) => !data.some(
15315
+ (item2) => id === getItemId(item2)
15316
+ )
15317
+ )
15318
+ );
15319
+ } else {
15320
+ const selectionSet = /* @__PURE__ */ new Set([
15321
+ ...selection,
15322
+ ...data.map((item2) => getItemId(item2))
15323
+ ]);
15324
+ onChangeSelection(Array.from(selectionSet));
15325
+ }
15326
+ },
15327
+ "aria-label": areAllSelected ? __23("Deselect all") : __23("Select all")
15328
+ }
15329
+ );
15330
+ }
15331
+ function ActionButtons({
15332
+ actions,
15333
+ items,
15334
+ selection
15335
+ }) {
15336
+ const registry = useRegistry4();
15337
+ const [actionInProgress, setActionInProgress] = useState(
15338
+ null
15339
+ );
15340
+ return /* @__PURE__ */ jsx12(component_default9, { expanded: false, spacing: 1, children: actions.map((action) => {
15341
+ if (!("callback" in action)) {
15342
+ return null;
15343
+ }
15344
+ const { id, label, icon, isPrimary, isDestructive, callback } = action;
15345
+ const _label = typeof label === "string" ? label : label(items);
15346
+ const variant = isPrimary ? "primary" : "tertiary";
15347
+ const isInProgress = id === actionInProgress;
15348
+ return /* @__PURE__ */ jsx12(
15349
+ button_default,
15350
+ {
15351
+ accessibleWhenDisabled: true,
15352
+ icon,
15353
+ disabled: isInProgress || !selection?.length,
15354
+ isBusy: isInProgress,
15355
+ onClick: async () => {
15356
+ setActionInProgress(id);
15357
+ await callback(items, {
15358
+ registry
15359
+ });
15360
+ setActionInProgress(null);
15361
+ },
15362
+ size: "compact",
15363
+ isDestructive,
15364
+ variant,
15365
+ children: _label
15366
+ },
15367
+ id
15368
+ );
15369
+ }) });
15370
+ }
15371
+ function DataViewsPickerFooter() {
15372
+ const {
15373
+ data,
15374
+ selection,
15375
+ onChangeSelection,
15376
+ getItemId,
15377
+ actions = EMPTY_ARRAY2
15378
+ } = useContext(dataviews_context_default);
15379
+ const selectionCount = selection.length;
15380
+ const isMultiselect = useIsMultiselectPicker(actions);
15381
+ const message = selectionCount > 0 ? sprintf10(
15382
+ /* translators: %d: number of items. */
15383
+ _n3(
15384
+ "%d Item selected",
15385
+ "%d Items selected",
15386
+ selectionCount
15387
+ ),
15388
+ selectionCount
15389
+ ) : sprintf10(
15390
+ /* translators: %d: number of items. */
15391
+ _n3("%d Item", "%d Items", data.length),
15392
+ data.length
15393
+ );
15394
+ const selectedItems = useMemo(
15395
+ () => data.filter((item2) => selection.includes(getItemId(item2))),
15396
+ [selection, getItemId, data]
15397
+ );
15398
+ return /* @__PURE__ */ jsxs9(
15399
+ component_default9,
15400
+ {
15401
+ expanded: false,
15402
+ justify: "space-between",
15403
+ className: "dataviews-footer",
15404
+ children: [
15405
+ /* @__PURE__ */ jsxs9(
15406
+ component_default9,
15407
+ {
15408
+ className: "dataviews-picker-footer__bulk-selection",
15409
+ expanded: false,
15410
+ spacing: 3,
15411
+ children: [
15412
+ isMultiselect && /* @__PURE__ */ jsx12(
15413
+ BulkSelectionCheckbox2,
15414
+ {
15415
+ selection,
15416
+ selectedItems,
15417
+ onChangeSelection,
15418
+ data,
15419
+ getItemId
15420
+ }
15421
+ ),
15422
+ /* @__PURE__ */ jsx12("span", { className: "dataviews-bulk-actions-footer__item-count", children: message })
15423
+ ]
15424
+ }
15425
+ ),
15426
+ /* @__PURE__ */ jsx12(dataviews_pagination_default, {}),
15427
+ Boolean(actions?.length) && /* @__PURE__ */ jsx12("div", { className: "dataviews-picker-footer__actions", children: /* @__PURE__ */ jsx12(
15428
+ ActionButtons,
15429
+ {
15430
+ actions,
15431
+ items: selectedItems,
15432
+ selection
15433
+ }
15434
+ ) })
15435
+ ]
15436
+ }
15437
+ );
15438
+ }
15244
15439
 
15245
15440
  // src/dataviews-layouts/picker-grid/index.tsx
15246
15441
  import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
@@ -15276,6 +15471,7 @@ function GridItem2({
15276
15471
  return /* @__PURE__ */ jsxs10(
15277
15472
  Composite2.Item,
15278
15473
  {
15474
+ "aria-label": titleField ? titleField.getValue({ item: item2 }) || __24("(no title)") : void 0,
15279
15475
  render: ({ children, ...props }) => /* @__PURE__ */ jsx13(component_default14, { spacing: 0, children, ...props }),
15280
15476
  role: "option",
15281
15477
  "aria-posinset": posinset,
@@ -15309,7 +15505,7 @@ function GridItem2({
15309
15505
  tabIndex: -1
15310
15506
  }
15311
15507
  ),
15312
- /* @__PURE__ */ jsx13(
15508
+ showTitle && /* @__PURE__ */ jsx13(
15313
15509
  component_default9,
15314
15510
  {
15315
15511
  justify: "space-between",
@@ -15773,9 +15969,6 @@ var VIEW_LAYOUTS = [
15773
15969
  }
15774
15970
  ];
15775
15971
 
15776
- // src/components/dataviews-filters/index.tsx
15777
- import { __ as __32, _x as _x3 } from "@wordpress/i18n";
15778
-
15779
15972
  // src/components/dataviews-filters/filter.tsx
15780
15973
  import clsx35 from "clsx";
15781
15974
  import { __ as __29, sprintf as sprintf13 } from "@wordpress/i18n";
@@ -15787,7 +15980,7 @@ import clsx34 from "clsx";
15787
15980
  import { __ as __28, sprintf as sprintf12 } from "@wordpress/i18n";
15788
15981
 
15789
15982
  // src/components/dataviews-filters/utils.ts
15790
- var EMPTY_ARRAY2 = [];
15983
+ var EMPTY_ARRAY3 = [];
15791
15984
  var getCurrentValue = (filterDefinition, currentFilter) => {
15792
15985
  if (filterDefinition.singleSelection) {
15793
15986
  return currentFilter?.value;
@@ -15798,7 +15991,7 @@ var getCurrentValue = (filterDefinition, currentFilter) => {
15798
15991
  if (!Array.isArray(currentFilter?.value) && !!currentFilter?.value) {
15799
15992
  return [currentFilter.value];
15800
15993
  }
15801
- return EMPTY_ARRAY2;
15994
+ return EMPTY_ARRAY3;
15802
15995
  };
15803
15996
 
15804
15997
  // src/components/dataviews-filters/search-widget.tsx
@@ -16763,8 +16956,7 @@ function ResetFilter({
16763
16956
  );
16764
16957
  }
16765
16958
 
16766
- // src/components/dataviews-filters/index.tsx
16767
- import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
16959
+ // src/components/dataviews-filters/use-filters.ts
16768
16960
  function useFilters(fields, view) {
16769
16961
  return useMemo(() => {
16770
16962
  const filters = [];
@@ -16810,6 +17002,73 @@ function useFilters(fields, view) {
16810
17002
  return filters;
16811
17003
  }, [fields, view]);
16812
17004
  }
17005
+ var use_filters_default = useFilters;
17006
+
17007
+ // src/components/dataviews-filters/filters.tsx
17008
+ import { jsx as jsx21 } from "react/jsx-runtime";
17009
+ function Filters({ className }) {
17010
+ const { fields, view, onChangeView, openedFilter, setOpenedFilter } = useContext(dataviews_context_default);
17011
+ const addFilterRef = useRef(null);
17012
+ const filters = use_filters_default(fields, view);
17013
+ const addFilter = /* @__PURE__ */ jsx21(
17014
+ add_filter_default,
17015
+ {
17016
+ filters,
17017
+ view,
17018
+ onChangeView,
17019
+ ref: addFilterRef,
17020
+ setOpenedFilter
17021
+ },
17022
+ "add-filter"
17023
+ );
17024
+ const visibleFilters = filters.filter((filter) => filter.isVisible);
17025
+ if (visibleFilters.length === 0) {
17026
+ return null;
17027
+ }
17028
+ const filterComponents = [
17029
+ ...visibleFilters.map((filter) => {
17030
+ return /* @__PURE__ */ jsx21(
17031
+ Filter,
17032
+ {
17033
+ filter,
17034
+ view,
17035
+ fields,
17036
+ onChangeView,
17037
+ addFilterRef,
17038
+ openedFilter
17039
+ },
17040
+ filter.field
17041
+ );
17042
+ }),
17043
+ addFilter
17044
+ ];
17045
+ filterComponents.push(
17046
+ /* @__PURE__ */ jsx21(
17047
+ ResetFilter,
17048
+ {
17049
+ filters,
17050
+ view,
17051
+ onChangeView
17052
+ },
17053
+ "reset-filters"
17054
+ )
17055
+ );
17056
+ return /* @__PURE__ */ jsx21(
17057
+ component_default9,
17058
+ {
17059
+ justify: "flex-start",
17060
+ style: { width: "fit-content" },
17061
+ wrap: true,
17062
+ className,
17063
+ children: filterComponents
17064
+ }
17065
+ );
17066
+ }
17067
+ var filters_default = memo(Filters);
17068
+
17069
+ // src/components/dataviews-filters/toggle.tsx
17070
+ import { __ as __32, _x as _x3 } from "@wordpress/i18n";
17071
+ import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
16813
17072
  function FiltersToggle() {
16814
17073
  const {
16815
17074
  filters,
@@ -16848,7 +17107,7 @@ function FiltersToggle() {
16848
17107
  setIsShowingFilter(!isShowingFilter);
16849
17108
  }
16850
17109
  };
16851
- const buttonComponent = /* @__PURE__ */ jsx21(
17110
+ const buttonComponent = /* @__PURE__ */ jsx22(
16852
17111
  button_default,
16853
17112
  {
16854
17113
  ref: buttonRef,
@@ -16858,7 +17117,7 @@ function FiltersToggle() {
16858
17117
  ...hasVisibleFilters ? toggleFiltersButtonProps : addFilterButtonProps
16859
17118
  }
16860
17119
  );
16861
- return /* @__PURE__ */ jsx21("div", { className: "dataviews-filters__container-visibility-toggle", children: !hasVisibleFilters ? /* @__PURE__ */ jsx21(
17120
+ return /* @__PURE__ */ jsx22("div", { className: "dataviews-filters__container-visibility-toggle", children: !hasVisibleFilters ? /* @__PURE__ */ jsx22(
16862
17121
  AddFilterMenu,
16863
17122
  {
16864
17123
  filters,
@@ -16867,7 +17126,7 @@ function FiltersToggle() {
16867
17126
  setOpenedFilter,
16868
17127
  triggerProps: { render: buttonComponent }
16869
17128
  }
16870
- ) : /* @__PURE__ */ jsx21(
17129
+ ) : /* @__PURE__ */ jsx22(
16871
17130
  FilterVisibilityToggle,
16872
17131
  {
16873
17132
  buttonRef,
@@ -16889,72 +17148,25 @@ function FilterVisibilityToggle({
16889
17148
  );
16890
17149
  return /* @__PURE__ */ jsxs15(Fragment8, { children: [
16891
17150
  children,
16892
- !!filtersCount && /* @__PURE__ */ jsx21("span", { className: "dataviews-filters-toggle__count", children: filtersCount })
17151
+ !!filtersCount && /* @__PURE__ */ jsx22("span", { className: "dataviews-filters-toggle__count", children: filtersCount })
16893
17152
  ] });
16894
17153
  }
16895
- function Filters({ className }) {
16896
- const { fields, view, onChangeView, openedFilter, setOpenedFilter } = useContext(dataviews_context_default);
16897
- const addFilterRef = useRef(null);
16898
- const filters = useFilters(fields, view);
16899
- const addFilter = /* @__PURE__ */ jsx21(
16900
- add_filter_default,
16901
- {
16902
- filters,
16903
- view,
16904
- onChangeView,
16905
- ref: addFilterRef,
16906
- setOpenedFilter
16907
- },
16908
- "add-filter"
16909
- );
16910
- const visibleFilters = filters.filter((filter) => filter.isVisible);
16911
- if (visibleFilters.length === 0) {
17154
+ var toggle_default = FiltersToggle;
17155
+
17156
+ // src/components/dataviews-filters/filters-toggled.tsx
17157
+ import { jsx as jsx23 } from "react/jsx-runtime";
17158
+ function FiltersToggled(props) {
17159
+ const { isShowingFilter } = useContext(dataviews_context_default);
17160
+ if (!isShowingFilter) {
16912
17161
  return null;
16913
17162
  }
16914
- const filterComponents = [
16915
- ...visibleFilters.map((filter) => {
16916
- return /* @__PURE__ */ jsx21(
16917
- Filter,
16918
- {
16919
- filter,
16920
- view,
16921
- fields,
16922
- onChangeView,
16923
- addFilterRef,
16924
- openedFilter
16925
- },
16926
- filter.field
16927
- );
16928
- }),
16929
- addFilter
16930
- ];
16931
- filterComponents.push(
16932
- /* @__PURE__ */ jsx21(
16933
- ResetFilter,
16934
- {
16935
- filters,
16936
- view,
16937
- onChangeView
16938
- },
16939
- "reset-filters"
16940
- )
16941
- );
16942
- return /* @__PURE__ */ jsx21(
16943
- component_default9,
16944
- {
16945
- justify: "flex-start",
16946
- style: { width: "fit-content" },
16947
- wrap: true,
16948
- className,
16949
- children: filterComponents
16950
- }
16951
- );
17163
+ return /* @__PURE__ */ jsx23(filters_default, { ...props });
16952
17164
  }
16953
- var dataviews_filters_default = memo(Filters);
17165
+ var filters_toggled_default = FiltersToggled;
16954
17166
 
16955
17167
  // src/components/dataviews-layout/index.tsx
16956
17168
  import { __ as __33 } from "@wordpress/i18n";
16957
- import { jsx as jsx22 } from "react/jsx-runtime";
17169
+ import { jsx as jsx24 } from "react/jsx-runtime";
16958
17170
  function DataViewsLayout({ className }) {
16959
17171
  const {
16960
17172
  actions = [],
@@ -16969,15 +17181,15 @@ function DataViewsLayout({ className }) {
16969
17181
  onChangeSelection,
16970
17182
  setOpenedFilter,
16971
17183
  onClickItem,
16972
- isItemClickable,
17184
+ isItemClickable: isItemClickable2,
16973
17185
  renderItemLink,
16974
17186
  defaultLayouts,
16975
- empty = /* @__PURE__ */ jsx22("p", { children: __33("No results") })
17187
+ empty = /* @__PURE__ */ jsx24("p", { children: __33("No results") })
16976
17188
  } = useContext(dataviews_context_default);
16977
17189
  const ViewComponent = VIEW_LAYOUTS.find(
16978
17190
  (v) => v.type === view.type && defaultLayouts[v.type]
16979
17191
  )?.component;
16980
- return /* @__PURE__ */ jsx22(
17192
+ return /* @__PURE__ */ jsx24(
16981
17193
  ViewComponent,
16982
17194
  {
16983
17195
  className,
@@ -16993,7 +17205,7 @@ function DataViewsLayout({ className }) {
16993
17205
  setOpenedFilter,
16994
17206
  onClickItem,
16995
17207
  renderItemLink,
16996
- isItemClickable,
17208
+ isItemClickable: isItemClickable2,
16997
17209
  view,
16998
17210
  empty
16999
17211
  }
@@ -17001,14 +17213,14 @@ function DataViewsLayout({ className }) {
17001
17213
  }
17002
17214
 
17003
17215
  // src/components/dataviews-footer/index.tsx
17004
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
17005
- var EMPTY_ARRAY3 = [];
17216
+ import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
17217
+ var EMPTY_ARRAY4 = [];
17006
17218
  function DataViewsFooter() {
17007
17219
  const {
17008
17220
  view,
17009
17221
  paginationInfo: { totalItems = 0, totalPages },
17010
17222
  data,
17011
- actions = EMPTY_ARRAY3
17223
+ actions = EMPTY_ARRAY4
17012
17224
  } = useContext(dataviews_context_default);
17013
17225
  const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data) && [LAYOUT_TABLE, LAYOUT_GRID].includes(view.type);
17014
17226
  if (!totalItems || !totalPages || totalPages <= 1 && !hasBulkActions) {
@@ -17021,8 +17233,8 @@ function DataViewsFooter() {
17021
17233
  justify: "end",
17022
17234
  className: "dataviews-footer",
17023
17235
  children: [
17024
- hasBulkActions && /* @__PURE__ */ jsx23(BulkActionsFooter, {}),
17025
- /* @__PURE__ */ jsx23(dataviews_pagination_default, {})
17236
+ hasBulkActions && /* @__PURE__ */ jsx25(BulkActionsFooter, {}),
17237
+ /* @__PURE__ */ jsx25(dataviews_pagination_default, {})
17026
17238
  ]
17027
17239
  }
17028
17240
  );
@@ -17030,7 +17242,7 @@ function DataViewsFooter() {
17030
17242
 
17031
17243
  // src/components/dataviews-search/index.tsx
17032
17244
  import { __ as __34 } from "@wordpress/i18n";
17033
- import { jsx as jsx24 } from "react/jsx-runtime";
17245
+ import { jsx as jsx26 } from "react/jsx-runtime";
17034
17246
  var DataViewsSearch = memo(function Search({ label }) {
17035
17247
  const { view, onChangeView } = useContext(dataviews_context_default);
17036
17248
  const [search2, setSearch, debouncedSearch] = useDebouncedInput(
@@ -17055,7 +17267,7 @@ var DataViewsSearch = memo(function Search({ label }) {
17055
17267
  }
17056
17268
  }, [debouncedSearch]);
17057
17269
  const searchLabel = label || __34("Search");
17058
- return /* @__PURE__ */ jsx24(
17270
+ return /* @__PURE__ */ jsx26(
17059
17271
  search_control_default,
17060
17272
  {
17061
17273
  className: "dataviews-search",
@@ -17076,7 +17288,7 @@ import { __ as __36, _x as _x4, sprintf as sprintf14 } from "@wordpress/i18n";
17076
17288
 
17077
17289
  // src/components/dataviews-view-config/infinite-scroll-toggle.tsx
17078
17290
  import { __ as __35 } from "@wordpress/i18n";
17079
- import { jsx as jsx25 } from "react/jsx-runtime";
17291
+ import { jsx as jsx27 } from "react/jsx-runtime";
17080
17292
  function InfiniteScrollToggle() {
17081
17293
  const context = useContext(dataviews_context_default);
17082
17294
  const { view, onChangeView } = context;
@@ -17084,7 +17296,7 @@ function InfiniteScrollToggle() {
17084
17296
  if (!context.hasInfiniteScrollHandler) {
17085
17297
  return null;
17086
17298
  }
17087
- return /* @__PURE__ */ jsx25(
17299
+ return /* @__PURE__ */ jsx27(
17088
17300
  toggle_control_default,
17089
17301
  {
17090
17302
  __nextHasNoMarginBottom: true,
@@ -17104,7 +17316,7 @@ function InfiniteScrollToggle() {
17104
17316
  }
17105
17317
 
17106
17318
  // src/components/dataviews-view-config/index.tsx
17107
- import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
17319
+ import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
17108
17320
  var { Menu: Menu7 } = unlock3(privateApis);
17109
17321
  var DATAVIEWS_CONFIG_POPOVER_PROPS = {
17110
17322
  className: "dataviews-config__popover",
@@ -17119,10 +17331,10 @@ function ViewTypeMenu() {
17119
17331
  }
17120
17332
  const activeView = VIEW_LAYOUTS.find((v) => view.type === v.type);
17121
17333
  return /* @__PURE__ */ jsxs17(Menu7, { children: [
17122
- /* @__PURE__ */ jsx26(
17334
+ /* @__PURE__ */ jsx28(
17123
17335
  Menu7.TriggerButton,
17124
17336
  {
17125
- render: /* @__PURE__ */ jsx26(
17337
+ render: /* @__PURE__ */ jsx28(
17126
17338
  button_default,
17127
17339
  {
17128
17340
  size: "compact",
@@ -17132,14 +17344,14 @@ function ViewTypeMenu() {
17132
17344
  )
17133
17345
  }
17134
17346
  ),
17135
- /* @__PURE__ */ jsx26(Menu7.Popover, { children: availableLayouts.map((layout) => {
17347
+ /* @__PURE__ */ jsx28(Menu7.Popover, { children: availableLayouts.map((layout) => {
17136
17348
  const config = VIEW_LAYOUTS.find(
17137
17349
  (v) => v.type === layout
17138
17350
  );
17139
17351
  if (!config) {
17140
17352
  return null;
17141
17353
  }
17142
- return /* @__PURE__ */ jsx26(
17354
+ return /* @__PURE__ */ jsx28(
17143
17355
  Menu7.RadioItem,
17144
17356
  {
17145
17357
  value: layout,
@@ -17164,7 +17376,7 @@ function ViewTypeMenu() {
17164
17376
  }
17165
17377
  warning("Invalid dataview");
17166
17378
  },
17167
- children: /* @__PURE__ */ jsx26(Menu7.ItemLabel, { children: config.label })
17379
+ children: /* @__PURE__ */ jsx28(Menu7.ItemLabel, { children: config.label })
17168
17380
  },
17169
17381
  layout
17170
17382
  );
@@ -17184,7 +17396,7 @@ function SortFieldControl() {
17184
17396
  };
17185
17397
  });
17186
17398
  }, [fields]);
17187
- return /* @__PURE__ */ jsx26(
17399
+ return /* @__PURE__ */ jsx28(
17188
17400
  select_control_default,
17189
17401
  {
17190
17402
  __nextHasNoMarginBottom: true,
@@ -17217,7 +17429,7 @@ function SortDirectionControl() {
17217
17429
  if (!value && view.sort?.field) {
17218
17430
  value = "desc";
17219
17431
  }
17220
- return /* @__PURE__ */ jsx26(
17432
+ return /* @__PURE__ */ jsx28(
17221
17433
  component_default10,
17222
17434
  {
17223
17435
  className: "dataviews-view-config__sort-direction",
@@ -17244,7 +17456,7 @@ function SortDirectionControl() {
17244
17456
  warning("Invalid direction");
17245
17457
  },
17246
17458
  children: SORTING_DIRECTIONS.map((direction) => {
17247
- return /* @__PURE__ */ jsx26(
17459
+ return /* @__PURE__ */ jsx28(
17248
17460
  component_default13,
17249
17461
  {
17250
17462
  value: direction,
@@ -17263,7 +17475,7 @@ function ItemsPerPageControl() {
17263
17475
  if (!config || !config.perPageSizes || config.perPageSizes.length < 2 || config.perPageSizes.length > 6 || infiniteScrollEnabled) {
17264
17476
  return null;
17265
17477
  }
17266
- return /* @__PURE__ */ jsx26(
17478
+ return /* @__PURE__ */ jsx28(
17267
17479
  component_default10,
17268
17480
  {
17269
17481
  __nextHasNoMarginBottom: true,
@@ -17281,7 +17493,7 @@ function ItemsPerPageControl() {
17281
17493
  });
17282
17494
  },
17283
17495
  children: config.perPageSizes.map((value) => {
17284
- return /* @__PURE__ */ jsx26(
17496
+ return /* @__PURE__ */ jsx28(
17285
17497
  component_default12,
17286
17498
  {
17287
17499
  value,
@@ -17310,10 +17522,10 @@ function PreviewOptions({
17310
17522
  }, 50);
17311
17523
  };
17312
17524
  return /* @__PURE__ */ jsxs17(Menu7, { onOpenChange: onMenuOpenChange, children: [
17313
- /* @__PURE__ */ jsx26(
17525
+ /* @__PURE__ */ jsx28(
17314
17526
  Menu7.TriggerButton,
17315
17527
  {
17316
- render: /* @__PURE__ */ jsx26(
17528
+ render: /* @__PURE__ */ jsx28(
17317
17529
  button_default,
17318
17530
  {
17319
17531
  className: "dataviews-field-control__field-preview-options-button",
@@ -17324,8 +17536,8 @@ function PreviewOptions({
17324
17536
  )
17325
17537
  }
17326
17538
  ),
17327
- /* @__PURE__ */ jsx26(Menu7.Popover, { children: previewOptions?.map(({ id, label }) => {
17328
- return /* @__PURE__ */ jsx26(
17539
+ /* @__PURE__ */ jsx28(Menu7.Popover, { children: previewOptions?.map(({ id, label }) => {
17540
+ return /* @__PURE__ */ jsx28(
17329
17541
  Menu7.RadioItem,
17330
17542
  {
17331
17543
  value: id,
@@ -17334,7 +17546,7 @@ function PreviewOptions({
17334
17546
  onChangePreviewOption?.(id);
17335
17547
  focusPreviewOptionsField(id);
17336
17548
  },
17337
- children: /* @__PURE__ */ jsx26(Menu7.ItemLabel, { children: label })
17549
+ children: /* @__PURE__ */ jsx28(Menu7.ItemLabel, { children: label })
17338
17550
  },
17339
17551
  id
17340
17552
  );
@@ -17366,7 +17578,7 @@ function FieldItem({
17366
17578
  }
17367
17579
  }, 50);
17368
17580
  };
17369
- return /* @__PURE__ */ jsx26(component_default22, { children: /* @__PURE__ */ jsxs17(
17581
+ return /* @__PURE__ */ jsx28(component_default22, { children: /* @__PURE__ */ jsxs17(
17370
17582
  component_default9,
17371
17583
  {
17372
17584
  expanded: true,
@@ -17383,10 +17595,10 @@ function FieldItem({
17383
17595
  ),
17384
17596
  justify: "flex-start",
17385
17597
  children: [
17386
- /* @__PURE__ */ jsx26("span", { className: "dataviews-field-control__icon", children: !canMove && !field.enableHiding && /* @__PURE__ */ jsx26(icon_default2, { icon: lock_default }) }),
17598
+ /* @__PURE__ */ jsx28("span", { className: "dataviews-field-control__icon", children: !canMove && !field.enableHiding && /* @__PURE__ */ jsx28(icon_default2, { icon: lock_default }) }),
17387
17599
  /* @__PURE__ */ jsxs17("span", { className: "dataviews-field-control__label-sub-label-container", children: [
17388
- /* @__PURE__ */ jsx26("span", { className: "dataviews-field-control__label", children: label || field.label }),
17389
- description && /* @__PURE__ */ jsx26("span", { className: "dataviews-field-control__sub-label", children: description })
17600
+ /* @__PURE__ */ jsx28("span", { className: "dataviews-field-control__label", children: label || field.label }),
17601
+ description && /* @__PURE__ */ jsx28("span", { className: "dataviews-field-control__sub-label", children: description })
17390
17602
  ] }),
17391
17603
  /* @__PURE__ */ jsxs17(
17392
17604
  component_default9,
@@ -17396,7 +17608,7 @@ function FieldItem({
17396
17608
  className: "dataviews-field-control__actions",
17397
17609
  children: [
17398
17610
  isVisible2 && /* @__PURE__ */ jsxs17(Fragment9, { children: [
17399
- /* @__PURE__ */ jsx26(
17611
+ /* @__PURE__ */ jsx28(
17400
17612
  button_default,
17401
17613
  {
17402
17614
  disabled: isFirst || !canMove,
@@ -17411,7 +17623,7 @@ function FieldItem({
17411
17623
  )
17412
17624
  }
17413
17625
  ),
17414
- /* @__PURE__ */ jsx26(
17626
+ /* @__PURE__ */ jsx28(
17415
17627
  button_default,
17416
17628
  {
17417
17629
  disabled: isLast || !canMove,
@@ -17427,7 +17639,7 @@ function FieldItem({
17427
17639
  }
17428
17640
  )
17429
17641
  ] }),
17430
- onToggleVisibility && /* @__PURE__ */ jsx26(
17642
+ onToggleVisibility && /* @__PURE__ */ jsx28(
17431
17643
  button_default,
17432
17644
  {
17433
17645
  className: "dataviews-field-control__field-visibility-button",
@@ -17450,7 +17662,7 @@ function FieldItem({
17450
17662
  )
17451
17663
  }
17452
17664
  ),
17453
- previewOptions && /* @__PURE__ */ jsx26(
17665
+ previewOptions && /* @__PURE__ */ jsx28(
17454
17666
  PreviewOptions,
17455
17667
  {
17456
17668
  previewOptions,
@@ -17474,7 +17686,7 @@ function RegularFieldItem({
17474
17686
  }) {
17475
17687
  const visibleFieldIds = view.fields ?? [];
17476
17688
  const isVisible2 = index !== void 0 && visibleFieldIds.includes(field.id);
17477
- return /* @__PURE__ */ jsx26(
17689
+ return /* @__PURE__ */ jsx28(
17478
17690
  FieldItem,
17479
17691
  {
17480
17692
  field,
@@ -17529,9 +17741,9 @@ function FieldControl() {
17529
17741
  ].filter(Boolean);
17530
17742
  const visibleFieldIds = view.fields ?? [];
17531
17743
  const hiddenFields = fields.filter(
17532
- (f) => !visibleFieldIds.includes(f.id) && !togglableFields.includes(f.id) && f.type !== "media"
17744
+ (f) => !visibleFieldIds.includes(f.id) && !togglableFields.includes(f.id) && f.type !== "media" && f.enableHiding !== false
17533
17745
  );
17534
- const visibleFields = visibleFieldIds.map((fieldId) => fields.find((f) => f.id === fieldId)).filter(isDefined3);
17746
+ let visibleFields = visibleFieldIds.map((fieldId) => fields.find((f) => f.id === fieldId)).filter(isDefined3);
17535
17747
  if (!visibleFields?.length && !hiddenFields?.length) {
17536
17748
  return null;
17537
17749
  }
@@ -17544,7 +17756,7 @@ function FieldControl() {
17544
17756
  let previewFieldUI;
17545
17757
  if (previewFields.length > 1) {
17546
17758
  const isPreviewFieldVisible = isDefined3(previewField) && (view.showMedia ?? true);
17547
- previewFieldUI = isDefined3(previewField) && /* @__PURE__ */ jsx26(
17759
+ previewFieldUI = isDefined3(previewField) && /* @__PURE__ */ jsx28(
17548
17760
  FieldItem,
17549
17761
  {
17550
17762
  field: previewField,
@@ -17582,12 +17794,21 @@ function FieldControl() {
17582
17794
  isVisibleFlag: "showDescription"
17583
17795
  }
17584
17796
  ].filter(({ field }) => isDefined3(field));
17585
- const visibleLockedFields = lockedFields.filter(
17797
+ let visibleLockedFields = lockedFields.filter(
17586
17798
  ({ field, isVisibleFlag }) => (
17587
17799
  // @ts-expect-error
17588
17800
  isDefined3(field) && (view[isVisibleFlag] ?? true)
17589
17801
  )
17590
17802
  );
17803
+ if (visibleLockedFields.length === 1) {
17804
+ visibleLockedFields = visibleLockedFields.map((locked) => ({
17805
+ ...locked,
17806
+ field: { ...locked.field, enableHiding: false }
17807
+ }));
17808
+ }
17809
+ if (visibleLockedFields.length === 0 && visibleFields.length === 1) {
17810
+ visibleFields = [{ ...visibleFields[0], enableHiding: false }];
17811
+ }
17591
17812
  const hiddenLockedFields = lockedFields.filter(
17592
17813
  ({ field, isVisibleFlag }) => (
17593
17814
  // @ts-expect-error
@@ -17595,10 +17816,10 @@ function FieldControl() {
17595
17816
  )
17596
17817
  );
17597
17818
  return /* @__PURE__ */ jsxs17(component_default14, { className: "dataviews-field-control", spacing: 6, children: [
17598
- /* @__PURE__ */ jsx26(component_default14, { className: "dataviews-view-config__properties", spacing: 0, children: (visibleLockedFields.length > 0 || !!visibleFields?.length) && /* @__PURE__ */ jsxs17(component_default23, { isBordered: true, isSeparated: true, children: [
17819
+ /* @__PURE__ */ jsx28(component_default14, { className: "dataviews-view-config__properties", spacing: 0, children: (visibleLockedFields.length > 0 || !!visibleFields?.length) && /* @__PURE__ */ jsxs17(component_default23, { isBordered: true, isSeparated: true, children: [
17599
17820
  visibleLockedFields.map(
17600
17821
  ({ field, isVisibleFlag, ui }) => {
17601
- return ui ?? /* @__PURE__ */ jsx26(
17822
+ return ui ?? /* @__PURE__ */ jsx28(
17602
17823
  FieldItem,
17603
17824
  {
17604
17825
  field,
@@ -17615,7 +17836,7 @@ function FieldControl() {
17615
17836
  );
17616
17837
  }
17617
17838
  ),
17618
- visibleFields.map((field, index) => /* @__PURE__ */ jsx26(
17839
+ visibleFields.map((field, index) => /* @__PURE__ */ jsx28(
17619
17840
  RegularFieldItem,
17620
17841
  {
17621
17842
  field,
@@ -17627,8 +17848,8 @@ function FieldControl() {
17627
17848
  ))
17628
17849
  ] }) }),
17629
17850
  (!!hiddenFields?.length || !!hiddenLockedFields.length) && /* @__PURE__ */ jsxs17(component_default14, { spacing: 4, children: [
17630
- /* @__PURE__ */ jsx26(base_control_default.VisualLabel, { style: { margin: 0 }, children: __36("Hidden") }),
17631
- /* @__PURE__ */ jsx26(
17851
+ /* @__PURE__ */ jsx28(base_control_default.VisualLabel, { style: { margin: 0 }, children: __36("Hidden") }),
17852
+ /* @__PURE__ */ jsx28(
17632
17853
  component_default14,
17633
17854
  {
17634
17855
  className: "dataviews-view-config__properties",
@@ -17636,7 +17857,7 @@ function FieldControl() {
17636
17857
  children: /* @__PURE__ */ jsxs17(component_default23, { isBordered: true, isSeparated: true, children: [
17637
17858
  hiddenLockedFields.length > 0 && hiddenLockedFields.map(
17638
17859
  ({ field, isVisibleFlag, ui }) => {
17639
- return ui ?? /* @__PURE__ */ jsx26(
17860
+ return ui ?? /* @__PURE__ */ jsx28(
17640
17861
  FieldItem,
17641
17862
  {
17642
17863
  field,
@@ -17653,7 +17874,7 @@ function FieldControl() {
17653
17874
  );
17654
17875
  }
17655
17876
  ),
17656
- hiddenFields.map((field) => /* @__PURE__ */ jsx26(
17877
+ hiddenFields.map((field) => /* @__PURE__ */ jsx28(
17657
17878
  RegularFieldItem,
17658
17879
  {
17659
17880
  field,
@@ -17675,7 +17896,7 @@ function SettingsSection({
17675
17896
  }) {
17676
17897
  return /* @__PURE__ */ jsxs17(component_default16, { columns: 12, className: "dataviews-settings-section", gap: 4, children: [
17677
17898
  /* @__PURE__ */ jsxs17("div", { className: "dataviews-settings-section__sidebar", children: [
17678
- /* @__PURE__ */ jsx26(
17899
+ /* @__PURE__ */ jsx28(
17679
17900
  component_default15,
17680
17901
  {
17681
17902
  level: 2,
@@ -17683,7 +17904,7 @@ function SettingsSection({
17683
17904
  children: title
17684
17905
  }
17685
17906
  ),
17686
- description && /* @__PURE__ */ jsx26(
17907
+ description && /* @__PURE__ */ jsx28(
17687
17908
  component_default8,
17688
17909
  {
17689
17910
  variant: "muted",
@@ -17692,7 +17913,7 @@ function SettingsSection({
17692
17913
  }
17693
17914
  )
17694
17915
  ] }),
17695
- /* @__PURE__ */ jsx26(
17916
+ /* @__PURE__ */ jsx28(
17696
17917
  component_default16,
17697
17918
  {
17698
17919
  columns: 8,
@@ -17712,7 +17933,7 @@ function DataviewsViewConfigDropdown() {
17712
17933
  const activeLayout = VIEW_LAYOUTS.find(
17713
17934
  (layout) => layout.type === view.type
17714
17935
  );
17715
- return /* @__PURE__ */ jsx26(
17936
+ return /* @__PURE__ */ jsx28(
17716
17937
  dropdown_default,
17717
17938
  {
17718
17939
  expandOnMobile: true,
@@ -17721,7 +17942,7 @@ function DataviewsViewConfigDropdown() {
17721
17942
  id: popoverId
17722
17943
  },
17723
17944
  renderToggle: ({ onToggle, isOpen }) => {
17724
- return /* @__PURE__ */ jsx26(
17945
+ return /* @__PURE__ */ jsx28(
17725
17946
  button_default,
17726
17947
  {
17727
17948
  size: "compact",
@@ -17733,7 +17954,7 @@ function DataviewsViewConfigDropdown() {
17733
17954
  }
17734
17955
  );
17735
17956
  },
17736
- renderContent: () => /* @__PURE__ */ jsx26(
17957
+ renderContent: () => /* @__PURE__ */ jsx28(
17737
17958
  dropdown_content_wrapper_default,
17738
17959
  {
17739
17960
  paddingSize: "medium",
@@ -17741,14 +17962,14 @@ function DataviewsViewConfigDropdown() {
17741
17962
  children: /* @__PURE__ */ jsxs17(component_default14, { className: "dataviews-view-config", spacing: 6, children: [
17742
17963
  /* @__PURE__ */ jsxs17(SettingsSection, { title: __36("Appearance"), children: [
17743
17964
  /* @__PURE__ */ jsxs17(component_default9, { expanded: true, className: "is-divided-in-two", children: [
17744
- /* @__PURE__ */ jsx26(SortFieldControl, {}),
17745
- /* @__PURE__ */ jsx26(SortDirectionControl, {})
17965
+ /* @__PURE__ */ jsx28(SortFieldControl, {}),
17966
+ /* @__PURE__ */ jsx28(SortDirectionControl, {})
17746
17967
  ] }),
17747
- !!activeLayout?.viewConfigOptions && /* @__PURE__ */ jsx26(activeLayout.viewConfigOptions, {}),
17748
- /* @__PURE__ */ jsx26(InfiniteScrollToggle, {}),
17749
- /* @__PURE__ */ jsx26(ItemsPerPageControl, {})
17968
+ !!activeLayout?.viewConfigOptions && /* @__PURE__ */ jsx28(activeLayout.viewConfigOptions, {}),
17969
+ /* @__PURE__ */ jsx28(InfiniteScrollToggle, {}),
17970
+ /* @__PURE__ */ jsx28(ItemsPerPageControl, {})
17750
17971
  ] }),
17751
- /* @__PURE__ */ jsx26(SettingsSection, { title: __36("Properties"), children: /* @__PURE__ */ jsx26(FieldControl, {}) })
17972
+ /* @__PURE__ */ jsx28(SettingsSection, { title: __36("Properties"), children: /* @__PURE__ */ jsx28(FieldControl, {}) })
17752
17973
  ] })
17753
17974
  }
17754
17975
  )
@@ -17757,8 +17978,8 @@ function DataviewsViewConfigDropdown() {
17757
17978
  }
17758
17979
  function _DataViewsViewConfig() {
17759
17980
  return /* @__PURE__ */ jsxs17(Fragment9, { children: [
17760
- /* @__PURE__ */ jsx26(ViewTypeMenu, {}),
17761
- /* @__PURE__ */ jsx26(DataviewsViewConfigDropdown, {})
17981
+ /* @__PURE__ */ jsx28(ViewTypeMenu, {}),
17982
+ /* @__PURE__ */ jsx28(DataviewsViewConfigDropdown, {})
17762
17983
  ] });
17763
17984
  }
17764
17985
  var DataViewsViewConfig = memo(_DataViewsViewConfig);
@@ -18127,12 +18348,6 @@ var arrayFieldType = {
18127
18348
  if (!value.every((v) => typeof v === "string")) {
18128
18349
  return __44("Every value must be a string.");
18129
18350
  }
18130
- if (field?.elements) {
18131
- const validValues = field.elements.map((f) => f.value);
18132
- if (!value.every((v) => validValues.includes(v))) {
18133
- return __44("Value must be one of the elements.");
18134
- }
18135
- }
18136
18351
  return null;
18137
18352
  }
18138
18353
  },
@@ -18223,7 +18438,7 @@ var telephone_default = {
18223
18438
  // src/field-types/color.tsx
18224
18439
  import { colord as colord4 } from "colord";
18225
18440
  import { __ as __47 } from "@wordpress/i18n";
18226
- import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
18441
+ import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
18227
18442
  function sort11(valueA, valueB, direction) {
18228
18443
  const colorA = colord4(valueA);
18229
18444
  const colorB = colord4(valueB);
@@ -18277,7 +18492,7 @@ var color_default = {
18277
18492
  {
18278
18493
  style: { display: "flex", alignItems: "center", gap: "8px" },
18279
18494
  children: [
18280
- /* @__PURE__ */ jsx27(
18495
+ /* @__PURE__ */ jsx29(
18281
18496
  "div",
18282
18497
  {
18283
18498
  style: {
@@ -18290,7 +18505,7 @@ var color_default = {
18290
18505
  }
18291
18506
  }
18292
18507
  ),
18293
- /* @__PURE__ */ jsx27("span", { children: value })
18508
+ /* @__PURE__ */ jsx29("span", { children: value })
18294
18509
  ]
18295
18510
  }
18296
18511
  );
@@ -18416,7 +18631,7 @@ function getFieldTypeDefinition(type) {
18416
18631
 
18417
18632
  // src/dataform-controls/checkbox.tsx
18418
18633
  import deepMerge from "deepmerge";
18419
- import { jsx as jsx28 } from "react/jsx-runtime";
18634
+ import { jsx as jsx30 } from "react/jsx-runtime";
18420
18635
  var { ValidatedCheckboxControl: ValidatedCheckboxControl2 } = unlock3(privateApis);
18421
18636
  function Checkbox({
18422
18637
  field,
@@ -18454,7 +18669,7 @@ function Checkbox({
18454
18669
  },
18455
18670
  [data, field, setValue]
18456
18671
  );
18457
- return /* @__PURE__ */ jsx28(
18672
+ return /* @__PURE__ */ jsx30(
18458
18673
  ValidatedCheckboxControl2,
18459
18674
  {
18460
18675
  required: !!field.isValid?.required,
@@ -18477,7 +18692,7 @@ import { format, isValid } from "date-fns";
18477
18692
  // src/dataform-controls/relative-date-control.tsx
18478
18693
  import clsx37 from "clsx";
18479
18694
  import { __ as __50 } from "@wordpress/i18n";
18480
- import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
18695
+ import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
18481
18696
  var TIME_UNITS_OPTIONS = {
18482
18697
  [OPERATOR_IN_THE_PAST]: [
18483
18698
  { value: "days", label: __50("Days") },
@@ -18510,7 +18725,7 @@ function RelativeDateControl({
18510
18725
  (newUnit) => onChange({ value: relValue, unit: newUnit }),
18511
18726
  [onChange, relValue]
18512
18727
  );
18513
- return /* @__PURE__ */ jsx29(
18728
+ return /* @__PURE__ */ jsx31(
18514
18729
  base_control_default,
18515
18730
  {
18516
18731
  id,
@@ -18519,7 +18734,7 @@ function RelativeDateControl({
18519
18734
  label,
18520
18735
  hideLabelFromVision,
18521
18736
  children: /* @__PURE__ */ jsxs19(component_default9, { spacing: 2.5, children: [
18522
- /* @__PURE__ */ jsx29(
18737
+ /* @__PURE__ */ jsx31(
18523
18738
  number_control_default,
18524
18739
  {
18525
18740
  __next40pxDefaultSize: true,
@@ -18531,7 +18746,7 @@ function RelativeDateControl({
18531
18746
  onChange: onChangeValue
18532
18747
  }
18533
18748
  ),
18534
- /* @__PURE__ */ jsx29(
18749
+ /* @__PURE__ */ jsx31(
18535
18750
  select_control_default,
18536
18751
  {
18537
18752
  className: "dataviews-controls__relative-date-unit",
@@ -18550,7 +18765,7 @@ function RelativeDateControl({
18550
18765
  }
18551
18766
 
18552
18767
  // src/dataform-controls/datetime.tsx
18553
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
18768
+ import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
18554
18769
  var { DateCalendar: DateCalendar2 } = unlock3(privateApis);
18555
18770
  var parseDateTime = (dateTimeString) => {
18556
18771
  if (!dateTimeString) {
@@ -18621,7 +18836,7 @@ function CalendarDateTimeControl({
18621
18836
  timezone: { string: timezoneString },
18622
18837
  l10n: { startOfWeek }
18623
18838
  } = getSettings2();
18624
- return /* @__PURE__ */ jsx30(
18839
+ return /* @__PURE__ */ jsx32(
18625
18840
  base_control_default,
18626
18841
  {
18627
18842
  __nextHasNoMarginBottom: true,
@@ -18630,7 +18845,7 @@ function CalendarDateTimeControl({
18630
18845
  help: description,
18631
18846
  hideLabelFromVision,
18632
18847
  children: /* @__PURE__ */ jsxs20(component_default14, { spacing: 4, children: [
18633
- /* @__PURE__ */ jsx30(
18848
+ /* @__PURE__ */ jsx32(
18634
18849
  DateCalendar2,
18635
18850
  {
18636
18851
  style: { width: "100%" },
@@ -18642,7 +18857,7 @@ function CalendarDateTimeControl({
18642
18857
  weekStartsOn: startOfWeek
18643
18858
  }
18644
18859
  ),
18645
- /* @__PURE__ */ jsx30(
18860
+ /* @__PURE__ */ jsx32(
18646
18861
  input_control_default,
18647
18862
  {
18648
18863
  __next40pxDefaultSize: true,
@@ -18677,7 +18892,7 @@ function DateTime({
18677
18892
  [data, onChange, setValue]
18678
18893
  );
18679
18894
  if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
18680
- return /* @__PURE__ */ jsx30(
18895
+ return /* @__PURE__ */ jsx32(
18681
18896
  RelativeDateControl,
18682
18897
  {
18683
18898
  className: "dataviews-controls__datetime",
@@ -18690,7 +18905,7 @@ function DateTime({
18690
18905
  }
18691
18906
  );
18692
18907
  }
18693
- return /* @__PURE__ */ jsx30(
18908
+ return /* @__PURE__ */ jsx32(
18694
18909
  CalendarDateTimeControl,
18695
18910
  {
18696
18911
  id,
@@ -18715,7 +18930,7 @@ import {
18715
18930
  startOfMonth,
18716
18931
  startOfYear
18717
18932
  } from "date-fns";
18718
- import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
18933
+ import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
18719
18934
  var { DateCalendar: DateCalendar3, DateRangeCalendar: DateRangeCalendar2 } = unlock3(privateApis);
18720
18935
  var DATE_PRESETS = [
18721
18936
  {
@@ -18853,7 +19068,7 @@ function CalendarDateControl({
18853
19068
  timezone: { string: timezoneString },
18854
19069
  l10n: { startOfWeek }
18855
19070
  } = getSettings3();
18856
- return /* @__PURE__ */ jsx31(
19071
+ return /* @__PURE__ */ jsx33(
18857
19072
  base_control_default,
18858
19073
  {
18859
19074
  __nextHasNoMarginBottom: true,
@@ -18865,7 +19080,7 @@ function CalendarDateControl({
18865
19080
  /* @__PURE__ */ jsxs21(component_default9, { spacing: 2, wrap: true, justify: "flex-start", children: [
18866
19081
  DATE_PRESETS.map((preset) => {
18867
19082
  const isSelected = selectedPresetId === preset.id;
18868
- return /* @__PURE__ */ jsx31(
19083
+ return /* @__PURE__ */ jsx33(
18869
19084
  button_default,
18870
19085
  {
18871
19086
  className: "dataviews-controls__date-preset",
@@ -18878,7 +19093,7 @@ function CalendarDateControl({
18878
19093
  preset.id
18879
19094
  );
18880
19095
  }),
18881
- /* @__PURE__ */ jsx31(
19096
+ /* @__PURE__ */ jsx33(
18882
19097
  button_default,
18883
19098
  {
18884
19099
  className: "dataviews-controls__date-preset",
@@ -18891,7 +19106,7 @@ function CalendarDateControl({
18891
19106
  }
18892
19107
  )
18893
19108
  ] }),
18894
- /* @__PURE__ */ jsx31(
19109
+ /* @__PURE__ */ jsx33(
18895
19110
  input_control_default,
18896
19111
  {
18897
19112
  __next40pxDefaultSize: true,
@@ -18902,7 +19117,7 @@ function CalendarDateControl({
18902
19117
  onChange: handleManualDateChange
18903
19118
  }
18904
19119
  ),
18905
- /* @__PURE__ */ jsx31(
19120
+ /* @__PURE__ */ jsx33(
18906
19121
  DateCalendar3,
18907
19122
  {
18908
19123
  style: { width: "100%" },
@@ -18988,7 +19203,7 @@ function CalendarDateRangeControl({
18988
19203
  [value, updateDateRange]
18989
19204
  );
18990
19205
  const { timezone, l10n } = getSettings3();
18991
- return /* @__PURE__ */ jsx31(
19206
+ return /* @__PURE__ */ jsx33(
18992
19207
  base_control_default,
18993
19208
  {
18994
19209
  __nextHasNoMarginBottom: true,
@@ -19000,7 +19215,7 @@ function CalendarDateRangeControl({
19000
19215
  /* @__PURE__ */ jsxs21(component_default9, { spacing: 2, wrap: true, justify: "flex-start", children: [
19001
19216
  DATE_RANGE_PRESETS.map((preset) => {
19002
19217
  const isSelected = selectedPresetId === preset.id;
19003
- return /* @__PURE__ */ jsx31(
19218
+ return /* @__PURE__ */ jsx33(
19004
19219
  button_default,
19005
19220
  {
19006
19221
  className: "dataviews-controls__date-preset",
@@ -19013,7 +19228,7 @@ function CalendarDateRangeControl({
19013
19228
  preset.id
19014
19229
  );
19015
19230
  }),
19016
- /* @__PURE__ */ jsx31(
19231
+ /* @__PURE__ */ jsx33(
19017
19232
  button_default,
19018
19233
  {
19019
19234
  className: "dataviews-controls__date-preset",
@@ -19027,7 +19242,7 @@ function CalendarDateRangeControl({
19027
19242
  )
19028
19243
  ] }),
19029
19244
  /* @__PURE__ */ jsxs21(component_default9, { spacing: 2, children: [
19030
- /* @__PURE__ */ jsx31(
19245
+ /* @__PURE__ */ jsx33(
19031
19246
  input_control_default,
19032
19247
  {
19033
19248
  __next40pxDefaultSize: true,
@@ -19038,7 +19253,7 @@ function CalendarDateRangeControl({
19038
19253
  onChange: (newValue) => handleManualDateChange("from", newValue)
19039
19254
  }
19040
19255
  ),
19041
- /* @__PURE__ */ jsx31(
19256
+ /* @__PURE__ */ jsx33(
19042
19257
  input_control_default,
19043
19258
  {
19044
19259
  __next40pxDefaultSize: true,
@@ -19050,7 +19265,7 @@ function CalendarDateRangeControl({
19050
19265
  }
19051
19266
  )
19052
19267
  ] }),
19053
- /* @__PURE__ */ jsx31(
19268
+ /* @__PURE__ */ jsx33(
19054
19269
  DateRangeCalendar2,
19055
19270
  {
19056
19271
  style: { width: "100%" },
@@ -19097,7 +19312,7 @@ function DateControl({
19097
19312
  [data, onChange, setValue]
19098
19313
  );
19099
19314
  if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
19100
- return /* @__PURE__ */ jsx31(
19315
+ return /* @__PURE__ */ jsx33(
19101
19316
  RelativeDateControl,
19102
19317
  {
19103
19318
  className: "dataviews-controls__date",
@@ -19115,7 +19330,7 @@ function DateControl({
19115
19330
  if (Array.isArray(value) && value.length === 2 && value.every((date) => typeof date === "string")) {
19116
19331
  dateRangeValue = value;
19117
19332
  }
19118
- return /* @__PURE__ */ jsx31(
19333
+ return /* @__PURE__ */ jsx33(
19119
19334
  CalendarDateRangeControl,
19120
19335
  {
19121
19336
  className: "dataviews-controls__date",
@@ -19127,7 +19342,7 @@ function DateControl({
19127
19342
  }
19128
19343
  );
19129
19344
  }
19130
- return /* @__PURE__ */ jsx31(
19345
+ return /* @__PURE__ */ jsx33(
19131
19346
  CalendarDateControl,
19132
19347
  {
19133
19348
  className: "dataviews-controls__date",
@@ -19142,7 +19357,7 @@ function DateControl({
19142
19357
 
19143
19358
  // src/dataform-controls/utils/validated-input.tsx
19144
19359
  import deepMerge2 from "deepmerge";
19145
- import { jsx as jsx32 } from "react/jsx-runtime";
19360
+ import { jsx as jsx34 } from "react/jsx-runtime";
19146
19361
  var { ValidatedInputControl: ValidatedInputControl2 } = unlock3(privateApis);
19147
19362
  function ValidatedText({
19148
19363
  data,
@@ -19188,7 +19403,7 @@ function ValidatedText({
19188
19403
  },
19189
19404
  [data, field, isValid3, setValue]
19190
19405
  );
19191
- return /* @__PURE__ */ jsx32(
19406
+ return /* @__PURE__ */ jsx34(
19192
19407
  ValidatedInputControl2,
19193
19408
  {
19194
19409
  required: !!isValid3?.required,
@@ -19209,14 +19424,14 @@ function ValidatedText({
19209
19424
  }
19210
19425
 
19211
19426
  // src/dataform-controls/email.tsx
19212
- import { jsx as jsx33 } from "react/jsx-runtime";
19427
+ import { jsx as jsx35 } from "react/jsx-runtime";
19213
19428
  function Email({
19214
19429
  data,
19215
19430
  field,
19216
19431
  onChange,
19217
19432
  hideLabelFromVision
19218
19433
  }) {
19219
- return /* @__PURE__ */ jsx33(
19434
+ return /* @__PURE__ */ jsx35(
19220
19435
  ValidatedText,
19221
19436
  {
19222
19437
  ...{
@@ -19225,21 +19440,21 @@ function Email({
19225
19440
  onChange,
19226
19441
  hideLabelFromVision,
19227
19442
  type: "email",
19228
- prefix: /* @__PURE__ */ jsx33(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx33(icon_default2, { icon: at_symbol_default }) })
19443
+ prefix: /* @__PURE__ */ jsx35(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx35(icon_default2, { icon: at_symbol_default }) })
19229
19444
  }
19230
19445
  }
19231
19446
  );
19232
19447
  }
19233
19448
 
19234
19449
  // src/dataform-controls/telephone.tsx
19235
- import { jsx as jsx34 } from "react/jsx-runtime";
19450
+ import { jsx as jsx36 } from "react/jsx-runtime";
19236
19451
  function Telephone({
19237
19452
  data,
19238
19453
  field,
19239
19454
  onChange,
19240
19455
  hideLabelFromVision
19241
19456
  }) {
19242
- return /* @__PURE__ */ jsx34(
19457
+ return /* @__PURE__ */ jsx36(
19243
19458
  ValidatedText,
19244
19459
  {
19245
19460
  ...{
@@ -19248,21 +19463,21 @@ function Telephone({
19248
19463
  onChange,
19249
19464
  hideLabelFromVision,
19250
19465
  type: "tel",
19251
- prefix: /* @__PURE__ */ jsx34(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx34(icon_default2, { icon: mobile_default }) })
19466
+ prefix: /* @__PURE__ */ jsx36(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx36(icon_default2, { icon: mobile_default }) })
19252
19467
  }
19253
19468
  }
19254
19469
  );
19255
19470
  }
19256
19471
 
19257
19472
  // src/dataform-controls/url.tsx
19258
- import { jsx as jsx35 } from "react/jsx-runtime";
19473
+ import { jsx as jsx37 } from "react/jsx-runtime";
19259
19474
  function Url({
19260
19475
  data,
19261
19476
  field,
19262
19477
  onChange,
19263
19478
  hideLabelFromVision
19264
19479
  }) {
19265
- return /* @__PURE__ */ jsx35(
19480
+ return /* @__PURE__ */ jsx37(
19266
19481
  ValidatedText,
19267
19482
  {
19268
19483
  ...{
@@ -19271,7 +19486,7 @@ function Url({
19271
19486
  onChange,
19272
19487
  hideLabelFromVision,
19273
19488
  type: "url",
19274
- prefix: /* @__PURE__ */ jsx35(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx35(icon_default2, { icon: link_default }) })
19489
+ prefix: /* @__PURE__ */ jsx37(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx37(icon_default2, { icon: link_default }) })
19275
19490
  }
19276
19491
  }
19277
19492
  );
@@ -19280,7 +19495,7 @@ function Url({
19280
19495
  // src/dataform-controls/integer.tsx
19281
19496
  import deepMerge3 from "deepmerge";
19282
19497
  import { __ as __53 } from "@wordpress/i18n";
19283
- import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
19498
+ import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
19284
19499
  var { ValidatedNumberControl: ValidatedNumberControl2 } = unlock3(privateApis);
19285
19500
  function BetweenControls({
19286
19501
  value,
@@ -19296,13 +19511,13 @@ function BetweenControls({
19296
19511
  (newValue) => onChange([min, Number(newValue)]),
19297
19512
  [onChange, min]
19298
19513
  );
19299
- return /* @__PURE__ */ jsx36(
19514
+ return /* @__PURE__ */ jsx38(
19300
19515
  base_control_default,
19301
19516
  {
19302
19517
  __nextHasNoMarginBottom: true,
19303
19518
  help: __53("The max. value must be greater than the min. value."),
19304
19519
  children: /* @__PURE__ */ jsxs22(component_default3, { direction: "row", gap: 4, children: [
19305
- /* @__PURE__ */ jsx36(
19520
+ /* @__PURE__ */ jsx38(
19306
19521
  number_control_default,
19307
19522
  {
19308
19523
  label: __53("Min."),
@@ -19313,7 +19528,7 @@ function BetweenControls({
19313
19528
  hideLabelFromVision
19314
19529
  }
19315
19530
  ),
19316
- /* @__PURE__ */ jsx36(
19531
+ /* @__PURE__ */ jsx38(
19317
19532
  number_control_default,
19318
19533
  {
19319
19534
  label: __53("Max."),
@@ -19393,7 +19608,7 @@ function Integer({
19393
19608
  )) {
19394
19609
  valueBetween = value;
19395
19610
  }
19396
- return /* @__PURE__ */ jsx36(
19611
+ return /* @__PURE__ */ jsx38(
19397
19612
  BetweenControls,
19398
19613
  {
19399
19614
  value: valueBetween,
@@ -19402,7 +19617,7 @@ function Integer({
19402
19617
  }
19403
19618
  );
19404
19619
  }
19405
- return /* @__PURE__ */ jsx36(
19620
+ return /* @__PURE__ */ jsx38(
19406
19621
  ValidatedNumberControl2,
19407
19622
  {
19408
19623
  required: !!field.isValid?.required,
@@ -19420,7 +19635,7 @@ function Integer({
19420
19635
 
19421
19636
  // src/dataform-controls/radio.tsx
19422
19637
  import deepMerge4 from "deepmerge";
19423
- import { jsx as jsx37 } from "react/jsx-runtime";
19638
+ import { jsx as jsx39 } from "react/jsx-runtime";
19424
19639
  var { ValidatedRadioControl: ValidatedRadioControl2 } = unlock3(privateApis);
19425
19640
  function Radio2({
19426
19641
  data,
@@ -19459,7 +19674,7 @@ function Radio2({
19459
19674
  [data, field, setValue]
19460
19675
  );
19461
19676
  if (elements) {
19462
- return /* @__PURE__ */ jsx37(
19677
+ return /* @__PURE__ */ jsx39(
19463
19678
  ValidatedRadioControl2,
19464
19679
  {
19465
19680
  required: !!field.isValid?.required,
@@ -19480,7 +19695,7 @@ function Radio2({
19480
19695
  // src/dataform-controls/select.tsx
19481
19696
  import deepMerge5 from "deepmerge";
19482
19697
  import { __ as __54 } from "@wordpress/i18n";
19483
- import { jsx as jsx38 } from "react/jsx-runtime";
19698
+ import { jsx as jsx40 } from "react/jsx-runtime";
19484
19699
  var { ValidatedSelectControl: ValidatedSelectControl2 } = unlock3(privateApis);
19485
19700
  function Select2({
19486
19701
  data,
@@ -19534,7 +19749,7 @@ function Select2({
19534
19749
  { label: __54("Select item"), value: "" },
19535
19750
  ...fieldElements
19536
19751
  ];
19537
- return /* @__PURE__ */ jsx38(
19752
+ return /* @__PURE__ */ jsx40(
19538
19753
  ValidatedSelectControl2,
19539
19754
  {
19540
19755
  required: !!field.isValid?.required,
@@ -19554,7 +19769,7 @@ function Select2({
19554
19769
  }
19555
19770
 
19556
19771
  // src/dataform-controls/text.tsx
19557
- import { jsx as jsx39 } from "react/jsx-runtime";
19772
+ import { jsx as jsx41 } from "react/jsx-runtime";
19558
19773
  function Text3({
19559
19774
  data,
19560
19775
  field,
@@ -19563,7 +19778,7 @@ function Text3({
19563
19778
  config
19564
19779
  }) {
19565
19780
  const { prefix, suffix } = config || {};
19566
- return /* @__PURE__ */ jsx39(
19781
+ return /* @__PURE__ */ jsx41(
19567
19782
  ValidatedText,
19568
19783
  {
19569
19784
  ...{
@@ -19580,7 +19795,7 @@ function Text3({
19580
19795
 
19581
19796
  // src/dataform-controls/toggle.tsx
19582
19797
  import deepMerge6 from "deepmerge";
19583
- import { jsx as jsx40 } from "react/jsx-runtime";
19798
+ import { jsx as jsx42 } from "react/jsx-runtime";
19584
19799
  var { ValidatedToggleControl: ValidatedToggleControl2 } = unlock3(privateApis);
19585
19800
  function Toggle({
19586
19801
  field,
@@ -19618,7 +19833,7 @@ function Toggle({
19618
19833
  },
19619
19834
  [data, field, setValue]
19620
19835
  );
19621
- return /* @__PURE__ */ jsx40(
19836
+ return /* @__PURE__ */ jsx42(
19622
19837
  ValidatedToggleControl2,
19623
19838
  {
19624
19839
  required: !!field.isValid.required,
@@ -19636,7 +19851,7 @@ function Toggle({
19636
19851
 
19637
19852
  // src/dataform-controls/textarea.tsx
19638
19853
  import deepMerge7 from "deepmerge";
19639
- import { jsx as jsx41 } from "react/jsx-runtime";
19854
+ import { jsx as jsx43 } from "react/jsx-runtime";
19640
19855
  var { ValidatedTextareaControl: ValidatedTextareaControl2 } = unlock3(privateApis);
19641
19856
  function Textarea({
19642
19857
  data,
@@ -19676,7 +19891,7 @@ function Textarea({
19676
19891
  },
19677
19892
  [data, field, setValue]
19678
19893
  );
19679
- return /* @__PURE__ */ jsx41(
19894
+ return /* @__PURE__ */ jsx43(
19680
19895
  ValidatedTextareaControl2,
19681
19896
  {
19682
19897
  required: !!field.isValid?.required,
@@ -19697,7 +19912,7 @@ function Textarea({
19697
19912
 
19698
19913
  // src/dataform-controls/toggle-group.tsx
19699
19914
  import deepMerge8 from "deepmerge";
19700
- import { jsx as jsx42 } from "react/jsx-runtime";
19915
+ import { jsx as jsx44 } from "react/jsx-runtime";
19701
19916
  var { ValidatedToggleGroupControl: ValidatedToggleGroupControl2 } = unlock3(privateApis);
19702
19917
  function ToggleGroup({
19703
19918
  data,
@@ -19739,7 +19954,7 @@ function ToggleGroup({
19739
19954
  const selectedOption = field.elements.find(
19740
19955
  (el) => el.value === value
19741
19956
  );
19742
- return /* @__PURE__ */ jsx42(
19957
+ return /* @__PURE__ */ jsx44(
19743
19958
  ValidatedToggleGroupControl2,
19744
19959
  {
19745
19960
  required: !!field.isValid?.required,
@@ -19753,7 +19968,7 @@ function ToggleGroup({
19753
19968
  onChange: onChangeControl,
19754
19969
  value,
19755
19970
  hideLabelFromVision,
19756
- children: field.elements.map((el) => /* @__PURE__ */ jsx42(
19971
+ children: field.elements.map((el) => /* @__PURE__ */ jsx44(
19757
19972
  component_default12,
19758
19973
  {
19759
19974
  label: el.label,
@@ -19768,7 +19983,10 @@ function ToggleGroup({
19768
19983
  }
19769
19984
 
19770
19985
  // src/dataform-controls/array.tsx
19771
- import { jsx as jsx43 } from "react/jsx-runtime";
19986
+ import deepMerge9 from "deepmerge";
19987
+ import { _n as _n4, sprintf as sprintf15 } from "@wordpress/i18n";
19988
+ import { jsx as jsx45 } from "react/jsx-runtime";
19989
+ var { ValidatedFormTokenField: ValidatedFormTokenField2 } = unlock3(privateApis);
19772
19990
  function ArrayControl({
19773
19991
  data,
19774
19992
  field,
@@ -19777,71 +19995,141 @@ function ArrayControl({
19777
19995
  }) {
19778
19996
  const { label, placeholder, elements, getValue, setValue } = field;
19779
19997
  const value = getValue({ item: data });
19780
- const findElementByValue = useCallback(
19781
- (suggestionValue) => {
19782
- return elements?.find(
19783
- (suggestion) => suggestion.value === suggestionValue
19998
+ const [customValidity, setCustomValidity] = useState(void 0);
19999
+ const arrayValueAsElements = useMemo(
20000
+ () => Array.isArray(value) ? value.map((token) => {
20001
+ const element = elements?.find(
20002
+ (suggestion) => suggestion.value === token
19784
20003
  );
19785
- },
19786
- [elements]
20004
+ return element || { value: token, label: token };
20005
+ }) : [],
20006
+ [value, elements]
19787
20007
  );
19788
- const findElementByLabel = useCallback(
19789
- (suggestionLabel) => {
19790
- return elements?.find(
19791
- (suggestion) => suggestion.label === suggestionLabel
19792
- );
20008
+ const validateTokens = useCallback(
20009
+ (tokens) => {
20010
+ const tokenValues = tokens.map((token) => {
20011
+ if (typeof token === "object" && "value" in token) {
20012
+ return token.value;
20013
+ }
20014
+ return token;
20015
+ });
20016
+ if (field.isValid?.elements && elements) {
20017
+ const invalidTokens = tokenValues.filter((tokenValue) => {
20018
+ return !elements.some(
20019
+ (element) => element.value === tokenValue
20020
+ );
20021
+ });
20022
+ if (invalidTokens.length > 0) {
20023
+ setCustomValidity({
20024
+ type: "invalid",
20025
+ message: sprintf15(
20026
+ /* translators: %s: list of invalid tokens */
20027
+ _n4(
20028
+ "Please select from the available options: %s is invalid.",
20029
+ "Please select from the available options: %s are invalid.",
20030
+ invalidTokens.length
20031
+ ),
20032
+ invalidTokens.join(", ")
20033
+ )
20034
+ });
20035
+ return;
20036
+ }
20037
+ }
20038
+ if (field.isValid?.custom) {
20039
+ const result = field.isValid?.custom?.(
20040
+ deepMerge9(
20041
+ data,
20042
+ setValue({
20043
+ item: data,
20044
+ value: tokenValues
20045
+ })
20046
+ ),
20047
+ field
20048
+ );
20049
+ if (result) {
20050
+ setCustomValidity({
20051
+ type: "invalid",
20052
+ message: result
20053
+ });
20054
+ return;
20055
+ }
20056
+ }
20057
+ setCustomValidity(void 0);
19793
20058
  },
19794
- [elements]
19795
- );
19796
- const arrayValue = useMemo(
19797
- () => Array.isArray(value) ? value.map((token) => {
19798
- const tokenLabel = findElementByValue(token)?.label;
19799
- return tokenLabel || token;
19800
- }) : [],
19801
- [value, findElementByValue]
20059
+ [elements, data, field, setValue]
19802
20060
  );
19803
20061
  const onChangeControl = useCallback(
19804
20062
  (tokens) => {
19805
- const stringTokens = tokens.map((token) => {
19806
- if (typeof token !== "string") {
20063
+ const valueTokens = tokens.map((token) => {
20064
+ if (typeof token === "object" && "value" in token) {
19807
20065
  return token.value;
19808
20066
  }
19809
- const tokenByLabel = findElementByLabel(token);
19810
- return tokenByLabel?.value || token;
20067
+ return token;
19811
20068
  });
19812
- onChange(setValue({ item: data, value: stringTokens }));
20069
+ onChange(setValue({ item: data, value: valueTokens }));
19813
20070
  },
19814
- [onChange, setValue, data, findElementByLabel]
20071
+ [onChange, setValue, data]
19815
20072
  );
19816
- return /* @__PURE__ */ jsx43(
19817
- form_token_field_default,
20073
+ return /* @__PURE__ */ jsx45(
20074
+ ValidatedFormTokenField2,
19818
20075
  {
20076
+ required: !!field.isValid?.required,
20077
+ onValidate: validateTokens,
20078
+ customValidity,
19819
20079
  label: hideLabelFromVision ? void 0 : label,
19820
- value: arrayValue,
20080
+ value: arrayValueAsElements,
19821
20081
  onChange: onChangeControl,
19822
20082
  placeholder,
19823
- suggestions: elements?.map((suggestion) => suggestion.label) ?? [],
20083
+ suggestions: elements?.map((element) => element.value),
20084
+ __experimentalValidateInput: (token) => {
20085
+ if (field.isValid?.elements && elements) {
20086
+ return elements.some(
20087
+ (element) => element.value === token || element.label === token
20088
+ );
20089
+ }
20090
+ return true;
20091
+ },
19824
20092
  __experimentalExpandOnFocus: elements && elements.length > 0,
19825
- __next40pxDefaultSize: true,
19826
- __nextHasNoMarginBottom: true
20093
+ __experimentalShowHowTo: !field.isValid?.elements,
20094
+ displayTransform: (token) => {
20095
+ if (typeof token === "object" && "label" in token) {
20096
+ return token.label;
20097
+ }
20098
+ if (typeof token === "string" && elements) {
20099
+ const element = elements.find(
20100
+ (el) => el.value === token
20101
+ );
20102
+ return element?.label || token;
20103
+ }
20104
+ return token;
20105
+ },
20106
+ __experimentalRenderItem: ({ item: item2 }) => {
20107
+ if (typeof item2 === "string" && elements) {
20108
+ const element = elements.find(
20109
+ (el) => el.value === item2
20110
+ );
20111
+ return /* @__PURE__ */ jsx45("span", { children: element?.label || item2 });
20112
+ }
20113
+ return /* @__PURE__ */ jsx45("span", { children: item2 });
20114
+ }
19827
20115
  }
19828
20116
  );
19829
20117
  }
19830
20118
 
19831
20119
  // src/dataform-controls/color.tsx
19832
20120
  import { colord as colord5 } from "colord";
19833
- import deepMerge9 from "deepmerge";
19834
- import { jsx as jsx44 } from "react/jsx-runtime";
20121
+ import deepMerge10 from "deepmerge";
20122
+ import { jsx as jsx46 } from "react/jsx-runtime";
19835
20123
  var { ValidatedInputControl: ValidatedInputControl3, Picker: Picker2 } = unlock3(privateApis);
19836
20124
  var ColorPicker = ({
19837
20125
  color,
19838
20126
  onColorChange
19839
20127
  }) => {
19840
20128
  const validColor = color && colord5(color).isValid() ? color : "#ffffff";
19841
- return /* @__PURE__ */ jsx44(
20129
+ return /* @__PURE__ */ jsx46(
19842
20130
  dropdown_default,
19843
20131
  {
19844
- renderToggle: ({ onToggle, isOpen }) => /* @__PURE__ */ jsx44(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx44(
20132
+ renderToggle: ({ onToggle, isOpen }) => /* @__PURE__ */ jsx46(input_prefix_wrapper_default, { variant: "icon", children: /* @__PURE__ */ jsx46(
19845
20133
  "button",
19846
20134
  {
19847
20135
  type: "button",
@@ -19864,7 +20152,7 @@ var ColorPicker = ({
19864
20152
  "aria-label": "Open color picker"
19865
20153
  }
19866
20154
  ) }),
19867
- renderContent: () => /* @__PURE__ */ jsx44("div", { style: { padding: "16px" }, children: /* @__PURE__ */ jsx44(
20155
+ renderContent: () => /* @__PURE__ */ jsx46("div", { style: { padding: "16px" }, children: /* @__PURE__ */ jsx46(
19868
20156
  Picker2,
19869
20157
  {
19870
20158
  color: colord5(validColor),
@@ -19899,7 +20187,7 @@ function Color({
19899
20187
  const onValidateControl = useCallback(
19900
20188
  (newValue) => {
19901
20189
  const message = field.isValid?.custom?.(
19902
- deepMerge9(
20190
+ deepMerge10(
19903
20191
  data,
19904
20192
  setValue({
19905
20193
  item: data,
@@ -19919,7 +20207,7 @@ function Color({
19919
20207
  },
19920
20208
  [data, field, setValue]
19921
20209
  );
19922
- return /* @__PURE__ */ jsx44(
20210
+ return /* @__PURE__ */ jsx46(
19923
20211
  ValidatedInputControl3,
19924
20212
  {
19925
20213
  required: !!field.isValid?.required,
@@ -19932,7 +20220,7 @@ function Color({
19932
20220
  onChange: handleInputChange,
19933
20221
  hideLabelFromVision,
19934
20222
  type: "text",
19935
- prefix: /* @__PURE__ */ jsx44(
20223
+ prefix: /* @__PURE__ */ jsx46(
19936
20224
  ColorPicker,
19937
20225
  {
19938
20226
  color: value,
@@ -19945,7 +20233,7 @@ function Color({
19945
20233
 
19946
20234
  // src/dataform-controls/password.tsx
19947
20235
  import { __ as __55 } from "@wordpress/i18n";
19948
- import { jsx as jsx45 } from "react/jsx-runtime";
20236
+ import { jsx as jsx47 } from "react/jsx-runtime";
19949
20237
  function Password({
19950
20238
  data,
19951
20239
  field,
@@ -19956,7 +20244,7 @@ function Password({
19956
20244
  const toggleVisibility = useCallback(() => {
19957
20245
  setIsVisible((prev) => !prev);
19958
20246
  }, []);
19959
- return /* @__PURE__ */ jsx45(
20247
+ return /* @__PURE__ */ jsx47(
19960
20248
  ValidatedText,
19961
20249
  {
19962
20250
  ...{
@@ -19965,7 +20253,7 @@ function Password({
19965
20253
  onChange,
19966
20254
  hideLabelFromVision,
19967
20255
  type: isVisible2 ? "text" : "password",
19968
- suffix: /* @__PURE__ */ jsx45(
20256
+ suffix: /* @__PURE__ */ jsx47(
19969
20257
  button_default,
19970
20258
  {
19971
20259
  icon: isVisible2 ? unseen_default : seen_default,
@@ -19981,7 +20269,7 @@ function Password({
19981
20269
  }
19982
20270
 
19983
20271
  // src/dataform-controls/index.tsx
19984
- import { jsx as jsx46 } from "react/jsx-runtime";
20272
+ import { jsx as jsx48 } from "react/jsx-runtime";
19985
20273
  var FORM_CONTROLS = {
19986
20274
  array: ArrayControl,
19987
20275
  checkbox: Checkbox,
@@ -20007,7 +20295,7 @@ function createConfiguredControl(config) {
20007
20295
  const { control, ...controlConfig } = config;
20008
20296
  const BaseControlType = getControlByType(control);
20009
20297
  return function ConfiguredControl(props) {
20010
- return /* @__PURE__ */ jsx46(BaseControlType, { ...props, config: controlConfig });
20298
+ return /* @__PURE__ */ jsx48(BaseControlType, { ...props, config: controlConfig });
20011
20299
  };
20012
20300
  }
20013
20301
  function getControl(field, fieldTypeDefinition) {
@@ -20162,10 +20450,10 @@ function normalizeFields(fields) {
20162
20450
  }
20163
20451
 
20164
20452
  // src/components/dataviews/index.tsx
20165
- import { Fragment as Fragment10, jsx as jsx47, jsxs as jsxs23 } from "react/jsx-runtime";
20453
+ import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
20166
20454
  var defaultGetItemId = (item2) => item2.id;
20167
20455
  var defaultIsItemClickable = () => true;
20168
- var EMPTY_ARRAY4 = [];
20456
+ var EMPTY_ARRAY5 = [];
20169
20457
  var dataViewsLayouts = VIEW_LAYOUTS.filter(
20170
20458
  (viewLayout) => !viewLayout.isPicker
20171
20459
  );
@@ -20174,7 +20462,6 @@ function DefaultUI({
20174
20462
  search: search2 = true,
20175
20463
  searchLabel = void 0
20176
20464
  }) {
20177
- const { isShowingFilter } = useContext(dataviews_context_default);
20178
20465
  return /* @__PURE__ */ jsxs23(Fragment10, { children: [
20179
20466
  /* @__PURE__ */ jsxs23(
20180
20467
  component_default9,
@@ -20191,8 +20478,8 @@ function DefaultUI({
20191
20478
  expanded: false,
20192
20479
  className: "dataviews__search",
20193
20480
  children: [
20194
- search2 && /* @__PURE__ */ jsx47(dataviews_search_default, { label: searchLabel }),
20195
- /* @__PURE__ */ jsx47(FiltersToggle, {})
20481
+ search2 && /* @__PURE__ */ jsx49(dataviews_search_default, { label: searchLabel }),
20482
+ /* @__PURE__ */ jsx49(toggle_default, {})
20196
20483
  ]
20197
20484
  }
20198
20485
  ),
@@ -20203,7 +20490,7 @@ function DefaultUI({
20203
20490
  expanded: false,
20204
20491
  style: { flexShrink: 0 },
20205
20492
  children: [
20206
- /* @__PURE__ */ jsx47(dataviews_view_config_default, {}),
20493
+ /* @__PURE__ */ jsx49(dataviews_view_config_default, {}),
20207
20494
  header
20208
20495
  ]
20209
20496
  }
@@ -20211,9 +20498,9 @@ function DefaultUI({
20211
20498
  ]
20212
20499
  }
20213
20500
  ),
20214
- isShowingFilter && /* @__PURE__ */ jsx47(dataviews_filters_default, { className: "dataviews-filters__container" }),
20215
- /* @__PURE__ */ jsx47(DataViewsLayout, {}),
20216
- /* @__PURE__ */ jsx47(DataViewsFooter, {})
20501
+ /* @__PURE__ */ jsx49(filters_toggled_default, { className: "dataviews-filters__container" }),
20502
+ /* @__PURE__ */ jsx49(DataViewsLayout, {}),
20503
+ /* @__PURE__ */ jsx49(DataViewsFooter, {})
20217
20504
  ] });
20218
20505
  }
20219
20506
  function DataViews({
@@ -20222,7 +20509,7 @@ function DataViews({
20222
20509
  fields,
20223
20510
  search: search2 = true,
20224
20511
  searchLabel = void 0,
20225
- actions = EMPTY_ARRAY4,
20512
+ actions = EMPTY_ARRAY5,
20226
20513
  data,
20227
20514
  getItemId = defaultGetItemId,
20228
20515
  getItemLevel,
@@ -20233,7 +20520,7 @@ function DataViews({
20233
20520
  onChangeSelection,
20234
20521
  onClickItem,
20235
20522
  renderItemLink,
20236
- isItemClickable = defaultIsItemClickable,
20523
+ isItemClickable: isItemClickable2 = defaultIsItemClickable,
20237
20524
  header,
20238
20525
  children,
20239
20526
  config = { perPageSizes: [10, 20, 50, 100] },
@@ -20269,7 +20556,7 @@ function DataViews({
20269
20556
  (id) => data.some((item2) => getItemId(item2) === id)
20270
20557
  );
20271
20558
  }, [selection, data, getItemId]);
20272
- const filters = useFilters(_fields, view);
20559
+ const filters = use_filters_default(_fields, view);
20273
20560
  const hasPrimaryOrLockedFilters = useMemo(
20274
20561
  () => (filters || []).some(
20275
20562
  (filter) => filter.isPrimary || filter.isLocked
@@ -20319,7 +20606,7 @@ function DataViews({
20319
20606
  if (!defaultLayouts[view.type]) {
20320
20607
  return null;
20321
20608
  }
20322
- return /* @__PURE__ */ jsx47(
20609
+ return /* @__PURE__ */ jsx49(
20323
20610
  dataviews_context_default.Provider,
20324
20611
  {
20325
20612
  value: {
@@ -20336,7 +20623,7 @@ function DataViews({
20336
20623
  setOpenedFilter,
20337
20624
  getItemId,
20338
20625
  getItemLevel,
20339
- isItemClickable,
20626
+ isItemClickable: isItemClickable2,
20340
20627
  onClickItem,
20341
20628
  renderItemLink,
20342
20629
  containerWidth,
@@ -20350,7 +20637,7 @@ function DataViews({
20350
20637
  empty,
20351
20638
  hasInfiniteScrollHandler: !!infiniteScrollHandler
20352
20639
  },
20353
- children: /* @__PURE__ */ jsx47("div", { className: "dataviews-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ jsx47(
20640
+ children: /* @__PURE__ */ jsx49("div", { className: "dataviews-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ jsx49(
20354
20641
  DefaultUI,
20355
20642
  {
20356
20643
  header,
@@ -20363,8 +20650,9 @@ function DataViews({
20363
20650
  }
20364
20651
  var DataViewsSubComponents = DataViews;
20365
20652
  DataViewsSubComponents.BulkActionToolbar = BulkActionsFooter;
20366
- DataViewsSubComponents.Filters = dataviews_filters_default;
20367
- DataViewsSubComponents.FiltersToggle = FiltersToggle;
20653
+ DataViewsSubComponents.Filters = filters_default;
20654
+ DataViewsSubComponents.FiltersToggled = filters_toggled_default;
20655
+ DataViewsSubComponents.FiltersToggle = toggle_default;
20368
20656
  DataViewsSubComponents.Layout = DataViewsLayout;
20369
20657
  DataViewsSubComponents.LayoutSwitcher = ViewTypeMenu;
20370
20658
  DataViewsSubComponents.Pagination = DataViewsPagination;
@@ -20373,8 +20661,191 @@ DataViewsSubComponents.ViewConfig = DataviewsViewConfigDropdown;
20373
20661
  DataViewsSubComponents.Footer = DataViewsFooter;
20374
20662
  var dataviews_default = DataViewsSubComponents;
20375
20663
 
20664
+ // src/components/dataviews-picker/index.tsx
20665
+ import { Fragment as Fragment11, jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
20666
+ var isItemClickable = () => false;
20667
+ var dataViewsPickerLayouts = VIEW_LAYOUTS.filter(
20668
+ (viewLayout) => viewLayout.isPicker
20669
+ );
20670
+ var defaultGetItemId2 = (item2) => item2.id;
20671
+ var EMPTY_ARRAY6 = [];
20672
+ function DefaultUI2({
20673
+ search: search2 = true,
20674
+ searchLabel = void 0
20675
+ }) {
20676
+ return /* @__PURE__ */ jsxs24(Fragment11, { children: [
20677
+ /* @__PURE__ */ jsxs24(
20678
+ component_default9,
20679
+ {
20680
+ alignment: "top",
20681
+ justify: "space-between",
20682
+ className: "dataviews__view-actions",
20683
+ spacing: 1,
20684
+ children: [
20685
+ /* @__PURE__ */ jsxs24(
20686
+ component_default9,
20687
+ {
20688
+ justify: "start",
20689
+ expanded: false,
20690
+ className: "dataviews__search",
20691
+ children: [
20692
+ search2 && /* @__PURE__ */ jsx50(dataviews_search_default, { label: searchLabel }),
20693
+ /* @__PURE__ */ jsx50(toggle_default, {})
20694
+ ]
20695
+ }
20696
+ ),
20697
+ /* @__PURE__ */ jsx50(
20698
+ component_default9,
20699
+ {
20700
+ spacing: 1,
20701
+ expanded: false,
20702
+ style: { flexShrink: 0 },
20703
+ children: /* @__PURE__ */ jsx50(dataviews_view_config_default, {})
20704
+ }
20705
+ )
20706
+ ]
20707
+ }
20708
+ ),
20709
+ /* @__PURE__ */ jsx50(filters_toggled_default, { className: "dataviews-filters__container" }),
20710
+ /* @__PURE__ */ jsx50(DataViewsLayout, {}),
20711
+ /* @__PURE__ */ jsx50(DataViewsPickerFooter, {})
20712
+ ] });
20713
+ }
20714
+ function DataViewsPicker({
20715
+ view,
20716
+ onChangeView,
20717
+ fields,
20718
+ search: search2 = true,
20719
+ searchLabel = void 0,
20720
+ actions = EMPTY_ARRAY6,
20721
+ data,
20722
+ getItemId = defaultGetItemId2,
20723
+ isLoading = false,
20724
+ paginationInfo,
20725
+ defaultLayouts: defaultLayoutsProperty,
20726
+ selection,
20727
+ onChangeSelection,
20728
+ children,
20729
+ config = { perPageSizes: [10, 20, 50, 100] },
20730
+ itemListLabel,
20731
+ empty
20732
+ }) {
20733
+ const { infiniteScrollHandler } = paginationInfo;
20734
+ const containerRef = useRef(null);
20735
+ const [containerWidth, setContainerWidth] = useState(0);
20736
+ const resizeObserverRef = useResizeObserver2(
20737
+ (resizeObserverEntries) => {
20738
+ setContainerWidth(
20739
+ resizeObserverEntries[0].borderBoxSize[0].inlineSize
20740
+ );
20741
+ },
20742
+ { box: "border-box" }
20743
+ );
20744
+ const [openedFilter, setOpenedFilter] = useState(null);
20745
+ function setSelectionWithChange(value) {
20746
+ const newValue = typeof value === "function" ? value(selection) : value;
20747
+ if (onChangeSelection) {
20748
+ onChangeSelection(newValue);
20749
+ }
20750
+ }
20751
+ const _fields = useMemo(() => normalizeFields(fields), [fields]);
20752
+ const filters = use_filters_default(_fields, view);
20753
+ const hasPrimaryOrLockedFilters = useMemo(
20754
+ () => (filters || []).some(
20755
+ (filter) => filter.isPrimary || filter.isLocked
20756
+ ),
20757
+ [filters]
20758
+ );
20759
+ const [isShowingFilter, setIsShowingFilter] = useState(
20760
+ hasPrimaryOrLockedFilters
20761
+ );
20762
+ useEffect(() => {
20763
+ if (hasPrimaryOrLockedFilters && !isShowingFilter) {
20764
+ setIsShowingFilter(true);
20765
+ }
20766
+ }, [hasPrimaryOrLockedFilters, isShowingFilter]);
20767
+ useEffect(() => {
20768
+ if (!view.infiniteScrollEnabled || !containerRef.current) {
20769
+ return;
20770
+ }
20771
+ const handleScroll = throttle((event) => {
20772
+ const target = event.target;
20773
+ const scrollTop = target.scrollTop;
20774
+ const scrollHeight = target.scrollHeight;
20775
+ const clientHeight = target.clientHeight;
20776
+ if (scrollTop + clientHeight >= scrollHeight - 100) {
20777
+ infiniteScrollHandler?.();
20778
+ }
20779
+ }, 100);
20780
+ const container = containerRef.current;
20781
+ container.addEventListener("scroll", handleScroll);
20782
+ return () => {
20783
+ container.removeEventListener("scroll", handleScroll);
20784
+ handleScroll.cancel();
20785
+ };
20786
+ }, [infiniteScrollHandler, view.infiniteScrollEnabled]);
20787
+ const defaultLayouts = useMemo(
20788
+ () => Object.fromEntries(
20789
+ Object.entries(defaultLayoutsProperty).filter(
20790
+ ([layoutType]) => {
20791
+ return dataViewsPickerLayouts.some(
20792
+ (viewLayout) => viewLayout.type === layoutType
20793
+ );
20794
+ }
20795
+ )
20796
+ ),
20797
+ [defaultLayoutsProperty]
20798
+ );
20799
+ if (!defaultLayouts[view.type]) {
20800
+ return null;
20801
+ }
20802
+ return /* @__PURE__ */ jsx50(
20803
+ dataviews_context_default.Provider,
20804
+ {
20805
+ value: {
20806
+ view,
20807
+ onChangeView,
20808
+ fields: _fields,
20809
+ actions,
20810
+ data,
20811
+ isLoading,
20812
+ paginationInfo,
20813
+ isItemClickable,
20814
+ selection,
20815
+ onChangeSelection: setSelectionWithChange,
20816
+ openedFilter,
20817
+ setOpenedFilter,
20818
+ getItemId,
20819
+ containerWidth,
20820
+ containerRef,
20821
+ resizeObserverRef,
20822
+ defaultLayouts,
20823
+ filters,
20824
+ isShowingFilter,
20825
+ setIsShowingFilter,
20826
+ config,
20827
+ itemListLabel,
20828
+ empty,
20829
+ hasInfiniteScrollHandler: !!infiniteScrollHandler
20830
+ },
20831
+ children: /* @__PURE__ */ jsx50("div", { className: "dataviews-picker-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ jsx50(DefaultUI2, { search: search2, searchLabel }) })
20832
+ }
20833
+ );
20834
+ }
20835
+ var DataViewsPickerSubComponents = DataViewsPicker;
20836
+ DataViewsPickerSubComponents.BulkActionToolbar = DataViewsPickerFooter;
20837
+ DataViewsPickerSubComponents.Filters = filters_default;
20838
+ DataViewsPickerSubComponents.FiltersToggled = filters_toggled_default;
20839
+ DataViewsPickerSubComponents.FiltersToggle = toggle_default;
20840
+ DataViewsPickerSubComponents.Layout = DataViewsLayout;
20841
+ DataViewsPickerSubComponents.LayoutSwitcher = ViewTypeMenu;
20842
+ DataViewsPickerSubComponents.Pagination = DataViewsPagination;
20843
+ DataViewsPickerSubComponents.Search = dataviews_search_default;
20844
+ DataViewsPickerSubComponents.ViewConfig = DataviewsViewConfigDropdown;
20845
+ var dataviews_picker_default = DataViewsPickerSubComponents;
20846
+
20376
20847
  // src/components/dataform-context/index.tsx
20377
- import { jsx as jsx48 } from "react/jsx-runtime";
20848
+ import { jsx as jsx51 } from "react/jsx-runtime";
20378
20849
  var DataFormContext = createContext({
20379
20850
  fields: []
20380
20851
  });
@@ -20383,7 +20854,7 @@ function DataFormProvider({
20383
20854
  fields,
20384
20855
  children
20385
20856
  }) {
20386
- return /* @__PURE__ */ jsx48(DataFormContext.Provider, { value: { fields }, children });
20857
+ return /* @__PURE__ */ jsx51(DataFormContext.Provider, { value: { fields }, children });
20387
20858
  }
20388
20859
  var dataform_context_default = DataFormContext;
20389
20860
 
@@ -20453,11 +20924,11 @@ function normalizeFormFields(form) {
20453
20924
  }
20454
20925
 
20455
20926
  // src/dataforms-layouts/regular/index.tsx
20456
- import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs24 } from "react/jsx-runtime";
20927
+ import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs25 } from "react/jsx-runtime";
20457
20928
  function Header2({ title }) {
20458
- return /* @__PURE__ */ jsx49(component_default14, { className: "dataforms-layouts-regular__header", spacing: 4, children: /* @__PURE__ */ jsxs24(component_default9, { alignment: "center", children: [
20459
- /* @__PURE__ */ jsx49(component_default15, { level: 2, size: 13, children: title }),
20460
- /* @__PURE__ */ jsx49(component_default6, {})
20929
+ return /* @__PURE__ */ jsx52(component_default14, { className: "dataforms-layouts-regular__header", spacing: 4, children: /* @__PURE__ */ jsxs25(component_default9, { alignment: "center", children: [
20930
+ /* @__PURE__ */ jsx52(component_default15, { level: 2, size: 13, children: title }),
20931
+ /* @__PURE__ */ jsx52(component_default6, {})
20461
20932
  ] }) });
20462
20933
  }
20463
20934
  function FormRegularField({
@@ -20475,9 +20946,9 @@ function FormRegularField({
20475
20946
  [field]
20476
20947
  );
20477
20948
  if (isCombinedField(field)) {
20478
- return /* @__PURE__ */ jsxs24(Fragment11, { children: [
20479
- !hideLabelFromVision && field.label && /* @__PURE__ */ jsx49(Header2, { title: field.label }),
20480
- /* @__PURE__ */ jsx49(
20949
+ return /* @__PURE__ */ jsxs25(Fragment12, { children: [
20950
+ !hideLabelFromVision && field.label && /* @__PURE__ */ jsx52(Header2, { title: field.label }),
20951
+ /* @__PURE__ */ jsx52(
20481
20952
  DataFormLayout,
20482
20953
  {
20483
20954
  data,
@@ -20499,8 +20970,8 @@ function FormRegularField({
20499
20970
  return null;
20500
20971
  }
20501
20972
  if (labelPosition === "side") {
20502
- return /* @__PURE__ */ jsxs24(component_default9, { className: "dataforms-layouts-regular__field", children: [
20503
- /* @__PURE__ */ jsx49(
20973
+ return /* @__PURE__ */ jsxs25(component_default9, { className: "dataforms-layouts-regular__field", children: [
20974
+ /* @__PURE__ */ jsx52(
20504
20975
  "div",
20505
20976
  {
20506
20977
  className: clsx38(
@@ -20510,13 +20981,13 @@ function FormRegularField({
20510
20981
  children: fieldDefinition.label
20511
20982
  }
20512
20983
  ),
20513
- /* @__PURE__ */ jsx49("div", { className: "dataforms-layouts-regular__field-control", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ jsx49(
20984
+ /* @__PURE__ */ jsx52("div", { className: "dataforms-layouts-regular__field-control", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ jsx52(
20514
20985
  fieldDefinition.render,
20515
20986
  {
20516
20987
  item: data,
20517
20988
  field: fieldDefinition
20518
20989
  }
20519
- ) : /* @__PURE__ */ jsx49(
20990
+ ) : /* @__PURE__ */ jsx52(
20520
20991
  fieldDefinition.Edit,
20521
20992
  {
20522
20993
  data,
@@ -20528,16 +20999,16 @@ function FormRegularField({
20528
20999
  ) })
20529
21000
  ] });
20530
21001
  }
20531
- return /* @__PURE__ */ jsx49("div", { className: "dataforms-layouts-regular__field", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ jsx49(Fragment11, { children: /* @__PURE__ */ jsxs24(Fragment11, { children: [
20532
- !hideLabelFromVision && labelPosition !== "none" && /* @__PURE__ */ jsx49(base_control_default.VisualLabel, { children: fieldDefinition.label }),
20533
- /* @__PURE__ */ jsx49(
21002
+ return /* @__PURE__ */ jsx52("div", { className: "dataforms-layouts-regular__field", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ jsx52(Fragment12, { children: /* @__PURE__ */ jsxs25(Fragment12, { children: [
21003
+ !hideLabelFromVision && labelPosition !== "none" && /* @__PURE__ */ jsx52(base_control_default.VisualLabel, { children: fieldDefinition.label }),
21004
+ /* @__PURE__ */ jsx52(
20534
21005
  fieldDefinition.render,
20535
21006
  {
20536
21007
  item: data,
20537
21008
  field: fieldDefinition
20538
21009
  }
20539
21010
  )
20540
- ] }) }) : /* @__PURE__ */ jsx49(
21011
+ ] }) }) : /* @__PURE__ */ jsx52(
20541
21012
  fieldDefinition.Edit,
20542
21013
  {
20543
21014
  data,
@@ -20555,8 +21026,8 @@ import clsx39 from "clsx";
20555
21026
  import { __ as __56 } from "@wordpress/i18n";
20556
21027
 
20557
21028
  // src/dataforms-layouts/panel/summary-button.tsx
20558
- import { sprintf as sprintf15, _x as _x5 } from "@wordpress/i18n";
20559
- import { jsx as jsx50 } from "react/jsx-runtime";
21029
+ import { sprintf as sprintf16, _x as _x5 } from "@wordpress/i18n";
21030
+ import { jsx as jsx53 } from "react/jsx-runtime";
20560
21031
  function SummaryButton({
20561
21032
  summaryFields,
20562
21033
  data,
@@ -20566,14 +21037,14 @@ function SummaryButton({
20566
21037
  onClick,
20567
21038
  "aria-expanded": ariaExpanded
20568
21039
  }) {
20569
- return /* @__PURE__ */ jsx50(
21040
+ return /* @__PURE__ */ jsx53(
20570
21041
  button_default,
20571
21042
  {
20572
21043
  className: "dataforms-layouts-panel__summary-button",
20573
21044
  size: "compact",
20574
21045
  variant: ["none", "top"].includes(labelPosition) ? "link" : "tertiary",
20575
21046
  "aria-expanded": ariaExpanded,
20576
- "aria-label": sprintf15(
21047
+ "aria-label": sprintf16(
20577
21048
  // translators: %s: Field name.
20578
21049
  _x5("Edit %s", "field"),
20579
21050
  fieldLabel || ""
@@ -20586,7 +21057,7 @@ function SummaryButton({
20586
21057
  height: "auto",
20587
21058
  alignItems: "flex-start"
20588
21059
  } : void 0,
20589
- children: summaryFields.length > 1 ? /* @__PURE__ */ jsx50(
21060
+ children: summaryFields.length > 1 ? /* @__PURE__ */ jsx53(
20590
21061
  "div",
20591
21062
  {
20592
21063
  style: {
@@ -20596,11 +21067,11 @@ function SummaryButton({
20596
21067
  width: "100%",
20597
21068
  gap: "2px"
20598
21069
  },
20599
- children: summaryFields.map((summaryField) => /* @__PURE__ */ jsx50(
21070
+ children: summaryFields.map((summaryField) => /* @__PURE__ */ jsx53(
20600
21071
  "div",
20601
21072
  {
20602
21073
  style: { width: "100%" },
20603
- children: /* @__PURE__ */ jsx50(
21074
+ children: /* @__PURE__ */ jsx53(
20604
21075
  summaryField.render,
20605
21076
  {
20606
21077
  item: data,
@@ -20611,7 +21082,7 @@ function SummaryButton({
20611
21082
  summaryField.id
20612
21083
  ))
20613
21084
  }
20614
- ) : summaryFields.map((summaryField) => /* @__PURE__ */ jsx50(
21085
+ ) : summaryFields.map((summaryField) => /* @__PURE__ */ jsx53(
20615
21086
  summaryField.render,
20616
21087
  {
20617
21088
  item: data,
@@ -20625,20 +21096,20 @@ function SummaryButton({
20625
21096
  var summary_button_default = SummaryButton;
20626
21097
 
20627
21098
  // src/dataforms-layouts/panel/dropdown.tsx
20628
- import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
21099
+ import { Fragment as Fragment13, jsx as jsx54, jsxs as jsxs26 } from "react/jsx-runtime";
20629
21100
  function DropdownHeader({
20630
21101
  title,
20631
21102
  onClose
20632
21103
  }) {
20633
- return /* @__PURE__ */ jsx51(
21104
+ return /* @__PURE__ */ jsx54(
20634
21105
  component_default14,
20635
21106
  {
20636
21107
  className: "dataforms-layouts-panel__dropdown-header",
20637
21108
  spacing: 4,
20638
- children: /* @__PURE__ */ jsxs25(component_default9, { alignment: "center", children: [
20639
- title && /* @__PURE__ */ jsx51(component_default15, { level: 2, size: 13, children: title }),
20640
- /* @__PURE__ */ jsx51(component_default6, {}),
20641
- onClose && /* @__PURE__ */ jsx51(
21109
+ children: /* @__PURE__ */ jsxs26(component_default9, { alignment: "center", children: [
21110
+ title && /* @__PURE__ */ jsx54(component_default15, { level: 2, size: 13, children: title }),
21111
+ /* @__PURE__ */ jsx54(component_default6, {}),
21112
+ onClose && /* @__PURE__ */ jsx54(
20642
21113
  button_default,
20643
21114
  {
20644
21115
  label: __56("Close"),
@@ -20682,7 +21153,7 @@ function PanelDropdown({
20682
21153
  }),
20683
21154
  [popoverAnchor]
20684
21155
  );
20685
- return /* @__PURE__ */ jsx51(
21156
+ return /* @__PURE__ */ jsx54(
20686
21157
  dropdown_default,
20687
21158
  {
20688
21159
  contentClassName: "dataforms-layouts-panel__field-dropdown",
@@ -20693,7 +21164,7 @@ function PanelDropdown({
20693
21164
  variant: "tertiary",
20694
21165
  tooltipPosition: "middle left"
20695
21166
  },
20696
- renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ jsx51(
21167
+ renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ jsx54(
20697
21168
  summary_button_default,
20698
21169
  {
20699
21170
  summaryFields,
@@ -20705,15 +21176,15 @@ function PanelDropdown({
20705
21176
  "aria-expanded": isOpen
20706
21177
  }
20707
21178
  ),
20708
- renderContent: ({ onClose }) => /* @__PURE__ */ jsxs25(Fragment12, { children: [
20709
- /* @__PURE__ */ jsx51(DropdownHeader, { title: fieldLabel, onClose }),
20710
- /* @__PURE__ */ jsx51(
21179
+ renderContent: ({ onClose }) => /* @__PURE__ */ jsxs26(Fragment13, { children: [
21180
+ /* @__PURE__ */ jsx54(DropdownHeader, { title: fieldLabel, onClose }),
21181
+ /* @__PURE__ */ jsx54(
20711
21182
  DataFormLayout,
20712
21183
  {
20713
21184
  data,
20714
21185
  form,
20715
21186
  onChange,
20716
- children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx51(
21187
+ children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx54(
20717
21188
  FieldLayout,
20718
21189
  {
20719
21190
  data,
@@ -20732,9 +21203,9 @@ function PanelDropdown({
20732
21203
  var dropdown_default2 = PanelDropdown;
20733
21204
 
20734
21205
  // src/dataforms-layouts/panel/modal.tsx
20735
- import deepMerge10 from "deepmerge";
21206
+ import deepMerge11 from "deepmerge";
20736
21207
  import { __ as __57 } from "@wordpress/i18n";
20737
- import { Fragment as Fragment13, jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
21208
+ import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs27 } from "react/jsx-runtime";
20738
21209
  function ModalContent({
20739
21210
  data,
20740
21211
  form,
@@ -20744,16 +21215,16 @@ function ModalContent({
20744
21215
  }) {
20745
21216
  const [changes, setChanges] = useState({});
20746
21217
  const modalData = useMemo(() => {
20747
- return deepMerge10(data, changes);
21218
+ return deepMerge11(data, changes);
20748
21219
  }, [data, changes]);
20749
21220
  const onApply = () => {
20750
21221
  onChange(changes);
20751
21222
  onClose();
20752
21223
  };
20753
21224
  const handleOnChange = (newValue) => {
20754
- setChanges((prev) => deepMerge10(prev, newValue));
21225
+ setChanges((prev) => deepMerge11(prev, newValue));
20755
21226
  };
20756
- return /* @__PURE__ */ jsxs26(
21227
+ return /* @__PURE__ */ jsxs27(
20757
21228
  modal_default,
20758
21229
  {
20759
21230
  className: "dataforms-layouts-panel__modal",
@@ -20762,13 +21233,13 @@ function ModalContent({
20762
21233
  title: fieldLabel,
20763
21234
  size: "medium",
20764
21235
  children: [
20765
- /* @__PURE__ */ jsx52(
21236
+ /* @__PURE__ */ jsx55(
20766
21237
  DataFormLayout,
20767
21238
  {
20768
21239
  data: modalData,
20769
21240
  form,
20770
21241
  onChange: handleOnChange,
20771
- children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx52(
21242
+ children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx55(
20772
21243
  FieldLayout,
20773
21244
  {
20774
21245
  data: modalData,
@@ -20780,14 +21251,14 @@ function ModalContent({
20780
21251
  )
20781
21252
  }
20782
21253
  ),
20783
- /* @__PURE__ */ jsxs26(
21254
+ /* @__PURE__ */ jsxs27(
20784
21255
  component_default9,
20785
21256
  {
20786
21257
  className: "dataforms-layouts-panel__modal-footer",
20787
21258
  spacing: 3,
20788
21259
  children: [
20789
- /* @__PURE__ */ jsx52(component_default6, {}),
20790
- /* @__PURE__ */ jsx52(
21260
+ /* @__PURE__ */ jsx55(component_default6, {}),
21261
+ /* @__PURE__ */ jsx55(
20791
21262
  button_default,
20792
21263
  {
20793
21264
  variant: "tertiary",
@@ -20796,7 +21267,7 @@ function ModalContent({
20796
21267
  children: __57("Cancel")
20797
21268
  }
20798
21269
  ),
20799
- /* @__PURE__ */ jsx52(
21270
+ /* @__PURE__ */ jsx55(
20800
21271
  button_default,
20801
21272
  {
20802
21273
  variant: "primary",
@@ -20832,8 +21303,8 @@ function PanelModal({
20832
21303
  }),
20833
21304
  [field]
20834
21305
  );
20835
- return /* @__PURE__ */ jsxs26(Fragment13, { children: [
20836
- /* @__PURE__ */ jsx52(
21306
+ return /* @__PURE__ */ jsxs27(Fragment14, { children: [
21307
+ /* @__PURE__ */ jsx55(
20837
21308
  summary_button_default,
20838
21309
  {
20839
21310
  summaryFields,
@@ -20845,7 +21316,7 @@ function PanelModal({
20845
21316
  "aria-expanded": isOpen
20846
21317
  }
20847
21318
  ),
20848
- isOpen && /* @__PURE__ */ jsx52(
21319
+ isOpen && /* @__PURE__ */ jsx55(
20849
21320
  ModalContent,
20850
21321
  {
20851
21322
  data,
@@ -20860,7 +21331,7 @@ function PanelModal({
20860
21331
  var modal_default2 = PanelModal;
20861
21332
 
20862
21333
  // src/dataforms-layouts/panel/index.tsx
20863
- import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
21334
+ import { jsx as jsx56, jsxs as jsxs28 } from "react/jsx-runtime";
20864
21335
  function FormPanelField({
20865
21336
  data,
20866
21337
  field,
@@ -20910,7 +21381,7 @@ function FormPanelField({
20910
21381
  `dataforms-layouts-panel__field-label--label-position-${labelPosition}`
20911
21382
  );
20912
21383
  const fieldLabel = isCombinedField(field) ? field.label : fieldDefinition?.label;
20913
- const renderedControl = layout.openAs === "modal" ? /* @__PURE__ */ jsx53(
21384
+ const renderedControl = layout.openAs === "modal" ? /* @__PURE__ */ jsx56(
20914
21385
  modal_default2,
20915
21386
  {
20916
21387
  field,
@@ -20920,7 +21391,7 @@ function FormPanelField({
20920
21391
  onChange,
20921
21392
  labelPosition
20922
21393
  }
20923
- ) : /* @__PURE__ */ jsx53(
21394
+ ) : /* @__PURE__ */ jsx56(
20924
21395
  dropdown_default2,
20925
21396
  {
20926
21397
  field,
@@ -20933,8 +21404,8 @@ function FormPanelField({
20933
21404
  }
20934
21405
  );
20935
21406
  if (labelPosition === "top") {
20936
- return /* @__PURE__ */ jsxs27(component_default14, { className: "dataforms-layouts-panel__field", spacing: 0, children: [
20937
- /* @__PURE__ */ jsx53(
21407
+ return /* @__PURE__ */ jsxs28(component_default14, { className: "dataforms-layouts-panel__field", spacing: 0, children: [
21408
+ /* @__PURE__ */ jsx56(
20938
21409
  "div",
20939
21410
  {
20940
21411
  className: labelClassName,
@@ -20942,27 +21413,27 @@ function FormPanelField({
20942
21413
  children: fieldLabel
20943
21414
  }
20944
21415
  ),
20945
- /* @__PURE__ */ jsx53("div", { className: "dataforms-layouts-panel__field-control", children: renderedControl })
21416
+ /* @__PURE__ */ jsx56("div", { className: "dataforms-layouts-panel__field-control", children: renderedControl })
20946
21417
  ] });
20947
21418
  }
20948
21419
  if (labelPosition === "none") {
20949
- return /* @__PURE__ */ jsx53("div", { className: "dataforms-layouts-panel__field", children: renderedControl });
21420
+ return /* @__PURE__ */ jsx56("div", { className: "dataforms-layouts-panel__field", children: renderedControl });
20950
21421
  }
20951
- return /* @__PURE__ */ jsxs27(
21422
+ return /* @__PURE__ */ jsxs28(
20952
21423
  component_default9,
20953
21424
  {
20954
21425
  ref: setPopoverAnchor,
20955
21426
  className: "dataforms-layouts-panel__field",
20956
21427
  children: [
20957
- /* @__PURE__ */ jsx53("div", { className: labelClassName, children: fieldLabel }),
20958
- /* @__PURE__ */ jsx53("div", { className: "dataforms-layouts-panel__field-control", children: renderedControl })
21428
+ /* @__PURE__ */ jsx56("div", { className: labelClassName, children: fieldLabel }),
21429
+ /* @__PURE__ */ jsx56("div", { className: "dataforms-layouts-panel__field-control", children: renderedControl })
20959
21430
  ]
20960
21431
  }
20961
21432
  );
20962
21433
  }
20963
21434
 
20964
21435
  // src/dataforms-layouts/card/index.tsx
20965
- import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
21436
+ import { jsx as jsx57, jsxs as jsxs29 } from "react/jsx-runtime";
20966
21437
  function useCollapsibleCard(initialIsOpen = true) {
20967
21438
  const [isOpen, setIsOpen] = useState(initialIsOpen);
20968
21439
  const toggle = useCallback(() => {
@@ -20972,7 +21443,7 @@ function useCollapsibleCard(initialIsOpen = true) {
20972
21443
  ({
20973
21444
  children,
20974
21445
  ...props
20975
- }) => /* @__PURE__ */ jsxs28(
21446
+ }) => /* @__PURE__ */ jsxs29(
20976
21447
  component_default21,
20977
21448
  {
20978
21449
  ...props,
@@ -20982,7 +21453,7 @@ function useCollapsibleCard(initialIsOpen = true) {
20982
21453
  ...props.style
20983
21454
  },
20984
21455
  children: [
20985
- /* @__PURE__ */ jsx54(
21456
+ /* @__PURE__ */ jsx57(
20986
21457
  "div",
20987
21458
  {
20988
21459
  style: {
@@ -20994,7 +21465,7 @@ function useCollapsibleCard(initialIsOpen = true) {
20994
21465
  children
20995
21466
  }
20996
21467
  ),
20997
- /* @__PURE__ */ jsx54(
21468
+ /* @__PURE__ */ jsx57(
20998
21469
  button_default,
20999
21470
  {
21000
21471
  __next40pxDefaultSize: true,
@@ -21034,13 +21505,13 @@ function FormCardField({
21034
21505
  );
21035
21506
  if (isCombinedField(field)) {
21036
21507
  const withHeader2 = !!field.label && layout.withHeader;
21037
- return /* @__PURE__ */ jsxs28(component_default18, { className: "dataforms-layouts-card__field", children: [
21038
- withHeader2 && /* @__PURE__ */ jsx54(CollapsibleCardHeader, { className: "dataforms-layouts-card__field-label", children: field.label }),
21508
+ return /* @__PURE__ */ jsxs29(component_default18, { className: "dataforms-layouts-card__field", children: [
21509
+ withHeader2 && /* @__PURE__ */ jsx57(CollapsibleCardHeader, { className: "dataforms-layouts-card__field-label", children: field.label }),
21039
21510
  (isOpen || !withHeader2) && // If it doesn't have a header, keep it open.
21040
21511
  // Otherwise, the card will not be visible.
21041
- /* @__PURE__ */ jsxs28(component_default20, { className: "dataforms-layouts-card__field-control", children: [
21042
- field.description && /* @__PURE__ */ jsx54("div", { className: "dataforms-layouts-card__field-description", children: field.description }),
21043
- /* @__PURE__ */ jsx54(
21512
+ /* @__PURE__ */ jsxs29(component_default20, { className: "dataforms-layouts-card__field-control", children: [
21513
+ field.description && /* @__PURE__ */ jsx57("div", { className: "dataforms-layouts-card__field-description", children: field.description }),
21514
+ /* @__PURE__ */ jsx57(
21044
21515
  DataFormLayout,
21045
21516
  {
21046
21517
  data,
@@ -21062,11 +21533,11 @@ function FormCardField({
21062
21533
  return null;
21063
21534
  }
21064
21535
  const withHeader = !!fieldDefinition.label && layout.withHeader;
21065
- return /* @__PURE__ */ jsxs28(component_default18, { className: "dataforms-layouts-card__field", children: [
21066
- withHeader && /* @__PURE__ */ jsx54(CollapsibleCardHeader, { className: "dataforms-layouts-card__field-label", children: fieldDefinition.label }),
21536
+ return /* @__PURE__ */ jsxs29(component_default18, { className: "dataforms-layouts-card__field", children: [
21537
+ withHeader && /* @__PURE__ */ jsx57(CollapsibleCardHeader, { className: "dataforms-layouts-card__field-label", children: fieldDefinition.label }),
21067
21538
  (isOpen || !withHeader) && // If it doesn't have a header, keep it open.
21068
21539
  // Otherwise, the card will not be visible.
21069
- /* @__PURE__ */ jsx54(component_default20, { className: "dataforms-layouts-card__field-control", children: /* @__PURE__ */ jsx54(
21540
+ /* @__PURE__ */ jsx57(component_default20, { className: "dataforms-layouts-card__field-control", children: /* @__PURE__ */ jsx57(
21070
21541
  RegularLayout,
21071
21542
  {
21072
21543
  data,
@@ -21079,14 +21550,14 @@ function FormCardField({
21079
21550
  }
21080
21551
 
21081
21552
  // src/dataforms-layouts/row/index.tsx
21082
- import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
21553
+ import { Fragment as Fragment15, jsx as jsx58, jsxs as jsxs30 } from "react/jsx-runtime";
21083
21554
  function Header3({ title }) {
21084
- return /* @__PURE__ */ jsx55(component_default14, { className: "dataforms-layouts-row__header", spacing: 4, children: /* @__PURE__ */ jsxs29(component_default9, { alignment: "center", children: [
21085
- /* @__PURE__ */ jsx55(component_default15, { level: 2, size: 13, children: title }),
21086
- /* @__PURE__ */ jsx55(component_default6, {})
21555
+ return /* @__PURE__ */ jsx58(component_default14, { className: "dataforms-layouts-row__header", spacing: 4, children: /* @__PURE__ */ jsxs30(component_default9, { alignment: "center", children: [
21556
+ /* @__PURE__ */ jsx58(component_default15, { level: 2, size: 13, children: title }),
21557
+ /* @__PURE__ */ jsx58(component_default6, {})
21087
21558
  ] }) });
21088
21559
  }
21089
- var EMPTY_WRAPPER = ({ children }) => /* @__PURE__ */ jsx55(Fragment14, { children });
21560
+ var EMPTY_WRAPPER = ({ children }) => /* @__PURE__ */ jsx58(Fragment15, { children });
21090
21561
  function FormRowField({
21091
21562
  data,
21092
21563
  field,
@@ -21107,20 +21578,20 @@ function FormRowField({
21107
21578
  return child;
21108
21579
  })
21109
21580
  };
21110
- return /* @__PURE__ */ jsxs29("div", { className: "dataforms-layouts-row__field", children: [
21111
- !hideLabelFromVision && field.label && /* @__PURE__ */ jsx55(Header3, { title: field.label }),
21112
- /* @__PURE__ */ jsx55(component_default9, { alignment: layout.alignment, spacing: 4, children: /* @__PURE__ */ jsx55(
21581
+ return /* @__PURE__ */ jsxs30("div", { className: "dataforms-layouts-row__field", children: [
21582
+ !hideLabelFromVision && field.label && /* @__PURE__ */ jsx58(Header3, { title: field.label }),
21583
+ /* @__PURE__ */ jsx58(component_default9, { alignment: layout.alignment, spacing: 4, children: /* @__PURE__ */ jsx58(
21113
21584
  DataFormLayout,
21114
21585
  {
21115
21586
  data,
21116
21587
  form,
21117
21588
  onChange,
21118
21589
  as: EMPTY_WRAPPER,
21119
- children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx55(
21590
+ children: (FieldLayout, nestedField) => /* @__PURE__ */ jsx58(
21120
21591
  "div",
21121
21592
  {
21122
21593
  className: "dataforms-layouts-row__field-control",
21123
- children: /* @__PURE__ */ jsx55(
21594
+ children: /* @__PURE__ */ jsx58(
21124
21595
  FieldLayout,
21125
21596
  {
21126
21597
  data,
@@ -21144,7 +21615,7 @@ function FormRowField({
21144
21615
  if (!RegularLayout) {
21145
21616
  return null;
21146
21617
  }
21147
- return /* @__PURE__ */ jsx55(Fragment14, { children: /* @__PURE__ */ jsx55("div", { className: "dataforms-layouts-row__field-control", children: /* @__PURE__ */ jsx55(
21618
+ return /* @__PURE__ */ jsx58(Fragment15, { children: /* @__PURE__ */ jsx58("div", { className: "dataforms-layouts-row__field-control", children: /* @__PURE__ */ jsx58(
21148
21619
  RegularLayout,
21149
21620
  {
21150
21621
  data,
@@ -21155,7 +21626,7 @@ function FormRowField({
21155
21626
  }
21156
21627
 
21157
21628
  // src/dataforms-layouts/index.tsx
21158
- import { jsx as jsx56 } from "react/jsx-runtime";
21629
+ import { jsx as jsx59 } from "react/jsx-runtime";
21159
21630
  var FORM_FIELD_LAYOUTS = [
21160
21631
  {
21161
21632
  type: "regular",
@@ -21164,7 +21635,7 @@ var FORM_FIELD_LAYOUTS = [
21164
21635
  {
21165
21636
  type: "panel",
21166
21637
  component: FormPanelField,
21167
- wrapper: ({ children }) => /* @__PURE__ */ jsx56(component_default14, { spacing: 2, children })
21638
+ wrapper: ({ children }) => /* @__PURE__ */ jsx59(component_default14, { spacing: 2, children })
21168
21639
  },
21169
21640
  {
21170
21641
  type: "card",
@@ -21176,7 +21647,7 @@ var FORM_FIELD_LAYOUTS = [
21176
21647
  wrapper: ({
21177
21648
  children,
21178
21649
  layout
21179
- }) => /* @__PURE__ */ jsx56(component_default14, { spacing: 4, children: /* @__PURE__ */ jsx56("div", { className: "dataforms-layouts-row__field", children: /* @__PURE__ */ jsx56(
21650
+ }) => /* @__PURE__ */ jsx59(component_default14, { spacing: 4, children: /* @__PURE__ */ jsx59("div", { className: "dataforms-layouts-row__field", children: /* @__PURE__ */ jsx59(
21180
21651
  component_default9,
21181
21652
  {
21182
21653
  spacing: 4,
@@ -21191,8 +21662,8 @@ function getFormFieldLayout(type) {
21191
21662
  }
21192
21663
 
21193
21664
  // src/dataforms-layouts/data-form-layout.tsx
21194
- import { jsx as jsx57 } from "react/jsx-runtime";
21195
- var DEFAULT_WRAPPER = ({ children }) => /* @__PURE__ */ jsx57(component_default14, { spacing: 4, children });
21665
+ import { jsx as jsx60 } from "react/jsx-runtime";
21666
+ var DEFAULT_WRAPPER = ({ children }) => /* @__PURE__ */ jsx60(component_default14, { spacing: 4, children });
21196
21667
  function DataFormLayout({
21197
21668
  data,
21198
21669
  form,
@@ -21213,7 +21684,7 @@ function DataFormLayout({
21213
21684
  );
21214
21685
  const normalizedFormLayout = normalizeLayout(form.layout);
21215
21686
  const Wrapper4 = as ?? getFormFieldLayout(normalizedFormLayout.type)?.wrapper ?? DEFAULT_WRAPPER;
21216
- return /* @__PURE__ */ jsx57(Wrapper4, { layout: normalizedFormLayout, children: normalizedFormFields.map((formField) => {
21687
+ return /* @__PURE__ */ jsx60(Wrapper4, { layout: normalizedFormLayout, children: normalizedFormFields.map((formField) => {
21217
21688
  const FieldLayout = getFormFieldLayout(formField.layout.type)?.component;
21218
21689
  if (!FieldLayout) {
21219
21690
  return null;
@@ -21225,7 +21696,7 @@ function DataFormLayout({
21225
21696
  if (children) {
21226
21697
  return children(FieldLayout, formField);
21227
21698
  }
21228
- return /* @__PURE__ */ jsx57(
21699
+ return /* @__PURE__ */ jsx60(
21229
21700
  FieldLayout,
21230
21701
  {
21231
21702
  data,
@@ -21238,7 +21709,7 @@ function DataFormLayout({
21238
21709
  }
21239
21710
 
21240
21711
  // src/components/dataform/index.tsx
21241
- import { jsx as jsx58 } from "react/jsx-runtime";
21712
+ import { jsx as jsx61 } from "react/jsx-runtime";
21242
21713
  function DataForm({
21243
21714
  data,
21244
21715
  form,
@@ -21252,7 +21723,7 @@ function DataForm({
21252
21723
  if (!form.fields) {
21253
21724
  return null;
21254
21725
  }
21255
- return /* @__PURE__ */ jsx58(DataFormProvider, { fields: normalizedFields, children: /* @__PURE__ */ jsx58(DataFormLayout, { data, form, onChange }) });
21726
+ return /* @__PURE__ */ jsx61(DataFormProvider, { fields: normalizedFields, children: /* @__PURE__ */ jsx61(DataFormLayout, { data, form, onChange }) });
21256
21727
  }
21257
21728
 
21258
21729
  // src/filter-and-sort-data-view.ts
@@ -21262,7 +21733,7 @@ import { getDate as getDate4 } from "@wordpress/date";
21262
21733
  function normalizeSearchInput2(input = "") {
21263
21734
  return removeAccents3(input.trim().toLowerCase());
21264
21735
  }
21265
- var EMPTY_ARRAY5 = [];
21736
+ var EMPTY_ARRAY7 = [];
21266
21737
  function getRelativeDate(value, unit) {
21267
21738
  switch (unit) {
21268
21739
  case "days":
@@ -21280,7 +21751,7 @@ function getRelativeDate(value, unit) {
21280
21751
  function filterSortAndPaginate(data, view, fields) {
21281
21752
  if (!data) {
21282
21753
  return {
21283
- data: EMPTY_ARRAY5,
21754
+ data: EMPTY_ARRAY7,
21284
21755
  paginationInfo: { totalItems: 0, totalPages: 0 }
21285
21756
  };
21286
21757
  }
@@ -21512,16 +21983,35 @@ function isItemValid(item2, fields, form) {
21512
21983
  fields.filter(({ id }) => !!form.fields?.includes(id))
21513
21984
  );
21514
21985
  const isEmptyNullOrUndefined = (value) => [void 0, "", null].includes(value);
21986
+ const isArrayOrElementsEmptyNullOrUndefined = (value) => {
21987
+ return !Array.isArray(value) || value.length === 0 || value.every((element) => isEmptyNullOrUndefined(element));
21988
+ };
21515
21989
  return _fields.every((field) => {
21516
21990
  const value = field.getValue({ item: item2 });
21517
21991
  if (field.isValid.required) {
21518
- 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 === void 0 && isEmptyNullOrUndefined(value)) {
21992
+ 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 === void 0 && isEmptyNullOrUndefined(value)) {
21519
21993
  return false;
21520
21994
  }
21521
21995
  if (field.type === "boolean" && value !== true) {
21522
21996
  return false;
21523
21997
  }
21524
21998
  }
21999
+ if (field.isValid.elements) {
22000
+ if (field.elements) {
22001
+ const validValues = field.elements.map(
22002
+ (element) => element.value
22003
+ );
22004
+ if (field.type === "array") {
22005
+ if (Array.isArray(value)) {
22006
+ return value.every(
22007
+ (arrayItem) => validValues.includes(arrayItem)
22008
+ );
22009
+ }
22010
+ return false;
22011
+ }
22012
+ return validValues.includes(value);
22013
+ }
22014
+ }
21525
22015
  if (typeof field.isValid.custom === "function" && field.isValid.custom(item2, field) !== null) {
21526
22016
  return false;
21527
22017
  }
@@ -21531,6 +22021,7 @@ function isItemValid(item2, fields, form) {
21531
22021
  export {
21532
22022
  DataForm,
21533
22023
  dataviews_default as DataViews,
22024
+ dataviews_picker_default as DataViewsPicker,
21534
22025
  VIEW_LAYOUTS,
21535
22026
  filterSortAndPaginate,
21536
22027
  isItemValid