form
All checks were successful
deploy to production / deploy (push) Successful in 49s

This commit is contained in:
2023-09-24 09:38:03 +00:00
parent 7813f0b486
commit eee191955e
32 changed files with 1091 additions and 518 deletions

52
types/global.d.ts vendored
View File

@@ -127,10 +127,45 @@ interface VideoSwitch {
link: string
}
interface FormObj {
formRows?: string[]
index?: number
formTitle?: string
formValues?: Writable<FormValues>
honey?: boolean
agreement?: boolean
}
// Before transformation
interface TempFormBefore {
[rowName: string]: TempFormRowBefore
}
interface TempFormRowBefore {
[newKey: string]: [any, boolean, boolean]
}
// After transformation
interface TempFormAfter {
[rowName: string]: Array<[string, [any, boolean, boolean]]>
}
interface TempFormIndices {
[rowName: string]: {
[newKey: string]: number
}
}
type ValueEntry =
| [string, [boolean | string | any, boolean]]
| [string, [any, CustomHTMLElement, string | null, boolean]]
type ObjectEntry = [string, CustomHTMLElement]
interface FormRow {
title?: string
rowName: string
columns: FormColumn[]
showRowName: boolean
}
interface Block {
@@ -174,7 +209,15 @@ interface FormColumn {
emailNameTime: string
emailNameTimes: string
numberfieldOrder?: number
showCheckboxGroup: boolean
groupTitle: string
checkboxes: Checkbox[]
showDatePicker: boolean
datePickerNotRequired: boolean
datePickerProps: DatePickerProps
datePickerEmailTitle: string
}
interface CustomHTMLElement extends HTMLElement {
checked?: boolean
value?: any
@@ -182,6 +225,14 @@ interface CustomHTMLElement extends HTMLElement {
getAttribute(attr: string): string | null
}
interface DatePickerProps {
allowedDateRanges: {
from: string
to: string
}[]
excludeDays: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"
}
interface FormValues {
[key: string]: CustomHTMLElement
blockGroups?: Set<number>
@@ -210,6 +261,7 @@ interface TextField {
dateSelectNotRequired: boolean
emailName: string
textfieldOrder: string
textTitle: string
}
interface TeaserImage {