initial public commit

This commit is contained in:
Gani Georgiev
2022-07-07 00:19:05 +03:00
commit 3d07f0211d
484 changed files with 92412 additions and 0 deletions
@@ -0,0 +1,22 @@
<script>
import { SchemaField } from "pocketbase";
import CommonHelper from "@/utils/CommonHelper";
import Field from "@/components/base/Field.svelte";
export let field = new SchemaField();
export let value = undefined;
$: if (typeof value !== "undefined" && typeof value !== "string" && value !== null) {
// the JSON field support both js primitives and encoded JSON string
// so we are normalizing the value to only a string
value = JSON.stringify(value, null, 2);
}
</script>
<Field class="form-field {field.required ? 'required' : ''}" name={field.name} let:uniqueId>
<label for={uniqueId}>
<i class={CommonHelper.getFieldTypeIcon(field.type)} />
<span class="txt">{field.name}</span>
</label>
<textarea id={uniqueId} required={field.required} class="txt-mono txt-sm" bind:value />
</Field>