wagtail 7.1__py3-none-any.whl → 7.1.1__py3-none-any.whl

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 (365) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
  3. wagtail/admin/locale/sl/LC_MESSAGES/django.po +74 -2
  4. wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
  5. wagtail/admin/locale/tr/LC_MESSAGES/django.po +1617 -22
  6. wagtail/admin/locale/tr/LC_MESSAGES/djangojs.mo +0 -0
  7. wagtail/admin/locale/tr/LC_MESSAGES/djangojs.po +26 -2
  8. wagtail/admin/panels/field_panel.py +1 -1
  9. wagtail/admin/panels/title_field_panel.py +3 -5
  10. wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
  11. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  12. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  13. wagtail/admin/tests/api/test_renderer_classes.py +61 -0
  14. wagtail/admin/tests/test_edit_handlers.py +16 -0
  15. wagtail/api/v2/tests/test_renderer_classes.py +59 -0
  16. wagtail/api/v2/views.py +12 -1
  17. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.mo +0 -0
  18. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +39 -1
  19. wagtail/contrib/forms/models.py +2 -0
  20. wagtail/contrib/forms/tests/test_views.py +23 -0
  21. wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +1 -1
  22. wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +1 -1
  23. wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
  24. wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +1 -1
  25. wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +1 -1
  26. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +1 -1
  27. wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
  28. wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +1 -1
  29. wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +1 -1
  30. wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +1 -1
  31. wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
  32. wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +1 -1
  33. wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
  34. wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
  35. wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +1 -1
  36. wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
  37. wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +1 -1
  38. wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +1 -1
  39. wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +1 -1
  40. wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +1 -1
  41. wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
  42. wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
  43. wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  44. wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
  45. wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +1 -1
  46. wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
  47. wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +1 -1
  48. wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +1 -1
  49. wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +1 -1
  50. wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +1 -1
  51. wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
  52. wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +1 -1
  53. wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +1 -1
  54. wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
  55. wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
  56. wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +1 -1
  57. wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
  58. wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +1 -1
  59. wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +1 -1
  60. wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +1 -1
  61. wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  62. wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  63. wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +1 -1
  64. wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +1 -1
  65. wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  66. wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +1 -1
  67. wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +1 -1
  68. wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +1 -1
  69. wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
  70. wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +1 -1
  71. wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +1 -1
  72. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.mo +0 -0
  73. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +76 -1
  74. wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  75. wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.po +1 -1
  76. wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +1 -1
  77. wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
  78. wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +1 -1
  79. wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  80. wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  81. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
  82. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +24 -0
  83. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.mo +0 -0
  84. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.po +6 -2
  85. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.mo +0 -0
  86. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.po +5 -1
  87. wagtail/contrib/simple_translation/locale/tr/LC_MESSAGES/django.mo +0 -0
  88. wagtail/contrib/simple_translation/locale/tr/LC_MESSAGES/django.po +86 -0
  89. wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
  90. wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +1 -1
  91. wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  92. wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +1 -1
  93. wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
  94. wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
  95. wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
  96. wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
  97. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +1 -1
  98. wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
  99. wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
  100. wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +1 -1
  101. wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +1 -1
  102. wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
  103. wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
  104. wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
  105. wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
  106. wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
  107. wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
  108. wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
  109. wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
  110. wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
  111. wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
  112. wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
  113. wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  114. wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
  115. wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
  116. wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
  117. wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
  118. wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
  119. wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
  120. wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
  121. wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
  122. wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
  123. wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
  124. wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
  125. wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
  126. wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
  127. wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
  128. wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
  129. wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +1 -1
  130. wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  131. wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  132. wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
  133. wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +1 -1
  134. wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  135. wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +1 -1
  136. wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
  137. wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
  138. wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
  139. wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
  140. wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.mo +0 -0
  141. wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +5 -2
  142. wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  143. wagtail/contrib/styleguide/locale/ug/LC_MESSAGES/django.po +1 -1
  144. wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
  145. wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
  146. wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
  147. wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  148. wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  149. wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.po +1 -1
  150. wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.po +1 -1
  151. wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  152. wagtail/contrib/table_block/locale/cs/LC_MESSAGES/django.po +1 -1
  153. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  154. wagtail/contrib/table_block/locale/de/LC_MESSAGES/django.po +1 -1
  155. wagtail/contrib/table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  156. wagtail/contrib/table_block/locale/el/LC_MESSAGES/django.po +1 -1
  157. wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.po +1 -1
  158. wagtail/contrib/table_block/locale/es/LC_MESSAGES/django.po +1 -1
  159. wagtail/contrib/table_block/locale/et/LC_MESSAGES/django.po +1 -1
  160. wagtail/contrib/table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  161. wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  162. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +1 -1
  163. wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  164. wagtail/contrib/table_block/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  165. wagtail/contrib/table_block/locale/ht/LC_MESSAGES/django.po +1 -1
  166. wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  167. wagtail/contrib/table_block/locale/id_ID/LC_MESSAGES/django.po +1 -1
  168. wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  169. wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.po +1 -1
  170. wagtail/contrib/table_block/locale/ja/LC_MESSAGES/django.po +1 -1
  171. wagtail/contrib/table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  172. wagtail/contrib/table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  173. wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.po +1 -1
  174. wagtail/contrib/table_block/locale/mi/LC_MESSAGES/django.po +1 -1
  175. wagtail/contrib/table_block/locale/mn/LC_MESSAGES/django.po +1 -1
  176. wagtail/contrib/table_block/locale/my/LC_MESSAGES/django.po +1 -1
  177. wagtail/contrib/table_block/locale/nb/LC_MESSAGES/django.po +1 -1
  178. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.po +1 -1
  179. wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.po +1 -1
  180. wagtail/contrib/table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  181. wagtail/contrib/table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  182. wagtail/contrib/table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  183. wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.po +1 -1
  184. wagtail/contrib/table_block/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  185. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +1 -1
  186. wagtail/contrib/table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  187. wagtail/contrib/table_block/locale/tet/LC_MESSAGES/django.po +1 -1
  188. wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.po +1 -1
  189. wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.mo +0 -0
  190. wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.po +22 -1
  191. wagtail/contrib/table_block/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  192. wagtail/contrib/table_block/locale/ug/LC_MESSAGES/django.po +1 -1
  193. wagtail/contrib/table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  194. wagtail/contrib/table_block/locale/vi/LC_MESSAGES/django.po +1 -1
  195. wagtail/contrib/table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  196. wagtail/contrib/table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  197. wagtail/contrib/typed_table_block/locale/tr/LC_MESSAGES/django.mo +0 -0
  198. wagtail/contrib/typed_table_block/locale/tr/LC_MESSAGES/django.po +53 -0
  199. wagtail/documents/locale/tr/LC_MESSAGES/django.mo +0 -0
  200. wagtail/documents/locale/tr/LC_MESSAGES/django.po +39 -1
  201. wagtail/images/locale/tr/LC_MESSAGES/django.mo +0 -0
  202. wagtail/images/locale/tr/LC_MESSAGES/django.po +143 -1
  203. wagtail/locale/tr/LC_MESSAGES/django.mo +0 -0
  204. wagtail/locale/tr/LC_MESSAGES/django.po +561 -1
  205. wagtail/locales/locale/be/LC_MESSAGES/django.po +1 -1
  206. wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
  207. wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
  208. wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
  209. wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
  210. wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
  211. wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
  212. wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
  213. wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
  214. wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
  215. wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
  216. wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
  217. wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
  218. wagtail/locales/locale/fr/LC_MESSAGES/django.po +1 -1
  219. wagtail/locales/locale/gl/LC_MESSAGES/django.po +1 -1
  220. wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
  221. wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  222. wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
  223. wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +1 -1
  224. wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
  225. wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
  226. wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
  227. wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
  228. wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
  229. wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
  230. wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
  231. wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
  232. wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
  233. wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
  234. wagtail/locales/locale/pl/LC_MESSAGES/django.po +1 -1
  235. wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  236. wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  237. wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
  238. wagtail/locales/locale/ru/LC_MESSAGES/django.po +1 -1
  239. wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  240. wagtail/locales/locale/sl/LC_MESSAGES/django.mo +0 -0
  241. wagtail/locales/locale/sl/LC_MESSAGES/django.po +11 -3
  242. wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
  243. wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
  244. wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
  245. wagtail/locales/locale/tr/LC_MESSAGES/django.mo +0 -0
  246. wagtail/locales/locale/tr/LC_MESSAGES/django.po +75 -2
  247. wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  248. wagtail/locales/locale/ug/LC_MESSAGES/django.po +1 -1
  249. wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
  250. wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
  251. wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
  252. wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  253. wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  254. wagtail/search/locale/ar/LC_MESSAGES/django.po +1 -1
  255. wagtail/search/locale/be/LC_MESSAGES/django.po +1 -1
  256. wagtail/search/locale/ca/LC_MESSAGES/django.po +1 -1
  257. wagtail/search/locale/cs/LC_MESSAGES/django.po +1 -1
  258. wagtail/search/locale/cy/LC_MESSAGES/django.po +1 -1
  259. wagtail/search/locale/de/LC_MESSAGES/django.po +1 -1
  260. wagtail/search/locale/dv/LC_MESSAGES/django.po +1 -1
  261. wagtail/search/locale/es/LC_MESSAGES/django.po +1 -1
  262. wagtail/search/locale/et/LC_MESSAGES/django.po +1 -1
  263. wagtail/search/locale/fa/LC_MESSAGES/django.po +1 -1
  264. wagtail/search/locale/fi/LC_MESSAGES/django.po +1 -1
  265. wagtail/search/locale/fr/LC_MESSAGES/django.po +1 -1
  266. wagtail/search/locale/gl/LC_MESSAGES/django.po +1 -1
  267. wagtail/search/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  268. wagtail/search/locale/ht/LC_MESSAGES/django.po +1 -1
  269. wagtail/search/locale/hu/LC_MESSAGES/django.po +1 -1
  270. wagtail/search/locale/id_ID/LC_MESSAGES/django.po +1 -1
  271. wagtail/search/locale/is_IS/LC_MESSAGES/django.po +1 -1
  272. wagtail/search/locale/it/LC_MESSAGES/django.po +1 -1
  273. wagtail/search/locale/ja/LC_MESSAGES/django.po +1 -1
  274. wagtail/search/locale/ko/LC_MESSAGES/django.po +1 -1
  275. wagtail/search/locale/lt/LC_MESSAGES/django.po +1 -1
  276. wagtail/search/locale/mi/LC_MESSAGES/django.po +1 -1
  277. wagtail/search/locale/mn/LC_MESSAGES/django.po +1 -1
  278. wagtail/search/locale/my/LC_MESSAGES/django.po +1 -1
  279. wagtail/search/locale/nb/LC_MESSAGES/django.po +1 -1
  280. wagtail/search/locale/nl/LC_MESSAGES/django.po +1 -1
  281. wagtail/search/locale/pl/LC_MESSAGES/django.po +1 -1
  282. wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  283. wagtail/search/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  284. wagtail/search/locale/ro/LC_MESSAGES/django.po +1 -1
  285. wagtail/search/locale/ru/LC_MESSAGES/django.po +1 -1
  286. wagtail/search/locale/sl/LC_MESSAGES/django.po +1 -1
  287. wagtail/search/locale/sv/LC_MESSAGES/django.po +1 -1
  288. wagtail/search/locale/tet/LC_MESSAGES/django.po +1 -1
  289. wagtail/search/locale/th/LC_MESSAGES/django.po +1 -1
  290. wagtail/search/locale/tr/LC_MESSAGES/django.mo +0 -0
  291. wagtail/search/locale/tr/LC_MESSAGES/django.po +8 -1
  292. wagtail/search/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  293. wagtail/search/locale/ug/LC_MESSAGES/django.po +1 -1
  294. wagtail/search/locale/uk/LC_MESSAGES/django.po +1 -1
  295. wagtail/search/locale/vi/LC_MESSAGES/django.po +1 -1
  296. wagtail/search/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  297. wagtail/search/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  298. wagtail/sites/locale/ar/LC_MESSAGES/django.po +1 -1
  299. wagtail/sites/locale/be/LC_MESSAGES/django.po +1 -1
  300. wagtail/sites/locale/bn/LC_MESSAGES/django.po +1 -1
  301. wagtail/sites/locale/ca/LC_MESSAGES/django.po +1 -1
  302. wagtail/sites/locale/cs/LC_MESSAGES/django.po +1 -1
  303. wagtail/sites/locale/cy/LC_MESSAGES/django.po +1 -1
  304. wagtail/sites/locale/da/LC_MESSAGES/django.po +1 -1
  305. wagtail/sites/locale/de/LC_MESSAGES/django.po +1 -1
  306. wagtail/sites/locale/dv/LC_MESSAGES/django.po +1 -1
  307. wagtail/sites/locale/el/LC_MESSAGES/django.po +1 -1
  308. wagtail/sites/locale/en_IN/LC_MESSAGES/django.po +1 -1
  309. wagtail/sites/locale/es/LC_MESSAGES/django.po +1 -1
  310. wagtail/sites/locale/es_419/LC_MESSAGES/django.po +1 -1
  311. wagtail/sites/locale/es_VE/LC_MESSAGES/django.po +1 -1
  312. wagtail/sites/locale/et/LC_MESSAGES/django.po +1 -1
  313. wagtail/sites/locale/fa/LC_MESSAGES/django.po +1 -1
  314. wagtail/sites/locale/fi/LC_MESSAGES/django.po +1 -1
  315. wagtail/sites/locale/fr/LC_MESSAGES/django.po +1 -1
  316. wagtail/sites/locale/gl/LC_MESSAGES/django.po +1 -1
  317. wagtail/sites/locale/he_IL/LC_MESSAGES/django.po +1 -1
  318. wagtail/sites/locale/hi/LC_MESSAGES/django.po +1 -1
  319. wagtail/sites/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  320. wagtail/sites/locale/ht/LC_MESSAGES/django.po +1 -1
  321. wagtail/sites/locale/hu/LC_MESSAGES/django.po +1 -1
  322. wagtail/sites/locale/id_ID/LC_MESSAGES/django.po +1 -1
  323. wagtail/sites/locale/is_IS/LC_MESSAGES/django.po +1 -1
  324. wagtail/sites/locale/it/LC_MESSAGES/django.po +1 -1
  325. wagtail/sites/locale/ja/LC_MESSAGES/django.po +1 -1
  326. wagtail/sites/locale/ka/LC_MESSAGES/django.po +1 -1
  327. wagtail/sites/locale/ko/LC_MESSAGES/django.po +1 -1
  328. wagtail/sites/locale/lt/LC_MESSAGES/django.po +1 -1
  329. wagtail/sites/locale/lv/LC_MESSAGES/django.po +1 -1
  330. wagtail/sites/locale/mi/LC_MESSAGES/django.po +1 -1
  331. wagtail/sites/locale/mn/LC_MESSAGES/django.po +1 -1
  332. wagtail/sites/locale/my/LC_MESSAGES/django.po +1 -1
  333. wagtail/sites/locale/nb/LC_MESSAGES/django.po +1 -1
  334. wagtail/sites/locale/nl/LC_MESSAGES/django.po +1 -1
  335. wagtail/sites/locale/pl/LC_MESSAGES/django.po +1 -1
  336. wagtail/sites/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  337. wagtail/sites/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  338. wagtail/sites/locale/ro/LC_MESSAGES/django.po +1 -1
  339. wagtail/sites/locale/ru/LC_MESSAGES/django.po +1 -1
  340. wagtail/sites/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  341. wagtail/sites/locale/sl/LC_MESSAGES/django.po +1 -1
  342. wagtail/sites/locale/sr/LC_MESSAGES/django.po +1 -1
  343. wagtail/sites/locale/sv/LC_MESSAGES/django.po +1 -1
  344. wagtail/sites/locale/ta/LC_MESSAGES/django.po +1 -1
  345. wagtail/sites/locale/tet/LC_MESSAGES/django.po +1 -1
  346. wagtail/sites/locale/th/LC_MESSAGES/django.po +1 -1
  347. wagtail/sites/locale/tr/LC_MESSAGES/django.po +1 -1
  348. wagtail/sites/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  349. wagtail/sites/locale/ug/LC_MESSAGES/django.po +1 -1
  350. wagtail/sites/locale/uk/LC_MESSAGES/django.po +1 -1
  351. wagtail/sites/locale/vi/LC_MESSAGES/django.po +1 -1
  352. wagtail/sites/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  353. wagtail/sites/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  354. wagtail/snippets/locale/sl/LC_MESSAGES/django.mo +0 -0
  355. wagtail/snippets/locale/sl/LC_MESSAGES/django.po +6 -0
  356. wagtail/snippets/locale/tr/LC_MESSAGES/django.mo +0 -0
  357. wagtail/snippets/locale/tr/LC_MESSAGES/django.po +32 -1
  358. wagtail/users/locale/tr/LC_MESSAGES/django.mo +0 -0
  359. wagtail/users/locale/tr/LC_MESSAGES/django.po +135 -1
  360. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/METADATA +1 -1
  361. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/RECORD +365 -359
  362. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/WHEEL +0 -0
  363. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/entry_points.txt +0 -0
  364. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/licenses/LICENSE +0 -0
  365. {wagtail-7.1.dist-info → wagtail-7.1.1.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t={2294:(e,t,i)=>{var n=i(6931),s=i.n(n),l=i(2427),a=i.n(l),o=i(4327),r=i(1238),c=i(1002);class d{constructor(e,t,i,n,l,d){this.blockDef=e,this.type=e.name;const h=$(`\n <div class="w-field__wrapper" data-field-wrapper>\n <div class="${(0,o.Z)(this.blockDef.meta.classname)}" data-field>\n <div class="w-field__errors" id="${i}-errors" data-field-errors>\n <svg class="icon icon-warning w-field__errors-icon" aria-hidden="true" hidden><use href="#icon-warning"></use></svg>\n </div>\n <div class="w-field__help" id="${i}-helptext" data-field-help></div>\n <div class="w-field__input" data-field-input>\n <div data-streamfield-widget></div>\n </div>\n </div>\n </div>\n `);$(t).replaceWith(h);const u=h.find("[data-streamfield-widget]").get(0);this.element=h[0],this.field=this.element.querySelector("[data-field]"),this.parentCapabilities=d||new Map,this.prefix=i;const p={attributes:this.getAttributes()};try{this.widget=this.blockDef.widget.render(u,i,i,n,this.parentCapabilities,p)}catch(e){return console.error(e),void this.setError({messages:["This widget failed to render, please check the console for details."]})}if(this.idForLabel=this.widget.idForLabel,this.blockDef.meta.helpText){const e=document.createElement("p");e.classList.add("help"),e.innerHTML=this.blockDef.meta.helpText,this.field.querySelector("[data-field-help]").appendChild(e)}if(window.comments&&this.blockDef.meta.showAddCommentButton){const t=document.createElement("button");t.type="button",t.setAttribute("aria-label",e.meta.strings.ADD_COMMENT),t.setAttribute("data-comment-add",""),t.classList.add("w-field__comment-button","w-field__comment-button--add"),s().render(a().createElement(a().Fragment,null,a().createElement(r.A,{name:"comment-add"}),a().createElement(r.A,{name:"comment-add-reversed"})),t),this.field.classList.add("w-field--commentable"),this.field.querySelector("[data-field-input]").appendChild(t),window.comments.initAddCommentButton(t)}l&&this.setError(l),(0,c.$)(this.field,this.blockDef.meta.attrs||{})}setCapabilityOptions(e,t){Object.assign(this.parentCapabilities.get(e),t),this.widget&&this.widget.setCapabilityOptions&&this.widget.setCapabilityOptions(e,t)}setState(e){this.widget&&this.widget.setState(e)}setError(e){const t=this.field.querySelector("[data-field-errors]");if(t.querySelectorAll(".error-message").forEach((e=>e.remove())),this.widget?.setInvalid?.(!!e),e){this.field.classList.add("w-field--error"),t.querySelector(".icon").removeAttribute("hidden");const i=document.createElement("p");i.classList.add("error-message");const n=document.createTextNode(e.messages.join(" "));i.appendChild(n),t.appendChild(i)}else this.field.classList.remove("w-field--error"),t.querySelector(".icon").setAttribute("hidden","true")}getAttributes(){const e=this.prefix,t={};return this.blockDef.meta.helpText&&(t["aria-describedby"]=`${e}-helptext`),this.blockDef.meta.required&&(t.required=""),this.blockDef.meta.maxLength&&(t.maxLength=this.blockDef.meta.maxLength),t}getState(){return this.widget.getState()}getValue(){return this.widget.getValue()}getTextLabel(e){return this.widget.getTextLabel?this.widget.getTextLabel(e):null}focus(e){this.widget&&this.widget.focus(e)}}class h{constructor(e,t,i){this.name=e,this.widget=t,this.meta=i}render(e,t,i,n,s){return new d(this,e,t,i,n,s)}}class u{constructor(e,t){this.blockDef=e;const i=document.createElement("div");this.blockDef.meta.html?i.innerHTML=this.blockDef.meta.html:i.innerHTML=(0,o.Z)(this.blockDef.meta.text),t.replaceWith(i),(0,c.$)(i,this.blockDef.meta.attrs||{})}setState(e){}setError(e){}getState(){return null}getValue(){return null}focus(){}}class p{constructor(e,t){this.name=e,this.meta=t}render(e){return new u(this,e)}}var m=i(4188),b=i(4545),f=i(2833);class g{constructor(e){this.props=e}render(){const e=document.createElement("template"),{panelId:t,headingId:i,contentId:n,blockDef:s,blockTypeIcon:l,blockTypeLabel:a,collapsed:o}=this.props;return e.innerHTML=`\n <section class="w-panel w-panel--nested${o?" collapsed":""}" id="${t}" aria-labelledby="${i}" data-panel>\n <div class="w-panel__header">\n <a class="w-panel__anchor w-panel__anchor--prefix" href="#${t}" aria-labelledby="${i}" data-panel-anchor>\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <button class="w-panel__toggle" type="button" aria-label="${(0,f.AP)("Toggle section")}" aria-describedby="${i}" data-panel-toggle aria-controls="${n}" aria-expanded="true">\n <svg class="icon icon-${l} w-panel__icon" aria-hidden="true">\n <use href="#icon-${l}"></use>\n </svg>\n </button>\n <h2 class="w-panel__heading w-panel__heading--label" aria-level="3" id="${i}" data-panel-heading>\n <span class="c-sf-block__type">${a}</span>\n ${s?.meta.required?'<span class="w-required-mark" data-panel-required>*</span>':""}\n <span data-panel-heading-text class="c-sf-block__title"></span>\n </h2>\n <a class="w-panel__anchor w-panel__anchor--suffix" href="#${t}" aria-labelledby="${i}">\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <div class="w-panel__divider"></div>\n <div class="w-panel__controls" data-panel-controls></div>\n </div>\n <div id="${n}" class="w-panel__content">\n ${s?"<div data-streamfield-block></div>":""}\n </div>\n </section>\n `,e.content.firstElementChild}}const k=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const i=document.querySelector(`#${e.getAttribute("aria-controls")}`);i&&(e.setAttribute("aria-expanded",`${t}`),t?i.removeAttribute("hidden"):"onbeforematch"in document.body?i.setAttribute("hidden","until-found"):i.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function v(e){const t=e.closest("[data-panel]"),i=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!i||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const n=k.bind(null,e),s=t.classList.contains("collapsed"),l=i.querySelector('[aria-invalid="true"], .error, .w-field--error'),a=s&&!l;a&&n(!1),e.addEventListener("click",n.bind(null,void 0));const o=t.querySelector("[data-panel-heading]");o&&o.addEventListener("click",n.bind(null,void 0)),i.addEventListener("beforematch",n.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!a}}))}class w{constructor(e,t,i,n,s){const l=n||{};this.blockDef=e,this.type=e.name,this.childBlocks={};let a="";if(this.blockDef.collapsible&&(a=new g({panelId:i+"-section",headingId:i+"-heading",contentId:i+"-content",blockTypeIcon:(0,o.Z)(e.meta.icon),blockTypeLabel:(0,o.Z)(e.meta.label),collapsed:e.meta.collapsed}).render().outerHTML),e.meta.formTemplate){let n=$(a);$(t).replaceWith(n),this.blockDef.collapsible&&(n=this.#e(n,i));const o=e.meta.formTemplate.replace(/__PREFIX__/g,i);n.append(o);const r=s?.blockErrors||{};this.blockDef.childBlockDefs.forEach((e=>{const t=n.find('[data-structblock-child="'+e.name+'"]').get(0),s=e.render(t,i+"-"+e.name,l[e.name],r[e.name]);this.childBlocks[e.name]=s})),this.container=n}else{let e=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n </div>\n `);e.append(a),$(t).replaceWith(e),this.blockDef.collapsible&&(e=this.#e(e,i)),this.blockDef.meta.helpText&&e.append(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `),this.blockDef.childBlockDefs.forEach((t=>{let n="";t instanceof this.blockDef.constructor||(n=`<label class="w-field__label">${(0,o.Z)(t.meta.label)}${t.meta.required?'<span class="w-required-mark">*</span>':""}</label>`);const a=$(`\n <div data-contentpath="${t.name}">\n ${n}\n <div data-streamfield-block></div>\n </div>\n `);e.append(a);const r=a.find("[data-streamfield-block]").get(0),c=a.find("label").get(0),d=s?.blockErrors||{},h=t.render(r,i+"-"+t.name,l[t.name],d[t.name],new Map);this.childBlocks[t.name]=h,h.idForLabel&&c.setAttribute("for",h.idForLabel)})),this.container=e}this.blockDef.collapsible&&this.setTextLabel(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}#e(e,t){const i=e.find("[data-panel-toggle]")[0],n=e.find("[data-panel-heading-text]")[0];return v(i),this.setTextLabel=()=>{const e=this.getTextLabel({maxLength:50});n.textContent=e||""},i.addEventListener("wagtail:panel-toggle",this.setTextLabel),e.find(`#${t}-content`)}setState(e){for(const t in e)this.childBlocks[t].setState(e[t])}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.childBlocks[t].setError(e.blockErrors[t])}getState(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getState();return e}getDuplicatedState(){const e={};for(const t in this.childBlocks){const i=this.childBlocks[t];e[t]=void 0===i.getDuplicatedState?i.getState():i.getDuplicatedState()}return e}getValue(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getValue();return e}getTextLabel(e){if(this.blockDef.meta.labelFormat)return this.blockDef.meta.labelFormat.replace(/\{(\w+)\}/g,((t,i)=>{const n=this.childBlocks[i];return n&&n.getTextLabel?n.getTextLabel(e):""}));for(const t of this.blockDef.childBlockDefs){const i=this.childBlocks[t.name];if(i.getTextLabel){const t=i.getTextLabel(e);if(t)return t}}return null}focus(e){if(this.blockDef.childBlockDefs.length){const t=this.blockDef.childBlockDefs[0].name;this.childBlocks[t].focus(e)}}}class D{constructor(e,t,i){this.name=e,this.childBlockDefs=t,this.meta=i,this.collapsible=!0}render(e,t,i,n){return new w(this,e,t,i,n)}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let y;const C=new Uint8Array(16),E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));const B=function(e,t,i){if(x.randomUUID&&!t&&!e)return x.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!y){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");y=crypto.getRandomValues.bind(crypto)}return y(C)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=n[e];return t}return function(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}(n)};var _=i(246),S=i(9675);class I{constructor(e){this.sequenceChild=e}render(e){const t=this.sequenceChild.strings[this.labelIdentifier]||this.labelIdentifier;this.dom=$(`\n <button type="button" class="button button--icon text-replace white" data-streamfield-action="${this.labelIdentifier}" title="${(0,o.Z)(t)}">\n <svg class="icon icon-${(0,o.Z)(this.icon)}" aria-hidden="true">\n <use href="#icon-${(0,o.Z)(this.icon)}"></use>\n </svg>\n </button>\n `),this.dom.on("click",(()=>(this.onClick&&this.onClick(),!1))),$(e).append(this.dom),this.enableEvent&&this.sequenceChild.addEventListener(this.enableEvent,(()=>{this.enable()})),this.disableEvent&&this.sequenceChild.addEventListener(this.disableEvent,(()=>{this.disable()})),this.initiallyDisabled&&this.disable()}enable(){this.dom.removeAttr("disabled")}disable(){this.dom.attr("disabled","true")}}class q extends I{enableEvent="enableMoveUp";disableEvent="disableMoveUp";initiallyDisabled=!0;icon="arrow-up";labelIdentifier="MOVE_UP";onClick(){this.sequenceChild.moveUp()}}class L extends I{enableEvent="enableMoveDown";disableEvent="disableMoveDown";initiallyDisabled=!0;icon="arrow-down";labelIdentifier="MOVE_DOWN";onClick(){this.sequenceChild.moveDown()}}class T extends I{enableEvent="enableDrag";disableEvent="disableDrag";initiallyDisabled=!1;icon="grip";labelIdentifier="DRAG"}class A extends I{enableEvent="enableDuplication";disableEvent="disableDuplication";icon="copy";labelIdentifier="DUPLICATE";onClick(){this.sequenceChild.duplicate({animate:!0})}}class M extends I{icon="bin";labelIdentifier="DELETE";onClick(){this.sequenceChild.delete({animate:!0})}}class U extends EventTarget{constructor(e,t,i,n,s,l,a,r){super(),this.blockDef=e,this.type=e.name,this.prefix=i,this.index=n,this.id=s,this.sequence=a;const c=r&&r.animate,d=r&&r.focus,h=r&&r.collapsed;this.strings=r&&r.strings||{};const u=`block-${s}-section`,p=`block-${s}-heading`,m=`block-${s}-content`,b=(0,o.Z)(this.blockDef.meta.icon),f=(0,o.Z)(this.blockDef.meta.label),k=new g({panelId:u,headingId:p,contentId:m,blockDef:e,blockTypeIcon:b,blockTypeLabel:f}).render(),w=$(`\n <div data-streamfield-child ${this.id?`data-contentpath="${(0,o.Z)(this.id)}"`:"data-contentpath-disabled"}>\n <input type="hidden" name="${this.prefix}-deleted" value="">\n <input type="hidden" name="${this.prefix}-order" value="${n}">\n <input type="hidden" name="${this.prefix}-type" value="${(0,o.Z)(this.type||"")}">\n <input type="hidden" name="${this.prefix}-id" value="${(0,o.Z)(this.id||"")}">\n ${k.outerHTML}\n </div>\n `);$(t).replaceWith(w),this.element=w.get(0);const x=w.find("[data-streamfield-block]").get(0);this.actionsContainerElement=w.find("[data-panel-controls]").get(0),this.titleElement=w.find("[data-panel-heading-text]"),this.toggleElement=this.element.querySelector("[data-panel-toggle]"),this.deletedInput=w.find(`input[name="${this.prefix}-deleted"]`),this.indexInput=w.find(`input[name="${this.prefix}-order"]`),this.addActionButton(new q(this)),this.addActionButton(new L(this)),this.addActionButton(new T(this)),this.addActionButton(new A(this)),this.addActionButton(new M(this));const y=new Map;y.set("duplicate",{enabled:!0,fn:this.duplicate}),y.set("split",{enabled:!0,fn:this.split.bind(this)}),y.set("addSibling",{enabled:!0,fn:this.addSibling.bind(this),blockGroups:this.sequence.getBlockGroups(),getBlockCount:this.sequence.getBlockCount.bind(this.sequence),getBlockMax:this.sequence.getBlockMax.bind(this.sequence)}),this.blockDef instanceof D&&(this.blockDef.collapsible=!1),this.block=this.blockDef.render(x,this.prefix+"-value",l,void 0,y),v(this.element.querySelector("[data-panel-toggle]")),h&&this.collapse(),this.toggleElement.addEventListener("wagtail:panel-toggle",(()=>{const e=this.getTextLabel({maxLength:70});this.titleElement.text(e||"")}));const C=this.getTextLabel({maxLength:70});this.titleElement.text(C||""),c?(w.hide(),setTimeout((()=>{w.slideDown(),d&&this.block.focus({soft:!0})}),10)):d&&this.block.focus({soft:!0})}addActionButton(e){e.render(this.actionsContainerElement)}addSibling(e){this.sequence._onRequestInsert(this.index+1,e)}moveUp(){this.sequence.moveBlockUp(this.index)}moveDown(){this.sequence.moveBlockDown(this.index)}duplicate(e){this.sequence.duplicateBlock(this.index,e)}delete(e){this.sequence.deleteBlock(this.index,e)}markDeleted({animate:e=!1}){this.deletedInput.val("1"),e?$(this.element).slideUp().dequeue().fadeOut().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true");const t=this.getContentPath();t&&window.comments.commentApp&&window.comments.commentApp.invalidateContentPath(t)}getContentPath(){return window.comments?.getContentPath(this.element)}enableDuplication(){this.dispatchEvent(new Event("enableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!0})}disableDuplication(){this.dispatchEvent(new Event("disableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!1})}enableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!0})}disableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!1})}enableMoveUp(){this.dispatchEvent(new Event("enableMoveUp"))}disableMoveUp(){this.dispatchEvent(new Event("disableMoveUp"))}enableMoveDown(){this.dispatchEvent(new Event("enableMoveDown"))}disableMoveDown(){this.dispatchEvent(new Event("disableMoveDown"))}setIndex(e){this.index=e,this.indexInput.val(e)}setError(e){this.block.setError(e),e&&k(this.toggleElement,!0)}focus(e){this.block.focus(e)}getTextLabel(e){return this.block.getTextLabel?this.block.getTextLabel(e):null}collapse(){k(this.toggleElement,!1)}getDuplicatedState(){return{id:B(),value:void 0===this.block.getDuplicatedState?this.block.getState():this.block.getDuplicatedState()}}}class O{constructor(e,t){this.index=t&&t.index,this.onRequestInsert=t&&t.onRequestInsert}setIndex(e){this.index=e}delete({animate:e=!1}){e?$(this.element).slideUp().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true")}}class P{_createChild(e,t,i,n,s,l,a,o){throw new Error("not implemented")}_createInsertionControl(e,t){throw new Error("not implemented")}_getChildDataForInsertion(e){throw new Error("not implemented")}getBlockGroups(){throw new Error("not implemented")}clear(){this.countInput.val(0),this.sequenceContainer.empty(),this.children=[],this.blockCounter=0;const e=document.createElement("div");this.sequenceContainer.append(e),this.inserters=[this._createInsertionControl(e,{index:0,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings})],this.blockCountChanged()}_onRequestInsert(e,t){const[i,n,s]=this._getChildDataForInsertion(t);this._insert(i,n,s||null,e,{animate:!0,focus:!0})}blockCountChanged(){}_insert(e,t,i,n,s){const l=this.prefix+"-"+this.blockCounter,a=s&&s.animate,o=s&&s.focus,r=s&&s.collapsed;this.blockCounter+=1;const c=this.inserters[n].element,d=document.createElement("div"),h=document.createElement("div");$(d).insertAfter(c),$(h).insertAfter(d),(0,S.y)(n,this.children.length).forEach((e=>{this.children[e].setIndex(e+1)})),(0,S.y)(n+1,this.inserters.length).forEach((e=>{this.inserters[e].setIndex(e+1)}));const u=this._createChild(e,d,l,n,i,t,this,{animate:a,focus:o,collapsed:r,strings:this.blockDef.meta.strings});this.children.splice(n,0,u);const p=this._createInsertionControl(h,{index:n+1,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings,animate:a});this.inserters.splice(n+1,0,p),this.countInput.val(this.blockCounter);const m=0===n,b=n===this.children.length-1;return m||(u.enableMoveUp(),b&&this.children[n-1].enableMoveDown()),b||(u.enableMoveDown(),m&&this.children[n+1].enableMoveUp()),this.blockCountChanged(),u}deleteBlock(e,t){const i=t&&t.animate;this.children[e].markDeleted({animate:i}),this.inserters[e].delete({animate:i}),this.children.splice(e,1),this.inserters.splice(e,1),(0,S.y)(e,this.children.length).forEach((e=>{this.children[e].setIndex(e)})),(0,S.y)(e,this.inserters.length).forEach((e=>{this.inserters[e].setIndex(e)})),0===e&&this.children.length>0&&this.children[0].disableMoveUp(),e===this.children.length&&this.children.length>0&&this.children[this.children.length-1].disableMoveDown(),this.blockCountChanged()}initDragNDrop(){this.sortable=_.Ay.create(this.sequenceContainer.get(0),{handle:'[data-streamfield-action="DRAG"]',animation:200,draggable:"[data-streamfield-child]",onEnd:e=>{const{oldDraggableIndex:t,newDraggableIndex:i}=e;t!==i&&this.moveBlock(t,i)},setData:e=>{e.setData("application/vnd.wagtail.type","sf-block")}})}moveBlock(e,t){if(e===t)return;const i=this.inserters[e],n=this.children[e];t>e?$(i.element).insertAfter(this.children[t].element):$(i.element).insertBefore(this.inserters[t].element),$(n.element).insertAfter(i.element),this.inserters.splice(e,1),this.inserters.splice(t,0,i),this.children.splice(e,1),this.children.splice(t,0,n),t>e?(0,S.y)(e,t+1).forEach((e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)})):(0,S.y)(t,e+1).forEach((e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)}));const s=this.children.length-1;0===e&&(n.enableMoveUp(),this.children[0].disableMoveUp()),e===s&&(n.enableMoveDown(),this.children[s].disableMoveDown()),0===t&&(n.disableMoveUp(),this.children[1].enableMoveUp()),t===s&&(n.disableMoveDown(),this.children[s-1].enableMoveDown())}moveBlockUp(e){this.moveBlock(e,e-1)}moveBlockDown(e){this.moveBlock(e,e+1)}setState(e){this.clear(),e.forEach(((e,t)=>{this.insert(e,t)}))}getState(){return this.children.map((e=>e.getState()))}getDuplicatedState(){return this.children.map((e=>e.getDuplicatedState()))}getValue(){return this.children.map((e=>e.getValue()))}getTextLabel(e){const t=e&&e.maxLength;let i="";for(const e of this.children){const n=e.getTextLabel({maxLength:t});if(n)if(i){const e=i+", "+n;if(t&&e.length>t-1)return i.endsWith("…")||(i+="…"),i;i=e}else i=n}return i}focus(e){this.children.length&&this.children[0].focus(e)}}class R extends U{getState(){return{id:this.id||null,value:this.block.getState()}}getValue(){return this.block.getValue()}setState({value:e,id:t}){this.block.setState(e),this.id=void 0===t?null:t}setValue(e){this.block.setState(e)}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class F extends O{constructor(e,t){super(e,t),this.onRequestInsert=t&&t.onRequestInsert;const i=t&&t.animate,n=(0,o.Z)(t.strings.ADD),s=$(`\n <button type="button" title="${n}" data-streamfield-list-add class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n `);$(e).replaceWith(s),this.element=s.get(0),s.click((()=>{this.onRequestInsert&&this.onRequestInsert(this.index)})),i&&s.hide().slideDown()}enable(){$(this.element).removeAttr("disabled")}disable(){$(this.element).attr("disabled","true")}}class V extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-list-count value="0">\n\n <div data-streamfield-list-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.children=[],this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-list-count]"),this.sequenceContainer=l.find("[data-streamfield-list-container]"),this.container=l,this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach((e=>{e.collapse()})),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}setState(e){this.clear(),e.forEach((({value:e,id:t},i)=>{const n=void 0===t?B():t;this.insert(e,i,{id:t||n})}))}_getChildDataForInsertion(){return[this.blockDef.childBlockDef,this.blockDef.initialChildState,B()]}_createChild(e,t,i,n,s,l,a,o){return new R(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return new F(e,t)}blockCountChanged(){super.blockCountChanged();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}e.length?this.setError({messages:e}):this.setError({})}insert(e,t,i){return this._insert(this.blockDef.childBlockDef,e,i?.id,t,i)}duplicateBlock(e,t){const i=this.children[e],{id:n,value:s}=i.getDuplicatedState(),l=t&&t.animate;this.insert(s,e+1,{animate:l,focus:!0,collapsed:i.collapsed,id:n})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate;l.setValue(t);const o=this.insert(i,e+1,{animate:a,focus:!0,collapsed:l.collapsed}),r=l.getContentPath(),c=o.getContentPath(),d=window.comments?.commentApp;r&&c&&d&&d.utils.selectCommentsForContentPathFactory(r)(d.store.getState()).forEach((e=>{n(e)&&d.updateContentPath(e.localId,c)}))}setError(e){if(!e)return;const t=this.container[0];(0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors&&Object.entries(e.blockErrors).forEach((([e,t])=>{this.children[e].setError(t)}))}getBlockGroups(){return[["",[this.blockDef.childBlockDef]]]}getBlockCount(){return this.children.length}getBlockMax(){return this.blockDef.meta.maxNum||0}}class Z{constructor(e,t,i,n){this.name=e,this.childBlockDef=t,this.initialChildState=i,this.meta=n}render(e,t,i,n){return new V(this,e,t,i,n)}}var N=i(7381),j=i(4549),W=i(2891);const H={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(t){"Escape"===t.key&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}};W.Controller;class G extends U{getState(){return{type:this.type,value:this.block.getState(),id:this.id||null}}getDuplicatedState(){return{...super.getDuplicatedState(),type:this.type}}setState({type:e,value:t,id:i}){this.type=e,this.block.setState(t),this.id=void 0===i?null:i}getValue(){return{type:this.type,value:this.block.getValue(),id:this.id||null}}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class z extends O{constructor(e,t){super(e,t),this.groupedChildBlockDefs=t.groupedChildBlockDefs;const i=$(`\n <div>\n <button type="button" title="${j.Mn}" class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n </div>\n `);$(e).replaceWith(i),this.element=i.get(0),this.addButton=i.find("button");const n=this.blockItems;1!==n.length||1!==n[0].items.length?(this.combobox=document.createElement("div"),this.tooltip=(0,N.Ay)(this.addButton.get(0),{content:this.combobox,trigger:"click",interactive:!0,maxWidth:"none",theme:"dropdown",arrow:!1,placement:"bottom",plugins:[H],onShow:this.renderMenu.bind(this),onHidden:()=>{s().render(null,this.combobox)}})):this.addButton.click((()=>{this.onRequestInsert&&this.onRequestInsert(this.index,n[0].items[0])}))}get blockItems(){return this.groupedChildBlockDefs.map((([e,t])=>({label:e||"",type:e||"",items:t.map((e=>({type:e.name,label:e.meta.label,description:e.meta.description,icon:e.meta.icon,blockDefId:e.meta.blockDefId,isPreviewable:e.meta.isPreviewable})))})))}renderMenu(){const e=this.blockItems;s().render(a().createElement(j.Ay,{label:j.qc,placeholder:j.qc,items:e,getItemLabel:(e,t)=>t.label,getItemDescription:e=>e.label,getSearchFields:e=>[e.label,e.type],noResultsText:j.b5,onSelect:this.onSelectBlock.bind(this)}),this.combobox)}onSelectBlock(e){this.onRequestInsert&&this.onRequestInsert(this.index,{type:e.selectedItem.type}),this.close()}open(){this.addButton.attr("aria-expanded","true"),this.tooltip.show()}close(){this.addButton.attr("aria-expanded","false"),this.tooltip.hide()}}class X extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-stream-count value="0">\n <div data-streamfield-stream-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.container=l,this.element=l.get(0),this.children=[],this.childBlockCounts=new Map,this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-stream-count]"),this.sequenceContainer=l.find("[data-streamfield-stream-container]"),this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach((e=>{e.collapse()})),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}getBlockGroups(){return this.blockDef.groupedChildBlockDefs}getBlockCount(e){return e?(this.childBlockCounts.has(e)||this._updateBlockCount(e),this.childBlockCounts.get(e)||0):this.children.length}getBlockMax(e){return e?this.blockDef.meta.blockCounts[e]?.max_num:this.blockDef.meta.maxNum}_updateBlockCount(e){const t=this.children.filter((t=>t.type===e)).length;this.childBlockCounts.set(e,t)}blockCountChanged(){super.blockCountChanged(),this.childBlockCounts.clear();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}for(const[t,i]of Object.entries(this.blockDef.meta.blockCounts)){const n=i.max_num;if("number"==typeof n&&this.getBlockCount(t)>n){const i=this.blockDef.childBlockDefsByName[t],s=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${n}`),l=`${i.meta.label}: ${s}`;e.push(l)}const s=i.min_num;if("number"==typeof s&&this.getBlockCount(t)<s){const i=this.blockDef.childBlockDefsByName[t],n=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${s}`),l=`${i.meta.label}: ${n}`;e.push(l)}}e.length?this.setError({messages:e}):this.setError({})}_createChild(e,t,i,n,s,l,a,o){return new G(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return t.groupedChildBlockDefs=this.blockDef.groupedChildBlockDefs,new z(e,t)}insert({type:e,value:t,id:i},n,s){const l=this.blockDef.childBlockDefsByName[e];return this._insert(l,t,i,n,s)}_getChildDataForInsertion({type:e}){return[this.blockDef.childBlockDefsByName[e],this.blockDef.initialChildStates[e],B()]}duplicateBlock(e,t){const i=this.children[e],n=i.getDuplicatedState(),s=t&&t.animate;this.insert(n,e+1,{animate:s,focus:!0,collapsed:i.collapsed})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate,o=l.getState(),r=this.insert({type:o.type,id:B(),value:i},e+1,{animate:a,focus:!0,collapsed:l.collapsed});l.setState({type:o.type,id:o.id||null,value:t});const c=l.getContentPath(),d=r.getContentPath(),h=window.comments?.commentApp;c&&d&&h&&h.utils.selectCommentsForContentPathFactory(c)(h.store.getState()).forEach((e=>{n(e)&&h.updateContentPath(e.localId,d)}))}setState(e){super.setState(e)}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.children[t].setError(e.blockErrors[t])}}class J{constructor(e,t,i,n){this.name=e,this.groupedChildBlockDefs=t,this.initialChildStates=i,this.childBlockDefsByName={},this.groupedChildBlockDefs.forEach((([e,t])=>{t.forEach((e=>{this.childBlockDefsByName[e.name]=e}))})),this.meta=n}render(e,t,i,n){return new X(this,e,t,i,n)}}const K=window.wagtailStreamField||{};K.blocks={FieldBlock:d,FieldBlockDefinition:h,StaticBlock:u,StaticBlockDefinition:p,StructBlock:w,StructBlockDefinition:D,ListBlock:V,ListBlockDefinition:Z,StreamBlock:X,StreamBlockDefinition:J},window.telepath.register("wagtail.blocks.FieldBlock",h),window.telepath.register("wagtail.blocks.StaticBlock",p),window.telepath.register("wagtail.blocks.StructBlock",D),window.telepath.register("wagtail.blocks.ListBlock",Z),window.telepath.register("wagtail.blocks.StreamBlock",J),window.wagtailStreamField=K}},i={};function n(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,i,s,l)=>{if(!i){var a=1/0;for(d=0;d<e.length;d++){for(var[i,s,l]=e[d],o=!0,r=0;r<i.length;r++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](i[r])))?i.splice(r--,1):(o=!1,l<a&&(a=l));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[i,s,l]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=591,(()=>{var e={591:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var s,l,[a,o,r]=i,c=0;if(a.some((t=>0!==e[t]))){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(r)var d=r(n)}for(t&&t(i);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},i=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=n.O(void 0,[321],(()=>n(2294)));s=n.O(s)})();
1
+ (()=>{"use strict";var e,t={2294:(e,t,i)=>{var n=i(6931),s=i.n(n),l=i(2427),a=i.n(l),o=i(4327),r=i(1238),c=i(1002);class d{constructor(e,t,i,n,l,d){this.blockDef=e,this.type=e.name;const h=$(`\n <div class="w-field__wrapper" data-field-wrapper>\n <div class="${(0,o.Z)(this.blockDef.meta.classname)}" data-field>\n <div class="w-field__errors" id="${i}-errors" data-field-errors>\n <svg class="icon icon-warning w-field__errors-icon" aria-hidden="true" hidden><use href="#icon-warning"></use></svg>\n </div>\n <div class="w-field__help" id="${i}-helptext" data-field-help></div>\n <div class="w-field__input" data-field-input>\n <div data-streamfield-widget></div>\n </div>\n </div>\n </div>\n `);$(t).replaceWith(h);const u=h.find("[data-streamfield-widget]").get(0);this.element=h[0],this.field=this.element.querySelector("[data-field]"),this.parentCapabilities=d||new Map,this.prefix=i;const p={attributes:this.getAttributes()};try{this.widget=this.blockDef.widget.render(u,i,i,n,this.parentCapabilities,p)}catch(e){return console.error(e),void this.setError({messages:["This widget failed to render, please check the console for details."]})}if(this.idForLabel=this.widget.idForLabel,this.blockDef.meta.helpText){const e=document.createElement("p");e.classList.add("help"),e.innerHTML=this.blockDef.meta.helpText,this.field.querySelector("[data-field-help]").appendChild(e)}if(window.comments&&this.blockDef.meta.showAddCommentButton){const t=document.createElement("button");t.type="button",t.setAttribute("aria-label",e.meta.strings.ADD_COMMENT),t.setAttribute("data-comment-add",""),t.classList.add("w-field__comment-button","w-field__comment-button--add"),s().render(a().createElement(a().Fragment,null,a().createElement(r.A,{name:"comment-add"}),a().createElement(r.A,{name:"comment-add-reversed"})),t),this.field.classList.add("w-field--commentable"),this.field.querySelector("[data-field-input]").appendChild(t),window.comments.initAddCommentButton(t)}l&&this.setError(l),(0,c.$)(this.field,this.blockDef.meta.attrs||{})}setCapabilityOptions(e,t){Object.assign(this.parentCapabilities.get(e),t),this.widget&&this.widget.setCapabilityOptions&&this.widget.setCapabilityOptions(e,t)}setState(e){this.widget&&this.widget.setState(e)}setError(e){const t=this.field.querySelector("[data-field-errors]");if(t.querySelectorAll(".error-message").forEach((e=>e.remove())),this.widget?.setInvalid?.(!!e),e){this.field.classList.add("w-field--error"),t.querySelector(".icon").removeAttribute("hidden");const i=document.createElement("p");i.classList.add("error-message");const n=document.createTextNode(e.messages.join(" "));i.appendChild(n),t.appendChild(i)}else this.field.classList.remove("w-field--error"),t.querySelector(".icon").setAttribute("hidden","true")}getAttributes(){const e=this.prefix,t={};return this.blockDef.meta.helpText&&(t["aria-describedby"]=`${e}-helptext`),this.blockDef.meta.required&&(t.required=""),this.blockDef.meta.maxLength&&(t.maxLength=this.blockDef.meta.maxLength),t}getState(){return this.widget.getState()}getValue(){return this.widget.getValue()}getTextLabel(e){return this.widget.getTextLabel?this.widget.getTextLabel(e):null}focus(e){this.widget&&this.widget.focus(e)}}class h{constructor(e,t,i){this.name=e,this.widget=t,this.meta=i}render(e,t,i,n,s){return new d(this,e,t,i,n,s)}}class u{constructor(e,t){this.blockDef=e;const i=document.createElement("div");this.blockDef.meta.html?i.innerHTML=this.blockDef.meta.html:i.innerHTML=(0,o.Z)(this.blockDef.meta.text),t.replaceWith(i),(0,c.$)(i,this.blockDef.meta.attrs||{})}setState(e){}setError(e){}getState(){return null}getValue(){return null}focus(){}}class p{constructor(e,t){this.name=e,this.meta=t}render(e){return new u(this,e)}}var m=i(4188),b=i(4545),f=i(2833);class g{constructor(e){this.props=e}render(){const e=document.createElement("template"),{panelId:t,headingId:i,contentId:n,blockDef:s,blockTypeIcon:l,blockTypeLabel:a,collapsed:o}=this.props;return e.innerHTML=`\n <section class="w-panel w-panel--nested${o?" collapsed":""}" id="${t}" aria-labelledby="${i}" data-panel>\n <div class="w-panel__header">\n <a class="w-panel__anchor w-panel__anchor--prefix" href="#${t}" aria-labelledby="${i}" data-panel-anchor>\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <button class="w-panel__toggle" type="button" aria-label="${(0,f.AP)("Toggle section")}" aria-describedby="${i}" data-panel-toggle aria-controls="${n}" aria-expanded="true">\n <svg class="icon icon-${l} w-panel__icon" aria-hidden="true">\n <use href="#icon-${l}"></use>\n </svg>\n </button>\n <h2 class="w-panel__heading w-panel__heading--label" aria-level="3" id="${i}" data-panel-heading>\n <span class="c-sf-block__type">${a}</span>\n ${s?.meta.required?'<span class="w-required-mark" data-panel-required>*</span>':""}\n <span data-panel-heading-text class="c-sf-block__title"></span>\n </h2>\n <a class="w-panel__anchor w-panel__anchor--suffix" href="#${t}" aria-labelledby="${i}">\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <div class="w-panel__divider"></div>\n <div class="w-panel__controls" data-panel-controls></div>\n </div>\n <div id="${n}" class="w-panel__content">\n ${s?"<div data-streamfield-block></div>":""}\n </div>\n </section>\n `,e.content.firstElementChild}}const k=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const i=document.querySelector(`#${e.getAttribute("aria-controls")}`);i&&(e.setAttribute("aria-expanded",`${t}`),t?i.removeAttribute("hidden"):"onbeforematch"in document.body?i.setAttribute("hidden","until-found"):i.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function v(e){const t=e.closest("[data-panel]"),i=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!i||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const n=k.bind(null,e),s=t.classList.contains("collapsed"),l=i.querySelector('[aria-invalid="true"], .error, .w-field--error'),a=s&&!l;a&&n(!1),e.addEventListener("click",n.bind(null,void 0));const o=t.querySelector("[data-panel-heading]");o&&o.addEventListener("click",n.bind(null,void 0)),i.addEventListener("beforematch",n.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!a}}))}class w{constructor(e,t,i,n,s){const l=n||{};this.blockDef=e,this.type=e.name,this.childBlocks={};let a="";if(this.blockDef.collapsible&&(a=new g({panelId:i+"-section",headingId:i+"-heading",contentId:i+"-content",blockTypeIcon:(0,o.Z)(e.meta.icon),blockTypeLabel:(0,o.Z)(e.meta.label),collapsed:e.meta.collapsed}).render().outerHTML),e.meta.formTemplate){const n=e.meta.formTemplate.replace(/__PREFIX__/g,i);let o;a?(o=$(a),$(t).replaceWith(o),o=this.#e(o,i),o.append(n)):(o=$(n),$(t).replaceWith(o));const r=s?.blockErrors||{};this.blockDef.childBlockDefs.forEach((e=>{const t=o.find('[data-structblock-child="'+e.name+'"]').get(0),n=e.render(t,i+"-"+e.name,l[e.name],r[e.name]);this.childBlocks[e.name]=n})),this.container=o}else{let e=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n </div>\n `);e.append(a),$(t).replaceWith(e),this.blockDef.collapsible&&(e=this.#e(e,i)),this.blockDef.meta.helpText&&e.append(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `),this.blockDef.childBlockDefs.forEach((t=>{let n="";t instanceof this.blockDef.constructor||(n=`<label class="w-field__label">${(0,o.Z)(t.meta.label)}${t.meta.required?'<span class="w-required-mark">*</span>':""}</label>`);const a=$(`\n <div data-contentpath="${t.name}">\n ${n}\n <div data-streamfield-block></div>\n </div>\n `);e.append(a);const r=a.find("[data-streamfield-block]").get(0),c=a.find("label").get(0),d=s?.blockErrors||{},h=t.render(r,i+"-"+t.name,l[t.name],d[t.name],new Map);this.childBlocks[t.name]=h,h.idForLabel&&c.setAttribute("for",h.idForLabel)})),this.container=e}this.blockDef.collapsible&&this.setTextLabel(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}#e(e,t){const i=e.find("[data-panel-toggle]")[0],n=e.find("[data-panel-heading-text]")[0];return v(i),this.setTextLabel=()=>{const e=this.getTextLabel({maxLength:50});n.textContent=e||""},i.addEventListener("wagtail:panel-toggle",this.setTextLabel),e.find(`#${t}-content`)}setState(e){for(const t in e)this.childBlocks[t].setState(e[t])}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.childBlocks[t].setError(e.blockErrors[t])}getState(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getState();return e}getDuplicatedState(){const e={};for(const t in this.childBlocks){const i=this.childBlocks[t];e[t]=void 0===i.getDuplicatedState?i.getState():i.getDuplicatedState()}return e}getValue(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getValue();return e}getTextLabel(e){if(this.blockDef.meta.labelFormat)return this.blockDef.meta.labelFormat.replace(/\{(\w+)\}/g,((t,i)=>{const n=this.childBlocks[i];return n&&n.getTextLabel?n.getTextLabel(e):""}));for(const t of this.blockDef.childBlockDefs){const i=this.childBlocks[t.name];if(i.getTextLabel){const t=i.getTextLabel(e);if(t)return t}}return null}focus(e){if(this.blockDef.childBlockDefs.length){const t=this.blockDef.childBlockDefs[0].name;this.childBlocks[t].focus(e)}}}class D{constructor(e,t,i){this.name=e,this.childBlockDefs=t,this.meta=i,this.collapsible=!0}render(e,t,i,n){return new w(this,e,t,i,n)}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let y;const C=new Uint8Array(16),E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));const B=function(e,t,i){if(x.randomUUID&&!t&&!e)return x.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!y){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");y=crypto.getRandomValues.bind(crypto)}return y(C)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=n[e];return t}return function(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}(n)};var _=i(246),S=i(9675);class I{constructor(e){this.sequenceChild=e}render(e){const t=this.sequenceChild.strings[this.labelIdentifier]||this.labelIdentifier;this.dom=$(`\n <button type="button" class="button button--icon text-replace white" data-streamfield-action="${this.labelIdentifier}" title="${(0,o.Z)(t)}">\n <svg class="icon icon-${(0,o.Z)(this.icon)}" aria-hidden="true">\n <use href="#icon-${(0,o.Z)(this.icon)}"></use>\n </svg>\n </button>\n `),this.dom.on("click",(()=>(this.onClick&&this.onClick(),!1))),$(e).append(this.dom),this.enableEvent&&this.sequenceChild.addEventListener(this.enableEvent,(()=>{this.enable()})),this.disableEvent&&this.sequenceChild.addEventListener(this.disableEvent,(()=>{this.disable()})),this.initiallyDisabled&&this.disable()}enable(){this.dom.removeAttr("disabled")}disable(){this.dom.attr("disabled","true")}}class q extends I{enableEvent="enableMoveUp";disableEvent="disableMoveUp";initiallyDisabled=!0;icon="arrow-up";labelIdentifier="MOVE_UP";onClick(){this.sequenceChild.moveUp()}}class L extends I{enableEvent="enableMoveDown";disableEvent="disableMoveDown";initiallyDisabled=!0;icon="arrow-down";labelIdentifier="MOVE_DOWN";onClick(){this.sequenceChild.moveDown()}}class T extends I{enableEvent="enableDrag";disableEvent="disableDrag";initiallyDisabled=!1;icon="grip";labelIdentifier="DRAG"}class A extends I{enableEvent="enableDuplication";disableEvent="disableDuplication";icon="copy";labelIdentifier="DUPLICATE";onClick(){this.sequenceChild.duplicate({animate:!0})}}class M extends I{icon="bin";labelIdentifier="DELETE";onClick(){this.sequenceChild.delete({animate:!0})}}class U extends EventTarget{constructor(e,t,i,n,s,l,a,r){super(),this.blockDef=e,this.type=e.name,this.prefix=i,this.index=n,this.id=s,this.sequence=a;const c=r&&r.animate,d=r&&r.focus,h=r&&r.collapsed;this.strings=r&&r.strings||{};const u=`block-${s}-section`,p=`block-${s}-heading`,m=`block-${s}-content`,b=(0,o.Z)(this.blockDef.meta.icon),f=(0,o.Z)(this.blockDef.meta.label),k=new g({panelId:u,headingId:p,contentId:m,blockDef:e,blockTypeIcon:b,blockTypeLabel:f}).render(),w=$(`\n <div data-streamfield-child ${this.id?`data-contentpath="${(0,o.Z)(this.id)}"`:"data-contentpath-disabled"}>\n <input type="hidden" name="${this.prefix}-deleted" value="">\n <input type="hidden" name="${this.prefix}-order" value="${n}">\n <input type="hidden" name="${this.prefix}-type" value="${(0,o.Z)(this.type||"")}">\n <input type="hidden" name="${this.prefix}-id" value="${(0,o.Z)(this.id||"")}">\n ${k.outerHTML}\n </div>\n `);$(t).replaceWith(w),this.element=w.get(0);const x=w.find("[data-streamfield-block]").get(0);this.actionsContainerElement=w.find("[data-panel-controls]").get(0),this.titleElement=w.find("[data-panel-heading-text]"),this.toggleElement=this.element.querySelector("[data-panel-toggle]"),this.deletedInput=w.find(`input[name="${this.prefix}-deleted"]`),this.indexInput=w.find(`input[name="${this.prefix}-order"]`),this.addActionButton(new q(this)),this.addActionButton(new L(this)),this.addActionButton(new T(this)),this.addActionButton(new A(this)),this.addActionButton(new M(this));const y=new Map;y.set("duplicate",{enabled:!0,fn:this.duplicate}),y.set("split",{enabled:!0,fn:this.split.bind(this)}),y.set("addSibling",{enabled:!0,fn:this.addSibling.bind(this),blockGroups:this.sequence.getBlockGroups(),getBlockCount:this.sequence.getBlockCount.bind(this.sequence),getBlockMax:this.sequence.getBlockMax.bind(this.sequence)}),this.blockDef instanceof D&&(this.blockDef.collapsible=!1),this.block=this.blockDef.render(x,this.prefix+"-value",l,void 0,y),v(this.element.querySelector("[data-panel-toggle]")),h&&this.collapse(),this.toggleElement.addEventListener("wagtail:panel-toggle",(()=>{const e=this.getTextLabel({maxLength:70});this.titleElement.text(e||"")}));const C=this.getTextLabel({maxLength:70});this.titleElement.text(C||""),c?(w.hide(),setTimeout((()=>{w.slideDown(),d&&this.block.focus({soft:!0})}),10)):d&&this.block.focus({soft:!0})}addActionButton(e){e.render(this.actionsContainerElement)}addSibling(e){this.sequence._onRequestInsert(this.index+1,e)}moveUp(){this.sequence.moveBlockUp(this.index)}moveDown(){this.sequence.moveBlockDown(this.index)}duplicate(e){this.sequence.duplicateBlock(this.index,e)}delete(e){this.sequence.deleteBlock(this.index,e)}markDeleted({animate:e=!1}){this.deletedInput.val("1"),e?$(this.element).slideUp().dequeue().fadeOut().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true");const t=this.getContentPath();t&&window.comments.commentApp&&window.comments.commentApp.invalidateContentPath(t)}getContentPath(){return window.comments?.getContentPath(this.element)}enableDuplication(){this.dispatchEvent(new Event("enableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!0})}disableDuplication(){this.dispatchEvent(new Event("disableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!1})}enableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!0})}disableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!1})}enableMoveUp(){this.dispatchEvent(new Event("enableMoveUp"))}disableMoveUp(){this.dispatchEvent(new Event("disableMoveUp"))}enableMoveDown(){this.dispatchEvent(new Event("enableMoveDown"))}disableMoveDown(){this.dispatchEvent(new Event("disableMoveDown"))}setIndex(e){this.index=e,this.indexInput.val(e)}setError(e){this.block.setError(e),e&&k(this.toggleElement,!0)}focus(e){this.block.focus(e)}getTextLabel(e){return this.block.getTextLabel?this.block.getTextLabel(e):null}collapse(){k(this.toggleElement,!1)}getDuplicatedState(){return{id:B(),value:void 0===this.block.getDuplicatedState?this.block.getState():this.block.getDuplicatedState()}}}class O{constructor(e,t){this.index=t&&t.index,this.onRequestInsert=t&&t.onRequestInsert}setIndex(e){this.index=e}delete({animate:e=!1}){e?$(this.element).slideUp().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true")}}class P{_createChild(e,t,i,n,s,l,a,o){throw new Error("not implemented")}_createInsertionControl(e,t){throw new Error("not implemented")}_getChildDataForInsertion(e){throw new Error("not implemented")}getBlockGroups(){throw new Error("not implemented")}clear(){this.countInput.val(0),this.sequenceContainer.empty(),this.children=[],this.blockCounter=0;const e=document.createElement("div");this.sequenceContainer.append(e),this.inserters=[this._createInsertionControl(e,{index:0,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings})],this.blockCountChanged()}_onRequestInsert(e,t){const[i,n,s]=this._getChildDataForInsertion(t);this._insert(i,n,s||null,e,{animate:!0,focus:!0})}blockCountChanged(){}_insert(e,t,i,n,s){const l=this.prefix+"-"+this.blockCounter,a=s&&s.animate,o=s&&s.focus,r=s&&s.collapsed;this.blockCounter+=1;const c=this.inserters[n].element,d=document.createElement("div"),h=document.createElement("div");$(d).insertAfter(c),$(h).insertAfter(d),(0,S.y)(n,this.children.length).forEach((e=>{this.children[e].setIndex(e+1)})),(0,S.y)(n+1,this.inserters.length).forEach((e=>{this.inserters[e].setIndex(e+1)}));const u=this._createChild(e,d,l,n,i,t,this,{animate:a,focus:o,collapsed:r,strings:this.blockDef.meta.strings});this.children.splice(n,0,u);const p=this._createInsertionControl(h,{index:n+1,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings,animate:a});this.inserters.splice(n+1,0,p),this.countInput.val(this.blockCounter);const m=0===n,b=n===this.children.length-1;return m||(u.enableMoveUp(),b&&this.children[n-1].enableMoveDown()),b||(u.enableMoveDown(),m&&this.children[n+1].enableMoveUp()),this.blockCountChanged(),u}deleteBlock(e,t){const i=t&&t.animate;this.children[e].markDeleted({animate:i}),this.inserters[e].delete({animate:i}),this.children.splice(e,1),this.inserters.splice(e,1),(0,S.y)(e,this.children.length).forEach((e=>{this.children[e].setIndex(e)})),(0,S.y)(e,this.inserters.length).forEach((e=>{this.inserters[e].setIndex(e)})),0===e&&this.children.length>0&&this.children[0].disableMoveUp(),e===this.children.length&&this.children.length>0&&this.children[this.children.length-1].disableMoveDown(),this.blockCountChanged()}initDragNDrop(){this.sortable=_.Ay.create(this.sequenceContainer.get(0),{handle:'[data-streamfield-action="DRAG"]',animation:200,draggable:"[data-streamfield-child]",onEnd:e=>{const{oldDraggableIndex:t,newDraggableIndex:i}=e;t!==i&&this.moveBlock(t,i)},setData:e=>{e.setData("application/vnd.wagtail.type","sf-block")}})}moveBlock(e,t){if(e===t)return;const i=this.inserters[e],n=this.children[e];t>e?$(i.element).insertAfter(this.children[t].element):$(i.element).insertBefore(this.inserters[t].element),$(n.element).insertAfter(i.element),this.inserters.splice(e,1),this.inserters.splice(t,0,i),this.children.splice(e,1),this.children.splice(t,0,n),t>e?(0,S.y)(e,t+1).forEach((e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)})):(0,S.y)(t,e+1).forEach((e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)}));const s=this.children.length-1;0===e&&(n.enableMoveUp(),this.children[0].disableMoveUp()),e===s&&(n.enableMoveDown(),this.children[s].disableMoveDown()),0===t&&(n.disableMoveUp(),this.children[1].enableMoveUp()),t===s&&(n.disableMoveDown(),this.children[s-1].enableMoveDown())}moveBlockUp(e){this.moveBlock(e,e-1)}moveBlockDown(e){this.moveBlock(e,e+1)}setState(e){this.clear(),e.forEach(((e,t)=>{this.insert(e,t)}))}getState(){return this.children.map((e=>e.getState()))}getDuplicatedState(){return this.children.map((e=>e.getDuplicatedState()))}getValue(){return this.children.map((e=>e.getValue()))}getTextLabel(e){const t=e&&e.maxLength;let i="";for(const e of this.children){const n=e.getTextLabel({maxLength:t});if(n)if(i){const e=i+", "+n;if(t&&e.length>t-1)return i.endsWith("…")||(i+="…"),i;i=e}else i=n}return i}focus(e){this.children.length&&this.children[0].focus(e)}}class R extends U{getState(){return{id:this.id||null,value:this.block.getState()}}getValue(){return this.block.getValue()}setState({value:e,id:t}){this.block.setState(e),this.id=void 0===t?null:t}setValue(e){this.block.setState(e)}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class F extends O{constructor(e,t){super(e,t),this.onRequestInsert=t&&t.onRequestInsert;const i=t&&t.animate,n=(0,o.Z)(t.strings.ADD),s=$(`\n <button type="button" title="${n}" data-streamfield-list-add class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n `);$(e).replaceWith(s),this.element=s.get(0),s.click((()=>{this.onRequestInsert&&this.onRequestInsert(this.index)})),i&&s.hide().slideDown()}enable(){$(this.element).removeAttr("disabled")}disable(){$(this.element).attr("disabled","true")}}class V extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-list-count value="0">\n\n <div data-streamfield-list-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.children=[],this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-list-count]"),this.sequenceContainer=l.find("[data-streamfield-list-container]"),this.container=l,this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach((e=>{e.collapse()})),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}setState(e){this.clear(),e.forEach((({value:e,id:t},i)=>{const n=void 0===t?B():t;this.insert(e,i,{id:t||n})}))}_getChildDataForInsertion(){return[this.blockDef.childBlockDef,this.blockDef.initialChildState,B()]}_createChild(e,t,i,n,s,l,a,o){return new R(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return new F(e,t)}blockCountChanged(){super.blockCountChanged();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}e.length?this.setError({messages:e}):this.setError({})}insert(e,t,i){return this._insert(this.blockDef.childBlockDef,e,i?.id,t,i)}duplicateBlock(e,t){const i=this.children[e],{id:n,value:s}=i.getDuplicatedState(),l=t&&t.animate;this.insert(s,e+1,{animate:l,focus:!0,collapsed:i.collapsed,id:n})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate;l.setValue(t);const o=this.insert(i,e+1,{animate:a,focus:!0,collapsed:l.collapsed}),r=l.getContentPath(),c=o.getContentPath(),d=window.comments?.commentApp;r&&c&&d&&d.utils.selectCommentsForContentPathFactory(r)(d.store.getState()).forEach((e=>{n(e)&&d.updateContentPath(e.localId,c)}))}setError(e){if(!e)return;const t=this.container[0];(0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors&&Object.entries(e.blockErrors).forEach((([e,t])=>{this.children[e].setError(t)}))}getBlockGroups(){return[["",[this.blockDef.childBlockDef]]]}getBlockCount(){return this.children.length}getBlockMax(){return this.blockDef.meta.maxNum||0}}class Z{constructor(e,t,i,n){this.name=e,this.childBlockDef=t,this.initialChildState=i,this.meta=n}render(e,t,i,n){return new V(this,e,t,i,n)}}var N=i(7381),j=i(4549),W=i(2891);const H={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(t){"Escape"===t.key&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}};W.Controller;class G extends U{getState(){return{type:this.type,value:this.block.getState(),id:this.id||null}}getDuplicatedState(){return{...super.getDuplicatedState(),type:this.type}}setState({type:e,value:t,id:i}){this.type=e,this.block.setState(t),this.id=void 0===i?null:i}getValue(){return{type:this.type,value:this.block.getValue(),id:this.id||null}}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class z extends O{constructor(e,t){super(e,t),this.groupedChildBlockDefs=t.groupedChildBlockDefs;const i=$(`\n <div>\n <button type="button" title="${j.Mn}" class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n </div>\n `);$(e).replaceWith(i),this.element=i.get(0),this.addButton=i.find("button");const n=this.blockItems;1!==n.length||1!==n[0].items.length?(this.combobox=document.createElement("div"),this.tooltip=(0,N.Ay)(this.addButton.get(0),{content:this.combobox,trigger:"click",interactive:!0,maxWidth:"none",theme:"dropdown",arrow:!1,placement:"bottom",plugins:[H],onShow:this.renderMenu.bind(this),onHidden:()=>{s().render(null,this.combobox)}})):this.addButton.click((()=>{this.onRequestInsert&&this.onRequestInsert(this.index,n[0].items[0])}))}get blockItems(){return this.groupedChildBlockDefs.map((([e,t])=>({label:e||"",type:e||"",items:t.map((e=>({type:e.name,label:e.meta.label,description:e.meta.description,icon:e.meta.icon,blockDefId:e.meta.blockDefId,isPreviewable:e.meta.isPreviewable})))})))}renderMenu(){const e=this.blockItems;s().render(a().createElement(j.Ay,{label:j.qc,placeholder:j.qc,items:e,getItemLabel:(e,t)=>t.label,getItemDescription:e=>e.label,getSearchFields:e=>[e.label,e.type],noResultsText:j.b5,onSelect:this.onSelectBlock.bind(this)}),this.combobox)}onSelectBlock(e){this.onRequestInsert&&this.onRequestInsert(this.index,{type:e.selectedItem.type}),this.close()}open(){this.addButton.attr("aria-expanded","true"),this.tooltip.show()}close(){this.addButton.attr("aria-expanded","false"),this.tooltip.hide()}}class X extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-stream-count value="0">\n <div data-streamfield-stream-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.container=l,this.element=l.get(0),this.children=[],this.childBlockCounts=new Map,this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-stream-count]"),this.sequenceContainer=l.find("[data-streamfield-stream-container]"),this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach((e=>{e.collapse()})),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}getBlockGroups(){return this.blockDef.groupedChildBlockDefs}getBlockCount(e){return e?(this.childBlockCounts.has(e)||this._updateBlockCount(e),this.childBlockCounts.get(e)||0):this.children.length}getBlockMax(e){return e?this.blockDef.meta.blockCounts[e]?.max_num:this.blockDef.meta.maxNum}_updateBlockCount(e){const t=this.children.filter((t=>t.type===e)).length;this.childBlockCounts.set(e,t)}blockCountChanged(){super.blockCountChanged(),this.childBlockCounts.clear();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}for(const[t,i]of Object.entries(this.blockDef.meta.blockCounts)){const n=i.max_num;if("number"==typeof n&&this.getBlockCount(t)>n){const i=this.blockDef.childBlockDefsByName[t],s=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${n}`),l=`${i.meta.label}: ${s}`;e.push(l)}const s=i.min_num;if("number"==typeof s&&this.getBlockCount(t)<s){const i=this.blockDef.childBlockDefsByName[t],n=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${s}`),l=`${i.meta.label}: ${n}`;e.push(l)}}e.length?this.setError({messages:e}):this.setError({})}_createChild(e,t,i,n,s,l,a,o){return new G(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return t.groupedChildBlockDefs=this.blockDef.groupedChildBlockDefs,new z(e,t)}insert({type:e,value:t,id:i},n,s){const l=this.blockDef.childBlockDefsByName[e];return this._insert(l,t,i,n,s)}_getChildDataForInsertion({type:e}){return[this.blockDef.childBlockDefsByName[e],this.blockDef.initialChildStates[e],B()]}duplicateBlock(e,t){const i=this.children[e],n=i.getDuplicatedState(),s=t&&t.animate;this.insert(n,e+1,{animate:s,focus:!0,collapsed:i.collapsed})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate,o=l.getState(),r=this.insert({type:o.type,id:B(),value:i},e+1,{animate:a,focus:!0,collapsed:l.collapsed});l.setState({type:o.type,id:o.id||null,value:t});const c=l.getContentPath(),d=r.getContentPath(),h=window.comments?.commentApp;c&&d&&h&&h.utils.selectCommentsForContentPathFactory(c)(h.store.getState()).forEach((e=>{n(e)&&h.updateContentPath(e.localId,d)}))}setState(e){super.setState(e)}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.children[t].setError(e.blockErrors[t])}}class J{constructor(e,t,i,n){this.name=e,this.groupedChildBlockDefs=t,this.initialChildStates=i,this.childBlockDefsByName={},this.groupedChildBlockDefs.forEach((([e,t])=>{t.forEach((e=>{this.childBlockDefsByName[e.name]=e}))})),this.meta=n}render(e,t,i,n){return new X(this,e,t,i,n)}}const K=window.wagtailStreamField||{};K.blocks={FieldBlock:d,FieldBlockDefinition:h,StaticBlock:u,StaticBlockDefinition:p,StructBlock:w,StructBlockDefinition:D,ListBlock:V,ListBlockDefinition:Z,StreamBlock:X,StreamBlockDefinition:J},window.telepath.register("wagtail.blocks.FieldBlock",h),window.telepath.register("wagtail.blocks.StaticBlock",p),window.telepath.register("wagtail.blocks.StructBlock",D),window.telepath.register("wagtail.blocks.ListBlock",Z),window.telepath.register("wagtail.blocks.StreamBlock",J),window.wagtailStreamField=K}},i={};function n(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,i,s,l)=>{if(!i){var a=1/0;for(d=0;d<e.length;d++){for(var[i,s,l]=e[d],o=!0,r=0;r<i.length;r++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](i[r])))?i.splice(r--,1):(o=!1,l<a&&(a=l));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[i,s,l]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=591,(()=>{var e={591:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var s,l,[a,o,r]=i,c=0;if(a.some((t=>0!==e[t]))){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(r)var d=r(n)}for(t&&t(i);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},i=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=n.O(void 0,[321],(()=>n(2294)));s=n.O(s)})();
@@ -0,0 +1,61 @@
1
+ import json
2
+ from unittest.mock import patch
3
+
4
+ from django.test import TestCase
5
+ from django.urls import reverse
6
+ from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer
7
+
8
+ from wagtail.admin.api.views import PagesAdminAPIViewSet
9
+ from wagtail.test.utils import WagtailTestUtils
10
+
11
+
12
+ class TestPagesAdminAPIRendererClasses(WagtailTestUtils, TestCase):
13
+ """Test that PagesAdminAPIViewSet renderer behavior works correctly."""
14
+
15
+ def setUp(self):
16
+ self.user = self.login()
17
+
18
+ def test_renderer_classes_with_rest_framework_installed(self):
19
+ """Test that both JSONRenderer and BrowsableAPIRenderer are included when rest_framework is installed."""
20
+ renderer_classes = PagesAdminAPIViewSet.renderer_classes
21
+ # Should have both renderers when rest_framework is installed
22
+ self.assertEqual(renderer_classes, [JSONRenderer, BrowsableAPIRenderer])
23
+
24
+ @patch("wagtail.api.v2.views.apps.is_installed")
25
+ def test_renderer_classes_without_rest_framework(self, mock_is_installed):
26
+ """Test that only JSONRenderer is included when rest_framework is not installed."""
27
+
28
+ # Mock rest_framework as not installed
29
+ def mock_installed(app):
30
+ return app != "rest_framework"
31
+
32
+ mock_is_installed.side_effect = mock_installed
33
+
34
+ renderer_classes = PagesAdminAPIViewSet.renderer_classes
35
+ self.assertEqual(renderer_classes, [JSONRenderer])
36
+
37
+ def test_api_response_returns_json_by_default(self):
38
+ """Test that API returns JSON by default."""
39
+ response = self.client.get(reverse("wagtailadmin_api:pages:listing"))
40
+
41
+ self.assertEqual(response.status_code, 200)
42
+ self.assertEqual(response["Content-Type"], "application/json")
43
+
44
+ # Should be valid JSON
45
+ content = json.loads(response.content.decode("UTF-8"))
46
+ self.assertIn("meta", content)
47
+ self.assertIn("items", content)
48
+
49
+ def test_api_response_returns_json_with_json_accept_header(self):
50
+ """Test that API returns JSON when JSON is explicitly requested."""
51
+ response = self.client.get(
52
+ reverse("wagtailadmin_api:pages:listing"), HTTP_ACCEPT="application/json"
53
+ )
54
+
55
+ self.assertEqual(response.status_code, 200)
56
+ self.assertEqual(response["Content-Type"], "application/json")
57
+
58
+ # Should be valid JSON
59
+ content = json.loads(response.content.decode("UTF-8"))
60
+ self.assertIn("meta", content)
61
+ self.assertIn("items", content)
@@ -997,6 +997,10 @@ class TestFieldPanel(TestCase):
997
997
  # Help text should still be rendered, too
998
998
  self.assertIn("Not required if event is on a single day", result)
999
999
 
1000
+ # No widget should be passed to telepath
1001
+ js_widget = bound_panel.js_opts()["widget"]
1002
+ self.assertIsNone(js_widget)
1003
+
1000
1004
  def test_format_value_for_display_with_choicefield(self):
1001
1005
  result = self.read_only_audience_panel.format_value_for_display(
1002
1006
  self.event.audience
@@ -2410,6 +2414,18 @@ class TestTitleFieldPanel(WagtailTestUtils, TestCase):
2410
2414
  attrs = html.find("input").attrs
2411
2415
  self.assertEqual(attrs["data-w-sync-target-value"], "")
2412
2416
 
2417
+ def test_form_with_readonly_title_field_panel(self):
2418
+ html = self.get_edit_handler_html(
2419
+ ObjectList([TitleFieldPanel("title", read_only=True), FieldPanel("slug")]),
2420
+ instance=EventPage(),
2421
+ )
2422
+
2423
+ panel = html.select_one(".w-panel.title")
2424
+ self.assertIsNotNone(panel)
2425
+ input = panel.select_one("input")
2426
+ self.assertIsNone(input)
2427
+ self.assertIsNone(html.select_one("[data-controller~='w-sync']"))
2428
+
2413
2429
  def test_not_using_apply_actions_if_live(self):
2414
2430
  """
2415
2431
  If the Page (or any model) has `live = True`, do not apply the actions by default.
@@ -0,0 +1,59 @@
1
+ import json
2
+ from unittest.mock import patch
3
+
4
+ from django.test import TestCase
5
+ from django.urls import reverse
6
+ from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer
7
+
8
+ from wagtail.api.v2.views import BaseAPIViewSet
9
+ from wagtail.test.utils import WagtailTestUtils
10
+
11
+
12
+ class TestBaseAPIViewSetRendererClasses(WagtailTestUtils, TestCase):
13
+ def setUp(self):
14
+ self.user = self.login()
15
+
16
+ def test_renderer_classes_with_rest_framework_installed(self):
17
+ """Test that both JSONRenderer and BrowsableAPIRenderer are included when rest_framework is installed."""
18
+ renderer_classes = BaseAPIViewSet.renderer_classes
19
+ # Should have both renderers when rest_framework is installed
20
+ self.assertEqual(renderer_classes, [JSONRenderer, BrowsableAPIRenderer])
21
+
22
+ @patch("wagtail.api.v2.views.apps.is_installed")
23
+ def test_renderer_classes_without_rest_framework(self, mock_is_installed):
24
+ """Test that only JSONRenderer is included when rest_framework is not installed."""
25
+
26
+ # Mock rest_framework as not installed
27
+ def mock_installed(app):
28
+ return app != "rest_framework"
29
+
30
+ mock_is_installed.side_effect = mock_installed
31
+
32
+ renderer_classes = BaseAPIViewSet.renderer_classes
33
+ self.assertEqual(renderer_classes, [JSONRenderer])
34
+
35
+ def test_api_response_returns_json_by_default(self):
36
+ """Test that API returns JSON by default."""
37
+ response = self.client.get(reverse("wagtailapi_v2:pages:listing"))
38
+
39
+ self.assertEqual(response.status_code, 200)
40
+ self.assertEqual(response["Content-Type"], "application/json")
41
+
42
+ # Should be valid JSON
43
+ content = json.loads(response.content.decode("UTF-8"))
44
+ self.assertIn("meta", content)
45
+ self.assertIn("items", content)
46
+
47
+ def test_api_response_returns_json_with_json_accept_header(self):
48
+ """Test that API returns JSON when JSON is explicitly requested."""
49
+ response = self.client.get(
50
+ reverse("wagtailapi_v2:pages:listing"), HTTP_ACCEPT="application/json"
51
+ )
52
+
53
+ self.assertEqual(response.status_code, 200)
54
+ self.assertEqual(response["Content-Type"], "application/json")
55
+
56
+ # Should be valid JSON
57
+ content = json.loads(response.content.decode("UTF-8"))
58
+ self.assertIn("meta", content)
59
+ self.assertIn("items", content)
wagtail/api/v2/views.py CHANGED
@@ -1,10 +1,12 @@
1
1
  from collections import OrderedDict
2
2
 
3
+ from django.apps import apps
3
4
  from django.conf import settings
4
5
  from django.core.exceptions import FieldDoesNotExist
5
6
  from django.http import Http404
6
7
  from django.shortcuts import redirect
7
8
  from django.urls import path, reverse
9
+ from django.utils.functional import classproperty
8
10
  from modelcluster.fields import ParentalKey
9
11
  from rest_framework import status
10
12
  from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer
@@ -35,7 +37,16 @@ from .utils import (
35
37
 
36
38
 
37
39
  class BaseAPIViewSet(GenericViewSet):
38
- renderer_classes = [JSONRenderer, BrowsableAPIRenderer]
40
+ @classproperty
41
+ def renderer_classes(cls):
42
+ renderers = [JSONRenderer]
43
+
44
+ # Only add BrowsableAPIRenderer if rest_framework is installed
45
+ # (which provides the necessary templates and static files)
46
+ if apps.is_installed("rest_framework"):
47
+ renderers.append(BrowsableAPIRenderer)
48
+
49
+ return renderers
39
50
 
40
51
  pagination_class = WagtailPagination
41
52
  base_serializer_class = BaseSerializer
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # Translators:
6
6
  # Basitlik İyidir, 2017
7
- # Cihad GÜNDOĞDU <cihadgundogdu@gmail.com>, 2016
7
+ # Cihad GÜNDOĞDU <cihadgundogdu@gmail.com>, 2016,2025
8
8
  # José Luis <alagunajs@gmail.com>, 2015,2017
9
9
  # Py Data Geek <pydatageek@gmail.com>, 2019
10
10
  # Py Data Geek <pydatageek@gmail.com>, 2019
@@ -35,6 +35,22 @@ msgstr "Başlangıç tarihi"
35
35
  msgid "Date to"
36
36
  msgstr "Bitiş tarihi"
37
37
 
38
+ #, python-format
39
+ msgid ""
40
+ "The name '%(duplicate_clean_name)s' is already assigned to this field and "
41
+ "cannot be changed. Please enter a different label for the conflicting field."
42
+ msgstr ""
43
+ "Bu alan için '%(duplicate_clean_name)s' adı zaten atanmış ve değiştirilemez. "
44
+ "Çatışan alan için lütfen farklı bir etiket girin."
45
+
46
+ #, python-format
47
+ msgid ""
48
+ "Field name '%(duplicate_clean_name)s' conflicts with another field. Please "
49
+ "change the label."
50
+ msgstr ""
51
+ "Alan adı '%(duplicate_clean_name)s' başka bir alanla çakışıyor. Lütfen "
52
+ "etiketi değiştirin."
53
+
38
54
  msgid "Single line text"
39
55
  msgstr "Tek satır metin"
40
56
 
@@ -83,6 +99,10 @@ msgstr "form teslimi"
83
99
  msgid "name"
84
100
  msgstr "isim"
85
101
 
102
+ msgid "Safe name of the form field, the label converted to ascii_snake_case"
103
+ msgstr ""
104
+ "Form alanının güvenli adı, etiket ascii_snake_case biçimine dönüştürülmüştür."
105
+
86
106
  msgid "label"
87
107
  msgstr "ad (label)"
88
108
 
@@ -98,9 +118,22 @@ msgstr "gerekli"
98
118
  msgid "choices"
99
119
  msgstr "şıklar"
100
120
 
121
+ msgid ""
122
+ "Comma or new line separated list of choices. Only applicable in checkboxes, "
123
+ "radio and dropdown."
124
+ msgstr ""
125
+ "Virgül veya yeni satır ile ayrılmış seçenekler listesi. Sadece onay "
126
+ "kutuları, radyo düğmeleri ve açılır listelerde geçerlidir."
127
+
101
128
  msgid "default value"
102
129
  msgstr "varsayılan değer"
103
130
 
131
+ msgid ""
132
+ "Default value. Comma or new line separated values supported for checkboxes."
133
+ msgstr ""
134
+ "Varsayılan değer. Onay kutuları için virgül veya yeni satır ile ayrılmış "
135
+ "değerler desteklenmektedir."
136
+
104
137
  msgid "help text"
105
138
  msgstr "yardım metni"
106
139
 
@@ -140,6 +173,11 @@ msgstr "%(title)s form verisini sil"
140
173
  msgid "Delete form data"
141
174
  msgstr "Form verisini sil"
142
175
 
176
+ msgid "Are you sure you want to delete this form submission?"
177
+ msgid_plural "Are you sure you want to delete these form submissions?"
178
+ msgstr[0] "Bu form iletimini silmek istediğinizden emin misiniz?"
179
+ msgstr[1] "Bu form iletimlerini silmek istediğinizden emin misiniz?"
180
+
143
181
  msgid "Delete"
144
182
  msgstr "Sil"
145
183
 
@@ -93,6 +93,8 @@ class AbstractFormField(Orderable):
93
93
  field_type = models.CharField(
94
94
  verbose_name=_("field type"), max_length=16, choices=FORM_FIELD_CHOICES
95
95
  )
96
+ # field_type must be populated for previews to build the form field.
97
+ field_type.required_on_save = True
96
98
  required = models.BooleanField(verbose_name=_("required"), default=True)
97
99
  choices = models.TextField(
98
100
  verbose_name=_("choices"),
@@ -2272,6 +2272,29 @@ class TestPreview(WagtailTestUtils, TestCase):
2272
2272
  self.assertEqual(response.status_code, 200)
2273
2273
  self.assertTemplateUsed(response, template)
2274
2274
 
2275
+ def test_empty_field_type_does_not_crash_preview(self):
2276
+ preview_url = reverse(
2277
+ "wagtailadmin_pages:preview_on_add",
2278
+ args=("tests", "formpage", self.homepage.pk),
2279
+ )
2280
+
2281
+ response = self.client.post(
2282
+ preview_url,
2283
+ {**self.post_data, "form_fields-0-field_type": ""},
2284
+ )
2285
+ self.assertEqual(response.status_code, 200)
2286
+ self.assertJSONEqual(
2287
+ response.content.decode(),
2288
+ {"is_valid": False, "is_available": False},
2289
+ )
2290
+
2291
+ response = self.client.get(preview_url)
2292
+
2293
+ self.assertContains(
2294
+ response,
2295
+ "Preview cannot display due to validation errors.",
2296
+ )
2297
+
2275
2298
 
2276
2299
  class TestFormPageCreate(WagtailTestUtils, TestCase):
2277
2300
  def setUp(self):
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Wagtail\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
11
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
12
12
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
13
13
  "Last-Translator: Andrei Satsevich, 2023-2024\n"
14
14
  "Language-Team: Belarusian (http://app.transifex.com/torchbox/wagtail/"
@@ -9,7 +9,7 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Wagtail\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
12
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
13
13
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
14
14
  "Last-Translator: Lyuboslav Petrov <petrov.lyuboslav@gmail.com>, 2014\n"
15
15
  "Language-Team: Bulgarian (http://app.transifex.com/torchbox/wagtail/language/"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Wagtail\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
10
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
11
11
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: Bengali (http://app.transifex.com/torchbox/wagtail/language/"
@@ -11,7 +11,7 @@ msgid ""
11
11
  msgstr ""
12
12
  "Project-Id-Version: Wagtail\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
14
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
15
15
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
16
16
  "Last-Translator: David Llop, 2014\n"
17
17
  "Language-Team: Catalan (http://app.transifex.com/torchbox/wagtail/language/"
@@ -12,7 +12,7 @@ msgid ""
12
12
  msgstr ""
13
13
  "Project-Id-Version: Wagtail\n"
14
14
  "Report-Msgid-Bugs-To: \n"
15
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
15
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
16
16
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
17
17
  "Last-Translator: Marek Turnovec <aesculap@gmail.com>, 2016\n"
18
18
  "Language-Team: Czech (http://app.transifex.com/torchbox/wagtail/language/"
@@ -11,7 +11,7 @@ msgid ""
11
11
  msgstr ""
12
12
  "Project-Id-Version: Wagtail\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
14
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
15
15
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
16
16
  "Last-Translator: Philip Lindsay-Crisp, 2024\n"
17
17
  "Language-Team: Welsh (http://app.transifex.com/torchbox/wagtail/language/"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Wagtail\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
10
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
11
11
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: Danish (http://app.transifex.com/torchbox/wagtail/language/"
@@ -31,7 +31,7 @@ msgid ""
31
31
  msgstr ""
32
32
  "Project-Id-Version: Wagtail\n"
33
33
  "Report-Msgid-Bugs-To: \n"
34
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
34
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
35
35
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
36
36
  "Last-Translator: 79353a696ad19dc202b261b3067b7640_bec941e, 2015\n"
37
37
  "Language-Team: German (http://app.transifex.com/torchbox/wagtail/language/"
@@ -9,7 +9,7 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Wagtail\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
12
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
13
13
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
14
14
  "Last-Translator: Fauzaan Gasim, 2024\n"
15
15
  "Language-Team: Divehi (http://app.transifex.com/torchbox/wagtail/language/"
@@ -18,7 +18,7 @@ msgid ""
18
18
  msgstr ""
19
19
  "Project-Id-Version: Wagtail\n"
20
20
  "Report-Msgid-Bugs-To: \n"
21
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
21
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
22
22
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
23
23
  "Last-Translator: Yiannis Inglessis <negtheone@gmail.com>, 2016\n"
24
24
  "Language-Team: Greek (http://app.transifex.com/torchbox/wagtail/language/"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Wagtail\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
10
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
11
11
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: English (India) (http://app.transifex.com/torchbox/wagtail/"
@@ -20,7 +20,7 @@ msgid ""
20
20
  msgstr ""
21
21
  "Project-Id-Version: Wagtail\n"
22
22
  "Report-Msgid-Bugs-To: \n"
23
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
23
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
24
24
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
25
25
  "Last-Translator: José Luis <alagunajs@gmail.com>, 2015-2016,2018\n"
26
26
  "Language-Team: Spanish (http://app.transifex.com/torchbox/wagtail/language/"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Wagtail\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
10
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
11
11
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: Spanish (Latin America) (http://app.transifex.com/torchbox/"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Wagtail\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2025-04-25 23:08+0100\n"
10
+ "POT-Creation-Date: 2025-07-24 16:20+0200\n"
11
11
  "PO-Revision-Date: 2014-02-20 21:04+0000\n"
12
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
13
  "Language-Team: Spanish (Venezuela) (http://app.transifex.com/torchbox/"