@defra/forms-model 3.0.53 → 3.0.55
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/module/data-model/conditions-wrapper.js.map +1 -1
- package/dist/module/data-model/helpers.js.map +1 -1
- package/dist/module/data-model/input-wrapper.js.map +1 -1
- package/dist/module/form/{form-configuration.js → form-configuration/index.js} +1 -1
- package/dist/module/form/form-configuration/index.js.map +1 -0
- package/dist/module/form/form-definition/index.js +243 -0
- package/dist/module/form/form-definition/index.js.map +1 -0
- package/dist/module/form/form-definition/types.js.map +1 -0
- package/dist/module/form/form-metadata/index.js +12 -0
- package/dist/module/form/form-metadata/index.js.map +1 -0
- package/dist/module/form/form-metadata/types.js +2 -0
- package/dist/module/form/form-metadata/types.js.map +1 -0
- package/dist/module/form/index.js +3 -1
- package/dist/module/form/index.js.map +1 -1
- package/dist/module/form/types.js +2 -0
- package/dist/module/form/types.js.map +1 -0
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/types/data-model/conditions-wrapper.d.ts +1 -1
- package/dist/types/data-model/conditions-wrapper.d.ts.map +1 -1
- package/dist/types/data-model/helpers.d.ts +1 -1
- package/dist/types/data-model/helpers.d.ts.map +1 -1
- package/dist/types/data-model/input-wrapper.d.ts +1 -1
- package/dist/types/data-model/input-wrapper.d.ts.map +1 -1
- package/dist/types/form/{form-configuration.d.ts → form-configuration/index.d.ts} +1 -1
- package/dist/types/form/form-configuration/index.d.ts.map +1 -0
- package/dist/types/{schema/schema.d.ts → form/form-definition/index.d.ts} +9 -4
- package/dist/types/form/form-definition/index.d.ts.map +1 -0
- package/dist/types/{data-model → form/form-definition}/types.d.ts +5 -4
- package/dist/types/form/form-definition/types.d.ts.map +1 -0
- package/dist/types/form/form-metadata/index.d.ts +7 -0
- package/dist/types/form/form-metadata/index.d.ts.map +1 -0
- package/dist/types/form/form-metadata/types.d.ts +34 -0
- package/dist/types/form/form-metadata/types.d.ts.map +1 -0
- package/dist/types/form/index.d.ts +3 -1
- package/dist/types/form/index.d.ts.map +1 -1
- package/dist/types/form/types.d.ts +3 -0
- package/dist/types/form/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-model/conditions-wrapper.ts +1 -1
- package/src/data-model/helpers.ts +1 -1
- package/src/data-model/input-wrapper.ts +1 -1
- package/src/form/form-definition/index.ts +300 -0
- package/src/{data-model → form/form-definition}/types.ts +4 -1
- package/src/form/form-metadata/index.ts +16 -0
- package/src/form/form-metadata/types.ts +41 -0
- package/src/form/index.ts +3 -1
- package/src/form/types.ts +2 -0
- package/src/index.ts +1 -2
- package/dist/module/data-model/types.js.map +0 -1
- package/dist/module/form/form-configuration.js.map +0 -1
- package/dist/module/schema/index.js +0 -2
- package/dist/module/schema/index.js.map +0 -1
- package/dist/module/schema/schema.js +0 -235
- package/dist/module/schema/schema.js.map +0 -1
- package/dist/types/data-model/types.d.ts.map +0 -1
- package/dist/types/form/form-configuration.d.ts.map +0 -1
- package/dist/types/schema/index.d.ts +0 -2
- package/dist/types/schema/index.d.ts.map +0 -1
- package/dist/types/schema/schema.d.ts.map +0 -1
- package/src/schema/index.ts +0 -1
- package/src/schema/schema.ts +0 -300
- /package/dist/module/{data-model → form/form-definition}/types.js +0 -0
- /package/src/form/{form-configuration.ts → form-configuration/index.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"conditions-wrapper.js","names":["ConditionsModel","ConditionsWrapper","constructor","rawData","name","displayName","value","expression","from","toExpression","clone"],"sources":["../../../src/data-model/conditions-wrapper.ts"],"sourcesContent":["import { ConditionsModel } from '~/src/conditions/condition-model.js'\nimport {\n type ConditionRawData,\n type ConditionWrapperValue\n} from '~/src/
|
1
|
+
{"version":3,"file":"conditions-wrapper.js","names":["ConditionsModel","ConditionsWrapper","constructor","rawData","name","displayName","value","expression","from","toExpression","clone"],"sources":["../../../src/data-model/conditions-wrapper.ts"],"sourcesContent":["import { ConditionsModel } from '~/src/conditions/condition-model.js'\nimport {\n type ConditionRawData,\n type ConditionWrapperValue\n} from '~/src/form/types.js'\n\nexport class ConditionsWrapper {\n name: string\n displayName: string\n value: ConditionWrapperValue\n\n constructor(rawData: ConditionRawData) {\n const { name, displayName, value } = rawData\n this.displayName = displayName || name\n this.value = value\n this.name = name\n }\n\n get expression() {\n if (typeof this.value === 'string') {\n // Previously conditions were defined as strings, e.g: \"section.age < 18\"\n // keep this so application can support legacy forms exports.\n return this.value\n }\n\n return ConditionsModel.from(this.value).toExpression()\n }\n\n clone(): ConditionsWrapper {\n return new ConditionsWrapper(this)\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe;AAMxB,OAAO,MAAMC,iBAAiB,CAAC;EAK7BC,WAAWA,CAACC,OAAyB,EAAE;IACrC,MAAM;MAAEC,IAAI;MAAEC,WAAW;MAAEC;IAAM,CAAC,GAAGH,OAAO;IAC5C,IAAI,CAACE,WAAW,GAAGA,WAAW,IAAID,IAAI;IACtC,IAAI,CAACE,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEA,IAAIG,UAAUA,CAAA,EAAG;IACf,IAAI,OAAO,IAAI,CAACD,KAAK,KAAK,QAAQ,EAAE;MAClC;MACA;MACA,OAAO,IAAI,CAACA,KAAK;IACnB;IAEA,OAAON,eAAe,CAACQ,IAAI,CAAC,IAAI,CAACF,KAAK,CAAC,CAACG,YAAY,CAAC,CAAC;EACxD;EAEAC,KAAKA,CAAA,EAAsB;IACzB,OAAO,IAAIT,iBAAiB,CAAC,IAAI,CAAC;EACpC;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["isMultipleApiKey","payApiKey","obj","test","undefined","production"],"sources":["../../../src/data-model/helpers.ts"],"sourcesContent":["import { type MultipleApiKeys } from '~/src/
|
1
|
+
{"version":3,"file":"helpers.js","names":["isMultipleApiKey","payApiKey","obj","test","undefined","production"],"sources":["../../../src/data-model/helpers.ts"],"sourcesContent":["import { type MultipleApiKeys } from '~/src/form/types.js'\n\nexport function isMultipleApiKey(\n payApiKey: string | MultipleApiKeys | undefined\n): payApiKey is MultipleApiKeys {\n const obj = payApiKey as MultipleApiKeys\n return obj.test !== undefined || obj.production !== undefined\n}\n"],"mappings":"AAEA,OAAO,SAASA,gBAAgBA,CAC9BC,SAA+C,EACjB;EAC9B,MAAMC,GAAG,GAAGD,SAA4B;EACxC,OAAOC,GAAG,CAACC,IAAI,KAAKC,SAAS,IAAIF,GAAG,CAACG,UAAU,KAAKD,SAAS;AAC/D","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-wrapper.js","names":["clone","InputWrapper","name","undefined","title","type","parentItemName","constructor","rawData","page","options","Object","assign","myPage","components","propertyPath","ignoreSection","section","displayName","titleWithContext"],"sources":["../../../src/data-model/input-wrapper.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Page } from '~/src/
|
1
|
+
{"version":3,"file":"input-wrapper.js","names":["clone","InputWrapper","name","undefined","title","type","parentItemName","constructor","rawData","page","options","Object","assign","myPage","components","propertyPath","ignoreSection","section","displayName","titleWithContext"],"sources":["../../../src/data-model/input-wrapper.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Page } from '~/src/form/types.js'\nimport { clone } from '~/src/utils/helpers.js'\n\nexport class InputWrapper {\n name: string | undefined = undefined\n title: string | undefined = undefined\n type: string | undefined = undefined\n propertyPath: string | undefined\n #parentItemName: string | undefined\n page: Page\n\n constructor(\n rawData: ComponentDef,\n page: Page,\n options: { ignoreSection?: boolean; parentItemName?: string }\n ) {\n Object.assign(this, rawData)\n const myPage = clone(page)\n\n delete myPage.components\n\n this.page = myPage\n this.propertyPath =\n !options.ignoreSection && page.section\n ? `${page.section}.${this.name}`\n : this.name\n this.#parentItemName = options.parentItemName\n }\n\n get displayName(): string | undefined {\n const titleWithContext = this.#parentItemName\n ? `${this.title} under ${this.#parentItemName}`\n : this.title\n\n return this.page.section\n ? `${titleWithContext} in ${this.page.section}`\n : titleWithContext\n }\n}\n"],"mappings":"AAEA,SAASA,KAAK;AAEd,OAAO,MAAMC,YAAY,CAAC;EACxBC,IAAI,GAAuBC,SAAS;EACpCC,KAAK,GAAuBD,SAAS;EACrCE,IAAI,GAAuBF,SAAS;EAEpC,CAACG,cAAc;EAGfC,WAAWA,CACTC,OAAqB,EACrBC,IAAU,EACVC,OAA6D,EAC7D;IACAC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEJ,OAAO,CAAC;IAC5B,MAAMK,MAAM,GAAGb,KAAK,CAACS,IAAI,CAAC;IAE1B,OAAOI,MAAM,CAACC,UAAU;IAExB,IAAI,CAACL,IAAI,GAAGI,MAAM;IAClB,IAAI,CAACE,YAAY,GACf,CAACL,OAAO,CAACM,aAAa,IAAIP,IAAI,CAACQ,OAAO,GACjC,GAAER,IAAI,CAACQ,OAAQ,IAAG,IAAI,CAACf,IAAK,EAAC,GAC9B,IAAI,CAACA,IAAI;IACf,IAAI,CAAC,CAACI,cAAc,GAAGI,OAAO,CAACJ,cAAc;EAC/C;EAEA,IAAIY,WAAWA,CAAA,EAAuB;IACpC,MAAMC,gBAAgB,GAAG,IAAI,CAAC,CAACb,cAAc,GACxC,GAAE,IAAI,CAACF,KAAM,UAAS,IAAI,CAAC,CAACE,cAAe,EAAC,GAC7C,IAAI,CAACF,KAAK;IAEd,OAAO,IAAI,CAACK,IAAI,CAACQ,OAAO,GACnB,GAAEE,gBAAiB,OAAM,IAAI,CAACV,IAAI,CAACQ,OAAQ,EAAC,GAC7CE,gBAAgB;EACtB;AACF","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["FormConfiguration","constructor","Key","DisplayName","LastModified","feedbackForm","Error"],"sources":["../../../../src/form/form-configuration/index.ts"],"sourcesContent":["export class FormConfiguration {\n Key: string\n DisplayName: string\n LastModified: string | undefined\n feedbackForm: boolean | undefined\n\n constructor(\n Key: string,\n DisplayName?: string,\n LastModified?: string,\n feedbackForm?: boolean\n ) {\n if (!Key) {\n throw Error('Form configuration must have a key')\n }\n this.Key = Key\n this.DisplayName = DisplayName || Key\n this.LastModified = LastModified\n this.feedbackForm = feedbackForm || false\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,CAAC;EAM7BC,WAAWA,CACTC,GAAW,EACXC,WAAoB,EACpBC,YAAqB,EACrBC,YAAsB,EACtB;IACA,IAAI,CAACH,GAAG,EAAE;MACR,MAAMI,KAAK,CAAC,oCAAoC,CAAC;IACnD;IACA,IAAI,CAACJ,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,WAAW,GAAGA,WAAW,IAAID,GAAG;IACrC,IAAI,CAACE,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,YAAY,GAAGA,YAAY,IAAI,KAAK;EAC3C;AACF","ignoreList":[]}
|
@@ -0,0 +1,243 @@
|
|
1
|
+
import Joi from 'joi';
|
2
|
+
/**
|
3
|
+
* If an optional key is added, CURRENT_VERSION does not need to be incremented.
|
4
|
+
* Only breaking changes will require an increment, as well as a migration script.
|
5
|
+
*/
|
6
|
+
export const CURRENT_VERSION = 2;
|
7
|
+
const sectionsSchema = Joi.object().keys({
|
8
|
+
name: Joi.string().required(),
|
9
|
+
title: Joi.string().required(),
|
10
|
+
hideTitle: Joi.boolean().default(false)
|
11
|
+
});
|
12
|
+
const conditionFieldSchema = Joi.object().keys({
|
13
|
+
name: Joi.string().required(),
|
14
|
+
type: Joi.string().required(),
|
15
|
+
display: Joi.string().required()
|
16
|
+
});
|
17
|
+
const conditionValueSchema = Joi.object().keys({
|
18
|
+
type: Joi.string().required(),
|
19
|
+
value: Joi.string().required(),
|
20
|
+
display: Joi.string().required()
|
21
|
+
});
|
22
|
+
const relativeTimeValueSchema = Joi.object().keys({
|
23
|
+
type: Joi.string().required(),
|
24
|
+
timePeriod: Joi.string().required(),
|
25
|
+
timeUnit: Joi.string().required(),
|
26
|
+
direction: Joi.string().required(),
|
27
|
+
timeOnly: Joi.boolean().required()
|
28
|
+
});
|
29
|
+
const conditionRefSchema = Joi.object().keys({
|
30
|
+
conditionName: Joi.string().required(),
|
31
|
+
conditionDisplayName: Joi.string().required(),
|
32
|
+
coordinator: Joi.string().optional()
|
33
|
+
});
|
34
|
+
const conditionSchema = Joi.object().keys({
|
35
|
+
field: conditionFieldSchema,
|
36
|
+
operator: Joi.string().required(),
|
37
|
+
value: Joi.alternatives().try(conditionValueSchema, relativeTimeValueSchema),
|
38
|
+
coordinator: Joi.string().optional()
|
39
|
+
});
|
40
|
+
const conditionGroupSchema = Joi.object().keys({
|
41
|
+
conditions: Joi.array().items(Joi.alternatives().try(conditionSchema, conditionRefSchema, Joi.any() /** Should be a joi.link('#conditionGroupSchema') */))
|
42
|
+
});
|
43
|
+
const conditionsModelSchema = Joi.object().keys({
|
44
|
+
name: Joi.string().required(),
|
45
|
+
conditions: Joi.array().items(Joi.alternatives().try(conditionSchema, conditionRefSchema, conditionGroupSchema))
|
46
|
+
});
|
47
|
+
const conditionsSchema = Joi.object().keys({
|
48
|
+
name: Joi.string().required(),
|
49
|
+
displayName: Joi.string(),
|
50
|
+
value: Joi.alternatives().try(Joi.string(), conditionsModelSchema).required()
|
51
|
+
});
|
52
|
+
const localisedString = Joi.alternatives().try(Joi.object({
|
53
|
+
a: Joi.any()
|
54
|
+
}).unknown(), Joi.string().allow(''));
|
55
|
+
export const componentSchema = Joi.object().keys({
|
56
|
+
type: Joi.string().required(),
|
57
|
+
name: Joi.string(),
|
58
|
+
title: localisedString,
|
59
|
+
hint: localisedString.optional(),
|
60
|
+
options: Joi.object().default({}),
|
61
|
+
schema: Joi.object({
|
62
|
+
min: Joi.number(),
|
63
|
+
max: Joi.number()
|
64
|
+
}).unknown(true).default({}),
|
65
|
+
list: Joi.string().optional()
|
66
|
+
}).unknown(true);
|
67
|
+
const nextSchema = Joi.object().keys({
|
68
|
+
path: Joi.string().required(),
|
69
|
+
condition: Joi.string().allow('').optional(),
|
70
|
+
redirect: Joi.string().uri().optional()
|
71
|
+
});
|
72
|
+
|
73
|
+
/**
|
74
|
+
* `/status` is a special route for providing a user's application status.
|
75
|
+
* It should not be configured via the designer.
|
76
|
+
*/
|
77
|
+
const pageSchema = Joi.object().keys({
|
78
|
+
path: Joi.string().required().disallow('/status'),
|
79
|
+
title: localisedString,
|
80
|
+
section: Joi.string(),
|
81
|
+
controller: Joi.string(),
|
82
|
+
components: Joi.array().items(componentSchema),
|
83
|
+
next: Joi.array().items(nextSchema),
|
84
|
+
repeatField: Joi.string().optional(),
|
85
|
+
options: Joi.object().optional(),
|
86
|
+
backLinkFallback: Joi.string().optional()
|
87
|
+
});
|
88
|
+
const toggleableString = Joi.alternatives().try(Joi.boolean(), Joi.string());
|
89
|
+
const confirmationPageSchema = Joi.object({
|
90
|
+
customText: Joi.object({
|
91
|
+
title: Joi.string().default('Application complete'),
|
92
|
+
paymentSkipped: toggleableString.default('Someone will be in touch to make a payment.'),
|
93
|
+
nextSteps: toggleableString.default('You will receive an email with details with the next steps.')
|
94
|
+
}).default(),
|
95
|
+
components: Joi.array().items(componentSchema)
|
96
|
+
});
|
97
|
+
const paymentSkippedWarningPage = Joi.object({
|
98
|
+
customText: Joi.object({
|
99
|
+
title: Joi.string().default('Pay for your application').optional(),
|
100
|
+
caption: Joi.string().default('Payment').optional(),
|
101
|
+
body: Joi.string().default('').optional()
|
102
|
+
})
|
103
|
+
});
|
104
|
+
const specialPagesSchema = Joi.object().keys({
|
105
|
+
confirmationPage: confirmationPageSchema.optional(),
|
106
|
+
paymentSkippedWarningPage: paymentSkippedWarningPage.optional()
|
107
|
+
});
|
108
|
+
const listItemSchema = Joi.object().keys({
|
109
|
+
text: localisedString,
|
110
|
+
value: Joi.alternatives().try(Joi.number(), Joi.string()),
|
111
|
+
description: localisedString.optional(),
|
112
|
+
conditional: Joi.object().keys({
|
113
|
+
components: Joi.array().required().items(componentSchema.unknown(true)).unique('name')
|
114
|
+
}).allow(null).optional(),
|
115
|
+
condition: Joi.string().allow(null, '').optional()
|
116
|
+
});
|
117
|
+
const listSchema = Joi.object().keys({
|
118
|
+
name: Joi.string().required(),
|
119
|
+
title: localisedString,
|
120
|
+
type: Joi.string().required().valid('string', 'number'),
|
121
|
+
items: Joi.array().items(listItemSchema)
|
122
|
+
});
|
123
|
+
const feeSchema = Joi.object().keys({
|
124
|
+
description: Joi.string().required(),
|
125
|
+
amount: Joi.number().required(),
|
126
|
+
multiplier: Joi.string().optional(),
|
127
|
+
condition: Joi.string().optional(),
|
128
|
+
prefix: Joi.string().optional()
|
129
|
+
});
|
130
|
+
const multiApiKeySchema = Joi.object({
|
131
|
+
test: Joi.string().optional(),
|
132
|
+
production: Joi.string().optional()
|
133
|
+
});
|
134
|
+
const replyToConfigurationSchema = Joi.object({
|
135
|
+
emailReplyToId: Joi.string(),
|
136
|
+
condition: Joi.string().allow('').optional()
|
137
|
+
});
|
138
|
+
const notifySchema = Joi.object().keys({
|
139
|
+
apiKey: [Joi.string().allow('').optional(), multiApiKeySchema],
|
140
|
+
templateId: Joi.string(),
|
141
|
+
emailField: Joi.string(),
|
142
|
+
personalisation: Joi.array().items(Joi.string()),
|
143
|
+
personalisationFieldCustomisation: Joi.object().pattern(/./, Joi.array().items(Joi.string())).optional(),
|
144
|
+
addReferencesToPersonalisation: Joi.boolean().optional(),
|
145
|
+
emailReplyToIdConfiguration: Joi.array().items(replyToConfigurationSchema)
|
146
|
+
});
|
147
|
+
const emailSchema = Joi.object().keys({
|
148
|
+
emailAddress: Joi.string()
|
149
|
+
});
|
150
|
+
const webhookSchema = Joi.object().keys({
|
151
|
+
url: Joi.string(),
|
152
|
+
allowRetry: Joi.boolean().default(true)
|
153
|
+
});
|
154
|
+
const outputSchema = Joi.object().keys({
|
155
|
+
name: Joi.string(),
|
156
|
+
title: Joi.string().optional(),
|
157
|
+
type: Joi.string().allow('notify', 'email', 'webhook', 'sheets'),
|
158
|
+
outputConfiguration: Joi.alternatives().try(notifySchema, emailSchema, webhookSchema)
|
159
|
+
});
|
160
|
+
const feedbackSchema = Joi.object().keys({
|
161
|
+
feedbackForm: Joi.boolean().default(false),
|
162
|
+
url: Joi.when('feedbackForm', {
|
163
|
+
is: Joi.boolean().valid(false),
|
164
|
+
then: Joi.string().optional().allow('')
|
165
|
+
}),
|
166
|
+
emailAddress: Joi.string().email({
|
167
|
+
tlds: {
|
168
|
+
allow: false
|
169
|
+
}
|
170
|
+
}).optional()
|
171
|
+
});
|
172
|
+
const phaseBannerSchema = Joi.object().keys({
|
173
|
+
phase: Joi.string().valid('alpha', 'beta')
|
174
|
+
});
|
175
|
+
const feeOptionSchema = Joi.object().keys({
|
176
|
+
payApiKey: [Joi.string().allow('').optional(), multiApiKeySchema],
|
177
|
+
paymentReferenceFormat: [Joi.string().optional()],
|
178
|
+
payReturnUrl: Joi.string().optional(),
|
179
|
+
allowSubmissionWithoutPayment: Joi.boolean().optional().default(true),
|
180
|
+
maxAttempts: Joi.number().optional().default(3),
|
181
|
+
customPayErrorMessage: Joi.string().optional(),
|
182
|
+
showPaymentSkippedWarningPage: Joi.when('allowSubmissionWithoutPayment', {
|
183
|
+
is: true,
|
184
|
+
then: Joi.boolean().valid(true, false).default(false),
|
185
|
+
otherwise: Joi.boolean().valid(false).default(false)
|
186
|
+
})
|
187
|
+
}).default(({
|
188
|
+
payApiKey,
|
189
|
+
paymentReferenceFormat
|
190
|
+
}) => {
|
191
|
+
return {
|
192
|
+
...(payApiKey && {
|
193
|
+
payApiKey
|
194
|
+
}),
|
195
|
+
...(paymentReferenceFormat && {
|
196
|
+
paymentReferenceFormat
|
197
|
+
})
|
198
|
+
};
|
199
|
+
});
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Joi schema for `FormDefinition` interface
|
203
|
+
* @see {@link FormDefinition}
|
204
|
+
*/
|
205
|
+
export const formDefinitionSchema = Joi.object().required().keys({
|
206
|
+
name: localisedString.optional(),
|
207
|
+
feedback: feedbackSchema,
|
208
|
+
startPage: Joi.string().required(),
|
209
|
+
pages: Joi.array().required().items(pageSchema).unique('path'),
|
210
|
+
sections: Joi.array().items(sectionsSchema).unique('name').required(),
|
211
|
+
conditions: Joi.array().items(conditionsSchema).unique('name'),
|
212
|
+
lists: Joi.array().items(listSchema).unique('name'),
|
213
|
+
fees: Joi.array().items(feeSchema).optional(),
|
214
|
+
paymentReferenceFormat: Joi.string().optional(),
|
215
|
+
metadata: Joi.object({
|
216
|
+
a: Joi.any()
|
217
|
+
}).unknown().optional(),
|
218
|
+
declaration: Joi.string().allow('').optional(),
|
219
|
+
outputs: Joi.array().items(outputSchema),
|
220
|
+
payApiKey: [Joi.string().allow('').optional(), multiApiKeySchema],
|
221
|
+
skipSummary: Joi.boolean().default(false),
|
222
|
+
version: Joi.number().default(CURRENT_VERSION),
|
223
|
+
phaseBanner: phaseBannerSchema,
|
224
|
+
specialPages: specialPagesSchema.optional(),
|
225
|
+
feeOptions: feeOptionSchema
|
226
|
+
});
|
227
|
+
|
228
|
+
// Maintain compatibility with legacy named export
|
229
|
+
// E.g. `import { Schema } from '@defra/forms-model'`
|
230
|
+
export const Schema = formDefinitionSchema;
|
231
|
+
|
232
|
+
/**
|
233
|
+
* Schema versions:
|
234
|
+
* Undefined / 0 - initial version as at 28/8/20. Conditions may be in object structure or string form.
|
235
|
+
* 1 - Relevant components (radio, checkbox, select, autocomplete) now contain
|
236
|
+
* options as 'values' rather than referencing a data list
|
237
|
+
* 2 - Reverse v1. Values populating radio, checkboxes, select, autocomplete are defined in Lists only.
|
238
|
+
* TODO:- merge fees and paymentReferenceFormat
|
239
|
+
* 2 - 2023-05-04 `feeOptions` has been introduced. paymentReferenceFormat and payApiKey can be configured in top level or feeOptions. feeOptions will take precedent.
|
240
|
+
* if feeOptions are empty, it will pull values from the top level keys.
|
241
|
+
* WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.
|
242
|
+
*/
|
243
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","CURRENT_VERSION","sectionsSchema","object","keys","name","string","required","title","hideTitle","boolean","default","conditionFieldSchema","type","display","conditionValueSchema","value","relativeTimeValueSchema","timePeriod","timeUnit","direction","timeOnly","conditionRefSchema","conditionName","conditionDisplayName","coordinator","optional","conditionSchema","field","operator","alternatives","try","conditionGroupSchema","conditions","array","items","any","conditionsModelSchema","conditionsSchema","displayName","localisedString","a","unknown","allow","componentSchema","hint","options","schema","min","number","max","list","nextSchema","path","condition","redirect","uri","pageSchema","disallow","section","controller","components","next","repeatField","backLinkFallback","toggleableString","confirmationPageSchema","customText","paymentSkipped","nextSteps","paymentSkippedWarningPage","caption","body","specialPagesSchema","confirmationPage","listItemSchema","text","description","conditional","unique","listSchema","valid","feeSchema","amount","multiplier","prefix","multiApiKeySchema","test","production","replyToConfigurationSchema","emailReplyToId","notifySchema","apiKey","templateId","emailField","personalisation","personalisationFieldCustomisation","pattern","addReferencesToPersonalisation","emailReplyToIdConfiguration","emailSchema","emailAddress","webhookSchema","url","allowRetry","outputSchema","outputConfiguration","feedbackSchema","feedbackForm","when","is","then","email","tlds","phaseBannerSchema","phase","feeOptionSchema","payApiKey","paymentReferenceFormat","payReturnUrl","allowSubmissionWithoutPayment","maxAttempts","customPayErrorMessage","showPaymentSkippedWarningPage","otherwise","formDefinitionSchema","feedback","startPage","pages","sections","lists","fees","metadata","declaration","outputs","skipSummary","version","phaseBanner","specialPages","feeOptions","Schema"],"sources":["../../../../src/form/form-definition/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { type FormDefinition } from '~/src/form/form-definition/types.js'\n\n/**\n * If an optional key is added, CURRENT_VERSION does not need to be incremented.\n * Only breaking changes will require an increment, as well as a migration script.\n */\nexport const CURRENT_VERSION = 2\n\nconst sectionsSchema = Joi.object().keys({\n name: Joi.string().required(),\n title: Joi.string().required(),\n hideTitle: Joi.boolean().default(false)\n})\n\nconst conditionFieldSchema = Joi.object().keys({\n name: Joi.string().required(),\n type: Joi.string().required(),\n display: Joi.string().required()\n})\n\nconst conditionValueSchema = Joi.object().keys({\n type: Joi.string().required(),\n value: Joi.string().required(),\n display: Joi.string().required()\n})\n\nconst relativeTimeValueSchema = Joi.object().keys({\n type: Joi.string().required(),\n timePeriod: Joi.string().required(),\n timeUnit: Joi.string().required(),\n direction: Joi.string().required(),\n timeOnly: Joi.boolean().required()\n})\n\nconst conditionRefSchema = Joi.object().keys({\n conditionName: Joi.string().required(),\n conditionDisplayName: Joi.string().required(),\n coordinator: Joi.string().optional()\n})\n\nconst conditionSchema = Joi.object().keys({\n field: conditionFieldSchema,\n operator: Joi.string().required(),\n value: Joi.alternatives().try(conditionValueSchema, relativeTimeValueSchema),\n coordinator: Joi.string().optional()\n})\n\nconst conditionGroupSchema = Joi.object().keys({\n conditions: Joi.array().items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n Joi.any() /** Should be a joi.link('#conditionGroupSchema') */\n )\n )\n})\n\nconst conditionsModelSchema = Joi.object().keys({\n name: Joi.string().required(),\n conditions: Joi.array().items(\n Joi.alternatives().try(\n conditionSchema,\n conditionRefSchema,\n conditionGroupSchema\n )\n )\n})\n\nconst conditionsSchema = Joi.object().keys({\n name: Joi.string().required(),\n displayName: Joi.string(),\n value: Joi.alternatives().try(Joi.string(), conditionsModelSchema).required()\n})\n\nconst localisedString = Joi.alternatives().try(\n Joi.object({ a: Joi.any() }).unknown(),\n Joi.string().allow('')\n)\n\nexport const componentSchema = Joi.object()\n .keys({\n type: Joi.string().required(),\n name: Joi.string(),\n title: localisedString,\n hint: localisedString.optional(),\n options: Joi.object().default({}),\n schema: Joi.object({ min: Joi.number(), max: Joi.number() })\n .unknown(true)\n .default({}),\n list: Joi.string().optional()\n })\n .unknown(true)\n\nconst nextSchema = Joi.object().keys({\n path: Joi.string().required(),\n condition: Joi.string().allow('').optional(),\n redirect: Joi.string().uri().optional()\n})\n\n/**\n * `/status` is a special route for providing a user's application status.\n * It should not be configured via the designer.\n */\nconst pageSchema = Joi.object().keys({\n path: Joi.string().required().disallow('/status'),\n title: localisedString,\n section: Joi.string(),\n controller: Joi.string(),\n components: Joi.array().items(componentSchema),\n next: Joi.array().items(nextSchema),\n repeatField: Joi.string().optional(),\n options: Joi.object().optional(),\n backLinkFallback: Joi.string().optional()\n})\n\nconst toggleableString = Joi.alternatives().try(Joi.boolean(), Joi.string())\n\nconst confirmationPageSchema = Joi.object({\n customText: Joi.object({\n title: Joi.string().default('Application complete'),\n paymentSkipped: toggleableString.default(\n 'Someone will be in touch to make a payment.'\n ),\n nextSteps: toggleableString.default(\n 'You will receive an email with details with the next steps.'\n )\n }).default(),\n components: Joi.array().items(componentSchema)\n})\n\nconst paymentSkippedWarningPage = Joi.object({\n customText: Joi.object({\n title: Joi.string().default('Pay for your application').optional(),\n caption: Joi.string().default('Payment').optional(),\n body: Joi.string().default('').optional()\n })\n})\n\nconst specialPagesSchema = Joi.object().keys({\n confirmationPage: confirmationPageSchema.optional(),\n paymentSkippedWarningPage: paymentSkippedWarningPage.optional()\n})\n\nconst listItemSchema = Joi.object().keys({\n text: localisedString,\n value: Joi.alternatives().try(Joi.number(), Joi.string()),\n description: localisedString.optional(),\n conditional: Joi.object()\n .keys({\n components: Joi.array()\n .required()\n .items(componentSchema.unknown(true))\n .unique('name')\n })\n .allow(null)\n .optional(),\n condition: Joi.string().allow(null, '').optional()\n})\n\nconst listSchema = Joi.object().keys({\n name: Joi.string().required(),\n title: localisedString,\n type: Joi.string().required().valid('string', 'number'),\n items: Joi.array().items(listItemSchema)\n})\n\nconst feeSchema = Joi.object().keys({\n description: Joi.string().required(),\n amount: Joi.number().required(),\n multiplier: Joi.string().optional(),\n condition: Joi.string().optional(),\n prefix: Joi.string().optional()\n})\n\nconst multiApiKeySchema = Joi.object({\n test: Joi.string().optional(),\n production: Joi.string().optional()\n})\n\nconst replyToConfigurationSchema = Joi.object({\n emailReplyToId: Joi.string(),\n condition: Joi.string().allow('').optional()\n})\n\nconst notifySchema = Joi.object().keys({\n apiKey: [Joi.string().allow('').optional(), multiApiKeySchema],\n templateId: Joi.string(),\n emailField: Joi.string(),\n personalisation: Joi.array().items(Joi.string()),\n personalisationFieldCustomisation: Joi.object()\n .pattern(/./, Joi.array().items(Joi.string()))\n .optional(),\n addReferencesToPersonalisation: Joi.boolean().optional(),\n emailReplyToIdConfiguration: Joi.array().items(replyToConfigurationSchema)\n})\n\nconst emailSchema = Joi.object().keys({\n emailAddress: Joi.string()\n})\n\nconst webhookSchema = Joi.object().keys({\n url: Joi.string(),\n allowRetry: Joi.boolean().default(true)\n})\n\nconst outputSchema = Joi.object().keys({\n name: Joi.string(),\n title: Joi.string().optional(),\n type: Joi.string().allow('notify', 'email', 'webhook', 'sheets'),\n outputConfiguration: Joi.alternatives().try(\n notifySchema,\n emailSchema,\n webhookSchema\n )\n})\n\nconst feedbackSchema = Joi.object().keys({\n feedbackForm: Joi.boolean().default(false),\n url: Joi.when('feedbackForm', {\n is: Joi.boolean().valid(false),\n then: Joi.string().optional().allow('')\n }),\n emailAddress: Joi.string()\n .email({\n tlds: {\n allow: false\n }\n })\n .optional()\n})\n\nconst phaseBannerSchema = Joi.object().keys({\n phase: Joi.string().valid('alpha', 'beta')\n})\n\nconst feeOptionSchema = Joi.object()\n .keys({\n payApiKey: [Joi.string().allow('').optional(), multiApiKeySchema],\n paymentReferenceFormat: [Joi.string().optional()],\n payReturnUrl: Joi.string().optional(),\n allowSubmissionWithoutPayment: Joi.boolean().optional().default(true),\n maxAttempts: Joi.number().optional().default(3),\n customPayErrorMessage: Joi.string().optional(),\n showPaymentSkippedWarningPage: Joi.when('allowSubmissionWithoutPayment', {\n is: true,\n then: Joi.boolean().valid(true, false).default(false),\n otherwise: Joi.boolean().valid(false).default(false)\n })\n })\n .default(({ payApiKey, paymentReferenceFormat }) => {\n return {\n ...(payApiKey && { payApiKey }),\n ...(paymentReferenceFormat && { paymentReferenceFormat })\n }\n })\n\n/**\n * Joi schema for `FormDefinition` interface\n * @see {@link FormDefinition}\n */\nexport const formDefinitionSchema = Joi.object()\n .required()\n .keys({\n name: localisedString.optional(),\n feedback: feedbackSchema,\n startPage: Joi.string().required(),\n pages: Joi.array().required().items(pageSchema).unique('path'),\n sections: Joi.array().items(sectionsSchema).unique('name').required(),\n conditions: Joi.array().items(conditionsSchema).unique('name'),\n lists: Joi.array().items(listSchema).unique('name'),\n fees: Joi.array().items(feeSchema).optional(),\n paymentReferenceFormat: Joi.string().optional(),\n metadata: Joi.object({ a: Joi.any() }).unknown().optional(),\n declaration: Joi.string().allow('').optional(),\n outputs: Joi.array().items(outputSchema),\n payApiKey: [Joi.string().allow('').optional(), multiApiKeySchema],\n skipSummary: Joi.boolean().default(false),\n version: Joi.number().default(CURRENT_VERSION),\n phaseBanner: phaseBannerSchema,\n specialPages: specialPagesSchema.optional(),\n feeOptions: feeOptionSchema\n })\n\n// Maintain compatibility with legacy named export\n// E.g. `import { Schema } from '@defra/forms-model'`\nexport const Schema = formDefinitionSchema\n\n/**\n * Schema versions:\n * Undefined / 0 - initial version as at 28/8/20. Conditions may be in object structure or string form.\n * 1 - Relevant components (radio, checkbox, select, autocomplete) now contain\n * options as 'values' rather than referencing a data list\n * 2 - Reverse v1. Values populating radio, checkboxes, select, autocomplete are defined in Lists only.\n * TODO:- merge fees and paymentReferenceFormat\n * 2 - 2023-05-04 `feeOptions` has been introduced. paymentReferenceFormat and payApiKey can be configured in top level or feeOptions. feeOptions will take precedent.\n * if feeOptions are empty, it will pull values from the top level keys.\n * WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.\n */\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAIrB;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG,CAAC;AAEhC,MAAMC,cAAc,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC;EACv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AAC,EAAE,CAAC,CAACjB,QAAQ,CAAC,CAAC;EAC9C4G,OAAO,EAAEtI,GAAG,CAACkC,KAAK,CAAC,CAAC,CAACC,KAAK,CAACsE,YAAY,CAAC;EACxCY,SAAS,EAAE,CAACrH,GAAG,CAACM,MAAM,CAAC,CAAC,CAACqC,KAAK,CAAC,EAAE,CAAC,CAACjB,QAAQ,CAAC,CAAC,EAAE4D,iBAAiB,CAAC;EACjEiD,WAAW,EAAEvI,GAAG,CAACU,OAAO,CAAC,CAAC,CAACC,OAAO,CAAC,KAAK,CAAC;EACzC6H,OAAO,EAAExI,GAAG,CAACiD,MAAM,CAAC,CAAC,CAACtC,OAAO,CAACV,eAAe,CAAC;EAC9CwI,WAAW,EAAEvB,iBAAiB;EAC9BwB,YAAY,EAAEjE,kBAAkB,CAAC/C,QAAQ,CAAC,CAAC;EAC3CiH,UAAU,EAAEvB;AACd,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMwB,MAAM,GAAGf,oBAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-definition/types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Condition } from '~/src/conditions/condition.js'\nimport { type OutputType } from '~/src/data-model/enums.js'\nimport { formDefinitionSchema } from '~/src/form/form-definition/index.js'\n\ntype Toggleable<T> = boolean | T\n\nexport interface Next {\n path: string\n condition?: string\n}\n\nexport type Link = Next\n\nexport interface Page {\n title: string\n path: string\n controller: string\n components?: ComponentDef[]\n section: string // the section ID\n next?: { path: string; condition?: string }[]\n}\n\nexport interface RepeatingFieldPage extends Page {\n controller: 'RepeatingFieldPageController'\n options: {\n summaryDisplayMode?: {\n samePage?: boolean\n separatePage?: boolean\n hideRowTitles?: boolean\n }\n customText?: {\n separatePageTitle?: string\n }\n }\n}\n\nexport interface Section {\n name: string\n title: string\n hideTitle: boolean\n}\n\nexport interface Item {\n text: string\n value: string | number | boolean\n description?: string\n condition?: string\n}\n\nexport interface List {\n name: string\n title: string\n type: 'string' | 'number' | 'boolean'\n items: Item[]\n}\n\nexport interface Feedback {\n feedbackForm?: boolean\n url?: string\n emailAddress?: string\n}\n\nexport interface PhaseBanner {\n phase?: 'alpha' | 'beta'\n feedbackUrl?: string\n}\n\nexport interface MultipleApiKeys {\n test?: string\n production?: string\n}\n\nexport interface EmailOutputConfiguration {\n emailAddress: string\n}\n\nexport interface NotifyOutputConfiguration {\n apiKey: string\n templateId: string\n emailField: string\n personalisation: string[]\n personalisationFieldCustomisation?: Record<string, string[]>\n addReferencesToPersonalisation?: boolean\n emailReplyToIdConfiguration?: {\n emailReplyToId: string\n condition?: string | undefined\n }[]\n}\n\nexport interface WebhookOutputConfiguration {\n url: string\n}\n\nexport type OutputConfiguration =\n | EmailOutputConfiguration\n | NotifyOutputConfiguration\n | WebhookOutputConfiguration\n\nexport interface Output {\n name: string\n title: string\n type: OutputType\n outputConfiguration: OutputConfiguration\n}\n\nexport interface ConfirmationPage {\n customText: {\n title: string\n paymentSkipped: Toggleable<string>\n nextSteps: Toggleable<string>\n }\n components: ComponentDef[]\n}\n\nexport interface PaymentSkippedWarningPage {\n customText: {\n title: string\n caption: string\n body: string\n }\n}\n\nexport interface SpecialPages {\n confirmationPage?: ConfirmationPage\n paymentSkippedWarningPage?: PaymentSkippedWarningPage\n}\n\nexport interface Fee {\n description: string\n amount: number\n multiplier?: string\n condition?: string\n prefix?: string\n}\n\nexport interface FeeOptions {\n paymentReferenceFormat?: string\n payReturnUrl?: string\n allowSubmissionWithoutPayment: boolean\n maxAttempts: number\n customPayErrorMessage?: string\n showPaymentSkippedWarningPage: boolean\n}\n\nexport type ConditionWrapperValue =\n | string\n | {\n name: string\n conditions: Condition[]\n }\n\nexport interface ConditionRawData {\n name: string\n displayName: string\n value: ConditionWrapperValue\n}\n\n/**\n * Interface for `formDefinitionSchema` Joi schema\n * @see {@link formDefinitionSchema}\n */\nexport interface FormDefinition {\n pages: (Page | RepeatingFieldPage)[]\n conditions: ConditionRawData[]\n lists: List[]\n sections: Section[]\n startPage?: Page['path'] | undefined\n name?: string | undefined\n feedback?: Feedback\n phaseBanner?: PhaseBanner\n fees: Fee[]\n skipSummary?: boolean | undefined\n outputs: Output[]\n declaration?: string | undefined\n metadata?: Record<string, unknown>\n payApiKey?: string | MultipleApiKeys | undefined\n specialPages?: SpecialPages\n paymentReferenceFormat?: string\n feeOptions: FeeOptions\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import Joi from 'joi';
|
2
|
+
/**
|
3
|
+
* Joi schema for `FormMetadata` interface
|
4
|
+
* @see {@link FormMetadata}
|
5
|
+
*/
|
6
|
+
export const formMetadataSchema = Joi.object().keys({
|
7
|
+
title: Joi.string().max(250).trim().required(),
|
8
|
+
organisation: Joi.string().max(100).trim().required(),
|
9
|
+
teamName: Joi.string().max(100).trim().required(),
|
10
|
+
teamEmail: Joi.string().email().trim().required()
|
11
|
+
}).required();
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","formMetadataSchema","object","keys","title","string","max","trim","required","organisation","teamName","teamEmail","email"],"sources":["../../../../src/form/form-metadata/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { type FormMetadata } from '~/src/form/form-metadata/types.js'\n\n/**\n * Joi schema for `FormMetadata` interface\n * @see {@link FormMetadata}\n */\nexport const formMetadataSchema = Joi.object()\n .keys({\n title: Joi.string().max(250).trim().required(),\n organisation: Joi.string().max(100).trim().required(),\n teamName: Joi.string().max(100).trim().required(),\n teamEmail: Joi.string().email().trim().required()\n })\n .required()\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAIrB;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,GAAG,CAACE,MAAM,CAAC,CAAC,CAC3CC,IAAI,CAAC;EACJC,KAAK,EAAEJ,GAAG,CAACK,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9CC,YAAY,EAAET,GAAG,CAACK,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACrDE,QAAQ,EAAEV,GAAG,CAACK,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACjDG,SAAS,EAAEX,GAAG,CAACK,MAAM,CAAC,CAAC,CAACO,KAAK,CAAC,CAAC,CAACL,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC;AAClD,CAAC,CAAC,CACDA,QAAQ,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metadata/types.ts"],"sourcesContent":["import { formMetadataSchema } from '~/src/form/form-metadata/index.js'\n\n/**\n * Interface for `formMetadataSchema` Joi schema\n * @see {@link formMetadataSchema}\n */\nexport interface FormMetadata {\n /**\n * The id of the form\n */\n id: string\n\n /**\n * The human-readable slug id of the form\n */\n slug: string\n\n /**\n * The human-readable title of the form\n */\n title: string\n\n /**\n * The organisation this form belongs to\n */\n organisation: string\n\n /**\n * The name of the team who own this form\n */\n teamName: string\n\n /**\n * The email of the team who own this form\n */\n teamEmail: string\n}\n\nexport type FormByIdInput = Pick<FormMetadata, 'id'>\nexport type FormMetadataDocument = Omit<FormMetadata, 'id'>\nexport type FormMetadataInput = Omit<FormMetadata, 'id' | 'slug'>\n"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/form/index.ts"],"sourcesContent":["export * from '~/src/form/form-configuration/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-metadata/index.js'\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/form/types.ts"],"sourcesContent":["export type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\n"],"mappings":"","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
package/dist/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/data-model/index.js'\nexport * from '~/src/utils/logger.js'\nexport * from '~/src/form/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/migration/index.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"conditions-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/conditions-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,
|
1
|
+
{"version":3,"file":"conditions-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/conditions-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAA;AAE5B,qBAAa,iBAAiB;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,qBAAqB,CAAA;gBAEhB,OAAO,EAAE,gBAAgB;IAOrC,IAAI,UAAU,WAQb;IAED,KAAK,IAAI,iBAAiB;CAG3B"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { type MultipleApiKeys } from '../
|
1
|
+
import { type MultipleApiKeys } from '../form/types.js';
|
2
2
|
export declare function isMultipleApiKey(payApiKey: string | MultipleApiKeys | undefined): payApiKey is MultipleApiKeys;
|
3
3
|
//# sourceMappingURL=helpers.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/data-model/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/data-model/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,GAC9C,SAAS,IAAI,eAAe,CAG9B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/input-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"input-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/input-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAG/C,qBAAa,YAAY;;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAY;IACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhC,IAAI,EAAE,IAAI,CAAA;gBAGR,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IAe/D,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAQpC;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-configuration/index.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,EAAE,OAAO,GAAG,SAAS,CAAA;gBAG/B,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO;CAUzB"}
|
@@ -1,11 +1,16 @@
|
|
1
|
-
import
|
1
|
+
import Joi from 'joi';
|
2
2
|
/**
|
3
3
|
* If an optional key is added, CURRENT_VERSION does not need to be incremented.
|
4
4
|
* Only breaking changes will require an increment, as well as a migration script.
|
5
5
|
*/
|
6
6
|
export declare const CURRENT_VERSION = 2;
|
7
|
-
export declare const componentSchema:
|
8
|
-
|
7
|
+
export declare const componentSchema: Joi.ObjectSchema<any>;
|
8
|
+
/**
|
9
|
+
* Joi schema for `FormDefinition` interface
|
10
|
+
* @see {@link FormDefinition}
|
11
|
+
*/
|
12
|
+
export declare const formDefinitionSchema: Joi.ObjectSchema<any>;
|
13
|
+
export declare const Schema: Joi.ObjectSchema<any>;
|
9
14
|
/**
|
10
15
|
* Schema versions:
|
11
16
|
* Undefined / 0 - initial version as at 28/8/20. Conditions may be in object structure or string form.
|
@@ -17,4 +22,4 @@ export declare const Schema: joi.ObjectSchema<any>;
|
|
17
22
|
* if feeOptions are empty, it will pull values from the top level keys.
|
18
23
|
* WARN: Fee/GOV.UK pay configurations (apart from fees) should no longer be stored in the top level, always within feeOptions.
|
19
24
|
*/
|
20
|
-
//# sourceMappingURL=
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAIrB;;;GAGG;AACH,eAAO,MAAM,eAAe,IAAI,CAAA;AAyEhC,eAAO,MAAM,eAAe,uBAYZ,CAAA;AAqKhB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uBAqB7B,CAAA;AAIJ,eAAO,MAAM,MAAM,uBAAuB,CAAA;AAE1C;;;;;;;;;;GAUG"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { type ComponentDef } from '
|
2
|
-
import { type Condition } from '
|
3
|
-
import { type OutputType } from '
|
1
|
+
import { type ComponentDef } from '../../components/types.js';
|
2
|
+
import { type Condition } from '../../conditions/condition.js';
|
3
|
+
import { type OutputType } from '../../data-model/enums.js';
|
4
4
|
type Toggleable<T> = boolean | T;
|
5
5
|
export interface Next {
|
6
6
|
path: string;
|
@@ -130,7 +130,8 @@ export interface ConditionRawData {
|
|
130
130
|
value: ConditionWrapperValue;
|
131
131
|
}
|
132
132
|
/**
|
133
|
-
* `
|
133
|
+
* Interface for `formDefinitionSchema` Joi schema
|
134
|
+
* @see {@link formDefinitionSchema}
|
134
135
|
*/
|
135
136
|
export interface FormDefinition {
|
136
137
|
pages: (Page | RepeatingFieldPage)[];
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;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AED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,CAAC,IAAI,GAAG,kBAAkB,CAAC,EAAE,CAAA;IACpC,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAA;IAChD,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,UAAU,EAAE,UAAU,CAAA;CACvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAIrB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uBAOlB,CAAA"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Interface for `formMetadataSchema` Joi schema
|
3
|
+
* @see {@link formMetadataSchema}
|
4
|
+
*/
|
5
|
+
export interface FormMetadata {
|
6
|
+
/**
|
7
|
+
* The id of the form
|
8
|
+
*/
|
9
|
+
id: string;
|
10
|
+
/**
|
11
|
+
* The human-readable slug id of the form
|
12
|
+
*/
|
13
|
+
slug: string;
|
14
|
+
/**
|
15
|
+
* The human-readable title of the form
|
16
|
+
*/
|
17
|
+
title: string;
|
18
|
+
/**
|
19
|
+
* The organisation this form belongs to
|
20
|
+
*/
|
21
|
+
organisation: string;
|
22
|
+
/**
|
23
|
+
* The name of the team who own this form
|
24
|
+
*/
|
25
|
+
teamName: string;
|
26
|
+
/**
|
27
|
+
* The email of the team who own this form
|
28
|
+
*/
|
29
|
+
teamEmail: string;
|
30
|
+
}
|
31
|
+
export type FormByIdInput = Pick<FormMetadata, 'id'>;
|
32
|
+
export type FormMetadataDocument = Omit<FormMetadata, 'id'>;
|
33
|
+
export type FormMetadataInput = Omit<FormMetadata, 'id' | 'slug'>;
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AACpD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/index.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/form/types.ts"],"names":[],"mappings":"AAAA,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA"}
|