-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96d9545
commit 1897656
Showing
24 changed files
with
144 additions
and
1,528 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script context="module"> | ||
import {Story} from '@storybook/addon-svelte-csf' | ||
import RecordSearch from './RecordSearch.svelte'; | ||
import Record from './Record.svelte'; | ||
import { getNewDB } from "./db.js"; | ||
export const meta = { | ||
title : "BeanBagDB", | ||
} | ||
let data = {}, schema = {}; // Initialize schema and data with default values | ||
// Load schema asynchronously | ||
(async () => { | ||
let BBDB = getNewDB({ | ||
"name": "test_story", | ||
"encryption_key": "qwerty3232323233uiop123456" | ||
}); | ||
await BBDB.ready(); | ||
let sample = await BBDB.get("schema", { name: "schema" }); | ||
schema = sample; | ||
console.log(schema); | ||
})(); | ||
</script> | ||
|
||
<Story name="Record Search 1"> | ||
<RecordSearch></RecordSearch> | ||
</Story> | ||
|
||
|
||
<Story name="Schema record"> | ||
<Record {schema} {data}></Record> | ||
</Story> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is just a place holder component |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
Media record | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<script context="module"> | ||
// import {Story} from '@storybook/addon-svelte-csf' | ||
import ImageEditor from './ImageEditor.svelte'; | ||
import JsonEditor from './JsonEditor.svelte'; | ||
export const meta = { | ||
title : "Utility Components", | ||
//component : ImageEditor | ||
} | ||
</script> | ||
|
||
<script> | ||
import { Story, Template } from '@storybook/addon-svelte-csf'; | ||
let test_image = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAwAB/irp/wAAAABJRU5ErkJggg==` | ||
let data = { | ||
"name":"John Doe", | ||
"city":"Erlangen", | ||
"country":"Germany", | ||
"age":100, | ||
"is_alien":true | ||
} | ||
let schema = { | ||
title:"Living being", | ||
properties : { | ||
"name":{ | ||
"type":"string" | ||
}, | ||
"city":{ | ||
"type":"string" | ||
}, | ||
"country":{ | ||
"type":"string" | ||
}, | ||
"age":{ | ||
type:"number" | ||
}, | ||
"is_alien":{ | ||
type:"boolean" | ||
} | ||
} | ||
} | ||
let obj_obj = { | ||
"type": "object", | ||
"patternProperties": { | ||
"^.*$": { | ||
"type": "object", | ||
"properties": { | ||
"text": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["text"] | ||
} | ||
}, | ||
"additionalProperties": true | ||
} | ||
</script> | ||
|
||
|
||
<Story name="JSONSchema Editor - missing schema"> | ||
<JsonEditor data={data}></JsonEditor> | ||
</Story> | ||
|
||
<Story name="JSONSchema Editor - missing data"> | ||
Shows a blank form based on the schema : | ||
<JsonEditor schema={schema}></JsonEditor> | ||
</Story> | ||
|
||
<Story name="JSONSchema Editor - Simple"> | ||
<JsonEditor data={data} schema={schema}></JsonEditor> | ||
</Story> | ||
|
||
<Story name="JSONSchema Editor - Object of object"> | ||
<JsonEditor data={{"t":{"text":"hahaha"}}} schema={obj_obj}></JsonEditor> | ||
</Story> | ||
|
||
|
||
<Story name="Image Editor 1"> | ||
<ImageEditor bind:base64Image={test_image} /> | ||
<code> | ||
{test_image} | ||
</code> | ||
</Story> | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<script> | ||
import WorkSpace from "$lib/WorkSpace.stories.svelte"; | ||
import WorkSpace from "$lib/ui/WorkSpace.stories.svelte"; | ||
</script> | ||
<WorkSpace></WorkSpace> |