306 lines
5.8 KiB
TypeScript
306 lines
5.8 KiB
TypeScript
interface Sites {
|
|
[key: string]: Site
|
|
}
|
|
|
|
interface Site {
|
|
path: string
|
|
showTeaser: boolean
|
|
teaserImages?: TeaserImage[]
|
|
teaserTitle?: string
|
|
teaserDescription?: string
|
|
row: Row[]
|
|
banner: Banner[]
|
|
id: string
|
|
title: string
|
|
aktiv: boolean
|
|
teaser: {
|
|
showTeaser: boolean
|
|
subTitle: string
|
|
teaserTitle: string
|
|
teaserDescription: string
|
|
}
|
|
meta: {
|
|
autor?: string
|
|
datum?: string
|
|
titel?: string
|
|
beschreibung?: string
|
|
keywords?: string
|
|
}
|
|
}
|
|
|
|
interface Row {
|
|
title: string
|
|
maxWidth: boolean
|
|
column: Column[]
|
|
noGap: boolean
|
|
iconBackgroundTitle: boolean
|
|
}
|
|
|
|
interface IconInfoBoard {
|
|
title: string
|
|
icon: FileField
|
|
text: string
|
|
}
|
|
|
|
interface Column {
|
|
contentType:
|
|
| "mainPicture"
|
|
| "googleMaps"
|
|
| "imageSlider"
|
|
| "table"
|
|
| "infoBoard"
|
|
| "iconBoard"
|
|
| "form"
|
|
| "image"
|
|
| "text"
|
|
| "iconInfoBoard"
|
|
| "boxlist"
|
|
| "productPreview"
|
|
|
|
showGoogleMaps?: boolean
|
|
video: FileField
|
|
titleVideo: string
|
|
descriptionVideo: string
|
|
mainPicture?: FileField
|
|
imageSlider: ImageSlider[]
|
|
siteRefs: boolean
|
|
siteReference: boolean
|
|
hintsTable: string
|
|
inscription?: string
|
|
textFieldHeading?: string
|
|
textContent?: string
|
|
annotation?: string
|
|
table?: Table[]
|
|
image?: FileField
|
|
title?: string
|
|
text?: string
|
|
links?: Link[]
|
|
iconBoard?: IconBoard[]
|
|
iconInfoBoard?: IconInfoBoard
|
|
backgroundImage?: FileField
|
|
videoSwitch?: VideoSwitch[]
|
|
formRows?: FormRow[]
|
|
iconBackgroundImage?: boolean
|
|
tableFieldHeading?: string
|
|
boxList: {
|
|
boxes: { name: string }[]
|
|
}
|
|
productPreview: {
|
|
image: FileField
|
|
title: string
|
|
text: string
|
|
price: string
|
|
}[]
|
|
}
|
|
|
|
interface ImageSlider {
|
|
image: FileField
|
|
}
|
|
|
|
interface Link {
|
|
name: string
|
|
site: string
|
|
}
|
|
|
|
interface Table {
|
|
title: string
|
|
tableRow: TableRow[]
|
|
hintsTable: string
|
|
}
|
|
|
|
interface TableRow {
|
|
bold: boolean
|
|
left: string
|
|
right: string
|
|
center: string
|
|
}
|
|
|
|
interface IconBoard {
|
|
icon: FileField
|
|
subText: string
|
|
}
|
|
|
|
interface VideoSwitch {
|
|
video: FileField
|
|
title: string
|
|
description: string
|
|
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 {
|
|
label: string
|
|
emailName: string
|
|
}
|
|
|
|
interface LabelNumber {
|
|
group: number
|
|
title: string
|
|
emailName: string
|
|
block: Block[]
|
|
}
|
|
|
|
interface FormColumn {
|
|
showLabelNumber: boolean
|
|
labelNumber: LabelNumber[]
|
|
showTimes?: boolean
|
|
annotation: string
|
|
times?: Time[]
|
|
timesPlaceholder?: string
|
|
showDate?: boolean
|
|
showSelect?: boolean
|
|
selectPlaceholder: string
|
|
selectEntries: Entries[]
|
|
datePlaceholder?: string
|
|
datefieldOrder?: number
|
|
textfieldOrder?: number
|
|
timesfieldOrder?: number
|
|
text?: TextField[]
|
|
title: string
|
|
selectTitle: string
|
|
numberPlaceholder: string
|
|
showNumber: boolean
|
|
timeNotRequired: boolean
|
|
dateNotRequired: boolean
|
|
dateSelectNotRequired: boolean
|
|
numberNotRequired: boolean
|
|
emailNameDate: string
|
|
emailNameNumber: string
|
|
emailNameTime: string
|
|
emailNameTimes: string
|
|
numberfieldOrder?: number
|
|
showCheckboxGroup: boolean
|
|
groupTitle: string
|
|
checkboxes: Checkbox[]
|
|
showDatePicker: boolean
|
|
datePickerNotRequired: boolean
|
|
datePickerProps: DatePickerProps
|
|
datePickerEmailTitle: string
|
|
showMultiSelect: boolean
|
|
multiSelectNotRequired: boolean
|
|
multiSelectPlaceholder: string
|
|
multiSelectEmailTitle: string
|
|
multiSelectOptions: MultiSelectOptions[]
|
|
multiSelectProps: {
|
|
additionalAddableValues: boolean
|
|
}
|
|
}
|
|
|
|
interface MultiSelectOptions {
|
|
name: string
|
|
}
|
|
|
|
interface CustomHTMLElement extends HTMLElement {
|
|
checked?: boolean
|
|
value?: any
|
|
required?: boolean
|
|
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>
|
|
}
|
|
|
|
interface Temperature {
|
|
temperature: number
|
|
}
|
|
|
|
interface Time {
|
|
timeFrom: string
|
|
timeTo: string
|
|
}
|
|
|
|
interface Entries {
|
|
leftSide: string
|
|
rightSide: string
|
|
}
|
|
|
|
interface TextField {
|
|
textPlaceholder: string
|
|
textArea: boolean
|
|
notRequired: boolean
|
|
telValidation: boolean
|
|
emailValidation: boolean
|
|
dateSelectNotRequired: boolean
|
|
emailName: string
|
|
textfieldOrder: string
|
|
textTitle: string
|
|
}
|
|
|
|
interface TeaserImage {
|
|
image: FileField
|
|
}
|
|
|
|
interface Banner {
|
|
content: string
|
|
}
|
|
|
|
interface Navigation {
|
|
tree: number
|
|
id: string
|
|
elemente: NavElement[]
|
|
}
|
|
|
|
interface NavElement {
|
|
endpoint: boolean
|
|
name: string
|
|
image: FileField
|
|
seite?: string
|
|
elemente?: NavElement[]
|
|
}
|
|
|
|
interface FileField {
|
|
path: string
|
|
src: string
|
|
type: string
|
|
}
|