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/package-lock.json b/package-lock.json
index 224ca26..7d2d92e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,11 +11,13 @@
"@deno/kv": "^0.7.0",
"discord-api-types": "^0.37.67",
"export-to-csv": "^1.2.2",
+ "sortablejs": "^1.15.2",
"ulid": "^2.3.0"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
+ "@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.28.0",
@@ -786,6 +788,12 @@
"integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==",
"dev": true
},
+ "node_modules/@types/sortablejs": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.8.tgz",
+ "integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==",
+ "dev": true
+ },
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz",
@@ -2748,6 +2756,11 @@
"sorcery": "bin/sorcery"
}
},
+ "node_modules/sortablejs": {
+ "version": "1.15.2",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.2.tgz",
+ "integrity": "sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA=="
+ },
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
@@ -3656,6 +3669,12 @@
"integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==",
"dev": true
},
+ "@types/sortablejs": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.8.tgz",
+ "integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==",
+ "dev": true
+ },
"@typescript-eslint/eslint-plugin": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz",
@@ -5018,6 +5037,11 @@
"sander": "^0.5.0"
}
},
+ "sortablejs": {
+ "version": "1.15.2",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.2.tgz",
+ "integrity": "sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA=="
+ },
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
diff --git a/package.json b/package.json
index a5541ec..1c3c58c 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
+ "@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.28.0",
@@ -33,6 +34,7 @@
"@deno/kv": "^0.7.0",
"discord-api-types": "^0.37.67",
"export-to-csv": "^1.2.2",
+ "sortablejs": "^1.15.2",
"ulid": "^2.3.0"
}
}
diff --git a/src/lib/components/form/form.svelte b/src/lib/components/form/form.svelte
index cf1889d..e41aba6 100644
--- a/src/lib/components/form/form.svelte
+++ b/src/lib/components/form/form.svelte
@@ -1,11 +1,11 @@
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..08d6d2c 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,52 @@
+
+
+
+ {#if data.type === QuestionType.BOOLEAN}
+
+ {:else if data.type === QuestionType.COLOR}
+
+ {:else if data.type === QuestionType.NUMBER}
+
+ {:else if data.type === QuestionType.TEXT}
+
+ {:else if data.type === QuestionType.TEXTAREA}
+
+ {:else if data.type === QuestionType.DATE}
+
+ {:else if data.type === QuestionType.DATETIME}
+
+ {:else if data.type === QuestionType.TIME}
+
+ {:else if data.type === QuestionType.RADIO_GROUP}
+
+ {:else if data.type === QuestionType.AVAILABILITY}
+
+ {:else if data.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..9fbd6ce 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
@@ -1,14 +1,15 @@
+
+
+
+
+
diff --git a/src/lib/components/form_editor/question_list_editor/question_list_editor.svelte b/src/lib/components/form_editor/question_list_editor/question_list_editor.svelte
index c3714d8..b4df14e 100644
--- a/src/lib/components/form_editor/question_list_editor/question_list_editor.svelte
+++ b/src/lib/components/form_editor/question_list_editor/question_list_editor.svelte
@@ -10,12 +10,12 @@
export let value: QuestionList;
-
+/> -->
diff --git a/src/lib/components/list_input/list_input.svelte b/src/lib/components/list_input/list_input.svelte
index c65a1f7..a6ad3b6 100644
--- a/src/lib/components/list_input/list_input.svelte
+++ b/src/lib/components/list_input/list_input.svelte
@@ -1,30 +1,89 @@
-
- {#each value as item, i}
-
-
- deleteItem(i)} />
-
- {:else}
- {#if components.emptySection}
-
- {/if}
- {/each}
-
addItem(item)} />
-
+{#if value.length > 0}
+
+ {#each value as item, i}
+ -
+
+
+
+
+
+
+
+
+ {#if item.content}
+ {item.content}
+ {:else}
+ Untitled
+ {/if}
+
+ {#if item.value}
+ {item.value}
+ {:else}
+ No value found
+ {/if}
+
+ {item.type}
+
+
+ deleteItem(i)} />
+
+
+ {/each}
+
+{:else if components.emptySection}
+
+{/if}
+
+ addItem(item)} />
+
+
diff --git a/src/lib/components/list_input/list_input.ts b/src/lib/components/list_input/list_input.ts
index 259d0d0..db841ed 100644
--- a/src/lib/components/list_input/list_input.ts
+++ b/src/lib/components/list_input/list_input.ts
@@ -1,6 +1,6 @@
import type { ComponentType, SvelteComponent } from 'svelte';
-export type ItemProps = object;
+export type ItemProps = Record;
export interface AddItemProps {
addAction(item: ItemProps): void;
diff --git a/src/lib/components/question_input/question_input.svelte b/src/lib/components/question_input/question_input.svelte
index e5bf2bd..e28f718 100644
--- a/src/lib/components/question_input/question_input.svelte
+++ b/src/lib/components/question_input/question_input.svelte
@@ -11,6 +11,7 @@
import TextareaQuestionInput from '$lib/components/questions/textarea/textarea_question_input.svelte';
import TimeQuestionInput from '$lib/components/questions/time/time_question_input.svelte';
import SelectQuestionInput from '$lib/components/questions/select/select_question_input.svelte';
+ import TimezoneQuestionInput from '../questions/timezone/timezone_question_input.svelte';
@@ -36,6 +37,8 @@
{:else if $$props.type === QuestionType.SELECT}
+ {:else if $$props.type === QuestionType.TIMEZONE}
+
{/if}
diff --git a/src/lib/components/questions/availability/availability_question_input.svelte b/src/lib/components/questions/availability/availability_question_input.svelte
index 7203350..76bc343 100644
--- a/src/lib/components/questions/availability/availability_question_input.svelte
+++ b/src/lib/components/questions/availability/availability_question_input.svelte
@@ -1,13 +1,18 @@