@fieldia/core 0.30.1 → 0.31.1
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.
- package/README.md +373 -1
- package/package.json +1 -1
- package/schema/page.schema.json +758 -1
- package/src/index.d.mts +13 -2
- package/src/index.d.ts +13 -2
- package/src/index.js +45 -2
- package/src/index.js.map +1 -1
- package/src/index.mjs +18 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/format/actions.d.mts +16 -16
- package/src/lib/format/actions.d.ts +16 -16
- package/src/lib/format/actions.js +3 -0
- package/src/lib/format/actions.js.map +1 -1
- package/src/lib/format/actions.mjs +3 -0
- package/src/lib/format/actions.mjs.map +1 -1
- package/src/lib/format/address-search.js +3 -0
- package/src/lib/format/address-search.js.map +1 -1
- package/src/lib/format/address-search.mjs +3 -0
- package/src/lib/format/address-search.mjs.map +1 -1
- package/src/lib/format/duplicates.js +3 -0
- package/src/lib/format/duplicates.js.map +1 -1
- package/src/lib/format/duplicates.mjs +3 -0
- package/src/lib/format/duplicates.mjs.map +1 -1
- package/src/lib/format/endings.js +3 -0
- package/src/lib/format/endings.js.map +1 -1
- package/src/lib/format/endings.mjs +3 -0
- package/src/lib/format/endings.mjs.map +1 -1
- package/src/lib/format/field.d.mts +669 -0
- package/src/lib/format/field.d.ts +669 -0
- package/src/lib/format/field.js +42 -4
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +42 -4
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/flow-checks.d.mts +14 -0
- package/src/lib/format/flow-checks.d.ts +14 -0
- package/src/lib/format/flow-checks.js +61 -0
- package/src/lib/format/flow-checks.js.map +1 -0
- package/src/lib/format/flow-checks.mjs +58 -0
- package/src/lib/format/flow-checks.mjs.map +1 -0
- package/src/lib/format/flow.d.mts +43 -0
- package/src/lib/format/flow.d.ts +43 -0
- package/src/lib/format/flow.js +22 -0
- package/src/lib/format/flow.js.map +1 -0
- package/src/lib/format/flow.mjs +19 -0
- package/src/lib/format/flow.mjs.map +1 -0
- package/src/lib/format/from-schema.d.mts +70 -0
- package/src/lib/format/from-schema.d.ts +70 -0
- package/src/lib/format/from-schema.js +599 -0
- package/src/lib/format/from-schema.js.map +1 -0
- package/src/lib/format/from-schema.mjs +591 -0
- package/src/lib/format/from-schema.mjs.map +1 -0
- package/src/lib/format/jitless.d.mts +1 -0
- package/src/lib/format/jitless.d.ts +1 -0
- package/src/lib/format/jitless.js +27 -0
- package/src/lib/format/jitless.js.map +1 -0
- package/src/lib/format/jitless.mjs +24 -0
- package/src/lib/format/jitless.mjs.map +1 -0
- package/src/lib/format/json-schema.js +3 -0
- package/src/lib/format/json-schema.js.map +1 -1
- package/src/lib/format/json-schema.mjs +3 -0
- package/src/lib/format/json-schema.mjs.map +1 -1
- package/src/lib/format/json.js +3 -0
- package/src/lib/format/json.js.map +1 -1
- package/src/lib/format/json.mjs +3 -0
- package/src/lib/format/json.mjs.map +1 -1
- package/src/lib/format/languages-checks.d.mts +2 -1
- package/src/lib/format/languages-checks.d.ts +2 -1
- package/src/lib/format/languages-checks.js +8 -2
- package/src/lib/format/languages-checks.js.map +1 -1
- package/src/lib/format/languages-checks.mjs +8 -2
- package/src/lib/format/languages-checks.mjs.map +1 -1
- package/src/lib/format/later-checks.d.mts +3 -1
- package/src/lib/format/later-checks.d.ts +3 -1
- package/src/lib/format/later-checks.js +3 -1
- package/src/lib/format/later-checks.js.map +1 -1
- package/src/lib/format/later-checks.mjs +3 -1
- package/src/lib/format/later-checks.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +13192 -7550
- package/src/lib/format/layout.d.ts +13192 -7550
- package/src/lib/format/layout.js +61 -3
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +59 -1
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/layout.types.d.mts +3 -1
- package/src/lib/format/layout.types.d.ts +3 -1
- package/src/lib/format/limits.js +3 -0
- package/src/lib/format/limits.js.map +1 -1
- package/src/lib/format/limits.mjs +3 -0
- package/src/lib/format/limits.mjs.map +1 -1
- package/src/lib/format/list-checks.d.mts +1 -1
- package/src/lib/format/list-checks.d.ts +1 -1
- package/src/lib/format/list-checks.js +67 -22
- package/src/lib/format/list-checks.js.map +1 -1
- package/src/lib/format/list-checks.mjs +67 -22
- package/src/lib/format/list-checks.mjs.map +1 -1
- package/src/lib/format/list-rows-checks.d.mts +11 -0
- package/src/lib/format/list-rows-checks.d.ts +11 -0
- package/src/lib/format/list-rows-checks.js +62 -0
- package/src/lib/format/list-rows-checks.js.map +1 -0
- package/src/lib/format/list-rows-checks.mjs +59 -0
- package/src/lib/format/list-rows-checks.mjs.map +1 -0
- package/src/lib/format/media-options.d.mts +84 -0
- package/src/lib/format/media-options.d.ts +84 -0
- package/src/lib/format/media-options.js +86 -0
- package/src/lib/format/media-options.js.map +1 -0
- package/src/lib/format/media-options.mjs +80 -0
- package/src/lib/format/media-options.mjs.map +1 -0
- package/src/lib/format/outbox-checks.d.mts +11 -0
- package/src/lib/format/outbox-checks.d.ts +11 -0
- package/src/lib/format/outbox-checks.js +12 -0
- package/src/lib/format/outbox-checks.js.map +1 -0
- package/src/lib/format/outbox-checks.mjs +9 -0
- package/src/lib/format/outbox-checks.mjs.map +1 -0
- package/src/lib/format/page.d.mts +3057 -966
- package/src/lib/format/page.d.ts +3057 -966
- package/src/lib/format/page.js +15 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +15 -0
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/part-checks.d.mts +3 -0
- package/src/lib/format/part-checks.d.ts +3 -0
- package/src/lib/format/payment-checks.d.mts +13 -0
- package/src/lib/format/payment-checks.d.ts +13 -0
- package/src/lib/format/payment-checks.js +30 -0
- package/src/lib/format/payment-checks.js.map +1 -0
- package/src/lib/format/payment-checks.mjs +27 -0
- package/src/lib/format/payment-checks.mjs.map +1 -0
- package/src/lib/format/payment.d.mts +37 -0
- package/src/lib/format/payment.d.ts +37 -0
- package/src/lib/format/payment.js +15 -0
- package/src/lib/format/payment.js.map +1 -0
- package/src/lib/format/payment.mjs +12 -0
- package/src/lib/format/payment.mjs.map +1 -0
- package/src/lib/format/phone.js +3 -0
- package/src/lib/format/phone.js.map +1 -1
- package/src/lib/format/phone.mjs +3 -0
- package/src/lib/format/phone.mjs.map +1 -1
- package/src/lib/format/picker-options.d.mts +12 -0
- package/src/lib/format/picker-options.d.ts +12 -0
- package/src/lib/format/picker-options.js +21 -3
- package/src/lib/format/picker-options.js.map +1 -1
- package/src/lib/format/picker-options.mjs +20 -2
- package/src/lib/format/picker-options.mjs.map +1 -1
- package/src/lib/format/prefill-checks.d.mts +13 -0
- package/src/lib/format/prefill-checks.d.ts +13 -0
- package/src/lib/format/prefill-checks.js +35 -0
- package/src/lib/format/prefill-checks.js.map +1 -0
- package/src/lib/format/prefill-checks.mjs +32 -0
- package/src/lib/format/prefill-checks.mjs.map +1 -0
- package/src/lib/format/prefill.d.mts +33 -0
- package/src/lib/format/prefill.d.ts +33 -0
- package/src/lib/format/prefill.js +20 -0
- package/src/lib/format/prefill.js.map +1 -0
- package/src/lib/format/prefill.mjs +17 -0
- package/src/lib/format/prefill.mjs.map +1 -0
- package/src/lib/format/quiz.d.mts +58 -0
- package/src/lib/format/quiz.d.ts +58 -0
- package/src/lib/format/quiz.js +24 -0
- package/src/lib/format/quiz.js.map +1 -0
- package/src/lib/format/quiz.mjs +21 -0
- package/src/lib/format/quiz.mjs.map +1 -0
- package/src/lib/format/records.js +3 -0
- package/src/lib/format/records.js.map +1 -1
- package/src/lib/format/records.mjs +3 -0
- package/src/lib/format/records.mjs.map +1 -1
- package/src/lib/format/references.d.mts +1 -1
- package/src/lib/format/references.d.ts +1 -1
- package/src/lib/format/references.js +56 -7
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +57 -8
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/schedule-checks.d.mts +8 -0
- package/src/lib/format/schedule-checks.d.ts +8 -0
- package/src/lib/format/schedule-checks.js +16 -0
- package/src/lib/format/schedule-checks.js.map +1 -0
- package/src/lib/format/schedule-checks.mjs +13 -0
- package/src/lib/format/schedule-checks.mjs.map +1 -0
- package/src/lib/format/signature-checks.d.mts +8 -0
- package/src/lib/format/signature-checks.d.ts +8 -0
- package/src/lib/format/signature-checks.js +21 -0
- package/src/lib/format/signature-checks.js.map +1 -1
- package/src/lib/format/signature-checks.mjs +20 -0
- package/src/lib/format/signature-checks.mjs.map +1 -1
- package/src/lib/format/signature-options.js +3 -0
- package/src/lib/format/signature-options.js.map +1 -1
- package/src/lib/format/signature-options.mjs +3 -0
- package/src/lib/format/signature-options.mjs.map +1 -1
- package/src/lib/format/slots-options.js +3 -0
- package/src/lib/format/slots-options.js.map +1 -1
- package/src/lib/format/slots-options.mjs +3 -0
- package/src/lib/format/slots-options.mjs.map +1 -1
- package/src/lib/format/templates-checks.d.mts +6 -0
- package/src/lib/format/templates-checks.d.ts +6 -0
- package/src/lib/format/templates-checks.js +16 -0
- package/src/lib/format/templates-checks.js.map +1 -0
- package/src/lib/format/templates-checks.mjs +13 -0
- package/src/lib/format/templates-checks.mjs.map +1 -0
- package/src/lib/format/translate.d.mts +2 -0
- package/src/lib/format/translate.d.ts +2 -0
- package/src/lib/format/translate.js +6 -2
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +4 -2
- package/src/lib/format/translate.mjs.map +1 -1
- package/src/lib/format/typed-options.d.mts +43 -0
- package/src/lib/format/typed-options.d.ts +43 -0
- package/src/lib/format/typed-options.js +50 -0
- package/src/lib/format/typed-options.js.map +1 -0
- package/src/lib/format/typed-options.mjs +46 -0
- package/src/lib/format/typed-options.mjs.map +1 -0
- package/src/lib/format/upgrade.d.mts +5 -1
- package/src/lib/format/upgrade.d.ts +5 -1
- package/src/lib/format/upgrade.js +5 -1
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +5 -1
- package/src/lib/format/upgrade.mjs.map +1 -1
- package/src/lib/format/validate.js +3 -0
- package/src/lib/format/validate.js.map +1 -1
- package/src/lib/format/validate.mjs +3 -0
- package/src/lib/format/validate.mjs.map +1 -1
- package/src/lib/format/verify-checks.d.mts +10 -0
- package/src/lib/format/verify-checks.d.ts +10 -0
- package/src/lib/format/verify-checks.js +44 -0
- package/src/lib/format/verify-checks.js.map +1 -0
- package/src/lib/format/verify-checks.mjs +41 -0
- package/src/lib/format/verify-checks.mjs.map +1 -0
- package/src/lib/format/version.d.mts +2 -2
- package/src/lib/format/version.d.ts +2 -2
- package/src/lib/format/version.js +2 -2
- package/src/lib/format/version.js.map +1 -1
- package/src/lib/format/version.mjs +2 -2
- package/src/lib/format/version.mjs.map +1 -1
- package/src/lib/format/week.d.mts +18 -0
- package/src/lib/format/week.d.ts +18 -0
- package/src/lib/format/week.js +58 -0
- package/src/lib/format/week.js.map +1 -0
- package/src/lib/format/week.mjs +55 -0
- package/src/lib/format/week.mjs.map +1 -0
- package/src/lib/record/approvals-part.d.mts +1 -1
- package/src/lib/record/approvals-part.d.ts +1 -1
- package/src/lib/record/approvals-part.js +2 -2
- package/src/lib/record/approvals-part.js.map +1 -1
- package/src/lib/record/approvals-part.mjs +1 -1
- package/src/lib/record/approvals-part.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +348 -5
- package/src/lib/record/data-source.d.ts +348 -5
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/day-words.d.mts +22 -1
- package/src/lib/record/day-words.d.ts +22 -1
- package/src/lib/record/day-words.js +29 -2
- package/src/lib/record/day-words.js.map +1 -1
- package/src/lib/record/day-words.mjs +24 -2
- package/src/lib/record/day-words.mjs.map +1 -1
- package/src/lib/record/drafts.d.mts +9 -0
- package/src/lib/record/drafts.d.ts +9 -0
- package/src/lib/record/drafts.js +20 -0
- package/src/lib/record/drafts.js.map +1 -1
- package/src/lib/record/drafts.mjs +19 -0
- package/src/lib/record/drafts.mjs.map +1 -1
- package/src/lib/record/files-part.d.mts +1 -0
- package/src/lib/record/files-part.d.ts +1 -0
- package/src/lib/record/files-part.js +7 -1
- package/src/lib/record/files-part.js.map +1 -1
- package/src/lib/record/files-part.mjs +5 -1
- package/src/lib/record/files-part.mjs.map +1 -1
- package/src/lib/record/form-approvals.d.mts +12 -17
- package/src/lib/record/form-approvals.d.ts +12 -17
- package/src/lib/record/form-approvals.js +19 -9
- package/src/lib/record/form-approvals.js.map +1 -1
- package/src/lib/record/form-approvals.mjs +18 -8
- package/src/lib/record/form-approvals.mjs.map +1 -1
- package/src/lib/record/form-limits.d.mts +4 -28
- package/src/lib/record/form-limits.d.ts +4 -28
- package/src/lib/record/form-limits.js +8 -5
- package/src/lib/record/form-limits.js.map +1 -1
- package/src/lib/record/form-limits.mjs +8 -5
- package/src/lib/record/form-limits.mjs.map +1 -1
- package/src/lib/record/form.d.mts +118 -3
- package/src/lib/record/form.d.ts +118 -3
- package/src/lib/record/form.js +283 -75
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +285 -77
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/history-steps.d.mts +38 -0
- package/src/lib/record/history-steps.d.ts +38 -0
- package/src/lib/record/history-steps.js +63 -0
- package/src/lib/record/history-steps.js.map +1 -0
- package/src/lib/record/history-steps.mjs +58 -0
- package/src/lib/record/history-steps.mjs.map +1 -0
- package/src/lib/record/history.d.mts +16 -0
- package/src/lib/record/history.d.ts +16 -0
- package/src/lib/record/history.js +3 -0
- package/src/lib/record/history.js.map +1 -0
- package/src/lib/record/history.mjs +2 -0
- package/src/lib/record/history.mjs.map +1 -0
- package/src/lib/record/input-rules.d.mts +2 -0
- package/src/lib/record/input-rules.d.ts +2 -0
- package/src/lib/record/input-rules.js +4 -1
- package/src/lib/record/input-rules.js.map +1 -1
- package/src/lib/record/input-rules.mjs +2 -0
- package/src/lib/record/input-rules.mjs.map +1 -1
- package/src/lib/record/joins.d.mts +143 -0
- package/src/lib/record/joins.d.ts +143 -0
- package/src/lib/record/joins.js +28 -0
- package/src/lib/record/joins.js.map +1 -0
- package/src/lib/record/joins.mjs +24 -0
- package/src/lib/record/joins.mjs.map +1 -0
- package/src/lib/record/limits.js +7 -4
- package/src/lib/record/limits.js.map +1 -1
- package/src/lib/record/limits.mjs +8 -5
- package/src/lib/record/limits.mjs.map +1 -1
- package/src/lib/record/link-values.d.mts +31 -0
- package/src/lib/record/link-values.d.ts +31 -0
- package/src/lib/record/link-values.js +132 -0
- package/src/lib/record/link-values.js.map +1 -0
- package/src/lib/record/link-values.mjs +125 -0
- package/src/lib/record/link-values.mjs.map +1 -0
- package/src/lib/record/live-later.d.mts +15 -0
- package/src/lib/record/live-later.d.ts +15 -0
- package/src/lib/record/live-later.js +10 -0
- package/src/lib/record/live-later.js.map +1 -0
- package/src/lib/record/live-later.mjs +7 -0
- package/src/lib/record/live-later.mjs.map +1 -0
- package/src/lib/record/live-part.d.mts +6 -0
- package/src/lib/record/live-part.d.ts +6 -0
- package/src/lib/record/live-part.js +12 -0
- package/src/lib/record/live-part.js.map +1 -0
- package/src/lib/record/live-part.mjs +7 -0
- package/src/lib/record/live-part.mjs.map +1 -0
- package/src/lib/record/live.d.mts +8 -0
- package/src/lib/record/live.d.ts +8 -0
- package/src/lib/record/live.js +133 -0
- package/src/lib/record/live.js.map +1 -0
- package/src/lib/record/live.mjs +129 -0
- package/src/lib/record/live.mjs.map +1 -0
- package/src/lib/record/locales/all.d.mts +5 -5
- package/src/lib/record/locales/all.d.ts +5 -5
- package/src/lib/record/locales/all.js +3 -3
- package/src/lib/record/locales/all.js.map +1 -1
- package/src/lib/record/locales/all.mjs +3 -3
- package/src/lib/record/locales/all.mjs.map +1 -1
- package/src/lib/record/locales/ar.js +8 -0
- package/src/lib/record/locales/ar.js.map +1 -1
- package/src/lib/record/locales/ar.mjs +8 -0
- package/src/lib/record/locales/ar.mjs.map +1 -1
- package/src/lib/record/locales/de.js +8 -0
- package/src/lib/record/locales/de.js.map +1 -1
- package/src/lib/record/locales/de.mjs +8 -0
- package/src/lib/record/locales/de.mjs.map +1 -1
- package/src/lib/record/locales/es.d.mts +8 -0
- package/src/lib/record/locales/es.d.ts +8 -0
- package/src/lib/record/locales/es.js +111 -0
- package/src/lib/record/locales/es.js.map +1 -0
- package/src/lib/record/locales/es.mjs +108 -0
- package/src/lib/record/locales/es.mjs.map +1 -0
- package/src/lib/record/locales/fa.d.mts +5 -0
- package/src/lib/record/locales/fa.d.ts +5 -0
- package/src/lib/record/locales/fa.js +117 -0
- package/src/lib/record/locales/fa.js.map +1 -0
- package/src/lib/record/locales/fa.mjs +114 -0
- package/src/lib/record/locales/fa.mjs.map +1 -0
- package/src/lib/record/locales/fr.js +8 -0
- package/src/lib/record/locales/fr.js.map +1 -1
- package/src/lib/record/locales/fr.mjs +8 -0
- package/src/lib/record/locales/fr.mjs.map +1 -1
- package/src/lib/record/locales/later.d.mts +8 -0
- package/src/lib/record/locales/later.d.ts +8 -0
- package/src/lib/record/locales/later.js +16 -0
- package/src/lib/record/locales/later.js.map +1 -0
- package/src/lib/record/locales/later.mjs +13 -0
- package/src/lib/record/locales/later.mjs.map +1 -0
- package/src/lib/record/locales/tr.d.mts +6 -0
- package/src/lib/record/locales/tr.d.ts +6 -0
- package/src/lib/record/locales/tr.js +118 -0
- package/src/lib/record/locales/tr.js.map +1 -0
- package/src/lib/record/locales/tr.mjs +115 -0
- package/src/lib/record/locales/tr.mjs.map +1 -0
- package/src/lib/record/locales/ur.d.mts +9 -0
- package/src/lib/record/locales/ur.d.ts +9 -0
- package/src/lib/record/locales/ur.js +118 -0
- package/src/lib/record/locales/ur.js.map +1 -0
- package/src/lib/record/locales/ur.mjs +115 -0
- package/src/lib/record/locales/ur.mjs.map +1 -0
- package/src/lib/record/memory-approvals.d.mts +4 -1
- package/src/lib/record/memory-approvals.d.ts +4 -1
- package/src/lib/record/memory-approvals.js +29 -0
- package/src/lib/record/memory-approvals.js.map +1 -1
- package/src/lib/record/memory-approvals.mjs +29 -0
- package/src/lib/record/memory-approvals.mjs.map +1 -1
- package/src/lib/record/memory-codes.d.mts +37 -0
- package/src/lib/record/memory-codes.d.ts +37 -0
- package/src/lib/record/memory-codes.js +50 -0
- package/src/lib/record/memory-codes.js.map +1 -0
- package/src/lib/record/memory-codes.mjs +47 -0
- package/src/lib/record/memory-codes.mjs.map +1 -0
- package/src/lib/record/memory-data-source.d.mts +56 -2
- package/src/lib/record/memory-data-source.d.ts +56 -2
- package/src/lib/record/memory-data-source.js +80 -2
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +80 -2
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-kept.d.mts +3 -1
- package/src/lib/record/memory-kept.d.ts +3 -1
- package/src/lib/record/memory-kept.js +7 -2
- package/src/lib/record/memory-kept.js.map +1 -1
- package/src/lib/record/memory-kept.mjs +7 -2
- package/src/lib/record/memory-kept.mjs.map +1 -1
- package/src/lib/record/memory-later.d.mts +3 -1
- package/src/lib/record/memory-later.d.ts +3 -1
- package/src/lib/record/memory-later.js +9 -5
- package/src/lib/record/memory-later.js.map +1 -1
- package/src/lib/record/memory-later.mjs +8 -4
- package/src/lib/record/memory-later.mjs.map +1 -1
- package/src/lib/record/memory-live.d.mts +8 -0
- package/src/lib/record/memory-live.d.ts +8 -0
- package/src/lib/record/memory-live.js +70 -0
- package/src/lib/record/memory-live.js.map +1 -0
- package/src/lib/record/memory-live.mjs +67 -0
- package/src/lib/record/memory-live.mjs.map +1 -0
- package/src/lib/record/memory-views.d.mts +11 -0
- package/src/lib/record/memory-views.d.ts +11 -0
- package/src/lib/record/memory-views.js +68 -0
- package/src/lib/record/memory-views.js.map +1 -0
- package/src/lib/record/memory-views.mjs +65 -0
- package/src/lib/record/memory-views.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +21 -3
- package/src/lib/record/messages.d.ts +21 -3
- package/src/lib/record/messages.js +15 -2
- package/src/lib/record/messages.js.map +1 -1
- package/src/lib/record/messages.mjs +15 -2
- package/src/lib/record/messages.mjs.map +1 -1
- package/src/lib/record/order.d.mts +21 -0
- package/src/lib/record/order.d.ts +21 -0
- package/src/lib/record/order.js +129 -0
- package/src/lib/record/order.js.map +1 -0
- package/src/lib/record/order.mjs +122 -0
- package/src/lib/record/order.mjs.map +1 -0
- package/src/lib/record/outbox-form.d.mts +79 -0
- package/src/lib/record/outbox-form.d.ts +79 -0
- package/src/lib/record/outbox-form.js +291 -0
- package/src/lib/record/outbox-form.js.map +1 -0
- package/src/lib/record/outbox-form.mjs +286 -0
- package/src/lib/record/outbox-form.mjs.map +1 -0
- package/src/lib/record/outbox-part.d.mts +6 -0
- package/src/lib/record/outbox-part.d.ts +6 -0
- package/src/lib/record/outbox-part.js +13 -0
- package/src/lib/record/outbox-part.js.map +1 -0
- package/src/lib/record/outbox-part.mjs +7 -0
- package/src/lib/record/outbox-part.mjs.map +1 -0
- package/src/lib/record/pay-part.d.mts +6 -0
- package/src/lib/record/pay-part.d.ts +6 -0
- package/src/lib/record/pay-part.js +11 -0
- package/src/lib/record/pay-part.js.map +1 -0
- package/src/lib/record/pay-part.mjs +7 -0
- package/src/lib/record/pay-part.mjs.map +1 -0
- package/src/lib/record/payment-form.d.mts +25 -0
- package/src/lib/record/payment-form.d.ts +25 -0
- package/src/lib/record/payment-form.js +98 -0
- package/src/lib/record/payment-form.js.map +1 -0
- package/src/lib/record/payment-form.mjs +95 -0
- package/src/lib/record/payment-form.mjs.map +1 -0
- package/src/lib/record/prefill-part.d.mts +7 -0
- package/src/lib/record/prefill-part.d.ts +7 -0
- package/src/lib/record/prefill-part.js +15 -0
- package/src/lib/record/prefill-part.js.map +1 -0
- package/src/lib/record/prefill-part.mjs +8 -0
- package/src/lib/record/prefill-part.mjs.map +1 -0
- package/src/lib/record/press-undo.d.mts +42 -0
- package/src/lib/record/press-undo.d.ts +42 -0
- package/src/lib/record/press-undo.js +115 -0
- package/src/lib/record/press-undo.js.map +1 -0
- package/src/lib/record/press-undo.mjs +110 -0
- package/src/lib/record/press-undo.mjs.map +1 -0
- package/src/lib/record/quiz.d.mts +36 -0
- package/src/lib/record/quiz.d.ts +36 -0
- package/src/lib/record/quiz.js +90 -0
- package/src/lib/record/quiz.js.map +1 -0
- package/src/lib/record/quiz.mjs +87 -0
- package/src/lib/record/quiz.mjs.map +1 -0
- package/src/lib/record/record-words.js +1 -1
- package/src/lib/record/record-words.js.map +1 -1
- package/src/lib/record/record-words.mjs +1 -1
- package/src/lib/record/record-words.mjs.map +1 -1
- package/src/lib/record/run.d.mts +54 -2
- package/src/lib/record/run.d.ts +54 -2
- package/src/lib/record/run.js +30 -6
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +28 -5
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/survey-kit.d.mts +37 -0
- package/src/lib/record/survey-kit.d.ts +37 -0
- package/src/lib/record/survey-kit.js +110 -0
- package/src/lib/record/survey-kit.js.map +1 -0
- package/src/lib/record/survey-kit.mjs +107 -0
- package/src/lib/record/survey-kit.mjs.map +1 -0
- package/src/lib/record/survey.d.mts +16 -0
- package/src/lib/record/survey.d.ts +16 -0
- package/src/lib/record/survey.js +17 -0
- package/src/lib/record/survey.js.map +1 -0
- package/src/lib/record/survey.mjs +13 -0
- package/src/lib/record/survey.mjs.map +1 -0
- package/src/lib/record/surveyflow-part.d.mts +9 -0
- package/src/lib/record/surveyflow-part.d.ts +9 -0
- package/src/lib/record/surveyflow-part.js +20 -0
- package/src/lib/record/surveyflow-part.js.map +1 -0
- package/src/lib/record/surveyflow-part.mjs +10 -0
- package/src/lib/record/surveyflow-part.mjs.map +1 -0
- package/src/lib/record/timing.d.mts +76 -0
- package/src/lib/record/timing.d.ts +76 -0
- package/src/lib/record/timing.js +112 -0
- package/src/lib/record/timing.js.map +1 -0
- package/src/lib/record/timing.mjs +104 -0
- package/src/lib/record/timing.mjs.map +1 -0
- package/src/lib/record/undo-later.d.mts +9 -0
- package/src/lib/record/undo-later.d.ts +9 -0
- package/src/lib/record/undo-later.js +10 -0
- package/src/lib/record/undo-later.js.map +1 -0
- package/src/lib/record/undo-later.mjs +7 -0
- package/src/lib/record/undo-later.mjs.map +1 -0
- package/src/lib/record/undo-part.d.mts +8 -0
- package/src/lib/record/undo-part.d.ts +8 -0
- package/src/lib/record/undo-part.js +17 -0
- package/src/lib/record/undo-part.js.map +1 -0
- package/src/lib/record/undo-part.mjs +9 -0
- package/src/lib/record/undo-part.mjs.map +1 -0
- package/src/lib/record/upload-to-later.d.mts +10 -0
- package/src/lib/record/upload-to-later.d.ts +10 -0
- package/src/lib/record/upload-to-later.js +15 -0
- package/src/lib/record/upload-to-later.js.map +1 -0
- package/src/lib/record/upload-to-later.mjs +12 -0
- package/src/lib/record/upload-to-later.mjs.map +1 -0
- package/src/lib/record/uploads.d.mts +5 -0
- package/src/lib/record/uploads.d.ts +5 -0
- package/src/lib/record/uploads.js.map +1 -1
- package/src/lib/record/uploads.mjs.map +1 -1
- package/src/lib/record/values.d.mts +6 -0
- package/src/lib/record/values.d.ts +6 -0
- package/src/lib/record/values.js.map +1 -1
- package/src/lib/record/values.mjs.map +1 -1
- package/src/lib/record/verify-form.d.mts +24 -0
- package/src/lib/record/verify-form.d.ts +24 -0
- package/src/lib/record/verify-form.js +65 -0
- package/src/lib/record/verify-form.js.map +1 -0
- package/src/lib/record/verify-form.mjs +62 -0
- package/src/lib/record/verify-form.mjs.map +1 -0
- package/src/lib/record/verify-part.d.mts +6 -0
- package/src/lib/record/verify-part.d.ts +6 -0
- package/src/lib/record/verify-part.js +11 -0
- package/src/lib/record/verify-part.js.map +1 -0
- package/src/lib/record/verify-part.mjs +7 -0
- package/src/lib/record/verify-part.mjs.map +1 -0
- package/src/lib/record/words-chunks.d.mts +37 -0
- package/src/lib/record/words-chunks.d.ts +37 -0
- package/src/lib/record/words-chunks.js +94 -0
- package/src/lib/record/words-chunks.js.map +1 -0
- package/src/lib/record/words-chunks.mjs +86 -0
- package/src/lib/record/words-chunks.mjs.map +1 -0
- package/src/runtime.d.mts +28 -6
- package/src/runtime.d.ts +28 -6
- package/src/runtime.js +35 -6
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +15 -3
- package/src/runtime.mjs.map +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VerifiedValue } from './data-source.mjs';
|
|
2
|
+
import type { FormInner, FormJoin } from './joins.mjs';
|
|
3
|
+
/** A form's verify code, made for it (`join`; `form.joined('verify')`). */
|
|
4
|
+
export interface FormVerify extends FormJoin {
|
|
5
|
+
/** Whether a field shown asks for a code (any, with none named): never where the source cannot send and check one. */
|
|
6
|
+
asks(field?: string): boolean;
|
|
7
|
+
/** Each field asking for a code whose value is not the one proved, with why: said under it, and nothing sent. */
|
|
8
|
+
unverified(): Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Keep that the person proved a field's value by a code — what the viewer's verify part does once `checkCode` said
|
|
11
|
+
* right — or forget it (null). Laid only while the field holds that value: an answer for one changed meanwhile is let go.
|
|
12
|
+
*/
|
|
13
|
+
mark(field: string, proved: VerifiedValue | null): void;
|
|
14
|
+
/** The proofs a send carries: each field's that still holds the value proved. */
|
|
15
|
+
proved(): {
|
|
16
|
+
verified?: Record<string, VerifiedValue>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The verify part's side of a form — proof by a code (`options.verify` on a field's node): a shown field asks for one
|
|
21
|
+
* where the data source has `sendCode` and `checkCode`; before a send, one holding a value not proved (`state.verified`)
|
|
22
|
+
* is said under it and nothing goes — an empty one asks none; a send carries the proofs (`verified`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function join(host: FormInner): FormVerify;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VerifiedValue } from './data-source';
|
|
2
|
+
import type { FormInner, FormJoin } from './joins';
|
|
3
|
+
/** A form's verify code, made for it (`join`; `form.joined('verify')`). */
|
|
4
|
+
export interface FormVerify extends FormJoin {
|
|
5
|
+
/** Whether a field shown asks for a code (any, with none named): never where the source cannot send and check one. */
|
|
6
|
+
asks(field?: string): boolean;
|
|
7
|
+
/** Each field asking for a code whose value is not the one proved, with why: said under it, and nothing sent. */
|
|
8
|
+
unverified(): Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Keep that the person proved a field's value by a code — what the viewer's verify part does once `checkCode` said
|
|
11
|
+
* right — or forget it (null). Laid only while the field holds that value: an answer for one changed meanwhile is let go.
|
|
12
|
+
*/
|
|
13
|
+
mark(field: string, proved: VerifiedValue | null): void;
|
|
14
|
+
/** The proofs a send carries: each field's that still holds the value proved. */
|
|
15
|
+
proved(): {
|
|
16
|
+
verified?: Record<string, VerifiedValue>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The verify part's side of a form — proof by a code (`options.verify` on a field's node): a shown field asks for one
|
|
21
|
+
* where the data source has `sendCode` and `checkCode`; before a send, one holding a value not proved (`state.verified`)
|
|
22
|
+
* is said under it and nothing goes — an empty one asks none; a send carries the proofs (`verified`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function join(host: FormInner): FormVerify;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.join = join;
|
|
4
|
+
const messages_1 = require("./messages");
|
|
5
|
+
/** The field nodes of a layout, at any depth. */
|
|
6
|
+
const fieldNodes = (node) => [...(node.type === 'field' ? [node] : []), ...(Array.isArray(node.children) ? node.children.flatMap(fieldNodes) : [])];
|
|
7
|
+
/**
|
|
8
|
+
* The verify part's side of a form — proof by a code (`options.verify` on a field's node): a shown field asks for one
|
|
9
|
+
* where the data source has `sendCode` and `checkCode`; before a send, one holding a value not proved (`state.verified`)
|
|
10
|
+
* is said under it and nothing goes — an empty one asks none; a send carries the proofs (`verified`).
|
|
11
|
+
*/
|
|
12
|
+
function join(host) {
|
|
13
|
+
const { form, page, options, messages, set } = host;
|
|
14
|
+
const asked = fieldNodes(page.layout).filter((node) => node.options?.['verify'] !== undefined && node.options['verify'] !== false);
|
|
15
|
+
const asking = (field) => {
|
|
16
|
+
const source = options.dataSource;
|
|
17
|
+
if (!source?.sendCode || !source.checkCode)
|
|
18
|
+
return [];
|
|
19
|
+
const shown = form.shownFields();
|
|
20
|
+
return asked.filter((node) => (field === undefined || node.field === field) && shown.includes(node.field) && !form.node(node.id).invisible);
|
|
21
|
+
};
|
|
22
|
+
const verify = {
|
|
23
|
+
asks: (field) => asking(field).length > 0,
|
|
24
|
+
unverified() {
|
|
25
|
+
const state = form.getState();
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const node of asking()) {
|
|
28
|
+
const value = state.values[node.field];
|
|
29
|
+
if (typeof value !== 'string' || !value.trim() || state.verified?.[node.field]?.value === value)
|
|
30
|
+
continue;
|
|
31
|
+
out[node.field] = (0, messages_1.fillMessage)(messages, messages.notVerified, { label: form.words(node.label ?? page.fields[node.field]?.label ?? node.field) });
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
},
|
|
35
|
+
mark(field, proved) {
|
|
36
|
+
const state = form.getState();
|
|
37
|
+
const verified = { ...state.verified };
|
|
38
|
+
if (!proved)
|
|
39
|
+
delete verified[field];
|
|
40
|
+
else if (state.values[field] !== proved.value)
|
|
41
|
+
return;
|
|
42
|
+
else
|
|
43
|
+
verified[field] = { value: proved.value, ...(proved.proof !== undefined ? { proof: proved.proof } : {}) };
|
|
44
|
+
const errors = { ...state.errors };
|
|
45
|
+
if (proved)
|
|
46
|
+
delete errors[field];
|
|
47
|
+
set({ verified, errors });
|
|
48
|
+
},
|
|
49
|
+
proved() {
|
|
50
|
+
const state = form.getState();
|
|
51
|
+
const kept = Object.entries(state.verified ?? {}).filter(([name, proved]) => state.values[name] === proved.value);
|
|
52
|
+
return kept.length ? { verified: Object.fromEntries(kept.map(([name, proved]) => [name, { ...proved }])) } : {};
|
|
53
|
+
},
|
|
54
|
+
// Before a send: a field not proved said under it, beside the form's own problems — its own one kept where it has one.
|
|
55
|
+
before(problems) {
|
|
56
|
+
for (const [field, why] of Object.entries(verify.unverified()))
|
|
57
|
+
problems[field] ??= why;
|
|
58
|
+
},
|
|
59
|
+
around: (kind, sent, go) => go(kind === 'upload' ? sent : { ...sent, ...verify.proved() }),
|
|
60
|
+
// Another response, or another record: nothing proved yet.
|
|
61
|
+
reset: () => set({ verified: {} }),
|
|
62
|
+
};
|
|
63
|
+
return verify;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=verify-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-form.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/verify-form.ts"],"names":[],"mappings":";;AA4BA,oBA6CC;AAtED,yCAAyC;AAiBzC,iDAAiD;AACjD,MAAM,UAAU,GAAG,CAAC,IAA0C,EAAe,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,IAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,QAA+B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5O;;;;GAIG;AACH,SAAgB,IAAI,CAAC,IAAe;IAClC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACpD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,K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ClH,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClH,CAAC;QACD,uHAAuH;QACvH,MAAM,CAAC,QAAQ;YACb,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;gBAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC;QAC1F,CAAC;QACD,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;QAC1F,2DAA2D;QAC3D,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;KACnC,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { fillMessage } from './messages.mjs';
|
|
2
|
+
/** The field nodes of a layout, at any depth. */
|
|
3
|
+
const fieldNodes = (node) => [...(node.type === 'field' ? [node] : []), ...(Array.isArray(node.children) ? node.children.flatMap(fieldNodes) : [])];
|
|
4
|
+
/**
|
|
5
|
+
* The verify part's side of a form — proof by a code (`options.verify` on a field's node): a shown field asks for one
|
|
6
|
+
* where the data source has `sendCode` and `checkCode`; before a send, one holding a value not proved (`state.verified`)
|
|
7
|
+
* is said under it and nothing goes — an empty one asks none; a send carries the proofs (`verified`).
|
|
8
|
+
*/
|
|
9
|
+
export function join(host) {
|
|
10
|
+
const { form, page, options, messages, set } = host;
|
|
11
|
+
const asked = fieldNodes(page.layout).filter((node) => node.options?.['verify'] !== undefined && node.options['verify'] !== false);
|
|
12
|
+
const asking = (field) => {
|
|
13
|
+
const source = options.dataSource;
|
|
14
|
+
if (!source?.sendCode || !source.checkCode)
|
|
15
|
+
return [];
|
|
16
|
+
const shown = form.shownFields();
|
|
17
|
+
return asked.filter((node) => (field === undefined || node.field === field) && shown.includes(node.field) && !form.node(node.id).invisible);
|
|
18
|
+
};
|
|
19
|
+
const verify = {
|
|
20
|
+
asks: (field) => asking(field).length > 0,
|
|
21
|
+
unverified() {
|
|
22
|
+
const state = form.getState();
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const node of asking()) {
|
|
25
|
+
const value = state.values[node.field];
|
|
26
|
+
if (typeof value !== 'string' || !value.trim() || state.verified?.[node.field]?.value === value)
|
|
27
|
+
continue;
|
|
28
|
+
out[node.field] = fillMessage(messages, messages.notVerified, { label: form.words(node.label ?? page.fields[node.field]?.label ?? node.field) });
|
|
29
|
+
}
|
|
30
|
+
return out;
|
|
31
|
+
},
|
|
32
|
+
mark(field, proved) {
|
|
33
|
+
const state = form.getState();
|
|
34
|
+
const verified = { ...state.verified };
|
|
35
|
+
if (!proved)
|
|
36
|
+
delete verified[field];
|
|
37
|
+
else if (state.values[field] !== proved.value)
|
|
38
|
+
return;
|
|
39
|
+
else
|
|
40
|
+
verified[field] = { value: proved.value, ...(proved.proof !== undefined ? { proof: proved.proof } : {}) };
|
|
41
|
+
const errors = { ...state.errors };
|
|
42
|
+
if (proved)
|
|
43
|
+
delete errors[field];
|
|
44
|
+
set({ verified, errors });
|
|
45
|
+
},
|
|
46
|
+
proved() {
|
|
47
|
+
const state = form.getState();
|
|
48
|
+
const kept = Object.entries(state.verified ?? {}).filter(([name, proved]) => state.values[name] === proved.value);
|
|
49
|
+
return kept.length ? { verified: Object.fromEntries(kept.map(([name, proved]) => [name, { ...proved }])) } : {};
|
|
50
|
+
},
|
|
51
|
+
// Before a send: a field not proved said under it, beside the form's own problems — its own one kept where it has one.
|
|
52
|
+
before(problems) {
|
|
53
|
+
for (const [field, why] of Object.entries(verify.unverified()))
|
|
54
|
+
problems[field] ??= why;
|
|
55
|
+
},
|
|
56
|
+
around: (kind, sent, go) => go(kind === 'upload' ? sent : { ...sent, ...verify.proved() }),
|
|
57
|
+
// Another response, or another record: nothing proved yet.
|
|
58
|
+
reset: () => set({ verified: {} }),
|
|
59
|
+
};
|
|
60
|
+
return verify;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=verify-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-form.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/verify-form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAiBzC,iDAAiD;AACjD,MAAM,UAAU,GAAG,CAAC,IAA0C,EAAe,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,IAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,QAA+B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5O;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAC,IAAe;IAClC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACpD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAA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,IAAI,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC;YAClH,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClH,CAAC;QACD,uHAAuH;QACvH,MAAM,CAAC,QAAQ;YACb,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;gBAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC;QAC1F,CAAC;QACD,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;QAC1F,2DAA2D;QAC3D,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;KACnC,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The verify part's form code (joins.ts): its side of a form — which shown fields ask for a code, those whose value is
|
|
3
|
+
* not proved stopping a send, the proofs a send carries (verify-form.ts). In the one-tag script it comes in one script
|
|
4
|
+
* with the viewer's verify part, which draws Send a code and the code's box (fieldia.verify.js).
|
|
5
|
+
*/
|
|
6
|
+
export { join } from './verify-form.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The verify part's form code (joins.ts): its side of a form — which shown fields ask for a code, those whose value is
|
|
3
|
+
* not proved stopping a send, the proofs a send carries (verify-form.ts). In the one-tag script it comes in one script
|
|
4
|
+
* with the viewer's verify part, which draws Send a code and the code's box (fieldia.verify.js).
|
|
5
|
+
*/
|
|
6
|
+
export { join } from './verify-form';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.join = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The verify part's form code (joins.ts): its side of a form — which shown fields ask for a code, those whose value is
|
|
6
|
+
* not proved stopping a send, the proofs a send carries (verify-form.ts). In the one-tag script it comes in one script
|
|
7
|
+
* with the viewer's verify part, which draws Send a code and the code's box (fieldia.verify.js).
|
|
8
|
+
*/
|
|
9
|
+
var verify_form_1 = require("./verify-form");
|
|
10
|
+
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return verify_form_1.join; } });
|
|
11
|
+
//# sourceMappingURL=verify-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-part.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/verify-part.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,6CAAqC;AAA5B,mGAAA,IAAI,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The verify part's form code (joins.ts): its side of a form — which shown fields ask for a code, those whose value is
|
|
3
|
+
* not proved stopping a send, the proofs a send carries (verify-form.ts). In the one-tag script it comes in one script
|
|
4
|
+
* with the viewer's verify part, which draws Send a code and the code's box (fieldia.verify.js).
|
|
5
|
+
*/
|
|
6
|
+
export { join } from './verify-form.mjs';
|
|
7
|
+
//# sourceMappingURL=verify-part.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-part.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/verify-part.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Languages whose words come in chunks of their own: in the packages, Turkish, Persian, Urdu and Spanish (machine-
|
|
3
|
+
* assisted, not yet reviewed by a native speaker), so an app never carries the words of a language it does not show.
|
|
4
|
+
* Each package says how it fetches its words in one (`wordsInChunks`); `wordsReady(tag)` fetches every package's for a
|
|
5
|
+
* language, once, and what draws in it — `mountViewer`, a map's widgets, `mountChatter` — waits for them before it
|
|
6
|
+
* draws, as it waits for its parts. The one-tag script has none: its languages are its add-on scripts.
|
|
7
|
+
*/
|
|
8
|
+
/** A package's words in languages that come in chunks of their own. */
|
|
9
|
+
export interface WordsChunks {
|
|
10
|
+
/** Whether `locale`'s words are in a chunk not fetched yet. */
|
|
11
|
+
coming(locale: string): boolean;
|
|
12
|
+
/** Fetch them; settled once they are in the package's table (or could not come, which leaves it English). */
|
|
13
|
+
fetch(locale: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/** A package's words in chunks of their own: fetched with every other package's by `wordsReady`. */
|
|
16
|
+
export declare function wordsInChunks(chunks: WordsChunks): void;
|
|
17
|
+
/** Whether a language tag's words, in some package, come in a chunk not fetched yet. */
|
|
18
|
+
export declare const wordsComing: (tag: string | null | undefined) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether a language tag's words come in a chunk not fetched yet, asked by what does not wait for them (as `mountViewer`
|
|
21
|
+
* does): fetched now, each table there at once with English's words till they come, and the console told once what to
|
|
22
|
+
* await.
|
|
23
|
+
*/
|
|
24
|
+
export declare function wordsNotYet(tag: string | null | undefined): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Every package's words for a language tag's language, fetched where they come in chunks of their own: settled at once
|
|
27
|
+
* for any other. Meanwhile each package's table for it is there, English's words, filled in place as they come — so
|
|
28
|
+
* what was made before reads the language's words from then on, and what is drawn after reads them at once.
|
|
29
|
+
*/
|
|
30
|
+
export declare function wordsReady(tag: string | null | undefined): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* A package's table of words by language, some of them in chunks of their own (`later`, each fetching its table): what
|
|
33
|
+
* `wordsInChunks` takes. Asked for, a language's table is there at once — a copy of English's — and filled in place once
|
|
34
|
+
* its chunk has come, keeping only the words it has (a sentence it leaves out says its plain one), so whatever took it
|
|
35
|
+
* meanwhile reads the language's words from then on. A chunk that cannot be fetched leaves it English, said once.
|
|
36
|
+
*/
|
|
37
|
+
export declare function tableInChunks<T extends object>(table: Record<string, T>, later: Record<string, () => Promise<T>>): WordsChunks;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Languages whose words come in chunks of their own: in the packages, Turkish, Persian, Urdu and Spanish (machine-
|
|
3
|
+
* assisted, not yet reviewed by a native speaker), so an app never carries the words of a language it does not show.
|
|
4
|
+
* Each package says how it fetches its words in one (`wordsInChunks`); `wordsReady(tag)` fetches every package's for a
|
|
5
|
+
* language, once, and what draws in it — `mountViewer`, a map's widgets, `mountChatter` — waits for them before it
|
|
6
|
+
* draws, as it waits for its parts. The one-tag script has none: its languages are its add-on scripts.
|
|
7
|
+
*/
|
|
8
|
+
/** A package's words in languages that come in chunks of their own. */
|
|
9
|
+
export interface WordsChunks {
|
|
10
|
+
/** Whether `locale`'s words are in a chunk not fetched yet. */
|
|
11
|
+
coming(locale: string): boolean;
|
|
12
|
+
/** Fetch them; settled once they are in the package's table (or could not come, which leaves it English). */
|
|
13
|
+
fetch(locale: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/** A package's words in chunks of their own: fetched with every other package's by `wordsReady`. */
|
|
16
|
+
export declare function wordsInChunks(chunks: WordsChunks): void;
|
|
17
|
+
/** Whether a language tag's words, in some package, come in a chunk not fetched yet. */
|
|
18
|
+
export declare const wordsComing: (tag: string | null | undefined) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether a language tag's words come in a chunk not fetched yet, asked by what does not wait for them (as `mountViewer`
|
|
21
|
+
* does): fetched now, each table there at once with English's words till they come, and the console told once what to
|
|
22
|
+
* await.
|
|
23
|
+
*/
|
|
24
|
+
export declare function wordsNotYet(tag: string | null | undefined): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Every package's words for a language tag's language, fetched where they come in chunks of their own: settled at once
|
|
27
|
+
* for any other. Meanwhile each package's table for it is there, English's words, filled in place as they come — so
|
|
28
|
+
* what was made before reads the language's words from then on, and what is drawn after reads them at once.
|
|
29
|
+
*/
|
|
30
|
+
export declare function wordsReady(tag: string | null | undefined): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* A package's table of words by language, some of them in chunks of their own (`later`, each fetching its table): what
|
|
33
|
+
* `wordsInChunks` takes. Asked for, a language's table is there at once — a copy of English's — and filled in place once
|
|
34
|
+
* its chunk has come, keeping only the words it has (a sentence it leaves out says its plain one), so whatever took it
|
|
35
|
+
* meanwhile reads the language's words from then on. A chunk that cannot be fetched leaves it English, said once.
|
|
36
|
+
*/
|
|
37
|
+
export declare function tableInChunks<T extends object>(table: Record<string, T>, later: Record<string, () => Promise<T>>): WordsChunks;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Languages whose words come in chunks of their own: in the packages, Turkish, Persian, Urdu and Spanish (machine-
|
|
4
|
+
* assisted, not yet reviewed by a native speaker), so an app never carries the words of a language it does not show.
|
|
5
|
+
* Each package says how it fetches its words in one (`wordsInChunks`); `wordsReady(tag)` fetches every package's for a
|
|
6
|
+
* language, once, and what draws in it — `mountViewer`, a map's widgets, `mountChatter` — waits for them before it
|
|
7
|
+
* draws, as it waits for its parts. The one-tag script has none: its languages are its add-on scripts.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.wordsComing = void 0;
|
|
11
|
+
exports.wordsInChunks = wordsInChunks;
|
|
12
|
+
exports.wordsNotYet = wordsNotYet;
|
|
13
|
+
exports.wordsReady = wordsReady;
|
|
14
|
+
exports.tableInChunks = tableInChunks;
|
|
15
|
+
const packages = [];
|
|
16
|
+
/** The languages asked for, each once: a package that says how later fetches its words for them too. */
|
|
17
|
+
const asked = new Map();
|
|
18
|
+
const baseOf = (tag) => (tag || 'en').split('-')[0].toLowerCase();
|
|
19
|
+
/** A package's words in chunks of their own: fetched with every other package's by `wordsReady`. */
|
|
20
|
+
function wordsInChunks(chunks) {
|
|
21
|
+
packages.push(chunks);
|
|
22
|
+
for (const [locale, ready] of asked)
|
|
23
|
+
if (chunks.coming(locale))
|
|
24
|
+
asked.set(locale, Promise.all([ready, chunks.fetch(locale)]).then(() => undefined));
|
|
25
|
+
}
|
|
26
|
+
/** Whether a language tag's words, in some package, come in a chunk not fetched yet. */
|
|
27
|
+
const wordsComing = (tag) => packages.some((chunks) => chunks.coming(baseOf(tag)));
|
|
28
|
+
exports.wordsComing = wordsComing;
|
|
29
|
+
const toldNotYet = new Set();
|
|
30
|
+
/**
|
|
31
|
+
* Whether a language tag's words come in a chunk not fetched yet, asked by what does not wait for them (as `mountViewer`
|
|
32
|
+
* does): fetched now, each table there at once with English's words till they come, and the console told once what to
|
|
33
|
+
* await.
|
|
34
|
+
*/
|
|
35
|
+
function wordsNotYet(tag) {
|
|
36
|
+
const locale = baseOf(tag);
|
|
37
|
+
if (!(0, exports.wordsComing)(locale))
|
|
38
|
+
return false;
|
|
39
|
+
void wordsReady(locale);
|
|
40
|
+
if (!toldNotYet.has(locale)) {
|
|
41
|
+
toldNotYet.add(locale);
|
|
42
|
+
globalThis.console?.warn(`Fieldia: the words in "${locale}" come in a chunk of their own and have not come yet, so they show in English until they do. Await wordsReady('${locale}') from @fieldia/core first (mountViewer does).`);
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Every package's words for a language tag's language, fetched where they come in chunks of their own: settled at once
|
|
48
|
+
* for any other. Meanwhile each package's table for it is there, English's words, filled in place as they come — so
|
|
49
|
+
* what was made before reads the language's words from then on, and what is drawn after reads them at once.
|
|
50
|
+
*/
|
|
51
|
+
function wordsReady(tag) {
|
|
52
|
+
const locale = baseOf(tag);
|
|
53
|
+
const coming = packages.filter((chunks) => chunks.coming(locale));
|
|
54
|
+
const before = asked.get(locale);
|
|
55
|
+
if (!coming.length && before)
|
|
56
|
+
return before;
|
|
57
|
+
const ready = Promise.all([before, ...coming.map((chunks) => chunks.fetch(locale))]).then(() => undefined);
|
|
58
|
+
asked.set(locale, ready);
|
|
59
|
+
return ready;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A package's table of words by language, some of them in chunks of their own (`later`, each fetching its table): what
|
|
63
|
+
* `wordsInChunks` takes. Asked for, a language's table is there at once — a copy of English's — and filled in place once
|
|
64
|
+
* its chunk has come, keeping only the words it has (a sentence it leaves out says its plain one), so whatever took it
|
|
65
|
+
* meanwhile reads the language's words from then on. A chunk that cannot be fetched leaves it English, said once.
|
|
66
|
+
*/
|
|
67
|
+
function tableInChunks(table, later) {
|
|
68
|
+
const fetching = new Map();
|
|
69
|
+
const done = new Set();
|
|
70
|
+
return {
|
|
71
|
+
coming: (locale) => Object.prototype.hasOwnProperty.call(later, locale) && !done.has(locale),
|
|
72
|
+
fetch(locale) {
|
|
73
|
+
const already = fetching.get(locale);
|
|
74
|
+
if (already)
|
|
75
|
+
return already;
|
|
76
|
+
if (!Object.prototype.hasOwnProperty.call(later, locale))
|
|
77
|
+
return Promise.resolve();
|
|
78
|
+
const own = (table[locale] ??= { ...table['en'] });
|
|
79
|
+
const fetched = later[locale]().then((words) => {
|
|
80
|
+
for (const key of Object.keys(own))
|
|
81
|
+
if (!(key in words))
|
|
82
|
+
delete own[key];
|
|
83
|
+
Object.assign(own, words);
|
|
84
|
+
done.add(locale);
|
|
85
|
+
}, (error) => {
|
|
86
|
+
done.add(locale);
|
|
87
|
+
globalThis.console?.warn(`Fieldia: the words in "${locale}" could not be fetched, so they show in English.`, error);
|
|
88
|
+
});
|
|
89
|
+
fetching.set(locale, fetched);
|
|
90
|
+
return fetched;
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=words-chunks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"words-chunks.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/words-chunks.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAgBH,sCAGC;AAWD,kCAWC;AAOD,gCAQC;AAQD,sCAyBC;AA/ED,MAAM,QAAQ,GAAkB,EAAE,CAAC;AACnC,wGAAwG;AACxG,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;AAC/C,MAAM,MAAM,GAAG,CAAC,GAA8B,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAE7F,oGAAoG;AACpG,SAAgB,aAAa,CAAC,MAAmB;IAC/C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK;QAAE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AACtJ,CAAC;AAED,wFAAwF;AACjF,MAAM,WAAW,GAAG,CAAC,GAA8B,EAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAAjH,QAAA,WAAW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B,MAAM,kDAAkD,EAAE,KAAK,CAAC,CAAC;YACvL,CAAC,CACF,CAAC;YACF,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC9B,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Languages whose words come in chunks of their own: in the packages, Turkish, Persian, Urdu and Spanish (machine-
|
|
3
|
+
* assisted, not yet reviewed by a native speaker), so an app never carries the words of a language it does not show.
|
|
4
|
+
* Each package says how it fetches its words in one (`wordsInChunks`); `wordsReady(tag)` fetches every package's for a
|
|
5
|
+
* language, once, and what draws in it — `mountViewer`, a map's widgets, `mountChatter` — waits for them before it
|
|
6
|
+
* draws, as it waits for its parts. The one-tag script has none: its languages are its add-on scripts.
|
|
7
|
+
*/
|
|
8
|
+
const packages = [];
|
|
9
|
+
/** The languages asked for, each once: a package that says how later fetches its words for them too. */
|
|
10
|
+
const asked = new Map();
|
|
11
|
+
const baseOf = (tag) => (tag || 'en').split('-')[0].toLowerCase();
|
|
12
|
+
/** A package's words in chunks of their own: fetched with every other package's by `wordsReady`. */
|
|
13
|
+
export function wordsInChunks(chunks) {
|
|
14
|
+
packages.push(chunks);
|
|
15
|
+
for (const [locale, ready] of asked)
|
|
16
|
+
if (chunks.coming(locale))
|
|
17
|
+
asked.set(locale, Promise.all([ready, chunks.fetch(locale)]).then(() => undefined));
|
|
18
|
+
}
|
|
19
|
+
/** Whether a language tag's words, in some package, come in a chunk not fetched yet. */
|
|
20
|
+
export const wordsComing = (tag) => packages.some((chunks) => chunks.coming(baseOf(tag)));
|
|
21
|
+
const toldNotYet = new Set();
|
|
22
|
+
/**
|
|
23
|
+
* Whether a language tag's words come in a chunk not fetched yet, asked by what does not wait for them (as `mountViewer`
|
|
24
|
+
* does): fetched now, each table there at once with English's words till they come, and the console told once what to
|
|
25
|
+
* await.
|
|
26
|
+
*/
|
|
27
|
+
export function wordsNotYet(tag) {
|
|
28
|
+
const locale = baseOf(tag);
|
|
29
|
+
if (!wordsComing(locale))
|
|
30
|
+
return false;
|
|
31
|
+
void wordsReady(locale);
|
|
32
|
+
if (!toldNotYet.has(locale)) {
|
|
33
|
+
toldNotYet.add(locale);
|
|
34
|
+
globalThis.console?.warn(`Fieldia: the words in "${locale}" come in a chunk of their own and have not come yet, so they show in English until they do. Await wordsReady('${locale}') from @fieldia/core first (mountViewer does).`);
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Every package's words for a language tag's language, fetched where they come in chunks of their own: settled at once
|
|
40
|
+
* for any other. Meanwhile each package's table for it is there, English's words, filled in place as they come — so
|
|
41
|
+
* what was made before reads the language's words from then on, and what is drawn after reads them at once.
|
|
42
|
+
*/
|
|
43
|
+
export function wordsReady(tag) {
|
|
44
|
+
const locale = baseOf(tag);
|
|
45
|
+
const coming = packages.filter((chunks) => chunks.coming(locale));
|
|
46
|
+
const before = asked.get(locale);
|
|
47
|
+
if (!coming.length && before)
|
|
48
|
+
return before;
|
|
49
|
+
const ready = Promise.all([before, ...coming.map((chunks) => chunks.fetch(locale))]).then(() => undefined);
|
|
50
|
+
asked.set(locale, ready);
|
|
51
|
+
return ready;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A package's table of words by language, some of them in chunks of their own (`later`, each fetching its table): what
|
|
55
|
+
* `wordsInChunks` takes. Asked for, a language's table is there at once — a copy of English's — and filled in place once
|
|
56
|
+
* its chunk has come, keeping only the words it has (a sentence it leaves out says its plain one), so whatever took it
|
|
57
|
+
* meanwhile reads the language's words from then on. A chunk that cannot be fetched leaves it English, said once.
|
|
58
|
+
*/
|
|
59
|
+
export function tableInChunks(table, later) {
|
|
60
|
+
const fetching = new Map();
|
|
61
|
+
const done = new Set();
|
|
62
|
+
return {
|
|
63
|
+
coming: (locale) => Object.prototype.hasOwnProperty.call(later, locale) && !done.has(locale),
|
|
64
|
+
fetch(locale) {
|
|
65
|
+
const already = fetching.get(locale);
|
|
66
|
+
if (already)
|
|
67
|
+
return already;
|
|
68
|
+
if (!Object.prototype.hasOwnProperty.call(later, locale))
|
|
69
|
+
return Promise.resolve();
|
|
70
|
+
const own = (table[locale] ??= { ...table['en'] });
|
|
71
|
+
const fetched = later[locale]().then((words) => {
|
|
72
|
+
for (const key of Object.keys(own))
|
|
73
|
+
if (!(key in words))
|
|
74
|
+
delete own[key];
|
|
75
|
+
Object.assign(own, words);
|
|
76
|
+
done.add(locale);
|
|
77
|
+
}, (error) => {
|
|
78
|
+
done.add(locale);
|
|
79
|
+
globalThis.console?.warn(`Fieldia: the words in "${locale}" could not be fetched, so they show in English.`, error);
|
|
80
|
+
});
|
|
81
|
+
fetching.set(locale, fetched);
|
|
82
|
+
return fetched;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=words-chunks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"words-chunks.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/words-chunks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,QAAQ,GAAkB,EAAE,CAAC;AACnC,wGAAwG;AACxG,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;AAC/C,MAAM,MAAM,GAAG,CAAC,GAA8B,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAE7F,oGAAoG;AACpG,MAAM,UAAU,aAAa,CAAC,MAAmB;IAC/C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK;QAAE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;YAAE,KAAK,CAAC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G,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;oBAAE,IAAI,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC;wBAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;gBACzE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAC1B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACnB,CAAC,EACD,CAAC,KAAc,EAAE,EAAE;gBACjB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAChB,UAA0E,CAAC,OAAO,EAAE,IAAI,CAAC,0BAA0B,MAAM,kDAAkD,EAAE,KAAK,CAAC,CAAC;YACvL,CAAC,CACF,CAAC;YACF,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC9B,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/src/runtime.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ export { FIELD_NAME, FIELD_TYPES, type FieldType } from './lib/format/names.mjs'
|
|
|
8
8
|
export type { Field, Fields, LineField, LinkedField, LineKinds, Option, SelectionOption, OptionsFrom, OptionsFromList, OptionsFromField, DefinitionsFrom, PropertyDefinition, FilterCondition, FilterItem, SetWhen, MoneyLook, Period } from './lib/format/field.mjs';
|
|
9
9
|
export { changesOptions, choiceOptions, hasOptionRules, optionRulesPart, optionsField, optionsList, withCarriedOptions, type OptionRulesPart } from './lib/format/choice-options.mjs';
|
|
10
10
|
export type { Shrink } from './lib/format/field.mjs';
|
|
11
|
-
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabCount, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListCell, ListCard, ListGallery, ListEditable, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, RelatedNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, FilterRange, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout.mjs';
|
|
11
|
+
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabCount, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, PressUndo, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListGantt, GanttZoom, ListCell, ListCard, ListGallery, ListEditable, ListDetail, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, RelatedNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, FilterRange, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout.mjs';
|
|
12
12
|
export type { AddressSearchOptions } from './lib/format/address-search.mjs';
|
|
13
13
|
export type { PathPickerOptions, StateDotOptions } from './lib/format/picker-options.mjs';
|
|
14
14
|
export type { PagePhone, PhoneOptions } from './lib/format/phone.mjs';
|
|
@@ -16,9 +16,13 @@ export type { SlotsOptions } from './lib/format/slots-options.mjs';
|
|
|
16
16
|
export type { SignatureOptions } from './lib/format/signature-options.mjs';
|
|
17
17
|
export type { PhotosOptions } from './lib/format/photos-options.mjs';
|
|
18
18
|
export type { ScanFill, ScanFormat, ScanOption, ScanSettings } from './lib/format/scan-options.mjs';
|
|
19
|
+
export type { CodeOptions, PinsOptions, RecordOptions, RecordedKind } from './lib/format/media-options.mjs';
|
|
19
20
|
export type { PageDuplicates } from './lib/format/duplicates.mjs';
|
|
20
21
|
export type { PageLimits } from './lib/format/limits.mjs';
|
|
21
22
|
export type { PageApproval } from './lib/format/approval.mjs';
|
|
23
|
+
export type { PageQuiz, QuizQuestion } from './lib/format/quiz.mjs';
|
|
24
|
+
export type { PageReview, TimeLimit } from './lib/format/flow.mjs';
|
|
25
|
+
export type { PagePrefill, PrefillParam } from './lib/format/prefill.mjs';
|
|
22
26
|
export type { PageRecords } from './lib/format/records.mjs';
|
|
23
27
|
export type { PageEnding } from './lib/format/endings.mjs';
|
|
24
28
|
export { labelAt, quotedLabel, recordSentence } from './lib/record/record-words.mjs';
|
|
@@ -40,7 +44,8 @@ export { checkPage } from './lib/format/check-page.mjs';
|
|
|
40
44
|
export { fillValues, splitValues, valuesIn } from './lib/format/words.mjs';
|
|
41
45
|
export { BROWSER_HOTKEYS, HOTKEY, hotkeyWords } from './lib/format/hotkeys.mjs';
|
|
42
46
|
export type { PageIssue, PageValidation } from './lib/format/references.mjs';
|
|
43
|
-
export { translatePage, localizePage, pageWords, isRightToLeft } from './lib/format/translate.mjs';
|
|
47
|
+
export { translatePage, localizePage, pageWords, isRightToLeft, listComma } from './lib/format/translate.mjs';
|
|
48
|
+
export { firstWeekday } from './lib/format/week.mjs';
|
|
44
49
|
export { compileModifier, type CompiledModifier } from './lib/expression/modifier.mjs';
|
|
45
50
|
export { ANY_FUNCTION, functionInfo, functionTable, functionNameProblem, type AppFunction, type AppFunctions, type FunctionInfo, type FunctionsKnown, type ValueKind } from './lib/expression/app-functions.mjs';
|
|
46
51
|
export type { FunctionTable, ExpressionEnv } from './lib/expression/functions.mjs';
|
|
@@ -51,24 +56,39 @@ export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type R
|
|
|
51
56
|
export { evidenceOf, signedBy, signsAnswers, type SignedBy } from './lib/record/signed.mjs';
|
|
52
57
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check.mjs';
|
|
53
58
|
export { scoreOf, type Score } from './lib/record/score.mjs';
|
|
54
|
-
export type {
|
|
59
|
+
export type { QuizResults, QuizMark } from './lib/record/quiz.mjs';
|
|
60
|
+
export { formSurveyPart, surveyFlow, type FormSurveyPart } from './lib/record/survey.mjs';
|
|
61
|
+
export type { Countdown } from './lib/record/timing.mjs';
|
|
62
|
+
export type { DrawnOrder } from './lib/record/order.mjs';
|
|
63
|
+
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, BotReport, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, GroupInterval, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, ViewsRequest, ColumnState, ViewState, SavedView, SaveViewRequest, DeleteViewRequest, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, WriteManyRequest, WriteManyResult, ExportRequest, ExportedFile, ExportBytes, CreateManyRequest, CreateManyResult, ImportRequest, SlotsRequest, SlotsResult, SlotDay, SlotDayState, DuplicatesRequest, DuplicatesResult, DuplicateMatch, MergeRequest, MergeResult, NotDuplicatesRequest, MarkNotDuplicateRequest, LimitsRequest, LimitsResult, StoredDraft, SaveDraftRequest, SavedDraft, LoadDraftRequest, ApprovalsRequest, ApprovalDecision, ApprovalLevelState, Approver, ApprovalLevel, ApprovalChange, ApprovalEntry, Approvals, DecideRequest, SuggestRequest, SuggestResult, RewriteRequest, RewriteResult, SearchToFilterRequest, SearchToFilterResult, GeoBox, ClustersRequest, ClustersResult, MapCluster, SendCodeRequest, SentCode, CheckCodeRequest, CodeChecked, VerifiedValue, PayRequest, PayResult, PaymentDue, PaidPayment, RecordChange, PresenceRequest, PresentPerson, RecordTemplate, TemplatesRequest, TemplateRequest, SaveTemplateRequest, } from './lib/record/data-source.mjs';
|
|
55
64
|
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf, newRecordSave } from './lib/record/data-source.mjs';
|
|
56
65
|
export { matchesFilter } from './lib/record/filter.mjs';
|
|
57
66
|
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart, type DatePeriod, type DateInterval, type DayCount } from './lib/record/periods.mjs';
|
|
58
67
|
export { suggestions, facetsToFilter, groupByFields, type Facet, type RangeDays, type Suggestion } from './lib/record/search.mjs';
|
|
59
68
|
export { createMemoryDataSource, type MemoryAssist, type MemoryDataSource, type MemoryDataSourceOptions } from './lib/record/memory-data-source.mjs';
|
|
60
69
|
export type { MemoryApprovalRoute } from './lib/record/memory-approvals.mjs';
|
|
70
|
+
export type { MemoryCodes, SentCodeKept } from './lib/record/memory-codes.mjs';
|
|
61
71
|
export { clocksSkip, dayIn, instantsAt, isOwnZone, isTimeZone, ownZone, wallClock, wallDay, wallOf, wallText, wallTime, zoneOffset, type WallTime } from './lib/record/zones.mjs';
|
|
62
72
|
export { zonedPage } from './lib/format/zoned.mjs';
|
|
63
73
|
export { formUploadsPart, uploadGoing, UPLOADS_AT_ONCE, type FileUpload, type FormUploadsPart, type UploadHow } from './lib/record/uploads.mjs';
|
|
64
|
-
export { uploadTo
|
|
74
|
+
export { uploadTo } from './lib/record/upload-to-later.mjs';
|
|
75
|
+
export type { UploadAnswer, UploadTarget, UploadToOptions } from './lib/record/upload-to.mjs';
|
|
65
76
|
export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler.mjs';
|
|
66
77
|
export { createForm, unsavedWork, workAtRisk, type LeaveHow, type Form, type FormOptions, type FormUser, type FormState, type FormStatus, type NodeState, type Choices, type Definitions, type DraftStore, type ActionRequest, type ChangeBy, type FormEvents, type FormConflict, type SearchOptions, } from './lib/record/form.mjs';
|
|
78
|
+
export type { HistoryStep } from './lib/record/history.mjs';
|
|
67
79
|
export type { WaitsFor } from './lib/record/waits.mjs';
|
|
68
|
-
export type { ActionFile, ActionHost, ActionResult, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop } from './lib/record/run.mjs';
|
|
80
|
+
export type { ActionFile, ActionHost, ActionResult, AppUndo, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop, SayUndo } from './lib/record/run.mjs';
|
|
69
81
|
export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages.mjs';
|
|
70
|
-
export {
|
|
82
|
+
export { tableInChunks, wordsComing, wordsInChunks, wordsNotYet, wordsReady, type WordsChunks } from './lib/record/words-chunks.mjs';
|
|
83
|
+
export { stripMarks, foldDigits, oneLine, charCount, foldForSearch, numberMarks, readNumber, couldBeNumber, numberMisfit, cleanPastedNumber, readDuration, readDate, foldTyped, couldBeMonth, monthNamed, readTime, placesOfCurrency, placesOf, MOST_DIGITS, type NumberMarks, type NumberProblem, type NumberReading, type NumberRead, type NumberReadOptions, type NumberLimits, type NumberRefusal, type PastedNumber, type DurationProblem, type DurationRead, type DateOrder, type DateProblem, type DateRead, type TimeRead, } from './lib/record/input-rules.mjs';
|
|
71
84
|
export { dayOf } from './lib/record/limits.mjs';
|
|
85
|
+
export { dayTag, hijriWords, monthWords, precisionOf, type DatePrecision } from './lib/record/day-words.mjs';
|
|
86
|
+
export { formJoins, type FormInner, type FormJoin, type FormJoins, type JoinPart, type SendKind, type Sent } from './lib/record/joins.mjs';
|
|
87
|
+
export type { PageLink } from './lib/record/link-values.mjs';
|
|
88
|
+
export type { FormVerify } from './lib/record/verify-form.mjs';
|
|
89
|
+
export type { FormPayment, PayStep } from './lib/record/payment-form.mjs';
|
|
90
|
+
export type { PagePayment } from './lib/format/payment.mjs';
|
|
91
|
+
export type { FormOutbox, OutboxItem, OutboxStore } from './lib/record/outbox-form.mjs';
|
|
72
92
|
export { formLimitsPart, hasLimits, limitInstant, type FormLimits, type FormLimitsPart, type Seats, type TakingState } from './lib/record/taking.mjs';
|
|
73
93
|
export { formApprovalsPart, type ApprovalStatus, type FormApproval, type FormApprovalsPart } from './lib/record/approving.mjs';
|
|
74
94
|
export { formLanguagesPart, hasLanguages, languagesOf, type FormLanguagesPart, type Translated } from './lib/record/languages.mjs';
|
|
@@ -77,4 +97,6 @@ export { webAddress, settledText, hasPattern, EMAIL_LOCAL_STRAYS } from './lib/r
|
|
|
77
97
|
export { fieldPattern } from './lib/format/pattern.mjs';
|
|
78
98
|
export { lazyPart, partWith, partsOf, partsComeByScriptTag, settleParts, type Part } from './lib/parts.mjs';
|
|
79
99
|
export { callsPartFunctions, functionsPart, type FunctionsPart } from './lib/expression/functions.mjs';
|
|
100
|
+
export { recordLivePart, type RecordLivePart } from './lib/record/live-later.mjs';
|
|
101
|
+
export { pressUndoPart, type PressUndoPart } from './lib/record/undo-later.mjs';
|
|
80
102
|
export { mapChecksPart } from './lib/format/later-checks.mjs';
|