@beabee/beabee-common 0.0.2 → 0.20.0-alpha.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 (441) hide show
  1. package/README.md +126 -0
  2. package/dist/cjs/data/callout-component-base-type.cjs +35 -0
  3. package/dist/cjs/data/callout-component-input-selectable-types.cjs +32 -0
  4. package/dist/cjs/data/callout-component-input-text-types.cjs +32 -0
  5. package/dist/cjs/data/callout-component-input-types.cjs +46 -0
  6. package/dist/cjs/data/callout-component-nestable-types.cjs +33 -0
  7. package/dist/cjs/data/callout-component-type.cjs +50 -0
  8. package/dist/cjs/data/callout-component-types.cjs +35 -0
  9. package/dist/cjs/data/contribution-period.cjs +32 -0
  10. package/dist/cjs/data/contribution-type.cjs +34 -0
  11. package/dist/cjs/data/index.cjs +48 -0
  12. package/dist/cjs/data/item-status.cjs +34 -0
  13. package/dist/cjs/data/membership-status.cjs +34 -0
  14. package/dist/cjs/data/newsletter-status.cjs +35 -0
  15. package/dist/cjs/data/payment-method.cjs +34 -0
  16. package/dist/cjs/data/payment-status.cjs +34 -0
  17. package/dist/cjs/error/InvalidRule.cjs +35 -0
  18. package/dist/cjs/error/index.cjs +22 -0
  19. package/dist/cjs/index.cjs +30 -0
  20. package/dist/cjs/search/api-keys.cjs +35 -0
  21. package/dist/cjs/search/callouts.cjs +131 -0
  22. package/dist/cjs/search/contacts.cjs +105 -0
  23. package/dist/cjs/search/index.cjs +32 -0
  24. package/dist/cjs/search/notices.cjs +61 -0
  25. package/dist/cjs/search/operators.cjs +89 -0
  26. package/dist/cjs/search/payments.cjs +51 -0
  27. package/dist/cjs/types/api-key-filter-name.cjs +16 -0
  28. package/dist/cjs/types/array-filter-args.cjs +16 -0
  29. package/dist/cjs/types/base-filter-args.cjs +16 -0
  30. package/dist/cjs/types/base-validated-rule.cjs +16 -0
  31. package/dist/cjs/types/callout-component-base-input-schema.cjs +16 -0
  32. package/dist/cjs/types/callout-component-base-input-selectable-schema.cjs +16 -0
  33. package/dist/cjs/types/callout-component-base-input-text-schema.cjs +16 -0
  34. package/dist/cjs/types/callout-component-base-map.cjs +16 -0
  35. package/dist/cjs/types/callout-component-base-nestable-schema.cjs +16 -0
  36. package/dist/cjs/types/callout-component-base-rules.cjs +16 -0
  37. package/dist/cjs/types/callout-component-base-schema.cjs +16 -0
  38. package/dist/cjs/types/callout-component-content-schema.cjs +16 -0
  39. package/dist/cjs/types/callout-component-input-address-rules.cjs +16 -0
  40. package/dist/cjs/types/callout-component-input-address-schema.cjs +16 -0
  41. package/dist/cjs/types/callout-component-input-checkbox-rules.cjs +16 -0
  42. package/dist/cjs/types/callout-component-input-checkbox-schema.cjs +16 -0
  43. package/dist/cjs/types/callout-component-input-currency-rules.cjs +16 -0
  44. package/dist/cjs/types/callout-component-input-currency-schema.cjs +16 -0
  45. package/dist/cjs/types/callout-component-input-date-time-rules.cjs +16 -0
  46. package/dist/cjs/types/callout-component-input-date-time-schema.cjs +16 -0
  47. package/dist/cjs/types/callout-component-input-email-rules.cjs +16 -0
  48. package/dist/cjs/types/callout-component-input-email-schema.cjs +16 -0
  49. package/dist/cjs/types/callout-component-input-file-rules.cjs +16 -0
  50. package/dist/cjs/types/callout-component-input-file-schema.cjs +16 -0
  51. package/dist/cjs/types/callout-component-input-number-rules.cjs +16 -0
  52. package/dist/cjs/types/callout-component-input-number-schema.cjs +16 -0
  53. package/dist/cjs/types/callout-component-input-phone-number-rules.cjs +16 -0
  54. package/dist/cjs/types/callout-component-input-phone-number-schema.cjs +16 -0
  55. package/dist/cjs/types/callout-component-input-schema.cjs +16 -0
  56. package/dist/cjs/types/callout-component-input-select-rules.cjs +16 -0
  57. package/dist/cjs/types/callout-component-input-select-schema.cjs +16 -0
  58. package/dist/cjs/types/callout-component-input-selectable-radio-rules.cjs +16 -0
  59. package/dist/cjs/types/callout-component-input-selectable-radio-schema.cjs +16 -0
  60. package/dist/cjs/types/callout-component-input-selectable-schema.cjs +16 -0
  61. package/dist/cjs/types/callout-component-input-selectable-selectboxes-rules.cjs +16 -0
  62. package/dist/cjs/types/callout-component-input-selectable-selectboxes-schema.cjs +16 -0
  63. package/dist/cjs/types/callout-component-input-signature-rules.cjs +16 -0
  64. package/dist/cjs/types/callout-component-input-signature-schema.cjs +16 -0
  65. package/dist/cjs/types/callout-component-input-text-area-schema.cjs +16 -0
  66. package/dist/cjs/types/callout-component-input-text-field-schema.cjs +16 -0
  67. package/dist/cjs/types/callout-component-input-text-rules.cjs +16 -0
  68. package/dist/cjs/types/callout-component-input-text-schema.cjs +16 -0
  69. package/dist/cjs/types/callout-component-input-time-rules.cjs +16 -0
  70. package/dist/cjs/types/callout-component-input-time-schema.cjs +16 -0
  71. package/dist/cjs/types/callout-component-input-url-rules.cjs +16 -0
  72. package/dist/cjs/types/callout-component-input-url-schema.cjs +16 -0
  73. package/dist/cjs/types/callout-component-map.cjs +16 -0
  74. package/dist/cjs/types/callout-component-nestable-panel-schema.cjs +16 -0
  75. package/dist/cjs/types/callout-component-nestable-schema.cjs +16 -0
  76. package/dist/cjs/types/callout-component-nestable-tabs-schema.cjs +16 -0
  77. package/dist/cjs/types/callout-component-nestable-well-schema.cjs +16 -0
  78. package/dist/cjs/types/callout-component-schema.cjs +16 -0
  79. package/dist/cjs/types/callout-filter-name.cjs +16 -0
  80. package/dist/cjs/types/callout-form-schema.cjs +16 -0
  81. package/dist/cjs/types/callout-navigation-schema.cjs +16 -0
  82. package/dist/cjs/types/callout-response-answer-address.cjs +16 -0
  83. package/dist/cjs/types/callout-response-answer-file-upload.cjs +16 -0
  84. package/dist/cjs/types/callout-response-answer.cjs +16 -0
  85. package/dist/cjs/types/callout-response-answers-nestable.cjs +16 -0
  86. package/dist/cjs/types/callout-response-answers-slide.cjs +16 -0
  87. package/dist/cjs/types/callout-response-comment-filter-name.cjs +16 -0
  88. package/dist/cjs/types/callout-response-filter-name.cjs +16 -0
  89. package/dist/cjs/types/callout-slide-schema.cjs +16 -0
  90. package/dist/cjs/types/callout-tag-filter-name.cjs +16 -0
  91. package/dist/cjs/types/date-unit.cjs +16 -0
  92. package/dist/cjs/types/duration.cjs +16 -0
  93. package/dist/cjs/types/enum-filter-args.cjs +16 -0
  94. package/dist/cjs/types/feeable.cjs +16 -0
  95. package/dist/cjs/types/filter-args.cjs +16 -0
  96. package/dist/cjs/types/filter-type.cjs +16 -0
  97. package/dist/cjs/types/filters.cjs +16 -0
  98. package/dist/cjs/types/index.cjs +208 -0
  99. package/dist/cjs/types/notice-filter-name.cjs +16 -0
  100. package/dist/cjs/types/operators-by-type.cjs +16 -0
  101. package/dist/cjs/types/other-filter-args.cjs +16 -0
  102. package/dist/cjs/types/paginated-query.cjs +16 -0
  103. package/dist/cjs/types/paginated.cjs +16 -0
  104. package/dist/cjs/types/payment-filter-name.cjs +16 -0
  105. package/dist/cjs/types/role-type.cjs +16 -0
  106. package/dist/cjs/types/rule-group.cjs +16 -0
  107. package/dist/cjs/types/rule-operator.cjs +16 -0
  108. package/dist/cjs/types/rule-opperator-params.cjs +16 -0
  109. package/dist/cjs/types/rule-value.cjs +16 -0
  110. package/dist/cjs/types/rule.cjs +16 -0
  111. package/dist/cjs/types/stripe-fee-country.cjs +16 -0
  112. package/dist/cjs/types/text-case.cjs +16 -0
  113. package/dist/cjs/types/unit-matches.cjs +16 -0
  114. package/dist/cjs/types/validated-boolean-rule.cjs +16 -0
  115. package/dist/cjs/types/validated-number-rule.cjs +16 -0
  116. package/dist/cjs/types/validated-rule-group.cjs +16 -0
  117. package/dist/cjs/types/validated-rule-value.cjs +16 -0
  118. package/dist/cjs/types/validated-rule.cjs +16 -0
  119. package/dist/cjs/types/validated-string-rule.cjs +16 -0
  120. package/dist/cjs/types/validator-callout-component.cjs +16 -0
  121. package/dist/cjs/types/validator.cjs +16 -0
  122. package/dist/cjs/utils/callouts.cjs +175 -0
  123. package/dist/cjs/utils/conversions.cjs +53 -0
  124. package/dist/cjs/utils/date.cjs +104 -0
  125. package/dist/cjs/utils/index.cjs +34 -0
  126. package/dist/cjs/utils/payments.cjs +53 -0
  127. package/dist/cjs/utils/rules.cjs +109 -0
  128. package/dist/cjs/utils/slug.cjs +834 -0
  129. package/dist/cjs/utils/validations.cjs +177 -0
  130. package/dist/cjs/validators/callout-component-content.validator.cjs +30 -0
  131. package/dist/cjs/validators/callout-component-input-address.validator.cjs +36 -0
  132. package/dist/cjs/validators/callout-component-input-checkbox.validator.cjs +34 -0
  133. package/dist/cjs/validators/callout-component-input-currency.validator.cjs +35 -0
  134. package/dist/cjs/validators/callout-component-input-date-time.validator.cjs +38 -0
  135. package/dist/cjs/validators/callout-component-input-email.validator.cjs +39 -0
  136. package/dist/cjs/validators/callout-component-input-file.validator.cjs +35 -0
  137. package/dist/cjs/validators/callout-component-input-number.validator.cjs +38 -0
  138. package/dist/cjs/validators/callout-component-input-phone-number.validator.cjs +35 -0
  139. package/dist/cjs/validators/callout-component-input-select.validator.cjs +40 -0
  140. package/dist/cjs/validators/callout-component-input-selectable.validator.cjs +43 -0
  141. package/dist/cjs/validators/callout-component-input-signature.validator.cjs +32 -0
  142. package/dist/cjs/validators/callout-component-input-text.validator.cjs +53 -0
  143. package/dist/cjs/validators/callout-component-input-time.validator.cjs +36 -0
  144. package/dist/cjs/validators/callout-component-input-url.validator.cjs +39 -0
  145. package/dist/cjs/validators/callout-component.validator.cjs +104 -0
  146. package/dist/cjs/validators/index.cjs +52 -0
  147. package/dist/esm/data/callout-component-base-type.js +11 -0
  148. package/dist/esm/data/callout-component-input-selectable-types.js +8 -0
  149. package/dist/esm/data/callout-component-input-text-types.js +8 -0
  150. package/dist/esm/data/callout-component-input-types.js +22 -0
  151. package/dist/esm/data/callout-component-nestable-types.js +9 -0
  152. package/dist/esm/data/callout-component-type.js +26 -0
  153. package/dist/esm/data/callout-component-types.js +11 -0
  154. package/dist/esm/data/contribution-period.js +8 -0
  155. package/dist/esm/data/contribution-type.js +10 -0
  156. package/dist/esm/data/index.js +14 -0
  157. package/dist/esm/data/item-status.js +10 -0
  158. package/dist/esm/data/membership-status.js +10 -0
  159. package/dist/esm/data/newsletter-status.js +11 -0
  160. package/dist/esm/data/payment-method.js +10 -0
  161. package/dist/esm/data/payment-status.js +10 -0
  162. package/dist/esm/error/InvalidRule.js +11 -0
  163. package/dist/esm/error/index.js +1 -0
  164. package/dist/esm/index.js +5 -3
  165. package/dist/esm/search/api-keys.js +11 -0
  166. package/dist/esm/search/callouts.js +104 -0
  167. package/dist/esm/search/contacts.js +84 -0
  168. package/dist/esm/search/index.js +6 -0
  169. package/dist/esm/search/notices.js +37 -0
  170. package/dist/esm/search/operators.js +62 -0
  171. package/dist/esm/search/payments.js +27 -0
  172. package/dist/esm/types/api-key-filter-name.js +0 -0
  173. package/dist/esm/types/array-filter-args.js +0 -0
  174. package/dist/esm/types/base-filter-args.js +0 -0
  175. package/dist/esm/types/base-validated-rule.js +0 -0
  176. package/dist/esm/types/callout-component-base-input-schema.js +0 -0
  177. package/dist/esm/types/callout-component-base-input-selectable-schema.js +0 -0
  178. package/dist/esm/types/callout-component-base-input-text-schema.js +0 -0
  179. package/dist/esm/types/callout-component-base-map.js +0 -0
  180. package/dist/esm/types/callout-component-base-nestable-schema.js +0 -0
  181. package/dist/esm/types/callout-component-base-rules.js +0 -0
  182. package/dist/esm/types/callout-component-base-schema.js +0 -0
  183. package/dist/esm/types/callout-component-content-schema.js +0 -0
  184. package/dist/esm/types/callout-component-input-address-rules.js +0 -0
  185. package/dist/esm/types/callout-component-input-address-schema.js +0 -0
  186. package/dist/esm/types/callout-component-input-checkbox-rules.js +0 -0
  187. package/dist/esm/types/callout-component-input-checkbox-schema.js +0 -0
  188. package/dist/esm/types/callout-component-input-currency-rules.js +0 -0
  189. package/dist/esm/types/callout-component-input-currency-schema.js +0 -0
  190. package/dist/esm/types/callout-component-input-date-time-rules.js +0 -0
  191. package/dist/esm/types/callout-component-input-date-time-schema.js +0 -0
  192. package/dist/esm/types/callout-component-input-email-rules.js +0 -0
  193. package/dist/esm/types/callout-component-input-email-schema.js +0 -0
  194. package/dist/esm/types/callout-component-input-file-rules.js +0 -0
  195. package/dist/esm/types/callout-component-input-file-schema.js +0 -0
  196. package/dist/esm/types/callout-component-input-number-rules.js +0 -0
  197. package/dist/esm/types/callout-component-input-number-schema.js +0 -0
  198. package/dist/esm/types/callout-component-input-phone-number-rules.js +0 -0
  199. package/dist/esm/types/callout-component-input-phone-number-schema.js +0 -0
  200. package/dist/esm/types/callout-component-input-schema.js +0 -0
  201. package/dist/esm/types/callout-component-input-select-rules.js +0 -0
  202. package/dist/esm/types/callout-component-input-select-schema.js +0 -0
  203. package/dist/esm/types/callout-component-input-selectable-radio-rules.js +0 -0
  204. package/dist/esm/types/callout-component-input-selectable-radio-schema.js +0 -0
  205. package/dist/esm/types/callout-component-input-selectable-schema.js +0 -0
  206. package/dist/esm/types/callout-component-input-selectable-selectboxes-rules.js +0 -0
  207. package/dist/esm/types/callout-component-input-selectable-selectboxes-schema.js +0 -0
  208. package/dist/esm/types/callout-component-input-signature-rules.js +0 -0
  209. package/dist/esm/types/callout-component-input-signature-schema.js +0 -0
  210. package/dist/esm/types/callout-component-input-text-area-schema.js +0 -0
  211. package/dist/esm/types/callout-component-input-text-field-schema.js +0 -0
  212. package/dist/esm/types/callout-component-input-text-rules.js +0 -0
  213. package/dist/esm/types/callout-component-input-text-schema.js +0 -0
  214. package/dist/esm/types/callout-component-input-time-rules.js +0 -0
  215. package/dist/esm/types/callout-component-input-time-schema.js +0 -0
  216. package/dist/esm/types/callout-component-input-url-rules.js +0 -0
  217. package/dist/esm/types/callout-component-input-url-schema.js +0 -0
  218. package/dist/esm/types/callout-component-map.js +0 -0
  219. package/dist/esm/types/callout-component-nestable-panel-schema.js +0 -0
  220. package/dist/esm/types/callout-component-nestable-schema.js +0 -0
  221. package/dist/esm/types/callout-component-nestable-tabs-schema.js +0 -0
  222. package/dist/esm/types/callout-component-nestable-well-schema.js +0 -0
  223. package/dist/esm/types/callout-component-schema.js +0 -0
  224. package/dist/esm/types/callout-filter-name.js +0 -0
  225. package/dist/esm/types/callout-form-schema.js +0 -0
  226. package/dist/esm/types/callout-navigation-schema.js +0 -0
  227. package/dist/esm/types/callout-response-answer-address.js +0 -0
  228. package/dist/esm/types/callout-response-answer-file-upload.js +0 -0
  229. package/dist/esm/types/callout-response-answer.js +0 -0
  230. package/dist/esm/types/callout-response-answers-nestable.js +0 -0
  231. package/dist/esm/types/callout-response-answers-slide.js +0 -0
  232. package/dist/esm/types/callout-response-comment-filter-name.js +0 -0
  233. package/dist/esm/types/callout-response-filter-name.js +0 -0
  234. package/dist/esm/types/callout-slide-schema.js +0 -0
  235. package/dist/esm/types/callout-tag-filter-name.js +0 -0
  236. package/dist/esm/types/date-unit.js +0 -0
  237. package/dist/esm/types/duration.js +0 -0
  238. package/dist/esm/types/enum-filter-args.js +0 -0
  239. package/dist/esm/types/feeable.js +0 -0
  240. package/dist/esm/types/filter-args.js +0 -0
  241. package/dist/esm/types/filter-type.js +0 -0
  242. package/dist/esm/types/filters.js +0 -0
  243. package/dist/esm/types/index.js +94 -0
  244. package/dist/esm/types/notice-filter-name.js +0 -0
  245. package/dist/esm/types/operators-by-type.js +0 -0
  246. package/dist/esm/types/other-filter-args.js +0 -0
  247. package/dist/esm/types/paginated-query.js +0 -0
  248. package/dist/esm/types/paginated.js +0 -0
  249. package/dist/esm/types/payment-filter-name.js +0 -0
  250. package/dist/esm/types/role-type.js +0 -0
  251. package/dist/esm/types/rule-group.js +0 -0
  252. package/dist/esm/types/rule-operator.js +0 -0
  253. package/dist/esm/types/rule-opperator-params.js +0 -0
  254. package/dist/esm/types/rule-value.js +0 -0
  255. package/dist/esm/types/rule.js +0 -0
  256. package/dist/esm/types/stripe-fee-country.js +0 -0
  257. package/dist/esm/types/text-case.js +0 -0
  258. package/dist/esm/types/unit-matches.js +0 -0
  259. package/dist/esm/types/validated-boolean-rule.js +0 -0
  260. package/dist/esm/types/validated-number-rule.js +0 -0
  261. package/dist/esm/types/validated-rule-group.js +0 -0
  262. package/dist/esm/types/validated-rule-value.js +0 -0
  263. package/dist/esm/types/validated-rule.js +0 -0
  264. package/dist/esm/types/validated-string-rule.js +0 -0
  265. package/dist/esm/types/validator-callout-component.js +0 -0
  266. package/dist/esm/types/validator.js +0 -0
  267. package/dist/esm/utils/callouts.js +149 -0
  268. package/dist/esm/utils/conversions.js +28 -0
  269. package/dist/esm/utils/date.js +84 -0
  270. package/dist/esm/utils/index.js +7 -0
  271. package/dist/esm/utils/payments.js +29 -0
  272. package/dist/esm/utils/rules.js +80 -0
  273. package/dist/esm/utils/slug.js +810 -0
  274. package/dist/esm/utils/validations.js +138 -0
  275. package/dist/esm/validators/callout-component-content.validator.js +6 -0
  276. package/dist/esm/validators/callout-component-input-address.validator.js +11 -0
  277. package/dist/esm/validators/callout-component-input-checkbox.validator.js +9 -0
  278. package/dist/esm/validators/callout-component-input-currency.validator.js +10 -0
  279. package/dist/esm/validators/callout-component-input-date-time.validator.js +13 -0
  280. package/dist/esm/validators/callout-component-input-email.validator.js +14 -0
  281. package/dist/esm/validators/callout-component-input-file.validator.js +10 -0
  282. package/dist/esm/validators/callout-component-input-number.validator.js +13 -0
  283. package/dist/esm/validators/callout-component-input-phone-number.validator.js +10 -0
  284. package/dist/esm/validators/callout-component-input-select.validator.js +15 -0
  285. package/dist/esm/validators/callout-component-input-selectable.validator.js +18 -0
  286. package/dist/esm/validators/callout-component-input-signature.validator.js +8 -0
  287. package/dist/esm/validators/callout-component-input-text.validator.js +28 -0
  288. package/dist/esm/validators/callout-component-input-time.validator.js +11 -0
  289. package/dist/esm/validators/callout-component-input-url.validator.js +14 -0
  290. package/dist/esm/validators/callout-component.validator.js +79 -0
  291. package/dist/esm/validators/index.js +16 -0
  292. package/dist/types/data/callout-component-base-type.d.ts +8 -0
  293. package/dist/types/data/callout-component-input-selectable-types.d.ts +3 -0
  294. package/dist/types/data/callout-component-input-text-types.d.ts +3 -0
  295. package/dist/types/data/callout-component-input-types.d.ts +3 -0
  296. package/dist/types/data/callout-component-nestable-types.d.ts +3 -0
  297. package/dist/types/data/callout-component-type.d.ts +23 -0
  298. package/dist/types/data/callout-component-types.d.ts +3 -0
  299. package/dist/types/data/contribution-period.d.ts +4 -0
  300. package/dist/types/data/contribution-type.d.ts +6 -0
  301. package/dist/types/data/index.d.ts +14 -0
  302. package/dist/types/data/item-status.d.ts +6 -0
  303. package/dist/types/data/membership-status.d.ts +6 -0
  304. package/dist/types/data/newsletter-status.d.ts +7 -0
  305. package/dist/types/data/payment-method.d.ts +6 -0
  306. package/dist/types/data/payment-status.d.ts +6 -0
  307. package/dist/types/error/InvalidRule.d.ts +6 -0
  308. package/dist/types/error/index.d.ts +1 -0
  309. package/dist/types/index.d.cts +1 -0
  310. package/dist/types/index.d.ts +6 -0
  311. package/dist/types/search/api-keys.d.ts +8 -0
  312. package/dist/types/search/callouts.d.ts +93 -0
  313. package/dist/types/search/contacts.d.ts +66 -0
  314. package/dist/types/search/index.d.ts +6 -0
  315. package/dist/types/search/notices.d.ts +29 -0
  316. package/dist/types/search/operators.d.ts +128 -0
  317. package/dist/types/search/payments.d.ts +19 -0
  318. package/dist/types/types/api-key-filter-name.d.ts +2 -0
  319. package/dist/types/types/array-filter-args.d.ts +5 -0
  320. package/dist/types/types/base-filter-args.d.ts +5 -0
  321. package/dist/types/types/base-validated-rule.d.ts +9 -0
  322. package/dist/types/types/callout-component-base-input-schema.d.ts +9 -0
  323. package/dist/types/types/callout-component-base-input-selectable-schema.d.ts +11 -0
  324. package/dist/types/types/callout-component-base-input-text-schema.d.ts +12 -0
  325. package/dist/types/types/callout-component-base-map.d.ts +16 -0
  326. package/dist/types/types/callout-component-base-nestable-schema.d.ts +7 -0
  327. package/dist/types/types/callout-component-base-rules.d.ts +6 -0
  328. package/dist/types/types/callout-component-base-schema.d.ts +22 -0
  329. package/dist/types/types/callout-component-content-schema.d.ts +5 -0
  330. package/dist/types/types/callout-component-input-address-rules.d.ts +2 -0
  331. package/dist/types/types/callout-component-input-address-schema.d.ts +7 -0
  332. package/dist/types/types/callout-component-input-checkbox-rules.d.ts +2 -0
  333. package/dist/types/types/callout-component-input-checkbox-schema.d.ts +11 -0
  334. package/dist/types/types/callout-component-input-currency-rules.d.ts +2 -0
  335. package/dist/types/types/callout-component-input-currency-schema.d.ts +17 -0
  336. package/dist/types/types/callout-component-input-date-time-rules.d.ts +2 -0
  337. package/dist/types/types/callout-component-input-date-time-schema.d.ts +39 -0
  338. package/dist/types/types/callout-component-input-email-rules.d.ts +9 -0
  339. package/dist/types/types/callout-component-input-email-schema.d.ts +11 -0
  340. package/dist/types/types/callout-component-input-file-rules.d.ts +2 -0
  341. package/dist/types/types/callout-component-input-file-schema.d.ts +19 -0
  342. package/dist/types/types/callout-component-input-number-rules.d.ts +9 -0
  343. package/dist/types/types/callout-component-input-number-schema.d.ts +17 -0
  344. package/dist/types/types/callout-component-input-phone-number-rules.d.ts +2 -0
  345. package/dist/types/types/callout-component-input-phone-number-schema.d.ts +7 -0
  346. package/dist/types/types/callout-component-input-schema.d.ts +3 -0
  347. package/dist/types/types/callout-component-input-select-rules.d.ts +2 -0
  348. package/dist/types/types/callout-component-input-select-schema.d.ts +15 -0
  349. package/dist/types/types/callout-component-input-selectable-radio-rules.d.ts +2 -0
  350. package/dist/types/types/callout-component-input-selectable-radio-schema.d.ts +6 -0
  351. package/dist/types/types/callout-component-input-selectable-schema.d.ts +3 -0
  352. package/dist/types/types/callout-component-input-selectable-selectboxes-rules.d.ts +2 -0
  353. package/dist/types/types/callout-component-input-selectable-selectboxes-schema.d.ts +6 -0
  354. package/dist/types/types/callout-component-input-signature-rules.d.ts +2 -0
  355. package/dist/types/types/callout-component-input-signature-schema.d.ts +7 -0
  356. package/dist/types/types/callout-component-input-text-area-schema.d.ts +5 -0
  357. package/dist/types/types/callout-component-input-text-field-schema.d.ts +5 -0
  358. package/dist/types/types/callout-component-input-text-rules.d.ts +13 -0
  359. package/dist/types/types/callout-component-input-text-schema.d.ts +3 -0
  360. package/dist/types/types/callout-component-input-time-rules.d.ts +2 -0
  361. package/dist/types/types/callout-component-input-time-schema.d.ts +9 -0
  362. package/dist/types/types/callout-component-input-url-rules.d.ts +9 -0
  363. package/dist/types/types/callout-component-input-url-schema.d.ts +11 -0
  364. package/dist/types/types/callout-component-map.d.ts +31 -0
  365. package/dist/types/types/callout-component-nestable-panel-schema.d.ts +5 -0
  366. package/dist/types/types/callout-component-nestable-schema.d.ts +2 -0
  367. package/dist/types/types/callout-component-nestable-tabs-schema.d.ts +5 -0
  368. package/dist/types/types/callout-component-nestable-well-schema.d.ts +5 -0
  369. package/dist/types/types/callout-component-schema.d.ts +3 -0
  370. package/dist/types/types/callout-filter-name.d.ts +2 -0
  371. package/dist/types/types/callout-form-schema.d.ts +4 -0
  372. package/dist/types/types/callout-navigation-schema.d.ts +6 -0
  373. package/dist/types/types/callout-response-answer-address.d.ts +9 -0
  374. package/dist/types/types/callout-response-answer-file-upload.d.ts +3 -0
  375. package/dist/types/types/callout-response-answer.d.ts +2 -0
  376. package/dist/types/types/callout-response-answers-nestable.d.ts +5 -0
  377. package/dist/types/types/callout-response-answers-slide.d.ts +5 -0
  378. package/dist/types/types/callout-response-comment-filter-name.d.ts +2 -0
  379. package/dist/types/types/callout-response-filter-name.d.ts +2 -0
  380. package/dist/types/types/callout-slide-schema.d.ts +7 -0
  381. package/dist/types/types/callout-tag-filter-name.d.ts +2 -0
  382. package/dist/types/types/date-unit.d.ts +2 -0
  383. package/dist/types/types/duration.d.ts +1 -0
  384. package/dist/types/types/enum-filter-args.d.ts +5 -0
  385. package/dist/types/types/feeable.d.ts +6 -0
  386. package/dist/types/types/filter-args.d.ts +2 -0
  387. package/dist/types/types/filter-type.d.ts +1 -0
  388. package/dist/types/types/filters.d.ts +2 -0
  389. package/dist/types/types/index.d.ts +94 -0
  390. package/dist/types/types/notice-filter-name.d.ts +2 -0
  391. package/dist/types/types/operators-by-type.d.ts +2 -0
  392. package/dist/types/types/other-filter-args.d.ts +4 -0
  393. package/dist/types/types/paginated-query.d.ts +8 -0
  394. package/dist/types/types/paginated.d.ts +6 -0
  395. package/dist/types/types/payment-filter-name.d.ts +2 -0
  396. package/dist/types/types/role-type.d.ts +2 -0
  397. package/dist/types/types/rule-group.d.ts +5 -0
  398. package/dist/types/types/rule-operator.d.ts +2 -0
  399. package/dist/types/types/rule-opperator-params.d.ts +3 -0
  400. package/dist/types/types/rule-value.d.ts +1 -0
  401. package/dist/types/types/rule.d.ts +6 -0
  402. package/dist/types/types/stripe-fee-country.d.ts +1 -0
  403. package/dist/types/types/text-case.d.ts +1 -0
  404. package/dist/types/types/unit-matches.d.ts +2 -0
  405. package/dist/types/types/validated-boolean-rule.d.ts +2 -0
  406. package/dist/types/types/validated-number-rule.d.ts +2 -0
  407. package/dist/types/types/validated-rule-group.d.ts +5 -0
  408. package/dist/types/types/validated-rule-value.d.ts +2 -0
  409. package/dist/types/types/validated-rule.d.ts +2 -0
  410. package/dist/types/types/validated-string-rule.d.ts +2 -0
  411. package/dist/types/types/validator-callout-component.d.ts +2 -0
  412. package/dist/types/types/validator.d.ts +1 -0
  413. package/dist/types/utils/callouts.d.ts +30 -0
  414. package/dist/types/utils/conversions.d.ts +14 -0
  415. package/dist/types/utils/date.d.ts +8 -0
  416. package/dist/types/utils/index.d.ts +7 -0
  417. package/dist/types/utils/payments.d.ts +2 -0
  418. package/dist/types/utils/rules.d.ts +4 -0
  419. package/dist/types/utils/slug.d.ts +16 -0
  420. package/dist/types/utils/validations.d.ts +90 -0
  421. package/dist/types/validators/callout-component-content.validator.d.ts +2 -0
  422. package/dist/types/validators/callout-component-input-address.validator.d.ts +2 -0
  423. package/dist/types/validators/callout-component-input-checkbox.validator.d.ts +2 -0
  424. package/dist/types/validators/callout-component-input-currency.validator.d.ts +2 -0
  425. package/dist/types/validators/callout-component-input-date-time.validator.d.ts +2 -0
  426. package/dist/types/validators/callout-component-input-email.validator.d.ts +2 -0
  427. package/dist/types/validators/callout-component-input-file.validator.d.ts +2 -0
  428. package/dist/types/validators/callout-component-input-number.validator.d.ts +2 -0
  429. package/dist/types/validators/callout-component-input-phone-number.validator.d.ts +2 -0
  430. package/dist/types/validators/callout-component-input-select.validator.d.ts +2 -0
  431. package/dist/types/validators/callout-component-input-selectable.validator.d.ts +2 -0
  432. package/dist/types/validators/callout-component-input-signature.validator.d.ts +2 -0
  433. package/dist/types/validators/callout-component-input-text.validator.d.ts +2 -0
  434. package/dist/types/validators/callout-component-input-time.validator.d.ts +2 -0
  435. package/dist/types/validators/callout-component-input-url.validator.d.ts +2 -0
  436. package/dist/types/validators/callout-component.validator.d.ts +3 -0
  437. package/dist/types/validators/index.d.ts +16 -0
  438. package/package.json +39 -9
  439. package/dist/cjs/index.d.ts +0 -1
  440. package/dist/cjs/index.js +0 -7
  441. package/dist/esm/index.d.ts +0 -1
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var validations_exports = {};
20
+ __export(validations_exports, {
21
+ isAmountOfMoney: () => isAmountOfMoney,
22
+ isAngle: () => isAngle,
23
+ isEmail: () => isEmail,
24
+ isLngLat: () => isLngLat,
25
+ isMapBounds: () => isMapBounds,
26
+ isNumber: () => isNumber,
27
+ isNumberInRange: () => isNumberInRange,
28
+ isPassword: () => isPassword,
29
+ isPeriod: () => isPeriod,
30
+ isPhoneNumber: () => isPhoneNumber,
31
+ isSlug: () => isSlug,
32
+ isTextInRange: () => isTextInRange,
33
+ isTextInWordRange: () => isTextInWordRange,
34
+ isType: () => isType,
35
+ isURL: () => isURL,
36
+ isValidPayFee: () => isValidPayFee
37
+ });
38
+ module.exports = __toCommonJS(validations_exports);
39
+ var import_slug = require("./slug.cjs");
40
+ var import_data = require("../data/index.cjs");
41
+ const isAngle = (value, span = 180) => {
42
+ return typeof value === "number" && value >= span * -1 && value <= span;
43
+ };
44
+ const isEmail = (value) => {
45
+ if (typeof value !== "string" || value.length === 0) {
46
+ return false;
47
+ }
48
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
49
+ return emailRegex.test(value);
50
+ };
51
+ const isLngLat = (value) => {
52
+ if (!Array.isArray(value) || value.length !== 2) {
53
+ return false;
54
+ }
55
+ const [longitude, latitude] = value;
56
+ if (!isAngle(longitude, 180) || !isAngle(latitude, 90)) {
57
+ return false;
58
+ }
59
+ return true;
60
+ };
61
+ const isMapBounds = (value) => {
62
+ return Array.isArray(value) && value.length === 2 && value.every(isLngLat);
63
+ };
64
+ const isPassword = (value) => {
65
+ return typeof value === "string" && value.length >= 8 && /[a-z]/.test(value) && /[A-Z]/.test(value) && /[0-9]/.test(value);
66
+ };
67
+ const isPeriod = (value) => {
68
+ return value === import_data.ContributionPeriod.Monthly || value === import_data.ContributionPeriod.Annually;
69
+ };
70
+ const isSlug = (value) => {
71
+ return typeof value === "string" && value === (0, import_slug.slug)(value);
72
+ };
73
+ function isType(types, value) {
74
+ return types.includes(typeof value);
75
+ }
76
+ const isURL = (value) => {
77
+ if (typeof value !== "string" || !value.length) {
78
+ return false;
79
+ }
80
+ const urlRegex = /^(https?:\/\/)([\da-z\-]+\.)+[a-z]{2,6}(:[0-9]{1,5})?([\/\w \.-]*)*\/?(\?[a-zA-Z0-9=&]*)?$/;
81
+ return urlRegex.test(value);
82
+ };
83
+ const isNumber = (value) => {
84
+ return typeof value === "number" && !isNaN(value);
85
+ };
86
+ const isAmountOfMoney = (value) => {
87
+ if (!isNumber(value) || value < 0) {
88
+ return false;
89
+ }
90
+ const decimalPart = value.toString().split(".")[1];
91
+ if (decimalPart && decimalPart.length > 2) {
92
+ return false;
93
+ }
94
+ return true;
95
+ };
96
+ const isPhoneNumber = (value) => {
97
+ if (typeof value !== "string" || !value.length) {
98
+ return false;
99
+ }
100
+ if (value.length > 15 || value.length < 5) {
101
+ return false;
102
+ }
103
+ const phoneRegex = /^(\+?[0-9])\d*$/;
104
+ return phoneRegex.test(value);
105
+ };
106
+ const isValidPayFee = (value, amount, period) => {
107
+ if (typeof value !== "boolean" || typeof amount !== "number" || !isPeriod(period)) {
108
+ return false;
109
+ }
110
+ if (value && period === import_data.ContributionPeriod.Annually) {
111
+ return false;
112
+ }
113
+ if (!value && period === import_data.ContributionPeriod.Monthly && amount === 1) {
114
+ return false;
115
+ }
116
+ return true;
117
+ };
118
+ const isNumberInRange = (value, min, max) => {
119
+ if (!isNumber(value)) {
120
+ return false;
121
+ }
122
+ if (typeof min === "number") {
123
+ if (value < min) {
124
+ return false;
125
+ }
126
+ }
127
+ if (typeof max === "number") {
128
+ if (value > max) {
129
+ return false;
130
+ }
131
+ }
132
+ return true;
133
+ };
134
+ const isTextInRange = (value, minLength = 0, maxLength) => {
135
+ if (typeof value !== "string") {
136
+ return false;
137
+ }
138
+ if (typeof minLength === "number" && value.length < minLength) {
139
+ return false;
140
+ }
141
+ if (typeof maxLength === "number" && value.length > maxLength) {
142
+ return false;
143
+ }
144
+ return true;
145
+ };
146
+ const isTextInWordRange = (value, minWordLength = 0, maxWordLength) => {
147
+ if (typeof value !== "string") {
148
+ return false;
149
+ }
150
+ const words = value.length > 0 ? value.split(" ") : [];
151
+ if (typeof minWordLength === "number" && words.length < minWordLength) {
152
+ return false;
153
+ }
154
+ if (typeof maxWordLength === "number" && words.length > maxWordLength) {
155
+ return false;
156
+ }
157
+ return true;
158
+ };
159
+ // Annotate the CommonJS export names for ESM import in node:
160
+ 0 && (module.exports = {
161
+ isAmountOfMoney,
162
+ isAngle,
163
+ isEmail,
164
+ isLngLat,
165
+ isMapBounds,
166
+ isNumber,
167
+ isNumberInRange,
168
+ isPassword,
169
+ isPeriod,
170
+ isPhoneNumber,
171
+ isSlug,
172
+ isTextInRange,
173
+ isTextInWordRange,
174
+ isType,
175
+ isURL,
176
+ isValidPayFee
177
+ });
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_content_validator_exports = {};
20
+ __export(callout_component_content_validator_exports, {
21
+ calloutComponentContentValidator: () => calloutComponentContentValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_content_validator_exports);
24
+ const calloutComponentContentValidator = (_, answer) => {
25
+ return !answer;
26
+ };
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ calloutComponentContentValidator
30
+ });
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_address_validator_exports = {};
20
+ __export(callout_component_input_address_validator_exports, {
21
+ calloutComponentInputAddressValidator: () => calloutComponentInputAddressValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_address_validator_exports);
24
+ const calloutComponentInputAddressValidator = (schema, answer) => {
25
+ var _a;
26
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
27
+ return true;
28
+ }
29
+ throw new Error(
30
+ `[calloutComponentInputAddressValidator] Not implemented yet`
31
+ );
32
+ };
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ calloutComponentInputAddressValidator
36
+ });
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_checkbox_validator_exports = {};
20
+ __export(callout_component_input_checkbox_validator_exports, {
21
+ calloutComponentInputCheckboxValidator: () => calloutComponentInputCheckboxValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_checkbox_validator_exports);
24
+ const calloutComponentInputCheckboxValidator = (schema, answer) => {
25
+ var _a;
26
+ if (((_a = schema.validate) == null ? void 0 : _a.required) && !answer) {
27
+ return true;
28
+ }
29
+ return typeof answer === "boolean";
30
+ };
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ calloutComponentInputCheckboxValidator
34
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_currency_validator_exports = {};
20
+ __export(callout_component_input_currency_validator_exports, {
21
+ calloutComponentInputCurrencyValidator: () => calloutComponentInputCurrencyValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_currency_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const calloutComponentInputCurrencyValidator = (schema, answer) => {
26
+ var _a;
27
+ if (((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
28
+ return true;
29
+ }
30
+ return (0, import_utils.isAmountOfMoney)(answer);
31
+ };
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ calloutComponentInputCurrencyValidator
35
+ });
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_date_time_validator_exports = {};
20
+ __export(callout_component_input_date_time_validator_exports, {
21
+ calloutComponentInputDateTimeValidator: () => calloutComponentInputDateTimeValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_date_time_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const calloutComponentInputDateTimeValidator = (schema, answer) => {
26
+ var _a;
27
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && !answer) {
28
+ return true;
29
+ }
30
+ if (typeof answer !== "string") {
31
+ return false;
32
+ }
33
+ return (0, import_utils.isDateBetween)(answer, schema.widget.minDate, schema.widget.maxDate);
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ calloutComponentInputDateTimeValidator
38
+ });
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_email_validator_exports = {};
20
+ __export(callout_component_input_email_validator_exports, {
21
+ calloutComponentInputEmailValidator: () => calloutComponentInputEmailValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_email_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ var import_data = require("../data/index.cjs");
26
+ const calloutComponentInputEmailValidator = (schema, answer) => {
27
+ var _a;
28
+ if (!(0, import_utils.isCalloutComponentOfType)(schema, import_data.CalloutComponentType.INPUT_EMAIL)) {
29
+ throw new Error("Schema is not a email component");
30
+ }
31
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
32
+ return true;
33
+ }
34
+ return (0, import_utils.isEmail)(answer);
35
+ };
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ calloutComponentInputEmailValidator
39
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_file_validator_exports = {};
20
+ __export(callout_component_input_file_validator_exports, {
21
+ calloutComponentInputFileValidator: () => calloutComponentInputFileValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_file_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const calloutComponentInputFileValidator = (schema, answer) => {
26
+ var _a;
27
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
28
+ return true;
29
+ }
30
+ return (0, import_utils.isURL)(answer);
31
+ };
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ calloutComponentInputFileValidator
35
+ });
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_number_validator_exports = {};
20
+ __export(callout_component_input_number_validator_exports, {
21
+ calloutComponentInputNumberValidator: () => calloutComponentInputNumberValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_number_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const calloutComponentInputNumberValidator = (schema, answer) => {
26
+ var _a;
27
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
28
+ return true;
29
+ }
30
+ if (schema.validate && !(0, import_utils.isNumberInRange)(answer, schema.validate.min, schema.validate.max)) {
31
+ return false;
32
+ }
33
+ return (0, import_utils.isNumber)(answer);
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ calloutComponentInputNumberValidator
38
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_phone_number_validator_exports = {};
20
+ __export(callout_component_input_phone_number_validator_exports, {
21
+ calloutComponentInputPhoneNumberValidator: () => calloutComponentInputPhoneNumberValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_phone_number_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const calloutComponentInputPhoneNumberValidator = (schema, answer) => {
26
+ var _a;
27
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && answer === void 0) {
28
+ return true;
29
+ }
30
+ return (0, import_utils.isPhoneNumber)(answer);
31
+ };
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ calloutComponentInputPhoneNumberValidator
35
+ });
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_select_validator_exports = {};
20
+ __export(callout_component_input_select_validator_exports, {
21
+ calloutComponentInputSelectValidator: () => calloutComponentInputSelectValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_select_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ var import_data = require("../data/index.cjs");
26
+ const calloutComponentInputSelectValidator = (schema, answer) => {
27
+ var _a;
28
+ if (!(0, import_utils.isCalloutComponentOfType)(schema, import_data.CalloutComponentType.INPUT_SELECT)) {
29
+ throw new Error("Schema is not a select component");
30
+ }
31
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && !answer) {
32
+ return true;
33
+ }
34
+ const optionValue = schema.data.values.find((v) => v.value === answer);
35
+ return !!optionValue;
36
+ };
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ calloutComponentInputSelectValidator
40
+ });
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_selectable_validator_exports = {};
20
+ __export(callout_component_input_selectable_validator_exports, {
21
+ calloutComponentInputSelectableValidator: () => calloutComponentInputSelectableValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_selectable_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ var import_data = require("../data/index.cjs");
26
+ const calloutComponentInputSelectableValidator = (schema, answer) => {
27
+ var _a;
28
+ if (!(0, import_utils.isCalloutComponentOfBaseType)(
29
+ schema,
30
+ import_data.CalloutComponentBaseType.INPUT_SELECTABLE
31
+ )) {
32
+ throw new Error("Schema is not a selectable component");
33
+ }
34
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && !answer) {
35
+ return true;
36
+ }
37
+ const optionValue = schema.values.find((v) => v.value === answer);
38
+ return !!optionValue;
39
+ };
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ calloutComponentInputSelectableValidator
43
+ });
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_signature_validator_exports = {};
20
+ __export(callout_component_input_signature_validator_exports, {
21
+ calloutComponentInputSignatureValidator: () => calloutComponentInputSignatureValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_signature_validator_exports);
24
+ const calloutComponentInputSignatureValidator = (_, _answer) => {
25
+ throw new Error(
26
+ `[calloutComponentInputSignatureValidator] Not implemented yet`
27
+ );
28
+ };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ calloutComponentInputSignatureValidator
32
+ });
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var callout_component_input_text_validator_exports = {};
20
+ __export(callout_component_input_text_validator_exports, {
21
+ calloutComponentInputTextValidator: () => calloutComponentInputTextValidator
22
+ });
23
+ module.exports = __toCommonJS(callout_component_input_text_validator_exports);
24
+ var import_utils = require("../utils/index.cjs");
25
+ const validateRules = (rules, answer) => {
26
+ if (!rules) {
27
+ return true;
28
+ }
29
+ if (typeof rules.pattern === "string" && rules.pattern.length && !new RegExp(rules.pattern).test(answer)) {
30
+ return false;
31
+ }
32
+ if (!(0, import_utils.isTextInWordRange)(answer, rules.minWords, rules.maxWords)) {
33
+ return false;
34
+ }
35
+ if (!(0, import_utils.isTextInRange)(answer, rules.minLength, rules.maxLength)) {
36
+ return false;
37
+ }
38
+ return true;
39
+ };
40
+ const calloutComponentInputTextValidator = (schema, answer) => {
41
+ var _a;
42
+ if (!((_a = schema.validate) == null ? void 0 : _a.required) && !answer) {
43
+ return true;
44
+ }
45
+ if (typeof answer !== "string") {
46
+ return false;
47
+ }
48
+ return validateRules(schema == null ? void 0 : schema.validate, answer);
49
+ };
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ calloutComponentInputTextValidator
53
+ });