diff --git a/db.kv b/db.kv
new file mode 100644
index 0000000..9a47220
Binary files /dev/null and b/db.kv differ
diff --git a/db.kv-shm b/db.kv-shm
new file mode 100644
index 0000000..a1eba0a
Binary files /dev/null and b/db.kv-shm differ
diff --git a/db.kv-wal b/db.kv-wal
new file mode 100644
index 0000000..a90e8b2
Binary files /dev/null and b/db.kv-wal differ
diff --git a/src/lib/components/form/form.svelte b/src/lib/components/form/form.svelte
index cf1889d..5551bbe 100644
--- a/src/lib/components/form/form.svelte
+++ b/src/lib/components/form/form.svelte
@@ -121,13 +121,6 @@
font-weight: 400;
}
- :global(.Question-Header) {
- font-size: 13px;
- font-weight: bold;
- margin-bottom: 10px;
- font-family: 'Poppins';
- }
-
:global(.question) {
padding: 20px 15px;
width: calc(100% - 30px);
diff --git a/src/lib/components/form_editor/form_editor.svelte b/src/lib/components/form_editor/form_editor.svelte
index 96eb30d..5d2e1d4 100644
--- a/src/lib/components/form_editor/form_editor.svelte
+++ b/src/lib/components/form_editor/form_editor.svelte
@@ -1,14 +1,25 @@
diff --git a/src/lib/components/form_editor/question_input_editor/question_input_editor.svelte b/src/lib/components/form_editor/question_input_editor/question_input_editor.svelte
index f40e9bf..cdcddce 100644
--- a/src/lib/components/form_editor/question_input_editor/question_input_editor.svelte
+++ b/src/lib/components/form_editor/question_input_editor/question_input_editor.svelte
@@ -1,11 +1,53 @@
+
+
+
+ {#if $$props.type === QuestionType.BOOLEAN}
+
+ {:else if $$props.type === QuestionType.COLOR}
+
+ {:else if $$props.type === QuestionType.NUMBER}
+
+ {:else if $$props.type === QuestionType.TEXT}
+
+ {:else if $$props.type === QuestionType.TEXTAREA}
+
+ {:else if $$props.type === QuestionType.DATE}
+
+ {:else if $$props.type === QuestionType.DATETIME}
+
+ {:else if $$props.type === QuestionType.TIME}
+
+
+ {:else if $$props.type === QuestionType.SELECT}
+
+ {/if}
+
diff --git a/src/lib/components/form_editor/question_list_editor/add_item.svelte b/src/lib/components/form_editor/question_list_editor/add_item.svelte
index b52fea6..2ef8229 100644
--- a/src/lib/components/form_editor/question_list_editor/add_item.svelte
+++ b/src/lib/components/form_editor/question_list_editor/add_item.svelte
@@ -6,9 +6,11 @@
let type = QuestionType.TEXT;
- function add() {
+ function add(e: MouseEvent) {
+ e.preventDefault();
+ const data = { type };
// TODO: Add a helper function to create a blank question object for each type.
- addAction({ type });
+ addAction(data);
}
// function makeDefault(type: QuestionType): Question {
diff --git a/src/lib/components/list_input/list_input.svelte b/src/lib/components/list_input/list_input.svelte
index c65a1f7..b21cd32 100644
--- a/src/lib/components/list_input/list_input.svelte
+++ b/src/lib/components/list_input/list_input.svelte
@@ -5,11 +5,11 @@
export let value: ItemProps[] = [];
function deleteItem(i: number): void {
- value.splice(i, 1);
+ value = value.filter((_, index) => index !== i);
}
function addItem(item: ItemProps): void {
- value.push(item);
+ value = [...value, item];
}
// TODO: Make sortable items.
diff --git a/src/lib/components/questions/availability/availability_question_input.svelte b/src/lib/components/questions/availability/availability_question_input.svelte
index 7203350..0058a20 100644
--- a/src/lib/components/questions/availability/availability_question_input.svelte
+++ b/src/lib/components/questions/availability/availability_question_input.svelte
@@ -1,7 +1,7 @@