@marktiderman/genesis-forms 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations.cjs.map +1 -1
- package/dist/destinations.d.cts +1 -1
- package/dist/destinations.d.ts +1 -1
- package/dist/destinations.js.map +1 -1
- package/dist/{engine-BaHPC2-1.d.cts → engine-5_HNkWDD.d.cts} +2 -2
- package/dist/{engine-Da99Tv-E.d.ts → engine-B2HNqQDZ.d.ts} +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js.map +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js.map +1 -1
- package/dist/{submit-protocol-CFi-0Qd0.d.ts → submit-protocol-BKMZJXHr.d.ts} +5 -5
- package/dist/{submit-protocol-D0cOckmK.d.cts → submit-protocol-DvAwNA_O.d.cts} +5 -5
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js.map +1 -1
- package/dist/{types-C0pUfew3.d.cts → types-BBDa8oXu.d.cts} +1 -1
- package/dist/{types-C0pUfew3.d.ts → types-BBDa8oXu.d.ts} +1 -1
- package/dist/{validate-DpmBssFk.d.ts → validate-BhIx55N7.d.ts} +4 -4
- package/dist/{validate-U5LoW3eR.d.cts → validate-CocUgR5Q.d.cts} +4 -4
- package/package.json +2 -2
|
@@ -37,7 +37,7 @@ interface FieldBlock {
|
|
|
37
37
|
* options from, as `props.optionsFrom`. `source: "host"`: the app showing the
|
|
38
38
|
* form supplies the list named `key` when the form opens and again when a
|
|
39
39
|
* response is checked (`hostOptions` on `createForm` and `validateSubmission`),
|
|
40
|
-
* such as
|
|
40
|
+
* such as an organization's current staff. They follow the field's own
|
|
41
41
|
* `props.options`, if it has any.
|
|
42
42
|
*/
|
|
43
43
|
interface OptionsSource {
|
|
@@ -37,7 +37,7 @@ interface FieldBlock {
|
|
|
37
37
|
* options from, as `props.optionsFrom`. `source: "host"`: the app showing the
|
|
38
38
|
* form supplies the list named `key` when the form opens and again when a
|
|
39
39
|
* response is checked (`hostOptions` on `createForm` and `validateSubmission`),
|
|
40
|
-
* such as
|
|
40
|
+
* such as an organization's current staff. They follow the field's own
|
|
41
41
|
* `props.options`, if it has any.
|
|
42
42
|
*/
|
|
43
43
|
interface OptionsSource {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, e as FormEvent, F as FormDefinition, a as FieldBlock, b as ContentBlock, g as Operator, B as Block, O as OptionsSource } from './types-
|
|
1
|
+
import { J as Json, e as FormEvent, F as FormDefinition, a as FieldBlock, b as ContentBlock, g as Operator, B as Block, O as OptionsSource } from './types-BBDa8oXu.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Checking a block's `props` for `parseForm`: the shared helpers every content and field kind's
|
|
@@ -125,7 +125,7 @@ type LinkParams = {
|
|
|
125
125
|
* option calls this). Each choice question with `props.prefill: { param }` takes the parameter's
|
|
126
126
|
* value when it is one of the options the question shows (`visibleOptions`, so a filtered list is
|
|
127
127
|
* respected); anything else is ignored. A multiple choice takes every matching value, from
|
|
128
|
-
* repeated parameters (`?
|
|
128
|
+
* repeated parameters (`?staff=a&staff=b`) or one comma-separated value. Questions are filled in
|
|
129
129
|
* form order, so a filtered question sees what the link picked before it. A question `values`
|
|
130
130
|
* already answers (the host's own prefill) is left alone. The server checks these like any answer.
|
|
131
131
|
*/
|
|
@@ -323,7 +323,7 @@ interface ChoiceOption {
|
|
|
323
323
|
image?: string;
|
|
324
324
|
/**
|
|
325
325
|
* Facts about the option for filtering and recall, such as `{ location: ["riverside", "hilltop"] }`
|
|
326
|
-
* for
|
|
326
|
+
* for someone who works at two locations (see `props.optionsFrom.filter`). Names and values are
|
|
327
327
|
* text; a value is one text or a list of them.
|
|
328
328
|
*/
|
|
329
329
|
attributes?: Record<string, string | string[]>;
|
|
@@ -371,7 +371,7 @@ declare function isOtherValue(field: FieldBlock, value: unknown): value is strin
|
|
|
371
371
|
declare function choiceOptions(field: FieldBlock): ChoiceOption[];
|
|
372
372
|
/**
|
|
373
373
|
* Option lists the app showing a form supplies, by key (`OptionsSource.key`):
|
|
374
|
-
* `{
|
|
374
|
+
* `{ staff: [{ value: "8c1…", label: "Ada Lovelace" }] }`.
|
|
375
375
|
*/
|
|
376
376
|
type HostOptions = Readonly<Record<string, readonly ChoiceOption[]>>;
|
|
377
377
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, e as FormEvent, F as FormDefinition, a as FieldBlock, b as ContentBlock, g as Operator, B as Block, O as OptionsSource } from './types-
|
|
1
|
+
import { J as Json, e as FormEvent, F as FormDefinition, a as FieldBlock, b as ContentBlock, g as Operator, B as Block, O as OptionsSource } from './types-BBDa8oXu.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Checking a block's `props` for `parseForm`: the shared helpers every content and field kind's
|
|
@@ -125,7 +125,7 @@ type LinkParams = {
|
|
|
125
125
|
* option calls this). Each choice question with `props.prefill: { param }` takes the parameter's
|
|
126
126
|
* value when it is one of the options the question shows (`visibleOptions`, so a filtered list is
|
|
127
127
|
* respected); anything else is ignored. A multiple choice takes every matching value, from
|
|
128
|
-
* repeated parameters (`?
|
|
128
|
+
* repeated parameters (`?staff=a&staff=b`) or one comma-separated value. Questions are filled in
|
|
129
129
|
* form order, so a filtered question sees what the link picked before it. A question `values`
|
|
130
130
|
* already answers (the host's own prefill) is left alone. The server checks these like any answer.
|
|
131
131
|
*/
|
|
@@ -323,7 +323,7 @@ interface ChoiceOption {
|
|
|
323
323
|
image?: string;
|
|
324
324
|
/**
|
|
325
325
|
* Facts about the option for filtering and recall, such as `{ location: ["riverside", "hilltop"] }`
|
|
326
|
-
* for
|
|
326
|
+
* for someone who works at two locations (see `props.optionsFrom.filter`). Names and values are
|
|
327
327
|
* text; a value is one text or a list of them.
|
|
328
328
|
*/
|
|
329
329
|
attributes?: Record<string, string | string[]>;
|
|
@@ -371,7 +371,7 @@ declare function isOtherValue(field: FieldBlock, value: unknown): value is strin
|
|
|
371
371
|
declare function choiceOptions(field: FieldBlock): ChoiceOption[];
|
|
372
372
|
/**
|
|
373
373
|
* Option lists the app showing a form supplies, by key (`OptionsSource.key`):
|
|
374
|
-
* `{
|
|
374
|
+
* `{ staff: [{ value: "8c1…", label: "Ada Lovelace" }] }`.
|
|
375
375
|
*/
|
|
376
376
|
type HostOptions = Readonly<Record<string, readonly ChoiceOption[]>>;
|
|
377
377
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-forms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
],
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@fast-check/vitest": "^0.2.4",
|
|
81
|
-
"@marktiderman/genesis-notifications": "^0.1.
|
|
81
|
+
"@marktiderman/genesis-notifications": "^0.1.2",
|
|
82
82
|
"fast-check": "^4.10.2",
|
|
83
83
|
"tsup": "^8.3.0",
|
|
84
84
|
"typescript": "~6.0.3",
|