@10x-media/form-builder 0.1.0-beta.4 → 0.1.0-beta.5
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/CHANGELOG.md +83 -0
- package/README.md +3 -3
- package/dist/actions/body/serializeBody.d.ts +8 -5
- package/dist/actions/body/serializeBody.js.map +1 -1
- package/dist/actions/body/textOfBody.d.ts +13 -0
- package/dist/actions/body/textOfBody.js +35 -0
- package/dist/actions/body/textOfBody.js.map +1 -0
- package/dist/actions/builtin/confirmation.js +41 -11
- package/dist/actions/builtin/confirmation.js.map +1 -1
- package/dist/actions/builtin/emailTeam.js +77 -38
- package/dist/actions/builtin/emailTeam.js.map +1 -1
- package/dist/actions/builtin/index.d.ts +8 -3
- package/dist/actions/builtin/index.js +8 -5
- package/dist/actions/builtin/index.js.map +1 -1
- package/dist/actions/defineAction.d.ts +1 -1
- package/dist/actions/fromAddresses.d.ts +21 -0
- package/dist/actions/fromAddresses.js +74 -0
- package/dist/actions/fromAddresses.js.map +1 -0
- package/dist/actions/task.js +9 -8
- package/dist/actions/task.js.map +1 -1
- package/dist/aggregation/aggregateResponses.d.ts +9 -0
- package/dist/aggregation/aggregateResponses.js +8 -14
- package/dist/aggregation/aggregateResponses.js.map +1 -1
- package/dist/aggregation/resolveResultsRequest.d.ts +19 -6
- package/dist/aggregation/resolveResultsRequest.js +58 -12
- package/dist/aggregation/resolveResultsRequest.js.map +1 -1
- package/dist/calc/computeCalcFields.js +2 -1
- package/dist/calc/computeCalcFields.js.map +1 -1
- package/dist/client/ByteSizeField.d.ts +8 -0
- package/dist/client/ByteSizeField.js +3 -1
- package/dist/client/ByteSizeField.js.map +1 -1
- package/dist/client/ClosePollButton.d.ts +15 -0
- package/dist/client/ClosePollButton.js +80 -0
- package/dist/client/ClosePollButton.js.map +1 -0
- package/dist/client/CondensedArray.d.ts +15 -0
- package/dist/client/CondensedArray.js +97 -0
- package/dist/client/CondensedArray.js.map +1 -0
- package/dist/client/EndpointOptionsSelect.d.ts +45 -0
- package/dist/client/EndpointOptionsSelect.js +103 -0
- package/dist/client/EndpointOptionsSelect.js.map +1 -0
- package/dist/client/FieldBlockLabel.d.ts +18 -0
- package/dist/client/FieldBlockLabel.js +34 -0
- package/dist/client/FieldBlockLabel.js.map +1 -0
- package/dist/client/FieldNameSelect.d.ts +20 -4
- package/dist/client/FieldNameSelect.js +25 -14
- package/dist/client/FieldNameSelect.js.map +1 -1
- package/dist/client/FlowBuilder.d.ts +2 -1
- package/dist/client/FlowBuilder.js +63 -57
- package/dist/client/FlowBuilder.js.map +1 -1
- package/dist/client/RuleDescription.d.ts +21 -0
- package/dist/client/RuleDescription.js +19 -0
- package/dist/client/RuleDescription.js.map +1 -0
- package/dist/client/admin.css +36 -0
- package/dist/client/endpointOptions.js +29 -0
- package/dist/client/endpointOptions.js.map +1 -0
- package/dist/client/flowAuthoring.js +114 -7
- package/dist/client/flowAuthoring.js.map +1 -1
- package/dist/client/synthesizeClientField.js +15 -8
- package/dist/client/synthesizeClientField.js.map +1 -1
- package/dist/collections/buttonFields.d.ts +34 -0
- package/dist/collections/buttonFields.js +35 -0
- package/dist/collections/buttonFields.js.map +1 -0
- package/dist/collections/cells/FieldCountCell.d.ts +15 -0
- package/dist/collections/cells/FieldCountCell.js +18 -0
- package/dist/collections/cells/FieldCountCell.js.map +1 -0
- package/dist/collections/cells/FlowStepsCell.d.ts +14 -0
- package/dist/collections/cells/FlowStepsCell.js +17 -0
- package/dist/collections/cells/FlowStepsCell.js.map +1 -0
- package/dist/collections/formSubmissions.js +22 -17
- package/dist/collections/formSubmissions.js.map +1 -1
- package/dist/collections/forms.js +310 -137
- package/dist/collections/forms.js.map +1 -1
- package/dist/collections/redirectFields.d.ts +29 -0
- package/dist/consent/applyConsentStatements.d.ts +14 -0
- package/dist/consent/applyConsentStatements.js +17 -0
- package/dist/consent/applyConsentStatements.js.map +1 -0
- package/dist/consent/captureConsent.d.ts +19 -8
- package/dist/consent/captureConsent.js +34 -11
- package/dist/consent/captureConsent.js.map +1 -1
- package/dist/consent/consentSourcesField.d.ts +58 -0
- package/dist/consent/consentSourcesField.js +79 -0
- package/dist/consent/consentSourcesField.js.map +1 -0
- package/dist/consent/resolveConsentEntries.d.ts +24 -0
- package/dist/consent/resolveConsentEntries.js +43 -0
- package/dist/consent/resolveConsentEntries.js.map +1 -0
- package/dist/consent/resolveConsentSourcesRequest.d.ts +37 -0
- package/dist/consent/resolveConsentSourcesRequest.js +55 -0
- package/dist/consent/resolveConsentSourcesRequest.js.map +1 -0
- package/dist/consent/resolveConsentStatements.d.ts +45 -0
- package/dist/consent/resolveConsentStatements.js +44 -0
- package/dist/consent/resolveConsentStatements.js.map +1 -0
- package/dist/consent/resolvePublishedVersionRef.d.ts +17 -11
- package/dist/consent/resolvePublishedVersionRef.js +13 -10
- package/dist/consent/resolvePublishedVersionRef.js.map +1 -1
- package/dist/consent/types.d.ts +49 -0
- package/dist/email/departments.d.ts +55 -0
- package/dist/email/departments.js +130 -0
- package/dist/email/departments.js.map +1 -0
- package/dist/email/departmentsField.d.ts +49 -0
- package/dist/email/departmentsField.js +69 -0
- package/dist/email/departmentsField.js.map +1 -0
- package/dist/exports/client.d.ts +8 -1
- package/dist/exports/client.js +8 -1
- package/dist/exports/react.d.ts +8 -3
- package/dist/exports/react.js +6 -2
- package/dist/exports/rsc.d.ts +3 -1
- package/dist/exports/rsc.js +4 -2
- package/dist/exports/types.d.ts +16 -8
- package/dist/fields/buildFieldBlocks.js +28 -13
- package/dist/fields/buildFieldBlocks.js.map +1 -1
- package/dist/fields/builtin/calculation.js +7 -0
- package/dist/fields/builtin/calculation.js.map +1 -1
- package/dist/fields/builtin/checkbox.js +8 -0
- package/dist/fields/builtin/checkbox.js.map +1 -1
- package/dist/fields/builtin/consent.js +27 -21
- package/dist/fields/builtin/consent.js.map +1 -1
- package/dist/fields/builtin/country.d.ts +13 -0
- package/dist/fields/builtin/country.js +30 -0
- package/dist/fields/builtin/country.js.map +1 -0
- package/dist/fields/builtin/date.js +2 -0
- package/dist/fields/builtin/date.js.map +1 -1
- package/dist/fields/builtin/file.js +5 -4
- package/dist/fields/builtin/file.js.map +1 -1
- package/dist/fields/builtin/index.d.ts +8 -6
- package/dist/fields/builtin/index.js +10 -9
- package/dist/fields/builtin/index.js.map +1 -1
- package/dist/fields/builtin/message.js +8 -4
- package/dist/fields/builtin/message.js.map +1 -1
- package/dist/fields/builtin/repeater.js +1 -0
- package/dist/fields/builtin/repeater.js.map +1 -1
- package/dist/fields/builtin/select.js +1 -0
- package/dist/fields/builtin/select.js.map +1 -1
- package/dist/fields/builtin/state.d.ts +13 -0
- package/dist/fields/builtin/state.js +30 -0
- package/dist/fields/builtin/state.js.map +1 -0
- package/dist/fields/data/regions.d.ts +21 -0
- package/dist/fields/data/regions.js +1238 -0
- package/dist/fields/data/regions.js.map +1 -0
- package/dist/fields/fieldKey.d.ts +15 -0
- package/dist/fields/fieldKey.js +16 -0
- package/dist/fields/fieldKey.js.map +1 -0
- package/dist/fields/fieldNamesOfType.js +13 -8
- package/dist/fields/fieldNamesOfType.js.map +1 -1
- package/dist/fields/instanceOptions.js +20 -0
- package/dist/fields/instanceOptions.js.map +1 -0
- package/dist/fields/registry.d.ts +1 -0
- package/dist/fields/registry.js +21 -2
- package/dist/fields/registry.js.map +1 -1
- package/dist/fields/sharedConfig.js +46 -9
- package/dist/fields/sharedConfig.js.map +1 -1
- package/dist/fields/types.d.ts +54 -3
- package/dist/flow/engine.d.ts +6 -4
- package/dist/flow/engine.js +11 -6
- package/dist/flow/engine.js.map +1 -1
- package/dist/flow/normalizeFlow.js +16 -7
- package/dist/flow/normalizeFlow.js.map +1 -1
- package/dist/flow/types.d.ts +12 -3
- package/dist/flow/types.js +11 -0
- package/dist/flow/types.js.map +1 -0
- package/dist/form/pollState.d.ts +4 -4
- package/dist/form/pollState.js.map +1 -1
- package/dist/form/toFormDocument.d.ts +37 -12
- package/dist/form/toFormDocument.js +43 -7
- package/dist/form/toFormDocument.js.map +1 -1
- package/dist/form/types.d.ts +31 -14
- package/dist/index.d.ts +143 -28
- package/dist/index.js +43 -14
- package/dist/index.js.map +1 -1
- package/dist/plugin/customState.js +26 -0
- package/dist/plugin/customState.js.map +1 -0
- package/dist/plugin/registerCollections.js +23 -13
- package/dist/plugin/registerCollections.js.map +1 -1
- package/dist/plugin/uploadsCollection.d.ts +2 -0
- package/dist/poll/applyPollOptions.js +3 -2
- package/dist/poll/applyPollOptions.js.map +1 -1
- package/dist/poll/buildPollOptionSourceFields.js +2 -5
- package/dist/poll/buildPollOptionSourceFields.js.map +1 -1
- package/dist/poll/closeJob.d.ts +52 -0
- package/dist/poll/closeJob.js +119 -0
- package/dist/poll/closeJob.js.map +1 -0
- package/dist/poll/definePollOptionSource.d.ts +10 -1
- package/dist/poll/definePollOptionSource.js.map +1 -1
- package/dist/poll/definePollType.d.ts +34 -0
- package/dist/poll/definePollType.js +6 -0
- package/dist/poll/definePollType.js.map +1 -0
- package/dist/poll/effectivePollOptions.d.ts +38 -0
- package/dist/poll/effectivePollOptions.js +64 -0
- package/dist/poll/effectivePollOptions.js.map +1 -0
- package/dist/poll/mostVoted.d.ts +21 -0
- package/dist/poll/mostVoted.js +32 -0
- package/dist/poll/mostVoted.js.map +1 -0
- package/dist/poll/outcomeBeforeChange.js +91 -0
- package/dist/poll/outcomeBeforeChange.js.map +1 -0
- package/dist/poll/outcomeFields.d.ts +38 -0
- package/dist/poll/outcomeFields.js +52 -0
- package/dist/poll/outcomeFields.js.map +1 -0
- package/dist/poll/pollTypeRegistry.d.ts +34 -0
- package/dist/poll/pollTypeRegistry.js +71 -0
- package/dist/poll/pollTypeRegistry.js.map +1 -0
- package/dist/poll/resolvePollCloseRequest.js +105 -0
- package/dist/poll/resolvePollCloseRequest.js.map +1 -0
- package/dist/poll/resolvePollOptions.d.ts +2 -1
- package/dist/poll/resolvePollOptions.js +5 -17
- package/dist/poll/resolvePollOptions.js.map +1 -1
- package/dist/poll/resolvePollOptionsRequest.js +51 -0
- package/dist/poll/resolvePollOptionsRequest.js.map +1 -0
- package/dist/poll/resolvePollOutcome.d.ts +22 -9
- package/dist/poll/resolvePollOutcome.js +54 -14
- package/dist/poll/resolvePollOutcome.js.map +1 -1
- package/dist/poll/resultsField.js +21 -0
- package/dist/poll/resultsField.js.map +1 -0
- package/dist/prefill/valuesFromSearchParams.js +2 -1
- package/dist/prefill/valuesFromSearchParams.js.map +1 -1
- package/dist/react/Form.d.ts +8 -8
- package/dist/react/Form.js +74 -62
- package/dist/react/Form.js.map +1 -1
- package/dist/react/FormContext.d.ts +6 -4
- package/dist/react/FormContext.js.map +1 -1
- package/dist/react/FormControls.d.ts +3 -3
- package/dist/react/FormControls.js +3 -3
- package/dist/react/FormControls.js.map +1 -1
- package/dist/react/FormResults.d.ts +5 -5
- package/dist/react/FormResults.js +6 -6
- package/dist/react/FormResults.js.map +1 -1
- package/dist/react/Poll.d.ts +2 -2
- package/dist/react/Poll.js +5 -5
- package/dist/react/Poll.js.map +1 -1
- package/dist/react/contract.d.ts +2 -3
- package/dist/react/contract.js.map +1 -1
- package/dist/react/primitives/Checkbox.d.ts +4 -2
- package/dist/react/primitives/Checkbox.js +2 -1
- package/dist/react/primitives/Checkbox.js.map +1 -1
- package/dist/react/primitives/FieldShell.d.ts +2 -4
- package/dist/react/primitives/FieldShell.js +12 -19
- package/dist/react/primitives/FieldShell.js.map +1 -1
- package/dist/react/renderers/calculation.js +1 -2
- package/dist/react/renderers/calculation.js.map +1 -1
- package/dist/react/renderers/checkbox.js +1 -2
- package/dist/react/renderers/checkbox.js.map +1 -1
- package/dist/react/renderers/consent.js +78 -34
- package/dist/react/renderers/consent.js.map +1 -1
- package/dist/react/renderers/date.js +1 -3
- package/dist/react/renderers/date.js.map +1 -1
- package/dist/react/renderers/email.js +1 -2
- package/dist/react/renderers/email.js.map +1 -1
- package/dist/react/renderers/file.js +1 -2
- package/dist/react/renderers/file.js.map +1 -1
- package/dist/react/renderers/index.js +3 -0
- package/dist/react/renderers/index.js.map +1 -1
- package/dist/react/renderers/number.js +1 -2
- package/dist/react/renderers/number.js.map +1 -1
- package/dist/react/renderers/region.js +45 -0
- package/dist/react/renderers/region.js.map +1 -0
- package/dist/react/renderers/repeater.js +7 -10
- package/dist/react/renderers/repeater.js.map +1 -1
- package/dist/react/renderers/select.js +1 -2
- package/dist/react/renderers/select.js.map +1 -1
- package/dist/react/renderers/text.js +1 -2
- package/dist/react/renderers/text.js.map +1 -1
- package/dist/react/renderers/textarea.js +1 -2
- package/dist/react/renderers/textarea.js.map +1 -1
- package/dist/react/state.d.ts +0 -3
- package/dist/react/state.js +7 -11
- package/dist/react/state.js.map +1 -1
- package/dist/react/useField.d.ts +0 -1
- package/dist/react/useField.js +0 -1
- package/dist/react/useField.js.map +1 -1
- package/dist/react/useFormState.d.ts +1 -1
- package/dist/react/useFormState.js +1 -1
- package/dist/react/useFormState.js.map +1 -1
- package/dist/react/validateField.js +3 -6
- package/dist/react/validateField.js.map +1 -1
- package/dist/recall/interpolate.d.ts +4 -3
- package/dist/recall/interpolate.js +5 -4
- package/dist/recall/interpolate.js.map +1 -1
- package/dist/recall/resolver.d.ts +1 -1
- package/dist/recall/resolver.js +14 -2
- package/dist/recall/resolver.js.map +1 -1
- package/dist/spam/captcha.d.ts +1 -1
- package/dist/spam/captcha.js +1 -1
- package/dist/spam/captcha.js.map +1 -1
- package/dist/submissions/SubmissionAnswers.js +6 -2
- package/dist/submissions/SubmissionAnswers.js.map +1 -1
- package/dist/submissions/SubmissionAnswersClient.js +91 -62
- package/dist/submissions/SubmissionAnswersClient.js.map +1 -1
- package/dist/submissions/createSubmission.d.ts +36 -0
- package/dist/submissions/createSubmission.js +26 -0
- package/dist/submissions/createSubmission.js.map +1 -0
- package/dist/submissions/runSubmission.d.ts +10 -0
- package/dist/submissions/runSubmission.js +29 -18
- package/dist/submissions/runSubmission.js.map +1 -1
- package/dist/submissions/types.d.ts +11 -4
- package/dist/submissions/validateSubmission.js +38 -23
- package/dist/submissions/validateSubmission.js.map +1 -1
- package/dist/submissions/votedCookie.js +3 -3
- package/dist/submissions/votedCookie.js.map +1 -1
- package/dist/translations/de.js +102 -26
- package/dist/translations/de.js.map +1 -1
- package/dist/translations/en.js +103 -27
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/keys.d.ts +97 -21
- package/dist/translations/keys.js +98 -22
- package/dist/translations/keys.js.map +1 -1
- package/dist/validation/buildRuleBlocks.js +18 -17
- package/dist/validation/buildRuleBlocks.js.map +1 -1
- package/dist/validation/builtin/email.js +1 -0
- package/dist/validation/builtin/email.js.map +1 -1
- package/dist/validation/builtin/matchesField.js +3 -7
- package/dist/validation/builtin/matchesField.js.map +1 -1
- package/dist/validation/builtin/max.js +1 -0
- package/dist/validation/builtin/max.js.map +1 -1
- package/dist/validation/builtin/maxDate.js +1 -0
- package/dist/validation/builtin/maxDate.js.map +1 -1
- package/dist/validation/builtin/maxLength.js +1 -0
- package/dist/validation/builtin/maxLength.js.map +1 -1
- package/dist/validation/builtin/min.js +1 -0
- package/dist/validation/builtin/min.js.map +1 -1
- package/dist/validation/builtin/minDate.js +1 -0
- package/dist/validation/builtin/minDate.js.map +1 -1
- package/dist/validation/builtin/minLength.js +1 -0
- package/dist/validation/builtin/minLength.js.map +1 -1
- package/dist/validation/builtin/notAlreadySubmitted.js +1 -0
- package/dist/validation/builtin/notAlreadySubmitted.js.map +1 -1
- package/dist/validation/builtin/oneOf.js +1 -0
- package/dist/validation/builtin/oneOf.js.map +1 -1
- package/dist/validation/builtin/pattern.js +11 -2
- package/dist/validation/builtin/pattern.js.map +1 -1
- package/dist/validation/builtin/url.js +1 -0
- package/dist/validation/builtin/url.js.map +1 -1
- package/dist/validation/builtin/validateRegexParams.js +44 -0
- package/dist/validation/builtin/validateRegexParams.js.map +1 -0
- package/dist/validation/fieldTargetParam.d.ts +22 -0
- package/dist/validation/fieldTargetParam.js +38 -0
- package/dist/validation/fieldTargetParam.js.map +1 -0
- package/dist/validation/runValidation.js +8 -29
- package/dist/validation/runValidation.js.map +1 -1
- package/dist/validation/types.d.ts +5 -11
- package/package.json +6 -6
- package/dist/consent/buildConsentSourceConfig.js +0 -49
- package/dist/consent/buildConsentSourceConfig.js.map +0 -1
- package/dist/consent/builtin/index.d.ts +0 -17
- package/dist/consent/builtin/index.js +0 -21
- package/dist/consent/builtin/index.js.map +0 -1
- package/dist/consent/builtin/pageReference.js +0 -75
- package/dist/consent/builtin/pageReference.js.map +0 -1
- package/dist/consent/builtin/static.js +0 -48
- package/dist/consent/builtin/static.js.map +0 -1
- package/dist/consent/defineConsentSource.d.ts +0 -35
- package/dist/consent/defineConsentSource.js +0 -6
- package/dist/consent/defineConsentSource.js.map +0 -1
- package/dist/consent/registry.d.ts +0 -16
- package/dist/consent/registry.js +0 -16
- package/dist/consent/registry.js.map +0 -1
- package/dist/consent/resolveConsentLinks.d.ts +0 -19
- package/dist/consent/resolveConsentLinks.js +0 -26
- package/dist/consent/resolveConsentLinks.js.map +0 -1
|
@@ -11,6 +11,8 @@ const keys = {
|
|
|
11
11
|
fieldTypeEmail: "formBuilder:fieldType.email",
|
|
12
12
|
fieldTypeNumber: "formBuilder:fieldType.number",
|
|
13
13
|
fieldTypeSelect: "formBuilder:fieldType.select",
|
|
14
|
+
fieldTypeCountry: "formBuilder:fieldType.country",
|
|
15
|
+
fieldTypeState: "formBuilder:fieldType.state",
|
|
14
16
|
fieldTypeCheckbox: "formBuilder:fieldType.checkbox",
|
|
15
17
|
fieldTypeDate: "formBuilder:fieldType.date",
|
|
16
18
|
configOptions: "formBuilder:config.options",
|
|
@@ -22,7 +24,12 @@ const keys = {
|
|
|
22
24
|
validationNumber: "formBuilder:validation.number",
|
|
23
25
|
validationDate: "formBuilder:validation.date",
|
|
24
26
|
validationSelect: "formBuilder:validation.select",
|
|
27
|
+
validationCountry: "formBuilder:validation.country",
|
|
28
|
+
validationState: "formBuilder:validation.state",
|
|
29
|
+
validationRegexPattern: "formBuilder:validation.regexPattern",
|
|
30
|
+
validationRegexFlags: "formBuilder:validation.regexFlags",
|
|
25
31
|
validationEmailFieldUnknown: "formBuilder:validation.emailFieldUnknown",
|
|
32
|
+
validationResultsFieldUnknown: "formBuilder:validation.resultsFieldUnknown",
|
|
26
33
|
formatYes: "formBuilder:format.yes",
|
|
27
34
|
formatNo: "formBuilder:format.no",
|
|
28
35
|
configName: "formBuilder:config.name",
|
|
@@ -59,6 +66,19 @@ const keys = {
|
|
|
59
66
|
ruleOneOfMessage: "formBuilder:rule.oneOf.message",
|
|
60
67
|
ruleMatchesFieldMessage: "formBuilder:rule.matchesField.message",
|
|
61
68
|
ruleNotAlreadySubmittedMessage: "formBuilder:rule.notAlreadySubmitted.message",
|
|
69
|
+
ruleMinLengthDescription: "formBuilder:rule.minLength.description",
|
|
70
|
+
ruleMaxLengthDescription: "formBuilder:rule.maxLength.description",
|
|
71
|
+
ruleMinDescription: "formBuilder:rule.min.description",
|
|
72
|
+
ruleMaxDescription: "formBuilder:rule.max.description",
|
|
73
|
+
ruleMinDateDescription: "formBuilder:rule.minDate.description",
|
|
74
|
+
ruleMaxDateDescription: "formBuilder:rule.maxDate.description",
|
|
75
|
+
rulePatternDescription: "formBuilder:rule.pattern.description",
|
|
76
|
+
ruleEmailDescription: "formBuilder:rule.email.description",
|
|
77
|
+
ruleUrlDescription: "formBuilder:rule.url.description",
|
|
78
|
+
ruleOneOfDescription: "formBuilder:rule.oneOf.description",
|
|
79
|
+
ruleMatchesFieldDescription: "formBuilder:rule.matchesField.description",
|
|
80
|
+
ruleNotAlreadySubmittedDescription: "formBuilder:rule.notAlreadySubmitted.description",
|
|
81
|
+
ruleFieldTargetInvalid: "formBuilder:rule.fieldTargetInvalid",
|
|
62
82
|
ruleParamMin: "formBuilder:rule.param.min",
|
|
63
83
|
ruleParamMax: "formBuilder:rule.param.max",
|
|
64
84
|
ruleParamMinDate: "formBuilder:rule.param.minDate",
|
|
@@ -69,9 +89,6 @@ const keys = {
|
|
|
69
89
|
ruleParamField: "formBuilder:rule.param.field",
|
|
70
90
|
validationsLabel: "formBuilder:validations.label",
|
|
71
91
|
validationMessageLabel: "formBuilder:validations.message",
|
|
72
|
-
validationSeverityLabel: "formBuilder:validations.severity",
|
|
73
|
-
validationSeverityError: "formBuilder:validations.severity.error",
|
|
74
|
-
validationSeverityWarning: "formBuilder:validations.severity.warning",
|
|
75
92
|
conditionAddCondition: "formBuilder:condition.addCondition",
|
|
76
93
|
conditionAddOr: "formBuilder:condition.addOr",
|
|
77
94
|
conditionAnd: "formBuilder:condition.and",
|
|
@@ -107,33 +124,41 @@ const keys = {
|
|
|
107
124
|
actionConfigBodyDescription: "formBuilder:action.config.bodyDescription",
|
|
108
125
|
actionConfigToField: "formBuilder:action.config.toField",
|
|
109
126
|
actionConfigToFieldDescription: "formBuilder:action.config.toFieldDescription",
|
|
127
|
+
actionConfigFrom: "formBuilder:action.config.from",
|
|
128
|
+
actionConfigFromDescription: "formBuilder:action.config.fromDescription",
|
|
129
|
+
actionConfigCc: "formBuilder:action.config.cc",
|
|
130
|
+
actionConfigBcc: "formBuilder:action.config.bcc",
|
|
131
|
+
actionConfigReplyTo: "formBuilder:action.config.replyTo",
|
|
132
|
+
validationFromUnknown: "formBuilder:validation.fromUnknown",
|
|
133
|
+
validationFromUnavailable: "formBuilder:validation.fromUnavailable",
|
|
134
|
+
validationToUnknown: "formBuilder:validation.toUnknown",
|
|
135
|
+
validationToUnavailable: "formBuilder:validation.toUnavailable",
|
|
110
136
|
actionConfigUrl: "formBuilder:action.config.url",
|
|
111
137
|
actionConfigUrlDescription: "formBuilder:action.config.urlDescription",
|
|
112
138
|
actionConfigSecret: "formBuilder:action.config.secret",
|
|
113
139
|
actionConfigSecretDescription: "formBuilder:action.config.secretDescription",
|
|
114
140
|
validationUrlInvalid: "formBuilder:validation.urlInvalid",
|
|
115
141
|
configActions: "formBuilder:config.actions",
|
|
116
|
-
consentSourceStatic: "formBuilder:consentSource.static",
|
|
117
|
-
consentSourcePageReference: "formBuilder:consentSource.pageReference",
|
|
118
|
-
consentConfigLabel: "formBuilder:consent.config.label",
|
|
119
|
-
consentConfigUrl: "formBuilder:consent.config.url",
|
|
120
|
-
consentConfigVersion: "formBuilder:consent.config.version",
|
|
121
|
-
consentConfigRelationTo: "formBuilder:consent.config.relationTo",
|
|
122
|
-
consentConfigDocId: "formBuilder:consent.config.docId",
|
|
123
|
-
consentConfigUrlField: "formBuilder:consent.config.urlField",
|
|
124
|
-
consentConfigCaptureVersion: "formBuilder:consent.config.captureVersion",
|
|
125
142
|
fieldTypeConsent: "formBuilder:fieldType.consent",
|
|
126
|
-
consentConfigStatement: "formBuilder:consent.config.statement",
|
|
127
143
|
consentConfigSource: "formBuilder:consent.config.source",
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
consentConfigSourceDescription: "formBuilder:consent.config.sourceDescription",
|
|
145
|
+
consentSourcesField: "formBuilder:consentSources.field",
|
|
146
|
+
consentSourcesFieldDescription: "formBuilder:consentSources.fieldDescription",
|
|
147
|
+
consentSourceSingular: "formBuilder:consentSources.singular",
|
|
148
|
+
consentSourcePlural: "formBuilder:consentSources.plural",
|
|
149
|
+
consentSourceLabel: "formBuilder:consentSources.label",
|
|
150
|
+
consentSourceStatement: "formBuilder:consentSources.statement",
|
|
151
|
+
consentSourcePage: "formBuilder:consentSources.page",
|
|
152
|
+
consentSourcePageDescription: "formBuilder:consentSources.pageDescription",
|
|
153
|
+
consentSourcesUnavailable: "formBuilder:consent.sourcesUnavailable",
|
|
130
154
|
resultsResponses: "formBuilder:results.responses",
|
|
131
155
|
resultsNoResponses: "formBuilder:results.noResponses",
|
|
132
156
|
resultsTruncated: "formBuilder:results.truncated",
|
|
133
157
|
pollGroup: "formBuilder:poll.group",
|
|
134
|
-
pollEnabled: "formBuilder:poll.enabled",
|
|
135
158
|
pollResultsField: "formBuilder:poll.resultsField",
|
|
136
159
|
pollResultsFieldDescription: "formBuilder:poll.resultsFieldDescription",
|
|
160
|
+
pollVoteFieldChoose: "formBuilder:poll.voteFieldChoose",
|
|
161
|
+
pollVoteFieldMissing: "formBuilder:poll.voteFieldMissing",
|
|
137
162
|
pollResultsVisibility: "formBuilder:poll.resultsVisibility",
|
|
138
163
|
pollVisibilityAfterVote: "formBuilder:poll.visibility.afterVote",
|
|
139
164
|
pollVisibilityAfterClose: "formBuilder:poll.visibility.afterClose",
|
|
@@ -144,8 +169,26 @@ const keys = {
|
|
|
144
169
|
pollOptionSourceDescription: "formBuilder:poll.optionSourceDescription",
|
|
145
170
|
pollSourceConfig: "formBuilder:poll.sourceConfig",
|
|
146
171
|
pollOutcome: "formBuilder:poll.outcome",
|
|
172
|
+
pollType: "formBuilder:poll.type",
|
|
173
|
+
pollTypeDescription: "formBuilder:poll.typeDescription",
|
|
174
|
+
pollTypeManual: "formBuilder:poll.type.manual",
|
|
175
|
+
pollTypeMostVoted: "formBuilder:poll.type.mostVoted",
|
|
176
|
+
pollTypeSource: "formBuilder:poll.type.source",
|
|
177
|
+
pollCloseButton: "formBuilder:poll.close.button",
|
|
178
|
+
pollReopenButton: "formBuilder:poll.reopen.button",
|
|
179
|
+
pollCloseHintManual: "formBuilder:poll.close.hintManual",
|
|
180
|
+
pollCloseHintMostVoted: "formBuilder:poll.close.hintMostVoted",
|
|
181
|
+
pollCloseHintSource: "formBuilder:poll.close.hintSource",
|
|
182
|
+
pollReopenHint: "formBuilder:poll.reopen.hint",
|
|
183
|
+
pollCloseNeedsWinner: "formBuilder:poll.close.needsWinner",
|
|
184
|
+
pollCloseManualNoWinner: "formBuilder:poll.close.manualNoWinner",
|
|
147
185
|
pollWinningValue: "formBuilder:poll.winningValue",
|
|
186
|
+
pollWinningValueDescription: "formBuilder:poll.winningValueDescription",
|
|
148
187
|
pollResolvedAt: "formBuilder:poll.resolvedAt",
|
|
188
|
+
validationWinningValueUnknown: "formBuilder:validation.winningValueUnknown",
|
|
189
|
+
validationWinningValueDisabled: "formBuilder:validation.winningValueDisabled",
|
|
190
|
+
endpointOptionsLoading: "formBuilder:endpointOptions.loading",
|
|
191
|
+
endpointOptionsError: "formBuilder:endpointOptions.error",
|
|
149
192
|
pollOptionsUnavailable: "formBuilder:poll.optionsUnavailable",
|
|
150
193
|
pollFinalResult: "formBuilder:poll.finalResult",
|
|
151
194
|
resultsWinner: "formBuilder:results.winner",
|
|
@@ -184,6 +227,7 @@ const keys = {
|
|
|
184
227
|
submissionDetails: "formBuilder:submission.details",
|
|
185
228
|
submissionConsentAgreed: "formBuilder:submission.consentAgreed",
|
|
186
229
|
submissionConsentDeclined: "formBuilder:submission.consentDeclined",
|
|
230
|
+
submissionMetaLocale: "formBuilder:submission.meta.locale",
|
|
187
231
|
submissionMetaReceivedAt: "formBuilder:submission.meta.receivedAt",
|
|
188
232
|
submissionMetaIp: "formBuilder:submission.meta.ip",
|
|
189
233
|
submissionMetaUserAgent: "formBuilder:submission.meta.userAgent",
|
|
@@ -193,7 +237,25 @@ const keys = {
|
|
|
193
237
|
flowFieldInStep: "formBuilder:flow.fieldInStep",
|
|
194
238
|
flowUnassigned: "formBuilder:flow.unassigned",
|
|
195
239
|
flowAssignToStep: "formBuilder:flow.assignToStep",
|
|
240
|
+
flowNextSequential: "formBuilder:flow.nextSequential",
|
|
196
241
|
flowNextTerminal: "formBuilder:flow.nextTerminal",
|
|
242
|
+
flowFields: "formBuilder:flow.fields",
|
|
243
|
+
flowDefaultNext: "formBuilder:flow.defaultNext",
|
|
244
|
+
flowConditionalTransitions: "formBuilder:flow.conditionalTransitions",
|
|
245
|
+
flowStepTitleLabel: "formBuilder:flow.stepTitleLabel",
|
|
246
|
+
flowSelectStepPlaceholder: "formBuilder:flow.selectStepPlaceholder",
|
|
247
|
+
flowMoveTransitionUp: "formBuilder:flow.moveTransitionUp",
|
|
248
|
+
flowMoveTransitionDown: "formBuilder:flow.moveTransitionDown",
|
|
249
|
+
flowRemoveTransition: "formBuilder:flow.removeTransition",
|
|
250
|
+
flowAddAbove: "formBuilder:flow.addAbove",
|
|
251
|
+
flowAddBelow: "formBuilder:flow.addBelow",
|
|
252
|
+
flowGoTo: "formBuilder:flow.goTo",
|
|
253
|
+
flowWhen: "formBuilder:flow.when",
|
|
254
|
+
flowNoFields: "formBuilder:flow.noFields",
|
|
255
|
+
flowFirstMatchWins: "formBuilder:flow.firstMatchWins",
|
|
256
|
+
flowAddTransition: "formBuilder:flow.addTransition",
|
|
257
|
+
flowNoSteps: "formBuilder:flow.noSteps",
|
|
258
|
+
flowFallbackTitle: "formBuilder:flow.fallbackTitle",
|
|
197
259
|
fieldTypeMessage: "formBuilder:fieldType.message",
|
|
198
260
|
configContent: "formBuilder:config.content",
|
|
199
261
|
tabResponse: "formBuilder:tab.response",
|
|
@@ -203,14 +265,28 @@ const keys = {
|
|
|
203
265
|
responseMessage: "formBuilder:response.message",
|
|
204
266
|
responseRedirect: "formBuilder:response.redirect",
|
|
205
267
|
responseUrl: "formBuilder:response.url",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
268
|
+
responseRedirectReference: "formBuilder:response.redirect.reference",
|
|
269
|
+
responseRedirectReferenceDescription: "formBuilder:response.redirect.referenceDescription",
|
|
270
|
+
buttonsSubmitLabel: "formBuilder:buttons.submitLabel",
|
|
271
|
+
buttonsNextLabel: "formBuilder:buttons.nextLabel",
|
|
272
|
+
buttonsPrevLabel: "formBuilder:buttons.prevLabel",
|
|
211
273
|
formBack: "formBuilder:form.back",
|
|
212
274
|
formNext: "formBuilder:form.next",
|
|
213
|
-
formSubmit: "formBuilder:form.submit"
|
|
275
|
+
formSubmit: "formBuilder:form.submit",
|
|
276
|
+
formMultistep: "formBuilder:form.multistep",
|
|
277
|
+
formPollEnabled: "formBuilder:form.pollEnabled",
|
|
278
|
+
cellStepCountOne: "formBuilder:cell.stepCount.one",
|
|
279
|
+
cellStepCountOther: "formBuilder:cell.stepCount.other",
|
|
280
|
+
cellFieldCountOne: "formBuilder:cell.fieldCount.one",
|
|
281
|
+
cellFieldCountOther: "formBuilder:cell.fieldCount.other",
|
|
282
|
+
departmentsField: "formBuilder:departments.field",
|
|
283
|
+
departmentsFieldDescription: "formBuilder:departments.fieldDescription",
|
|
284
|
+
departmentSingular: "formBuilder:departments.singular",
|
|
285
|
+
departmentPlural: "formBuilder:departments.plural",
|
|
286
|
+
departmentLabel: "formBuilder:departments.label",
|
|
287
|
+
departmentEmail: "formBuilder:departments.email",
|
|
288
|
+
departmentAddRow: "formBuilder:departments.addRow",
|
|
289
|
+
departmentRemoveRow: "formBuilder:departments.removeRow"
|
|
214
290
|
};
|
|
215
291
|
//#endregion
|
|
216
292
|
export { keys };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","names":[],"sources":["../../src/translations/keys.ts"],"sourcesContent":["/**\n * Typed translation keys. Lookups must go through these constants, not string\n * literals (enforced by requireI18nKeysTyped.grit). Every key here must have a\n * value in every locale (`en.ts`), or it is a type error.\n */\nexport const keys = {\n\tfieldTitle: 'formBuilder:fieldTitle',\n\tfieldTypeText: 'formBuilder:fieldType.text',\n\tfieldTypeTextarea: 'formBuilder:fieldType.textarea',\n\tfieldTypeEmail: 'formBuilder:fieldType.email',\n\tfieldTypeNumber: 'formBuilder:fieldType.number',\n\tfieldTypeSelect: 'formBuilder:fieldType.select',\n\tfieldTypeCheckbox: 'formBuilder:fieldType.checkbox',\n\tfieldTypeDate: 'formBuilder:fieldType.date',\n\tconfigOptions: 'formBuilder:config.options',\n\tconfigOption: 'formBuilder:config.option',\n\tconfigOptionLabel: 'formBuilder:config.optionLabel',\n\tconfigOptionValue: 'formBuilder:config.optionValue',\n\tvalidationRequired: 'formBuilder:validation.required',\n\tvalidationEmail: 'formBuilder:validation.email',\n\tvalidationNumber: 'formBuilder:validation.number',\n\tvalidationDate: 'formBuilder:validation.date',\n\tvalidationSelect: 'formBuilder:validation.select',\n\tvalidationEmailFieldUnknown: 'formBuilder:validation.emailFieldUnknown',\n\tformatYes: 'formBuilder:format.yes',\n\tformatNo: 'formBuilder:format.no',\n\tconfigName: 'formBuilder:config.name',\n\tconfigLabel: 'formBuilder:config.label',\n\tconfigRequired: 'formBuilder:config.required',\n\tconfigWidth: 'formBuilder:config.width',\n\tconfigPlaceholder: 'formBuilder:config.placeholder',\n\tconfigDescription: 'formBuilder:config.description',\n\tconfigVisibleWhen: 'formBuilder:config.visibleWhen',\n\tconfigValidateWhen: 'formBuilder:config.validateWhen',\n\tsubmissionAnswers: 'formBuilder:submission.answers',\n\tsubmissionNoAnswers: 'formBuilder:submission.noAnswers',\n\truleMinLength: 'formBuilder:rule.minLength.label',\n\truleMaxLength: 'formBuilder:rule.maxLength.label',\n\truleMin: 'formBuilder:rule.min.label',\n\truleMax: 'formBuilder:rule.max.label',\n\truleMinDate: 'formBuilder:rule.minDate.label',\n\truleMaxDate: 'formBuilder:rule.maxDate.label',\n\trulePattern: 'formBuilder:rule.pattern.label',\n\truleEmail: 'formBuilder:rule.email.label',\n\truleUrl: 'formBuilder:rule.url.label',\n\truleOneOf: 'formBuilder:rule.oneOf.label',\n\truleMatchesField: 'formBuilder:rule.matchesField.label',\n\truleNotAlreadySubmitted: 'formBuilder:rule.notAlreadySubmitted.label',\n\truleMinLengthMessage: 'formBuilder:rule.minLength.message',\n\truleMaxLengthMessage: 'formBuilder:rule.maxLength.message',\n\truleMinMessage: 'formBuilder:rule.min.message',\n\truleMaxMessage: 'formBuilder:rule.max.message',\n\truleMinDateMessage: 'formBuilder:rule.minDate.message',\n\truleMaxDateMessage: 'formBuilder:rule.maxDate.message',\n\trulePatternMessage: 'formBuilder:rule.pattern.message',\n\truleEmailMessage: 'formBuilder:rule.email.message',\n\truleUrlMessage: 'formBuilder:rule.url.message',\n\truleOneOfMessage: 'formBuilder:rule.oneOf.message',\n\truleMatchesFieldMessage: 'formBuilder:rule.matchesField.message',\n\truleNotAlreadySubmittedMessage: 'formBuilder:rule.notAlreadySubmitted.message',\n\truleParamMin: 'formBuilder:rule.param.min',\n\truleParamMax: 'formBuilder:rule.param.max',\n\truleParamMinDate: 'formBuilder:rule.param.minDate',\n\truleParamMaxDate: 'formBuilder:rule.param.maxDate',\n\truleParamPattern: 'formBuilder:rule.param.pattern',\n\truleParamFlags: 'formBuilder:rule.param.flags',\n\truleParamValues: 'formBuilder:rule.param.values',\n\truleParamField: 'formBuilder:rule.param.field',\n\tvalidationsLabel: 'formBuilder:validations.label',\n\tvalidationMessageLabel: 'formBuilder:validations.message',\n\tvalidationSeverityLabel: 'formBuilder:validations.severity',\n\tvalidationSeverityError: 'formBuilder:validations.severity.error',\n\tvalidationSeverityWarning: 'formBuilder:validations.severity.warning',\n\tconditionAddCondition: 'formBuilder:condition.addCondition',\n\tconditionAddOr: 'formBuilder:condition.addOr',\n\tconditionAnd: 'formBuilder:condition.and',\n\tconditionOr: 'formBuilder:condition.or',\n\tconditionRemove: 'formBuilder:condition.remove',\n\tconditionNoFields: 'formBuilder:condition.noFields',\n\tconditionEmpty: 'formBuilder:condition.empty',\n\tconditionSelectField: 'formBuilder:condition.selectField',\n\tconditionTrue: 'formBuilder:condition.true',\n\tconditionFalse: 'formBuilder:condition.false',\n\tconfigHidden: 'formBuilder:config.hidden',\n\ttabFields: 'formBuilder:tab.fields',\n\ttabFlow: 'formBuilder:tab.flow',\n\ttabActions: 'formBuilder:tab.actions',\n\ttabField: 'formBuilder:tab.field',\n\ttabValidation: 'formBuilder:tab.validation',\n\ttabAdvanced: 'formBuilder:tab.advanced',\n\tfieldTypeCalculation: 'formBuilder:fieldType.calculation',\n\tconfigExpression: 'formBuilder:config.expression',\n\tconfigExpressionDescription: 'formBuilder:config.expressionDescription',\n\tconfigCalcDisplay: 'formBuilder:config.calcDisplay',\n\tvalidationCalcExpressionInvalid: 'formBuilder:validation.calcExpressionInvalid',\n\tpresentationPage: 'formBuilder:presentation.page',\n\tpresentationModal: 'formBuilder:presentation.modal',\n\tpresentationDrawer: 'formBuilder:presentation.drawer',\n\tpresentationInline: 'formBuilder:presentation.inline',\n\tactionEmailTeam: 'formBuilder:action.emailTeam',\n\tactionConfirmation: 'formBuilder:action.confirmation',\n\tactionSignedWebhook: 'formBuilder:action.signedWebhook',\n\tactionConfigTo: 'formBuilder:action.config.to',\n\tactionConfigSubject: 'formBuilder:action.config.subject',\n\tactionConfigBody: 'formBuilder:action.config.body',\n\tactionConfigBodyDescription: 'formBuilder:action.config.bodyDescription',\n\tactionConfigToField: 'formBuilder:action.config.toField',\n\tactionConfigToFieldDescription: 'formBuilder:action.config.toFieldDescription',\n\tactionConfigUrl: 'formBuilder:action.config.url',\n\tactionConfigUrlDescription: 'formBuilder:action.config.urlDescription',\n\tactionConfigSecret: 'formBuilder:action.config.secret',\n\tactionConfigSecretDescription: 'formBuilder:action.config.secretDescription',\n\tvalidationUrlInvalid: 'formBuilder:validation.urlInvalid',\n\tconfigActions: 'formBuilder:config.actions',\n\tconsentSourceStatic: 'formBuilder:consentSource.static',\n\tconsentSourcePageReference: 'formBuilder:consentSource.pageReference',\n\tconsentConfigLabel: 'formBuilder:consent.config.label',\n\tconsentConfigUrl: 'formBuilder:consent.config.url',\n\tconsentConfigVersion: 'formBuilder:consent.config.version',\n\tconsentConfigRelationTo: 'formBuilder:consent.config.relationTo',\n\tconsentConfigDocId: 'formBuilder:consent.config.docId',\n\tconsentConfigUrlField: 'formBuilder:consent.config.urlField',\n\tconsentConfigCaptureVersion: 'formBuilder:consent.config.captureVersion',\n\tfieldTypeConsent: 'formBuilder:fieldType.consent',\n\tconsentConfigStatement: 'formBuilder:consent.config.statement',\n\tconsentConfigSource: 'formBuilder:consent.config.source',\n\tconsentConfigSourceConfig: 'formBuilder:consent.config.sourceConfig',\n\tconsentConfigOptional: 'formBuilder:consent.config.optional',\n\tresultsResponses: 'formBuilder:results.responses',\n\tresultsNoResponses: 'formBuilder:results.noResponses',\n\tresultsTruncated: 'formBuilder:results.truncated',\n\tpollGroup: 'formBuilder:poll.group',\n\tpollEnabled: 'formBuilder:poll.enabled',\n\tpollResultsField: 'formBuilder:poll.resultsField',\n\tpollResultsFieldDescription: 'formBuilder:poll.resultsFieldDescription',\n\tpollResultsVisibility: 'formBuilder:poll.resultsVisibility',\n\tpollVisibilityAfterVote: 'formBuilder:poll.visibility.afterVote',\n\tpollVisibilityAfterClose: 'formBuilder:poll.visibility.afterClose',\n\tpollClosesAt: 'formBuilder:poll.closesAt',\n\tpollClosed: 'formBuilder:poll.closed',\n\tpollResultsAfterClose: 'formBuilder:poll.resultsAfterClose',\n\tpollOptionSource: 'formBuilder:poll.optionSource',\n\tpollOptionSourceDescription: 'formBuilder:poll.optionSourceDescription',\n\tpollSourceConfig: 'formBuilder:poll.sourceConfig',\n\tpollOutcome: 'formBuilder:poll.outcome',\n\tpollWinningValue: 'formBuilder:poll.winningValue',\n\tpollResolvedAt: 'formBuilder:poll.resolvedAt',\n\tpollOptionsUnavailable: 'formBuilder:poll.optionsUnavailable',\n\tpollFinalResult: 'formBuilder:poll.finalResult',\n\tresultsWinner: 'formBuilder:results.winner',\n\tvalidationFileMissing: 'formBuilder:validation.file.missing',\n\tvalidationFileMimeType: 'formBuilder:validation.file.mimeType',\n\tvalidationFileTooLarge: 'formBuilder:validation.file.tooLarge',\n\tfieldTypeFile: 'formBuilder:fieldType.file',\n\tfileConfigMimeTypes: 'formBuilder:file.config.mimeTypes',\n\tfileConfigMaxSize: 'formBuilder:file.config.maxSize',\n\tfileConfigMaxSizeDescription: 'formBuilder:file.config.maxSizeDescription',\n\tfileTooLarge: 'formBuilder:file.tooLarge',\n\tfileUploadMisconfigured: 'formBuilder:file.uploadMisconfigured',\n\tfileHintAccepted: 'formBuilder:file.hint.accepted',\n\tfileHintMaxSize: 'formBuilder:file.hint.maxSize',\n\tspamRateLimited: 'formBuilder:spam.rateLimited',\n\tspamRejected: 'formBuilder:spam.rejected',\n\tspamCaptchaFailed: 'formBuilder:spam.captchaFailed',\n\tcollectionFormSingular: 'formBuilder:collection.form.singular',\n\tcollectionFormPlural: 'formBuilder:collection.form.plural',\n\tcollectionSubmissionSingular: 'formBuilder:collection.submission.singular',\n\tcollectionSubmissionPlural: 'formBuilder:collection.submission.plural',\n\tstatusComplete: 'formBuilder:status.complete',\n\tstatusPartial: 'formBuilder:status.partial',\n\tfieldTypeRepeater: 'formBuilder:fieldType.repeater',\n\tconfigMinRows: 'formBuilder:config.minRows',\n\tconfigMaxRows: 'formBuilder:config.maxRows',\n\tconfigAddLabel: 'formBuilder:config.addLabel',\n\tconfigSubFields: 'formBuilder:config.subFields',\n\tvalidationRepeaterMin: 'formBuilder:validation.repeaterMin',\n\tvalidationRepeaterMax: 'formBuilder:validation.repeaterMax',\n\trepeaterAddRow: 'formBuilder:repeater.addRow',\n\trepeaterRemoveRow: 'formBuilder:repeater.removeRow',\n\trepeaterRow: 'formBuilder:repeater.row',\n\trepeaterRowCount: 'formBuilder:repeater.rowCount',\n\tsubmissionConsent: 'formBuilder:submission.consent',\n\tsubmissionDetails: 'formBuilder:submission.details',\n\tsubmissionConsentAgreed: 'formBuilder:submission.consentAgreed',\n\tsubmissionConsentDeclined: 'formBuilder:submission.consentDeclined',\n\tsubmissionMetaReceivedAt: 'formBuilder:submission.meta.receivedAt',\n\tsubmissionMetaIp: 'formBuilder:submission.meta.ip',\n\tsubmissionMetaUserAgent: 'formBuilder:submission.meta.userAgent',\n\tsubmissionMetaCaptcha: 'formBuilder:submission.meta.captcha',\n\tflowDescription: 'formBuilder:flow.description',\n\tflowStepFallbackTitle: 'formBuilder:flow.stepFallbackTitle',\n\tflowFieldInStep: 'formBuilder:flow.fieldInStep',\n\tflowUnassigned: 'formBuilder:flow.unassigned',\n\tflowAssignToStep: 'formBuilder:flow.assignToStep',\n\tflowNextTerminal: 'formBuilder:flow.nextTerminal',\n\tfieldTypeMessage: 'formBuilder:fieldType.message',\n\tconfigContent: 'formBuilder:config.content',\n\ttabResponse: 'formBuilder:tab.response',\n\tresponseType: 'formBuilder:response.type',\n\tresponseTypeMessage: 'formBuilder:response.type.message',\n\tresponseTypeRedirect: 'formBuilder:response.type.redirect',\n\tresponseMessage: 'formBuilder:response.message',\n\tresponseRedirect: 'formBuilder:response.redirect',\n\tresponseUrl: 'formBuilder:response.url',\n\tresponseSubmitLabel: 'formBuilder:response.submitLabel',\n\ttabDisplay: 'formBuilder:tab.display',\n\tdisplayShowTitle: 'formBuilder:display.showTitle',\n\tdisplayTitle: 'formBuilder:display.title',\n\tdisplayIntro: 'formBuilder:display.intro',\n\tformBack: 'formBuilder:form.back',\n\tformNext: 'formBuilder:form.next',\n\tformSubmit: 'formBuilder:form.submit',\n} as const\n\nexport type TranslationKey = (typeof keys)[keyof typeof keys]\n"],"mappings":";;;;;;AAKA,MAAa,OAAO;CACnB,YAAY;CACZ,eAAe;CACf,mBAAmB;CACnB,gBAAgB;CAChB,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,cAAc;CACd,mBAAmB;CACnB,mBAAmB;CACnB,oBAAoB;CACpB,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,6BAA6B;CAC7B,WAAW;CACX,UAAU;CACV,YAAY;CACZ,aAAa;CACb,gBAAgB;CAChB,aAAa;CACb,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,oBAAoB;CACpB,mBAAmB;CACnB,qBAAqB;CACrB,eAAe;CACf,eAAe;CACf,SAAS;CACT,SAAS;CACT,aAAa;CACb,aAAa;CACb,aAAa;CACb,WAAW;CACX,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,yBAAyB;CACzB,sBAAsB;CACtB,sBAAsB;CACtB,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,oBAAoB;CACpB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,yBAAyB;CACzB,gCAAgC;CAChC,cAAc;CACd,cAAc;CACd,kBAAkB;CAClB,kBAAkB;CAClB,kBAAkB;CAClB,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;CAChB,kBAAkB;CAClB,wBAAwB;CACxB,yBAAyB;CACzB,yBAAyB;CACzB,2BAA2B;CAC3B,uBAAuB;CACvB,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,mBAAmB;CACnB,gBAAgB;CAChB,sBAAsB;CACtB,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,WAAW;CACX,SAAS;CACT,YAAY;CACZ,UAAU;CACV,eAAe;CACf,aAAa;CACb,sBAAsB;CACtB,kBAAkB;CAClB,6BAA6B;CAC7B,mBAAmB;CACnB,iCAAiC;CACjC,kBAAkB;CAClB,mBAAmB;CACnB,oBAAoB;CACpB,oBAAoB;CACpB,iBAAiB;CACjB,oBAAoB;CACpB,qBAAqB;CACrB,gBAAgB;CAChB,qBAAqB;CACrB,kBAAkB;CAClB,6BAA6B;CAC7B,qBAAqB;CACrB,gCAAgC;CAChC,iBAAiB;CACjB,4BAA4B;CAC5B,oBAAoB;CACpB,+BAA+B;CAC/B,sBAAsB;CACtB,eAAe;CACf,qBAAqB;CACrB,4BAA4B;CAC5B,oBAAoB;CACpB,kBAAkB;CAClB,sBAAsB;CACtB,yBAAyB;CACzB,oBAAoB;CACpB,uBAAuB;CACvB,6BAA6B;CAC7B,kBAAkB;CAClB,wBAAwB;CACxB,qBAAqB;CACrB,2BAA2B;CAC3B,uBAAuB;CACvB,kBAAkB;CAClB,oBAAoB;CACpB,kBAAkB;CAClB,WAAW;CACX,aAAa;CACb,kBAAkB;CAClB,6BAA6B;CAC7B,uBAAuB;CACvB,yBAAyB;CACzB,0BAA0B;CAC1B,cAAc;CACd,YAAY;CACZ,uBAAuB;CACvB,kBAAkB;CAClB,6BAA6B;CAC7B,kBAAkB;CAClB,aAAa;CACb,kBAAkB;CAClB,gBAAgB;CAChB,wBAAwB;CACxB,iBAAiB;CACjB,eAAe;CACf,uBAAuB;CACvB,wBAAwB;CACxB,wBAAwB;CACxB,eAAe;CACf,qBAAqB;CACrB,mBAAmB;CACnB,8BAA8B;CAC9B,cAAc;CACd,yBAAyB;CACzB,kBAAkB;CAClB,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,mBAAmB;CACnB,wBAAwB;CACxB,sBAAsB;CACtB,8BAA8B;CAC9B,4BAA4B;CAC5B,gBAAgB;CAChB,eAAe;CACf,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,uBAAuB;CACvB,uBAAuB;CACvB,gBAAgB;CAChB,mBAAmB;CACnB,aAAa;CACb,kBAAkB;CAClB,mBAAmB;CACnB,mBAAmB;CACnB,yBAAyB;CACzB,2BAA2B;CAC3B,0BAA0B;CAC1B,kBAAkB;CAClB,yBAAyB;CACzB,uBAAuB;CACvB,iBAAiB;CACjB,uBAAuB;CACvB,iBAAiB;CACjB,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,kBAAkB;CAClB,eAAe;CACf,aAAa;CACb,cAAc;CACd,qBAAqB;CACrB,sBAAsB;CACtB,iBAAiB;CACjB,kBAAkB;CAClB,aAAa;CACb,qBAAqB;CACrB,YAAY;CACZ,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,UAAU;CACV,UAAU;CACV,YAAY;AACb"}
|
|
1
|
+
{"version":3,"file":"keys.js","names":[],"sources":["../../src/translations/keys.ts"],"sourcesContent":["/**\n * Typed translation keys. Lookups must go through these constants, not string\n * literals (enforced by requireI18nKeysTyped.grit). Every key here must have a\n * value in every locale (`en.ts`), or it is a type error.\n */\nexport const keys = {\n\tfieldTitle: 'formBuilder:fieldTitle',\n\tfieldTypeText: 'formBuilder:fieldType.text',\n\tfieldTypeTextarea: 'formBuilder:fieldType.textarea',\n\tfieldTypeEmail: 'formBuilder:fieldType.email',\n\tfieldTypeNumber: 'formBuilder:fieldType.number',\n\tfieldTypeSelect: 'formBuilder:fieldType.select',\n\tfieldTypeCountry: 'formBuilder:fieldType.country',\n\tfieldTypeState: 'formBuilder:fieldType.state',\n\tfieldTypeCheckbox: 'formBuilder:fieldType.checkbox',\n\tfieldTypeDate: 'formBuilder:fieldType.date',\n\tconfigOptions: 'formBuilder:config.options',\n\tconfigOption: 'formBuilder:config.option',\n\tconfigOptionLabel: 'formBuilder:config.optionLabel',\n\tconfigOptionValue: 'formBuilder:config.optionValue',\n\tvalidationRequired: 'formBuilder:validation.required',\n\tvalidationEmail: 'formBuilder:validation.email',\n\tvalidationNumber: 'formBuilder:validation.number',\n\tvalidationDate: 'formBuilder:validation.date',\n\tvalidationSelect: 'formBuilder:validation.select',\n\tvalidationCountry: 'formBuilder:validation.country',\n\tvalidationState: 'formBuilder:validation.state',\n\tvalidationRegexPattern: 'formBuilder:validation.regexPattern',\n\tvalidationRegexFlags: 'formBuilder:validation.regexFlags',\n\tvalidationEmailFieldUnknown: 'formBuilder:validation.emailFieldUnknown',\n\tvalidationResultsFieldUnknown: 'formBuilder:validation.resultsFieldUnknown',\n\tformatYes: 'formBuilder:format.yes',\n\tformatNo: 'formBuilder:format.no',\n\tconfigName: 'formBuilder:config.name',\n\tconfigLabel: 'formBuilder:config.label',\n\tconfigRequired: 'formBuilder:config.required',\n\tconfigWidth: 'formBuilder:config.width',\n\tconfigPlaceholder: 'formBuilder:config.placeholder',\n\tconfigDescription: 'formBuilder:config.description',\n\tconfigVisibleWhen: 'formBuilder:config.visibleWhen',\n\tconfigValidateWhen: 'formBuilder:config.validateWhen',\n\tsubmissionAnswers: 'formBuilder:submission.answers',\n\tsubmissionNoAnswers: 'formBuilder:submission.noAnswers',\n\truleMinLength: 'formBuilder:rule.minLength.label',\n\truleMaxLength: 'formBuilder:rule.maxLength.label',\n\truleMin: 'formBuilder:rule.min.label',\n\truleMax: 'formBuilder:rule.max.label',\n\truleMinDate: 'formBuilder:rule.minDate.label',\n\truleMaxDate: 'formBuilder:rule.maxDate.label',\n\trulePattern: 'formBuilder:rule.pattern.label',\n\truleEmail: 'formBuilder:rule.email.label',\n\truleUrl: 'formBuilder:rule.url.label',\n\truleOneOf: 'formBuilder:rule.oneOf.label',\n\truleMatchesField: 'formBuilder:rule.matchesField.label',\n\truleNotAlreadySubmitted: 'formBuilder:rule.notAlreadySubmitted.label',\n\truleMinLengthMessage: 'formBuilder:rule.minLength.message',\n\truleMaxLengthMessage: 'formBuilder:rule.maxLength.message',\n\truleMinMessage: 'formBuilder:rule.min.message',\n\truleMaxMessage: 'formBuilder:rule.max.message',\n\truleMinDateMessage: 'formBuilder:rule.minDate.message',\n\truleMaxDateMessage: 'formBuilder:rule.maxDate.message',\n\trulePatternMessage: 'formBuilder:rule.pattern.message',\n\truleEmailMessage: 'formBuilder:rule.email.message',\n\truleUrlMessage: 'formBuilder:rule.url.message',\n\truleOneOfMessage: 'formBuilder:rule.oneOf.message',\n\truleMatchesFieldMessage: 'formBuilder:rule.matchesField.message',\n\truleNotAlreadySubmittedMessage: 'formBuilder:rule.notAlreadySubmitted.message',\n\truleMinLengthDescription: 'formBuilder:rule.minLength.description',\n\truleMaxLengthDescription: 'formBuilder:rule.maxLength.description',\n\truleMinDescription: 'formBuilder:rule.min.description',\n\truleMaxDescription: 'formBuilder:rule.max.description',\n\truleMinDateDescription: 'formBuilder:rule.minDate.description',\n\truleMaxDateDescription: 'formBuilder:rule.maxDate.description',\n\trulePatternDescription: 'formBuilder:rule.pattern.description',\n\truleEmailDescription: 'formBuilder:rule.email.description',\n\truleUrlDescription: 'formBuilder:rule.url.description',\n\truleOneOfDescription: 'formBuilder:rule.oneOf.description',\n\truleMatchesFieldDescription: 'formBuilder:rule.matchesField.description',\n\truleNotAlreadySubmittedDescription: 'formBuilder:rule.notAlreadySubmitted.description',\n\truleFieldTargetInvalid: 'formBuilder:rule.fieldTargetInvalid',\n\truleParamMin: 'formBuilder:rule.param.min',\n\truleParamMax: 'formBuilder:rule.param.max',\n\truleParamMinDate: 'formBuilder:rule.param.minDate',\n\truleParamMaxDate: 'formBuilder:rule.param.maxDate',\n\truleParamPattern: 'formBuilder:rule.param.pattern',\n\truleParamFlags: 'formBuilder:rule.param.flags',\n\truleParamValues: 'formBuilder:rule.param.values',\n\truleParamField: 'formBuilder:rule.param.field',\n\tvalidationsLabel: 'formBuilder:validations.label',\n\tvalidationMessageLabel: 'formBuilder:validations.message',\n\tconditionAddCondition: 'formBuilder:condition.addCondition',\n\tconditionAddOr: 'formBuilder:condition.addOr',\n\tconditionAnd: 'formBuilder:condition.and',\n\tconditionOr: 'formBuilder:condition.or',\n\tconditionRemove: 'formBuilder:condition.remove',\n\tconditionNoFields: 'formBuilder:condition.noFields',\n\tconditionEmpty: 'formBuilder:condition.empty',\n\tconditionSelectField: 'formBuilder:condition.selectField',\n\tconditionTrue: 'formBuilder:condition.true',\n\tconditionFalse: 'formBuilder:condition.false',\n\tconfigHidden: 'formBuilder:config.hidden',\n\ttabFields: 'formBuilder:tab.fields',\n\ttabFlow: 'formBuilder:tab.flow',\n\ttabActions: 'formBuilder:tab.actions',\n\ttabField: 'formBuilder:tab.field',\n\ttabValidation: 'formBuilder:tab.validation',\n\ttabAdvanced: 'formBuilder:tab.advanced',\n\tfieldTypeCalculation: 'formBuilder:fieldType.calculation',\n\tconfigExpression: 'formBuilder:config.expression',\n\tconfigExpressionDescription: 'formBuilder:config.expressionDescription',\n\tconfigCalcDisplay: 'formBuilder:config.calcDisplay',\n\tvalidationCalcExpressionInvalid: 'formBuilder:validation.calcExpressionInvalid',\n\tpresentationPage: 'formBuilder:presentation.page',\n\tpresentationModal: 'formBuilder:presentation.modal',\n\tpresentationDrawer: 'formBuilder:presentation.drawer',\n\tpresentationInline: 'formBuilder:presentation.inline',\n\tactionEmailTeam: 'formBuilder:action.emailTeam',\n\tactionConfirmation: 'formBuilder:action.confirmation',\n\tactionSignedWebhook: 'formBuilder:action.signedWebhook',\n\tactionConfigTo: 'formBuilder:action.config.to',\n\tactionConfigSubject: 'formBuilder:action.config.subject',\n\tactionConfigBody: 'formBuilder:action.config.body',\n\tactionConfigBodyDescription: 'formBuilder:action.config.bodyDescription',\n\tactionConfigToField: 'formBuilder:action.config.toField',\n\tactionConfigToFieldDescription: 'formBuilder:action.config.toFieldDescription',\n\tactionConfigFrom: 'formBuilder:action.config.from',\n\tactionConfigFromDescription: 'formBuilder:action.config.fromDescription',\n\tactionConfigCc: 'formBuilder:action.config.cc',\n\tactionConfigBcc: 'formBuilder:action.config.bcc',\n\tactionConfigReplyTo: 'formBuilder:action.config.replyTo',\n\tvalidationFromUnknown: 'formBuilder:validation.fromUnknown',\n\tvalidationFromUnavailable: 'formBuilder:validation.fromUnavailable',\n\tvalidationToUnknown: 'formBuilder:validation.toUnknown',\n\tvalidationToUnavailable: 'formBuilder:validation.toUnavailable',\n\tactionConfigUrl: 'formBuilder:action.config.url',\n\tactionConfigUrlDescription: 'formBuilder:action.config.urlDescription',\n\tactionConfigSecret: 'formBuilder:action.config.secret',\n\tactionConfigSecretDescription: 'formBuilder:action.config.secretDescription',\n\tvalidationUrlInvalid: 'formBuilder:validation.urlInvalid',\n\tconfigActions: 'formBuilder:config.actions',\n\tfieldTypeConsent: 'formBuilder:fieldType.consent',\n\tconsentConfigSource: 'formBuilder:consent.config.source',\n\tconsentConfigSourceDescription: 'formBuilder:consent.config.sourceDescription',\n\tconsentSourcesField: 'formBuilder:consentSources.field',\n\tconsentSourcesFieldDescription: 'formBuilder:consentSources.fieldDescription',\n\tconsentSourceSingular: 'formBuilder:consentSources.singular',\n\tconsentSourcePlural: 'formBuilder:consentSources.plural',\n\tconsentSourceLabel: 'formBuilder:consentSources.label',\n\tconsentSourceStatement: 'formBuilder:consentSources.statement',\n\tconsentSourcePage: 'formBuilder:consentSources.page',\n\tconsentSourcePageDescription: 'formBuilder:consentSources.pageDescription',\n\tconsentSourcesUnavailable: 'formBuilder:consent.sourcesUnavailable',\n\tresultsResponses: 'formBuilder:results.responses',\n\tresultsNoResponses: 'formBuilder:results.noResponses',\n\tresultsTruncated: 'formBuilder:results.truncated',\n\tpollGroup: 'formBuilder:poll.group',\n\tpollResultsField: 'formBuilder:poll.resultsField',\n\tpollResultsFieldDescription: 'formBuilder:poll.resultsFieldDescription',\n\tpollVoteFieldChoose: 'formBuilder:poll.voteFieldChoose',\n\tpollVoteFieldMissing: 'formBuilder:poll.voteFieldMissing',\n\tpollResultsVisibility: 'formBuilder:poll.resultsVisibility',\n\tpollVisibilityAfterVote: 'formBuilder:poll.visibility.afterVote',\n\tpollVisibilityAfterClose: 'formBuilder:poll.visibility.afterClose',\n\tpollClosesAt: 'formBuilder:poll.closesAt',\n\tpollClosed: 'formBuilder:poll.closed',\n\tpollResultsAfterClose: 'formBuilder:poll.resultsAfterClose',\n\tpollOptionSource: 'formBuilder:poll.optionSource',\n\tpollOptionSourceDescription: 'formBuilder:poll.optionSourceDescription',\n\tpollSourceConfig: 'formBuilder:poll.sourceConfig',\n\tpollOutcome: 'formBuilder:poll.outcome',\n\tpollType: 'formBuilder:poll.type',\n\tpollTypeDescription: 'formBuilder:poll.typeDescription',\n\tpollTypeManual: 'formBuilder:poll.type.manual',\n\tpollTypeMostVoted: 'formBuilder:poll.type.mostVoted',\n\tpollTypeSource: 'formBuilder:poll.type.source',\n\tpollCloseButton: 'formBuilder:poll.close.button',\n\tpollReopenButton: 'formBuilder:poll.reopen.button',\n\tpollCloseHintManual: 'formBuilder:poll.close.hintManual',\n\tpollCloseHintMostVoted: 'formBuilder:poll.close.hintMostVoted',\n\tpollCloseHintSource: 'formBuilder:poll.close.hintSource',\n\tpollReopenHint: 'formBuilder:poll.reopen.hint',\n\tpollCloseNeedsWinner: 'formBuilder:poll.close.needsWinner',\n\tpollCloseManualNoWinner: 'formBuilder:poll.close.manualNoWinner',\n\tpollWinningValue: 'formBuilder:poll.winningValue',\n\tpollWinningValueDescription: 'formBuilder:poll.winningValueDescription',\n\tpollResolvedAt: 'formBuilder:poll.resolvedAt',\n\tvalidationWinningValueUnknown: 'formBuilder:validation.winningValueUnknown',\n\tvalidationWinningValueDisabled: 'formBuilder:validation.winningValueDisabled',\n\tendpointOptionsLoading: 'formBuilder:endpointOptions.loading',\n\tendpointOptionsError: 'formBuilder:endpointOptions.error',\n\tpollOptionsUnavailable: 'formBuilder:poll.optionsUnavailable',\n\tpollFinalResult: 'formBuilder:poll.finalResult',\n\tresultsWinner: 'formBuilder:results.winner',\n\tvalidationFileMissing: 'formBuilder:validation.file.missing',\n\tvalidationFileMimeType: 'formBuilder:validation.file.mimeType',\n\tvalidationFileTooLarge: 'formBuilder:validation.file.tooLarge',\n\tfieldTypeFile: 'formBuilder:fieldType.file',\n\tfileConfigMimeTypes: 'formBuilder:file.config.mimeTypes',\n\tfileConfigMaxSize: 'formBuilder:file.config.maxSize',\n\tfileConfigMaxSizeDescription: 'formBuilder:file.config.maxSizeDescription',\n\tfileTooLarge: 'formBuilder:file.tooLarge',\n\tfileUploadMisconfigured: 'formBuilder:file.uploadMisconfigured',\n\tfileHintAccepted: 'formBuilder:file.hint.accepted',\n\tfileHintMaxSize: 'formBuilder:file.hint.maxSize',\n\tspamRateLimited: 'formBuilder:spam.rateLimited',\n\tspamRejected: 'formBuilder:spam.rejected',\n\tspamCaptchaFailed: 'formBuilder:spam.captchaFailed',\n\tcollectionFormSingular: 'formBuilder:collection.form.singular',\n\tcollectionFormPlural: 'formBuilder:collection.form.plural',\n\tcollectionSubmissionSingular: 'formBuilder:collection.submission.singular',\n\tcollectionSubmissionPlural: 'formBuilder:collection.submission.plural',\n\tstatusComplete: 'formBuilder:status.complete',\n\tstatusPartial: 'formBuilder:status.partial',\n\tfieldTypeRepeater: 'formBuilder:fieldType.repeater',\n\tconfigMinRows: 'formBuilder:config.minRows',\n\tconfigMaxRows: 'formBuilder:config.maxRows',\n\tconfigAddLabel: 'formBuilder:config.addLabel',\n\tconfigSubFields: 'formBuilder:config.subFields',\n\tvalidationRepeaterMin: 'formBuilder:validation.repeaterMin',\n\tvalidationRepeaterMax: 'formBuilder:validation.repeaterMax',\n\trepeaterAddRow: 'formBuilder:repeater.addRow',\n\trepeaterRemoveRow: 'formBuilder:repeater.removeRow',\n\trepeaterRow: 'formBuilder:repeater.row',\n\trepeaterRowCount: 'formBuilder:repeater.rowCount',\n\tsubmissionConsent: 'formBuilder:submission.consent',\n\tsubmissionDetails: 'formBuilder:submission.details',\n\tsubmissionConsentAgreed: 'formBuilder:submission.consentAgreed',\n\tsubmissionConsentDeclined: 'formBuilder:submission.consentDeclined',\n\tsubmissionMetaLocale: 'formBuilder:submission.meta.locale',\n\tsubmissionMetaReceivedAt: 'formBuilder:submission.meta.receivedAt',\n\tsubmissionMetaIp: 'formBuilder:submission.meta.ip',\n\tsubmissionMetaUserAgent: 'formBuilder:submission.meta.userAgent',\n\tsubmissionMetaCaptcha: 'formBuilder:submission.meta.captcha',\n\tflowDescription: 'formBuilder:flow.description',\n\tflowStepFallbackTitle: 'formBuilder:flow.stepFallbackTitle',\n\tflowFieldInStep: 'formBuilder:flow.fieldInStep',\n\tflowUnassigned: 'formBuilder:flow.unassigned',\n\tflowAssignToStep: 'formBuilder:flow.assignToStep',\n\tflowNextSequential: 'formBuilder:flow.nextSequential',\n\tflowNextTerminal: 'formBuilder:flow.nextTerminal',\n\tflowFields: 'formBuilder:flow.fields',\n\tflowDefaultNext: 'formBuilder:flow.defaultNext',\n\tflowConditionalTransitions: 'formBuilder:flow.conditionalTransitions',\n\tflowStepTitleLabel: 'formBuilder:flow.stepTitleLabel',\n\tflowSelectStepPlaceholder: 'formBuilder:flow.selectStepPlaceholder',\n\tflowMoveTransitionUp: 'formBuilder:flow.moveTransitionUp',\n\tflowMoveTransitionDown: 'formBuilder:flow.moveTransitionDown',\n\tflowRemoveTransition: 'formBuilder:flow.removeTransition',\n\tflowAddAbove: 'formBuilder:flow.addAbove',\n\tflowAddBelow: 'formBuilder:flow.addBelow',\n\tflowGoTo: 'formBuilder:flow.goTo',\n\tflowWhen: 'formBuilder:flow.when',\n\tflowNoFields: 'formBuilder:flow.noFields',\n\tflowFirstMatchWins: 'formBuilder:flow.firstMatchWins',\n\tflowAddTransition: 'formBuilder:flow.addTransition',\n\tflowNoSteps: 'formBuilder:flow.noSteps',\n\tflowFallbackTitle: 'formBuilder:flow.fallbackTitle',\n\tfieldTypeMessage: 'formBuilder:fieldType.message',\n\tconfigContent: 'formBuilder:config.content',\n\ttabResponse: 'formBuilder:tab.response',\n\tresponseType: 'formBuilder:response.type',\n\tresponseTypeMessage: 'formBuilder:response.type.message',\n\tresponseTypeRedirect: 'formBuilder:response.type.redirect',\n\tresponseMessage: 'formBuilder:response.message',\n\tresponseRedirect: 'formBuilder:response.redirect',\n\tresponseUrl: 'formBuilder:response.url',\n\tresponseRedirectReference: 'formBuilder:response.redirect.reference',\n\tresponseRedirectReferenceDescription: 'formBuilder:response.redirect.referenceDescription',\n\tbuttonsSubmitLabel: 'formBuilder:buttons.submitLabel',\n\tbuttonsNextLabel: 'formBuilder:buttons.nextLabel',\n\tbuttonsPrevLabel: 'formBuilder:buttons.prevLabel',\n\tformBack: 'formBuilder:form.back',\n\tformNext: 'formBuilder:form.next',\n\tformSubmit: 'formBuilder:form.submit',\n\tformMultistep: 'formBuilder:form.multistep',\n\tformPollEnabled: 'formBuilder:form.pollEnabled',\n\tcellStepCountOne: 'formBuilder:cell.stepCount.one',\n\tcellStepCountOther: 'formBuilder:cell.stepCount.other',\n\tcellFieldCountOne: 'formBuilder:cell.fieldCount.one',\n\tcellFieldCountOther: 'formBuilder:cell.fieldCount.other',\n\tdepartmentsField: 'formBuilder:departments.field',\n\tdepartmentsFieldDescription: 'formBuilder:departments.fieldDescription',\n\tdepartmentSingular: 'formBuilder:departments.singular',\n\tdepartmentPlural: 'formBuilder:departments.plural',\n\tdepartmentLabel: 'formBuilder:departments.label',\n\tdepartmentEmail: 'formBuilder:departments.email',\n\tdepartmentAddRow: 'formBuilder:departments.addRow',\n\tdepartmentRemoveRow: 'formBuilder:departments.removeRow',\n} as const\n\nexport type TranslationKey = (typeof keys)[keyof typeof keys]\n"],"mappings":"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"}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { keys } from "../translations/keys.js";
|
|
2
2
|
import { labelFor } from "../translations/server.js";
|
|
3
3
|
//#region src/validation/buildRuleBlocks.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const RULE_DESCRIPTION_REF = "@10x-media/form-builder/client#RuleDescription";
|
|
5
|
+
/** Each rule block appends its own `message` field, so a rule param of that name would collide and be silently dropped by Payload. */
|
|
6
|
+
const RESERVED_PARAM_NAMES = new Set(["message"]);
|
|
7
|
+
/**
|
|
8
|
+
* One block per rule applicable to `fieldType` (gated by `appliesTo`): a leading plain-language
|
|
9
|
+
* description (when the rule sets one), the rule params, then a message override. The description is
|
|
10
|
+
* a `ui` field mounting `RuleDescription`, because Payload `Block`s have no native description slot.
|
|
11
|
+
*/
|
|
7
12
|
const buildRuleBlocks = (registry, fieldType) => {
|
|
8
13
|
const blocks = [];
|
|
9
14
|
for (const rule of registry.values()) {
|
|
10
15
|
if (rule.appliesTo && !rule.appliesTo.includes(fieldType)) continue;
|
|
11
|
-
for (const param of rule.params ?? []) if ("name" in param && RESERVED_PARAM_NAMES.has(param.name)) throw new Error(`form-builder: validation rule "${rule.type}" declares a reserved param name "${param.name}". The
|
|
16
|
+
for (const param of rule.params ?? []) if ("name" in param && RESERVED_PARAM_NAMES.has(param.name)) throw new Error(`form-builder: validation rule "${rule.type}" declares a reserved param name "${param.name}". The name "message" is reserved for the constraint-list UI.`);
|
|
17
|
+
const descriptionField = rule.description ? [{
|
|
18
|
+
name: `${rule.type}Description`,
|
|
19
|
+
type: "ui",
|
|
20
|
+
admin: { components: { Field: {
|
|
21
|
+
path: RULE_DESCRIPTION_REF,
|
|
22
|
+
clientProps: { descriptionKey: rule.description }
|
|
23
|
+
} } }
|
|
24
|
+
}] : [];
|
|
12
25
|
blocks.push({
|
|
13
26
|
slug: rule.type,
|
|
14
27
|
labels: {
|
|
@@ -16,24 +29,12 @@ const buildRuleBlocks = (registry, fieldType) => {
|
|
|
16
29
|
plural: labelFor(rule.label)
|
|
17
30
|
},
|
|
18
31
|
fields: [
|
|
32
|
+
...descriptionField,
|
|
19
33
|
...rule.params ?? [],
|
|
20
34
|
{
|
|
21
35
|
name: "message",
|
|
22
36
|
type: "text",
|
|
23
37
|
label: labelFor(keys.validationMessageLabel)
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "severity",
|
|
27
|
-
type: "select",
|
|
28
|
-
defaultValue: "error",
|
|
29
|
-
label: labelFor(keys.validationSeverityLabel),
|
|
30
|
-
options: [{
|
|
31
|
-
label: labelFor(keys.validationSeverityError),
|
|
32
|
-
value: "error"
|
|
33
|
-
}, {
|
|
34
|
-
label: labelFor(keys.validationSeverityWarning),
|
|
35
|
-
value: "warning"
|
|
36
|
-
}]
|
|
37
38
|
}
|
|
38
39
|
]
|
|
39
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildRuleBlocks.js","names":[],"sources":["../../src/validation/buildRuleBlocks.ts"],"sourcesContent":["import type { Block } from 'payload'\nimport { keys } from '../translations/keys'\nimport { labelFor } from '../translations/server'\nimport type { ValidationRuleRegistry } from './registry'\n\n/** Each rule block appends its own `message`
|
|
1
|
+
{"version":3,"file":"buildRuleBlocks.js","names":[],"sources":["../../src/validation/buildRuleBlocks.ts"],"sourcesContent":["import type { Block, Field } from 'payload'\nimport { keys } from '../translations/keys'\nimport { labelFor } from '../translations/server'\nimport type { ValidationRuleRegistry } from './registry'\n\nconst RULE_DESCRIPTION_REF = '@10x-media/form-builder/client#RuleDescription'\n\n/** Each rule block appends its own `message` field, so a rule param of that name would collide and be silently dropped by Payload. */\nconst RESERVED_PARAM_NAMES = new Set(['message'])\n\n/**\n * One block per rule applicable to `fieldType` (gated by `appliesTo`): a leading plain-language\n * description (when the rule sets one), the rule params, then a message override. The description is\n * a `ui` field mounting `RuleDescription`, because Payload `Block`s have no native description slot.\n */\nexport const buildRuleBlocks = (registry: ValidationRuleRegistry, fieldType: string): Block[] => {\n\tconst blocks: Block[] = []\n\tfor (const rule of registry.values()) {\n\t\tif (rule.appliesTo && !rule.appliesTo.includes(fieldType)) {\n\t\t\tcontinue\n\t\t}\n\t\tfor (const param of rule.params ?? []) {\n\t\t\tif ('name' in param && RESERVED_PARAM_NAMES.has(param.name)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`form-builder: validation rule \"${rule.type}\" declares a reserved param name \"${param.name}\". The name \"message\" is reserved for the constraint-list UI.`\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tconst descriptionField: Field[] = rule.description\n\t\t\t? [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: `${rule.type}Description`,\n\t\t\t\t\t\ttype: 'ui',\n\t\t\t\t\t\tadmin: {\n\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\tField: {\n\t\t\t\t\t\t\t\t\tpath: RULE_DESCRIPTION_REF,\n\t\t\t\t\t\t\t\t\tclientProps: { descriptionKey: rule.description },\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t: []\n\t\tblocks.push({\n\t\t\tslug: rule.type,\n\t\t\tlabels: { singular: labelFor(rule.label), plural: labelFor(rule.label) },\n\t\t\tfields: [\n\t\t\t\t...descriptionField,\n\t\t\t\t...(rule.params ?? []),\n\t\t\t\t{ name: 'message', type: 'text', label: labelFor(keys.validationMessageLabel) },\n\t\t\t],\n\t\t})\n\t}\n\treturn blocks\n}\n"],"mappings":";;;AAKA,MAAM,uBAAuB;;AAG7B,MAAM,uBAAuB,IAAI,IAAI,CAAC,SAAS,CAAC;;;;;;AAOhD,MAAa,mBAAmB,UAAkC,cAA+B;CAChG,MAAM,SAAkB,CAAC;CACzB,KAAK,MAAM,QAAQ,SAAS,OAAO,GAAG;EACrC,IAAI,KAAK,aAAa,CAAC,KAAK,UAAU,SAAS,SAAS,GACvD;EAED,KAAK,MAAM,SAAS,KAAK,UAAU,CAAC,GACnC,IAAI,UAAU,SAAS,qBAAqB,IAAI,MAAM,IAAI,GACzD,MAAM,IAAI,MACT,kCAAkC,KAAK,KAAK,oCAAoC,MAAM,KAAK,8DAC5F;EAGF,MAAM,mBAA4B,KAAK,cACpC,CACA;GACC,MAAM,GAAG,KAAK,KAAK;GACnB,MAAM;GACN,OAAO,EACN,YAAY,EACX,OAAO;IACN,MAAM;IACN,aAAa,EAAE,gBAAgB,KAAK,YAAY;GACjD,EACD,EACD;EACD,CACD,IACC,CAAC;EACJ,OAAO,KAAK;GACX,MAAM,KAAK;GACX,QAAQ;IAAE,UAAU,SAAS,KAAK,KAAK;IAAG,QAAQ,SAAS,KAAK,KAAK;GAAE;GACvE,QAAQ;IACP,GAAG;IACH,GAAI,KAAK,UAAU,CAAC;IACpB;KAAE,MAAM;KAAW,MAAM;KAAQ,OAAO,SAAS,KAAK,sBAAsB;IAAE;GAC/E;EACD,CAAC;CACF;CACA,OAAO;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","names":[],"sources":["../../../src/validation/builtin/email.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { defineValidationRule } from '../defineValidationRule'\n\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\n\nexport const emailRule = defineValidationRule<Record<string, never>, string>({\n\ttype: 'email',\n\tlabel: keys.ruleEmail,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tdefaultMessage: keys.ruleEmailMessage,\n\tvalidate: ({ value, message }) =>\n\t\tvalue == null || value === '' || EMAIL_PATTERN.test(value) ? true : message(),\n})\n"],"mappings":";;;AAGA,MAAM,gBAAgB;AAEtB,MAAa,YAAY,qBAAoD;CAC5E,MAAM;CACN,OAAO,KAAK;CACZ,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,cACnB,SAAS,QAAQ,UAAU,MAAM,cAAc,KAAK,KAAK,IAAI,OAAO,QAAQ;AAC9E,CAAC"}
|
|
1
|
+
{"version":3,"file":"email.js","names":[],"sources":["../../../src/validation/builtin/email.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { defineValidationRule } from '../defineValidationRule'\n\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\n\nexport const emailRule = defineValidationRule<Record<string, never>, string>({\n\ttype: 'email',\n\tlabel: keys.ruleEmail,\n\tdescription: keys.ruleEmailDescription,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tdefaultMessage: keys.ruleEmailMessage,\n\tvalidate: ({ value, message }) =>\n\t\tvalue == null || value === '' || EMAIL_PATTERN.test(value) ? true : message(),\n})\n"],"mappings":";;;AAGA,MAAM,gBAAgB;AAEtB,MAAa,YAAY,qBAAoD;CAC5E,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,cACnB,SAAS,QAAQ,UAAU,MAAM,cAAc,KAAK,KAAK,IAAI,OAAO,QAAQ;AAC9E,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { keys } from "../../translations/keys.js";
|
|
2
|
-
import { labelFor } from "../../translations/server.js";
|
|
3
2
|
import { defineValidationRule } from "../defineValidationRule.js";
|
|
3
|
+
import { fieldTargetParam } from "../fieldTargetParam.js";
|
|
4
4
|
//#region src/validation/builtin/matchesField.ts
|
|
5
5
|
const matchesFieldRule = defineValidationRule({
|
|
6
6
|
type: "matchesField",
|
|
7
7
|
label: keys.ruleMatchesField,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type: "text",
|
|
11
|
-
required: true,
|
|
12
|
-
label: labelFor(keys.ruleParamField)
|
|
13
|
-
}],
|
|
8
|
+
description: keys.ruleMatchesFieldDescription,
|
|
9
|
+
params: [fieldTargetParam("field")],
|
|
14
10
|
defaultMessage: keys.ruleMatchesFieldMessage,
|
|
15
11
|
validate: ({ value, params, siblingData, message }) => value === siblingData[params.field] ? true : message()
|
|
16
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesField.js","names":[],"sources":["../../../src/validation/builtin/matchesField.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport {
|
|
1
|
+
{"version":3,"file":"matchesField.js","names":[],"sources":["../../../src/validation/builtin/matchesField.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { defineValidationRule } from '../defineValidationRule'\nimport { fieldTargetParam } from '../fieldTargetParam'\n\nexport const matchesFieldRule = defineValidationRule<{ field: string }, unknown>({\n\ttype: 'matchesField',\n\tlabel: keys.ruleMatchesField,\n\tdescription: keys.ruleMatchesFieldDescription,\n\tparams: [fieldTargetParam('field')],\n\tdefaultMessage: keys.ruleMatchesFieldMessage,\n\tvalidate: ({ value, params, siblingData, message }) =>\n\t\tvalue === siblingData[params.field] ? true : message(),\n})\n"],"mappings":";;;;AAIA,MAAa,mBAAmB,qBAAiD;CAChF,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,QAAQ,CAAC,iBAAiB,OAAO,CAAC;CAClC,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,aAAa,cACxC,UAAU,YAAY,OAAO,SAAS,OAAO,QAAQ;AACvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"max.js","names":[],"sources":["../../../src/validation/builtin/max.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const maxRule = defineValidationRule<{ max: number }, number>({\n\ttype: 'max',\n\tlabel: keys.ruleMax,\n\tappliesTo: ['number'],\n\tparams: [{ name: 'max', type: 'number', required: true, label: labelFor(keys.ruleParamMax) }],\n\tdefaultMessage: keys.ruleMaxMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value <= params.max ? true : message({ max: params.max }),\n})\n"],"mappings":";;;;AAIA,MAAa,UAAU,qBAA8C;CACpE,MAAM;CACN,OAAO,KAAK;CACZ,WAAW,CAAC,QAAQ;CACpB,QAAQ,CAAC;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,OAAO,SAAS,KAAK,YAAY;CAAE,CAAC;CAC5F,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3E,CAAC"}
|
|
1
|
+
{"version":3,"file":"max.js","names":[],"sources":["../../../src/validation/builtin/max.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const maxRule = defineValidationRule<{ max: number }, number>({\n\ttype: 'max',\n\tlabel: keys.ruleMax,\n\tdescription: keys.ruleMaxDescription,\n\tappliesTo: ['number'],\n\tparams: [{ name: 'max', type: 'number', required: true, label: labelFor(keys.ruleParamMax) }],\n\tdefaultMessage: keys.ruleMaxMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value <= params.max ? true : message({ max: params.max }),\n})\n"],"mappings":";;;;AAIA,MAAa,UAAU,qBAA8C;CACpE,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW,CAAC,QAAQ;CACpB,QAAQ,CAAC;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,OAAO,SAAS,KAAK,YAAY;CAAE,CAAC;CAC5F,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maxDate.js","names":[],"sources":["../../../src/validation/builtin/maxDate.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\nimport { validateDateBound } from './validateDateBound'\n\nexport const maxDateRule = defineValidationRule<{ max: string }, string>({\n\ttype: 'maxDate',\n\tlabel: keys.ruleMaxDate,\n\tappliesTo: ['date'],\n\tparams: [\n\t\t{\n\t\t\tname: 'max',\n\t\t\ttype: 'text',\n\t\t\trequired: true,\n\t\t\tlabel: labelFor(keys.ruleParamMaxDate),\n\t\t\tvalidate: validateDateBound,\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleMaxDateMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value <= params.max ? true : message({ max: params.max }),\n})\n"],"mappings":";;;;;AAKA,MAAa,cAAc,qBAA8C;CACxE,MAAM;CACN,OAAO,KAAK;CACZ,WAAW,CAAC,MAAM;CAClB,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO,SAAS,KAAK,gBAAgB;EACrC,UAAU;CACX,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3F,CAAC"}
|
|
1
|
+
{"version":3,"file":"maxDate.js","names":[],"sources":["../../../src/validation/builtin/maxDate.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\nimport { validateDateBound } from './validateDateBound'\n\nexport const maxDateRule = defineValidationRule<{ max: string }, string>({\n\ttype: 'maxDate',\n\tlabel: keys.ruleMaxDate,\n\tdescription: keys.ruleMaxDateDescription,\n\tappliesTo: ['date'],\n\tparams: [\n\t\t{\n\t\t\tname: 'max',\n\t\t\ttype: 'text',\n\t\t\trequired: true,\n\t\t\tlabel: labelFor(keys.ruleParamMaxDate),\n\t\t\tvalidate: validateDateBound,\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleMaxDateMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value <= params.max ? true : message({ max: params.max }),\n})\n"],"mappings":";;;;;AAKA,MAAa,cAAc,qBAA8C;CACxE,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW,CAAC,MAAM;CAClB,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO,SAAS,KAAK,gBAAgB;EACrC,UAAU;CACX,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maxLength.js","names":[],"sources":["../../../src/validation/builtin/maxLength.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const maxLengthRule = defineValidationRule<{ max: number }, string>({\n\ttype: 'maxLength',\n\tlabel: keys.ruleMaxLength,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tparams: [\n\t\t{ name: 'max', type: 'number', required: true, min: 0, label: labelFor(keys.ruleParamMax) },\n\t],\n\tdefaultMessage: keys.ruleMaxLengthMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value.length <= params.max\n\t\t\t? true\n\t\t\t: message({ max: params.max }),\n})\n"],"mappings":";;;;AAIA,MAAa,gBAAgB,qBAA8C;CAC1E,MAAM;CACN,OAAO,KAAK;CACZ,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,QAAQ,CACP;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,KAAK;EAAG,OAAO,SAAS,KAAK,YAAY;CAAE,CAC3F;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,MAAM,UAAU,OAAO,MACrD,OACA,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"maxLength.js","names":[],"sources":["../../../src/validation/builtin/maxLength.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const maxLengthRule = defineValidationRule<{ max: number }, string>({\n\ttype: 'maxLength',\n\tlabel: keys.ruleMaxLength,\n\tdescription: keys.ruleMaxLengthDescription,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tparams: [\n\t\t{ name: 'max', type: 'number', required: true, min: 0, label: labelFor(keys.ruleParamMax) },\n\t],\n\tdefaultMessage: keys.ruleMaxLengthMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value.length <= params.max\n\t\t\t? true\n\t\t\t: message({ max: params.max }),\n})\n"],"mappings":";;;;AAIA,MAAa,gBAAgB,qBAA8C;CAC1E,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,QAAQ,CACP;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,KAAK;EAAG,OAAO,SAAS,KAAK,YAAY;CAAE,CAC3F;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,MAAM,UAAU,OAAO,MACrD,OACA,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"min.js","names":[],"sources":["../../../src/validation/builtin/min.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const minRule = defineValidationRule<{ min: number }, number>({\n\ttype: 'min',\n\tlabel: keys.ruleMin,\n\tappliesTo: ['number'],\n\tparams: [{ name: 'min', type: 'number', required: true, label: labelFor(keys.ruleParamMin) }],\n\tdefaultMessage: keys.ruleMinMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value >= params.min ? true : message({ min: params.min }),\n})\n"],"mappings":";;;;AAIA,MAAa,UAAU,qBAA8C;CACpE,MAAM;CACN,OAAO,KAAK;CACZ,WAAW,CAAC,QAAQ;CACpB,QAAQ,CAAC;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,OAAO,SAAS,KAAK,YAAY;CAAE,CAAC;CAC5F,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3E,CAAC"}
|
|
1
|
+
{"version":3,"file":"min.js","names":[],"sources":["../../../src/validation/builtin/min.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const minRule = defineValidationRule<{ min: number }, number>({\n\ttype: 'min',\n\tlabel: keys.ruleMin,\n\tdescription: keys.ruleMinDescription,\n\tappliesTo: ['number'],\n\tparams: [{ name: 'min', type: 'number', required: true, label: labelFor(keys.ruleParamMin) }],\n\tdefaultMessage: keys.ruleMinMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value >= params.min ? true : message({ min: params.min }),\n})\n"],"mappings":";;;;AAIA,MAAa,UAAU,qBAA8C;CACpE,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW,CAAC,QAAQ;CACpB,QAAQ,CAAC;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,OAAO,SAAS,KAAK,YAAY;CAAE,CAAC;CAC5F,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minDate.js","names":[],"sources":["../../../src/validation/builtin/minDate.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\nimport { validateDateBound } from './validateDateBound'\n\nexport const minDateRule = defineValidationRule<{ min: string }, string>({\n\ttype: 'minDate',\n\tlabel: keys.ruleMinDate,\n\tappliesTo: ['date'],\n\tparams: [\n\t\t{\n\t\t\tname: 'min',\n\t\t\ttype: 'text',\n\t\t\trequired: true,\n\t\t\tlabel: labelFor(keys.ruleParamMinDate),\n\t\t\tvalidate: validateDateBound,\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleMinDateMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value >= params.min ? true : message({ min: params.min }),\n})\n"],"mappings":";;;;;AAKA,MAAa,cAAc,qBAA8C;CACxE,MAAM;CACN,OAAO,KAAK;CACZ,WAAW,CAAC,MAAM;CAClB,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO,SAAS,KAAK,gBAAgB;EACrC,UAAU;CACX,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3F,CAAC"}
|
|
1
|
+
{"version":3,"file":"minDate.js","names":[],"sources":["../../../src/validation/builtin/minDate.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\nimport { validateDateBound } from './validateDateBound'\n\nexport const minDateRule = defineValidationRule<{ min: string }, string>({\n\ttype: 'minDate',\n\tlabel: keys.ruleMinDate,\n\tdescription: keys.ruleMinDateDescription,\n\tappliesTo: ['date'],\n\tparams: [\n\t\t{\n\t\t\tname: 'min',\n\t\t\ttype: 'text',\n\t\t\trequired: true,\n\t\t\tlabel: labelFor(keys.ruleParamMinDate),\n\t\t\tvalidate: validateDateBound,\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleMinDateMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value >= params.min ? true : message({ min: params.min }),\n})\n"],"mappings":";;;;;AAKA,MAAa,cAAc,qBAA8C;CACxE,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW,CAAC,MAAM;CAClB,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO,SAAS,KAAK,gBAAgB;EACrC,UAAU;CACX,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,SAAS,OAAO,MAAM,OAAO,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAC3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minLength.js","names":[],"sources":["../../../src/validation/builtin/minLength.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const minLengthRule = defineValidationRule<{ min: number }, string>({\n\ttype: 'minLength',\n\tlabel: keys.ruleMinLength,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tparams: [\n\t\t{ name: 'min', type: 'number', required: true, min: 0, label: labelFor(keys.ruleParamMin) },\n\t],\n\tdefaultMessage: keys.ruleMinLengthMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value.length >= params.min\n\t\t\t? true\n\t\t\t: message({ min: params.min }),\n})\n"],"mappings":";;;;AAIA,MAAa,gBAAgB,qBAA8C;CAC1E,MAAM;CACN,OAAO,KAAK;CACZ,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,QAAQ,CACP;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,KAAK;EAAG,OAAO,SAAS,KAAK,YAAY;CAAE,CAC3F;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,MAAM,UAAU,OAAO,MACrD,OACA,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"minLength.js","names":[],"sources":["../../../src/validation/builtin/minLength.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const minLengthRule = defineValidationRule<{ min: number }, string>({\n\ttype: 'minLength',\n\tlabel: keys.ruleMinLength,\n\tdescription: keys.ruleMinLengthDescription,\n\tappliesTo: ['text', 'textarea', 'email'],\n\tparams: [\n\t\t{ name: 'min', type: 'number', required: true, min: 0, label: labelFor(keys.ruleParamMin) },\n\t],\n\tdefaultMessage: keys.ruleMinLengthMessage,\n\tvalidate: ({ value, params, message }) =>\n\t\tvalue == null || value === '' || value.length >= params.min\n\t\t\t? true\n\t\t\t: message({ min: params.min }),\n})\n"],"mappings":";;;;AAIA,MAAa,gBAAgB,qBAA8C;CAC1E,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW;EAAC;EAAQ;EAAY;CAAO;CACvC,QAAQ,CACP;EAAE,MAAM;EAAO,MAAM;EAAU,UAAU;EAAM,KAAK;EAAG,OAAO,SAAS,KAAK,YAAY;CAAE,CAC3F;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAC3B,SAAS,QAAQ,UAAU,MAAM,MAAM,UAAU,OAAO,MACrD,OACA,QAAQ,EAAE,KAAK,OAAO,IAAI,CAAC;AAChC,CAAC"}
|
|
@@ -11,6 +11,7 @@ const SCAN_LIMIT = 500;
|
|
|
11
11
|
const notAlreadySubmittedRule = defineValidationRule({
|
|
12
12
|
type: "notAlreadySubmitted",
|
|
13
13
|
label: keys.ruleNotAlreadySubmitted,
|
|
14
|
+
description: keys.ruleNotAlreadySubmittedDescription,
|
|
14
15
|
client: false,
|
|
15
16
|
defaultMessage: keys.ruleNotAlreadySubmittedMessage,
|
|
16
17
|
validate: async ({ value, field, payload, req, formId, message }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notAlreadySubmitted.js","names":[],"sources":["../../../src/validation/builtin/notAlreadySubmitted.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { defineValidationRule } from '../defineValidationRule'\n\nconst FORM_SUBMISSIONS_SLUG = 'form-submissions'\nconst SCAN_LIMIT = 500\n\n/**\n * Server-only async exemplar: rejects a value already present for the same form. Scans up to\n * `SCAN_LIMIT` recent submissions in JS (the values live in a json column, so a portable DB query is\n * not available); a future phase can add an indexed dedup column for scale.\n */\nexport const notAlreadySubmittedRule = defineValidationRule<Record<string, never>, unknown>({\n\ttype: 'notAlreadySubmitted',\n\tlabel: keys.ruleNotAlreadySubmitted,\n\tclient: false,\n\tdefaultMessage: keys.ruleNotAlreadySubmittedMessage,\n\tvalidate: async ({ value, field, payload, req, formId, message }) => {\n\t\tif (value == null || value === '' || !payload || formId == null) {\n\t\t\treturn true\n\t\t}\n\t\tconst result = await payload.find({\n\t\t\tcollection: FORM_SUBMISSIONS_SLUG,\n\t\t\twhere: { form: { equals: formId } },\n\t\t\tlimit: SCAN_LIMIT,\n\t\t\tdepth: 0,\n\t\t\treq,\n\t\t})\n\t\tconst clash = result.docs.some((doc) => {\n\t\t\tconst values = (doc as { values?: { field: string; value: unknown }[] }).values ?? []\n\t\t\treturn values.some((entry) => entry.field === field.name && entry.value === value)\n\t\t})\n\t\treturn clash ? message() : true\n\t},\n})\n"],"mappings":";;;AAGA,MAAM,wBAAwB;AAC9B,MAAM,aAAa;;;;;;AAOnB,MAAa,0BAA0B,qBAAqD;CAC3F,MAAM;CACN,OAAO,KAAK;CACZ,QAAQ;CACR,gBAAgB,KAAK;CACrB,UAAU,OAAO,EAAE,OAAO,OAAO,SAAS,KAAK,QAAQ,cAAc;EACpE,IAAI,SAAS,QAAQ,UAAU,MAAM,CAAC,WAAW,UAAU,MAC1D,OAAO;EAaR,QAJc,MAPO,QAAQ,KAAK;GACjC,YAAY;GACZ,OAAO,EAAE,MAAM,EAAE,QAAQ,OAAO,EAAE;GAClC,OAAO;GACP,OAAO;GACP;EACD,CAAC,GACoB,KAAK,MAAM,QAAQ;GAEvC,QADgB,IAAyD,UAAU,CAAC,GACtE,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,MAAM,UAAU,KAAK;EAClF,CACW,IAAI,QAAQ,IAAI;CAC5B;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"notAlreadySubmitted.js","names":[],"sources":["../../../src/validation/builtin/notAlreadySubmitted.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { defineValidationRule } from '../defineValidationRule'\n\nconst FORM_SUBMISSIONS_SLUG = 'form-submissions'\nconst SCAN_LIMIT = 500\n\n/**\n * Server-only async exemplar: rejects a value already present for the same form. Scans up to\n * `SCAN_LIMIT` recent submissions in JS (the values live in a json column, so a portable DB query is\n * not available); a future phase can add an indexed dedup column for scale.\n */\nexport const notAlreadySubmittedRule = defineValidationRule<Record<string, never>, unknown>({\n\ttype: 'notAlreadySubmitted',\n\tlabel: keys.ruleNotAlreadySubmitted,\n\tdescription: keys.ruleNotAlreadySubmittedDescription,\n\tclient: false,\n\tdefaultMessage: keys.ruleNotAlreadySubmittedMessage,\n\tvalidate: async ({ value, field, payload, req, formId, message }) => {\n\t\tif (value == null || value === '' || !payload || formId == null) {\n\t\t\treturn true\n\t\t}\n\t\tconst result = await payload.find({\n\t\t\tcollection: FORM_SUBMISSIONS_SLUG,\n\t\t\twhere: { form: { equals: formId } },\n\t\t\tlimit: SCAN_LIMIT,\n\t\t\tdepth: 0,\n\t\t\treq,\n\t\t})\n\t\tconst clash = result.docs.some((doc) => {\n\t\t\tconst values = (doc as { values?: { field: string; value: unknown }[] }).values ?? []\n\t\t\treturn values.some((entry) => entry.field === field.name && entry.value === value)\n\t\t})\n\t\treturn clash ? message() : true\n\t},\n})\n"],"mappings":";;;AAGA,MAAM,wBAAwB;AAC9B,MAAM,aAAa;;;;;;AAOnB,MAAa,0BAA0B,qBAAqD;CAC3F,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,QAAQ;CACR,gBAAgB,KAAK;CACrB,UAAU,OAAO,EAAE,OAAO,OAAO,SAAS,KAAK,QAAQ,cAAc;EACpE,IAAI,SAAS,QAAQ,UAAU,MAAM,CAAC,WAAW,UAAU,MAC1D,OAAO;EAaR,QAJc,MAPO,QAAQ,KAAK;GACjC,YAAY;GACZ,OAAO,EAAE,MAAM,EAAE,QAAQ,OAAO,EAAE;GAClC,OAAO;GACP,OAAO;GACP;EACD,CAAC,GACoB,KAAK,MAAM,QAAQ;GAEvC,QADgB,IAAyD,UAAU,CAAC,GACtE,MAAM,UAAU,MAAM,UAAU,MAAM,QAAQ,MAAM,UAAU,KAAK;EAClF,CACW,IAAI,QAAQ,IAAI;CAC5B;AACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneOf.js","names":[],"sources":["../../../src/validation/builtin/oneOf.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const oneOfRule = defineValidationRule<{ values?: { value: string }[] }, string>({\n\ttype: 'oneOf',\n\tlabel: keys.ruleOneOf,\n\tappliesTo: ['text', 'textarea', 'select'],\n\tparams: [\n\t\t{\n\t\t\tname: 'values',\n\t\t\ttype: 'array',\n\t\t\tlabel: labelFor(keys.ruleParamValues),\n\t\t\tfields: [{ name: 'value', type: 'text', required: true }],\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleOneOfMessage,\n\tvalidate: ({ value, params, message }) => {\n\t\tif (value == null || value === '') {\n\t\t\treturn true\n\t\t}\n\t\tconst allowed = (params.values ?? []).map((entry) => entry.value)\n\t\tif (allowed.length === 0) {\n\t\t\treturn true\n\t\t}\n\t\treturn allowed.includes(value) ? true : message()\n\t},\n})\n"],"mappings":";;;;AAIA,MAAa,YAAY,qBAA+D;CACvF,MAAM;CACN,OAAO,KAAK;CACZ,WAAW;EAAC;EAAQ;EAAY;CAAQ;CACxC,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,OAAO,SAAS,KAAK,eAAe;EACpC,QAAQ,CAAC;GAAE,MAAM;GAAS,MAAM;GAAQ,UAAU;EAAK,CAAC;CACzD,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAAc;EACzC,IAAI,SAAS,QAAQ,UAAU,IAC9B,OAAO;EAER,MAAM,WAAW,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU,MAAM,KAAK;EAChE,IAAI,QAAQ,WAAW,GACtB,OAAO;EAER,OAAO,QAAQ,SAAS,KAAK,IAAI,OAAO,QAAQ;CACjD;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"oneOf.js","names":[],"sources":["../../../src/validation/builtin/oneOf.ts"],"sourcesContent":["import { keys } from '../../translations/keys'\nimport { labelFor } from '../../translations/server'\nimport { defineValidationRule } from '../defineValidationRule'\n\nexport const oneOfRule = defineValidationRule<{ values?: { value: string }[] }, string>({\n\ttype: 'oneOf',\n\tlabel: keys.ruleOneOf,\n\tdescription: keys.ruleOneOfDescription,\n\tappliesTo: ['text', 'textarea', 'select'],\n\tparams: [\n\t\t{\n\t\t\tname: 'values',\n\t\t\ttype: 'array',\n\t\t\tlabel: labelFor(keys.ruleParamValues),\n\t\t\tfields: [{ name: 'value', type: 'text', required: true }],\n\t\t},\n\t],\n\tdefaultMessage: keys.ruleOneOfMessage,\n\tvalidate: ({ value, params, message }) => {\n\t\tif (value == null || value === '') {\n\t\t\treturn true\n\t\t}\n\t\tconst allowed = (params.values ?? []).map((entry) => entry.value)\n\t\tif (allowed.length === 0) {\n\t\t\treturn true\n\t\t}\n\t\treturn allowed.includes(value) ? true : message()\n\t},\n})\n"],"mappings":";;;;AAIA,MAAa,YAAY,qBAA+D;CACvF,MAAM;CACN,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,WAAW;EAAC;EAAQ;EAAY;CAAQ;CACxC,QAAQ,CACP;EACC,MAAM;EACN,MAAM;EACN,OAAO,SAAS,KAAK,eAAe;EACpC,QAAQ,CAAC;GAAE,MAAM;GAAS,MAAM;GAAQ,UAAU;EAAK,CAAC;CACzD,CACD;CACA,gBAAgB,KAAK;CACrB,WAAW,EAAE,OAAO,QAAQ,cAAc;EACzC,IAAI,SAAS,QAAQ,UAAU,IAC9B,OAAO;EAER,MAAM,WAAW,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU,MAAM,KAAK;EAChE,IAAI,QAAQ,WAAW,GACtB,OAAO;EAER,OAAO,QAAQ,SAAS,KAAK,IAAI,OAAO,QAAQ;CACjD;AACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { keys } from "../../translations/keys.js";
|
|
2
2
|
import { labelFor } from "../../translations/server.js";
|
|
3
3
|
import { defineValidationRule } from "../defineValidationRule.js";
|
|
4
|
+
import { validateRegexFlags, validateRegexPattern } from "./validateRegexParams.js";
|
|
4
5
|
//#region src/validation/builtin/pattern.ts
|
|
5
6
|
const tryRegExp = (pattern, flags) => {
|
|
6
7
|
try {
|
|
@@ -9,9 +10,15 @@ const tryRegExp = (pattern, flags) => {
|
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Regex match. The params carry authoring-time `validate`s so an uncompilable pattern or flag set
|
|
15
|
+
* cannot be saved; at submit time an uncompilable regex still fails open, since a stored rule that
|
|
16
|
+
* predates those guards must not start rejecting every visitor's answer.
|
|
17
|
+
*/
|
|
12
18
|
const patternRule = defineValidationRule({
|
|
13
19
|
type: "pattern",
|
|
14
20
|
label: keys.rulePattern,
|
|
21
|
+
description: keys.rulePatternDescription,
|
|
15
22
|
appliesTo: [
|
|
16
23
|
"text",
|
|
17
24
|
"textarea",
|
|
@@ -21,11 +28,13 @@ const patternRule = defineValidationRule({
|
|
|
21
28
|
name: "pattern",
|
|
22
29
|
type: "text",
|
|
23
30
|
required: true,
|
|
24
|
-
label: labelFor(keys.ruleParamPattern)
|
|
31
|
+
label: labelFor(keys.ruleParamPattern),
|
|
32
|
+
validate: validateRegexPattern
|
|
25
33
|
}, {
|
|
26
34
|
name: "flags",
|
|
27
35
|
type: "text",
|
|
28
|
-
label: labelFor(keys.ruleParamFlags)
|
|
36
|
+
label: labelFor(keys.ruleParamFlags),
|
|
37
|
+
validate: validateRegexFlags
|
|
29
38
|
}],
|
|
30
39
|
defaultMessage: keys.rulePatternMessage,
|
|
31
40
|
validate: ({ value, params, message }) => {
|