@fieldia/core 0.26.1 → 0.28.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.
- package/README.md +326 -3
- package/package.json +1 -1
- package/schema/page.schema.json +230 -24
- package/src/index.d.mts +10 -2
- package/src/index.d.ts +10 -2
- package/src/index.js +26 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +11 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/expression/app-functions.d.mts +47 -0
- package/src/lib/expression/app-functions.d.ts +47 -0
- package/src/lib/expression/app-functions.js +64 -0
- package/src/lib/expression/app-functions.js.map +1 -0
- package/src/lib/expression/app-functions.mjs +58 -0
- package/src/lib/expression/app-functions.mjs.map +1 -0
- package/src/lib/expression/dates.d.mts +21 -0
- package/src/lib/expression/dates.d.ts +21 -0
- package/src/lib/expression/dates.js +73 -0
- package/src/lib/expression/dates.js.map +1 -0
- package/src/lib/expression/dates.mjs +67 -0
- package/src/lib/expression/dates.mjs.map +1 -0
- package/src/lib/expression/evaluator.js +12 -6
- package/src/lib/expression/evaluator.js.map +1 -1
- package/src/lib/expression/evaluator.mjs +12 -6
- package/src/lib/expression/evaluator.mjs.map +1 -1
- package/src/lib/expression/expression.d.mts +7 -3
- package/src/lib/expression/expression.d.ts +7 -3
- package/src/lib/expression/expression.js +8 -2
- package/src/lib/expression/expression.js.map +1 -1
- package/src/lib/expression/expression.mjs +7 -2
- package/src/lib/expression/expression.mjs.map +1 -1
- package/src/lib/expression/functions-part.d.mts +7 -0
- package/src/lib/expression/functions-part.d.ts +7 -0
- package/src/lib/expression/functions-part.js +13 -0
- package/src/lib/expression/functions-part.js.map +1 -0
- package/src/lib/expression/functions-part.mjs +8 -0
- package/src/lib/expression/functions-part.mjs.map +1 -0
- package/src/lib/expression/functions.d.mts +60 -3
- package/src/lib/expression/functions.d.ts +60 -3
- package/src/lib/expression/functions.js +109 -15
- package/src/lib/expression/functions.js.map +1 -1
- package/src/lib/expression/functions.mjs +103 -16
- package/src/lib/expression/functions.mjs.map +1 -1
- package/src/lib/expression/kinds.d.mts +31 -0
- package/src/lib/expression/kinds.d.ts +31 -0
- package/src/lib/expression/kinds.js +159 -0
- package/src/lib/expression/kinds.js.map +1 -0
- package/src/lib/expression/kinds.mjs +151 -0
- package/src/lib/expression/kinds.mjs.map +1 -0
- package/src/lib/expression/modifier.d.mts +4 -3
- package/src/lib/expression/modifier.d.ts +4 -3
- package/src/lib/expression/modifier.js +4 -3
- package/src/lib/expression/modifier.js.map +1 -1
- package/src/lib/expression/modifier.mjs +4 -3
- package/src/lib/expression/modifier.mjs.map +1 -1
- package/src/lib/expression/more-functions.d.mts +8 -0
- package/src/lib/expression/more-functions.d.ts +8 -0
- package/src/lib/expression/more-functions.js +235 -0
- package/src/lib/expression/more-functions.js.map +1 -0
- package/src/lib/expression/more-functions.mjs +230 -0
- package/src/lib/expression/more-functions.mjs.map +1 -0
- package/src/lib/expression/parser.d.mts +4 -1
- package/src/lib/expression/parser.d.ts +4 -1
- package/src/lib/expression/parser.js +6 -3
- package/src/lib/expression/parser.js.map +1 -1
- package/src/lib/expression/parser.mjs +6 -3
- package/src/lib/expression/parser.mjs.map +1 -1
- package/src/lib/expression/reads.d.mts +2 -2
- package/src/lib/expression/reads.d.ts +2 -2
- package/src/lib/expression/reads.js +6 -4
- package/src/lib/expression/reads.js.map +1 -1
- package/src/lib/expression/reads.mjs +6 -4
- package/src/lib/expression/reads.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/check-page.d.mts +7 -2
- package/src/lib/format/check-page.d.ts +7 -2
- package/src/lib/format/check-page.js +10 -4
- package/src/lib/format/check-page.js.map +1 -1
- package/src/lib/format/check-page.mjs +10 -4
- package/src/lib/format/check-page.mjs.map +1 -1
- package/src/lib/format/choice-options.d.mts +34 -0
- package/src/lib/format/choice-options.d.ts +34 -0
- package/src/lib/format/choice-options.js +60 -0
- package/src/lib/format/choice-options.js.map +1 -0
- package/src/lib/format/choice-options.mjs +51 -0
- package/src/lib/format/choice-options.mjs.map +1 -0
- package/src/lib/format/endings-checks.d.mts +8 -0
- package/src/lib/format/endings-checks.d.ts +8 -0
- package/src/lib/format/endings-checks.js +23 -0
- package/src/lib/format/endings-checks.js.map +1 -0
- package/src/lib/format/endings-checks.mjs +20 -0
- package/src/lib/format/endings-checks.mjs.map +1 -0
- package/src/lib/format/endings.d.mts +40 -0
- package/src/lib/format/endings.d.ts +40 -0
- package/src/lib/format/endings.js +15 -0
- package/src/lib/format/endings.js.map +1 -0
- package/src/lib/format/endings.mjs +12 -0
- package/src/lib/format/endings.mjs.map +1 -0
- package/src/lib/format/field.d.mts +151 -16
- package/src/lib/format/field.d.ts +151 -16
- package/src/lib/format/field.js +64 -11
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +63 -10
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/head-checks.d.mts +2 -0
- package/src/lib/format/head-checks.d.ts +2 -0
- package/src/lib/format/head-checks.js +2 -59
- package/src/lib/format/head-checks.js.map +1 -1
- package/src/lib/format/head-checks.mjs +1 -58
- package/src/lib/format/head-checks.mjs.map +1 -1
- package/src/lib/format/later-checks.d.mts +17 -0
- package/src/lib/format/later-checks.d.ts +17 -0
- package/src/lib/format/later-checks.js +20 -0
- package/src/lib/format/later-checks.js.map +1 -0
- package/src/lib/format/later-checks.mjs +17 -0
- package/src/lib/format/later-checks.mjs.map +1 -0
- package/src/lib/format/layout.d.mts +264 -190
- package/src/lib/format/layout.d.ts +264 -190
- package/src/lib/format/layout.js +34 -29
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +14 -4
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/layout.types.d.mts +2 -1
- package/src/lib/format/layout.types.d.ts +2 -1
- package/src/lib/format/limits-checks.d.mts +14 -0
- package/src/lib/format/limits-checks.d.ts +14 -0
- package/src/lib/format/limits-checks.js +36 -0
- package/src/lib/format/limits-checks.js.map +1 -0
- package/src/lib/format/limits-checks.mjs +33 -0
- package/src/lib/format/limits-checks.mjs.map +1 -0
- package/src/lib/format/limits.d.mts +24 -0
- package/src/lib/format/limits.d.ts +24 -0
- package/src/lib/format/limits.js +35 -0
- package/src/lib/format/limits.js.map +1 -0
- package/src/lib/format/limits.mjs +32 -0
- package/src/lib/format/limits.mjs.map +1 -0
- package/src/lib/format/list-checks.d.mts +44 -0
- package/src/lib/format/list-checks.d.ts +44 -0
- package/src/lib/format/list-checks.js +340 -0
- package/src/lib/format/list-checks.js.map +1 -0
- package/src/lib/format/list-checks.mjs +336 -0
- package/src/lib/format/list-checks.mjs.map +1 -0
- package/src/lib/format/map-checks.d.mts +33 -0
- package/src/lib/format/map-checks.d.ts +33 -0
- package/src/lib/format/map-checks.js +180 -0
- package/src/lib/format/map-checks.js.map +1 -0
- package/src/lib/format/map-checks.mjs +175 -0
- package/src/lib/format/map-checks.mjs.map +1 -0
- package/src/lib/format/mapchecks-part.d.mts +5 -0
- package/src/lib/format/mapchecks-part.d.ts +5 -0
- package/src/lib/format/mapchecks-part.js +11 -0
- package/src/lib/format/mapchecks-part.js.map +1 -0
- package/src/lib/format/mapchecks-part.mjs +6 -0
- package/src/lib/format/mapchecks-part.mjs.map +1 -0
- package/src/lib/format/option-checks.d.mts +16 -0
- package/src/lib/format/option-checks.d.ts +16 -0
- package/src/lib/format/option-checks.js +39 -0
- package/src/lib/format/option-checks.js.map +1 -0
- package/src/lib/format/option-checks.mjs +36 -0
- package/src/lib/format/option-checks.mjs.map +1 -0
- package/src/lib/format/options-part.d.mts +6 -0
- package/src/lib/format/options-part.d.ts +6 -0
- package/src/lib/format/options-part.js +11 -0
- package/src/lib/format/options-part.js.map +1 -0
- package/src/lib/format/options-part.mjs +7 -0
- package/src/lib/format/options-part.mjs.map +1 -0
- package/src/lib/format/page.d.mts +154 -71
- package/src/lib/format/page.d.ts +154 -71
- package/src/lib/format/page.js +5 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +5 -0
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/part-checks.d.mts +20 -0
- package/src/lib/format/part-checks.d.ts +20 -0
- package/src/lib/format/part-checks.js +3 -0
- package/src/lib/format/part-checks.js.map +1 -0
- package/src/lib/format/part-checks.mjs +2 -0
- package/src/lib/format/part-checks.mjs.map +1 -0
- package/src/lib/format/references.d.mts +71 -65
- package/src/lib/format/references.d.ts +71 -65
- package/src/lib/format/references.js +194 -631
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +194 -631
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/seats-checks.d.mts +3 -0
- package/src/lib/format/seats-checks.d.ts +3 -0
- package/src/lib/format/seats-checks.js +13 -0
- package/src/lib/format/seats-checks.js.map +1 -0
- package/src/lib/format/seats-checks.mjs +10 -0
- package/src/lib/format/seats-checks.mjs.map +1 -0
- package/src/lib/format/sheet-head-checks.d.mts +4 -0
- package/src/lib/format/sheet-head-checks.d.ts +4 -0
- package/src/lib/format/sheet-head-checks.js +68 -0
- package/src/lib/format/sheet-head-checks.js.map +1 -0
- package/src/lib/format/sheet-head-checks.mjs +65 -0
- package/src/lib/format/sheet-head-checks.mjs.map +1 -0
- package/src/lib/format/signature-checks.d.mts +7 -0
- package/src/lib/format/signature-checks.d.ts +7 -0
- package/src/lib/format/signature-checks.js +32 -0
- package/src/lib/format/signature-checks.js.map +1 -0
- package/src/lib/format/signature-checks.mjs +29 -0
- package/src/lib/format/signature-checks.mjs.map +1 -0
- package/src/lib/format/signature-options.d.mts +24 -0
- package/src/lib/format/signature-options.d.ts +24 -0
- package/src/lib/format/signature-options.js +30 -0
- package/src/lib/format/signature-options.js.map +1 -0
- package/src/lib/format/signature-options.mjs +26 -0
- package/src/lib/format/signature-options.mjs.map +1 -0
- package/src/lib/format/slots-checks.d.mts +4 -0
- package/src/lib/format/slots-checks.d.ts +4 -0
- package/src/lib/format/slots-checks.js +21 -0
- package/src/lib/format/slots-checks.js.map +1 -0
- package/src/lib/format/slots-checks.mjs +18 -0
- package/src/lib/format/slots-checks.mjs.map +1 -0
- package/src/lib/format/statusbar-checks.d.mts +8 -0
- package/src/lib/format/statusbar-checks.d.ts +8 -0
- package/src/lib/format/statusbar-checks.js +35 -0
- package/src/lib/format/statusbar-checks.js.map +1 -0
- package/src/lib/format/statusbar-checks.mjs +32 -0
- package/src/lib/format/statusbar-checks.mjs.map +1 -0
- package/src/lib/format/table-checks.d.mts +21 -0
- package/src/lib/format/table-checks.d.ts +21 -0
- package/src/lib/format/table-checks.js +86 -0
- package/src/lib/format/table-checks.js.map +1 -0
- package/src/lib/format/table-checks.mjs +82 -0
- package/src/lib/format/table-checks.mjs.map +1 -0
- package/src/lib/format/translate.js +2 -2
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +2 -2
- package/src/lib/format/translate.mjs.map +1 -1
- package/src/lib/format/upgrade.d.mts +7 -3
- package/src/lib/format/upgrade.d.ts +7 -3
- package/src/lib/format/upgrade.js +7 -3
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +7 -3
- package/src/lib/format/upgrade.mjs.map +1 -1
- package/src/lib/format/validate.d.mts +18 -2
- package/src/lib/format/validate.d.ts +18 -2
- package/src/lib/format/validate.js +36 -3
- package/src/lib/format/validate.js.map +1 -1
- package/src/lib/format/validate.mjs +35 -3
- package/src/lib/format/validate.mjs.map +1 -1
- 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/words.d.mts +6 -2
- package/src/lib/format/words.d.ts +6 -2
- package/src/lib/format/words.js +13 -7
- package/src/lib/format/words.js.map +1 -1
- package/src/lib/format/words.mjs +13 -7
- package/src/lib/format/words.mjs.map +1 -1
- package/src/lib/parts.d.mts +45 -0
- package/src/lib/parts.d.ts +45 -0
- package/src/lib/parts.js +60 -0
- package/src/lib/parts.js.map +1 -0
- package/src/lib/parts.mjs +53 -0
- package/src/lib/parts.mjs.map +1 -0
- package/src/lib/record/cells.d.mts +3 -3
- package/src/lib/record/cells.d.ts +3 -3
- package/src/lib/record/cells.js +16 -15
- package/src/lib/record/cells.js.map +1 -1
- package/src/lib/record/cells.mjs +16 -15
- package/src/lib/record/cells.mjs.map +1 -1
- package/src/lib/record/check.js +3 -1
- package/src/lib/record/check.js.map +1 -1
- package/src/lib/record/check.mjs +3 -1
- package/src/lib/record/check.mjs.map +1 -1
- package/src/lib/record/compute.d.mts +16 -5
- package/src/lib/record/compute.d.ts +16 -5
- package/src/lib/record/compute.js +57 -16
- package/src/lib/record/compute.js.map +1 -1
- package/src/lib/record/compute.mjs +57 -16
- package/src/lib/record/compute.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +140 -3
- package/src/lib/record/data-source.d.ts +140 -3
- 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 +10 -0
- package/src/lib/record/day-words.d.ts +10 -0
- package/src/lib/record/day-words.js +23 -0
- package/src/lib/record/day-words.js.map +1 -0
- package/src/lib/record/day-words.mjs +20 -0
- package/src/lib/record/day-words.mjs.map +1 -0
- package/src/lib/record/drafts.d.mts +19 -0
- package/src/lib/record/drafts.d.ts +19 -0
- package/src/lib/record/drafts.js +35 -0
- package/src/lib/record/drafts.js.map +1 -0
- package/src/lib/record/drafts.mjs +31 -0
- package/src/lib/record/drafts.mjs.map +1 -0
- package/src/lib/record/env.d.mts +5 -1
- package/src/lib/record/env.d.ts +5 -1
- package/src/lib/record/env.js +9 -1
- package/src/lib/record/env.js.map +1 -1
- package/src/lib/record/env.mjs +8 -1
- package/src/lib/record/env.mjs.map +1 -1
- package/src/lib/record/form-limits.d.mts +78 -0
- package/src/lib/record/form-limits.d.ts +78 -0
- package/src/lib/record/form-limits.js +230 -0
- package/src/lib/record/form-limits.js.map +1 -0
- package/src/lib/record/form-limits.mjs +223 -0
- package/src/lib/record/form-limits.mjs.map +1 -0
- package/src/lib/record/form.d.mts +180 -9
- package/src/lib/record/form.d.ts +180 -9
- package/src/lib/record/form.js +858 -90
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +858 -90
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/limits-part.d.mts +6 -0
- package/src/lib/record/limits-part.d.ts +6 -0
- package/src/lib/record/limits-part.js +12 -0
- package/src/lib/record/limits-part.js.map +1 -0
- package/src/lib/record/limits-part.mjs +7 -0
- package/src/lib/record/limits-part.mjs.map +1 -0
- package/src/lib/record/limits.js +4 -2
- package/src/lib/record/limits.js.map +1 -1
- package/src/lib/record/limits.mjs +4 -2
- package/src/lib/record/limits.mjs.map +1 -1
- package/src/lib/record/line-choices.d.mts +30 -0
- package/src/lib/record/line-choices.d.ts +30 -0
- package/src/lib/record/line-choices.js +42 -0
- package/src/lib/record/line-choices.js.map +1 -0
- package/src/lib/record/line-choices.mjs +36 -0
- package/src/lib/record/line-choices.mjs.map +1 -0
- package/src/lib/record/locales/ar.js +11 -0
- package/src/lib/record/locales/ar.js.map +1 -1
- package/src/lib/record/locales/ar.mjs +11 -0
- package/src/lib/record/locales/ar.mjs.map +1 -1
- package/src/lib/record/locales/de.js +11 -0
- package/src/lib/record/locales/de.js.map +1 -1
- package/src/lib/record/locales/de.mjs +11 -0
- package/src/lib/record/locales/de.mjs.map +1 -1
- package/src/lib/record/locales/fr.js +11 -0
- package/src/lib/record/locales/fr.js.map +1 -1
- package/src/lib/record/locales/fr.mjs +11 -0
- package/src/lib/record/locales/fr.mjs.map +1 -1
- package/src/lib/record/memory-data-source.d.mts +44 -3
- package/src/lib/record/memory-data-source.d.ts +44 -3
- package/src/lib/record/memory-data-source.js +102 -40
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +101 -40
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-kept.d.mts +20 -0
- package/src/lib/record/memory-kept.d.ts +20 -0
- package/src/lib/record/memory-kept.js +46 -0
- package/src/lib/record/memory-kept.js.map +1 -0
- package/src/lib/record/memory-kept.mjs +43 -0
- package/src/lib/record/memory-kept.mjs.map +1 -0
- package/src/lib/record/memory-later.d.mts +19 -0
- package/src/lib/record/memory-later.d.ts +19 -0
- package/src/lib/record/memory-later.js +39 -0
- package/src/lib/record/memory-later.js.map +1 -0
- package/src/lib/record/memory-later.mjs +35 -0
- package/src/lib/record/memory-later.mjs.map +1 -0
- package/src/lib/record/memory-part.d.mts +7 -0
- package/src/lib/record/memory-part.d.ts +7 -0
- package/src/lib/record/memory-part.js +13 -0
- package/src/lib/record/memory-part.js.map +1 -0
- package/src/lib/record/memory-part.mjs +8 -0
- package/src/lib/record/memory-part.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +27 -2
- package/src/lib/record/messages.d.ts +27 -2
- package/src/lib/record/messages.js +13 -4
- package/src/lib/record/messages.js.map +1 -1
- package/src/lib/record/messages.mjs +13 -4
- package/src/lib/record/messages.mjs.map +1 -1
- package/src/lib/record/option-rules.d.mts +56 -0
- package/src/lib/record/option-rules.d.ts +56 -0
- package/src/lib/record/option-rules.js +143 -0
- package/src/lib/record/option-rules.js.map +1 -0
- package/src/lib/record/option-rules.mjs +140 -0
- package/src/lib/record/option-rules.mjs.map +1 -0
- package/src/lib/record/record-words.d.mts +13 -1
- package/src/lib/record/record-words.d.ts +13 -1
- package/src/lib/record/record-words.js +29 -1
- package/src/lib/record/record-words.js.map +1 -1
- package/src/lib/record/record-words.mjs +27 -1
- package/src/lib/record/record-words.mjs.map +1 -1
- package/src/lib/record/rules.d.mts +2 -2
- package/src/lib/record/rules.d.ts +2 -2
- package/src/lib/record/rules.js +3 -3
- package/src/lib/record/rules.js.map +1 -1
- package/src/lib/record/rules.mjs +3 -3
- package/src/lib/record/rules.mjs.map +1 -1
- package/src/lib/record/run.js +9 -7
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +9 -7
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/search.d.mts +12 -2
- package/src/lib/record/search.d.ts +12 -2
- package/src/lib/record/search.js +29 -4
- package/src/lib/record/search.js.map +1 -1
- package/src/lib/record/search.mjs +29 -4
- package/src/lib/record/search.mjs.map +1 -1
- package/src/lib/record/set-when.d.mts +3 -3
- package/src/lib/record/set-when.d.ts +3 -3
- package/src/lib/record/set-when.js +9 -9
- package/src/lib/record/set-when.js.map +1 -1
- package/src/lib/record/set-when.mjs +9 -9
- package/src/lib/record/set-when.mjs.map +1 -1
- package/src/lib/record/signed.d.mts +21 -0
- package/src/lib/record/signed.d.ts +21 -0
- package/src/lib/record/signed.js +62 -0
- package/src/lib/record/signed.js.map +1 -0
- package/src/lib/record/signed.mjs +57 -0
- package/src/lib/record/signed.mjs.map +1 -0
- package/src/lib/record/taking.d.mts +60 -0
- package/src/lib/record/taking.d.ts +60 -0
- package/src/lib/record/taking.js +58 -0
- package/src/lib/record/taking.js.map +1 -0
- package/src/lib/record/taking.mjs +50 -0
- package/src/lib/record/taking.mjs.map +1 -0
- package/src/lib/record/value-map.js +11 -4
- package/src/lib/record/value-map.js.map +1 -1
- package/src/lib/record/value-map.mjs +11 -4
- package/src/lib/record/value-map.mjs.map +1 -1
- package/src/lib/record/values.d.mts +20 -0
- package/src/lib/record/values.d.ts +20 -0
- package/src/lib/record/values.js.map +1 -1
- package/src/lib/record/values.mjs.map +1 -1
- package/src/lib/record/waits.d.mts +13 -6
- package/src/lib/record/waits.d.ts +13 -6
- package/src/lib/record/waits.js +9 -12
- package/src/lib/record/waits.js.map +1 -1
- package/src/lib/record/waits.mjs +9 -12
- package/src/lib/record/waits.mjs.map +1 -1
- package/src/runtime.d.mts +17 -6
- package/src/runtime.d.ts +17 -6
- package/src/runtime.js +45 -3
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +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AAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAA6B,CAAC;IACpQ,KAAK,MAAM,IAAI,IAAI,sBAAc,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAE,IAAI,CAAC,IAAI,CAA+C,CAAC,GAAG,IAAI,CAAC,CAAC;YAC5G,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,MAAqC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { lazyPart } from '../parts.mjs';
|
|
2
|
+
import { memoryKept } from './memory-kept.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* A memory source's members, loaded the first time a page makes one (`createMemoryDataSource`): the one-tag script's
|
|
5
|
+
* (tools/script-entry.ts), where an app that gives its own data source never downloads them.
|
|
6
|
+
*/
|
|
7
|
+
export const memoryPart = lazyPart('memory', () => import('./memory-part.mjs'));
|
|
8
|
+
/** Every member of a data source a memory source answers, as its members do once they have come. */
|
|
9
|
+
export const MEMORY_MEMBERS = [
|
|
10
|
+
'load', 'save', 'onchange', 'search', 'create', 'submit', 'list', 'groups', 'options', 'definitions', 'saveDefinitions', 'archive', 'copy', 'delete',
|
|
11
|
+
'attachments', 'totals', 'upload', 'slots', 'writeMany', 'createMany', 'duplicates', 'merge', 'notDuplicates', 'markNotDuplicate', 'limits', 'saveDraft', 'loadDraft',
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* The one-tag script's memory source: what it keeps — its records, responses, calls, drafts, its versions, and what
|
|
15
|
+
* someone else does to them (`changeElsewhere`, `answeredElsewhere`) — at once, every member answering once the memory
|
|
16
|
+
* part has come (each call waits for it, the first asking for it; one that could not come asks again next time). Once
|
|
17
|
+
* it is in, a source is made whole at once, as the packages' is.
|
|
18
|
+
*/
|
|
19
|
+
export function createMemoryDataSource(options = {}) {
|
|
20
|
+
const part = memoryPart.loaded;
|
|
21
|
+
if (part)
|
|
22
|
+
return part.createMemoryDataSource(options);
|
|
23
|
+
const kept = memoryKept(options);
|
|
24
|
+
let made;
|
|
25
|
+
const members = () => memoryPart.load().then((loaded) => (made ??= loaded.memorySource(options, kept)));
|
|
26
|
+
const source = { records: kept.records, notDuplicatePairs: kept.notDuplicatePairs, responses: kept.responses, calls: kept.calls, drafts: kept.drafts, changeElsewhere: kept.changeElsewhere, answeredElsewhere: kept.answeredElsewhere };
|
|
27
|
+
for (const name of MEMORY_MEMBERS) {
|
|
28
|
+
source[name] = (...args) => {
|
|
29
|
+
const call = (from) => from[name](...args);
|
|
30
|
+
return made ? call(made) : members().then(call);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return source;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=memory-later.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-later.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-later.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;AAE9F,oGAAoG;AACpG,MAAM,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AC,GAAG,IAAe,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAE,IAAI,CAAC,IAAI,CAA+C,CAAC,GAAG,IAAI,CAAC,CAAC;YAC5G,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,MAAqC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The memory part (memory-later.ts): a memory source's members — every one a backend has, working on what the source
|
|
3
|
+
* keeps — for the one-tag script, whose `createMemoryDataSource` hands an app its source at once and its members as
|
|
4
|
+
* this part comes. A page whose app gives its own data source never loads it. The packages' `createMemoryDataSource`
|
|
5
|
+
* is whole, as ever.
|
|
6
|
+
*/
|
|
7
|
+
export { createMemoryDataSource, memorySource } from './memory-data-source.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The memory part (memory-later.ts): a memory source's members — every one a backend has, working on what the source
|
|
3
|
+
* keeps — for the one-tag script, whose `createMemoryDataSource` hands an app its source at once and its members as
|
|
4
|
+
* this part comes. A page whose app gives its own data source never loads it. The packages' `createMemoryDataSource`
|
|
5
|
+
* is whole, as ever.
|
|
6
|
+
*/
|
|
7
|
+
export { createMemoryDataSource, memorySource } from './memory-data-source';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.memorySource = exports.createMemoryDataSource = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The memory part (memory-later.ts): a memory source's members — every one a backend has, working on what the source
|
|
6
|
+
* keeps — for the one-tag script, whose `createMemoryDataSource` hands an app its source at once and its members as
|
|
7
|
+
* this part comes. A page whose app gives its own data source never loads it. The packages' `createMemoryDataSource`
|
|
8
|
+
* is whole, as ever.
|
|
9
|
+
*/
|
|
10
|
+
var memory_data_source_1 = require("./memory-data-source");
|
|
11
|
+
Object.defineProperty(exports, "createMemoryDataSource", { enumerable: true, get: function () { return memory_data_source_1.createMemoryDataSource; } });
|
|
12
|
+
Object.defineProperty(exports, "memorySource", { enumerable: true, get: function () { return memory_data_source_1.memorySource; } });
|
|
13
|
+
//# sourceMappingURL=memory-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-part.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-part.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2DAA4E;AAAnE,4HAAA,sBAAsB,OAAA;AAAE,kHAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The memory part (memory-later.ts): a memory source's members — every one a backend has, working on what the source
|
|
3
|
+
* keeps — for the one-tag script, whose `createMemoryDataSource` hands an app its source at once and its members as
|
|
4
|
+
* this part comes. A page whose app gives its own data source never loads it. The packages' `createMemoryDataSource`
|
|
5
|
+
* is whole, as ever.
|
|
6
|
+
*/
|
|
7
|
+
export { createMemoryDataSource, memorySource } from './memory-data-source.mjs';
|
|
8
|
+
//# sourceMappingURL=memory-part.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-part.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-part.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DateOrder } from './input-rules.mjs';
|
|
1
2
|
/**
|
|
2
3
|
* Validation messages, by language. `{label}` is the field's label; the other
|
|
3
4
|
* placeholders are named in each English message. English keeps the React
|
|
@@ -5,6 +6,8 @@
|
|
|
5
6
|
*/
|
|
6
7
|
export interface Messages {
|
|
7
8
|
required: string;
|
|
9
|
+
/** Required, of a label that is a question (`isQuestion`): `{label}` is quoted already ("Please answer “How was it?”"). */
|
|
10
|
+
requiredQuestion: string;
|
|
8
11
|
maxLength: string;
|
|
9
12
|
pattern: string;
|
|
10
13
|
text: string;
|
|
@@ -128,6 +131,23 @@ export interface Messages {
|
|
|
128
131
|
timeStep: string;
|
|
129
132
|
/** A field's pattern that is no pattern, as checkPage says it: `{problem}` is the browser's words. */
|
|
130
133
|
patternBroken: string;
|
|
134
|
+
/** A value worked out from an app's function that asks its server: still asked, and its answer not come (`{problem}`, the app's words). */
|
|
135
|
+
stillWorkedOut: string;
|
|
136
|
+
notWorkedOut: string;
|
|
137
|
+
/** A choice taken out of an answer because a change of other answers no longer offers it: `{name}`, its label; several (`notOfferedNowMany`), their labels joined. */
|
|
138
|
+
notOfferedNow: string;
|
|
139
|
+
notOfferedNowMany: string;
|
|
140
|
+
/**
|
|
141
|
+
* Why a page takes no answers now (`limits`): before it opens and after it closed (`{when}`, its day, or its day and
|
|
142
|
+
* time), all its responses taken, this person's one sent already.
|
|
143
|
+
*/
|
|
144
|
+
formOpens: string;
|
|
145
|
+
formClosed: string;
|
|
146
|
+
formFull: string;
|
|
147
|
+
formSent: string;
|
|
148
|
+
/** A choice whose places are all taken (an option's `seats`): picked now (`choiceFull`), or held as it filled up. */
|
|
149
|
+
choiceFull: string;
|
|
150
|
+
choiceFilled: string;
|
|
131
151
|
/** The language the days in these messages are written in, as Intl reads it. */
|
|
132
152
|
locale: string;
|
|
133
153
|
/**
|
|
@@ -135,10 +155,15 @@ export interface Messages {
|
|
|
135
155
|
* a form's page asks (`lowerLabels`): set on the form's own messages, never in a language's table.
|
|
136
156
|
*/
|
|
137
157
|
lowerLabels?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The order the page writes its days in (`look.dateOrder`), as a message names a day ("can't be after 20 Oct 2026",
|
|
160
|
+
* `dayWords`): set on the form's own messages, never in a language's table. Day first without it.
|
|
161
|
+
*/
|
|
162
|
+
dateOrder?: DateOrder;
|
|
138
163
|
}
|
|
139
164
|
export type Locale = 'en' | 'ar' | 'de' | 'fr';
|
|
140
165
|
/** A message every language has: the sentences in a page's words for its records (`…Noun`) are each language's own to give. */
|
|
141
|
-
export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels'>;
|
|
166
|
+
export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels' | 'dateOrder'>;
|
|
142
167
|
/**
|
|
143
168
|
* The messages in every language Fieldia has. This package holds all four;
|
|
144
169
|
* the one-tag script holds English alone, and a page adds another language
|
|
@@ -148,7 +173,7 @@ export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels'
|
|
|
148
173
|
export declare const MESSAGES: Record<Locale, Messages>;
|
|
149
174
|
/**
|
|
150
175
|
* A message filled in (`fill`), each field's label as its sentence puts it (`labelAt`): small inside the sentence where
|
|
151
|
-
* the form's page asks (`messages.lowerLabels`), else as written.
|
|
176
|
+
* the form's page asks (`messages.lowerLabels`), a question quoted, else as written.
|
|
152
177
|
*/
|
|
153
178
|
export declare function fillMessage(messages: Messages, template: string, values: Record<string, string | number>): string;
|
|
154
179
|
/** Fill `{name}` placeholders. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DateOrder } from './input-rules';
|
|
1
2
|
/**
|
|
2
3
|
* Validation messages, by language. `{label}` is the field's label; the other
|
|
3
4
|
* placeholders are named in each English message. English keeps the React
|
|
@@ -5,6 +6,8 @@
|
|
|
5
6
|
*/
|
|
6
7
|
export interface Messages {
|
|
7
8
|
required: string;
|
|
9
|
+
/** Required, of a label that is a question (`isQuestion`): `{label}` is quoted already ("Please answer “How was it?”"). */
|
|
10
|
+
requiredQuestion: string;
|
|
8
11
|
maxLength: string;
|
|
9
12
|
pattern: string;
|
|
10
13
|
text: string;
|
|
@@ -128,6 +131,23 @@ export interface Messages {
|
|
|
128
131
|
timeStep: string;
|
|
129
132
|
/** A field's pattern that is no pattern, as checkPage says it: `{problem}` is the browser's words. */
|
|
130
133
|
patternBroken: string;
|
|
134
|
+
/** A value worked out from an app's function that asks its server: still asked, and its answer not come (`{problem}`, the app's words). */
|
|
135
|
+
stillWorkedOut: string;
|
|
136
|
+
notWorkedOut: string;
|
|
137
|
+
/** A choice taken out of an answer because a change of other answers no longer offers it: `{name}`, its label; several (`notOfferedNowMany`), their labels joined. */
|
|
138
|
+
notOfferedNow: string;
|
|
139
|
+
notOfferedNowMany: string;
|
|
140
|
+
/**
|
|
141
|
+
* Why a page takes no answers now (`limits`): before it opens and after it closed (`{when}`, its day, or its day and
|
|
142
|
+
* time), all its responses taken, this person's one sent already.
|
|
143
|
+
*/
|
|
144
|
+
formOpens: string;
|
|
145
|
+
formClosed: string;
|
|
146
|
+
formFull: string;
|
|
147
|
+
formSent: string;
|
|
148
|
+
/** A choice whose places are all taken (an option's `seats`): picked now (`choiceFull`), or held as it filled up. */
|
|
149
|
+
choiceFull: string;
|
|
150
|
+
choiceFilled: string;
|
|
131
151
|
/** The language the days in these messages are written in, as Intl reads it. */
|
|
132
152
|
locale: string;
|
|
133
153
|
/**
|
|
@@ -135,10 +155,15 @@ export interface Messages {
|
|
|
135
155
|
* a form's page asks (`lowerLabels`): set on the form's own messages, never in a language's table.
|
|
136
156
|
*/
|
|
137
157
|
lowerLabels?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The order the page writes its days in (`look.dateOrder`), as a message names a day ("can't be after 20 Oct 2026",
|
|
160
|
+
* `dayWords`): set on the form's own messages, never in a language's table. Day first without it.
|
|
161
|
+
*/
|
|
162
|
+
dateOrder?: DateOrder;
|
|
138
163
|
}
|
|
139
164
|
export type Locale = 'en' | 'ar' | 'de' | 'fr';
|
|
140
165
|
/** A message every language has: the sentences in a page's words for its records (`…Noun`) are each language's own to give. */
|
|
141
|
-
export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels'>;
|
|
166
|
+
export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels' | 'dateOrder'>;
|
|
142
167
|
/**
|
|
143
168
|
* The messages in every language Fieldia has. This package holds all four;
|
|
144
169
|
* the one-tag script holds English alone, and a page adds another language
|
|
@@ -148,7 +173,7 @@ export type MessageKey = Exclude<keyof Messages, `${string}Noun` | 'lowerLabels'
|
|
|
148
173
|
export declare const MESSAGES: Record<Locale, Messages>;
|
|
149
174
|
/**
|
|
150
175
|
* A message filled in (`fill`), each field's label as its sentence puts it (`labelAt`): small inside the sentence where
|
|
151
|
-
* the form's page asks (`messages.lowerLabels`), else as written.
|
|
176
|
+
* the form's page asks (`messages.lowerLabels`), a question quoted, else as written.
|
|
152
177
|
*/
|
|
153
178
|
export declare function fillMessage(messages: Messages, template: string, values: Record<string, string | number>): string;
|
|
154
179
|
/** Fill `{name}` placeholders. */
|
|
@@ -8,6 +8,7 @@ const record_words_1 = require("./record-words");
|
|
|
8
8
|
/** English: always here, and the words a language leaves out. */
|
|
9
9
|
const en = {
|
|
10
10
|
required: '{label} is required',
|
|
11
|
+
requiredQuestion: 'Please answer {label}',
|
|
11
12
|
maxLength: '{label} takes at most {max} characters',
|
|
12
13
|
pattern: '{label} is not in the expected format',
|
|
13
14
|
text: '{label} must be text',
|
|
@@ -87,6 +88,16 @@ const en = {
|
|
|
87
88
|
endBeforeStart: '{end} can’t be before {start}',
|
|
88
89
|
timeStep: '{label}: times go in steps of {step} minutes, like {example} or {next}',
|
|
89
90
|
patternBroken: 'The pattern of {label} is not a valid pattern: {problem}',
|
|
91
|
+
stillWorkedOut: '{label} is still being worked out',
|
|
92
|
+
notWorkedOut: '{label} could not be worked out: {problem}',
|
|
93
|
+
notOfferedNow: '{name} is no longer offered, so it was taken out',
|
|
94
|
+
notOfferedNowMany: '{name} are no longer offered, so they were taken out',
|
|
95
|
+
formOpens: 'This form opens on {when}.',
|
|
96
|
+
formClosed: 'This form closed on {when}.',
|
|
97
|
+
formFull: 'This form has all the responses it takes.',
|
|
98
|
+
formSent: 'You have sent your answers to this form already.',
|
|
99
|
+
choiceFull: '{option} is full',
|
|
100
|
+
choiceFilled: '{option} is full now: choose another',
|
|
90
101
|
locale: 'en',
|
|
91
102
|
};
|
|
92
103
|
/**
|
|
@@ -100,15 +111,13 @@ exports.MESSAGES = { en, ...all_1.LANGUAGES };
|
|
|
100
111
|
const LABELS = ['label', 'column', 'start', 'end'];
|
|
101
112
|
/**
|
|
102
113
|
* A message filled in (`fill`), each field's label as its sentence puts it (`labelAt`): small inside the sentence where
|
|
103
|
-
* the form's page asks (`messages.lowerLabels`), else as written.
|
|
114
|
+
* the form's page asks (`messages.lowerLabels`), a question quoted, else as written.
|
|
104
115
|
*/
|
|
105
116
|
function fillMessage(messages, template, values) {
|
|
106
|
-
if (!messages.lowerLabels)
|
|
107
|
-
return fill(template, values);
|
|
108
117
|
const own = { ...values };
|
|
109
118
|
for (const key of LABELS)
|
|
110
119
|
if (typeof own[key] === 'string')
|
|
111
|
-
own[key] = (0, record_words_1.labelAt)(template, key,
|
|
120
|
+
own[key] = (0, record_words_1.labelAt)(template, key, messages.lowerLabels, messages.locale)(own[key]);
|
|
112
121
|
return fill(template, own);
|
|
113
122
|
}
|
|
114
123
|
/** Fill `{name}` placeholders. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":";;;AA2RA,kCAIC;AAGD,oBAEC;AApSD,uCAA0C;AAC1C,iDAAyC;AA2KzC,iEAAiE;AACjE,MAAM,EAAE,GAAa;IACnB,QAAQ,EAAE,qBAAqB;IAC/B,gBAAgB,EAAE,uBAAuB;IACzC,SAAS,EAAE,wCAAwC;IACnD,OAAO,EAAE,uCAAuC;IAChD,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,0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AACzG,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAEnD;;;GAGG;AACH,SAAgB,WAAW,CAAC,QAAkB,EAAE,QAAgB,EAAE,MAAuC;IACvG,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,MAAM;QAAE,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sBAAO,EAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAW,CAAC,CAAC;IACzJ,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED,kCAAkC;AAClC,SAAgB,IAAI,CAAC,QAAgB,EAAE,MAAuC;IAC5E,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { labelAt } from './record-words.mjs';
|
|
|
3
3
|
/** English: always here, and the words a language leaves out. */
|
|
4
4
|
const en = {
|
|
5
5
|
required: '{label} is required',
|
|
6
|
+
requiredQuestion: 'Please answer {label}',
|
|
6
7
|
maxLength: '{label} takes at most {max} characters',
|
|
7
8
|
pattern: '{label} is not in the expected format',
|
|
8
9
|
text: '{label} must be text',
|
|
@@ -82,6 +83,16 @@ const en = {
|
|
|
82
83
|
endBeforeStart: '{end} can’t be before {start}',
|
|
83
84
|
timeStep: '{label}: times go in steps of {step} minutes, like {example} or {next}',
|
|
84
85
|
patternBroken: 'The pattern of {label} is not a valid pattern: {problem}',
|
|
86
|
+
stillWorkedOut: '{label} is still being worked out',
|
|
87
|
+
notWorkedOut: '{label} could not be worked out: {problem}',
|
|
88
|
+
notOfferedNow: '{name} is no longer offered, so it was taken out',
|
|
89
|
+
notOfferedNowMany: '{name} are no longer offered, so they were taken out',
|
|
90
|
+
formOpens: 'This form opens on {when}.',
|
|
91
|
+
formClosed: 'This form closed on {when}.',
|
|
92
|
+
formFull: 'This form has all the responses it takes.',
|
|
93
|
+
formSent: 'You have sent your answers to this form already.',
|
|
94
|
+
choiceFull: '{option} is full',
|
|
95
|
+
choiceFilled: '{option} is full now: choose another',
|
|
85
96
|
locale: 'en',
|
|
86
97
|
};
|
|
87
98
|
/**
|
|
@@ -95,15 +106,13 @@ export const MESSAGES = { en, ...LANGUAGES };
|
|
|
95
106
|
const LABELS = ['label', 'column', 'start', 'end'];
|
|
96
107
|
/**
|
|
97
108
|
* A message filled in (`fill`), each field's label as its sentence puts it (`labelAt`): small inside the sentence where
|
|
98
|
-
* the form's page asks (`messages.lowerLabels`), else as written.
|
|
109
|
+
* the form's page asks (`messages.lowerLabels`), a question quoted, else as written.
|
|
99
110
|
*/
|
|
100
111
|
export function fillMessage(messages, template, values) {
|
|
101
|
-
if (!messages.lowerLabels)
|
|
102
|
-
return fill(template, values);
|
|
103
112
|
const own = { ...values };
|
|
104
113
|
for (const key of LABELS)
|
|
105
114
|
if (typeof own[key] === 'string')
|
|
106
|
-
own[key] = labelAt(template, key,
|
|
115
|
+
own[key] = labelAt(template, key, messages.lowerLabels, messages.locale)(own[key]);
|
|
107
116
|
return fill(template, own);
|
|
108
117
|
}
|
|
109
118
|
/** Fill `{name}` placeholders. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO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AC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Option } from '../format/field.mjs';
|
|
2
|
+
import type { Page } from '../format/page.mjs';
|
|
3
|
+
import type { ExpressionEnv, FunctionTable } from '../expression/functions.mjs';
|
|
4
|
+
import { type About, type AppReads } from './env.mjs';
|
|
5
|
+
import type { FormState } from './form.mjs';
|
|
6
|
+
import type { Line, Value, Values } from './values.mjs';
|
|
7
|
+
/**
|
|
8
|
+
* A page's options by condition and carried from an earlier question (the options part): each option shown or hidden
|
|
9
|
+
* by its `invisible` — a page's choice's, and a table line's on its line — the options picked in an earlier question
|
|
10
|
+
* offered in a later one (`optionsFrom.field`), and a chosen option a change no longer offers taken out of its answer,
|
|
11
|
+
* said. A form on a page with any makes this from the part as it comes (form.ts); before, its choices offer their own
|
|
12
|
+
* options, nothing is taken out, and a save waits for it.
|
|
13
|
+
*/
|
|
14
|
+
/** What the options ask of the form they are made for. */
|
|
15
|
+
export interface OptionsHost {
|
|
16
|
+
readonly page: Page;
|
|
17
|
+
readonly table: FunctionTable | undefined;
|
|
18
|
+
readonly app: AppReads;
|
|
19
|
+
state(): FormState;
|
|
20
|
+
today(): string;
|
|
21
|
+
about(): About;
|
|
22
|
+
/** The values as expressions read them now, and what else they read. */
|
|
23
|
+
reading(): {
|
|
24
|
+
context: Record<string, unknown>;
|
|
25
|
+
env: ExpressionEnv;
|
|
26
|
+
};
|
|
27
|
+
/** Values worked out again after a write: what is taken out may take another's away. */
|
|
28
|
+
settle(values: Values): Values;
|
|
29
|
+
/** What is said of options taken out of an answer, by their labels. */
|
|
30
|
+
words(labels: string[]): string;
|
|
31
|
+
}
|
|
32
|
+
/** A page's options by condition and carried, made for a form (`optionRules`). */
|
|
33
|
+
export interface OptionRules {
|
|
34
|
+
/** A choice's options as they are offered for these values, read with `read`: see `Form.offered`. */
|
|
35
|
+
offered(name: string, values: Readonly<Values>, read: {
|
|
36
|
+
context: Record<string, unknown>;
|
|
37
|
+
env: ExpressionEnv;
|
|
38
|
+
}): Option[];
|
|
39
|
+
/** A table line's choice's options as they are offered on that line, its conditions read on it and `record` its record's context. */
|
|
40
|
+
lineOffered(lines: string, line: Line, column: string, record: Record<string, unknown>): Option[];
|
|
41
|
+
/**
|
|
42
|
+
* The chosen options a write no longer offers taken out of their answers, with what is said: those offered before it
|
|
43
|
+
* and not after. Null when none goes.
|
|
44
|
+
*/
|
|
45
|
+
takeOut(before: Readonly<Values>, after: Values): {
|
|
46
|
+
values: Values;
|
|
47
|
+
said: Record<string, string>;
|
|
48
|
+
gone: Record<string, TakenOption[]>;
|
|
49
|
+
} | null;
|
|
50
|
+
}
|
|
51
|
+
/** An option taken out of an answer, as its note names it: so the note goes once it is offered again. */
|
|
52
|
+
export interface TakenOption {
|
|
53
|
+
readonly value: Value;
|
|
54
|
+
readonly label: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function optionRules(host: OptionsHost): OptionRules;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Option } from '../format/field';
|
|
2
|
+
import type { Page } from '../format/page';
|
|
3
|
+
import type { ExpressionEnv, FunctionTable } from '../expression/functions';
|
|
4
|
+
import { type About, type AppReads } from './env';
|
|
5
|
+
import type { FormState } from './form';
|
|
6
|
+
import type { Line, Value, Values } from './values';
|
|
7
|
+
/**
|
|
8
|
+
* A page's options by condition and carried from an earlier question (the options part): each option shown or hidden
|
|
9
|
+
* by its `invisible` — a page's choice's, and a table line's on its line — the options picked in an earlier question
|
|
10
|
+
* offered in a later one (`optionsFrom.field`), and a chosen option a change no longer offers taken out of its answer,
|
|
11
|
+
* said. A form on a page with any makes this from the part as it comes (form.ts); before, its choices offer their own
|
|
12
|
+
* options, nothing is taken out, and a save waits for it.
|
|
13
|
+
*/
|
|
14
|
+
/** What the options ask of the form they are made for. */
|
|
15
|
+
export interface OptionsHost {
|
|
16
|
+
readonly page: Page;
|
|
17
|
+
readonly table: FunctionTable | undefined;
|
|
18
|
+
readonly app: AppReads;
|
|
19
|
+
state(): FormState;
|
|
20
|
+
today(): string;
|
|
21
|
+
about(): About;
|
|
22
|
+
/** The values as expressions read them now, and what else they read. */
|
|
23
|
+
reading(): {
|
|
24
|
+
context: Record<string, unknown>;
|
|
25
|
+
env: ExpressionEnv;
|
|
26
|
+
};
|
|
27
|
+
/** Values worked out again after a write: what is taken out may take another's away. */
|
|
28
|
+
settle(values: Values): Values;
|
|
29
|
+
/** What is said of options taken out of an answer, by their labels. */
|
|
30
|
+
words(labels: string[]): string;
|
|
31
|
+
}
|
|
32
|
+
/** A page's options by condition and carried, made for a form (`optionRules`). */
|
|
33
|
+
export interface OptionRules {
|
|
34
|
+
/** A choice's options as they are offered for these values, read with `read`: see `Form.offered`. */
|
|
35
|
+
offered(name: string, values: Readonly<Values>, read: {
|
|
36
|
+
context: Record<string, unknown>;
|
|
37
|
+
env: ExpressionEnv;
|
|
38
|
+
}): Option[];
|
|
39
|
+
/** A table line's choice's options as they are offered on that line, its conditions read on it and `record` its record's context. */
|
|
40
|
+
lineOffered(lines: string, line: Line, column: string, record: Record<string, unknown>): Option[];
|
|
41
|
+
/**
|
|
42
|
+
* The chosen options a write no longer offers taken out of their answers, with what is said: those offered before it
|
|
43
|
+
* and not after. Null when none goes.
|
|
44
|
+
*/
|
|
45
|
+
takeOut(before: Readonly<Values>, after: Values): {
|
|
46
|
+
values: Values;
|
|
47
|
+
said: Record<string, string>;
|
|
48
|
+
gone: Record<string, TakenOption[]>;
|
|
49
|
+
} | null;
|
|
50
|
+
}
|
|
51
|
+
/** An option taken out of an answer, as its note names it: so the note goes once it is offered again. */
|
|
52
|
+
export interface TakenOption {
|
|
53
|
+
readonly value: Value;
|
|
54
|
+
readonly label: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function optionRules(host: OptionsHost): OptionRules;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionRules = optionRules;
|
|
4
|
+
const choice_options_1 = require("../format/choice-options");
|
|
5
|
+
const modifier_1 = require("../expression/modifier");
|
|
6
|
+
const env_1 = require("./env");
|
|
7
|
+
/** A choice's options that show or hide by a condition, read once: by each option's value. */
|
|
8
|
+
function rulesOf(options, table) {
|
|
9
|
+
const rules = new Map();
|
|
10
|
+
for (const option of options)
|
|
11
|
+
if (option.invisible !== undefined && option.invisible !== false)
|
|
12
|
+
rules.set(option.value, (0, modifier_1.compileModifier)(option.invisible, table));
|
|
13
|
+
return rules;
|
|
14
|
+
}
|
|
15
|
+
function optionRules(host) {
|
|
16
|
+
const { page, table, app, today } = host;
|
|
17
|
+
/** The app's list a choice's options come from; none for one whose options are its own or carried. */
|
|
18
|
+
const fromList = (name) => (0, choice_options_1.optionsList)(page.fields[name]?.optionsFrom);
|
|
19
|
+
/** Each choice's options that show or hide by a condition, read once: by the field, by each option's value. */
|
|
20
|
+
const optionRules = new Map();
|
|
21
|
+
for (const [name, def] of Object.entries(page.fields)) {
|
|
22
|
+
if (def.type !== 'selection')
|
|
23
|
+
continue;
|
|
24
|
+
const rules = rulesOf(def.options, table);
|
|
25
|
+
if (rules.size)
|
|
26
|
+
optionRules.set(name, rules);
|
|
27
|
+
}
|
|
28
|
+
/** The choices whose options change with the record's answers. */
|
|
29
|
+
const changing = Object.keys(page.fields).filter((name) => optionRules.has(name) || (page.fields[name].type === 'selection' && !!(0, choice_options_1.optionsField)(page.fields[name].optionsFrom)));
|
|
30
|
+
/**
|
|
31
|
+
* A table line's choices whose options show or hide by a condition on the line's values (and `parent.` the record's),
|
|
32
|
+
* read once: by the table, its column, each option's value.
|
|
33
|
+
*/
|
|
34
|
+
const lineOptionRules = new Map();
|
|
35
|
+
for (const [lines, def] of Object.entries(page.fields)) {
|
|
36
|
+
if (def.type !== 'one2many')
|
|
37
|
+
continue;
|
|
38
|
+
for (const [column, sub] of Object.entries(def.fields)) {
|
|
39
|
+
if (sub.type !== 'selection')
|
|
40
|
+
continue;
|
|
41
|
+
const rules = rulesOf(sub.options, table);
|
|
42
|
+
if (!rules.size)
|
|
43
|
+
continue;
|
|
44
|
+
if (!lineOptionRules.has(lines))
|
|
45
|
+
lineOptionRules.set(lines, new Map());
|
|
46
|
+
lineOptionRules.get(lines)?.set(column, rules);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function lineOffered(lines, line, column, record) {
|
|
50
|
+
const sub = page.fields[lines].fields[column];
|
|
51
|
+
const options = ((0, choice_options_1.optionsList)(sub.optionsFrom) && host.state().choices[`${lines}.${line.key}.${column}`]?.options) || sub.options;
|
|
52
|
+
const rules = lineOptionRules.get(lines)?.get(column);
|
|
53
|
+
if (!rules)
|
|
54
|
+
return [...options];
|
|
55
|
+
const context = (0, env_1.lineContext)(line.values, page.fields[lines].fields, record, line.id ?? null);
|
|
56
|
+
const env = { ...app, today };
|
|
57
|
+
return options.filter((o) => !rules.get(o.value)?.evaluate(context, env));
|
|
58
|
+
}
|
|
59
|
+
function offeredIn(name, values, read, seen = []) {
|
|
60
|
+
const def = page.fields[name];
|
|
61
|
+
const carried = (0, choice_options_1.optionsField)(def.optionsFrom);
|
|
62
|
+
let options;
|
|
63
|
+
if (carried && page.fields[carried.field]?.type === 'selection' && !seen.includes(carried.field)) {
|
|
64
|
+
const picked = new Set([values[carried.field]].flat().filter((value) => value !== null && value !== undefined));
|
|
65
|
+
// A "None of these" goes alone: it is no choice to carry.
|
|
66
|
+
const from = offeredIn(carried.field, values, read, [...seen, name]).filter((o) => !o.exclusive && picked.has(o.value) === (carried.picked !== false));
|
|
67
|
+
options = [...from.map(({ invisible: _, ...option }) => option), ...def.options];
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
options = (fromList(name) && host.state().choices[name]?.options) || def.options;
|
|
71
|
+
const rules = optionRules.get(name);
|
|
72
|
+
return rules ? options.filter((o) => !rules.get(o.value)?.evaluate(read.context, read.env)) : [...options];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The chosen options a write no longer offers — hidden by their condition, or no longer picked where they are
|
|
76
|
+
* carried from — taken out of their answers, with what is said: those offered before it and not after, so a record
|
|
77
|
+
* opened holding one keeps it, and says so. A table line's alike, by its cell's path, its conditions read on the line
|
|
78
|
+
* as it was and as it is. Again while one taken out takes another's away. Null when none goes.
|
|
79
|
+
*/
|
|
80
|
+
function takeOut(before, after) {
|
|
81
|
+
if (!changing.length && !lineOptionRules.size)
|
|
82
|
+
return null;
|
|
83
|
+
const was = before === host.state().values ? host.reading() : { context: (0, env_1.recordContext)(before, page.fields, host.about()), env: (0, env_1.expressionEnv)(before, page.fields, today, app) };
|
|
84
|
+
const said = {};
|
|
85
|
+
const taken = {};
|
|
86
|
+
/** Said at a path: the options gone, by their labels as they were offered. */
|
|
87
|
+
const say = (path, gone, offeredBefore) => {
|
|
88
|
+
taken[path] = gone.map((value) => ({ value: value, label: offeredBefore.get(value) ?? String(value) }));
|
|
89
|
+
said[path] = host.words(taken[path].map((option) => option.label));
|
|
90
|
+
};
|
|
91
|
+
let values = after;
|
|
92
|
+
for (let round = 0; round < 4; round++) {
|
|
93
|
+
const now = { context: (0, env_1.recordContext)(values, page.fields, host.about()), env: (0, env_1.expressionEnv)(values, page.fields, today, app) };
|
|
94
|
+
let next = values;
|
|
95
|
+
for (const name of changing) {
|
|
96
|
+
const chosen = [values[name]].flat().filter((value) => value !== null && value !== undefined);
|
|
97
|
+
if (!chosen.length)
|
|
98
|
+
continue;
|
|
99
|
+
const offeredBefore = new Map(offeredIn(name, before, was).map((o) => [o.value, o.label]));
|
|
100
|
+
const offeredNow = new Set(offeredIn(name, values, now).map((o) => o.value));
|
|
101
|
+
const gone = chosen.filter((value) => offeredBefore.has(value) && !offeredNow.has(value));
|
|
102
|
+
if (!gone.length)
|
|
103
|
+
continue;
|
|
104
|
+
const held = values[name];
|
|
105
|
+
next = { ...next, [name]: Array.isArray(held) ? held.filter((value) => !gone.includes(value)) : null };
|
|
106
|
+
say(name, gone, offeredBefore);
|
|
107
|
+
}
|
|
108
|
+
// A line's choice its line's change hides: only a line that was there, and what it offered then.
|
|
109
|
+
for (const [lines, columns] of lineOptionRules) {
|
|
110
|
+
const rows = values[lines] ?? [];
|
|
111
|
+
const rowsBefore = before[lines] ?? [];
|
|
112
|
+
let written = null;
|
|
113
|
+
rows.forEach((line, i) => {
|
|
114
|
+
const old = rowsBefore.find((one) => one.key === line.key);
|
|
115
|
+
if (!old)
|
|
116
|
+
return;
|
|
117
|
+
for (const column of columns.keys()) {
|
|
118
|
+
const held = (written?.[i] ?? line).values[column];
|
|
119
|
+
const chosen = [held].flat().filter((value) => value !== null && value !== undefined);
|
|
120
|
+
if (!chosen.length)
|
|
121
|
+
continue;
|
|
122
|
+
const offeredBefore = new Map(lineOffered(lines, old, column, was.context).map((o) => [o.value, o.label]));
|
|
123
|
+
const offeredNow = new Set(lineOffered(lines, written?.[i] ?? line, column, now.context).map((o) => o.value));
|
|
124
|
+
const gone = chosen.filter((value) => offeredBefore.has(value) && !offeredNow.has(value));
|
|
125
|
+
if (!gone.length)
|
|
126
|
+
continue;
|
|
127
|
+
written ??= [...rows];
|
|
128
|
+
written[i] = { ...written[i], values: { ...written[i].values, [column]: (Array.isArray(held) ? held.filter((value) => !gone.includes(value)) : null) } };
|
|
129
|
+
say(`${lines}.${line.key}.${column}`, gone, offeredBefore);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
if (written)
|
|
133
|
+
next = { ...next, [lines]: written };
|
|
134
|
+
}
|
|
135
|
+
if (next === values)
|
|
136
|
+
break;
|
|
137
|
+
values = host.settle(next);
|
|
138
|
+
}
|
|
139
|
+
return Object.keys(said).length ? { values, said, gone: taken } : null;
|
|
140
|
+
}
|
|
141
|
+
return { offered: (name, values, read) => offeredIn(name, values, read), lineOffered, takeOut };
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=option-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-rules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