@bexis2/bexis2-core-ui 0.3.1 → 0.3.3
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 +14 -1
- package/dist/TableView.svelte +1 -1
- package/dist/components/File/FileIcon.svelte +45 -45
- package/dist/components/File/FileInfo.svelte +13 -13
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +165 -100
- package/dist/components/Table/TableFilter.svelte +1 -0
- 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 +14 -14
- package/dist/components/form/DropdownKvP.svelte +54 -54
- package/dist/components/form/NumberInput.svelte +15 -15
- package/dist/components/form/TextArea.svelte +14 -14
- package/dist/components/form/TextInput.svelte +15 -15
- 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/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/models/Models.d.ts +2 -0
- package/dist/services/BaseCaller.js +16 -16
- package/dist/stores/pageStores.js +1 -1
- package/dist/themes/theme-bexis2.js +104 -91
- package/package.json +2 -2
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/CodeEditor/CodeEditor.svelte +1 -1
- package/src/lib/components/ListView.svelte +11 -11
- package/src/lib/components/Table/Table.svelte +198 -125
- package/src/lib/components/Table/TableFilter.svelte +7 -3
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/file/FileIcon.svelte +45 -45
- package/src/lib/components/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 +27 -27
- package/src/lib/components/form/DropdownKvP.svelte +54 -54
- package/src/lib/components/form/NumberInput.svelte +30 -30
- package/src/lib/components/form/TextArea.svelte +28 -28
- package/src/lib/components/form/TextInput.svelte +28 -28
- 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/Notification.svelte +42 -47
- package/src/lib/components/page/Page.svelte +0 -1
- package/src/lib/components/page/PageCaller.js +19 -19
- package/src/lib/components/page/Spinner.svelte +20 -20
- 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/index.ts +1 -1
- package/src/lib/models/Models.ts +6 -4
- 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 +34 -34
- package/src/lib/stores/pageStores.ts +3 -3
- package/src/lib/themes/theme-bexis2.ts +107 -96
|
@@ -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>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import InputContainer from './InputContainer.svelte';
|
|
3
|
-
import { helpStore } from '$store/pageStores';
|
|
4
|
-
|
|
5
|
-
export let id: string = '';
|
|
6
|
-
export let label: string = '';
|
|
7
|
-
export let value: string = '';
|
|
8
|
-
|
|
9
|
-
export let valid: boolean = false;
|
|
10
|
-
export let invalid: boolean = false;
|
|
11
|
-
export let required: boolean = false;
|
|
12
|
-
export let feedback: string[] = [''];
|
|
13
|
-
export let placeholder: string = '';
|
|
14
|
-
export let help: boolean = false;
|
|
15
|
-
export let disabled: boolean = false;
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
19
|
-
<input
|
|
20
|
-
{id}
|
|
21
|
-
class="input variant-form-material"
|
|
22
|
-
type="number"
|
|
23
|
-
class:input-success={valid}
|
|
24
|
-
class:input-error={invalid}
|
|
25
|
-
bind:value
|
|
26
|
-
on:input
|
|
27
|
-
{placeholder}
|
|
28
|
-
{disabled}
|
|
29
|
-
/>
|
|
30
|
-
</InputContainer>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
import { helpStore } from '$store/pageStores';
|
|
4
|
+
|
|
5
|
+
export let id: string = '';
|
|
6
|
+
export let label: string = '';
|
|
7
|
+
export let value: string = '';
|
|
8
|
+
|
|
9
|
+
export let valid: boolean = false;
|
|
10
|
+
export let invalid: boolean = false;
|
|
11
|
+
export let required: boolean = false;
|
|
12
|
+
export let feedback: string[] = [''];
|
|
13
|
+
export let placeholder: string = '';
|
|
14
|
+
export let help: boolean = false;
|
|
15
|
+
export let disabled: boolean = false;
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
19
|
+
<input
|
|
20
|
+
{id}
|
|
21
|
+
class="input variant-form-material"
|
|
22
|
+
type="number"
|
|
23
|
+
class:input-success={valid}
|
|
24
|
+
class:input-error={invalid}
|
|
25
|
+
bind:value
|
|
26
|
+
on:input
|
|
27
|
+
{placeholder}
|
|
28
|
+
{disabled}
|
|
29
|
+
/>
|
|
30
|
+
</InputContainer>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import InputContainer from './InputContainer.svelte';
|
|
3
|
-
|
|
4
|
-
export let id: string = '';
|
|
5
|
-
export let label: string = '';
|
|
6
|
-
export let value: string = '';
|
|
7
|
-
|
|
8
|
-
export let valid: boolean = false;
|
|
9
|
-
export let invalid: boolean = false;
|
|
10
|
-
export let required: boolean = false;
|
|
11
|
-
export let feedback: string[] = [''];
|
|
12
|
-
export let placeholder: string = '';
|
|
13
|
-
export let help: boolean = false;
|
|
14
|
-
export let disabled: boolean = false;
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
18
|
-
<textarea
|
|
19
|
-
{id}
|
|
20
|
-
class="textarea variant-form-material"
|
|
21
|
-
class:input-success={valid}
|
|
22
|
-
class:input-error={invalid}
|
|
23
|
-
bind:value
|
|
24
|
-
on:input
|
|
25
|
-
{placeholder}
|
|
26
|
-
{disabled}
|
|
27
|
-
/>
|
|
28
|
-
</InputContainer>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let value: string = '';
|
|
7
|
+
|
|
8
|
+
export let valid: boolean = false;
|
|
9
|
+
export let invalid: boolean = false;
|
|
10
|
+
export let required: boolean = false;
|
|
11
|
+
export let feedback: string[] = [''];
|
|
12
|
+
export let placeholder: string = '';
|
|
13
|
+
export let help: boolean = false;
|
|
14
|
+
export let disabled: boolean = false;
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
18
|
+
<textarea
|
|
19
|
+
{id}
|
|
20
|
+
class="textarea variant-form-material"
|
|
21
|
+
class:input-success={valid}
|
|
22
|
+
class:input-error={invalid}
|
|
23
|
+
bind:value
|
|
24
|
+
on:input
|
|
25
|
+
{placeholder}
|
|
26
|
+
{disabled}
|
|
27
|
+
/>
|
|
28
|
+
</InputContainer>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import InputContainer from './InputContainer.svelte';
|
|
3
|
-
|
|
4
|
-
export let id: string = '';
|
|
5
|
-
export let label: string = '';
|
|
6
|
-
export let value: string = '';
|
|
7
|
-
export let valid: boolean = false;
|
|
8
|
-
export let invalid: boolean = false;
|
|
9
|
-
export let required: boolean = false;
|
|
10
|
-
export let feedback: string[] = [''];
|
|
11
|
-
export let placeholder: string = '';
|
|
12
|
-
export let help: boolean = false;
|
|
13
|
-
export let disabled: boolean = false;
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
17
|
-
<input
|
|
18
|
-
{id}
|
|
19
|
-
class="input variant-form-material"
|
|
20
|
-
type="text"
|
|
21
|
-
class:input-success={valid}
|
|
22
|
-
class:input-error={invalid}
|
|
23
|
-
bind:value
|
|
24
|
-
on:input
|
|
25
|
-
{placeholder}
|
|
26
|
-
{disabled}
|
|
27
|
-
/>
|
|
28
|
-
</InputContainer>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let value: string = '';
|
|
7
|
+
export let valid: boolean = false;
|
|
8
|
+
export let invalid: boolean = false;
|
|
9
|
+
export let required: boolean = false;
|
|
10
|
+
export let feedback: string[] = [''];
|
|
11
|
+
export let placeholder: string = '';
|
|
12
|
+
export let help: boolean = false;
|
|
13
|
+
export let disabled: boolean = false;
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
17
|
+
<input
|
|
18
|
+
{id}
|
|
19
|
+
class="input variant-form-material"
|
|
20
|
+
type="text"
|
|
21
|
+
class:input-success={valid}
|
|
22
|
+
class:input-error={invalid}
|
|
23
|
+
bind:value
|
|
24
|
+
on:input
|
|
25
|
+
{placeholder}
|
|
26
|
+
{disabled}
|
|
27
|
+
/>
|
|
28
|
+
</InputContainer>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Fa from 'svelte-fa';
|
|
3
|
-
|
|
4
|
-
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
|
|
6
|
-
import { fade } from 'svelte/transition';
|
|
7
|
-
|
|
8
|
-
export let title: string = '';
|
|
9
|
-
export let message: string = '';
|
|
10
|
-
export let cssClass: string = '';
|
|
11
|
-
export let deleteBtn: boolean = true;
|
|
12
|
-
|
|
13
|
-
$: show = true;
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
{#if show}
|
|
17
|
-
<aside class="alert {cssClass}" transition:fade|local={{ duration: 100 }}>
|
|
18
|
-
<!-- Icon -->
|
|
19
|
-
<!-- <div>(icon)</div> -->
|
|
20
|
-
<!-- Message -->
|
|
21
|
-
<div class="alert-message">
|
|
22
|
-
{#if title}
|
|
23
|
-
<h3 class="h3">{title}</h3>
|
|
24
|
-
{/if}
|
|
25
|
-
<p>
|
|
26
|
-
{message}
|
|
27
|
-
<slot />
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
<!-- Actions -->
|
|
31
|
-
<div class="alert-actions">
|
|
32
|
-
<slot name="actions" />
|
|
33
|
-
|
|
34
|
-
{#if deleteBtn}
|
|
35
|
-
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
|
|
36
|
-
<Fa icon={faXmark} />
|
|
37
|
-
</button>
|
|
38
|
-
{/if}
|
|
39
|
-
</div>
|
|
40
|
-
</aside>
|
|
41
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Fa from 'svelte-fa';
|
|
3
|
+
|
|
4
|
+
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
import { fade } from 'svelte/transition';
|
|
7
|
+
|
|
8
|
+
export let title: string = '';
|
|
9
|
+
export let message: string = '';
|
|
10
|
+
export let cssClass: string = '';
|
|
11
|
+
export let deleteBtn: boolean = true;
|
|
12
|
+
|
|
13
|
+
$: show = true;
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if show}
|
|
17
|
+
<aside class="alert {cssClass}" transition:fade|local={{ duration: 100 }}>
|
|
18
|
+
<!-- Icon -->
|
|
19
|
+
<!-- <div>(icon)</div> -->
|
|
20
|
+
<!-- Message -->
|
|
21
|
+
<div class="alert-message">
|
|
22
|
+
{#if title}
|
|
23
|
+
<h3 class="h3">{title}</h3>
|
|
24
|
+
{/if}
|
|
25
|
+
<p>
|
|
26
|
+
{message}
|
|
27
|
+
<slot />
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
<!-- Actions -->
|
|
31
|
+
<div class="alert-actions">
|
|
32
|
+
<slot name="actions" />
|
|
33
|
+
|
|
34
|
+
{#if deleteBtn}
|
|
35
|
+
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
|
|
36
|
+
<Fa icon={faXmark} />
|
|
37
|
+
</button>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
</aside>
|
|
41
|
+
{/if}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let showOnPx = 150;
|
|
3
|
-
let hidden = true;
|
|
4
|
-
|
|
5
|
-
function goTop() {
|
|
6
|
-
document.body.scrollIntoView();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function scrollContainer() {
|
|
10
|
-
return document.documentElement || document.body;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function handleOnScroll() {
|
|
14
|
-
if (!scrollContainer()) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (scrollContainer().scrollTop > showOnPx) {
|
|
19
|
-
hidden = false;
|
|
20
|
-
} else {
|
|
21
|
-
hidden = true;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<svelte:window on:scroll={handleOnScroll} />
|
|
27
|
-
|
|
28
|
-
<div class="w-full items-center">
|
|
29
|
-
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
|
|
30
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
export let showOnPx = 150;
|
|
3
|
+
let hidden = true;
|
|
4
|
+
|
|
5
|
+
function goTop() {
|
|
6
|
+
document.body.scrollIntoView();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function scrollContainer() {
|
|
10
|
+
return document.documentElement || document.body;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleOnScroll() {
|
|
14
|
+
if (!scrollContainer()) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (scrollContainer().scrollTop > showOnPx) {
|
|
19
|
+
hidden = false;
|
|
20
|
+
} else {
|
|
21
|
+
hidden = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<svelte:window on:scroll={handleOnScroll} />
|
|
27
|
+
|
|
28
|
+
<div class="w-full items-center">
|
|
29
|
+
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
|
|
30
|
+
</div>
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Fa from 'svelte-fa/src/fa.svelte';
|
|
3
|
-
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import { goTo } from '$services/BaseCaller';
|
|
5
|
-
|
|
6
|
-
// links
|
|
7
|
-
import type { linkType } from '$lib/models/Models';
|
|
8
|
-
export let links: linkType[] = [];
|
|
9
|
-
|
|
10
|
-
// popup for note
|
|
11
|
-
import { popup } from '@skeletonlabs/skeleton';
|
|
12
|
-
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
13
|
-
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
14
|
-
import { storePopup } from '@skeletonlabs/skeleton';
|
|
15
|
-
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
16
|
-
|
|
17
|
-
export let note: string;
|
|
18
|
-
|
|
19
|
-
//popup
|
|
20
|
-
const noteSettings: PopupSettings = {
|
|
21
|
-
event: 'click',
|
|
22
|
-
target: 'noteTarget',
|
|
23
|
-
placement: 'bottom'
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<div class="text-right p-2">
|
|
28
|
-
{#if note}
|
|
29
|
-
<span class="chip variant-soft hover:variant-filled" use:popup={noteSettings}>
|
|
30
|
-
<span><Fa icon={faQuestion} /></span>
|
|
31
|
-
</span>
|
|
32
|
-
|
|
33
|
-
<div
|
|
34
|
-
class="card p-4 variant-filled-primary w-60 z-50 text-left shadow-md"
|
|
35
|
-
data-popup="noteTarget"
|
|
36
|
-
>
|
|
37
|
-
{note}
|
|
38
|
-
</div>
|
|
39
|
-
{/if}
|
|
40
|
-
|
|
41
|
-
{#each links as link}
|
|
42
|
-
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
43
|
-
<span>{link.label}</span>
|
|
44
|
-
</span>
|
|
45
|
-
{/each}
|
|
46
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
3
|
+
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import { goTo } from '$services/BaseCaller';
|
|
5
|
+
|
|
6
|
+
// links
|
|
7
|
+
import type { linkType } from '$lib/models/Models';
|
|
8
|
+
export let links: linkType[] = [];
|
|
9
|
+
|
|
10
|
+
// popup for note
|
|
11
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
12
|
+
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
13
|
+
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
14
|
+
import { storePopup } from '@skeletonlabs/skeleton';
|
|
15
|
+
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
16
|
+
|
|
17
|
+
export let note: string;
|
|
18
|
+
|
|
19
|
+
//popup
|
|
20
|
+
const noteSettings: PopupSettings = {
|
|
21
|
+
event: 'click',
|
|
22
|
+
target: 'noteTarget',
|
|
23
|
+
placement: 'bottom'
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class="text-right p-2">
|
|
28
|
+
{#if note}
|
|
29
|
+
<span class="chip variant-soft hover:variant-filled" use:popup={noteSettings}>
|
|
30
|
+
<span><Fa icon={faQuestion} /></span>
|
|
31
|
+
</span>
|
|
32
|
+
|
|
33
|
+
<div
|
|
34
|
+
class="card p-4 variant-filled-primary w-60 z-50 text-left shadow-md"
|
|
35
|
+
data-popup="noteTarget"
|
|
36
|
+
>
|
|
37
|
+
{note}
|
|
38
|
+
</div>
|
|
39
|
+
{/if}
|
|
40
|
+
|
|
41
|
+
{#each links as link}
|
|
42
|
+
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
43
|
+
<span>{link.label}</span>
|
|
44
|
+
</span>
|
|
45
|
+
{/each}
|
|
46
|
+
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let error: Error;
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="card bg-error-300 border-solid border-2 border-error-500 shadow-md max-w-md">
|
|
6
|
-
<div class="p-5 space-y-4">
|
|
7
|
-
<h3 class="h3">{error.name}</h3>
|
|
8
|
-
<p>{error.message}</p>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let error: Error;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="card bg-error-300 border-solid border-2 border-error-500 shadow-md max-w-md">
|
|
6
|
+
<div class="p-5 space-y-4">
|
|
7
|
+
<h3 class="h3">{error.name}</h3>
|
|
8
|
+
<p>{error.message}</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { onMount } from 'svelte';
|
|
3
|
-
import { getFooter } from './PageCaller';
|
|
4
|
-
|
|
5
|
-
let content: string = '';
|
|
6
|
-
$: content;
|
|
7
|
-
|
|
8
|
-
onMount(async () => {
|
|
9
|
-
console.log('footer');
|
|
10
|
-
|
|
11
|
-
content = await getFooter();
|
|
12
|
-
console.log(content);
|
|
13
|
-
});
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
{#if content != undefined}
|
|
17
|
-
{@html content}
|
|
18
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { getFooter } from './PageCaller';
|
|
4
|
+
|
|
5
|
+
let content: string = '';
|
|
6
|
+
$: content;
|
|
7
|
+
|
|
8
|
+
onMount(async () => {
|
|
9
|
+
console.log('footer');
|
|
10
|
+
|
|
11
|
+
content = await getFooter();
|
|
12
|
+
console.log(content);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if content != undefined}
|
|
17
|
+
{@html content}
|
|
18
|
+
{/if}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { onMount } from 'svelte';
|
|
3
|
-
import { getHeader } from './PageCaller';
|
|
4
|
-
|
|
5
|
-
let content: string = '';
|
|
6
|
-
$: content;
|
|
7
|
-
|
|
8
|
-
onMount(async () => {
|
|
9
|
-
console.log('header');
|
|
10
|
-
|
|
11
|
-
content = await getHeader();
|
|
12
|
-
console.log(content);
|
|
13
|
-
});
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
{#if content != undefined}
|
|
17
|
-
{@html content}
|
|
18
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { getHeader } from './PageCaller';
|
|
4
|
+
|
|
5
|
+
let content: string = '';
|
|
6
|
+
$: content;
|
|
7
|
+
|
|
8
|
+
onMount(async () => {
|
|
9
|
+
console.log('header');
|
|
10
|
+
|
|
11
|
+
content = await getHeader();
|
|
12
|
+
console.log(content);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if content != undefined}
|
|
17
|
+
{@html content}
|
|
18
|
+
{/if}
|