@fieldia/core 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/README.md +362 -1
  2. package/package.json +1 -1
  3. package/schema/page.schema.json +758 -1
  4. package/src/index.d.mts +13 -2
  5. package/src/index.d.ts +13 -2
  6. package/src/index.js +45 -2
  7. package/src/index.js.map +1 -1
  8. package/src/index.mjs +18 -2
  9. package/src/index.mjs.map +1 -1
  10. package/src/lib/format/actions.d.mts +16 -16
  11. package/src/lib/format/actions.d.ts +16 -16
  12. package/src/lib/format/actions.js +3 -0
  13. package/src/lib/format/actions.js.map +1 -1
  14. package/src/lib/format/actions.mjs +3 -0
  15. package/src/lib/format/actions.mjs.map +1 -1
  16. package/src/lib/format/address-search.js +3 -0
  17. package/src/lib/format/address-search.js.map +1 -1
  18. package/src/lib/format/address-search.mjs +3 -0
  19. package/src/lib/format/address-search.mjs.map +1 -1
  20. package/src/lib/format/duplicates.js +3 -0
  21. package/src/lib/format/duplicates.js.map +1 -1
  22. package/src/lib/format/duplicates.mjs +3 -0
  23. package/src/lib/format/duplicates.mjs.map +1 -1
  24. package/src/lib/format/endings.js +3 -0
  25. package/src/lib/format/endings.js.map +1 -1
  26. package/src/lib/format/endings.mjs +3 -0
  27. package/src/lib/format/endings.mjs.map +1 -1
  28. package/src/lib/format/field.d.mts +669 -0
  29. package/src/lib/format/field.d.ts +669 -0
  30. package/src/lib/format/field.js +42 -4
  31. package/src/lib/format/field.js.map +1 -1
  32. package/src/lib/format/field.mjs +42 -4
  33. package/src/lib/format/field.mjs.map +1 -1
  34. package/src/lib/format/flow-checks.d.mts +14 -0
  35. package/src/lib/format/flow-checks.d.ts +14 -0
  36. package/src/lib/format/flow-checks.js +61 -0
  37. package/src/lib/format/flow-checks.js.map +1 -0
  38. package/src/lib/format/flow-checks.mjs +58 -0
  39. package/src/lib/format/flow-checks.mjs.map +1 -0
  40. package/src/lib/format/flow.d.mts +43 -0
  41. package/src/lib/format/flow.d.ts +43 -0
  42. package/src/lib/format/flow.js +22 -0
  43. package/src/lib/format/flow.js.map +1 -0
  44. package/src/lib/format/flow.mjs +19 -0
  45. package/src/lib/format/flow.mjs.map +1 -0
  46. package/src/lib/format/from-schema.d.mts +70 -0
  47. package/src/lib/format/from-schema.d.ts +70 -0
  48. package/src/lib/format/from-schema.js +599 -0
  49. package/src/lib/format/from-schema.js.map +1 -0
  50. package/src/lib/format/from-schema.mjs +591 -0
  51. package/src/lib/format/from-schema.mjs.map +1 -0
  52. package/src/lib/format/jitless.d.mts +1 -0
  53. package/src/lib/format/jitless.d.ts +1 -0
  54. package/src/lib/format/jitless.js +27 -0
  55. package/src/lib/format/jitless.js.map +1 -0
  56. package/src/lib/format/jitless.mjs +24 -0
  57. package/src/lib/format/jitless.mjs.map +1 -0
  58. package/src/lib/format/json-schema.js +3 -0
  59. package/src/lib/format/json-schema.js.map +1 -1
  60. package/src/lib/format/json-schema.mjs +3 -0
  61. package/src/lib/format/json-schema.mjs.map +1 -1
  62. package/src/lib/format/json.js +3 -0
  63. package/src/lib/format/json.js.map +1 -1
  64. package/src/lib/format/json.mjs +3 -0
  65. package/src/lib/format/json.mjs.map +1 -1
  66. package/src/lib/format/languages-checks.d.mts +2 -1
  67. package/src/lib/format/languages-checks.d.ts +2 -1
  68. package/src/lib/format/languages-checks.js +8 -2
  69. package/src/lib/format/languages-checks.js.map +1 -1
  70. package/src/lib/format/languages-checks.mjs +8 -2
  71. package/src/lib/format/languages-checks.mjs.map +1 -1
  72. package/src/lib/format/later-checks.d.mts +3 -1
  73. package/src/lib/format/later-checks.d.ts +3 -1
  74. package/src/lib/format/later-checks.js +3 -1
  75. package/src/lib/format/later-checks.js.map +1 -1
  76. package/src/lib/format/later-checks.mjs +3 -1
  77. package/src/lib/format/later-checks.mjs.map +1 -1
  78. package/src/lib/format/layout.d.mts +13192 -7550
  79. package/src/lib/format/layout.d.ts +13192 -7550
  80. package/src/lib/format/layout.js +61 -3
  81. package/src/lib/format/layout.js.map +1 -1
  82. package/src/lib/format/layout.mjs +59 -1
  83. package/src/lib/format/layout.mjs.map +1 -1
  84. package/src/lib/format/layout.types.d.mts +3 -1
  85. package/src/lib/format/layout.types.d.ts +3 -1
  86. package/src/lib/format/limits.js +3 -0
  87. package/src/lib/format/limits.js.map +1 -1
  88. package/src/lib/format/limits.mjs +3 -0
  89. package/src/lib/format/limits.mjs.map +1 -1
  90. package/src/lib/format/list-checks.d.mts +1 -1
  91. package/src/lib/format/list-checks.d.ts +1 -1
  92. package/src/lib/format/list-checks.js +67 -22
  93. package/src/lib/format/list-checks.js.map +1 -1
  94. package/src/lib/format/list-checks.mjs +67 -22
  95. package/src/lib/format/list-checks.mjs.map +1 -1
  96. package/src/lib/format/list-rows-checks.d.mts +11 -0
  97. package/src/lib/format/list-rows-checks.d.ts +11 -0
  98. package/src/lib/format/list-rows-checks.js +62 -0
  99. package/src/lib/format/list-rows-checks.js.map +1 -0
  100. package/src/lib/format/list-rows-checks.mjs +59 -0
  101. package/src/lib/format/list-rows-checks.mjs.map +1 -0
  102. package/src/lib/format/media-options.d.mts +84 -0
  103. package/src/lib/format/media-options.d.ts +84 -0
  104. package/src/lib/format/media-options.js +86 -0
  105. package/src/lib/format/media-options.js.map +1 -0
  106. package/src/lib/format/media-options.mjs +80 -0
  107. package/src/lib/format/media-options.mjs.map +1 -0
  108. package/src/lib/format/outbox-checks.d.mts +11 -0
  109. package/src/lib/format/outbox-checks.d.ts +11 -0
  110. package/src/lib/format/outbox-checks.js +12 -0
  111. package/src/lib/format/outbox-checks.js.map +1 -0
  112. package/src/lib/format/outbox-checks.mjs +9 -0
  113. package/src/lib/format/outbox-checks.mjs.map +1 -0
  114. package/src/lib/format/page.d.mts +3057 -966
  115. package/src/lib/format/page.d.ts +3057 -966
  116. package/src/lib/format/page.js +15 -0
  117. package/src/lib/format/page.js.map +1 -1
  118. package/src/lib/format/page.mjs +15 -0
  119. package/src/lib/format/page.mjs.map +1 -1
  120. package/src/lib/format/part-checks.d.mts +3 -0
  121. package/src/lib/format/part-checks.d.ts +3 -0
  122. package/src/lib/format/payment-checks.d.mts +13 -0
  123. package/src/lib/format/payment-checks.d.ts +13 -0
  124. package/src/lib/format/payment-checks.js +30 -0
  125. package/src/lib/format/payment-checks.js.map +1 -0
  126. package/src/lib/format/payment-checks.mjs +27 -0
  127. package/src/lib/format/payment-checks.mjs.map +1 -0
  128. package/src/lib/format/payment.d.mts +37 -0
  129. package/src/lib/format/payment.d.ts +37 -0
  130. package/src/lib/format/payment.js +15 -0
  131. package/src/lib/format/payment.js.map +1 -0
  132. package/src/lib/format/payment.mjs +12 -0
  133. package/src/lib/format/payment.mjs.map +1 -0
  134. package/src/lib/format/phone.js +3 -0
  135. package/src/lib/format/phone.js.map +1 -1
  136. package/src/lib/format/phone.mjs +3 -0
  137. package/src/lib/format/phone.mjs.map +1 -1
  138. package/src/lib/format/picker-options.d.mts +12 -0
  139. package/src/lib/format/picker-options.d.ts +12 -0
  140. package/src/lib/format/picker-options.js +21 -3
  141. package/src/lib/format/picker-options.js.map +1 -1
  142. package/src/lib/format/picker-options.mjs +20 -2
  143. package/src/lib/format/picker-options.mjs.map +1 -1
  144. package/src/lib/format/prefill-checks.d.mts +13 -0
  145. package/src/lib/format/prefill-checks.d.ts +13 -0
  146. package/src/lib/format/prefill-checks.js +35 -0
  147. package/src/lib/format/prefill-checks.js.map +1 -0
  148. package/src/lib/format/prefill-checks.mjs +32 -0
  149. package/src/lib/format/prefill-checks.mjs.map +1 -0
  150. package/src/lib/format/prefill.d.mts +33 -0
  151. package/src/lib/format/prefill.d.ts +33 -0
  152. package/src/lib/format/prefill.js +20 -0
  153. package/src/lib/format/prefill.js.map +1 -0
  154. package/src/lib/format/prefill.mjs +17 -0
  155. package/src/lib/format/prefill.mjs.map +1 -0
  156. package/src/lib/format/quiz.d.mts +58 -0
  157. package/src/lib/format/quiz.d.ts +58 -0
  158. package/src/lib/format/quiz.js +24 -0
  159. package/src/lib/format/quiz.js.map +1 -0
  160. package/src/lib/format/quiz.mjs +21 -0
  161. package/src/lib/format/quiz.mjs.map +1 -0
  162. package/src/lib/format/records.js +3 -0
  163. package/src/lib/format/records.js.map +1 -1
  164. package/src/lib/format/records.mjs +3 -0
  165. package/src/lib/format/records.mjs.map +1 -1
  166. package/src/lib/format/references.d.mts +1 -1
  167. package/src/lib/format/references.d.ts +1 -1
  168. package/src/lib/format/references.js +56 -7
  169. package/src/lib/format/references.js.map +1 -1
  170. package/src/lib/format/references.mjs +57 -8
  171. package/src/lib/format/references.mjs.map +1 -1
  172. package/src/lib/format/schedule-checks.d.mts +8 -0
  173. package/src/lib/format/schedule-checks.d.ts +8 -0
  174. package/src/lib/format/schedule-checks.js +16 -0
  175. package/src/lib/format/schedule-checks.js.map +1 -0
  176. package/src/lib/format/schedule-checks.mjs +13 -0
  177. package/src/lib/format/schedule-checks.mjs.map +1 -0
  178. package/src/lib/format/signature-checks.d.mts +8 -0
  179. package/src/lib/format/signature-checks.d.ts +8 -0
  180. package/src/lib/format/signature-checks.js +21 -0
  181. package/src/lib/format/signature-checks.js.map +1 -1
  182. package/src/lib/format/signature-checks.mjs +20 -0
  183. package/src/lib/format/signature-checks.mjs.map +1 -1
  184. package/src/lib/format/signature-options.js +3 -0
  185. package/src/lib/format/signature-options.js.map +1 -1
  186. package/src/lib/format/signature-options.mjs +3 -0
  187. package/src/lib/format/signature-options.mjs.map +1 -1
  188. package/src/lib/format/slots-options.js +3 -0
  189. package/src/lib/format/slots-options.js.map +1 -1
  190. package/src/lib/format/slots-options.mjs +3 -0
  191. package/src/lib/format/slots-options.mjs.map +1 -1
  192. package/src/lib/format/templates-checks.d.mts +6 -0
  193. package/src/lib/format/templates-checks.d.ts +6 -0
  194. package/src/lib/format/templates-checks.js +16 -0
  195. package/src/lib/format/templates-checks.js.map +1 -0
  196. package/src/lib/format/templates-checks.mjs +13 -0
  197. package/src/lib/format/templates-checks.mjs.map +1 -0
  198. package/src/lib/format/translate.d.mts +2 -0
  199. package/src/lib/format/translate.d.ts +2 -0
  200. package/src/lib/format/translate.js +6 -2
  201. package/src/lib/format/translate.js.map +1 -1
  202. package/src/lib/format/translate.mjs +4 -2
  203. package/src/lib/format/translate.mjs.map +1 -1
  204. package/src/lib/format/typed-options.d.mts +43 -0
  205. package/src/lib/format/typed-options.d.ts +43 -0
  206. package/src/lib/format/typed-options.js +50 -0
  207. package/src/lib/format/typed-options.js.map +1 -0
  208. package/src/lib/format/typed-options.mjs +46 -0
  209. package/src/lib/format/typed-options.mjs.map +1 -0
  210. package/src/lib/format/upgrade.d.mts +5 -1
  211. package/src/lib/format/upgrade.d.ts +5 -1
  212. package/src/lib/format/upgrade.js +5 -1
  213. package/src/lib/format/upgrade.js.map +1 -1
  214. package/src/lib/format/upgrade.mjs +5 -1
  215. package/src/lib/format/upgrade.mjs.map +1 -1
  216. package/src/lib/format/validate.js +3 -0
  217. package/src/lib/format/validate.js.map +1 -1
  218. package/src/lib/format/validate.mjs +3 -0
  219. package/src/lib/format/validate.mjs.map +1 -1
  220. package/src/lib/format/verify-checks.d.mts +10 -0
  221. package/src/lib/format/verify-checks.d.ts +10 -0
  222. package/src/lib/format/verify-checks.js +44 -0
  223. package/src/lib/format/verify-checks.js.map +1 -0
  224. package/src/lib/format/verify-checks.mjs +41 -0
  225. package/src/lib/format/verify-checks.mjs.map +1 -0
  226. package/src/lib/format/version.d.mts +2 -2
  227. package/src/lib/format/version.d.ts +2 -2
  228. package/src/lib/format/version.js +2 -2
  229. package/src/lib/format/version.js.map +1 -1
  230. package/src/lib/format/version.mjs +2 -2
  231. package/src/lib/format/version.mjs.map +1 -1
  232. package/src/lib/format/week.d.mts +18 -0
  233. package/src/lib/format/week.d.ts +18 -0
  234. package/src/lib/format/week.js +58 -0
  235. package/src/lib/format/week.js.map +1 -0
  236. package/src/lib/format/week.mjs +55 -0
  237. package/src/lib/format/week.mjs.map +1 -0
  238. package/src/lib/record/approvals-part.d.mts +1 -1
  239. package/src/lib/record/approvals-part.d.ts +1 -1
  240. package/src/lib/record/approvals-part.js +2 -2
  241. package/src/lib/record/approvals-part.js.map +1 -1
  242. package/src/lib/record/approvals-part.mjs +1 -1
  243. package/src/lib/record/approvals-part.mjs.map +1 -1
  244. package/src/lib/record/data-source.d.mts +337 -3
  245. package/src/lib/record/data-source.d.ts +337 -3
  246. package/src/lib/record/data-source.js.map +1 -1
  247. package/src/lib/record/data-source.mjs.map +1 -1
  248. package/src/lib/record/day-words.d.mts +22 -1
  249. package/src/lib/record/day-words.d.ts +22 -1
  250. package/src/lib/record/day-words.js +29 -2
  251. package/src/lib/record/day-words.js.map +1 -1
  252. package/src/lib/record/day-words.mjs +24 -2
  253. package/src/lib/record/day-words.mjs.map +1 -1
  254. package/src/lib/record/files-part.d.mts +1 -0
  255. package/src/lib/record/files-part.d.ts +1 -0
  256. package/src/lib/record/files-part.js +7 -1
  257. package/src/lib/record/files-part.js.map +1 -1
  258. package/src/lib/record/files-part.mjs +5 -1
  259. package/src/lib/record/files-part.mjs.map +1 -1
  260. package/src/lib/record/form-approvals.d.mts +12 -17
  261. package/src/lib/record/form-approvals.d.ts +12 -17
  262. package/src/lib/record/form-approvals.js +15 -9
  263. package/src/lib/record/form-approvals.js.map +1 -1
  264. package/src/lib/record/form-approvals.mjs +14 -8
  265. package/src/lib/record/form-approvals.mjs.map +1 -1
  266. package/src/lib/record/form-limits.d.mts +4 -28
  267. package/src/lib/record/form-limits.d.ts +4 -28
  268. package/src/lib/record/form-limits.js +8 -5
  269. package/src/lib/record/form-limits.js.map +1 -1
  270. package/src/lib/record/form-limits.mjs +8 -5
  271. package/src/lib/record/form-limits.mjs.map +1 -1
  272. package/src/lib/record/form.d.mts +125 -7
  273. package/src/lib/record/form.d.ts +125 -7
  274. package/src/lib/record/form.js +277 -77
  275. package/src/lib/record/form.js.map +1 -1
  276. package/src/lib/record/form.mjs +278 -78
  277. package/src/lib/record/form.mjs.map +1 -1
  278. package/src/lib/record/history-steps.d.mts +38 -0
  279. package/src/lib/record/history-steps.d.ts +38 -0
  280. package/src/lib/record/history-steps.js +63 -0
  281. package/src/lib/record/history-steps.js.map +1 -0
  282. package/src/lib/record/history-steps.mjs +58 -0
  283. package/src/lib/record/history-steps.mjs.map +1 -0
  284. package/src/lib/record/history.d.mts +16 -0
  285. package/src/lib/record/history.d.ts +16 -0
  286. package/src/lib/record/history.js +3 -0
  287. package/src/lib/record/history.js.map +1 -0
  288. package/src/lib/record/history.mjs +2 -0
  289. package/src/lib/record/history.mjs.map +1 -0
  290. package/src/lib/record/input-rules.d.mts +2 -0
  291. package/src/lib/record/input-rules.d.ts +2 -0
  292. package/src/lib/record/input-rules.js +4 -1
  293. package/src/lib/record/input-rules.js.map +1 -1
  294. package/src/lib/record/input-rules.mjs +2 -0
  295. package/src/lib/record/input-rules.mjs.map +1 -1
  296. package/src/lib/record/joins.d.mts +143 -0
  297. package/src/lib/record/joins.d.ts +143 -0
  298. package/src/lib/record/joins.js +28 -0
  299. package/src/lib/record/joins.js.map +1 -0
  300. package/src/lib/record/joins.mjs +24 -0
  301. package/src/lib/record/joins.mjs.map +1 -0
  302. package/src/lib/record/limits.js +7 -4
  303. package/src/lib/record/limits.js.map +1 -1
  304. package/src/lib/record/limits.mjs +8 -5
  305. package/src/lib/record/limits.mjs.map +1 -1
  306. package/src/lib/record/link-values.d.mts +31 -0
  307. package/src/lib/record/link-values.d.ts +31 -0
  308. package/src/lib/record/link-values.js +132 -0
  309. package/src/lib/record/link-values.js.map +1 -0
  310. package/src/lib/record/link-values.mjs +125 -0
  311. package/src/lib/record/link-values.mjs.map +1 -0
  312. package/src/lib/record/live-later.d.mts +15 -0
  313. package/src/lib/record/live-later.d.ts +15 -0
  314. package/src/lib/record/live-later.js +10 -0
  315. package/src/lib/record/live-later.js.map +1 -0
  316. package/src/lib/record/live-later.mjs +7 -0
  317. package/src/lib/record/live-later.mjs.map +1 -0
  318. package/src/lib/record/live-part.d.mts +6 -0
  319. package/src/lib/record/live-part.d.ts +6 -0
  320. package/src/lib/record/live-part.js +12 -0
  321. package/src/lib/record/live-part.js.map +1 -0
  322. package/src/lib/record/live-part.mjs +7 -0
  323. package/src/lib/record/live-part.mjs.map +1 -0
  324. package/src/lib/record/live.d.mts +8 -0
  325. package/src/lib/record/live.d.ts +8 -0
  326. package/src/lib/record/live.js +133 -0
  327. package/src/lib/record/live.js.map +1 -0
  328. package/src/lib/record/live.mjs +129 -0
  329. package/src/lib/record/live.mjs.map +1 -0
  330. package/src/lib/record/locales/all.d.mts +5 -5
  331. package/src/lib/record/locales/all.d.ts +5 -5
  332. package/src/lib/record/locales/all.js +3 -3
  333. package/src/lib/record/locales/all.js.map +1 -1
  334. package/src/lib/record/locales/all.mjs +3 -3
  335. package/src/lib/record/locales/all.mjs.map +1 -1
  336. package/src/lib/record/locales/ar.js +11 -1
  337. package/src/lib/record/locales/ar.js.map +1 -1
  338. package/src/lib/record/locales/ar.mjs +11 -1
  339. package/src/lib/record/locales/ar.mjs.map +1 -1
  340. package/src/lib/record/locales/de.js +11 -1
  341. package/src/lib/record/locales/de.js.map +1 -1
  342. package/src/lib/record/locales/de.mjs +11 -1
  343. package/src/lib/record/locales/de.mjs.map +1 -1
  344. package/src/lib/record/locales/es.d.mts +8 -0
  345. package/src/lib/record/locales/es.d.ts +8 -0
  346. package/src/lib/record/locales/es.js +111 -0
  347. package/src/lib/record/locales/es.js.map +1 -0
  348. package/src/lib/record/locales/es.mjs +108 -0
  349. package/src/lib/record/locales/es.mjs.map +1 -0
  350. package/src/lib/record/locales/fa.d.mts +5 -0
  351. package/src/lib/record/locales/fa.d.ts +5 -0
  352. package/src/lib/record/locales/fa.js +117 -0
  353. package/src/lib/record/locales/fa.js.map +1 -0
  354. package/src/lib/record/locales/fa.mjs +114 -0
  355. package/src/lib/record/locales/fa.mjs.map +1 -0
  356. package/src/lib/record/locales/fr.js +11 -1
  357. package/src/lib/record/locales/fr.js.map +1 -1
  358. package/src/lib/record/locales/fr.mjs +11 -1
  359. package/src/lib/record/locales/fr.mjs.map +1 -1
  360. package/src/lib/record/locales/later.d.mts +8 -0
  361. package/src/lib/record/locales/later.d.ts +8 -0
  362. package/src/lib/record/locales/later.js +16 -0
  363. package/src/lib/record/locales/later.js.map +1 -0
  364. package/src/lib/record/locales/later.mjs +13 -0
  365. package/src/lib/record/locales/later.mjs.map +1 -0
  366. package/src/lib/record/locales/tr.d.mts +6 -0
  367. package/src/lib/record/locales/tr.d.ts +6 -0
  368. package/src/lib/record/locales/tr.js +118 -0
  369. package/src/lib/record/locales/tr.js.map +1 -0
  370. package/src/lib/record/locales/tr.mjs +115 -0
  371. package/src/lib/record/locales/tr.mjs.map +1 -0
  372. package/src/lib/record/locales/ur.d.mts +9 -0
  373. package/src/lib/record/locales/ur.d.ts +9 -0
  374. package/src/lib/record/locales/ur.js +118 -0
  375. package/src/lib/record/locales/ur.js.map +1 -0
  376. package/src/lib/record/locales/ur.mjs +115 -0
  377. package/src/lib/record/locales/ur.mjs.map +1 -0
  378. package/src/lib/record/memory-approvals.d.mts +7 -4
  379. package/src/lib/record/memory-approvals.d.ts +7 -4
  380. package/src/lib/record/memory-approvals.js +54 -7
  381. package/src/lib/record/memory-approvals.js.map +1 -1
  382. package/src/lib/record/memory-approvals.mjs +54 -7
  383. package/src/lib/record/memory-approvals.mjs.map +1 -1
  384. package/src/lib/record/memory-assist.d.mts +7 -2
  385. package/src/lib/record/memory-assist.d.ts +7 -2
  386. package/src/lib/record/memory-assist.js +47 -12
  387. package/src/lib/record/memory-assist.js.map +1 -1
  388. package/src/lib/record/memory-assist.mjs +46 -12
  389. package/src/lib/record/memory-assist.mjs.map +1 -1
  390. package/src/lib/record/memory-codes.d.mts +37 -0
  391. package/src/lib/record/memory-codes.d.ts +37 -0
  392. package/src/lib/record/memory-codes.js +50 -0
  393. package/src/lib/record/memory-codes.js.map +1 -0
  394. package/src/lib/record/memory-codes.mjs +47 -0
  395. package/src/lib/record/memory-codes.mjs.map +1 -0
  396. package/src/lib/record/memory-data-source.d.mts +60 -4
  397. package/src/lib/record/memory-data-source.d.ts +60 -4
  398. package/src/lib/record/memory-data-source.js +69 -1
  399. package/src/lib/record/memory-data-source.js.map +1 -1
  400. package/src/lib/record/memory-data-source.mjs +69 -1
  401. package/src/lib/record/memory-data-source.mjs.map +1 -1
  402. package/src/lib/record/memory-kept.d.mts +3 -1
  403. package/src/lib/record/memory-kept.d.ts +3 -1
  404. package/src/lib/record/memory-kept.js +7 -2
  405. package/src/lib/record/memory-kept.js.map +1 -1
  406. package/src/lib/record/memory-kept.mjs +7 -2
  407. package/src/lib/record/memory-kept.mjs.map +1 -1
  408. package/src/lib/record/memory-later.d.mts +3 -1
  409. package/src/lib/record/memory-later.d.ts +3 -1
  410. package/src/lib/record/memory-later.js +9 -5
  411. package/src/lib/record/memory-later.js.map +1 -1
  412. package/src/lib/record/memory-later.mjs +8 -4
  413. package/src/lib/record/memory-later.mjs.map +1 -1
  414. package/src/lib/record/memory-live.d.mts +8 -0
  415. package/src/lib/record/memory-live.d.ts +8 -0
  416. package/src/lib/record/memory-live.js +70 -0
  417. package/src/lib/record/memory-live.js.map +1 -0
  418. package/src/lib/record/memory-live.mjs +67 -0
  419. package/src/lib/record/memory-live.mjs.map +1 -0
  420. package/src/lib/record/memory-views.d.mts +11 -0
  421. package/src/lib/record/memory-views.d.ts +11 -0
  422. package/src/lib/record/memory-views.js +60 -0
  423. package/src/lib/record/memory-views.js.map +1 -0
  424. package/src/lib/record/memory-views.mjs +57 -0
  425. package/src/lib/record/memory-views.mjs.map +1 -0
  426. package/src/lib/record/messages.d.mts +24 -3
  427. package/src/lib/record/messages.d.ts +24 -3
  428. package/src/lib/record/messages.js +18 -3
  429. package/src/lib/record/messages.js.map +1 -1
  430. package/src/lib/record/messages.mjs +18 -3
  431. package/src/lib/record/messages.mjs.map +1 -1
  432. package/src/lib/record/order.d.mts +21 -0
  433. package/src/lib/record/order.d.ts +21 -0
  434. package/src/lib/record/order.js +129 -0
  435. package/src/lib/record/order.js.map +1 -0
  436. package/src/lib/record/order.mjs +122 -0
  437. package/src/lib/record/order.mjs.map +1 -0
  438. package/src/lib/record/outbox-form.d.mts +79 -0
  439. package/src/lib/record/outbox-form.d.ts +79 -0
  440. package/src/lib/record/outbox-form.js +291 -0
  441. package/src/lib/record/outbox-form.js.map +1 -0
  442. package/src/lib/record/outbox-form.mjs +286 -0
  443. package/src/lib/record/outbox-form.mjs.map +1 -0
  444. package/src/lib/record/outbox-part.d.mts +6 -0
  445. package/src/lib/record/outbox-part.d.ts +6 -0
  446. package/src/lib/record/outbox-part.js +13 -0
  447. package/src/lib/record/outbox-part.js.map +1 -0
  448. package/src/lib/record/outbox-part.mjs +7 -0
  449. package/src/lib/record/outbox-part.mjs.map +1 -0
  450. package/src/lib/record/pay-part.d.mts +6 -0
  451. package/src/lib/record/pay-part.d.ts +6 -0
  452. package/src/lib/record/pay-part.js +11 -0
  453. package/src/lib/record/pay-part.js.map +1 -0
  454. package/src/lib/record/pay-part.mjs +7 -0
  455. package/src/lib/record/pay-part.mjs.map +1 -0
  456. package/src/lib/record/payment-form.d.mts +25 -0
  457. package/src/lib/record/payment-form.d.ts +25 -0
  458. package/src/lib/record/payment-form.js +98 -0
  459. package/src/lib/record/payment-form.js.map +1 -0
  460. package/src/lib/record/payment-form.mjs +95 -0
  461. package/src/lib/record/payment-form.mjs.map +1 -0
  462. package/src/lib/record/prefill-part.d.mts +7 -0
  463. package/src/lib/record/prefill-part.d.ts +7 -0
  464. package/src/lib/record/prefill-part.js +15 -0
  465. package/src/lib/record/prefill-part.js.map +1 -0
  466. package/src/lib/record/prefill-part.mjs +8 -0
  467. package/src/lib/record/prefill-part.mjs.map +1 -0
  468. package/src/lib/record/press-undo.d.mts +42 -0
  469. package/src/lib/record/press-undo.d.ts +42 -0
  470. package/src/lib/record/press-undo.js +115 -0
  471. package/src/lib/record/press-undo.js.map +1 -0
  472. package/src/lib/record/press-undo.mjs +110 -0
  473. package/src/lib/record/press-undo.mjs.map +1 -0
  474. package/src/lib/record/quiz.d.mts +36 -0
  475. package/src/lib/record/quiz.d.ts +36 -0
  476. package/src/lib/record/quiz.js +90 -0
  477. package/src/lib/record/quiz.js.map +1 -0
  478. package/src/lib/record/quiz.mjs +87 -0
  479. package/src/lib/record/quiz.mjs.map +1 -0
  480. package/src/lib/record/record-words.js +1 -1
  481. package/src/lib/record/record-words.js.map +1 -1
  482. package/src/lib/record/record-words.mjs +1 -1
  483. package/src/lib/record/record-words.mjs.map +1 -1
  484. package/src/lib/record/run.d.mts +71 -8
  485. package/src/lib/record/run.d.ts +71 -8
  486. package/src/lib/record/run.js +40 -13
  487. package/src/lib/record/run.js.map +1 -1
  488. package/src/lib/record/run.mjs +38 -12
  489. package/src/lib/record/run.mjs.map +1 -1
  490. package/src/lib/record/survey-kit.d.mts +37 -0
  491. package/src/lib/record/survey-kit.d.ts +37 -0
  492. package/src/lib/record/survey-kit.js +99 -0
  493. package/src/lib/record/survey-kit.js.map +1 -0
  494. package/src/lib/record/survey-kit.mjs +96 -0
  495. package/src/lib/record/survey-kit.mjs.map +1 -0
  496. package/src/lib/record/survey.d.mts +16 -0
  497. package/src/lib/record/survey.d.ts +16 -0
  498. package/src/lib/record/survey.js +17 -0
  499. package/src/lib/record/survey.js.map +1 -0
  500. package/src/lib/record/survey.mjs +13 -0
  501. package/src/lib/record/survey.mjs.map +1 -0
  502. package/src/lib/record/surveyflow-part.d.mts +9 -0
  503. package/src/lib/record/surveyflow-part.d.ts +9 -0
  504. package/src/lib/record/surveyflow-part.js +20 -0
  505. package/src/lib/record/surveyflow-part.js.map +1 -0
  506. package/src/lib/record/surveyflow-part.mjs +10 -0
  507. package/src/lib/record/surveyflow-part.mjs.map +1 -0
  508. package/src/lib/record/timing.d.mts +76 -0
  509. package/src/lib/record/timing.d.ts +76 -0
  510. package/src/lib/record/timing.js +112 -0
  511. package/src/lib/record/timing.js.map +1 -0
  512. package/src/lib/record/timing.mjs +104 -0
  513. package/src/lib/record/timing.mjs.map +1 -0
  514. package/src/lib/record/undo-later.d.mts +9 -0
  515. package/src/lib/record/undo-later.d.ts +9 -0
  516. package/src/lib/record/undo-later.js +10 -0
  517. package/src/lib/record/undo-later.js.map +1 -0
  518. package/src/lib/record/undo-later.mjs +7 -0
  519. package/src/lib/record/undo-later.mjs.map +1 -0
  520. package/src/lib/record/undo-part.d.mts +8 -0
  521. package/src/lib/record/undo-part.d.ts +8 -0
  522. package/src/lib/record/undo-part.js +17 -0
  523. package/src/lib/record/undo-part.js.map +1 -0
  524. package/src/lib/record/undo-part.mjs +9 -0
  525. package/src/lib/record/undo-part.mjs.map +1 -0
  526. package/src/lib/record/upload-to-later.d.mts +10 -0
  527. package/src/lib/record/upload-to-later.d.ts +10 -0
  528. package/src/lib/record/upload-to-later.js +15 -0
  529. package/src/lib/record/upload-to-later.js.map +1 -0
  530. package/src/lib/record/upload-to-later.mjs +12 -0
  531. package/src/lib/record/upload-to-later.mjs.map +1 -0
  532. package/src/lib/record/uploads.d.mts +5 -0
  533. package/src/lib/record/uploads.d.ts +5 -0
  534. package/src/lib/record/uploads.js.map +1 -1
  535. package/src/lib/record/uploads.mjs.map +1 -1
  536. package/src/lib/record/values.d.mts +6 -0
  537. package/src/lib/record/values.d.ts +6 -0
  538. package/src/lib/record/values.js.map +1 -1
  539. package/src/lib/record/values.mjs.map +1 -1
  540. package/src/lib/record/verify-form.d.mts +24 -0
  541. package/src/lib/record/verify-form.d.ts +24 -0
  542. package/src/lib/record/verify-form.js +65 -0
  543. package/src/lib/record/verify-form.js.map +1 -0
  544. package/src/lib/record/verify-form.mjs +62 -0
  545. package/src/lib/record/verify-form.mjs.map +1 -0
  546. package/src/lib/record/verify-part.d.mts +6 -0
  547. package/src/lib/record/verify-part.d.ts +6 -0
  548. package/src/lib/record/verify-part.js +11 -0
  549. package/src/lib/record/verify-part.js.map +1 -0
  550. package/src/lib/record/verify-part.mjs +7 -0
  551. package/src/lib/record/verify-part.mjs.map +1 -0
  552. package/src/lib/record/words-chunks.d.mts +37 -0
  553. package/src/lib/record/words-chunks.d.ts +37 -0
  554. package/src/lib/record/words-chunks.js +94 -0
  555. package/src/lib/record/words-chunks.js.map +1 -0
  556. package/src/lib/record/words-chunks.mjs +86 -0
  557. package/src/lib/record/words-chunks.mjs.map +1 -0
  558. package/src/runtime.d.mts +28 -6
  559. package/src/runtime.d.ts +28 -6
  560. package/src/runtime.js +35 -6
  561. package/src/runtime.js.map +1 -1
  562. package/src/runtime.mjs +15 -3
  563. package/src/runtime.mjs.map +1 -1
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkPrefill = checkPrefill;
4
+ /** The kinds a link's words fill as the page opens (`prefill`): read as linkValue reads them. */
5
+ const PREFILLED_KINDS = new Set(['char', 'text', 'integer', 'float', 'monetary', 'boolean', 'selection', 'date', 'datetime']);
6
+ /**
7
+ * The fields a link fills (`prefill.fromUrl`): each a field of the page that reads a link's words — a line of text, a
8
+ * number, a yes or no, a choice of the page's own options, a day — filled by one parameter, never worked out. In the
9
+ * one-tag script they come with the prefill part, which a page with `prefill` asks for (later-checks.ts).
10
+ */
11
+ function checkPrefill(page, tools) {
12
+ const report = (path, message) => tools.report(path, message);
13
+ if (page.layout.type === 'list')
14
+ return report('prefill', 'a link fills the answers of a record or a response as it starts: a list of records has none');
15
+ const filled = new Set();
16
+ (page.prefill?.fromUrl ?? []).forEach((one, i) => {
17
+ const at = `prefill.fromUrl[${i}]`;
18
+ const [param, name] = typeof one === 'string' ? [one, one] : [one.param, one.field];
19
+ if (filled.has(name))
20
+ return report(at, `"${name}" is filled by two of the link's parameters: name it once`);
21
+ filled.add(name);
22
+ const def = page.fields[name];
23
+ if (!def)
24
+ return report(at, `no field "${name}" for the link's "${param}" to fill: add it to the page's fields (placed nowhere, it is a hidden field, sent with the answers)`);
25
+ if (def.compute !== undefined)
26
+ return report(at, `"${name}" is worked out from other fields: a link cannot fill it`);
27
+ if (Array.isArray(def.translate))
28
+ return report(at, `"${name}" keeps its text in several languages, each typed by a person: a link's words fill none of them`);
29
+ if (!PREFILLED_KINDS.has(def.type))
30
+ return report(at, `"${name}" is a ${def.type}: a link's words fill a line of text, a number, a yes or no, a choice or a day — keep them in a text field (an agent's code), and let your app link the record`);
31
+ if (def.type === 'selection' && def.optionsFrom !== undefined)
32
+ report(at, `"${name}" takes its options from elsewhere: a link fills a choice of the page's own options`);
33
+ });
34
+ }
35
+ //# sourceMappingURL=prefill-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefill-checks.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/prefill-checks.ts"],"names":[],"mappings":";;AAiBA,oCAgBC;AA/BD,iGAAiG;AACjG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAS9H;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAU,EAAE,KAAmB;IAC1D,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9E,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC,SAAS,EAAE,6FAA6F,CAAC,CAAC;IACzJ,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC;QACnC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QACpF,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,2DAA2D,CAAC,CAAC;QAC7G,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,aAAa,IAAI,qBAAqB,KAAK,sGAAsG,CAAC,CAAC;QAC/K,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,0DAA0D,CAAC,CAAC;QACrH,IAAI,KAAK,CAAC,OAAO,CAAE,GAA+B,CAAC,SAAS,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,iGAAiG,CAAC,CAAC;QAC5L,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,UAAU,GAAG,CAAC,IAAI,gKAAgK,CAAC,CAAC;QAClP,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS;YAAE,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,qFAAqF,CAAC,CAAC;IAC3K,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** The kinds a link's words fill as the page opens (`prefill`): read as linkValue reads them. */
2
+ const PREFILLED_KINDS = new Set(['char', 'text', 'integer', 'float', 'monetary', 'boolean', 'selection', 'date', 'datetime']);
3
+ /**
4
+ * The fields a link fills (`prefill.fromUrl`): each a field of the page that reads a link's words — a line of text, a
5
+ * number, a yes or no, a choice of the page's own options, a day — filled by one parameter, never worked out. In the
6
+ * one-tag script they come with the prefill part, which a page with `prefill` asks for (later-checks.ts).
7
+ */
8
+ export function checkPrefill(page, tools) {
9
+ const report = (path, message) => tools.report(path, message);
10
+ if (page.layout.type === 'list')
11
+ return report('prefill', 'a link fills the answers of a record or a response as it starts: a list of records has none');
12
+ const filled = new Set();
13
+ (page.prefill?.fromUrl ?? []).forEach((one, i) => {
14
+ const at = `prefill.fromUrl[${i}]`;
15
+ const [param, name] = typeof one === 'string' ? [one, one] : [one.param, one.field];
16
+ if (filled.has(name))
17
+ return report(at, `"${name}" is filled by two of the link's parameters: name it once`);
18
+ filled.add(name);
19
+ const def = page.fields[name];
20
+ if (!def)
21
+ return report(at, `no field "${name}" for the link's "${param}" to fill: add it to the page's fields (placed nowhere, it is a hidden field, sent with the answers)`);
22
+ if (def.compute !== undefined)
23
+ return report(at, `"${name}" is worked out from other fields: a link cannot fill it`);
24
+ if (Array.isArray(def.translate))
25
+ return report(at, `"${name}" keeps its text in several languages, each typed by a person: a link's words fill none of them`);
26
+ if (!PREFILLED_KINDS.has(def.type))
27
+ return report(at, `"${name}" is a ${def.type}: a link's words fill a line of text, a number, a yes or no, a choice or a day — keep them in a text field (an agent's code), and let your app link the record`);
28
+ if (def.type === 'selection' && def.optionsFrom !== undefined)
29
+ report(at, `"${name}" takes its options from elsewhere: a link fills a choice of the page's own options`);
30
+ });
31
+ }
32
+ //# sourceMappingURL=prefill-checks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefill-checks.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/prefill-checks.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAS9H;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,KAAmB;IAC1D,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9E,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC,SAAS,EAAE,6FAA6F,CAAC,CAAC;IACzJ,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC;QACnC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QACpF,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,2DAA2D,CAAC,CAAC;QAC7G,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,aAAa,IAAI,qBAAqB,KAAK,sGAAsG,CAAC,CAAC;QAC/K,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,0DAA0D,CAAC,CAAC;QACrH,IAAI,KAAK,CAAC,OAAO,CAAE,GAA+B,CAAC,SAAS,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,iGAAiG,CAAC,CAAC;QAC5L,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,UAAU,GAAG,CAAC,IAAI,gKAAgK,CAAC,CAAC;QAClP,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS;YAAE,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,qFAAqF,CAAC,CAAC;IAC3K,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,33 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A link's parameter that fills a field as the page opens: the field of its own name, or another (`field`) — a
4
+ * campaign's `utm_source` into `source`, a broker's `agent` into `agent_code`.
5
+ */
6
+ export type PrefillParam = string | {
7
+ param: string;
8
+ field: string;
9
+ };
10
+ /**
11
+ * Fields filled from the link a page is opened with (`prefill` on a page): a campaign's, a broker's, a listing's —
12
+ * `?utm_source=whatsapp&agent=mona&unit=B-12` — with no code of the app's. Each parameter named fills the field of its
13
+ * name, or the `field` it names, as the form starts (a new record, a response, and each started again with Submit
14
+ * another), read as that field reads words: a number as a number, a yes or no, a choice by one of its options' values,
15
+ * a day as 2026-10-20; one that does not read so is left out, never guessed. What the person types afterwards is
16
+ * theirs, and a draft opened over it is too: the link never writes over an answer.
17
+ *
18
+ * "prefill": { "fromUrl": ["utm_source", "utm_campaign", { "param": "agent", "field": "agent_code" }] }
19
+ *
20
+ * A field the page fills so and places nowhere is a hidden field: sent with the answers all the same (a page of
21
+ * responses sends only what its questions show, and these besides), seen by no one. One placed on the page shows the
22
+ * value the link gave, for the person to keep or change.
23
+ */
24
+ export interface PagePrefill {
25
+ /** The link's parameters, by name, each filling the field of its name — or `{ param, field }` where the two differ. */
26
+ fromUrl: PrefillParam[];
27
+ }
28
+ export declare const PagePrefillSchema: z.ZodObject<{
29
+ fromUrl: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
30
+ param: z.ZodString;
31
+ field: z.ZodString;
32
+ }, z.core.$strict>]>>;
33
+ }, z.core.$strict>;
@@ -0,0 +1,33 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A link's parameter that fills a field as the page opens: the field of its own name, or another (`field`) — a
4
+ * campaign's `utm_source` into `source`, a broker's `agent` into `agent_code`.
5
+ */
6
+ export type PrefillParam = string | {
7
+ param: string;
8
+ field: string;
9
+ };
10
+ /**
11
+ * Fields filled from the link a page is opened with (`prefill` on a page): a campaign's, a broker's, a listing's —
12
+ * `?utm_source=whatsapp&agent=mona&unit=B-12` — with no code of the app's. Each parameter named fills the field of its
13
+ * name, or the `field` it names, as the form starts (a new record, a response, and each started again with Submit
14
+ * another), read as that field reads words: a number as a number, a yes or no, a choice by one of its options' values,
15
+ * a day as 2026-10-20; one that does not read so is left out, never guessed. What the person types afterwards is
16
+ * theirs, and a draft opened over it is too: the link never writes over an answer.
17
+ *
18
+ * "prefill": { "fromUrl": ["utm_source", "utm_campaign", { "param": "agent", "field": "agent_code" }] }
19
+ *
20
+ * A field the page fills so and places nowhere is a hidden field: sent with the answers all the same (a page of
21
+ * responses sends only what its questions show, and these besides), seen by no one. One placed on the page shows the
22
+ * value the link gave, for the person to keep or change.
23
+ */
24
+ export interface PagePrefill {
25
+ /** The link's parameters, by name, each filling the field of its name — or `{ param, field }` where the two differ. */
26
+ fromUrl: PrefillParam[];
27
+ }
28
+ export declare const PagePrefillSchema: z.ZodObject<{
29
+ fromUrl: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
30
+ param: z.ZodString;
31
+ field: z.ZodString;
32
+ }, z.z.core.$strict>]>>;
33
+ }, z.z.core.$strict>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PagePrefillSchema = void 0;
4
+ const z = require("zod");
5
+ const names_1 = require("./names");
6
+ const PARAM = /^[A-Za-z0-9_.~-]{1,100}$/;
7
+ exports.PagePrefillSchema = z
8
+ .strictObject({
9
+ fromUrl: z
10
+ .array(z.union([
11
+ z.string().regex(names_1.FIELD_NAME, { error: 'a parameter named alone fills the field of its name: a field’s name ("utm_source"), or { "param": …, "field": … }' }),
12
+ z.strictObject({
13
+ param: z.string().regex(PARAM, { error: 'a link’s parameter is letters, digits and _ . ~ -, at most 100' }),
14
+ field: z.string().regex(names_1.FIELD_NAME),
15
+ }),
16
+ ]))
17
+ .min(1, { error: 'name at least one parameter of the link' }),
18
+ })
19
+ .meta({ id: 'PagePrefill' });
20
+ //# sourceMappingURL=prefill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefill.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/prefill.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAAqC;AA2BrC,MAAM,KAAK,GAAG,0BAA0B,CAAC;AAE5B,QAAA,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,OAAO,EAAE,CAAC;SACP,KAAK,CACJ,CAAC,CAAC,KAAK,CAAC;QACN,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,EAAE,EAAE,KAAK,EAAE,mHAAmH,EAAE,CAAC;QAC5J,CAAC,CAAC,YAAY,CAAC;YACb,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gEAAgE,EAAE,CAAC;YAC3G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC;SACpC,CAAC;KACH,CAAC,CACH;SACA,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE,CAAC;CAChE,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as z from 'zod';
2
+ import { FIELD_NAME } from './names.mjs';
3
+ const PARAM = /^[A-Za-z0-9_.~-]{1,100}$/;
4
+ export const PagePrefillSchema = z
5
+ .strictObject({
6
+ fromUrl: z
7
+ .array(z.union([
8
+ z.string().regex(FIELD_NAME, { error: 'a parameter named alone fills the field of its name: a field’s name ("utm_source"), or { "param": …, "field": … }' }),
9
+ z.strictObject({
10
+ param: z.string().regex(PARAM, { error: 'a link’s parameter is letters, digits and _ . ~ -, at most 100' }),
11
+ field: z.string().regex(FIELD_NAME),
12
+ }),
13
+ ]))
14
+ .min(1, { error: 'name at least one parameter of the link' }),
15
+ })
16
+ .meta({ id: 'PagePrefill' });
17
+ //# sourceMappingURL=prefill.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefill.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/prefill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA2BrC,MAAM,KAAK,GAAG,0BAA0B,CAAC;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,OAAO,EAAE,CAAC;SACP,KAAK,CACJ,CAAC,CAAC,KAAK,CAAC;QACN,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,mHAAmH,EAAE,CAAC;QAC5J,CAAC,CAAC,YAAY,CAAC;YACb,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gEAAgE,EAAE,CAAC;YAC3G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;SACpC,CAAC;KACH,CAAC,CACH;SACA,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE,CAAC;CAChE,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A quiz: a page of responses whose questions have right answers or points, and whose results the person sees
4
+ * (`quiz` on a page). A choice's right answers are its options marked `correct`; a question typed — a word, a number —
5
+ * names the answers it takes (`quiz.answers` on its field). Each right answer earns the question's points (`quiz.points`
6
+ * on its field, else the page's, else 1); a choice whose options carry points (`score`) earns those, as before. Once
7
+ * the answers are sent the person sees their score and each question's answer marked right or wrong, the right answer
8
+ * to one they missed and the question's own feedback — or, with `results: "later"`, that their results come once their
9
+ * answers are reviewed.
10
+ *
11
+ * "quiz": { "results": "now", "points": 1 }
12
+ * "fields": { "reversible": { "type": "selection", "label": "Which filler can be dissolved?",
13
+ * "options": [{ "value": "ha", "label": "Hyaluronic acid", "correct": true }, { "value": "caha", "label": "Calcium hydroxylapatite" }],
14
+ * "quiz": { "feedback": { "right": "Yes: hyaluronidase dissolves it.", "wrong": "Only hyaluronic acid: hyaluronidase dissolves it." } } } }
15
+ *
16
+ * The right answers travel in the page, where a person who reads its JSON finds them. A test where that matters keeps
17
+ * them out of the page and marks the answers on the app's server: its source answers the send with the results
18
+ * (`SubmitResult.quiz`), and the page shows those.
19
+ */
20
+ export interface PageQuiz {
21
+ /** When the person sees their results: as the answers are sent (`now`, the default), or later, once the app has reviewed them. */
22
+ results?: 'now' | 'later';
23
+ /** What a right answer earns where its question says nothing: 1 unless said. */
24
+ points?: number;
25
+ /** Whether a question answered wrongly shows its right answer: true unless false. */
26
+ rightAnswers?: boolean;
27
+ }
28
+ export declare const PageQuizSchema: z.ZodObject<{
29
+ results: z.ZodOptional<z.ZodEnum<{
30
+ now: "now";
31
+ later: "later";
32
+ }>>;
33
+ points: z.ZodOptional<z.ZodNumber>;
34
+ rightAnswers: z.ZodOptional<z.ZodBoolean>;
35
+ }, z.core.$strict>;
36
+ /** What a question of a quiz says of itself (`quiz` on its field): its points, the answers it takes, its feedback. */
37
+ export interface QuizQuestion {
38
+ /** What a right answer earns: the page's `quiz.points` (1 unless said) where left out. */
39
+ points?: number;
40
+ /**
41
+ * A question typed rather than chosen — a word, a number — and the answers it takes: a word as written, whatever its
42
+ * case and the spaces round it; a number as its value.
43
+ */
44
+ answers?: (string | number)[];
45
+ /** Words shown under the question in the results: when its answer was right, and when it was wrong or missing. */
46
+ feedback?: {
47
+ right?: string;
48
+ wrong?: string;
49
+ };
50
+ }
51
+ export declare const QuizQuestionSchema: z.ZodObject<{
52
+ points: z.ZodOptional<z.ZodNumber>;
53
+ answers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
54
+ feedback: z.ZodOptional<z.ZodObject<{
55
+ right: z.ZodOptional<z.ZodString>;
56
+ wrong: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>>;
58
+ }, z.core.$strict>;
@@ -0,0 +1,58 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A quiz: a page of responses whose questions have right answers or points, and whose results the person sees
4
+ * (`quiz` on a page). A choice's right answers are its options marked `correct`; a question typed — a word, a number —
5
+ * names the answers it takes (`quiz.answers` on its field). Each right answer earns the question's points (`quiz.points`
6
+ * on its field, else the page's, else 1); a choice whose options carry points (`score`) earns those, as before. Once
7
+ * the answers are sent the person sees their score and each question's answer marked right or wrong, the right answer
8
+ * to one they missed and the question's own feedback — or, with `results: "later"`, that their results come once their
9
+ * answers are reviewed.
10
+ *
11
+ * "quiz": { "results": "now", "points": 1 }
12
+ * "fields": { "reversible": { "type": "selection", "label": "Which filler can be dissolved?",
13
+ * "options": [{ "value": "ha", "label": "Hyaluronic acid", "correct": true }, { "value": "caha", "label": "Calcium hydroxylapatite" }],
14
+ * "quiz": { "feedback": { "right": "Yes: hyaluronidase dissolves it.", "wrong": "Only hyaluronic acid: hyaluronidase dissolves it." } } } }
15
+ *
16
+ * The right answers travel in the page, where a person who reads its JSON finds them. A test where that matters keeps
17
+ * them out of the page and marks the answers on the app's server: its source answers the send with the results
18
+ * (`SubmitResult.quiz`), and the page shows those.
19
+ */
20
+ export interface PageQuiz {
21
+ /** When the person sees their results: as the answers are sent (`now`, the default), or later, once the app has reviewed them. */
22
+ results?: 'now' | 'later';
23
+ /** What a right answer earns where its question says nothing: 1 unless said. */
24
+ points?: number;
25
+ /** Whether a question answered wrongly shows its right answer: true unless false. */
26
+ rightAnswers?: boolean;
27
+ }
28
+ export declare const PageQuizSchema: z.ZodObject<{
29
+ results: z.ZodOptional<z.ZodEnum<{
30
+ now: "now";
31
+ later: "later";
32
+ }>>;
33
+ points: z.ZodOptional<z.ZodNumber>;
34
+ rightAnswers: z.ZodOptional<z.ZodBoolean>;
35
+ }, z.z.core.$strict>;
36
+ /** What a question of a quiz says of itself (`quiz` on its field): its points, the answers it takes, its feedback. */
37
+ export interface QuizQuestion {
38
+ /** What a right answer earns: the page's `quiz.points` (1 unless said) where left out. */
39
+ points?: number;
40
+ /**
41
+ * A question typed rather than chosen — a word, a number — and the answers it takes: a word as written, whatever its
42
+ * case and the spaces round it; a number as its value.
43
+ */
44
+ answers?: (string | number)[];
45
+ /** Words shown under the question in the results: when its answer was right, and when it was wrong or missing. */
46
+ feedback?: {
47
+ right?: string;
48
+ wrong?: string;
49
+ };
50
+ }
51
+ export declare const QuizQuestionSchema: z.ZodObject<{
52
+ points: z.ZodOptional<z.ZodNumber>;
53
+ answers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
54
+ feedback: z.ZodOptional<z.ZodObject<{
55
+ right: z.ZodOptional<z.ZodString>;
56
+ wrong: z.ZodOptional<z.ZodString>;
57
+ }, z.z.core.$strict>>;
58
+ }, z.z.core.$strict>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuizQuestionSchema = exports.PageQuizSchema = void 0;
4
+ const z = require("zod");
5
+ exports.PageQuizSchema = z
6
+ .strictObject({
7
+ results: z.enum(['now', 'later']).optional(),
8
+ points: z.number().positive().max(1000).optional(),
9
+ rightAnswers: z.boolean().optional(),
10
+ })
11
+ .meta({ id: 'PageQuiz' });
12
+ exports.QuizQuestionSchema = z
13
+ .strictObject({
14
+ points: z.number().positive().max(1000).optional(),
15
+ answers: z.array(z.union([z.string().regex(/\S/, 'an answer is words or a number'), z.number()])).min(1).max(50).optional(),
16
+ feedback: z
17
+ .strictObject({
18
+ right: z.string().regex(/\S/, 'feedback is words').max(2000).optional(),
19
+ wrong: z.string().regex(/\S/, 'feedback is words').max(2000).optional(),
20
+ })
21
+ .optional(),
22
+ })
23
+ .meta({ id: 'QuizQuestion' });
24
+ //# sourceMappingURL=quiz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quiz.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/quiz.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AA6BZ,QAAA,cAAc,GAAG,CAAC;KAC5B,YAAY,CAAC;IACZ,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAClD,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AAef,QAAA,kBAAkB,GAAG,CAAC;KAChC,YAAY,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAClD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,gCAAgC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3H,QAAQ,EAAE,CAAC;SACR,YAAY,CAAC;QACZ,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;KACxE,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import * as z from 'zod';
2
+ export const PageQuizSchema = z
3
+ .strictObject({
4
+ results: z.enum(['now', 'later']).optional(),
5
+ points: z.number().positive().max(1000).optional(),
6
+ rightAnswers: z.boolean().optional(),
7
+ })
8
+ .meta({ id: 'PageQuiz' });
9
+ export const QuizQuestionSchema = z
10
+ .strictObject({
11
+ points: z.number().positive().max(1000).optional(),
12
+ answers: z.array(z.union([z.string().regex(/\S/, 'an answer is words or a number'), z.number()])).min(1).max(50).optional(),
13
+ feedback: z
14
+ .strictObject({
15
+ right: z.string().regex(/\S/, 'feedback is words').max(2000).optional(),
16
+ wrong: z.string().regex(/\S/, 'feedback is words').max(2000).optional(),
17
+ })
18
+ .optional(),
19
+ })
20
+ .meta({ id: 'QuizQuestion' });
21
+ //# sourceMappingURL=quiz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quiz.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/quiz.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA6BzB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,YAAY,CAAC;IACZ,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAClD,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AAe5B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,YAAY,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAClD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,gCAAgC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3H,QAAQ,EAAE,CAAC;SACR,YAAY,CAAC;QACZ,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;KACxE,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC"}
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PageRecordsSchema = void 0;
4
4
  const z = require("zod");
5
+ const jitless_1 = require("./jitless");
6
+ // zod compiles no code for these schemas: a strict Content-Security-Policy refuses it (jitless.ts).
7
+ (0, jitless_1.makeSchemasJitless)();
5
8
  /**
6
9
  * What a page's records are called (`records` on a page), so Fieldia's own sentences name them as the business does:
7
10
  * "A customer with this phone already exists", "17 customers imported", "Are you sure you want to delete this
@@ -1 +1 @@
1
- {"version":3,"file":"records.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/records.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AAEzB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,yDAAyD,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,2EAA2E,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1H,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"records.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/records.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,uCAA+C;AAE/C,oGAAoG;AACpG,IAAA,4BAAkB,GAAE,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,yDAAyD,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,2EAA2E,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1H,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
@@ -1,4 +1,7 @@
1
1
  import * as z from 'zod';
2
+ import { makeSchemasJitless } from './jitless.mjs';
3
+ // zod compiles no code for these schemas: a strict Content-Security-Policy refuses it (jitless.ts).
4
+ makeSchemasJitless();
2
5
  /**
3
6
  * What a page's records are called (`records` on a page), so Fieldia's own sentences name them as the business does:
4
7
  * "A customer with this phone already exists", "17 customers imported", "Are you sure you want to delete this
@@ -1 +1 @@
1
- {"version":3,"file":"records.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,yDAAyD,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,2EAA2E,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1H,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"records.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,oGAAoG;AACpG,kBAAkB,EAAE,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,YAAY,CAAC;IACZ,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,yDAAyD,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,2EAA2E,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1H,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
@@ -160,7 +160,7 @@ export declare class ReferenceCheck {
160
160
  private checkCurrency;
161
161
  /** The tools a table of lines' checks are handed (table-checks.ts). */
162
162
  private tableTools;
163
- /** The tools a part's checks of a field are handed (part-checks.ts). */
163
+ /** The tools a part's checks are handed (part-checks.ts): a field's, and the reading of conditions. */
164
164
  private fieldTools;
165
165
  /** The tools a map's checks are handed (map-checks.ts). */
166
166
  private mapTools;
@@ -160,7 +160,7 @@ export declare class ReferenceCheck {
160
160
  private checkCurrency;
161
161
  /** The tools a table of lines' checks are handed (table-checks.ts). */
162
162
  private tableTools;
163
- /** The tools a part's checks of a field are handed (part-checks.ts). */
163
+ /** The tools a part's checks are handed (part-checks.ts): a field's, and the reading of conditions. */
164
164
  private fieldTools;
165
165
  /** The tools a map's checks are handed (map-checks.ts). */
166
166
  private mapTools;
@@ -24,14 +24,22 @@ const seats_checks_1 = require("./seats-checks");
24
24
  const list_checks_1 = require("./list-checks");
25
25
  const editable_checks_1 = require("./editable-checks");
26
26
  const slots_checks_1 = require("./slots-checks");
27
+ const schedule_checks_1 = require("./schedule-checks");
28
+ const templates_checks_1 = require("./templates-checks");
27
29
  const signature_checks_1 = require("./signature-checks");
28
30
  const assist_checks_1 = require("./assist-checks");
29
31
  const scan_checks_1 = require("./scan-checks");
30
32
  const endings_checks_1 = require("./endings-checks");
33
+ const flow_checks_1 = require("./flow-checks");
34
+ const survey_1 = require("../record/survey");
31
35
  const map_checks_1 = require("./map-checks");
32
36
  const table_checks_1 = require("./table-checks");
33
37
  const statusbar_checks_1 = require("./statusbar-checks");
34
38
  const option_checks_1 = require("./option-checks");
39
+ const prefill_checks_1 = require("./prefill-checks");
40
+ const verify_checks_1 = require("./verify-checks");
41
+ const payment_checks_1 = require("./payment-checks");
42
+ const outbox_checks_1 = require("./outbox-checks");
35
43
  const has = (record, key) => Object.prototype.hasOwnProperty.call(record, key);
36
44
  /** Whether a field, or a column of its table, is scanned into with the camera (`options.scan`). */
37
45
  const scansAny = (node) => [node, ...Object.values(node.cells ?? {})].some((one) => one?.options?.['scan'] !== undefined);
@@ -102,16 +110,35 @@ class ReferenceCheck {
102
110
  this.checkDuplicates(this.page);
103
111
  if (this.page.records !== undefined && !this.line)
104
112
  this.checkRecords(this.page.records);
113
+ // The settings of the parts that join a form — its link's fields, its payment, its outbox: in the one-tag script, each
114
+ // one's checks come with its part, which a page with it asks for.
115
+ if (!this.line) {
116
+ const tools = this.fieldTools();
117
+ if (this.page.prefill !== undefined)
118
+ (0, prefill_checks_1.checkPrefill)(this.page, tools);
119
+ if (this.page.payment !== undefined)
120
+ (0, payment_checks_1.checkPayment)(this.page, tools);
121
+ if (this.page.outbox)
122
+ (0, outbox_checks_1.checkOutbox)(this.page, tools);
123
+ }
105
124
  if (this.page.endings !== undefined && !this.line) {
106
125
  if (this.page.data.kind !== 'responses')
107
126
  this.report('endings', 'endings are for a page of responses, shown once it is sent');
108
127
  // Each ending: in the one-tag script, its checks come with the answers part, which a page with any asks for.
109
128
  if (Array.isArray(this.page.endings) && this.page.endings.length)
110
- (0, endings_checks_1.checkEndings)(this.page, { ...this.fieldTools(), checkModifiers: (owner, path, keys) => this.checkModifiers(owner, path, keys), checkWords: (owner, path, keys, sent) => this.checkWords(owner, path, keys, sent) });
129
+ (0, endings_checks_1.checkEndings)(this.page, { ...this.fieldTools(), checkWords: (owner, path, keys, sent) => this.checkWords(owner, path, keys, sent) });
111
130
  }
131
+ const owing = { report: (path, message) => this.report(path, message), owe: (part) => void this.later.add(part) };
112
132
  // A page's limits and Continue later: checked where it has either (in the one-tag script, by the limits part it asks for).
133
+ // Templates people save: in the one-tag script, checked by the templates part a page with them asks for.
134
+ if (!this.line && this.page.templates)
135
+ (0, templates_checks_1.checkTemplates)(this.fieldTools());
113
136
  if (!this.line && (this.page.limits !== undefined || this.page.continueLater !== undefined))
114
- (0, limits_checks_1.checkLimits)(this.page, { report: (path, message) => this.report(path, message), owe: (part) => this.later.add(part) });
137
+ (0, limits_checks_1.checkLimits)(this.page, owing);
138
+ // A survey's flow — a quiz and each question's own, a review, one at a time, a draw, a time limit — checked where the
139
+ // page has any (in the one-tag script, by the survey flow's part it asks for).
140
+ if (!this.line && ((0, survey_1.surveyFlow)(this.page) || JSON.stringify(this.page.fields).includes('"quiz":')))
141
+ (0, flow_checks_1.checkSurveyFlow)(this.page, owing);
115
142
  // A record's approvals: checked where it has them (in the one-tag script, by the approvals part it asks for).
116
143
  if (!this.line && this.page.approval !== undefined)
117
144
  (0, approval_checks_1.checkApproval)(this.page, this.fieldTools());
@@ -503,7 +530,7 @@ class ReferenceCheck {
503
530
  // Options by condition, or carried from an earlier question: in the one-tag script, checked by the options part a
504
531
  // page with any asks for.
505
532
  if ((0, choice_options_1.changesOptions)(def))
506
- (0, option_checks_1.checkOptionRules)(name, def, path, fields, scope, { ...this.fieldTools(), checkModifiers: (owner, at, keys, inside) => this.checkModifiers(owner, at, keys, inside) });
533
+ (0, option_checks_1.checkOptionRules)(name, def, path, fields, scope, this.fieldTools());
507
534
  }
508
535
  checkFields(fields, base, lines, parent) {
509
536
  const scope = { fields, lines, ...(parent ? { parent } : {}) };
@@ -621,13 +648,18 @@ class ReferenceCheck {
621
648
  return {
622
649
  ...this.fieldTools(),
623
650
  claim: (id, path) => this.claim(id, path),
624
- checkModifiers: (owner, path, keys, scope) => this.checkModifiers(owner, path, keys, scope),
625
651
  checkPress: (button, path) => this.checkPress(button, path),
626
652
  };
627
653
  }
628
- /** The tools a part's checks of a field are handed (part-checks.ts). */
654
+ /** The tools a part's checks are handed (part-checks.ts): a field's, and the reading of conditions. */
629
655
  fieldTools() {
630
- return { page: this.page, need: (name, path, scope) => this.need(name, path, scope), report: (path, message) => this.report(path, message), owe: (part) => this.later.add(part) };
656
+ return {
657
+ page: this.page,
658
+ need: (name, path, scope) => this.need(name, path, scope),
659
+ report: (path, message) => this.report(path, message),
660
+ owe: (part) => this.later.add(part),
661
+ checkModifiers: (owner, path, keys, scope) => this.checkModifiers(owner, path, keys, scope),
662
+ };
631
663
  }
632
664
  /** The tools a map's checks are handed (map-checks.ts). */
633
665
  mapTools() {
@@ -776,7 +808,7 @@ class ReferenceCheck {
776
808
  }
777
809
  // A statusbar, drawn by the business part, whose checks come with it in the one-tag script.
778
810
  if (sheet.statusbar)
779
- (0, statusbar_checks_1.checkStatusbar)(sheet.statusbar, path, { ...this.fieldTools(), checkModifiers: (owner, at, keys) => this.checkModifiers(owner, at, keys) });
811
+ (0, statusbar_checks_1.checkStatusbar)(sheet.statusbar, path, this.fieldTools());
780
812
  sheet.buttons?.forEach((button, i) => {
781
813
  this.claim(button.id, `${path}.buttons[${i}]`);
782
814
  this.checkModifiers(button, `${path}.buttons[${i}]`);
@@ -909,6 +941,9 @@ class ReferenceCheck {
909
941
  this.report(`${path}.widget`, `slots is for a datetime field; "${node.field}" is a ${def.type}`);
910
942
  else if (node.widget === 'slots')
911
943
  (0, slots_checks_1.checkSlots)(node, path, this.fieldTools());
944
+ // A repeat rule, a week's opening hours: the schedule part's, as their checks are in the one-tag script.
945
+ if (node.widget === 'repeat' || node.widget === 'hours')
946
+ (0, schedule_checks_1.checkSchedule)(node, def, path, this.fieldTools());
912
947
  if (node.widget === 'signature' && def && def.type !== 'binary')
913
948
  this.report(`${path}.widget`, `signature is for a binary field; "${node.field}" is a ${def.type}`);
914
949
  else if (node.widget === 'signature')
@@ -919,6 +954,20 @@ class ReferenceCheck {
919
954
  // A photo set is a picture field's of several photos: one photo has no order, no cover.
920
955
  if (node.widget === 'photos' && def && (def.type !== 'image' || !def.multiple))
921
956
  this.report(`${path}.widget`, `photos is for an image field of several photos (multiple); "${node.field}" is not one`);
957
+ // A value shown as a code: a QR code holds words, a barcode words or a whole number; pins on a picture are a json's.
958
+ const codes = { qrcode: ['char', 'text'], barcode: ['char', 'integer'], pins: ['json'] };
959
+ if (def && node.widget && codes[node.widget] && !codes[node.widget].includes(def.type))
960
+ this.report(`${path}.widget`, `${node.widget} is for a ${codes[node.widget].join(' or ')} field; "${node.field}" is a ${def.type}`);
961
+ // A file field that records a voice note or a film: its checks come with the files part, which draws it.
962
+ const records = node.options?.['record'] !== undefined || node.options?.['maxSeconds'] !== undefined;
963
+ if (records && def && def.type !== 'binary')
964
+ this.report(`${path}.options.record`, `record is for a binary field; "${node.field}" is a ${def.type}`);
965
+ else if (records && def)
966
+ (0, signature_checks_1.checkRecording)(node, def, path, this.fieldTools());
967
+ // Proof of an email or a phone by a code (`options.verify`), drawn by the verify part, whose checks come with it in the one-tag script.
968
+ // Asked as the page asks for the verify part (`formJoins`): `false` asks for none, and needs no check.
969
+ if (node.options?.['verify'] !== undefined && node.options['verify'] !== false)
970
+ (0, verify_checks_1.checkVerify)(node, def, path, !!this.line, this.fieldTools());
922
971
  if (def)
923
972
  this.checkPicker(node, def, path);
924
973
  // Scanned into with the camera — the field, or a table's columns: checked with the scan part's code, which draws it.