@verbb/formie-browser 1.0.1 → 1.0.2

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 (346) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/chunks/address-finder-CQW81kY0.js +37 -0
  3. package/dist/chunks/bpoint-D8OjLmsn.js +26 -0
  4. package/dist/chunks/calculations-BqZsENCq.js +147 -0
  5. package/dist/chunks/captcha-eu-DIa6aUWz.js +34 -0
  6. package/dist/chunks/checkbox-radio-BI-UjgMF.js +136 -0
  7. package/dist/chunks/conditions-BVl6jTYo.js +433 -0
  8. package/dist/chunks/date-picker-69TgvErA.js +4994 -0
  9. package/dist/chunks/eway-1GPxH6DU.js +74 -0
  10. package/dist/chunks/file-upload-BDZZftgL.js +281 -0
  11. package/dist/chunks/friendly-captcha-v1-DA2QPKA3.js +33 -0
  12. package/dist/chunks/friendly-captcha-v2-BorOWiz_.js +38 -0
  13. package/dist/chunks/go-cardless-DwBgERcA.js +24 -0
  14. package/dist/chunks/google-address-BcTBncyS.js +162 -0
  15. package/dist/chunks/hcaptcha-BchdVCqq.js +56 -0
  16. package/dist/chunks/hidden-D8RqSPt7.js +31 -0
  17. package/dist/chunks/index-BEsfee-D.js +1839 -0
  18. package/dist/chunks/index-BP7Unm5Y.js +863 -0
  19. package/dist/chunks/index-C1ZOKiAi.js +4229 -0
  20. package/dist/chunks/loqate-nXuTX7In.js +55 -0
  21. package/dist/chunks/mollie-qdCynQCd.js +24 -0
  22. package/dist/chunks/moneris-BNEA-laO.js +101 -0
  23. package/dist/chunks/opayo-BJtXOkuK.js +122 -0
  24. package/dist/chunks/paddle-D72Pa8kr.js +60 -0
  25. package/dist/chunks/paypal-Cqt2bned.js +100 -0
  26. package/dist/chunks/payway-BjCqsc0H.js +56 -0
  27. package/dist/chunks/phone-country-K9pYAlzM.js +3765 -0
  28. package/dist/chunks/place-kit-Dg6f_UoM.js +42 -0
  29. package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
  30. package/dist/chunks/recaptcha-enterprise--VYAeeqz.js +71 -0
  31. package/dist/chunks/recaptcha-shared-PSIEEEe1.js +15 -0
  32. package/dist/chunks/recaptcha-v2-checkbox-atBNe5ml.js +41 -0
  33. package/dist/chunks/recaptcha-v2-invisible-DnBufNPT.js +59 -0
  34. package/dist/chunks/recaptcha-v3-CF6O8rDj.js +28 -0
  35. package/dist/chunks/repeater-CB7Yojvx.js +124 -0
  36. package/dist/chunks/rich-text-nAV_SQZo.js +304 -0
  37. package/dist/chunks/scripts-BkAAux0i.js +36 -0
  38. package/dist/chunks/sdk-3SicTWby.js +1559 -0
  39. package/dist/chunks/shared-DGqeMvcJ.js +80 -0
  40. package/dist/chunks/signature-BT6CsQ6n.js +550 -0
  41. package/dist/chunks/snaptcha-C7qQo02f.js +8 -0
  42. package/dist/chunks/square-C5AH3trb.js +46 -0
  43. package/dist/chunks/stripe-EJK0RyUv.js +202 -0
  44. package/dist/chunks/styles-C3aqgtek.js +21 -0
  45. package/dist/chunks/summary-DC_ipXCU.js +126 -0
  46. package/dist/chunks/table-BEAI99qo.js +95 -0
  47. package/dist/chunks/text-limit-Blgq5G-G.js +135 -0
  48. package/dist/chunks/turnstile-_uCRwnU-.js +59 -0
  49. package/dist/chunks/utils-BntI3W4S.js +6149 -0
  50. package/dist/index.d.ts +30 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +39 -3205
  53. package/dist/js/compatibility/dom-adapter.d.ts +12 -0
  54. package/dist/js/compatibility/dom-adapter.d.ts.map +1 -0
  55. package/dist/js/compatibility/event-map.d.ts +25 -0
  56. package/dist/js/compatibility/event-map.d.ts.map +1 -0
  57. package/dist/js/compatibility/validator-adapter.d.ts +17 -0
  58. package/dist/js/compatibility/validator-adapter.d.ts.map +1 -0
  59. package/dist/js/contracts/client.d.ts +40 -0
  60. package/dist/js/contracts/client.d.ts.map +1 -0
  61. package/dist/js/contracts/common.d.ts +5 -0
  62. package/dist/js/contracts/common.d.ts.map +1 -0
  63. package/dist/js/contracts/modules.d.ts +47 -0
  64. package/dist/js/contracts/modules.d.ts.map +1 -0
  65. package/dist/js/contracts/schema.d.ts +79 -0
  66. package/dist/js/contracts/schema.d.ts.map +1 -0
  67. package/dist/js/contracts/theme.d.ts +2 -0
  68. package/dist/js/contracts/theme.d.ts.map +1 -0
  69. package/dist/js/core/create-formie-client.d.ts +3 -0
  70. package/dist/js/core/create-formie-client.d.ts.map +1 -0
  71. package/dist/js/core/dom-events.d.ts +2 -0
  72. package/dist/js/core/dom-events.d.ts.map +1 -0
  73. package/dist/js/core/formie.d.ts +27 -0
  74. package/dist/js/core/formie.d.ts.map +1 -0
  75. package/dist/js/core/hydrate-modules.d.ts +22 -0
  76. package/dist/js/core/hydrate-modules.d.ts.map +1 -0
  77. package/dist/js/core/page-client-event.d.ts +9 -0
  78. package/dist/js/core/page-client-event.d.ts.map +1 -0
  79. package/dist/js/core/page-tab-errors.d.ts +2 -0
  80. package/dist/js/core/page-tab-errors.d.ts.map +1 -0
  81. package/dist/js/core/submit-flow.d.ts +21 -0
  82. package/dist/js/core/submit-flow.d.ts.map +1 -0
  83. package/dist/js/core/submit-result-state.d.ts +8 -0
  84. package/dist/js/core/submit-result-state.d.ts.map +1 -0
  85. package/dist/js/core/submit-result-ui.d.ts +10 -0
  86. package/dist/js/core/submit-result-ui.d.ts.map +1 -0
  87. package/dist/js/events/event-bus.d.ts +21 -0
  88. package/dist/js/events/event-bus.d.ts.map +1 -0
  89. package/dist/js/modules/address/address-finder.d.ts +2 -0
  90. package/dist/js/modules/address/address-finder.d.ts.map +1 -0
  91. package/dist/js/modules/address/api.d.ts +8 -0
  92. package/dist/js/modules/address/api.d.ts.map +1 -0
  93. package/dist/js/modules/address/constants.d.ts +15 -0
  94. package/dist/js/modules/address/constants.d.ts.map +1 -0
  95. package/dist/js/modules/address/factories.d.ts +35 -0
  96. package/dist/js/modules/address/factories.d.ts.map +1 -0
  97. package/dist/js/modules/address/google-address.d.ts +2 -0
  98. package/dist/js/modules/address/google-address.d.ts.map +1 -0
  99. package/dist/js/modules/address/host.d.ts +30 -0
  100. package/dist/js/modules/address/host.d.ts.map +1 -0
  101. package/dist/js/modules/address/index.d.ts +3 -0
  102. package/dist/js/modules/address/index.d.ts.map +1 -0
  103. package/dist/js/modules/address/loqate.d.ts +2 -0
  104. package/dist/js/modules/address/loqate.d.ts.map +1 -0
  105. package/dist/js/modules/address/place-kit.d.ts +2 -0
  106. package/dist/js/modules/address/place-kit.d.ts.map +1 -0
  107. package/dist/js/modules/captchas/api.d.ts +9 -0
  108. package/dist/js/modules/captchas/api.d.ts.map +1 -0
  109. package/dist/js/modules/captchas/captcha-eu.d.ts +2 -0
  110. package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -0
  111. package/dist/js/modules/captchas/constants.d.ts +5 -0
  112. package/dist/js/modules/captchas/constants.d.ts.map +1 -0
  113. package/dist/js/modules/captchas/factories.d.ts +63 -0
  114. package/dist/js/modules/captchas/factories.d.ts.map +1 -0
  115. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +2 -0
  116. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -0
  117. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +2 -0
  118. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -0
  119. package/dist/js/modules/captchas/hcaptcha.d.ts +2 -0
  120. package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -0
  121. package/dist/js/modules/captchas/host.d.ts +78 -0
  122. package/dist/js/modules/captchas/host.d.ts.map +1 -0
  123. package/dist/js/modules/captchas/index.d.ts +3 -0
  124. package/dist/js/modules/captchas/index.d.ts.map +1 -0
  125. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +2 -0
  126. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -0
  127. package/dist/js/modules/captchas/recaptcha-shared.d.ts +26 -0
  128. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -0
  129. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +2 -0
  130. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -0
  131. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +2 -0
  132. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -0
  133. package/dist/js/modules/captchas/recaptcha-v3.d.ts +2 -0
  134. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -0
  135. package/dist/js/modules/captchas/snaptcha.d.ts +2 -0
  136. package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -0
  137. package/dist/js/modules/captchas/turnstile.d.ts +2 -0
  138. package/dist/js/modules/captchas/turnstile.d.ts.map +1 -0
  139. package/dist/js/modules/captchas/utils.d.ts +13 -0
  140. package/dist/js/modules/captchas/utils.d.ts.map +1 -0
  141. package/dist/js/modules/fields/calculations.d.ts +3 -0
  142. package/dist/js/modules/fields/calculations.d.ts.map +1 -0
  143. package/dist/js/modules/fields/checkbox-radio.d.ts +3 -0
  144. package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -0
  145. package/dist/js/modules/fields/conditions/config.d.ts +5 -0
  146. package/dist/js/modules/fields/conditions/config.d.ts.map +1 -0
  147. package/dist/js/modules/fields/conditions/effects.d.ts +2 -0
  148. package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -0
  149. package/dist/js/modules/fields/conditions/evaluator.d.ts +6 -0
  150. package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -0
  151. package/dist/js/modules/fields/conditions/references.d.ts +5 -0
  152. package/dist/js/modules/fields/conditions/references.d.ts.map +1 -0
  153. package/dist/js/modules/fields/conditions/transforms.d.ts +3 -0
  154. package/dist/js/modules/fields/conditions/transforms.d.ts.map +1 -0
  155. package/dist/js/modules/fields/conditions/types.d.ts +30 -0
  156. package/dist/js/modules/fields/conditions/types.d.ts.map +1 -0
  157. package/dist/js/modules/fields/conditions/values.d.ts +5 -0
  158. package/dist/js/modules/fields/conditions/values.d.ts.map +1 -0
  159. package/dist/js/modules/fields/conditions.d.ts +3 -0
  160. package/dist/js/modules/fields/conditions.d.ts.map +1 -0
  161. package/dist/js/modules/fields/date-picker.d.ts +3 -0
  162. package/dist/js/modules/fields/date-picker.d.ts.map +1 -0
  163. package/dist/js/modules/fields/file-upload.d.ts +3 -0
  164. package/dist/js/modules/fields/file-upload.d.ts.map +1 -0
  165. package/dist/js/modules/fields/hidden.d.ts +3 -0
  166. package/dist/js/modules/fields/hidden.d.ts.map +1 -0
  167. package/dist/js/modules/fields/index.d.ts +3 -0
  168. package/dist/js/modules/fields/index.d.ts.map +1 -0
  169. package/dist/js/modules/fields/phone-country.d.ts +3 -0
  170. package/dist/js/modules/fields/phone-country.d.ts.map +1 -0
  171. package/dist/js/modules/fields/repeater.d.ts +3 -0
  172. package/dist/js/modules/fields/repeater.d.ts.map +1 -0
  173. package/dist/js/modules/fields/rich-text.d.ts +3 -0
  174. package/dist/js/modules/fields/rich-text.d.ts.map +1 -0
  175. package/dist/js/modules/fields/shared.d.ts +20 -0
  176. package/dist/js/modules/fields/shared.d.ts.map +1 -0
  177. package/dist/js/modules/fields/signature.d.ts +3 -0
  178. package/dist/js/modules/fields/signature.d.ts.map +1 -0
  179. package/dist/js/modules/fields/summary.d.ts +3 -0
  180. package/dist/js/modules/fields/summary.d.ts.map +1 -0
  181. package/dist/js/modules/fields/table.d.ts +3 -0
  182. package/dist/js/modules/fields/table.d.ts.map +1 -0
  183. package/dist/js/modules/fields/text-limit.d.ts +3 -0
  184. package/dist/js/modules/fields/text-limit.d.ts.map +1 -0
  185. package/dist/js/modules/loader.d.ts +11 -0
  186. package/dist/js/modules/loader.d.ts.map +1 -0
  187. package/dist/js/modules/payments/api.d.ts +8 -0
  188. package/dist/js/modules/payments/api.d.ts.map +1 -0
  189. package/dist/js/modules/payments/bpoint.d.ts +2 -0
  190. package/dist/js/modules/payments/bpoint.d.ts.map +1 -0
  191. package/dist/js/modules/payments/constants.d.ts +5 -0
  192. package/dist/js/modules/payments/constants.d.ts.map +1 -0
  193. package/dist/js/modules/payments/eway.d.ts +9 -0
  194. package/dist/js/modules/payments/eway.d.ts.map +1 -0
  195. package/dist/js/modules/payments/factories.d.ts +54 -0
  196. package/dist/js/modules/payments/factories.d.ts.map +1 -0
  197. package/dist/js/modules/payments/go-cardless.d.ts +2 -0
  198. package/dist/js/modules/payments/go-cardless.d.ts.map +1 -0
  199. package/dist/js/modules/payments/host.d.ts +70 -0
  200. package/dist/js/modules/payments/host.d.ts.map +1 -0
  201. package/dist/js/modules/payments/index.d.ts +3 -0
  202. package/dist/js/modules/payments/index.d.ts.map +1 -0
  203. package/dist/js/modules/payments/mollie.d.ts +2 -0
  204. package/dist/js/modules/payments/mollie.d.ts.map +1 -0
  205. package/dist/js/modules/payments/moneris.d.ts +2 -0
  206. package/dist/js/modules/payments/moneris.d.ts.map +1 -0
  207. package/dist/js/modules/payments/opayo.d.ts +25 -0
  208. package/dist/js/modules/payments/opayo.d.ts.map +1 -0
  209. package/dist/js/modules/payments/paddle.d.ts +2 -0
  210. package/dist/js/modules/payments/paddle.d.ts.map +1 -0
  211. package/dist/js/modules/payments/paypal.d.ts +2 -0
  212. package/dist/js/modules/payments/paypal.d.ts.map +1 -0
  213. package/dist/js/modules/payments/payway.d.ts +2 -0
  214. package/dist/js/modules/payments/payway.d.ts.map +1 -0
  215. package/dist/js/modules/payments/square.d.ts +2 -0
  216. package/dist/js/modules/payments/square.d.ts.map +1 -0
  217. package/dist/js/modules/payments/stripe.d.ts +2 -0
  218. package/dist/js/modules/payments/stripe.d.ts.map +1 -0
  219. package/dist/js/modules/payments/utils.d.ts +17 -0
  220. package/dist/js/modules/payments/utils.d.ts.map +1 -0
  221. package/dist/js/modules/registry.d.ts +9 -0
  222. package/dist/js/modules/registry.d.ts.map +1 -0
  223. package/dist/js/modules/styles.d.ts +2 -0
  224. package/dist/js/modules/styles.d.ts.map +1 -0
  225. package/dist/js/submit/pipeline.d.ts +18 -0
  226. package/dist/js/submit/pipeline.d.ts.map +1 -0
  227. package/dist/js/theme/theme-classes.d.ts +10 -0
  228. package/dist/js/theme/theme-classes.d.ts.map +1 -0
  229. package/dist/js/transport/forms-api.d.ts +11 -0
  230. package/dist/js/transport/forms-api.d.ts.map +1 -0
  231. package/dist/js/utils/async.d.ts +8 -0
  232. package/dist/js/utils/async.d.ts.map +1 -0
  233. package/dist/js/utils/debug.d.ts +10 -0
  234. package/dist/js/utils/debug.d.ts.map +1 -0
  235. package/dist/js/utils/event-names.d.ts +13 -0
  236. package/dist/js/utils/event-names.d.ts.map +1 -0
  237. package/dist/js/utils/field-references.d.ts +6 -0
  238. package/dist/js/utils/field-references.d.ts.map +1 -0
  239. package/dist/js/utils/field-references.keys.d.ts +4 -0
  240. package/dist/js/utils/field-references.keys.d.ts.map +1 -0
  241. package/dist/js/utils/field-references.parser.d.ts +3 -0
  242. package/dist/js/utils/field-references.parser.d.ts.map +1 -0
  243. package/dist/js/utils/field-references.registry.d.ts +3 -0
  244. package/dist/js/utils/field-references.registry.d.ts.map +1 -0
  245. package/dist/js/utils/field-references.resolver.d.ts +4 -0
  246. package/dist/js/utils/field-references.resolver.d.ts.map +1 -0
  247. package/dist/js/utils/field-references.types.d.ts +27 -0
  248. package/dist/js/utils/field-references.types.d.ts.map +1 -0
  249. package/dist/js/utils/fields.d.ts +5 -0
  250. package/dist/js/utils/fields.d.ts.map +1 -0
  251. package/dist/js/utils/http.d.ts +9 -0
  252. package/dist/js/utils/http.d.ts.map +1 -0
  253. package/dist/js/utils/i18n.d.ts +7 -0
  254. package/dist/js/utils/i18n.d.ts.map +1 -0
  255. package/dist/js/utils/scripts.d.ts +13 -0
  256. package/dist/js/utils/scripts.d.ts.map +1 -0
  257. package/dist/js/utils/unload-warning.d.ts +10 -0
  258. package/dist/js/utils/unload-warning.d.ts.map +1 -0
  259. package/dist/js/validation/rules/email.d.ts +4 -0
  260. package/dist/js/validation/rules/email.d.ts.map +1 -0
  261. package/dist/js/validation/rules/match.d.ts +4 -0
  262. package/dist/js/validation/rules/match.d.ts.map +1 -0
  263. package/dist/js/validation/rules/number.d.ts +4 -0
  264. package/dist/js/validation/rules/number.d.ts.map +1 -0
  265. package/dist/js/validation/rules/required.d.ts +4 -0
  266. package/dist/js/validation/rules/required.d.ts.map +1 -0
  267. package/dist/js/validation/rules/shared.d.ts +7 -0
  268. package/dist/js/validation/rules/shared.d.ts.map +1 -0
  269. package/dist/js/validation/rules/url.d.ts +4 -0
  270. package/dist/js/validation/rules/url.d.ts.map +1 -0
  271. package/dist/js/validation/rules.d.ts +10 -0
  272. package/dist/js/validation/rules.d.ts.map +1 -0
  273. package/dist/js/validation/types.d.ts +44 -0
  274. package/dist/js/validation/types.d.ts.map +1 -0
  275. package/dist/js/validation/validator.d.ts +53 -0
  276. package/dist/js/validation/validator.d.ts.map +1 -0
  277. package/package.json +3 -2
  278. package/src/js/modules/fields/file-upload.ts +1 -1
  279. package/src/js/modules/fields/repeater.ts +1 -1
  280. package/src/js/modules/fields/rich-text.ts +2 -2
  281. package/src/js/modules/fields/signature.ts +1 -1
  282. package/src/js/modules/fields/summary.ts +1 -1
  283. package/src/js/modules/fields/table.ts +1 -1
  284. package/src/js/modules/fields/text-limit.ts +1 -1
  285. package/src/js/modules/payments/paypal.ts +1 -1
  286. package/src/js/modules/payments/payway.ts +1 -1
  287. package/src/js/modules/payments/stripe.ts +1 -1
  288. package/dist/chunks/address-finder-DfMCiW89.js +0 -47
  289. package/dist/chunks/api-CbqEMQT5.js +0 -181
  290. package/dist/chunks/api-DE7LfK-R.js +0 -960
  291. package/dist/chunks/api-DOfDzYC_.js +0 -538
  292. package/dist/chunks/async-B3DUf1GZ.js +0 -26
  293. package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
  294. package/dist/chunks/calculations-CkYAqO_-.js +0 -197
  295. package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
  296. package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
  297. package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
  298. package/dist/chunks/conditions-4fXKhEJS.js +0 -609
  299. package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
  300. package/dist/chunks/debug-KnZeKYBI.js +0 -39
  301. package/dist/chunks/dist-D09GnXMW.js +0 -2663
  302. package/dist/chunks/event-names-DamGPtXR.js +0 -51
  303. package/dist/chunks/eway-DEAYcwT0.js +0 -86
  304. package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
  305. package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
  306. package/dist/chunks/file-upload-BIj85NFH.js +0 -428
  307. package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
  308. package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
  309. package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
  310. package/dist/chunks/go-cardless-CuND59rR.js +0 -26
  311. package/dist/chunks/google-address--uR8WDSm.js +0 -208
  312. package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
  313. package/dist/chunks/hidden-CYnZYple.js +0 -36
  314. package/dist/chunks/http-18nn97DZ.js +0 -29
  315. package/dist/chunks/i18n-vUh-KGiH.js +0 -55
  316. package/dist/chunks/loqate-BICNJlVK.js +0 -97
  317. package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
  318. package/dist/chunks/moneris-B_IFZFTx.js +0 -159
  319. package/dist/chunks/opayo-U2x_TOII.js +0 -192
  320. package/dist/chunks/paddle-BqXFrc79.js +0 -75
  321. package/dist/chunks/paypal-VowQ3ilP.js +0 -121
  322. package/dist/chunks/payway-VOO-ajyg.js +0 -75
  323. package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
  324. package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
  325. package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
  326. package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
  327. package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
  328. package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
  329. package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
  330. package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
  331. package/dist/chunks/repeater-BPm7Mkyn.js +0 -149
  332. package/dist/chunks/rich-text-CHSly1Hq.js +0 -438
  333. package/dist/chunks/scripts-BGD_iU_6.js +0 -41
  334. package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
  335. package/dist/chunks/shared-DC6_1u8X.js +0 -85
  336. package/dist/chunks/signature-DNMCgrMd.js +0 -763
  337. package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
  338. package/dist/chunks/square-BLqK51rS.js +0 -61
  339. package/dist/chunks/stripe-B6ZcDQdx.js +0 -273
  340. package/dist/chunks/styles-BIh6g7V_.js +0 -22
  341. package/dist/chunks/summary-BTG0uIOt.js +0 -189
  342. package/dist/chunks/table-BTYc0Qm8.js +0 -122
  343. package/dist/chunks/text-limit-CgBMu4sJ.js +0 -177
  344. package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
  345. package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
  346. package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
