@bexis2/bexis2-core-ui 0.2.29 → 0.2.30
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 -2
- package/dist/TableView.svelte +1 -1
- package/dist/components/{file → File}/FileIcon.svelte +45 -45
- package/{src/lib/components/file → dist/components/File}/FileInfo.svelte +13 -13
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +17 -2
- package/dist/components/Table/TableFilter.svelte +13 -6
- 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/MultiSelect.svelte +181 -181
- 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/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/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/models/Models.d.ts +3 -3
- package/dist/services/BaseCaller.js +16 -16
- package/package.json +1 -1
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/{file → File}/FileIcon.svelte +45 -45
- package/{dist/components/file → src/lib/components/File}/FileInfo.svelte +13 -13
- package/src/lib/components/ListView.svelte +11 -11
- package/src/lib/components/Table/Table.svelte +19 -3
- package/src/lib/components/Table/TableFilter.svelte +15 -6
- package/src/lib/components/Table/filter.ts +141 -141
- 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/MultiSelect.svelte +181 -181
- 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/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/index.ts +3 -3
- package/src/lib/models/Models.ts +3 -3
- 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/dist/components/{file → File}/FileIcon.svelte.d.ts +0 -0
- /package/dist/components/{file → File}/FileInfo.svelte.d.ts +0 -0
- /package/dist/components/{file → File}/FileUploader.svelte +0 -0
- /package/dist/components/{file → File}/FileUploader.svelte.d.ts +0 -0
- /package/src/lib/components/{file → File}/FileUploader.svelte +0 -0
|
@@ -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}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { helpStore } from '$store/pageStores';
|
|
3
|
-
import type { helpItemType, helpStoreType } from '$models/Models';
|
|
4
|
-
import Fa from 'svelte-fa/src/fa.svelte';
|
|
5
|
-
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
-
|
|
7
|
-
//popup
|
|
8
|
-
import { popup } from '@skeletonlabs/skeleton';
|
|
9
|
-
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
10
|
-
//import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
11
|
-
//import { storePopup } from '@skeletonlabs/skeleton';
|
|
12
|
-
import delay from 'delay';
|
|
13
|
-
|
|
14
|
-
export let active: boolean = false;
|
|
15
|
-
|
|
16
|
-
let hs: helpStoreType;
|
|
17
|
-
$: helpStore.subscribe((value) => {
|
|
18
|
-
hs = value;
|
|
19
|
-
});
|
|
20
|
-
let helpItem: helpItemType = { id: undefined, name: '', description: '' };
|
|
21
|
-
$: helpItem =
|
|
22
|
-
active === true
|
|
23
|
-
? hs.itemId == ''
|
|
24
|
-
? { id: undefined, name: '', description: '' }
|
|
25
|
-
: hs.helpItems.find((h) => h.id === hs.itemId)!
|
|
26
|
-
: { id: undefined, name: '', description: '' };
|
|
27
|
-
|
|
28
|
-
const helpClick: PopupSettings = {
|
|
29
|
-
event: 'click',
|
|
30
|
-
target: 'helpTarget',
|
|
31
|
-
placement: 'top',
|
|
32
|
-
state: (s) => {
|
|
33
|
-
if (s != true) {
|
|
34
|
-
resetItemId();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
async function resetItemId() {
|
|
40
|
-
await delay(100);
|
|
41
|
-
helpStore.resetItemId();
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
{#if active}
|
|
46
|
-
<button
|
|
47
|
-
id="helpButton"
|
|
48
|
-
class="chip variant-filled-warning fixed bottom-5 right-10 shadow-md"
|
|
49
|
-
use:popup={helpClick}><Fa icon={faQuestion} /></button
|
|
50
|
-
>
|
|
51
|
-
|
|
52
|
-
<div
|
|
53
|
-
class="card bg-primary-300 border-solid border-2 border-primary-500 shadow-md"
|
|
54
|
-
data-popup="helpTarget"
|
|
55
|
-
>
|
|
56
|
-
{#if helpItem && helpItem.id}
|
|
57
|
-
<div class="p-5 w-96 space-y-4" id={'helpPopup.' + helpItem.id}>
|
|
58
|
-
<h3 class="h3">{helpItem.name}</h3>
|
|
59
|
-
<p>{@html helpItem.description}</p>
|
|
60
|
-
{#if helpItem.link}
|
|
61
|
-
<p><a class="anchor" href={helpItem.link}>... read more</a></p>
|
|
62
|
-
{/if}
|
|
63
|
-
</div>
|
|
64
|
-
{:else}
|
|
65
|
-
<div class="p-5 w-96 space-y-4" id="helpPopup">
|
|
66
|
-
<h3 class="h3">Help</h3>
|
|
67
|
-
<p>Hover over the Element, you like to know more about.</p>
|
|
68
|
-
</div>
|
|
69
|
-
{/if}
|
|
70
|
-
<div class="arrow variant-filled-primary" />
|
|
71
|
-
</div>
|
|
72
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { helpStore } from '$store/pageStores';
|
|
3
|
+
import type { helpItemType, helpStoreType } from '$models/Models';
|
|
4
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
5
|
+
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
+
|
|
7
|
+
//popup
|
|
8
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
9
|
+
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
10
|
+
//import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
11
|
+
//import { storePopup } from '@skeletonlabs/skeleton';
|
|
12
|
+
import delay from 'delay';
|
|
13
|
+
|
|
14
|
+
export let active: boolean = false;
|
|
15
|
+
|
|
16
|
+
let hs: helpStoreType;
|
|
17
|
+
$: helpStore.subscribe((value) => {
|
|
18
|
+
hs = value;
|
|
19
|
+
});
|
|
20
|
+
let helpItem: helpItemType = { id: undefined, name: '', description: '' };
|
|
21
|
+
$: helpItem =
|
|
22
|
+
active === true
|
|
23
|
+
? hs.itemId == ''
|
|
24
|
+
? { id: undefined, name: '', description: '' }
|
|
25
|
+
: hs.helpItems.find((h) => h.id === hs.itemId)!
|
|
26
|
+
: { id: undefined, name: '', description: '' };
|
|
27
|
+
|
|
28
|
+
const helpClick: PopupSettings = {
|
|
29
|
+
event: 'click',
|
|
30
|
+
target: 'helpTarget',
|
|
31
|
+
placement: 'top',
|
|
32
|
+
state: (s) => {
|
|
33
|
+
if (s != true) {
|
|
34
|
+
resetItemId();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
async function resetItemId() {
|
|
40
|
+
await delay(100);
|
|
41
|
+
helpStore.resetItemId();
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
{#if active}
|
|
46
|
+
<button
|
|
47
|
+
id="helpButton"
|
|
48
|
+
class="chip variant-filled-warning fixed bottom-5 right-10 shadow-md"
|
|
49
|
+
use:popup={helpClick}><Fa icon={faQuestion} /></button
|
|
50
|
+
>
|
|
51
|
+
|
|
52
|
+
<div
|
|
53
|
+
class="card bg-primary-300 border-solid border-2 border-primary-500 shadow-md"
|
|
54
|
+
data-popup="helpTarget"
|
|
55
|
+
>
|
|
56
|
+
{#if helpItem && helpItem.id}
|
|
57
|
+
<div class="p-5 w-96 space-y-4" id={'helpPopup.' + helpItem.id}>
|
|
58
|
+
<h3 class="h3">{helpItem.name}</h3>
|
|
59
|
+
<p>{@html helpItem.description}</p>
|
|
60
|
+
{#if helpItem.link}
|
|
61
|
+
<p><a class="anchor" href={helpItem.link}>... read more</a></p>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
{:else}
|
|
65
|
+
<div class="p-5 w-96 space-y-4" id="helpPopup">
|
|
66
|
+
<h3 class="h3">Help</h3>
|
|
67
|
+
<p>Hover over the Element, you like to know more about.</p>
|
|
68
|
+
</div>
|
|
69
|
+
{/if}
|
|
70
|
+
<div class="arrow variant-filled-primary" />
|
|
71
|
+
</div>
|
|
72
|
+
{/if}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Api } from '$lib/services/Api';
|
|
2
|
-
|
|
3
|
-
export const getFooter = async () => {
|
|
4
|
-
try {
|
|
5
|
-
const response = await Api.get('/footer');
|
|
6
|
-
return response.data;
|
|
7
|
-
} catch (error) {
|
|
8
|
-
console.error(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const getHeader = async () => {
|
|
13
|
-
try {
|
|
14
|
-
const response = await Api.get('/header');
|
|
15
|
-
return response.data;
|
|
16
|
-
} catch (error) {
|
|
17
|
-
console.error(error);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
1
|
+
import { Api } from '$lib/services/Api';
|
|
2
|
+
|
|
3
|
+
export const getFooter = async () => {
|
|
4
|
+
try {
|
|
5
|
+
const response = await Api.get('/footer');
|
|
6
|
+
return response.data;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.error(error);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const getHeader = async () => {
|
|
13
|
+
try {
|
|
14
|
+
const response = await Api.get('/header');
|
|
15
|
+
return response.data;
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error(error);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { positionType } from '$lib/models/Enums';
|
|
3
|
-
|
|
4
|
-
export let textCss = 'text-surface-600';
|
|
5
|
-
export let label = '';
|
|
6
|
-
export let position: positionType = positionType.center;
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2 {textCss}">
|
|
10
|
-
<div
|
|
11
|
-
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
12
|
-
role="status"
|
|
13
|
-
>
|
|
14
|
-
<span
|
|
15
|
-
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
16
|
-
>Loading...</span
|
|
17
|
-
>
|
|
18
|
-
</div>
|
|
19
|
-
<span>{label}</span>
|
|
20
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { positionType } from '$lib/models/Enums';
|
|
3
|
+
|
|
4
|
+
export let textCss = 'text-surface-600';
|
|
5
|
+
export let label = '';
|
|
6
|
+
export let position: positionType = positionType.center;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2 {textCss}">
|
|
10
|
+
<div
|
|
11
|
+
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
12
|
+
role="status"
|
|
13
|
+
>
|
|
14
|
+
<span
|
|
15
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
16
|
+
>Loading...</span
|
|
17
|
+
>
|
|
18
|
+
</div>
|
|
19
|
+
<span>{label}</span>
|
|
20
|
+
</div>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { breadcrumbStore } from '$store/pageStores';
|
|
3
|
-
import type { breadcrumbItemType } from '$models/Page';
|
|
4
|
-
|
|
5
|
-
export let title;
|
|
6
|
-
|
|
7
|
-
$:update(title)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function update(t)
|
|
11
|
-
{
|
|
12
|
-
breadcrumbStore.updateItem({ label: t, link: window.location.pathname });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
let list: breadcrumbItemType[] = [];
|
|
16
|
-
$: list;
|
|
17
|
-
|
|
18
|
-
$: breadcrumbStore.subscribe((value) => {
|
|
19
|
-
list = value?.items;
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div class="px-5 py-2">
|
|
24
|
-
<ol class="breadcrumb -p50">
|
|
25
|
-
<!--default home-->
|
|
26
|
-
<li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
|
|
27
|
-
<li class="crumb-separator" aria-hidden>›</li>
|
|
28
|
-
|
|
29
|
-
{#each list as crumb, i}
|
|
30
|
-
<!-- If crumb index is less than the breadcrumb length minus 1 -->
|
|
31
|
-
{#if i < list.length - 1}
|
|
32
|
-
<li class="crumb"><a class="anchor" href={crumb.link}>{crumb.label}</a></li>
|
|
33
|
-
<li class="crumb-separator" aria-hidden>›</li>
|
|
34
|
-
{:else}
|
|
35
|
-
<li class="crumb">{crumb.label}</li>
|
|
36
|
-
{/if}
|
|
37
|
-
{/each}
|
|
38
|
-
</ol>
|
|
39
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { breadcrumbStore } from '$store/pageStores';
|
|
3
|
+
import type { breadcrumbItemType } from '$models/Page';
|
|
4
|
+
|
|
5
|
+
export let title;
|
|
6
|
+
|
|
7
|
+
$:update(title)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function update(t)
|
|
11
|
+
{
|
|
12
|
+
breadcrumbStore.updateItem({ label: t, link: window.location.pathname });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let list: breadcrumbItemType[] = [];
|
|
16
|
+
$: list;
|
|
17
|
+
|
|
18
|
+
$: breadcrumbStore.subscribe((value) => {
|
|
19
|
+
list = value?.items;
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div class="px-5 py-2">
|
|
24
|
+
<ol class="breadcrumb -p50">
|
|
25
|
+
<!--default home-->
|
|
26
|
+
<li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
|
|
27
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
28
|
+
|
|
29
|
+
{#each list as crumb, i}
|
|
30
|
+
<!-- If crumb index is less than the breadcrumb length minus 1 -->
|
|
31
|
+
{#if i < list.length - 1}
|
|
32
|
+
<li class="crumb"><a class="anchor" href={crumb.link}>{crumb.label}</a></li>
|
|
33
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
34
|
+
{:else}
|
|
35
|
+
<li class="crumb">{crumb.label}</li>
|
|
36
|
+
{/if}
|
|
37
|
+
{/each}
|
|
38
|
+
</ol>
|
|
39
|
+
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Api } from '$lib/services/Api';
|
|
2
|
-
|
|
3
|
-
export const getMenuItems = async () => {
|
|
4
|
-
try {
|
|
5
|
-
const response = await Api.get('/menu');
|
|
6
|
-
return response.data;
|
|
7
|
-
} catch (error) {
|
|
8
|
-
console.error(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
1
|
+
import { Api } from '$lib/services/Api';
|
|
2
|
+
|
|
3
|
+
export const getMenuItems = async () => {
|
|
4
|
+
try {
|
|
5
|
+
const response = await Api.get('/menu');
|
|
6
|
+
return response.data;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.error(error);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*place global styles here */
|
|
2
|
-
html,
|
|
3
|
-
body {
|
|
4
|
-
@apply h-full;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
h1 {
|
|
8
|
-
@apply text-primary-500;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:root {
|
|
12
|
-
--background: rgb(var(--color-surface-200));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[type='text']:focus {
|
|
16
|
-
--tw-ring-color: #00000;
|
|
17
|
-
}
|
|
1
|
+
/*place global styles here */
|
|
2
|
+
html,
|
|
3
|
+
body {
|
|
4
|
+
@apply h-full;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
h1 {
|
|
8
|
+
@apply text-primary-500;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
--background: rgb(var(--color-surface-200));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[type='text']:focus {
|
|
16
|
+
--tw-ring-color: #00000;
|
|
17
|
+
}
|