@iyulab/lowline-form 0.9.0 → 0.10.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/dist/bundle/lowline-form.bundle.js +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/session.d.ts +2 -0
- package/dist/session.js +1 -1
- package/package.json +1 -1
|
@@ -164,7 +164,7 @@ var a = {
|
|
|
164
164
|
}
|
|
165
165
|
draw(e) {
|
|
166
166
|
let { field: t, suggestion: n } = e;
|
|
167
|
-
return n ? this.drawn.has(t) ? this.draft.held(t) !== void 0 : (n.origin ?? "decider") !== "decider" || (n.fit ?? "exact") !== "exact" ? !1 : (this.drawn.add(t), this.rate > 0 && this.rate <= 1 && this.random() < this.rate && (this.draft.hold(t, this.rate, {
|
|
167
|
+
return n ? this.drawn.has(t) ? this.draft.held(t) !== void 0 : e.several || (n.origin ?? "decider") !== "decider" || (n.fit ?? "exact") !== "exact" ? !1 : (this.drawn.add(t), this.rate > 0 && this.rate <= 1 && this.random() < this.rate && (this.draft.hold(t, this.rate, {
|
|
168
168
|
...e,
|
|
169
169
|
suggestion: n
|
|
170
170
|
}), !0)) : !1;
|
package/dist/client.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export interface FieldReport {
|
|
|
39
39
|
/** For a free text field, the threshold for one, two, … characters typed (`null` where none was right often enough). */
|
|
40
40
|
typed?: (ThresholdChoice | null)[];
|
|
41
41
|
coarse?: ThresholdChoice;
|
|
42
|
+
/** For a field with a coarse level, the threshold at which its class is suggested from the similar records layer. */
|
|
43
|
+
coarseSimilar?: ThresholdChoice;
|
|
42
44
|
similar?: ThresholdChoice;
|
|
43
45
|
similarOffered: boolean;
|
|
44
46
|
promiseOver: number;
|
package/dist/session.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface Proposal {
|
|
|
31
31
|
* were chosen.
|
|
32
32
|
*/
|
|
33
33
|
promise?: number;
|
|
34
|
+
/** Whether the field takes several values: it is settled as a set, which cannot be a check, so none is drawn for it. */
|
|
35
|
+
several?: boolean;
|
|
34
36
|
}
|
|
35
37
|
/** What a field shows, as formdown's `fieldStates` takes it. */
|
|
36
38
|
export interface FieldState {
|
package/dist/session.js
CHANGED
|
@@ -181,7 +181,7 @@ export class Session {
|
|
|
181
181
|
return false;
|
|
182
182
|
if (this.drawn.has(field))
|
|
183
183
|
return this.draft.held(field) !== undefined;
|
|
184
|
-
const checkable = (suggestion.origin ?? 'decider') === 'decider' && (suggestion.fit ?? 'exact') === 'exact';
|
|
184
|
+
const checkable = !proposal.several && (suggestion.origin ?? 'decider') === 'decider' && (suggestion.fit ?? 'exact') === 'exact';
|
|
185
185
|
if (!checkable)
|
|
186
186
|
return false;
|
|
187
187
|
this.drawn.add(field);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/lowline-form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The Lowline form element: a formdown form whose decided fields are suggested from the records people confirmed, talking to a Lowline host's routes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|