wm-AllKids-tibi2023/types/global.d.ts

294 lines
5.5 KiB
TypeScript
Raw Normal View History

2023-09-17 13:24:39 +02:00
interface Sites {
[key: string]: Site
}
interface Site {
path: string
showTeaser: boolean
teaserImages?: TeaserImage[]
teaserTitle?: string
teaserDescription?: string
row: Row[]
banner: Banner[]
id: string
2023-09-18 19:31:11 +02:00
title: string
aktiv: boolean
teaser: {
showTeaser: boolean
subTitle: string
teaserTitle: string
teaserDescription: string
}
meta: {
autor?: string
datum?: string
titel?: string
beschreibung?: string
keywords?: string
}
2023-09-17 13:24:39 +02:00
}
interface Row {
title: string
maxWidth: boolean
column: Column[]
noGap: boolean
iconBackgroundTitle: boolean
}
2023-09-18 19:31:11 +02:00
interface IconInfoBoard {
title: string
icon: FileField
text: string
}
2023-09-17 13:24:39 +02:00
interface Column {
contentType:
| "mainPicture"
| "googleMaps"
| "imageSlider"
| "table"
| "infoBoard"
| "iconBoard"
| "form"
2023-09-18 19:31:11 +02:00
| "image"
2023-09-17 13:24:39 +02:00
| "text"
2023-09-18 19:31:11 +02:00
| "iconInfoBoard"
| "boxlist"
| "productPreview"
showGoogleMaps?: boolean
2023-09-17 13:24:39 +02:00
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[]
2023-09-18 19:31:11 +02:00
iconInfoBoard?: IconInfoBoard
2023-09-17 13:24:39 +02:00
backgroundImage?: FileField
videoSwitch?: VideoSwitch[]
formRows?: FormRow[]
iconBackgroundImage?: boolean
2023-09-18 19:31:11 +02:00
tableFieldHeading?: string
boxList: {
boxes: { name: string }[]
}
productPreview: {
image: FileField
title: string
text: string
price: string
}[]
2023-09-17 13:24:39 +02:00
}
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
}
2023-09-24 11:38:03 +02:00
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]
2023-09-17 13:24:39 +02:00
interface FormRow {
title?: string
2023-09-18 19:31:11 +02:00
rowName: string
2023-09-17 13:24:39 +02:00
columns: FormColumn[]
2023-09-24 11:38:03 +02:00
showRowName: boolean
2023-09-17 13:24:39 +02:00
}
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
2023-09-18 19:31:11 +02:00
numberfieldOrder?: number
2023-09-24 11:38:03 +02:00
showCheckboxGroup: boolean
groupTitle: string
checkboxes: Checkbox[]
showDatePicker: boolean
datePickerNotRequired: boolean
datePickerProps: DatePickerProps
datePickerEmailTitle: string
2023-09-18 19:31:11 +02:00
}
2023-09-24 11:38:03 +02:00
2023-09-18 19:31:11 +02:00
interface CustomHTMLElement extends HTMLElement {
checked?: boolean
value?: any
required?: boolean
getAttribute(attr: string): string | null
}
2023-09-24 11:38:03 +02:00
interface DatePickerProps {
allowedDateRanges: {
from: string
to: string
}[]
excludeDays: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"
}
2023-09-18 19:31:11 +02:00
interface FormValues {
[key: string]: CustomHTMLElement
blockGroups?: Set<number>
2023-09-17 13:24:39 +02:00
}
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
2023-09-18 19:31:11 +02:00
textfieldOrder: string
2023-09-24 11:38:03 +02:00
textTitle: string
2023-09-17 13:24:39 +02:00
}
interface TeaserImage {
image: FileField
}
interface Banner {
content: string
}
interface Navigation {
tree: number
2023-09-18 19:31:11 +02:00
id: string
2023-09-17 13:24:39 +02:00
elemente: NavElement[]
}
interface NavElement {
endpoint: boolean
name: string
image: FileField
seite?: string
elemente?: NavElement[]
}
interface FileField {
path: string
src: string
type: string
}