2023-12-17 18:15:59 +00:00
|
|
|
import { AnyTypedQuizQuestion } from "@model/questionTypes/shared";
|
2023-12-18 01:29:22 +00:00
|
|
|
// import { QuizConfig } from "@model/quizSettings";
|
|
|
|
|
|
|
|
export type QuizStartpageType = "standard" | "expanded" | "centered" | null;
|
|
|
|
|
|
|
|
export type QuizStartpageAlignType = "left" | "right" | "center";
|
|
|
|
|
|
|
|
export type QuizType = "quiz" | "form";
|
|
|
|
|
|
|
|
export type QuizResultsType = true | null;
|
|
|
|
|
|
|
|
export type QuizResultInfoWhen = 'before' | 'after' | 'email';
|
|
|
|
|
|
|
|
export type FCField = {
|
|
|
|
text: string
|
|
|
|
innerText: string
|
|
|
|
key: string
|
|
|
|
required: boolean
|
|
|
|
used: boolean
|
|
|
|
}
|
|
|
|
export interface GetDataResponse {
|
|
|
|
cnt: number;
|
|
|
|
settings: {
|
|
|
|
fp: boolean;
|
|
|
|
rep: boolean;
|
|
|
|
name: string;
|
|
|
|
cfg: string;
|
|
|
|
lim: number;
|
|
|
|
due: number;
|
|
|
|
delay: number;
|
|
|
|
pausable: boolean;
|
|
|
|
};
|
|
|
|
items: GetItems[];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-17 18:15:59 +00:00
|
|
|
|
|
|
|
export type QuestionsStore = {
|
|
|
|
items: (AnyTypedQuizQuestion)[];
|
|
|
|
settings: Settings;
|
|
|
|
cnt: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export interface Settings {
|
|
|
|
|
2023-12-18 01:29:22 +00:00
|
|
|
fp: boolean;
|
|
|
|
rep: boolean;
|
|
|
|
name: string;
|
|
|
|
lim: number;
|
|
|
|
due: number;
|
|
|
|
delay: number;
|
|
|
|
pausable: boolean;
|
2023-12-17 18:15:59 +00:00
|
|
|
cfg: QuizConfig
|
2023-12-18 01:29:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface QuizConfig {
|
|
|
|
type: QuizType;
|
|
|
|
noStartPage: boolean;
|
|
|
|
startpageType: QuizStartpageType;
|
|
|
|
results: QuizResultsType;
|
|
|
|
haveRoot: string;
|
2023-12-29 00:58:19 +00:00
|
|
|
theme: "StandardTheme" | "StandardDarkTheme" | "PinkTheme" | "PinkDarkTheme" | "BlackWhiteTheme" | "OliveTheme" | "YellowTheme" | "GoldDarkTheme" | "PurpleTheme" | "BlueTheme" | "BlueDarkTheme";
|
2023-12-18 01:29:22 +00:00
|
|
|
resultInfo: {
|
|
|
|
when: QuizResultInfoWhen;
|
|
|
|
share: boolean;
|
|
|
|
replay: boolean;
|
|
|
|
theme: string;
|
|
|
|
reply: string;
|
|
|
|
replname: string;
|
|
|
|
};
|
|
|
|
startpage: {
|
|
|
|
description: string;
|
|
|
|
button: string;
|
|
|
|
position: QuizStartpageAlignType;
|
|
|
|
favIcon: string | null;
|
|
|
|
logo: string | null;
|
|
|
|
originalLogo: string | null;
|
|
|
|
background: {
|
|
|
|
type: null | "image" | "video";
|
|
|
|
desktop: string | null;
|
|
|
|
originalDesktop: string | null;
|
|
|
|
mobile: string | null;
|
|
|
|
originalMobile: string | null;
|
|
|
|
video: string | null;
|
|
|
|
cycle: boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
formContact: {
|
|
|
|
title: string;
|
|
|
|
desc: string;
|
|
|
|
name: FCField;
|
|
|
|
email: FCField;
|
|
|
|
phone: FCField;
|
|
|
|
text: FCField;
|
|
|
|
address: FCField;
|
|
|
|
button: string
|
|
|
|
};
|
|
|
|
info: {
|
|
|
|
phonenumber: string;
|
|
|
|
clickable: boolean;
|
|
|
|
orgname: string;
|
|
|
|
site: string;
|
|
|
|
law?: string;
|
|
|
|
};
|
|
|
|
meta: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GetItems {
|
|
|
|
id: number;
|
|
|
|
title: string;
|
|
|
|
desc: string;
|
|
|
|
typ: string;
|
|
|
|
req: boolean;
|
|
|
|
p: number;
|
|
|
|
c: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface QuizItems {
|
|
|
|
|
|
|
|
description: string;
|
|
|
|
id: number;
|
|
|
|
page: number;
|
|
|
|
required: boolean;
|
|
|
|
title: string;
|
|
|
|
type: string;
|
|
|
|
content: QuizItemsContent
|
|
|
|
}
|
|
|
|
export interface QuizItemsContent {
|
|
|
|
|
2023-12-17 18:15:59 +00:00
|
|
|
}
|