@@ -1,438 +0,0 @@
1
- import { t as __commonJSMin } from "./chunk-K6L4z4UQ.js";
2
- import { t as ensureModuleStyles } from "./styles-BIh6g7V_.js";
3
- import { r as getModuleFieldContainers, t as dispatchFieldEvent } from "./shared-DC6_1u8X.js";
4
- import tokensCss from "#theme/_tokens.css?inline";
5
- import richTextCss from "#theme/fields/_rich-text.css?inline";
6
- //#endregion
7
- //#region ../../node_modules/pell/dist/pell.min.css?inline
8
- var import_pell_min = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
9
- (function(t, e) {
10
- "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.pell = {});
11
- })(exports, function(t) {
12
- "use strict";
13
- var e = Object.assign || function(t) {
14
- for (var e = 1; e < arguments.length; e++) {
15
- var n = arguments[e];
16
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
17
- }
18
- return t;
19
- }, c = "defaultParagraphSeparator", l = "formatBlock", a = function(t, e, n) {
20
- return t.addEventListener(e, n);
21
- }, s = function(t, e) {
22
- return t.appendChild(e);
23
- }, d = function(t) {
24
- return document.createElement(t);
25
- }, n = function(t) {
26
- return document.queryCommandState(t);
27
- }, f = function(t) {
28
- var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null;
29
- return document.execCommand(t, !1, e);
30
- }, p = {
31
- bold: {
32
- icon: "<b>B</b>",
33
- title: "Bold",
34
- state: function() {
35
- return n("bold");
36
- },
37
- result: function() {
38
- return f("bold");
39
- }
40
- },
41
- italic: {
42
- icon: "<i>I</i>",
43
- title: "Italic",
44
- state: function() {
45
- return n("italic");
46
- },
47
- result: function() {
48
- return f("italic");
49
- }
50
- },
51
- underline: {
52
- icon: "<u>U</u>",
53
- title: "Underline",
54
- state: function() {
55
- return n("underline");
56
- },
57
- result: function() {
58
- return f("underline");
59
- }
60
- },
61
- strikethrough: {
62
- icon: "<strike>S</strike>",
63
- title: "Strike-through",
64
- state: function() {
65
- return n("strikeThrough");
66
- },
67
- result: function() {
68
- return f("strikeThrough");
69
- }
70
- },
71
- heading1: {
72
- icon: "<b>H<sub>1</sub></b>",
73
- title: "Heading 1",
74
- result: function() {
75
- return f(l, "<h1>");
76
- }
77
- },
78
- heading2: {
79
- icon: "<b>H<sub>2</sub></b>",
80
- title: "Heading 2",
81
- result: function() {
82
- return f(l, "<h2>");
83
- }
84
- },
85
- paragraph: {
86
- icon: "&#182;",
87
- title: "Paragraph",
88
- result: function() {
89
- return f(l, "<p>");
90
- }
91
- },
92
- quote: {
93
- icon: "&#8220; &#8221;",
94
- title: "Quote",
95
- result: function() {
96
- return f(l, "<blockquote>");
97
- }
98
- },
99
- olist: {
100
- icon: "&#35;",
101
- title: "Ordered List",
102
- result: function() {
103
- return f("insertOrderedList");
104
- }
105
- },
106
- ulist: {
107
- icon: "&#8226;",
108
- title: "Unordered List",
109
- result: function() {
110
- return f("insertUnorderedList");
111
- }
112
- },
113
- code: {
114
- icon: "&lt;/&gt;",
115
- title: "Code",
116
- result: function() {
117
- return f(l, "<pre>");
118
- }
119
- },
120
- line: {
121
- icon: "&#8213;",
122
- title: "Horizontal Line",
123
- result: function() {
124
- return f("insertHorizontalRule");
125
- }
126
- },
127
- link: {
128
- icon: "&#128279;",
129
- title: "Link",
130
- result: function() {
131
- var t = window.prompt("Enter the link URL");
132
- t && f("createLink", t);
133
- }
134
- },
135
- image: {
136
- icon: "&#128247;",
137
- title: "Image",
138
- result: function() {
139
- var t = window.prompt("Enter the image URL");
140
- t && f("insertImage", t);
141
- }
142
- }
143
- }, m = {
144
- actionbar: "pell-actionbar",
145
- button: "pell-button",
146
- content: "pell-content",
147
- selected: "pell-button-selected"
148
- }, r = function(n) {
149
- var t = n.actions ? n.actions.map(function(t) {
150
- return "string" == typeof t ? p[t] : p[t.name] ? e({}, p[t.name], t) : t;
151
- }) : Object.keys(p).map(function(t) {
152
- return p[t];
153
- }), r = e({}, m, n.classes), i = n[c] || "div", o = d("div");
154
- o.className = r.actionbar, s(n.element, o);
155
- var u = n.element.content = d("div");
156
- return u.contentEditable = !0, u.className = r.content, u.oninput = function(t) {
157
- var e = t.target.firstChild;
158
- e && 3 === e.nodeType ? f(l, "<" + i + ">") : "<br>" === u.innerHTML && (u.innerHTML = ""), n.onChange(u.innerHTML);
159
- }, u.onkeydown = function(t) {
160
- var e;
161
- "Enter" === t.key && "blockquote" === (e = l, document.queryCommandValue(e)) && setTimeout(function() {
162
- return f(l, "<" + i + ">");
163
- }, 0);
164
- }, s(n.element, u), t.forEach(function(t) {
165
- var e = d("button");
166
- if (e.className = r.button, e.innerHTML = t.icon, e.title = t.title, e.setAttribute("type", "button"), e.onclick = function() {
167
- return t.result() && u.focus();
168
- }, t.state) {
169
- var n = function() {
170
- return e.classList[t.state() ? "add" : "remove"](r.selected);
171
- };
172
- a(u, "keyup", n), a(u, "mouseup", n), a(e, "click", n);
173
- }
174
- s(o, e);
175
- }), n.styleWithCSS && f("styleWithCSS"), f(c, i), n.element;
176
- }, i = {
177
- exec: f,
178
- init: r
179
- };
180
- t.exec = f, t.init = r, t.default = i, Object.defineProperty(t, "__esModule", { value: !0 });
181
- });
182
- })))();
183
- var pell_min_default = ".pell{border:1px solid #0a0a0a1a}.pell,.pell-content{box-sizing:border-box}.pell-content{outline:0;height:300px;padding:10px;overflow-y:auto}.pell-actionbar{background-color:#fff;border-bottom:1px solid #0a0a0a1a}.pell-button{cursor:pointer;vertical-align:bottom;background-color:#0000;border:none;outline:0;width:30px;height:30px}.pell-button-selected{background-color:#f0f0f0}";
184
- //#endregion
185
- //#region src/icons/rich-text/aligncenter.svg?raw
186
- var aligncenter_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M7 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M7 18h10\" />\n</svg>\n";
187
- //#endregion
188
- //#region src/icons/rich-text/alignleft.svg?raw
189
- var alignleft_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M4 18h10\" />\n</svg>\n";
190
- //#endregion
191
- //#region src/icons/rich-text/alignright.svg?raw
192
- var alignright_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 6h16\" />\n <path d=\"M10 10h10\" />\n <path d=\"M4 14h16\" />\n <path d=\"M10 18h10\" />\n</svg>\n";
193
- //#endregion
194
- //#region src/icons/rich-text/bold.svg?raw
195
- var bold_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M7 6h6a3 3 0 0 1 0 6H7z\" />\n <path d=\"M7 12h7a3 3 0 0 1 0 6H7z\" />\n</svg>\n";
196
- //#endregion
197
- //#region src/icons/rich-text/clear.svg?raw
198
- var clear_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m4 20 8-8\" />\n <path d=\"m12 12 7-7\" />\n <path d=\"m5 15-2-2a2 2 0 0 1 0-2.83L9.17 4a2 2 0 0 1 2.83 0l4 4\" />\n <path d=\"M16 20H8\" />\n</svg>\n";
199
- //#endregion
200
- //#region src/icons/rich-text/code.svg?raw
201
- var code_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m9 18-6-6 6-6\" />\n <path d=\"m15 6 6 6-6 6\" />\n</svg>\n";
202
- //#endregion
203
- //#region src/icons/rich-text/heading1.svg?raw
204
- var heading1_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">H1</text>\n</svg>\n";
205
- //#endregion
206
- //#region src/icons/rich-text/heading2.svg?raw
207
- var heading2_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">H2</text>\n</svg>\n";
208
- //#endregion
209
- //#region src/icons/rich-text/image.svg?raw
210
- var image_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m8 13 3-3 5 5\" />\n <path d=\"m13 12 2-2 4 4\" />\n <circle cx=\"8.5\" cy=\"9.5\" r=\"1\" />\n</svg>\n";
211
- //#endregion
212
- //#region src/icons/rich-text/italic.svg?raw
213
- var italic_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M13 6h6\" />\n <path d=\"M5 18h6\" />\n <path d=\"M14 6 10 18\" />\n</svg>\n";
214
- //#endregion
215
- //#region src/icons/rich-text/line.svg?raw
216
- var line_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 12h16\" />\n</svg>\n";
217
- //#endregion
218
- //#region src/icons/rich-text/link.svg?raw
219
- var link_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 13a5 5 0 0 0 7.07 0l1.41-1.41a5 5 0 0 0-7.07-7.07L10 5\" />\n <path d=\"M14 11a5 5 0 0 0-7.07 0L5.5 12.43a5 5 0 0 0 7.07 7.07L14 19\" />\n</svg>\n";
220
- //#endregion
221
- //#region src/icons/rich-text/olist.svg?raw
222
- var olist_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 6h10\" />\n <path d=\"M10 12h10\" />\n <path d=\"M10 18h10\" />\n <path d=\"M4 6h.01\" />\n <path d=\"M4 12h.01\" />\n <path d=\"M4 18h.01\" />\n</svg>\n";
223
- //#endregion
224
- //#region src/icons/rich-text/paragraph.svg?raw
225
- var paragraph_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\" font-family=\"system-ui, sans-serif\" font-size=\"12\" font-weight=\"700\" fill=\"currentColor\">P</text>\n</svg>\n";
226
- //#endregion
227
- //#region src/icons/rich-text/quote.svg?raw
228
- var quote_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M8 10H6a2 2 0 0 0-2 2v2h4v-4z\" />\n <path d=\"M18 10h-2a2 2 0 0 0-2 2v2h4v-4z\" />\n</svg>\n";
229
- //#endregion
230
- //#region src/icons/rich-text/strikethrough.svg?raw
231
- var strikethrough_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M6 12h12\" />\n <path d=\"M9 7a3 3 0 0 1 6 0c0 4-6 2-6 6a3 3 0 0 0 6 0\" />\n</svg>\n";
232
- //#endregion
233
- //#region src/icons/rich-text/ulist.svg?raw
234
- var ulist_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 6h10\" />\n <path d=\"M10 12h10\" />\n <path d=\"M10 18h10\" />\n <circle cx=\"4\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"4\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"4\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n</svg>\n";
235
- //#endregion
236
- //#region src/icons/rich-text/underline.svg?raw
237
- var underline_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M8 6v5a4 4 0 0 0 8 0V6\" />\n <path d=\"M6 20h12\" />\n</svg>\n";
238
- //#endregion
239
- //#region src/js/modules/fields/rich-text.ts
240
- var CONTAINER_SELECTOR = "[data-formie-rich-text]";
241
- var FIELD_SELECTOR = "[data-formie-field], [data-formie-field-handle]";
242
- var INPUT_SELECTOR = "textarea[data-formie-multi-line-text-input]";
243
- var MODULE_ID = "rich-text";
244
- ensureModuleStyles(MODULE_ID, [
245
- tokensCss,
246
- pell_min_default,
247
- richTextCss
248
- ]);
249
- var RICH_TEXT_ICONS = {
250
- bold: bold_default,
251
- italic: italic_default,
252
- underline: underline_default,
253
- strikethrough: strikethrough_default,
254
- heading1: heading1_default,
255
- heading2: heading2_default,
256
- paragraph: paragraph_default,
257
- quote: quote_default,
258
- olist: olist_default,
259
- ulist: ulist_default,
260
- code: code_default,
261
- line: line_default,
262
- link: link_default,
263
- image: image_default,
264
- alignleft: alignleft_default,
265
- aligncenter: aligncenter_default,
266
- alignright: alignright_default,
267
- clear: clear_default
268
- };
269
- function hasRichTextField(target) {
270
- if (target.matches(FIELD_SELECTOR)) return !!target.querySelector(CONTAINER_SELECTOR) && !!target.querySelector(INPUT_SELECTOR);
271
- return Array.from(target.querySelectorAll(FIELD_SELECTOR)).some((field) => {
272
- return !!field.querySelector(CONTAINER_SELECTOR) && !!field.querySelector(INPUT_SELECTOR);
273
- });
274
- }
275
- function getActionDefinitions() {
276
- return [
277
- {
278
- name: "bold",
279
- icon: RICH_TEXT_ICONS.bold
280
- },
281
- {
282
- name: "italic",
283
- icon: RICH_TEXT_ICONS.italic
284
- },
285
- {
286
- name: "underline",
287
- icon: RICH_TEXT_ICONS.underline
288
- },
289
- {
290
- name: "strikethrough",
291
- icon: RICH_TEXT_ICONS.strikethrough
292
- },
293
- {
294
- name: "heading1",
295
- icon: RICH_TEXT_ICONS.heading1
296
- },
297
- {
298
- name: "heading2",
299
- icon: RICH_TEXT_ICONS.heading2
300
- },
301
- {
302
- name: "paragraph",
303
- icon: RICH_TEXT_ICONS.paragraph
304
- },
305
- {
306
- name: "quote",
307
- icon: RICH_TEXT_ICONS.quote
308
- },
309
- {
310
- name: "olist",
311
- icon: RICH_TEXT_ICONS.olist
312
- },
313
- {
314
- name: "ulist",
315
- icon: RICH_TEXT_ICONS.ulist
316
- },
317
- {
318
- name: "code",
319
- icon: RICH_TEXT_ICONS.code
320
- },
321
- {
322
- name: "line",
323
- icon: RICH_TEXT_ICONS.line
324
- },
325
- {
326
- name: "link",
327
- icon: RICH_TEXT_ICONS.link
328
- },
329
- {
330
- name: "image",
331
- icon: RICH_TEXT_ICONS.image
332
- },
333
- {
334
- name: "alignleft",
335
- icon: RICH_TEXT_ICONS.alignleft,
336
- title: "Align Left",
337
- result: () => (0, import_pell_min.exec)("justifyLeft", "")
338
- },
339
- {
340
- name: "aligncenter",
341
- icon: RICH_TEXT_ICONS.aligncenter,
342
- title: "Align Center",
343
- result: () => (0, import_pell_min.exec)("justifyCenter", "")
344
- },
345
- {
346
- name: "alignright",
347
- icon: RICH_TEXT_ICONS.alignright,
348
- title: "Align Right",
349
- result: () => (0, import_pell_min.exec)("justifyRight", "")
350
- },
351
- {
352
- name: "clear",
353
- icon: RICH_TEXT_ICONS.clear,
354
- title: "Clear",
355
- result: () => {
356
- const selection = window.getSelection()?.toString() || "";
357
- if (selection) {
358
- const linesToDelete = selection.split("\n").join("<br>");
359
- (0, import_pell_min.exec)("formatBlock", "<p>");
360
- document.execCommand("insertHTML", false, linesToDelete);
361
- return;
362
- }
363
- (0, import_pell_min.exec)("formatBlock", "<p>");
364
- }
365
- }
366
- ];
367
- }
368
- function getActions(buttons) {
369
- const selectedButtons = buttons?.length ? buttons : ["bold", "italic"];
370
- const definitions = getActionDefinitions();
371
- return selectedButtons.map((button) => {
372
- return definitions.find((definition) => {
373
- return definition.name === button;
374
- });
375
- }).filter((definition) => {
376
- return !!definition;
377
- });
378
- }
379
- function initRichTextField(container, input, options) {
380
- const pellOptions = {
381
- element: container,
382
- defaultParagraphSeparator: "p",
383
- styleWithCSS: true,
384
- actions: getActions(options.buttons),
385
- onChange: (html) => {
386
- input.value = input.placeholder && html === "<p><br></p>" ? "" : html;
387
- input.dispatchEvent(new Event("input", { bubbles: true }));
388
- dispatchFieldEvent(input, MODULE_ID, "populate", {
389
- richText: input,
390
- value: input.value
391
- });
392
- },
393
- classes: {
394
- actionbar: "formie-rich-text-toolbar",
395
- button: "formie-rich-text-button",
396
- content: "formie-input formie-rich-text-content",
397
- selected: "formie-rich-text-selected"
398
- }
399
- };
400
- dispatchFieldEvent(input, MODULE_ID, "before-init", {
401
- richText: input,
402
- options: pellOptions
403
- });
404
- const editor = (0, import_pell_min.init)(pellOptions);
405
- input.richText = editor;
406
- editor.content.innerHTML = input.value || "";
407
- if (input.placeholder) editor.content.setAttribute("data-placeholder", input.placeholder);
408
- dispatchFieldEvent(input, MODULE_ID, "after-init", { richText: editor });
409
- return () => {
410
- container.innerHTML = "";
411
- delete input.richText;
412
- };
413
- }
414
- var richTextModule = {
415
- id: MODULE_ID,
416
- kind: "field",
417
- match: (ctx) => {
418
- return ctx.target instanceof HTMLElement && hasRichTextField(ctx.target);
419
- },
420
- setup: async (ctx) => {
421
- const options = ctx.options || {};
422
- const cleanups = getModuleFieldContainers(ctx).map((field) => {
423
- const container = field.querySelector(CONTAINER_SELECTOR);
424
- const input = field.querySelector(INPUT_SELECTOR);
425
- if (!(container instanceof HTMLElement) || !(input instanceof HTMLTextAreaElement)) return () => {};
426
- return initRichTextField(container, input, options);
427
- });
428
- await ctx.emit("formie:module:rich-text:init", { count: cleanups.length });
429
- return { destroy: () => {
430
- cleanups.forEach((cleanup) => {
431
- cleanup();
432
- });
433
- ctx.emit("formie:module:rich-text:destroy", {});
434
- } };
435
- }
436
- };
437
- //#endregion
438
- export { richTextModule };
@@ -1,41 +0,0 @@
1
- import { r as waitFor } from "./async-B3DUf1GZ.js";
2
- //#region src/js/utils/scripts.ts
3
- var scriptLoadCache = /* @__PURE__ */ new Map();
4
- async function ensureGlobal(globalName, timeoutMs = 5e3) {
5
- return waitFor(() => {
6
- const value = window[globalName];
7
- if (typeof value === "undefined" || value === null) return null;
8
- return value;
9
- }, {
10
- timeoutMs,
11
- intervalMs: 30
12
- });
13
- }
14
- async function loadExternalScript({ id, src, async = true, defer = true }) {
15
- const existing = document.getElementById(id);
16
- if (existing) return existing;
17
- if (!scriptLoadCache.has(id)) scriptLoadCache.set(id, new Promise((resolve, reject) => {
18
- const script = document.createElement("script");
19
- script.id = id;
20
- script.src = src;
21
- script.async = async;
22
- script.defer = defer;
23
- script.onload = () => {
24
- resolve(script);
25
- };
26
- script.onerror = () => {
27
- scriptLoadCache.delete(id);
28
- reject(/* @__PURE__ */ new Error(`Failed to load external script: ${src}`));
29
- };
30
- document.body.appendChild(script);
31
- }));
32
- return scriptLoadCache.get(id);
33
- }
34
- async function loadScriptAndEnsureGlobal(globalName, options) {
35
- const existing = window[globalName];
36
- if (typeof existing !== "undefined" && existing !== null) return existing;
37
- await loadExternalScript(options);
38
- return ensureGlobal(globalName, options.timeoutMs);
39
- }
40
- //#endregion
41
- export { loadExternalScript as n, loadScriptAndEnsureGlobal as r, ensureGlobal as t };