@embedpdf/plugin-form 3.0.0-next.22 → 3.0.0-next.23
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/contract/host.d.cts +3 -3
- package/dist/contract/host.d.ts +3 -3
- package/dist/{contract-D_9fiTkd.d.ts → contract-6YEsObRl.d.ts} +32 -32
- package/dist/contract-BdEaLXUK.js.map +1 -1
- package/dist/contract-CU0jrI_D.cjs.map +1 -1
- package/dist/{contract-c_wuhKk1.d.cts → contract-Djti7ew8.d.cts} +32 -32
- package/dist/contract.d.cts +2 -2
- package/dist/contract.d.ts +2 -2
- package/dist/{controller-Sr5M_8G8.js → controller-BbC8XWpY.js} +7 -7
- package/dist/controller-BbC8XWpY.js.map +1 -0
- package/dist/{controller-CS6tV2m1.cjs → controller-BwbadmLW.cjs} +7 -7
- package/dist/controller-BwbadmLW.cjs.map +1 -0
- package/dist/{host-contract-DdOsYM83.d.ts → host-contract-DO9xsBoD.d.cts} +6 -6
- package/dist/{host-contract-DaauiYfw.d.cts → host-contract-XqkfFuoy.d.ts} +6 -6
- package/dist/index.cjs +64 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +64 -65
- package/dist/index.js.map +1 -1
- package/dist/scripting.cjs +1 -1
- package/dist/scripting.d.cts +3 -3
- package/dist/scripting.d.ts +3 -3
- package/dist/scripting.js +1 -1
- package/package.json +17 -17
- package/dist/controller-CS6tV2m1.cjs.map +0 -1
- package/dist/controller-Sr5M_8G8.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as FormModel, A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as
|
|
2
|
-
import { n as FormHostCapability } from "./host-contract-
|
|
1
|
+
import { $ as FormModel, A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as FormField, m as FormFieldKind, n as FillableFields, nt as WidgetHit, o as FormCommitStatus, p as FormFieldFlagSetting, q as WidgetAddress, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldCreatedEvent, v as FormFieldSetting, w as FormFocusNextOptions, x as FormFieldValue, y as FormFieldSettings, z as FormSnapshot } from "./contract-Djti7ew8.cjs";
|
|
2
|
+
import { n as FormHostCapability } from "./host-contract-DO9xsBoD.cjs";
|
|
3
3
|
import { FormScriptingController, createFormScriptingController } from "./scripting.cjs";
|
|
4
4
|
import { ResourceStatus } from "@embedpdf/core";
|
|
5
|
-
import {
|
|
5
|
+
import { FormField as FormField$1, FormFieldKind as FormFieldKind$1, FormKind as FormKind$1, WidgetAppearance } from "@embedpdf/engine-core/runtime";
|
|
6
6
|
import { ClickCreate } from "@embedpdf/plugin-annotation/contract";
|
|
7
7
|
//#region src/form.plugin.d.ts
|
|
8
8
|
/**
|
|
@@ -18,31 +18,31 @@ import { ClickCreate } from "@embedpdf/plugin-annotation/contract";
|
|
|
18
18
|
* font of its own is edited in that font's program. `config` is the settings the app
|
|
19
19
|
* registers, over {@link FORM_DEFAULTS}.
|
|
20
20
|
*/
|
|
21
|
-
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").
|
|
21
|
+
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").PluginDefinition<FormModel, FormHostCapability, FormSettings>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/state.d.ts
|
|
24
24
|
/** Every field, whether the form is read, what kind of form it is, the selected widget's field, and the field the cursor is in. */
|
|
25
25
|
interface FormState {
|
|
26
26
|
/** Every field. The same array while nothing changes. */
|
|
27
|
-
readonly fields: readonly
|
|
27
|
+
readonly fields: readonly FormField$1[];
|
|
28
28
|
/** Whether the form is read. */
|
|
29
29
|
readonly status: ResourceStatus;
|
|
30
30
|
/** What the document has: `'none'`, `'acroform'` or `'xfa'`. */
|
|
31
31
|
readonly formKind: FormKind$1;
|
|
32
32
|
/** The field of the selected widget while one widget is selected (in design mode), or `null`. */
|
|
33
|
-
readonly selectedField:
|
|
33
|
+
readonly selectedField: FormField$1 | null;
|
|
34
34
|
/** The field the cursor is in, or `null`. */
|
|
35
|
-
readonly focusedField:
|
|
35
|
+
readonly focusedField: FormField$1 | null;
|
|
36
36
|
}
|
|
37
37
|
declare const formState: import("@embedpdf/core").StateDeclaration<FormCapability, FormState>;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/tools/definitions.d.ts
|
|
40
|
-
/** The
|
|
41
|
-
type
|
|
42
|
-
interface
|
|
40
|
+
/** The kinds the palette places. */
|
|
41
|
+
type AuthorableFormKind = Exclude<FormFieldKind$1, 'unknown'>;
|
|
42
|
+
interface FormToolDefinition {
|
|
43
43
|
id: string;
|
|
44
|
-
/** The field
|
|
45
|
-
|
|
44
|
+
/** The field kind the tool places (the form plane's vocabulary). */
|
|
45
|
+
fieldKind: AuthorableFormKind;
|
|
46
46
|
/** The client kind the annotation registry routes on (props panel).
|
|
47
47
|
* Not a PDF subtype — every widget is PDF `widget`; this is the view. */
|
|
48
48
|
visualKind: 'widget-text' | 'widget-choice' | 'widget-button' | 'widget-toggle' | 'widget-radio' | 'widget-box';
|
|
@@ -56,8 +56,8 @@ interface FormToolDef {
|
|
|
56
56
|
defaults: WidgetAppearance;
|
|
57
57
|
cursor: string;
|
|
58
58
|
}
|
|
59
|
-
declare const FORM_TOOLS: readonly
|
|
60
|
-
declare const FORM_TOOL_BY_ID: ReadonlyMap<string,
|
|
59
|
+
declare const FORM_TOOLS: readonly FormToolDefinition[];
|
|
60
|
+
declare const FORM_TOOL_BY_ID: ReadonlyMap<string, FormToolDefinition>;
|
|
61
61
|
//#endregion
|
|
62
|
-
export { type
|
|
62
|
+
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
63
63
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as FormModel, A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as
|
|
2
|
-
import { n as FormHostCapability } from "./host-contract-
|
|
1
|
+
import { $ as FormModel, A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as FormField, m as FormFieldKind, n as FillableFields, nt as WidgetHit, o as FormCommitStatus, p as FormFieldFlagSetting, q as WidgetAddress, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldCreatedEvent, v as FormFieldSetting, w as FormFocusNextOptions, x as FormFieldValue, y as FormFieldSettings, z as FormSnapshot } from "./contract-6YEsObRl.js";
|
|
2
|
+
import { n as FormHostCapability } from "./host-contract-XqkfFuoy.js";
|
|
3
3
|
import { FormScriptingController, createFormScriptingController } from "./scripting.js";
|
|
4
4
|
import { ResourceStatus } from "@embedpdf/core";
|
|
5
5
|
import { ClickCreate } from "@embedpdf/plugin-annotation/contract";
|
|
6
|
-
import {
|
|
6
|
+
import { FormField as FormField$1, FormFieldKind as FormFieldKind$1, FormKind as FormKind$1, WidgetAppearance } from "@embedpdf/engine-core/runtime";
|
|
7
7
|
//#region src/form.plugin.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* The form plugin: the field plane. Document-scoped; requires the
|
|
@@ -18,31 +18,31 @@ import { FormFieldDTO as FormFieldDTO$1, FormFieldFamily as FormFieldFamily$1, F
|
|
|
18
18
|
* font of its own is edited in that font's program. `config` is the settings the app
|
|
19
19
|
* registers, over {@link FORM_DEFAULTS}.
|
|
20
20
|
*/
|
|
21
|
-
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").
|
|
21
|
+
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").PluginDefinition<FormModel, FormHostCapability, FormSettings>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/state.d.ts
|
|
24
24
|
/** Every field, whether the form is read, what kind of form it is, the selected widget's field, and the field the cursor is in. */
|
|
25
25
|
interface FormState {
|
|
26
26
|
/** Every field. The same array while nothing changes. */
|
|
27
|
-
readonly fields: readonly
|
|
27
|
+
readonly fields: readonly FormField$1[];
|
|
28
28
|
/** Whether the form is read. */
|
|
29
29
|
readonly status: ResourceStatus;
|
|
30
30
|
/** What the document has: `'none'`, `'acroform'` or `'xfa'`. */
|
|
31
31
|
readonly formKind: FormKind$1;
|
|
32
32
|
/** The field of the selected widget while one widget is selected (in design mode), or `null`. */
|
|
33
|
-
readonly selectedField:
|
|
33
|
+
readonly selectedField: FormField$1 | null;
|
|
34
34
|
/** The field the cursor is in, or `null`. */
|
|
35
|
-
readonly focusedField:
|
|
35
|
+
readonly focusedField: FormField$1 | null;
|
|
36
36
|
}
|
|
37
37
|
declare const formState: import("@embedpdf/core").StateDeclaration<FormCapability, FormState>;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/tools/definitions.d.ts
|
|
40
|
-
/** The
|
|
41
|
-
type
|
|
42
|
-
interface
|
|
40
|
+
/** The kinds the palette places. */
|
|
41
|
+
type AuthorableFormKind = Exclude<FormFieldKind$1, 'unknown'>;
|
|
42
|
+
interface FormToolDefinition {
|
|
43
43
|
id: string;
|
|
44
|
-
/** The field
|
|
45
|
-
|
|
44
|
+
/** The field kind the tool places (the form plane's vocabulary). */
|
|
45
|
+
fieldKind: AuthorableFormKind;
|
|
46
46
|
/** The client kind the annotation registry routes on (props panel).
|
|
47
47
|
* Not a PDF subtype — every widget is PDF `widget`; this is the view. */
|
|
48
48
|
visualKind: 'widget-text' | 'widget-choice' | 'widget-button' | 'widget-toggle' | 'widget-radio' | 'widget-box';
|
|
@@ -56,8 +56,8 @@ interface FormToolDef {
|
|
|
56
56
|
defaults: WidgetAppearance;
|
|
57
57
|
cursor: string;
|
|
58
58
|
}
|
|
59
|
-
declare const FORM_TOOLS: readonly
|
|
60
|
-
declare const FORM_TOOL_BY_ID: ReadonlyMap<string,
|
|
59
|
+
declare const FORM_TOOLS: readonly FormToolDefinition[];
|
|
60
|
+
declare const FORM_TOOL_BY_ID: ReadonlyMap<string, FormToolDefinition>;
|
|
61
61
|
//#endregion
|
|
62
|
-
export { type
|
|
62
|
+
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
63
63
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as FormToken, n as FormTransfer, r as toFieldRef, t as FORM_DEFAULTS } from "./contract-BdEaLXUK.js";
|
|
2
|
-
import { n as createFormScriptingController, r as scriptError, t as FormScriptingController } from "./controller-
|
|
2
|
+
import { n as createFormScriptingController, r as scriptError, t as FormScriptingController } from "./controller-BbC8XWpY.js";
|
|
3
3
|
import { FormToken as FormToken$1 } from "./contract/host.js";
|
|
4
4
|
import { PluginError, composeApi, definePlugin, defineState, memo, memoByKey, reload, toPluginError, toPluginErrorInfo } from "@embedpdf/core";
|
|
5
5
|
import { ActionsToken, createHoverPump } from "@embedpdf/plugin-actions/contract";
|
|
@@ -26,7 +26,7 @@ const FIELD_CHROME = {
|
|
|
26
26
|
const FORM_TOOLS = [
|
|
27
27
|
{
|
|
28
28
|
id: "form-text",
|
|
29
|
-
|
|
29
|
+
fieldKind: "text",
|
|
30
30
|
visualKind: "widget-text",
|
|
31
31
|
clickCreate: {
|
|
32
32
|
width: 160,
|
|
@@ -40,7 +40,7 @@ const FORM_TOOLS = [
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
id: "form-checkbox",
|
|
43
|
-
|
|
43
|
+
fieldKind: "checkbox",
|
|
44
44
|
visualKind: "widget-toggle",
|
|
45
45
|
clickCreate: {
|
|
46
46
|
width: 18,
|
|
@@ -51,7 +51,7 @@ const FORM_TOOLS = [
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
id: "form-radio",
|
|
54
|
-
|
|
54
|
+
fieldKind: "radio",
|
|
55
55
|
visualKind: "widget-radio",
|
|
56
56
|
clickCreate: {
|
|
57
57
|
width: 18,
|
|
@@ -62,7 +62,7 @@ const FORM_TOOLS = [
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: "form-combobox",
|
|
65
|
-
|
|
65
|
+
fieldKind: "combobox",
|
|
66
66
|
visualKind: "widget-choice",
|
|
67
67
|
clickCreate: {
|
|
68
68
|
width: 140,
|
|
@@ -76,7 +76,7 @@ const FORM_TOOLS = [
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
id: "form-listbox",
|
|
79
|
-
|
|
79
|
+
fieldKind: "listbox",
|
|
80
80
|
visualKind: "widget-choice",
|
|
81
81
|
clickCreate: {
|
|
82
82
|
width: 140,
|
|
@@ -90,7 +90,7 @@ const FORM_TOOLS = [
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
id: "form-button",
|
|
93
|
-
|
|
93
|
+
fieldKind: "pushbutton",
|
|
94
94
|
visualKind: "widget-button",
|
|
95
95
|
clickCreate: {
|
|
96
96
|
width: 100,
|
|
@@ -105,7 +105,7 @@ const FORM_TOOLS = [
|
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: "form-signature",
|
|
108
|
-
|
|
108
|
+
fieldKind: "signature",
|
|
109
109
|
visualKind: "widget-box",
|
|
110
110
|
clickCreate: {
|
|
111
111
|
width: 160,
|
|
@@ -143,9 +143,9 @@ function clampToPage(box, page) {
|
|
|
143
143
|
* settings panel.
|
|
144
144
|
*/
|
|
145
145
|
function toolDraft(tool, name, widget) {
|
|
146
|
-
switch (tool.
|
|
146
|
+
switch (tool.fieldKind) {
|
|
147
147
|
case "radio": return {
|
|
148
|
-
|
|
148
|
+
kind: "radio",
|
|
149
149
|
name,
|
|
150
150
|
widgets: [{
|
|
151
151
|
...widget,
|
|
@@ -154,7 +154,7 @@ function toolDraft(tool, name, widget) {
|
|
|
154
154
|
};
|
|
155
155
|
case "combobox":
|
|
156
156
|
case "listbox": return {
|
|
157
|
-
|
|
157
|
+
kind: tool.fieldKind,
|
|
158
158
|
name,
|
|
159
159
|
widgets: [widget],
|
|
160
160
|
options: [{
|
|
@@ -166,7 +166,7 @@ function toolDraft(tool, name, widget) {
|
|
|
166
166
|
}]
|
|
167
167
|
};
|
|
168
168
|
case "pushbutton": return {
|
|
169
|
-
|
|
169
|
+
kind: "pushbutton",
|
|
170
170
|
name,
|
|
171
171
|
widgets: [{
|
|
172
172
|
...widget,
|
|
@@ -174,7 +174,7 @@ function toolDraft(tool, name, widget) {
|
|
|
174
174
|
}]
|
|
175
175
|
};
|
|
176
176
|
default: return {
|
|
177
|
-
|
|
177
|
+
kind: tool.fieldKind,
|
|
178
178
|
name,
|
|
179
179
|
widgets: [widget]
|
|
180
180
|
};
|
|
@@ -213,7 +213,7 @@ function createPlaceHandler(form, interaction, annotation) {
|
|
|
213
213
|
const rect = pageBox ? clampToPage(box, pageBox) : null;
|
|
214
214
|
if (!rect) return;
|
|
215
215
|
const look = widgetAppearanceOf(annotation ? annotation.tools.getDefaults(tool.id) : tool.defaults);
|
|
216
|
-
const name = nextFieldName(tool.
|
|
216
|
+
const name = nextFieldName(tool.fieldKind, new Set(form.list().map((field) => field.name)));
|
|
217
217
|
const created = form.create(toolDraft(tool, name, {
|
|
218
218
|
page,
|
|
219
219
|
rect,
|
|
@@ -226,7 +226,7 @@ function createPlaceHandler(form, interaction, annotation) {
|
|
|
226
226
|
if (!annotation || interaction.getActiveToolId() !== tool.id) return;
|
|
227
227
|
const policy = annotation.getSettings().afterCreate;
|
|
228
228
|
const widget = field.widgets.find((candidate) => candidate.page?.objectNumber === page.objectNumber);
|
|
229
|
-
if (policy.select && widget?.ref) annotation.selection.
|
|
229
|
+
if (policy.select && widget?.ref) annotation.selection.select([widget.ref]);
|
|
230
230
|
if (policy.tool === "default") interaction.activateTool("form-edit");
|
|
231
231
|
await created;
|
|
232
232
|
};
|
|
@@ -240,7 +240,7 @@ function createPlaceHandler(form, interaction, annotation) {
|
|
|
240
240
|
if (sample.page && FORM_TOOL_BY_ID.has(toolId) && form.canDesign() && !interaction.hasCursorClaim()) annotation.hoverGhostAt(toolId, sample.page.ref, sample.page.point, sample.page.rotation, sample.page.zoom);
|
|
241
241
|
else annotation.clearGhost();
|
|
242
242
|
},
|
|
243
|
-
|
|
243
|
+
onPointerDown: (sample) => {
|
|
244
244
|
if (!sample.page || !FORM_TOOL_BY_ID.has(interaction.getActiveToolId())) return false;
|
|
245
245
|
if (!form.canDesign()) return false;
|
|
246
246
|
origin = {
|
|
@@ -250,14 +250,14 @@ function createPlaceHandler(form, interaction, annotation) {
|
|
|
250
250
|
};
|
|
251
251
|
return true;
|
|
252
252
|
},
|
|
253
|
-
|
|
253
|
+
onPointerMove: (sample) => {
|
|
254
254
|
if (!origin) return;
|
|
255
255
|
const point = samplePointOn(sample, origin.page);
|
|
256
256
|
if (!point) return;
|
|
257
257
|
origin.last = point;
|
|
258
258
|
annotation?.previewPlacement(interaction.getActiveToolId(), origin.page, origin.start, point);
|
|
259
259
|
},
|
|
260
|
-
|
|
260
|
+
onPointerUp: (sample) => {
|
|
261
261
|
if (!origin) return;
|
|
262
262
|
const gesture = origin;
|
|
263
263
|
endGesture();
|
|
@@ -270,7 +270,7 @@ function createPlaceHandler(form, interaction, annotation) {
|
|
|
270
270
|
globalThis.console?.error("[form] placing the field failed:", error);
|
|
271
271
|
});
|
|
272
272
|
},
|
|
273
|
-
|
|
273
|
+
onPointerCancel: endGesture
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
//#endregion
|
|
@@ -662,7 +662,7 @@ const widgetObjectOf = (widget) => "kind" in widget ? widget.kind === "objectNum
|
|
|
662
662
|
function valueOf$1(field) {
|
|
663
663
|
const entry = field.valueEntry;
|
|
664
664
|
if (entry.kind === "none" || entry.kind === "unsupported") return null;
|
|
665
|
-
switch (field.
|
|
665
|
+
switch (field.kind) {
|
|
666
666
|
case "text": return { value: field.value };
|
|
667
667
|
case "checkbox": return { checked: field.checked };
|
|
668
668
|
case "radio": return { value: field.value === "Off" ? null : field.value };
|
|
@@ -680,11 +680,11 @@ function plainValueOf(field) {
|
|
|
680
680
|
return value.value;
|
|
681
681
|
}
|
|
682
682
|
/**
|
|
683
|
-
* The write a plain value makes for a field of this
|
|
684
|
-
*
|
|
683
|
+
* The write a plain value makes for a field of this kind, or null when the
|
|
684
|
+
* kind can't take it (a list given `true`, a value for a push button).
|
|
685
685
|
*/
|
|
686
686
|
function writeOfPlainValue(field, value) {
|
|
687
|
-
switch (field.
|
|
687
|
+
switch (field.kind) {
|
|
688
688
|
case "checkbox":
|
|
689
689
|
if (typeof value === "boolean") return { checked: value };
|
|
690
690
|
return typeof value === "string" || value === null ? { value } : null;
|
|
@@ -700,7 +700,7 @@ function writeOfPlainValue(field, value) {
|
|
|
700
700
|
}
|
|
701
701
|
/** Whether a field holds nothing a required check would accept. */
|
|
702
702
|
function isEmpty(field) {
|
|
703
|
-
switch (field.
|
|
703
|
+
switch (field.kind) {
|
|
704
704
|
case "text":
|
|
705
705
|
case "combobox": return field.value === "";
|
|
706
706
|
case "checkbox": return !field.checked;
|
|
@@ -716,7 +716,7 @@ function createFieldReads(ctx, { fields, rights, siblings }) {
|
|
|
716
716
|
if (!filter) return all();
|
|
717
717
|
const page = filter.page === void 0 ? void 0 : ctx.getPage(filter.page)?.ref;
|
|
718
718
|
if (filter.page !== void 0 && !page) return NO_FIELDS$1;
|
|
719
|
-
return all().filter((field) => (!filter.
|
|
719
|
+
return all().filter((field) => (!filter.kind || field.kind === filter.kind) && (filter.name === void 0 || field.name === filter.name) && (!page || field.widgets.some((widget) => widget.page && pageRefsEqual(widget.page, page))));
|
|
720
720
|
};
|
|
721
721
|
const valueByKey = memoByKey((key) => {
|
|
722
722
|
const field = fieldByKey(fields.view(), key);
|
|
@@ -758,7 +758,7 @@ function createFieldReads(ctx, { fields, rights, siblings }) {
|
|
|
758
758
|
missing
|
|
759
759
|
};
|
|
760
760
|
});
|
|
761
|
-
const getSelectedField = memo(() => [fields.view(), siblings.annotation()?.selection.
|
|
761
|
+
const getSelectedField = memo(() => [fields.view(), siblings.annotation()?.selection.getSelected() ?? NOTHING_SELECTED], (index, selected) => {
|
|
762
762
|
const [annotation] = selected;
|
|
763
763
|
if (selected.length !== 1 || !annotation?.subtype.startsWith("widget")) return null;
|
|
764
764
|
return fieldForWidget(index, widgetObjectOf(annotation.ref));
|
|
@@ -783,7 +783,7 @@ function createFieldReads(ctx, { fields, rights, siblings }) {
|
|
|
783
783
|
//#region src/read/settings.ts
|
|
784
784
|
/**
|
|
785
785
|
* A field's settings, described for a settings panel the way an annotation
|
|
786
|
-
* kind describes its look: which settings the field's
|
|
786
|
+
* kind describes its look: which settings the field's kind has, how each is
|
|
787
787
|
* edited, and its value. `update()` writes them.
|
|
788
788
|
*/
|
|
789
789
|
/** What every field has. */
|
|
@@ -829,9 +829,9 @@ const OPTIONS = {
|
|
|
829
829
|
label: "Options",
|
|
830
830
|
labelKey: "form.settings.options"
|
|
831
831
|
};
|
|
832
|
-
/** What each
|
|
832
|
+
/** What each kind adds. */
|
|
833
833
|
function familySettings(field) {
|
|
834
|
-
switch (field.
|
|
834
|
+
switch (field.kind) {
|
|
835
835
|
case "text": return [
|
|
836
836
|
{
|
|
837
837
|
key: "defaultValue",
|
|
@@ -933,7 +933,7 @@ function createFieldSettings({ fields }) {
|
|
|
933
933
|
//#region src/read/fill-items.ts
|
|
934
934
|
/**
|
|
935
935
|
* Project one widget of a field into a fill control; `fillable`: the user may
|
|
936
|
-
* fill the field in (a signature field: sign it). Null for
|
|
936
|
+
* fill the field in (a signature field: sign it). Null for kinds with no
|
|
937
937
|
* fill control.
|
|
938
938
|
*/
|
|
939
939
|
function projectWidget(field, annotObjectNumber, widget, fillable) {
|
|
@@ -947,7 +947,7 @@ function projectWidget(field, annotObjectNumber, widget, fillable) {
|
|
|
947
947
|
disabled: field.readOnly || !fillable,
|
|
948
948
|
label: field.alternateName ?? field.name
|
|
949
949
|
};
|
|
950
|
-
switch (field.
|
|
950
|
+
switch (field.kind) {
|
|
951
951
|
case "text": return {
|
|
952
952
|
...base,
|
|
953
953
|
control: "text",
|
|
@@ -1104,7 +1104,7 @@ function withFields(index, parts) {
|
|
|
1104
1104
|
return upsertWidgets(upsertFields(index, parts.map((part) => part.field)), parts.flatMap((part) => part.widgets));
|
|
1105
1105
|
}
|
|
1106
1106
|
/** The fields a reset of the whole form puts back: the ones that hold a value. */
|
|
1107
|
-
const resetTargets = (index) => (index.snapshot?.fields ?? []).filter((field) => RESET_FAMILIES.has(field.
|
|
1107
|
+
const resetTargets = (index) => (index.snapshot?.fields ?? []).filter((field) => RESET_FAMILIES.has(field.kind));
|
|
1108
1108
|
const RESET_FAMILIES = /* @__PURE__ */ new Set([
|
|
1109
1109
|
"text",
|
|
1110
1110
|
"checkbox",
|
|
@@ -1334,7 +1334,7 @@ function createFieldsMirror(ctx, events) {
|
|
|
1334
1334
|
load: async (doc) => ({ value: indexLoadedFields(fields.get(), await doc.forms.list()) }),
|
|
1335
1335
|
fold: foldFormEvent,
|
|
1336
1336
|
predict: predictFormOp,
|
|
1337
|
-
|
|
1337
|
+
onChanged: ({ cause, event, next }) => {
|
|
1338
1338
|
if (cause === "load") {
|
|
1339
1339
|
if (next.snapshot) events.resynced.emit({ snapshot: next.snapshot });
|
|
1340
1340
|
return;
|
|
@@ -1498,12 +1498,12 @@ function createEvents(ctx) {
|
|
|
1498
1498
|
* write. A field's group decides: a `fields:fill` (`fields:sign`) permission
|
|
1499
1499
|
* for its group, or `doc.forms.fill` (`doc.sign`) for every field.
|
|
1500
1500
|
*/
|
|
1501
|
-
/** Whether the `fillable` setting lets people fill in a field of this
|
|
1502
|
-
const isFillableByHand = (fillable,
|
|
1501
|
+
/** Whether the `fillable` setting lets people fill in a field of this kind by hand. */
|
|
1502
|
+
const isFillableByHand = (fillable, kind) => typeof fillable === "boolean" ? fillable : fillable.includes(kind);
|
|
1503
1503
|
function createFillRights(ctx, fields) {
|
|
1504
1504
|
const mayFill = (field) => ctx.allowsField("fill", field);
|
|
1505
1505
|
const maySign = (field) => ctx.allowsField("sign", field);
|
|
1506
|
-
const mayFillByHand = (field) => isFillableByHand(ctx.settings().get().fillable, field.
|
|
1506
|
+
const mayFillByHand = (field) => isFillableByHand(ctx.settings().get().fillable, field.kind) && (field.kind === "signature" ? maySign(field) : mayFill(field));
|
|
1507
1507
|
/** The form's groups, `null` (no group) among them. */
|
|
1508
1508
|
const groups = memo(() => [fields.view()], (index) => [...new Set((index.snapshot?.fields ?? []).map((field) => field.groupId))]);
|
|
1509
1509
|
return {
|
|
@@ -1519,7 +1519,7 @@ function createFillRights(ctx, fields) {
|
|
|
1519
1519
|
//#region src/services/formatted.ts
|
|
1520
1520
|
/** The values remembered per field: enough for an undo or two. */
|
|
1521
1521
|
const KEPT_PER_FIELD = 8;
|
|
1522
|
-
const valueOf = (field) => field.
|
|
1522
|
+
const valueOf = (field) => field.kind === "text" || field.kind === "combobox" ? field.value : null;
|
|
1523
1523
|
function createFormattedTexts(ctx, fields) {
|
|
1524
1524
|
const texts = /* @__PURE__ */ new Map();
|
|
1525
1525
|
let version = 0;
|
|
@@ -1575,7 +1575,7 @@ function createWidgetLooks({ fields, formatted, design, fonts }) {
|
|
|
1575
1575
|
const lookKeyOf = (row, field) => {
|
|
1576
1576
|
const box = row.box ?? row.rect;
|
|
1577
1577
|
const content = (() => {
|
|
1578
|
-
switch (field?.
|
|
1578
|
+
switch (field?.kind) {
|
|
1579
1579
|
case "text": return [
|
|
1580
1580
|
formatted.textOf(field) ?? field.value,
|
|
1581
1581
|
field.multiline,
|
|
@@ -1585,7 +1585,7 @@ function createWidgetLooks({ fields, formatted, design, fonts }) {
|
|
|
1585
1585
|
];
|
|
1586
1586
|
case "combobox": return [formatted.textOf(field) ?? field.value];
|
|
1587
1587
|
case "listbox": return [field.topIndex, field.options.map((option) => [option.label, option.selected])];
|
|
1588
|
-
default: return [field?.
|
|
1588
|
+
default: return [field?.kind ?? null];
|
|
1589
1589
|
}
|
|
1590
1590
|
})();
|
|
1591
1591
|
return JSON.stringify([
|
|
@@ -1692,11 +1692,11 @@ function createWidgetLooks({ fields, formatted, design, fonts }) {
|
|
|
1692
1692
|
},
|
|
1693
1693
|
/**
|
|
1694
1694
|
* How the painter draws a widget row live, upright in a box (where a gesture has it); `null`
|
|
1695
|
-
* for one whose field it doesn't draw
|
|
1695
|
+
* for one whose field it doesn't draw, or with a mark in it, which only its picture shows.
|
|
1696
1696
|
*/
|
|
1697
1697
|
painterOf: (row) => {
|
|
1698
1698
|
const field = fieldForWidget(fields.view(), numberOf(row.ref));
|
|
1699
|
-
return field && paints(field) ? (box) => paint(row, box, 0, true) ?? [] : null;
|
|
1699
|
+
return field && paints(field) && !row.hasMark ? (box) => paint(row, box, 0, true) ?? [] : null;
|
|
1700
1700
|
},
|
|
1701
1701
|
getTextEditorLayout: (ref, text) => {
|
|
1702
1702
|
const view = fields.view();
|
|
@@ -1759,7 +1759,7 @@ function createScriptingSeam(ctx, siblings) {
|
|
|
1759
1759
|
transaction: realm.transaction.bind(realm),
|
|
1760
1760
|
budget: realm.budget
|
|
1761
1761
|
});
|
|
1762
|
-
ctx.cleanup(() => made.
|
|
1762
|
+
ctx.cleanup(() => made.destroy());
|
|
1763
1763
|
pipeline = made;
|
|
1764
1764
|
return made;
|
|
1765
1765
|
};
|
|
@@ -1911,18 +1911,18 @@ function createActivation(ctx, services, { fill }) {
|
|
|
1911
1911
|
const actions = ctx.tryGet(ActionsToken);
|
|
1912
1912
|
if (actions) {
|
|
1913
1913
|
const result = await ctx.cancellable(options?.signal, actions.dispatch({
|
|
1914
|
-
|
|
1915
|
-
|
|
1914
|
+
type: "activate",
|
|
1915
|
+
annotation: annotationRef,
|
|
1916
1916
|
page: annotationRef.page,
|
|
1917
1917
|
source: widgetSource(field.ref, annotationRef)
|
|
1918
1918
|
}));
|
|
1919
1919
|
if (!(result.status === "inert" && result.steps.length === 0 && result.diagnostics.length === 0)) return {
|
|
1920
|
-
|
|
1920
|
+
status: "dispatched",
|
|
1921
1921
|
result
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
1924
|
return {
|
|
1925
|
-
|
|
1925
|
+
status: "form",
|
|
1926
1926
|
result: await activateThroughScripts(field.ref, annotationRef, options)
|
|
1927
1927
|
};
|
|
1928
1928
|
},
|
|
@@ -1948,9 +1948,9 @@ function createActivation(ctx, services, { fill }) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
if (event === "focus") scripting.warm(fields.view());
|
|
1950
1950
|
actions.dispatch({
|
|
1951
|
-
|
|
1951
|
+
type: "annotation",
|
|
1952
1952
|
event,
|
|
1953
|
-
|
|
1953
|
+
annotation: annotationRef,
|
|
1954
1954
|
page: annotationRef.page,
|
|
1955
1955
|
source
|
|
1956
1956
|
});
|
|
@@ -2080,11 +2080,11 @@ const lookOf = (widget) => {
|
|
|
2080
2080
|
/**
|
|
2081
2081
|
* The export value a field's new widget gets when none is given: a radio group's next free
|
|
2082
2082
|
* `Choice<n>` (the radio tool names its first button `Choice1`), a checkbox's own value, so
|
|
2083
|
-
* the boxes check together. Other
|
|
2083
|
+
* the boxes check together. Other kinds take none.
|
|
2084
2084
|
*/
|
|
2085
2085
|
function exportValueFor(field) {
|
|
2086
|
-
if (field.
|
|
2087
|
-
if (field.
|
|
2086
|
+
if (field.kind === "checkbox") return field.exportValue;
|
|
2087
|
+
if (field.kind !== "radio") return void 0;
|
|
2088
2088
|
const taken = new Set(field.widgets.map((widget) => widget.exportValue));
|
|
2089
2089
|
let n = field.widgets.length + 1;
|
|
2090
2090
|
while (taken.has(`Choice${n}`)) n += 1;
|
|
@@ -2514,7 +2514,7 @@ function failedFill(result) {
|
|
|
2514
2514
|
* (`services/cursor.ts`) brings the box into view and hands it to its control.
|
|
2515
2515
|
*/
|
|
2516
2516
|
/** A radio button as its field lists it: whether it's the checked one, and the value it picks. */
|
|
2517
|
-
const radioButtonOf = (field, widget) => field.
|
|
2517
|
+
const radioButtonOf = (field, widget) => field.kind === "radio" ? field.widgets.find((candidate) => candidate.objectNumber === widget) ?? null : null;
|
|
2518
2518
|
function createFocus(ctx, { fields, rights, events, cursor }, fill) {
|
|
2519
2519
|
/** Every box that shows, in Tab's order, and the ones Tab stops at. */
|
|
2520
2520
|
const order = memo(() => [
|
|
@@ -2532,7 +2532,7 @@ function createFocus(ctx, { fields, rights, events, cursor }, fill) {
|
|
|
2532
2532
|
position.set(widget, at);
|
|
2533
2533
|
const field = fieldForWidget(index, widget);
|
|
2534
2534
|
if (!field || !rights.takesInput(field)) return;
|
|
2535
|
-
if (field.
|
|
2535
|
+
if (field.kind === "radio") {
|
|
2536
2536
|
const group = `${fieldKeyOf(field)}@${row.page.objectNumber}`;
|
|
2537
2537
|
if (groups.has(group)) return;
|
|
2538
2538
|
groups.add(group);
|
|
@@ -2556,7 +2556,7 @@ function createFocus(ctx, { fields, rights, events, cursor }, fill) {
|
|
|
2556
2556
|
* its first, or its last when Shift+Tab comes to it from after it.
|
|
2557
2557
|
*/
|
|
2558
2558
|
const boxAt = (stop, backward) => {
|
|
2559
|
-
if (stop.field.
|
|
2559
|
+
if (stop.field.kind !== "radio") return stop.row;
|
|
2560
2560
|
const buttons = buttonsOf(stop.field, stop.row.page.objectNumber);
|
|
2561
2561
|
return buttons.find((button) => radioButtonOf(stop.field, widgetObjectOf(button.ref))?.checked) ?? (backward ? buttons.at(-1) ?? stop.row : stop.row);
|
|
2562
2562
|
};
|
|
@@ -2584,7 +2584,7 @@ function createFocus(ctx, { fields, rights, events, cursor }, fill) {
|
|
|
2584
2584
|
const at = from === null ? null : position.get(from) ?? null;
|
|
2585
2585
|
const field = from === null ? null : fieldForWidget(index, from);
|
|
2586
2586
|
const page = from === null ? null : widgetRowOf(index, from)?.page.objectNumber;
|
|
2587
|
-
const candidates = stops.filter((stop) => (!options.empty || isEmpty(stop.field)) && !(stop.field === field && field.
|
|
2587
|
+
const candidates = stops.filter((stop) => (!options.empty || isEmpty(stop.field)) && !(stop.field === field && field.kind === "radio" && stop.row.page.objectNumber === page));
|
|
2588
2588
|
const ahead = candidates.filter((stop) => at === null ? true : backward ? stop.at < at : stop.at > at);
|
|
2589
2589
|
const next = (backward ? ahead.at(-1) : ahead[0]) ?? (options.wrap ? backward ? candidates.at(-1) : candidates[0] : void 0);
|
|
2590
2590
|
return next ? cursor.goTo(boxAt(next, backward), true) : false;
|
|
@@ -2592,7 +2592,7 @@ function createFocus(ctx, { fields, rights, events, cursor }, fill) {
|
|
|
2592
2592
|
const moveInGroup = (ref, backward) => {
|
|
2593
2593
|
const widget = widgetObjectOf(ref);
|
|
2594
2594
|
const field = fieldForWidget(fields.view(), widget);
|
|
2595
|
-
if (!field || field.
|
|
2595
|
+
if (!field || field.kind !== "radio" || !rights.takesInput(field)) return false;
|
|
2596
2596
|
const buttons = buttonsOf(field);
|
|
2597
2597
|
const here = buttons.findIndex((row) => widgetObjectOf(row.ref) === widget);
|
|
2598
2598
|
if (here < 0 || buttons.length < 2) return false;
|
|
@@ -2734,17 +2734,17 @@ function createWidgetLender(ctx, { fields, design, pictures, looks }) {
|
|
|
2734
2734
|
widgets: [...refs],
|
|
2735
2735
|
position
|
|
2736
2736
|
}],
|
|
2737
|
-
|
|
2737
|
+
getAuthority: () => {
|
|
2738
2738
|
const may = ctx.allows("doc.forms.modify");
|
|
2739
2739
|
return {
|
|
2740
2740
|
update: may,
|
|
2741
2741
|
delete: may
|
|
2742
2742
|
};
|
|
2743
2743
|
},
|
|
2744
|
-
|
|
2745
|
-
|
|
2744
|
+
getPictureEpoch: pictures.epoch,
|
|
2745
|
+
getPictureVersion: pictures.versionOf,
|
|
2746
2746
|
renderAppearances: pictures.render,
|
|
2747
|
-
|
|
2747
|
+
isPending: looks.isPending,
|
|
2748
2748
|
painter: (record) => record.subtype === "widget" ? looks.painterOf(record) : null
|
|
2749
2749
|
};
|
|
2750
2750
|
}
|
|
@@ -2803,10 +2803,10 @@ const buildSubmitEntries = (fields, intent, diagnose) => {
|
|
|
2803
2803
|
const entries = [];
|
|
2804
2804
|
for (const field of selected) {
|
|
2805
2805
|
const explicit = explicitInclude && listed(field);
|
|
2806
|
-
if (field.
|
|
2806
|
+
if (field.kind === "pushbutton" || field.kind === "signature") {
|
|
2807
2807
|
if (explicit) diagnose({
|
|
2808
2808
|
code: "submit-entry-unsupported",
|
|
2809
|
-
message: `submit: '${field.name}' (${field.
|
|
2809
|
+
message: `submit: '${field.name}' (${field.kind}) has no representable submission value in v1 — skipped`
|
|
2810
2810
|
});
|
|
2811
2811
|
continue;
|
|
2812
2812
|
}
|
|
@@ -2861,7 +2861,7 @@ function createResetWrites(_ctx, services, { fill }) {
|
|
|
2861
2861
|
* Whether a reset puts this field back: the engine refuses push button and
|
|
2862
2862
|
* signature refs, and another signer's fields are theirs.
|
|
2863
2863
|
*/
|
|
2864
|
-
const resettable = (field) => field.
|
|
2864
|
+
const resettable = (field) => field.kind !== "pushbutton" && field.kind !== "signature" && rights.mayFill(field);
|
|
2865
2865
|
/**
|
|
2866
2866
|
* Reset the selected fields, then recalculate, as one change. `origin` is carried through to
|
|
2867
2867
|
* the surfaced recalculation results, so a ResetForm run by a page or hover trigger never
|
|
@@ -2932,7 +2932,6 @@ function createScriptEffects(ctx, { fields, rights, enqueue }, { fillSoon }) {
|
|
|
2932
2932
|
url: intent.url,
|
|
2933
2933
|
method: intent.method,
|
|
2934
2934
|
format: intent.format,
|
|
2935
|
-
flagsRaw: intent.flagsRaw,
|
|
2936
2935
|
...intent.charSet === void 0 ? {} : { charSet: intent.charSet },
|
|
2937
2936
|
entries: buildSubmitEntries(fields.view().snapshot?.fields ?? [], intent, diagnose),
|
|
2938
2937
|
origin: actionContext.origin,
|
|
@@ -3133,7 +3132,7 @@ function createValueWrites(_ctx, services, { fill }) {
|
|
|
3133
3132
|
if (!value) {
|
|
3134
3133
|
skipped.push({
|
|
3135
3134
|
ref: name,
|
|
3136
|
-
reason: `a ${field.
|
|
3135
|
+
reason: `a ${field.kind} field can't take this value`
|
|
3137
3136
|
});
|
|
3138
3137
|
continue;
|
|
3139
3138
|
}
|