@aphexcms/plugin-forms 0.1.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 +52 -0
- package/dist/compile.d.ts +75 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +119 -0
- package/dist/compile.js.map +1 -0
- package/dist/events.d.ts +18 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +19 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +83 -0
- package/dist/index.js.map +1 -0
- package/dist/notify.d.ts +17 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +76 -0
- package/dist/notify.js.map +1 -0
- package/dist/schema.d.ts +14 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +492 -0
- package/dist/schema.js.map +1 -0
- package/dist/submit.d.ts +4 -0
- package/dist/submit.d.ts.map +1 -0
- package/dist/submit.js +213 -0
- package/dist/submit.js.map +1 -0
- package/dist/template.d.ts +36 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +51 -0
- package/dist/template.js.map +1 -0
- package/package.json +59 -0
package/dist/schema.js
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { effectiveOrganizationRole } from '@aphexcms/cms-core';
|
|
2
|
+
import { AlignLeft, ClipboardList, Hash, Inbox, List, Mail, MessageSquareText, SquareCheck, Type } from '@lucide/svelte';
|
|
3
|
+
/**
|
|
4
|
+
* The two collections this plugin contributes: `form` (what an editor composes)
|
|
5
|
+
* and `formSubmission` (what a visitor sent).
|
|
6
|
+
*
|
|
7
|
+
* ## Why a field is a block, not a row of settings
|
|
8
|
+
*
|
|
9
|
+
* A form field is a tagged union — a select has options, a number has a range, a
|
|
10
|
+
* message has no input at all — and the page builder's array-of-blocks is exactly
|
|
11
|
+
* that shape. Modelling it as one flat object with every possible setting on it
|
|
12
|
+
* would show an editor a "minimum value" control while they configure a checkbox.
|
|
13
|
+
* Each field kind is its own type, so each one shows only what applies.
|
|
14
|
+
*
|
|
15
|
+
* ## Reserved names
|
|
16
|
+
*
|
|
17
|
+
* Nothing here declares a field called `type`, `status` or `publishedAt`: those
|
|
18
|
+
* are document columns, and the schema validator rejects a shadowing field at
|
|
19
|
+
* startup — including inside nested objects. The discriminator an editor picks
|
|
20
|
+
* from is the block's own `_type`, which the array field manages, so there is
|
|
21
|
+
* nothing to declare.
|
|
22
|
+
*/
|
|
23
|
+
/** Settings every field kind shares, spread into each block. */
|
|
24
|
+
function baseFields() {
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
name: 'name',
|
|
28
|
+
type: 'string',
|
|
29
|
+
title: 'Name',
|
|
30
|
+
description: 'The key this answer is stored and emailed under. Lowercase, no spaces — e.g. `email`, `company`.',
|
|
31
|
+
validation: (Rule) => Rule.required().custom((value) => {
|
|
32
|
+
if (typeof value !== 'string')
|
|
33
|
+
return true;
|
|
34
|
+
return /^[a-z][a-z0-9_]*$/.test(value)
|
|
35
|
+
? true
|
|
36
|
+
: 'Use lowercase letters, digits and underscores, starting with a letter';
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'label',
|
|
41
|
+
type: 'string',
|
|
42
|
+
title: 'Label',
|
|
43
|
+
description: 'What the visitor reads above the input.',
|
|
44
|
+
validation: (Rule) => Rule.required()
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'required',
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
title: 'Required',
|
|
50
|
+
initialValue: false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'width',
|
|
54
|
+
type: 'string',
|
|
55
|
+
title: 'Width',
|
|
56
|
+
initialValue: 'full',
|
|
57
|
+
list: [
|
|
58
|
+
{ title: 'Full width', value: 'full' },
|
|
59
|
+
{ title: 'Half', value: 'half' }
|
|
60
|
+
],
|
|
61
|
+
options: { layout: 'tabs' }
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
function validEmailList(value, multiple) {
|
|
66
|
+
if (typeof value !== 'string' || !value.trim())
|
|
67
|
+
return true;
|
|
68
|
+
if (value.includes('{{') || value.includes('}}'))
|
|
69
|
+
return 'Recipient addresses cannot use templates';
|
|
70
|
+
const addresses = multiple ? value.split(',') : [value];
|
|
71
|
+
return addresses.every((address) => /^[^\s@,]+@[^\s@,]+\.[^\s@,]+$/.test(address.trim()))
|
|
72
|
+
? true
|
|
73
|
+
: multiple
|
|
74
|
+
? 'Enter valid email addresses separated by commas'
|
|
75
|
+
: 'Enter a valid email address';
|
|
76
|
+
}
|
|
77
|
+
function validateAuthoredFields(value) {
|
|
78
|
+
if (!Array.isArray(value))
|
|
79
|
+
return true;
|
|
80
|
+
const inputs = value.filter((field) => !!field && typeof field === 'object' && field._type !== 'formMessage');
|
|
81
|
+
if (inputs.length === 0)
|
|
82
|
+
return 'Add at least one input field';
|
|
83
|
+
const names = inputs
|
|
84
|
+
.map((field) => field.name)
|
|
85
|
+
.filter((name) => typeof name === 'string');
|
|
86
|
+
if (new Set(names).size !== names.length)
|
|
87
|
+
return 'Every input must have a unique name';
|
|
88
|
+
for (const field of inputs) {
|
|
89
|
+
if (field._type === 'formNumber' &&
|
|
90
|
+
typeof field.min === 'number' &&
|
|
91
|
+
typeof field.max === 'number' &&
|
|
92
|
+
field.min > field.max) {
|
|
93
|
+
return `Minimum cannot exceed maximum for ${String(field.label ?? field.name ?? 'number field')}`;
|
|
94
|
+
}
|
|
95
|
+
if (field._type === 'formSelect') {
|
|
96
|
+
const options = Array.isArray(field.options) ? field.options : [];
|
|
97
|
+
const values = options.map((option) => {
|
|
98
|
+
if (!option || typeof option !== 'object')
|
|
99
|
+
return '';
|
|
100
|
+
const row = option;
|
|
101
|
+
return String(row.value ?? '').trim() || String(row.label ?? '').trim();
|
|
102
|
+
});
|
|
103
|
+
if (values.some((option) => !option))
|
|
104
|
+
return 'Every select option must have a label or value';
|
|
105
|
+
if (new Set(values).size !== values.length)
|
|
106
|
+
return 'Select option values must be unique';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
/** The row label an editor reads in the collapsed field list. */
|
|
112
|
+
function fieldPreview(inputType) {
|
|
113
|
+
return {
|
|
114
|
+
select: { title: 'label', name: 'name' },
|
|
115
|
+
prepare: ({ title, name }) => ({
|
|
116
|
+
title: (typeof title === 'string' && title) || inputType,
|
|
117
|
+
subtitle: typeof name === 'string' && name ? `${inputType} · ${name}` : inputType
|
|
118
|
+
})
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const textField = {
|
|
122
|
+
type: 'formText',
|
|
123
|
+
title: 'Text',
|
|
124
|
+
icon: Type,
|
|
125
|
+
fields: [
|
|
126
|
+
...baseFields(),
|
|
127
|
+
{ name: 'placeholder', type: 'string', title: 'Placeholder' },
|
|
128
|
+
{ name: 'defaultValue', type: 'string', title: 'Default value' }
|
|
129
|
+
],
|
|
130
|
+
preview: fieldPreview('Text')
|
|
131
|
+
};
|
|
132
|
+
const textareaField = {
|
|
133
|
+
type: 'formTextarea',
|
|
134
|
+
title: 'Long text',
|
|
135
|
+
icon: AlignLeft,
|
|
136
|
+
fields: [
|
|
137
|
+
...baseFields(),
|
|
138
|
+
{ name: 'placeholder', type: 'string', title: 'Placeholder' },
|
|
139
|
+
{ name: 'rows', type: 'number', title: 'Rows', initialValue: 4, min: 2, max: 20, step: 1 }
|
|
140
|
+
],
|
|
141
|
+
preview: fieldPreview('Long text')
|
|
142
|
+
};
|
|
143
|
+
const emailField = {
|
|
144
|
+
type: 'formEmail',
|
|
145
|
+
title: 'Email',
|
|
146
|
+
icon: Mail,
|
|
147
|
+
fields: [...baseFields(), { name: 'placeholder', type: 'string', title: 'Placeholder' }],
|
|
148
|
+
preview: fieldPreview('Email')
|
|
149
|
+
};
|
|
150
|
+
const numberField = {
|
|
151
|
+
type: 'formNumber',
|
|
152
|
+
title: 'Number',
|
|
153
|
+
icon: Hash,
|
|
154
|
+
fields: [
|
|
155
|
+
...baseFields(),
|
|
156
|
+
{ name: 'min', type: 'number', title: 'Minimum' },
|
|
157
|
+
{ name: 'max', type: 'number', title: 'Maximum' }
|
|
158
|
+
],
|
|
159
|
+
preview: fieldPreview('Number')
|
|
160
|
+
};
|
|
161
|
+
const checkboxField = {
|
|
162
|
+
type: 'formCheckbox',
|
|
163
|
+
title: 'Checkbox',
|
|
164
|
+
icon: SquareCheck,
|
|
165
|
+
fields: [
|
|
166
|
+
...baseFields(),
|
|
167
|
+
{ name: 'defaultValue', type: 'boolean', title: 'Ticked by default', initialValue: false }
|
|
168
|
+
],
|
|
169
|
+
preview: fieldPreview('Checkbox')
|
|
170
|
+
};
|
|
171
|
+
const selectField = {
|
|
172
|
+
type: 'formSelect',
|
|
173
|
+
title: 'Select',
|
|
174
|
+
icon: List,
|
|
175
|
+
fields: [
|
|
176
|
+
...baseFields(),
|
|
177
|
+
{
|
|
178
|
+
name: 'options',
|
|
179
|
+
type: 'array',
|
|
180
|
+
title: 'Options',
|
|
181
|
+
validation: (Rule) => Rule.required().min(1).max(100),
|
|
182
|
+
of: [
|
|
183
|
+
{
|
|
184
|
+
type: 'object',
|
|
185
|
+
name: 'option',
|
|
186
|
+
title: 'Option',
|
|
187
|
+
fields: [
|
|
188
|
+
{
|
|
189
|
+
name: 'label',
|
|
190
|
+
type: 'string',
|
|
191
|
+
title: 'Label',
|
|
192
|
+
validation: (Rule) => Rule.required()
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'value',
|
|
196
|
+
type: 'string',
|
|
197
|
+
title: 'Value',
|
|
198
|
+
description: 'What gets stored. Defaults to the label if left blank.'
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
preview: { select: { title: 'label', subtitle: 'value' } }
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
preview: fieldPreview('Select')
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* A block of text between inputs — a section heading, an explanation, a consent
|
|
210
|
+
* notice. It has no `name` and collects nothing, so it deliberately doesn't
|
|
211
|
+
* spread `baseFields()`.
|
|
212
|
+
*/
|
|
213
|
+
const messageField = {
|
|
214
|
+
type: 'formMessage',
|
|
215
|
+
title: 'Message',
|
|
216
|
+
icon: MessageSquareText,
|
|
217
|
+
fields: [{ name: 'message', type: 'array', title: 'Message', of: [{ type: 'block' }] }],
|
|
218
|
+
preview: {
|
|
219
|
+
select: { heading: 'message.0.children.0.text' },
|
|
220
|
+
prepare: ({ heading }) => ({
|
|
221
|
+
title: heading || 'Message',
|
|
222
|
+
subtitle: 'Message · display text'
|
|
223
|
+
})
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
/** Every field kind an editor can add, in the order they appear in the "add" menu. */
|
|
227
|
+
export const formFieldTypes = [
|
|
228
|
+
textField,
|
|
229
|
+
emailField,
|
|
230
|
+
textareaField,
|
|
231
|
+
selectField,
|
|
232
|
+
checkboxField,
|
|
233
|
+
numberField,
|
|
234
|
+
messageField
|
|
235
|
+
];
|
|
236
|
+
/** Field kinds that actually collect an answer — everything except `formMessage`. */
|
|
237
|
+
export const INPUT_FIELD_TYPES = formFieldTypes
|
|
238
|
+
.map((f) => f.type)
|
|
239
|
+
.filter((type) => type !== 'formMessage');
|
|
240
|
+
export const formSchema = {
|
|
241
|
+
type: 'document',
|
|
242
|
+
name: 'form',
|
|
243
|
+
title: 'Form',
|
|
244
|
+
description: 'A form an editor composes, embedded on a page by the Form block',
|
|
245
|
+
icon: ClipboardList,
|
|
246
|
+
groups: [
|
|
247
|
+
{ name: 'build', title: 'Build', default: true },
|
|
248
|
+
{ name: 'confirmation', title: 'Confirmation' },
|
|
249
|
+
{ name: 'notifications', title: 'Notifications' }
|
|
250
|
+
],
|
|
251
|
+
preview: { select: { title: 'title' } },
|
|
252
|
+
fields: [
|
|
253
|
+
{
|
|
254
|
+
name: 'title',
|
|
255
|
+
type: 'string',
|
|
256
|
+
title: 'Title',
|
|
257
|
+
description: 'Internal name, and the default heading where the form is embedded.',
|
|
258
|
+
group: 'build',
|
|
259
|
+
validation: (Rule) => Rule.required()
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'fields',
|
|
263
|
+
type: 'array',
|
|
264
|
+
title: 'Fields',
|
|
265
|
+
group: 'build',
|
|
266
|
+
of: formFieldTypes,
|
|
267
|
+
validation: (Rule) => Rule.required().min(1).max(50).custom(validateAuthoredFields)
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'submitButtonLabel',
|
|
271
|
+
type: 'string',
|
|
272
|
+
title: 'Submit button label',
|
|
273
|
+
group: 'build',
|
|
274
|
+
initialValue: 'Submit'
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'confirmationType',
|
|
278
|
+
type: 'string',
|
|
279
|
+
title: 'On submit',
|
|
280
|
+
group: 'confirmation',
|
|
281
|
+
initialValue: 'message',
|
|
282
|
+
list: [
|
|
283
|
+
{ title: 'Show a message', value: 'message' },
|
|
284
|
+
{ title: 'Redirect', value: 'redirect' }
|
|
285
|
+
],
|
|
286
|
+
options: { layout: 'tabs' }
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: 'confirmationMessage',
|
|
290
|
+
type: 'array',
|
|
291
|
+
title: 'Confirmation message',
|
|
292
|
+
group: 'confirmation',
|
|
293
|
+
of: [{ type: 'block' }],
|
|
294
|
+
hidden: ({ siblingData }) => siblingData.confirmationType !== 'message',
|
|
295
|
+
validation: (Rule) => Rule.custom((value, context) => context?.document?.confirmationType === 'message' &&
|
|
296
|
+
(!Array.isArray(value) || value.length === 0)
|
|
297
|
+
? 'Required when the form shows a confirmation message'
|
|
298
|
+
: true)
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'redirectUrl',
|
|
302
|
+
type: 'string',
|
|
303
|
+
title: 'Redirect to',
|
|
304
|
+
description: 'A site path (/thanks) or an absolute URL.',
|
|
305
|
+
group: 'confirmation',
|
|
306
|
+
hidden: ({ siblingData }) => siblingData.confirmationType !== 'redirect',
|
|
307
|
+
/*
|
|
308
|
+
* `hidden` takes the field off screen for the other branch; validation
|
|
309
|
+
* still has to enforce it, because hiding is an authoring affordance and
|
|
310
|
+
* the API is reachable without the UI.
|
|
311
|
+
*
|
|
312
|
+
* Cross-field invariants belong in validation rather than a hook — a hook
|
|
313
|
+
* transforms, validation judges. `context.document` is the whole document,
|
|
314
|
+
* which is what makes "required, but only for this branch" expressible.
|
|
315
|
+
*/
|
|
316
|
+
validation: (Rule) => Rule.custom((value, context) => {
|
|
317
|
+
const url = typeof value === 'string' ? value.trim() : '';
|
|
318
|
+
const redirects = context?.document?.confirmationType === 'redirect';
|
|
319
|
+
if (!url)
|
|
320
|
+
return redirects ? 'Required when the form redirects on submit' : true;
|
|
321
|
+
if (/^https?:\/\//.test(url) || url.startsWith('/'))
|
|
322
|
+
return true;
|
|
323
|
+
return 'Use a site path (/thanks) or an absolute URL (https://…)';
|
|
324
|
+
})
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'emails',
|
|
328
|
+
type: 'array',
|
|
329
|
+
title: 'Notification emails',
|
|
330
|
+
description: 'Sent after a submission is stored. Reference an answer with {{fieldName}}; {{allFields}} expands to the whole submission.',
|
|
331
|
+
group: 'notifications',
|
|
332
|
+
validation: (Rule) => Rule.max(20),
|
|
333
|
+
of: [
|
|
334
|
+
{
|
|
335
|
+
type: 'object',
|
|
336
|
+
name: 'notification',
|
|
337
|
+
title: 'Email',
|
|
338
|
+
fields: [
|
|
339
|
+
{
|
|
340
|
+
name: 'to',
|
|
341
|
+
type: 'string',
|
|
342
|
+
title: 'To',
|
|
343
|
+
description: 'Comma-separated for several recipients.',
|
|
344
|
+
validation: (Rule) => Rule.required().custom((value) => validEmailList(value, true))
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: 'replyTo',
|
|
348
|
+
type: 'string',
|
|
349
|
+
title: 'Reply to',
|
|
350
|
+
validation: (Rule) => Rule.custom((value) => validEmailList(value, false))
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: 'subject',
|
|
354
|
+
type: 'string',
|
|
355
|
+
title: 'Subject',
|
|
356
|
+
initialValue: 'New form submission',
|
|
357
|
+
validation: (Rule) => Rule.required()
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: 'message',
|
|
361
|
+
type: 'text',
|
|
362
|
+
title: 'Message',
|
|
363
|
+
rows: 6,
|
|
364
|
+
initialValue: '{{allFields}}',
|
|
365
|
+
validation: (Rule) => Rule.required()
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
preview: { select: { title: 'to', subtitle: 'subject' } }
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* A stored submission.
|
|
376
|
+
*
|
|
377
|
+
* Answers live in one `submissionData` array of `{ field, value }` rather than as
|
|
378
|
+
* named columns, because the shape is per-form and changes whenever an editor
|
|
379
|
+
* edits the form. Storing them positionally keeps old submissions readable after
|
|
380
|
+
* a field is renamed or removed — the record is what was actually sent.
|
|
381
|
+
*
|
|
382
|
+
* Written only by this plugin's endpoint, under a system context. Nothing in the
|
|
383
|
+
* admin should edit one: a submission is a record of an event, and an editable
|
|
384
|
+
* record of an event is not a record.
|
|
385
|
+
*/
|
|
386
|
+
/**
|
|
387
|
+
* No role may write these fields: the UI renders them read-only and the API drops
|
|
388
|
+
* writes at the boundary. Note that built-in `super_admin`/`admin` bypass field
|
|
389
|
+
* access by design, so this discourages rather than forbids — the endpoint remains
|
|
390
|
+
* the only thing that writes submissions in practice.
|
|
391
|
+
*/
|
|
392
|
+
const NO_WRITES = { update: [] };
|
|
393
|
+
/**
|
|
394
|
+
* Submissions can contain personal data, so the general document capabilities
|
|
395
|
+
* are too broad. The submit route writes with system access; humans may only
|
|
396
|
+
* read or erase submissions when their organization role explicitly allows it.
|
|
397
|
+
*/
|
|
398
|
+
export const defaultSubmissionAccess = {
|
|
399
|
+
read: ({ auth }) => ['owner', 'admin'].includes(effectiveOrganizationRole(auth) ?? ''),
|
|
400
|
+
create: () => false,
|
|
401
|
+
update: () => false,
|
|
402
|
+
delete: ({ auth }) => ['owner', 'admin'].includes(effectiveOrganizationRole(auth) ?? ''),
|
|
403
|
+
publish: () => false,
|
|
404
|
+
unpublish: () => false
|
|
405
|
+
};
|
|
406
|
+
export const formSubmissionSchema = {
|
|
407
|
+
type: 'document',
|
|
408
|
+
name: 'formSubmission',
|
|
409
|
+
title: 'Form submission',
|
|
410
|
+
description: 'A submitted form. Read-only — written by the public submit endpoint.',
|
|
411
|
+
icon: Inbox,
|
|
412
|
+
access: defaultSubmissionAccess,
|
|
413
|
+
preview: {
|
|
414
|
+
select: { title: 'summary', subtitle: 'submittedAt' }
|
|
415
|
+
},
|
|
416
|
+
fields: [
|
|
417
|
+
{
|
|
418
|
+
name: 'form',
|
|
419
|
+
type: 'reference',
|
|
420
|
+
title: 'Form',
|
|
421
|
+
to: [{ type: 'form' }],
|
|
422
|
+
access: NO_WRITES
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
// Denormalized one-line description, stamped at submit time so the list
|
|
426
|
+
// view is readable without loading every submission's answers.
|
|
427
|
+
name: 'summary',
|
|
428
|
+
type: 'string',
|
|
429
|
+
title: 'Summary',
|
|
430
|
+
access: NO_WRITES
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: 'submittedAt',
|
|
434
|
+
type: 'datetime',
|
|
435
|
+
title: 'Submitted at',
|
|
436
|
+
access: NO_WRITES
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: 'submissionData',
|
|
440
|
+
type: 'array',
|
|
441
|
+
title: 'Answers',
|
|
442
|
+
access: NO_WRITES,
|
|
443
|
+
of: [
|
|
444
|
+
{
|
|
445
|
+
type: 'object',
|
|
446
|
+
name: 'answer',
|
|
447
|
+
title: 'Answer',
|
|
448
|
+
fields: [
|
|
449
|
+
{ name: 'field', type: 'string', title: 'Field' },
|
|
450
|
+
{ name: 'value', type: 'text', title: 'Value', rows: 2 }
|
|
451
|
+
],
|
|
452
|
+
preview: { select: { title: 'field', subtitle: 'value' } }
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
name: 'notificationEmails',
|
|
458
|
+
type: 'array',
|
|
459
|
+
title: 'Notification snapshot',
|
|
460
|
+
access: NO_WRITES,
|
|
461
|
+
of: [
|
|
462
|
+
{
|
|
463
|
+
type: 'object',
|
|
464
|
+
name: 'submissionNotification',
|
|
465
|
+
fields: [
|
|
466
|
+
{ name: 'to', type: 'string', title: 'To' },
|
|
467
|
+
{ name: 'replyTo', type: 'string', title: 'Reply to' },
|
|
468
|
+
{ name: 'subject', type: 'string', title: 'Subject' },
|
|
469
|
+
{ name: 'message', type: 'text', title: 'Message' }
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
name: 'notificationFieldLabels',
|
|
476
|
+
type: 'array',
|
|
477
|
+
title: 'Field label snapshot',
|
|
478
|
+
access: NO_WRITES,
|
|
479
|
+
of: [
|
|
480
|
+
{
|
|
481
|
+
type: 'object',
|
|
482
|
+
name: 'submissionFieldLabel',
|
|
483
|
+
fields: [
|
|
484
|
+
{ name: 'field', type: 'string', title: 'Field' },
|
|
485
|
+
{ name: 'label', type: 'string', title: 'Label' }
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
]
|
|
491
|
+
};
|
|
492
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM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