@bexis2/bexis2-core-ui 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/TableView.svelte +1 -1
- package/dist/components/CodeEditor/CodeEditor.svelte +24 -12
- package/dist/components/CodeEditor/CodeEditor.svelte.d.ts +6 -3
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +11 -5
- package/dist/components/Table/TableFilter.svelte +2 -1
- package/dist/components/Table/TablePagination.svelte +6 -1
- package/dist/components/Table/TablePagination.svelte.d.ts +1 -0
- package/dist/components/file/FileIcon.svelte +45 -45
- package/dist/components/file/FileInfo.svelte +13 -13
- package/dist/components/form/Checkbox.svelte +13 -13
- package/dist/components/form/CheckboxKvPList.svelte +16 -16
- package/dist/components/form/CheckboxList.svelte +10 -10
- package/dist/components/form/DateInput.svelte +13 -13
- package/dist/components/form/DropdownKvP.svelte +54 -54
- package/dist/components/form/InputContainer.svelte +1 -1
- package/dist/components/form/MultiSelect.svelte +178 -178
- package/dist/components/form/NumberInput.svelte +14 -14
- package/dist/components/form/TextArea.svelte +13 -13
- package/dist/components/form/TextInput.svelte +14 -14
- package/dist/components/page/Alert.svelte +28 -28
- package/dist/components/page/BackToTop.svelte +30 -30
- package/dist/components/page/Docs.svelte +22 -22
- package/dist/components/page/ErrorMessage.svelte +8 -8
- package/dist/components/page/Footer.svelte +5 -5
- package/dist/components/page/Header.svelte +5 -5
- package/dist/components/page/HelpPopUp.svelte +30 -30
- package/dist/components/page/PageCaller.js +19 -19
- package/dist/components/page/Spinner.svelte +14 -14
- package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -19
- package/dist/components/page/menu/MenuDataCaller.js +10 -10
- package/dist/css/core.ui.postcss +17 -17
- package/dist/css/themes/theme-bexis2.css +96 -96
- package/dist/css/themes/theme-crimson.css +101 -101
- package/dist/css/themes/theme-gold-nouveau.css +140 -140
- package/dist/css/themes/theme-hamlindigo.css +112 -112
- package/dist/css/themes/theme-modern.css +127 -127
- package/dist/css/themes/theme-rocket.css +119 -119
- package/dist/css/themes/theme-sahara.css +128 -128
- package/dist/css/themes/theme-seafoam.css +122 -122
- package/dist/css/themes/theme-seasonal.css +115 -115
- package/dist/css/themes/theme-skeleton.css +118 -118
- package/dist/css/themes/theme-vintage.css +125 -125
- package/dist/services/BaseCaller.js +16 -16
- package/package.json +3 -2
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/CodeEditor/CodeEditor.svelte +25 -13
- package/src/lib/components/ListView.svelte +11 -11
- package/src/lib/components/Table/Table.svelte +11 -5
- package/src/lib/components/Table/TableFilter.svelte +2 -1
- package/src/lib/components/Table/TablePagination.svelte +6 -1
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/{File → file}/FileIcon.svelte +45 -45
- package/src/lib/components/{File → file}/FileInfo.svelte +13 -13
- package/src/lib/components/form/Checkbox.svelte +24 -24
- package/src/lib/components/form/CheckboxKvPList.svelte +29 -29
- package/src/lib/components/form/CheckboxList.svelte +21 -21
- package/src/lib/components/form/DateInput.svelte +25 -25
- package/src/lib/components/form/DropdownKvP.svelte +54 -54
- package/src/lib/components/form/InputContainer.svelte +1 -1
- package/src/lib/components/form/MultiSelect.svelte +178 -178
- package/src/lib/components/form/NumberInput.svelte +28 -28
- package/src/lib/components/form/TextArea.svelte +26 -26
- package/src/lib/components/form/TextInput.svelte +26 -26
- package/src/lib/components/page/Alert.svelte +41 -41
- package/src/lib/components/page/BackToTop.svelte +30 -30
- package/src/lib/components/page/Docs.svelte +46 -46
- package/src/lib/components/page/ErrorMessage.svelte +10 -10
- package/src/lib/components/page/Footer.svelte +18 -18
- package/src/lib/components/page/Header.svelte +18 -18
- package/src/lib/components/page/HelpPopUp.svelte +72 -72
- package/src/lib/components/page/PageCaller.js +19 -19
- package/src/lib/components/page/Spinner.svelte +20 -20
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +39 -39
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -10
- package/src/lib/css/core.ui.postcss +17 -17
- package/src/lib/css/themes/theme-bexis2.css +96 -96
- package/src/lib/css/themes/theme-crimson.css +101 -101
- package/src/lib/css/themes/theme-gold-nouveau.css +140 -140
- package/src/lib/css/themes/theme-hamlindigo.css +112 -112
- package/src/lib/css/themes/theme-modern.css +127 -127
- package/src/lib/css/themes/theme-rocket.css +119 -119
- package/src/lib/css/themes/theme-sahara.css +128 -128
- package/src/lib/css/themes/theme-seafoam.css +122 -122
- package/src/lib/css/themes/theme-seasonal.css +115 -115
- package/src/lib/css/themes/theme-skeleton.css +118 -118
- package/src/lib/css/themes/theme-vintage.css +125 -125
- package/src/lib/models/Page.ts +40 -40
- package/src/lib/services/Api.ts +55 -55
- package/src/lib/services/BaseCaller.js +16 -16
- package/src/lib/stores/apiStores.ts +31 -31
- /package/src/lib/components/{File → file}/FileUploader.svelte +0 -0
package/README.md
CHANGED
package/dist/TableView.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<h1>table</h1>
|
|
1
|
+
<h1>table</h1>
|
|
@@ -8,12 +8,14 @@ import { oneDark } from "@codemirror/theme-one-dark";
|
|
|
8
8
|
import { Modal, modalStore } from "@skeletonlabs/skeleton";
|
|
9
9
|
import { faMoon, faSave, faSun } from "@fortawesome/free-regular-svg-icons";
|
|
10
10
|
import { faArrowRotateLeft, faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
export let id;
|
|
11
12
|
export let title = "";
|
|
12
13
|
export let initialValue = "";
|
|
13
14
|
export let value = initialValue;
|
|
14
15
|
export let language = "html";
|
|
15
16
|
export let dark = true;
|
|
16
17
|
export let toggle = true;
|
|
18
|
+
export let actions = true;
|
|
17
19
|
export let styles = {
|
|
18
20
|
"&": {
|
|
19
21
|
borderRadius: "0.5rem",
|
|
@@ -33,10 +35,11 @@ const modal = {
|
|
|
33
35
|
</script>
|
|
34
36
|
|
|
35
37
|
<div class="items-center justify-center">
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
+
|
|
39
|
+
<h1 class="h1 font-semibold text-primary-500 mb-3" id="{id}-title">{title}</h1>
|
|
40
|
+
<slot id="{id}-description" />
|
|
38
41
|
<div class="grid gap-1 w-full h-full mt-5">
|
|
39
|
-
<div class="rounded-lg shadow-lg w-full">
|
|
42
|
+
<div class="rounded-lg shadow-lg w-full" id="{id}-editor">
|
|
40
43
|
<CodeMirror
|
|
41
44
|
bind:value
|
|
42
45
|
lang={language === 'html'
|
|
@@ -51,10 +54,12 @@ const modal = {
|
|
|
51
54
|
</div>
|
|
52
55
|
</div>
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
|
|
58
|
+
<div class="flex justify-between gap-2 items-center mt-3" id="{id}-footer">
|
|
55
59
|
<div class="flex gap-2">
|
|
56
60
|
<button
|
|
57
61
|
class="btn variant-filled-warning"
|
|
62
|
+
id="{id}-reset"
|
|
58
63
|
on:click|preventDefault={() => modalStore.trigger(modal)}
|
|
59
64
|
><Fa icon={faArrowRotateLeft} /></button
|
|
60
65
|
>{#if toggle}
|
|
@@ -62,6 +67,7 @@ const modal = {
|
|
|
62
67
|
class="btn border"
|
|
63
68
|
class:bg-slate-700={dark}
|
|
64
69
|
class:bg-white={!dark}
|
|
70
|
+
id="{id}-toggle"
|
|
65
71
|
on:click|preventDefault={() => (dark = !dark)}
|
|
66
72
|
>
|
|
67
73
|
{#if dark}
|
|
@@ -73,14 +79,20 @@ const modal = {
|
|
|
73
79
|
{/if}
|
|
74
80
|
</div>
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
{#if actions}
|
|
83
|
+
<div class="flex gap-2">
|
|
84
|
+
<button
|
|
85
|
+
class="btn variant-filled-warning"
|
|
86
|
+
id="{id}-cancel"
|
|
87
|
+
on:click|preventDefault={() => dispatch('cancel')}><Fa icon={faXmark} /></button
|
|
88
|
+
>
|
|
89
|
+
<button
|
|
90
|
+
class="btn variant-filled-primary"
|
|
91
|
+
id="{id}-save"
|
|
92
|
+
on:click|preventDefault={() => dispatch('save')}><Fa icon={faSave} /></button
|
|
93
|
+
>
|
|
94
|
+
</div>
|
|
95
|
+
{/if}
|
|
84
96
|
</div>
|
|
85
97
|
</div>
|
|
86
98
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { ThemeSpec } from 'svelte-codemirror-editor';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
4
|
+
id: string;
|
|
5
5
|
title?: string | undefined;
|
|
6
6
|
initialValue?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
language?: string | undefined;
|
|
9
9
|
dark?: boolean | undefined;
|
|
10
10
|
toggle?: boolean | undefined;
|
|
11
|
-
|
|
11
|
+
actions?: boolean | undefined;
|
|
12
|
+
styles?: any;
|
|
12
13
|
};
|
|
13
14
|
events: {
|
|
14
15
|
cancel: CustomEvent<any>;
|
|
@@ -17,7 +18,9 @@ declare const __propDef: {
|
|
|
17
18
|
[evt: string]: CustomEvent<any>;
|
|
18
19
|
};
|
|
19
20
|
slots: {
|
|
20
|
-
default: {
|
|
21
|
+
default: {
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
26
|
export type CodeEditorProps = typeof __propDef.props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>let result = { name: "david" };
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<h1>MyList</h1>
|
|
5
|
-
{result.name}
|
|
6
|
-
<b>from bexis-lib</b>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<h1>MyList</h1>
|
|
5
|
+
{result.name}
|
|
6
|
+
<b>from bexis-lib</b>
|
|
@@ -117,7 +117,7 @@ const tableColumns = [
|
|
|
117
117
|
if (optionsComponent !== void 0) {
|
|
118
118
|
tableColumns.push(
|
|
119
119
|
table.display({
|
|
120
|
-
id: "
|
|
120
|
+
id: "actionsColumn",
|
|
121
121
|
header: "",
|
|
122
122
|
cell: ({ row }, _) => {
|
|
123
123
|
return createRender(optionsComponent, {
|
|
@@ -141,6 +141,7 @@ const { filterValue } = pluginStates.tableFilter;
|
|
|
141
141
|
type="text"
|
|
142
142
|
bind:value={$filterValue}
|
|
143
143
|
placeholder="Search rows..."
|
|
144
|
+
id="{tableId}-search"
|
|
144
145
|
/>
|
|
145
146
|
{/if}
|
|
146
147
|
|
|
@@ -150,12 +151,17 @@ const { filterValue } = pluginStates.tableFilter;
|
|
|
150
151
|
active="bg-primary-500"
|
|
151
152
|
size="sm"
|
|
152
153
|
checked={fitToScreen}
|
|
154
|
+
id="{tableId}-toggle"
|
|
153
155
|
on:change={() => (fitToScreen = !fitToScreen)}>Fit to screen</SlideToggle
|
|
154
156
|
>
|
|
155
157
|
{/if}
|
|
156
158
|
|
|
157
159
|
<div class="overflow-auto" style="height: {height}px">
|
|
158
|
-
<table
|
|
160
|
+
<table
|
|
161
|
+
{...$tableAttrs}
|
|
162
|
+
class="table table-compact bg-tertiary-200 overflow-clip"
|
|
163
|
+
id="{tableId}-table"
|
|
164
|
+
>
|
|
159
165
|
<thead class={height != null ? `sticky top-0` : ''}>
|
|
160
166
|
{#each $headerRows as headerRow (headerRow.id)}
|
|
161
167
|
<Subscribe
|
|
@@ -208,10 +214,10 @@ const { filterValue } = pluginStates.tableFilter;
|
|
|
208
214
|
<tbody class="overflow-auto" {...$tableBodyAttrs}>
|
|
209
215
|
{#each $pageRows as row (row.id)}
|
|
210
216
|
<Subscribe rowAttrs={row.attrs()} let:rowAttrs>
|
|
211
|
-
<tr {...rowAttrs}>
|
|
217
|
+
<tr {...rowAttrs} id="{tableId}-row-{row.id}">
|
|
212
218
|
{#each row.cells as cell (cell?.id)}
|
|
213
219
|
<Subscribe attrs={cell.attrs()} let:attrs>
|
|
214
|
-
<td {...attrs} class="!p-2 w-max focus:resize">
|
|
220
|
+
<td {...attrs} class="!p-2 w-max focus:resize" id="{tableId}-{cell.id}-{row.id}">
|
|
215
221
|
<div
|
|
216
222
|
class="flex items-center h-max overflow-x-auto resize-none hover:resize"
|
|
217
223
|
class:max-w-md={!fitToScreen}
|
|
@@ -229,6 +235,6 @@ const { filterValue } = pluginStates.tableFilter;
|
|
|
229
235
|
</div>
|
|
230
236
|
</div>
|
|
231
237
|
{#if $data.length > 0}
|
|
232
|
-
<TablePagination pageConfig={pluginStates.page} {pageSizes} />
|
|
238
|
+
<TablePagination pageConfig={pluginStates.page} {pageSizes} id={tableId} />
|
|
233
239
|
{/if}
|
|
234
240
|
</div>
|
|
@@ -111,11 +111,12 @@ if (type === "object") {
|
|
|
111
111
|
class="btn w-max p-2"
|
|
112
112
|
type="button"
|
|
113
113
|
use:popup={popupFeatured}
|
|
114
|
+
id="{popupId}-button"
|
|
114
115
|
>
|
|
115
116
|
<Fa icon={faFilter} size="12" />
|
|
116
117
|
</button>
|
|
117
118
|
|
|
118
|
-
<div data-popup={`${popupId}`} class="z-50">
|
|
119
|
+
<div data-popup={`${popupId}`} id="{popupId}" class="z-50">
|
|
119
120
|
<div class="card p-3 grid gap-2 shadow-lg w-min bg-base-100">
|
|
120
121
|
<button
|
|
121
122
|
class="btn variant-filled-primary btn-sm"
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
export let pageConfig;
|
|
9
9
|
export let pageSizes;
|
|
10
|
+
export let id;
|
|
10
11
|
const { pageIndex, pageCount, pageSize, hasNextPage, hasPreviousPage } = pageConfig;
|
|
11
12
|
const goToFirstPage = () => $pageIndex = 0;
|
|
12
13
|
const goToLastPage = () => $pageIndex = $pageCount - 1;
|
|
@@ -27,18 +28,20 @@ $:
|
|
|
27
28
|
class="btn btn-sm variant-filled-primary"
|
|
28
29
|
on:click|preventDefault={goToFirstPage}
|
|
29
30
|
disabled={goToFirstPageDisabled}
|
|
31
|
+
id="{id}-first"
|
|
30
32
|
>
|
|
31
33
|
<Fa icon={faAnglesLeft} /></button
|
|
32
34
|
>
|
|
33
35
|
<button
|
|
34
36
|
class="btn btn-sm variant-filled-primary"
|
|
37
|
+
id="{id}-previous"
|
|
35
38
|
on:click|preventDefault={goToPreviousPage}
|
|
36
39
|
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
|
|
37
40
|
>
|
|
38
41
|
|
|
39
42
|
<select
|
|
40
43
|
name="pageSize"
|
|
41
|
-
id="pageSize"
|
|
44
|
+
id="{id}-pageSize"
|
|
42
45
|
class="select variant-filled-primary w-min font-bold"
|
|
43
46
|
bind:value={$pageSize}
|
|
44
47
|
>
|
|
@@ -49,11 +52,13 @@ $:
|
|
|
49
52
|
|
|
50
53
|
<button
|
|
51
54
|
class="btn btn-sm variant-filled-primary"
|
|
55
|
+
id="{id}-next"
|
|
52
56
|
on:click|preventDefault={goToNextPage}
|
|
53
57
|
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
|
|
54
58
|
>
|
|
55
59
|
<button
|
|
56
60
|
class="btn btn-sm variant-filled-primary"
|
|
61
|
+
id="{id}-last"
|
|
57
62
|
on:click|preventDefault={goToLastPage}
|
|
58
63
|
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button
|
|
59
64
|
>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Fa from 'svelte-fa';
|
|
3
|
-
import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
|
|
4
|
-
import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
|
|
5
|
-
import { faFileWord } from '@fortawesome/free-regular-svg-icons';
|
|
6
|
-
import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
|
|
7
|
-
import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
|
|
8
|
-
import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
|
|
9
|
-
import { faFileImage } from '@fortawesome/free-regular-svg-icons';
|
|
10
|
-
import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
|
|
11
|
-
|
|
12
|
-
export let type = '';
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
{#if type.includes('excel') || type.includes('spreadsheetml')}
|
|
16
|
-
<Fa icon={faFileExcel} />
|
|
17
|
-
{/if}
|
|
18
|
-
|
|
19
|
-
{#if type.includes('text')}
|
|
20
|
-
<Fa icon={faFileAlt} />
|
|
21
|
-
{/if}
|
|
22
|
-
|
|
23
|
-
{#if type.includes('image')}
|
|
24
|
-
<Fa icon={faFileImage} />
|
|
25
|
-
{/if}
|
|
26
|
-
|
|
27
|
-
{#if type.includes('audio')}
|
|
28
|
-
<Fa icon={faFileAudio} />
|
|
29
|
-
{/if}
|
|
30
|
-
|
|
31
|
-
{#if type.includes('video')}
|
|
32
|
-
<Fa icon={faFileVideo} />
|
|
33
|
-
{/if}
|
|
34
|
-
|
|
35
|
-
{#if type.includes('word')}
|
|
36
|
-
<Fa icon={faFileWord} />
|
|
37
|
-
{/if}
|
|
38
|
-
|
|
39
|
-
{#if type.includes('pdf')}
|
|
40
|
-
<Fa icon={faFilePdf} />
|
|
41
|
-
{/if}
|
|
42
|
-
|
|
43
|
-
{#if type.includes('zip')}
|
|
44
|
-
<Fa icon={faFileArchive} />
|
|
45
|
-
{/if}
|
|
1
|
+
<script>
|
|
2
|
+
import Fa from 'svelte-fa';
|
|
3
|
+
import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
|
|
4
|
+
import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
|
|
5
|
+
import { faFileWord } from '@fortawesome/free-regular-svg-icons';
|
|
6
|
+
import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
|
|
7
|
+
import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
|
|
8
|
+
import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
|
|
9
|
+
import { faFileImage } from '@fortawesome/free-regular-svg-icons';
|
|
10
|
+
import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
|
|
11
|
+
|
|
12
|
+
export let type = '';
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#if type.includes('excel') || type.includes('spreadsheetml')}
|
|
16
|
+
<Fa icon={faFileExcel} />
|
|
17
|
+
{/if}
|
|
18
|
+
|
|
19
|
+
{#if type.includes('text')}
|
|
20
|
+
<Fa icon={faFileAlt} />
|
|
21
|
+
{/if}
|
|
22
|
+
|
|
23
|
+
{#if type.includes('image')}
|
|
24
|
+
<Fa icon={faFileImage} />
|
|
25
|
+
{/if}
|
|
26
|
+
|
|
27
|
+
{#if type.includes('audio')}
|
|
28
|
+
<Fa icon={faFileAudio} />
|
|
29
|
+
{/if}
|
|
30
|
+
|
|
31
|
+
{#if type.includes('video')}
|
|
32
|
+
<Fa icon={faFileVideo} />
|
|
33
|
+
{/if}
|
|
34
|
+
|
|
35
|
+
{#if type.includes('word')}
|
|
36
|
+
<Fa icon={faFileWord} />
|
|
37
|
+
{/if}
|
|
38
|
+
|
|
39
|
+
{#if type.includes('pdf')}
|
|
40
|
+
<Fa icon={faFilePdf} />
|
|
41
|
+
{/if}
|
|
42
|
+
|
|
43
|
+
{#if type.includes('zip')}
|
|
44
|
+
<Fa icon={faFileArchive} />
|
|
45
|
+
{/if}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import FileIcon from './FileIcon.svelte';
|
|
3
|
-
|
|
4
|
-
export let name = '';
|
|
5
|
-
export let type = '';
|
|
6
|
-
// export let description;
|
|
7
|
-
export let size = '';
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<div style="font-size:{size}">
|
|
11
|
-
<FileIcon {type} />
|
|
12
|
-
{name}
|
|
13
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
import FileIcon from './FileIcon.svelte';
|
|
3
|
+
|
|
4
|
+
export let name = '';
|
|
5
|
+
export let type = '';
|
|
6
|
+
// export let description;
|
|
7
|
+
export let size = '';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div style="font-size:{size}">
|
|
11
|
+
<FileIcon {type} />
|
|
12
|
+
{name}
|
|
13
|
+
</div>
|
|
@@ -6,16 +6,16 @@ export let valid;
|
|
|
6
6
|
export let invalid;
|
|
7
7
|
export let required;
|
|
8
8
|
export let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<InputContainer {label} {feedback} {required}>
|
|
12
|
-
<input
|
|
13
|
-
{id}
|
|
14
|
-
class="input variant-form-material"
|
|
15
|
-
type="checkbox"
|
|
16
|
-
class:input-success={valid}
|
|
17
|
-
class:input-error={invalid}
|
|
18
|
-
bind:checked
|
|
19
|
-
on:input
|
|
20
|
-
/>
|
|
21
|
-
</InputContainer>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer {label} {feedback} {required}>
|
|
12
|
+
<input
|
|
13
|
+
{id}
|
|
14
|
+
class="input variant-form-material"
|
|
15
|
+
type="checkbox"
|
|
16
|
+
class:input-success={valid}
|
|
17
|
+
class:input-error={invalid}
|
|
18
|
+
bind:checked
|
|
19
|
+
on:input
|
|
20
|
+
/>
|
|
21
|
+
</InputContainer>
|
|
@@ -8,19 +8,19 @@ export let key;
|
|
|
8
8
|
export let help = false;
|
|
9
9
|
let required = false;
|
|
10
10
|
let feedback;
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
14
|
-
{#each source as item}
|
|
15
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
16
|
-
<input
|
|
17
|
-
class="checkbox"
|
|
18
|
-
type="checkbox"
|
|
19
|
-
bind:group={target}
|
|
20
|
-
checked={item.key}
|
|
21
|
-
value={item.key}
|
|
22
|
-
/>
|
|
23
|
-
<p>{item.value}</p>
|
|
24
|
-
</label>
|
|
25
|
-
{/each}
|
|
26
|
-
</InputContainer>
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
14
|
+
{#each source as item}
|
|
15
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
16
|
+
<input
|
|
17
|
+
class="checkbox"
|
|
18
|
+
type="checkbox"
|
|
19
|
+
bind:group={target}
|
|
20
|
+
checked={item.key}
|
|
21
|
+
value={item.key}
|
|
22
|
+
/>
|
|
23
|
+
<p>{item.value}</p>
|
|
24
|
+
</label>
|
|
25
|
+
{/each}
|
|
26
|
+
</InputContainer>
|
|
@@ -6,13 +6,13 @@ export let description = "";
|
|
|
6
6
|
export let key;
|
|
7
7
|
let required = false;
|
|
8
8
|
let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<InputContainer label={title} {feedback} {required}>
|
|
12
|
-
{#each source as item}
|
|
13
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
14
|
-
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
15
|
-
<p>{item}</p>
|
|
16
|
-
</label>
|
|
17
|
-
{/each}
|
|
18
|
-
</InputContainer>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer label={title} {feedback} {required}>
|
|
12
|
+
{#each source as item}
|
|
13
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
14
|
+
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
15
|
+
<p>{item}</p>
|
|
16
|
+
</label>
|
|
17
|
+
{/each}
|
|
18
|
+
</InputContainer>
|
|
@@ -7,16 +7,16 @@ export let invalid = false;
|
|
|
7
7
|
export let required = false;
|
|
8
8
|
export let feedback = [""];
|
|
9
9
|
export let help = false;
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
13
|
-
<input
|
|
14
|
-
{id}
|
|
15
|
-
class="input variant-form-material"
|
|
16
|
-
type="date"
|
|
17
|
-
class:input-success={valid}
|
|
18
|
-
class:input-error={invalid}
|
|
19
|
-
bind:value
|
|
20
|
-
on:input
|
|
21
|
-
/>
|
|
22
|
-
</InputContainer>
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
13
|
+
<input
|
|
14
|
+
{id}
|
|
15
|
+
class="input variant-form-material"
|
|
16
|
+
type="date"
|
|
17
|
+
class:input-success={valid}
|
|
18
|
+
class:input-error={invalid}
|
|
19
|
+
bind:value
|
|
20
|
+
on:input
|
|
21
|
+
/>
|
|
22
|
+
</InputContainer>
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import InputContainer from './InputContainer.svelte';
|
|
3
|
-
|
|
4
|
-
export let id;
|
|
5
|
-
export let source;
|
|
6
|
-
export let target;
|
|
7
|
-
export let title;
|
|
8
|
-
export let valid = false;
|
|
9
|
-
export let invalid = false;
|
|
10
|
-
export let feedback = [''];
|
|
11
|
-
export let required = false;
|
|
12
|
-
export let complexTarget = false;
|
|
13
|
-
export let help = false;
|
|
14
|
-
|
|
15
|
-
$: selected = null;
|
|
16
|
-
|
|
17
|
-
$: updatedSelectedValue(target);
|
|
18
|
-
$: updatedTarget(selected);
|
|
19
|
-
|
|
20
|
-
function updatedSelectedValue(selection) {
|
|
21
|
-
if (selection != null) {
|
|
22
|
-
if (complexTarget) {
|
|
23
|
-
selected = selection.id;
|
|
24
|
-
} else {
|
|
25
|
-
selected = selection;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function updatedTarget(id) {
|
|
31
|
-
if (complexTarget) {
|
|
32
|
-
target = source.find((opt) => opt.id === id);
|
|
33
|
-
} else {
|
|
34
|
-
target = id;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
|
-
<select
|
|
41
|
-
{id}
|
|
42
|
-
class="select variant-form-material"
|
|
43
|
-
class:input-success={valid}
|
|
44
|
-
class:input-error={invalid}
|
|
45
|
-
bind:value={selected}
|
|
46
|
-
on:change
|
|
47
|
-
on:select
|
|
48
|
-
>
|
|
49
|
-
<option value={null}>-- Please select --</option>
|
|
50
|
-
{#each source as e}
|
|
51
|
-
<option value={e.id}>{e.text}</option>
|
|
52
|
-
{/each}
|
|
53
|
-
</select>
|
|
54
|
-
</InputContainer>
|
|
1
|
+
<script>
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id;
|
|
5
|
+
export let source;
|
|
6
|
+
export let target;
|
|
7
|
+
export let title;
|
|
8
|
+
export let valid = false;
|
|
9
|
+
export let invalid = false;
|
|
10
|
+
export let feedback = [''];
|
|
11
|
+
export let required = false;
|
|
12
|
+
export let complexTarget = false;
|
|
13
|
+
export let help = false;
|
|
14
|
+
|
|
15
|
+
$: selected = null;
|
|
16
|
+
|
|
17
|
+
$: updatedSelectedValue(target);
|
|
18
|
+
$: updatedTarget(selected);
|
|
19
|
+
|
|
20
|
+
function updatedSelectedValue(selection) {
|
|
21
|
+
if (selection != null) {
|
|
22
|
+
if (complexTarget) {
|
|
23
|
+
selected = selection.id;
|
|
24
|
+
} else {
|
|
25
|
+
selected = selection;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function updatedTarget(id) {
|
|
31
|
+
if (complexTarget) {
|
|
32
|
+
target = source.find((opt) => opt.id === id);
|
|
33
|
+
} else {
|
|
34
|
+
target = id;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
|
+
<select
|
|
41
|
+
{id}
|
|
42
|
+
class="select variant-form-material"
|
|
43
|
+
class:input-success={valid}
|
|
44
|
+
class:input-error={invalid}
|
|
45
|
+
bind:value={selected}
|
|
46
|
+
on:change
|
|
47
|
+
on:select
|
|
48
|
+
>
|
|
49
|
+
<option value={null}>-- Please select --</option>
|
|
50
|
+
{#each source as e}
|
|
51
|
+
<option value={e.id}>{e.text}</option>
|
|
52
|
+
{/each}
|
|
53
|
+
</select>
|
|
54
|
+
</InputContainer>
|