This commit is contained in:
52
types/global.d.ts
vendored
52
types/global.d.ts
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user