@bexis2/bexis2-core-ui 0.2.10 → 0.2.12
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 +263 -207
- package/dist/components/Table/Table.svelte +85 -85
- package/dist/components/Table/TableFilter.svelte +109 -109
- package/dist/components/Table/TablePagination.svelte +38 -38
- package/dist/components/file/FileUploader.svelte +34 -34
- package/dist/components/form/Checkbox.svelte.d.ts +1 -1
- package/dist/components/form/DropdownKvP.svelte +5 -11
- package/dist/components/form/InputContainer.svelte +20 -19
- package/dist/components/form/MultiSelect.svelte +163 -178
- package/dist/components/form/TextArea.svelte +13 -13
- package/dist/components/form/TextInput.svelte +0 -2
- package/dist/components/page/Alert.svelte +28 -30
- package/dist/components/page/BackToTop.svelte +30 -30
- package/dist/components/page/Docs.svelte +22 -19
- package/dist/components/page/Docs.svelte.d.ts +1 -1
- package/dist/components/page/ErrorMessage.svelte +9 -0
- package/dist/components/page/ErrorMessage.svelte.d.ts +16 -0
- package/dist/components/page/Footer.svelte +5 -5
- package/dist/components/page/Header.svelte +5 -4
- package/dist/components/page/HelpPopUp.svelte +31 -25
- package/dist/components/page/HelpPopUp.svelte.d.ts +5 -12
- package/dist/components/page/Page.svelte +56 -66
- package/dist/components/page/Page.svelte.d.ts +2 -2
- package/dist/components/page/PageCaller.js +19 -21
- package/dist/components/page/Spinner.svelte +12 -13
- package/dist/components/page/Spinner.svelte.d.ts +1 -1
- package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -23
- package/dist/components/page/menu/Menu.svelte +25 -25
- package/dist/components/page/menu/MenuBar.svelte +7 -14
- package/dist/components/page/menu/MenuBar.svelte.d.ts +2 -2
- package/dist/components/page/menu/MenuDataCaller.js +10 -11
- package/dist/components/page/menu/MenuItem.svelte +9 -13
- package/dist/components/page/menu/MenuItem.svelte.d.ts +2 -1
- package/dist/components/page/menu/MenuSublist.svelte +18 -17
- package/dist/components/page/menu/MenuSublist.svelte.d.ts +2 -2
- package/dist/components/page/menu/SettingsBar.svelte +9 -14
- package/dist/components/page/menu/SettingsBar.svelte.d.ts +2 -2
- package/dist/css/core.ui.postcss +10 -7
- package/dist/css/themes/theme-bexis2.css +12 -13
- package/dist/index.d.ts +2 -3
- package/dist/index.js +5 -4
- package/dist/models/Models.js +0 -1
- package/dist/models/Page.d.ts +31 -0
- package/dist/services/BaseCaller.js +16 -21
- package/dist/stores/pageStores.d.ts +4 -4
- package/dist/stores/pageStores.js +27 -27
- package/package.json +2 -2
- package/src/lib/components/Table/Table.svelte +246 -246
- package/src/lib/components/Table/TableFilter.svelte +222 -222
- package/src/lib/components/Table/TablePagination.svelte +61 -61
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/file/FileUploader.svelte +184 -184
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/DateInput.svelte +0 -1
- package/src/lib/components/form/DropdownKvP.svelte +5 -11
- package/src/lib/components/form/InputContainer.svelte +36 -44
- package/src/lib/components/form/MultiSelect.svelte +163 -178
- package/src/lib/components/form/NumberInput.svelte +3 -5
- package/src/lib/components/form/TextArea.svelte +26 -27
- package/src/lib/components/form/TextInput.svelte +2 -5
- package/src/lib/components/page/Alert.svelte +41 -45
- package/src/lib/components/page/BackToTop.svelte +30 -30
- package/src/lib/components/page/Docs.svelte +46 -44
- package/src/lib/components/page/ErrorMessage.svelte +10 -0
- package/src/lib/components/page/Footer.svelte +18 -22
- package/src/lib/components/page/Header.svelte +18 -21
- package/src/lib/components/page/HelpPopUp.svelte +72 -66
- package/src/lib/components/page/Page.svelte +96 -108
- package/src/lib/components/page/PageCaller.js +19 -21
- package/src/lib/components/page/Spinner.svelte +14 -16
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +31 -43
- package/src/lib/components/page/menu/Menu.svelte +40 -47
- package/src/lib/components/page/menu/MenuBar.svelte +20 -31
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -11
- package/src/lib/components/page/menu/MenuItem.svelte +27 -33
- package/src/lib/components/page/menu/MenuSublist.svelte +43 -48
- package/src/lib/components/page/menu/SettingsBar.svelte +31 -40
- package/src/lib/css/core.ui.postcss +10 -7
- package/src/lib/css/themes/theme-bexis2.css +12 -13
- package/src/lib/index.ts +75 -76
- package/src/lib/models/Enums.ts +10 -11
- package/src/lib/models/Models.ts +113 -113
- package/src/lib/models/Page.ts +40 -41
- package/src/lib/services/BaseCaller.js +16 -21
- package/src/lib/stores/apiStores.ts +31 -32
- package/src/lib/stores/pageStores.ts +121 -126
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>import { helpStore } from "../../stores/pageStores";
|
|
2
2
|
import Fa from "svelte-fa/src/fa.svelte";
|
|
3
3
|
import { faQuestion } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
import { popup } from "@skeletonlabs/skeleton";
|
|
@@ -26,27 +26,33 @@ async function resetItemId() {
|
|
|
26
26
|
await delay(100);
|
|
27
27
|
helpStore.resetItemId();
|
|
28
28
|
}
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
{#if active}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
{#if active}
|
|
32
|
+
<button
|
|
33
|
+
id="helpButton"
|
|
34
|
+
class="chip variant-filled-warning fixed bottom-5 right-10 shadow-md"
|
|
35
|
+
use:popup={helpClick}><Fa icon={faQuestion} /></button
|
|
36
|
+
>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
class="card bg-primary-300 border-solid border-2 border-primary-500 shadow-md"
|
|
40
|
+
data-popup="helpTarget"
|
|
41
|
+
>
|
|
42
|
+
{#if helpItem && helpItem.id}
|
|
43
|
+
<div class="p-5 w-96 space-y-4" id={'helpPopup.' + helpItem.id}>
|
|
44
|
+
<h3 class="h3">{helpItem.name}</h3>
|
|
45
|
+
<p>{@html helpItem.description}</p>
|
|
46
|
+
{#if helpItem.link}
|
|
47
|
+
<p><a class="anchor" href={helpItem.link}>... read more</a></p>
|
|
48
|
+
{/if}
|
|
49
|
+
</div>
|
|
50
|
+
{:else}
|
|
51
|
+
<div class="p-5 w-96 space-y-4" id="helpPopup">
|
|
52
|
+
<h3 class="h3">Help</h3>
|
|
53
|
+
<p>Hover over the Element, you like to know more about.</p>
|
|
54
|
+
</div>
|
|
55
|
+
{/if}
|
|
56
|
+
<div class="arrow variant-filled-primary" />
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} HelpPopUpProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} HelpPopUpEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} HelpPopUpSlots */
|
|
4
|
-
export default class HelpPopUp extends SvelteComponentTyped<{
|
|
5
|
-
active?: boolean | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type HelpPopUpProps = typeof __propDef.props;
|
|
11
|
-
export type HelpPopUpEvents = typeof __propDef.events;
|
|
12
|
-
export type HelpPopUpSlots = typeof __propDef.slots;
|
|
13
1
|
import { SvelteComponentTyped } from "svelte";
|
|
14
2
|
declare const __propDef: {
|
|
15
3
|
props: {
|
|
@@ -20,4 +8,9 @@ declare const __propDef: {
|
|
|
20
8
|
};
|
|
21
9
|
slots: {};
|
|
22
10
|
};
|
|
11
|
+
export type HelpPopUpProps = typeof __propDef.props;
|
|
12
|
+
export type HelpPopUpEvents = typeof __propDef.events;
|
|
13
|
+
export type HelpPopUpSlots = typeof __propDef.slots;
|
|
14
|
+
export default class HelpPopUp extends SvelteComponentTyped<HelpPopUpProps, HelpPopUpEvents, HelpPopUpSlots> {
|
|
15
|
+
}
|
|
23
16
|
export {};
|
|
@@ -24,69 +24,59 @@ onMount(async () => {
|
|
|
24
24
|
breadcrumbStore.clean();
|
|
25
25
|
breadcrumbStore.addItem({ label: title, link: window.location.pathname });
|
|
26
26
|
});
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<AppShell>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<div class=" p-5 flex-shrink-0 w-96 border-y border-solid border-surface-500">
|
|
84
|
-
<slot name="right"/>
|
|
85
|
-
</div>
|
|
86
|
-
{/if}
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<HelpPopUp active={help}/>
|
|
91
|
-
|
|
92
|
-
</AppShell>
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<AppShell>
|
|
30
|
+
<!--header-->
|
|
31
|
+
<svelte:fragment slot="header">
|
|
32
|
+
<AppBar padding="0" spacing="space-y-0" background="white">
|
|
33
|
+
<svelte:fragment slot="headline">
|
|
34
|
+
<Header />
|
|
35
|
+
{#if true}
|
|
36
|
+
<Menu />
|
|
37
|
+
{/if}
|
|
38
|
+
|
|
39
|
+
<div class="grid grid-cols-2">
|
|
40
|
+
<Breadcrumb {title} />
|
|
41
|
+
<Docs {links} {note} />
|
|
42
|
+
</div>
|
|
43
|
+
</svelte:fragment>
|
|
44
|
+
</AppBar>
|
|
45
|
+
</svelte:fragment>
|
|
46
|
+
|
|
47
|
+
<svelte:fragment slot="footer">
|
|
48
|
+
<Footer />
|
|
49
|
+
</svelte:fragment>
|
|
50
|
+
|
|
51
|
+
<slot name="description" />
|
|
52
|
+
|
|
53
|
+
<div class="flex flex-initial space-x-5">
|
|
54
|
+
{#if $$slots.left}
|
|
55
|
+
<div class="p-5 flex-shrink-0 w-96 w-min-96 border-y border-solid border-surface-500">
|
|
56
|
+
<slot name="left" />
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
59
|
+
|
|
60
|
+
{#if contentLayoutType === pageContentLayoutType.center}
|
|
61
|
+
<div class="flex justify-center w-screen">
|
|
62
|
+
<div class="max-w-7xl p-5 space-y-5 border-y border-solid border-surface-500">
|
|
63
|
+
<slot />
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
{/if}
|
|
67
|
+
|
|
68
|
+
{#if contentLayoutType === pageContentLayoutType.full}
|
|
69
|
+
<div class="p-5 space-y-5 border-y border-solid border-surface-500 w-screen">
|
|
70
|
+
<slot />
|
|
71
|
+
</div>
|
|
72
|
+
{/if}
|
|
73
|
+
|
|
74
|
+
{#if $$slots.right}
|
|
75
|
+
<div class=" p-5 flex-shrink-0 w-96 border-y border-solid border-surface-500">
|
|
76
|
+
<slot name="right" />
|
|
77
|
+
</div>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<HelpPopUp active={help} />
|
|
82
|
+
</AppShell>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { linkType } from
|
|
3
|
-
import { pageContentLayoutType } from
|
|
2
|
+
import type { linkType } from '../../models/Models';
|
|
3
|
+
import { pageContentLayoutType } from '../../models/Enums';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
title?: string | undefined;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import {Api} from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
};
|
|
1
|
+
import { Api } from '../../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,19 +1,18 @@
|
|
|
1
1
|
<script>import { positionType } from "../../models/Enums";
|
|
2
|
-
export let textCss = "text-
|
|
2
|
+
export let textCss = "text-surface-600";
|
|
3
3
|
export let label = "";
|
|
4
|
-
export let position = positionType.
|
|
4
|
+
export let position = positionType.center;
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2">
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
<span
|
|
13
|
-
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
14
|
-
>Loading...</span
|
|
7
|
+
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2 {textCss}">
|
|
8
|
+
<div
|
|
9
|
+
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]"
|
|
10
|
+
role="status"
|
|
15
11
|
>
|
|
12
|
+
<span
|
|
13
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
14
|
+
>Loading...</span
|
|
15
|
+
>
|
|
16
|
+
</div>
|
|
17
|
+
<span>{label}</span>
|
|
16
18
|
</div>
|
|
17
|
-
<span>{label}</span>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
@@ -7,26 +7,22 @@ $:
|
|
|
7
7
|
breadcrumbStore.subscribe((value) => {
|
|
8
8
|
list = value?.items;
|
|
9
9
|
});
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</ol>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div class="px-5 py-2">
|
|
13
|
+
<ol class="breadcrumb -p50">
|
|
14
|
+
<!--default home-->
|
|
15
|
+
<li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
|
|
16
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
17
|
+
|
|
18
|
+
{#each list as crumb, i}
|
|
19
|
+
<!-- If crumb index is less than the breadcrumb length minus 1 -->
|
|
20
|
+
{#if i < list.length - 1}
|
|
21
|
+
<li class="crumb"><a class="anchor" href={crumb.link}>{crumb.label}</a></li>
|
|
22
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
23
|
+
{:else}
|
|
24
|
+
<li class="crumb">{crumb.label}</li>
|
|
25
|
+
{/if}
|
|
26
|
+
{/each}
|
|
27
|
+
</ol>
|
|
28
|
+
</div>
|
|
@@ -8,28 +8,28 @@ onMount(async () => {
|
|
|
8
8
|
let m = await getMenuItems();
|
|
9
9
|
menuStore.set(m);
|
|
10
10
|
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div class="flex flex-row md:flex px-3 py-2 bg-tertiary-50 text-surface-800 z-50 shadow-md">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
{/if}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if $menuStore !== undefined}
|
|
14
|
+
<div class="flex flex-row md:flex px-3 py-2 bg-tertiary-50 text-surface-800 z-50 shadow-md">
|
|
15
|
+
<div class="basis-8">
|
|
16
|
+
{#if $menuStore.Logo}
|
|
17
|
+
<img
|
|
18
|
+
src="data:{$menuStore.Logo.Mime};charset=utf-8;base64, {$menuStore.Logo.Data}"
|
|
19
|
+
alt={$menuStore.Logo.Name}
|
|
20
|
+
style="height:40px;"
|
|
21
|
+
/>
|
|
22
|
+
{/if}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="flex items-center md:space-x-5 px-3 text-lg justify-start">
|
|
26
|
+
<MenuBar menuBar={$menuStore.MenuBar} />
|
|
27
|
+
<MenuBar menuBar={$menuStore.Extended} />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex-auto w-64 flex items-left md:space-x-3 justify-end">
|
|
30
|
+
<MenuBar menuBar={$menuStore.AccountBar} />
|
|
31
|
+
<MenuBar menuBar={$menuStore.LaunchBar} />
|
|
32
|
+
<SettingsBar menuBar={$menuStore.Settings} />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
{/if}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import { computePosition, autoUpdate, offset, shift, flip, arrow } from "@floating-ui/dom";
|
|
3
2
|
import { storePopup } from "@skeletonlabs/skeleton";
|
|
4
3
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
@@ -6,16 +5,10 @@ import Item from "./MenuItem.svelte";
|
|
|
6
5
|
export let menuBar;
|
|
7
6
|
let comboboxValue;
|
|
8
7
|
let radomNumber = Math.floor(Math.random() * 100);
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{/each}
|
|
18
|
-
{/if}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
{#if menuBar}
|
|
11
|
+
{#each menuBar as menubarItem}
|
|
12
|
+
<Item {menubarItem} {comboboxValue} />
|
|
13
|
+
{/each}
|
|
14
|
+
{/if}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { menuItemType } from '../../../models/Page';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
menuBar:
|
|
5
|
+
menuBar: menuItemType[];
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {Api} from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
1
|
+
import { Api } from '../../../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
|
+
};
|
|
@@ -12,20 +12,16 @@ let popupCombobox = {
|
|
|
12
12
|
closeQuery: ".listbox-item"
|
|
13
13
|
};
|
|
14
14
|
</script>
|
|
15
|
-
{#if menubarItem.Items.length<1}
|
|
16
|
-
|
|
17
|
-
<button use:popup={popupCombobox} on:click={()=> goTo(menubarItem.Url)}>
|
|
18
|
-
<span class="capitalize">{comboboxValue ?? menubarItem.Title}</span>
|
|
19
|
-
</button>
|
|
20
15
|
|
|
16
|
+
{#if menubarItem.Items.length < 1}
|
|
17
|
+
<button use:popup={popupCombobox} on:click={() => goTo(menubarItem.Url)}>
|
|
18
|
+
<span class="capitalize">{comboboxValue ?? menubarItem.Title}</span>
|
|
19
|
+
</button>
|
|
21
20
|
{:else}
|
|
21
|
+
<button class="flex items-center gap-x-1" use:popup={popupCombobox}>
|
|
22
|
+
<span class="capitalize">{menubarItem.Title}</span>
|
|
23
|
+
<div class="before:content-['▾']" />
|
|
24
|
+
</button>
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
<button class="flex items-center gap-x-1 " use:popup={popupCombobox}>
|
|
25
|
-
<span class="capitalize">{menubarItem.Title}</span>
|
|
26
|
-
<div class="before:content-['▾']"></div>
|
|
27
|
-
</button>
|
|
28
|
-
|
|
29
|
-
<MenuSublist {id} items={menubarItem.Items} />
|
|
30
|
-
|
|
26
|
+
<MenuSublist {id} items={menubarItem.Items} />
|
|
31
27
|
{/if}
|
|
@@ -16,20 +16,21 @@ function isNewModule(module) {
|
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<div class="z-50 w-max" data-popup={id}>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class="z-50 w-max" data-popup={id}>
|
|
22
|
+
<ListBox class="bg-white border-solid border border-surface-500">
|
|
23
|
+
{#each items as item}
|
|
24
|
+
{#if isNewModule(item.Module)}<hr class="text-surface-800" />{/if}
|
|
25
|
+
<ListBoxItem
|
|
26
|
+
class="bg-white text-sm text-surface-800 py-1 hover:bg-surface-100 hover:text-secondary-500"
|
|
27
|
+
bind:group={item.Title}
|
|
28
|
+
name="medium"
|
|
29
|
+
value={item.Title}
|
|
30
|
+
on:click={() => goTo(item.Url)}
|
|
31
|
+
>
|
|
32
|
+
{item.Title}
|
|
33
|
+
</ListBoxItem>
|
|
34
|
+
{/each}
|
|
35
|
+
</ListBox>
|
|
36
|
+
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { menuItemType } from '../../../models/Page';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
id: any;
|
|
6
|
-
items:
|
|
6
|
+
items: menuItemType[];
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -12,17 +12,12 @@ let popupCombobox = {
|
|
|
12
12
|
// Close the popup when the item is clicked
|
|
13
13
|
closeQuery: ".listbox-item"
|
|
14
14
|
};
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{/if}
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if menuBar}
|
|
18
|
+
<button class="flex items-center gap-x-1 text-sm text-surface-800" use:popup={popupCombobox}>
|
|
19
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
20
|
+
</button>
|
|
21
|
+
|
|
22
|
+
<MenuSublist id="settings" items={menuBar} />
|
|
23
|
+
{/if}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { menuItemType } from '../../../models/Page';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
menuBar:
|
|
5
|
+
menuBar: menuItemType[];
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
package/dist/css/core.ui.postcss
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/*place global styles here */
|
|
2
|
-
html,
|
|
2
|
+
html,
|
|
3
|
+
body {
|
|
4
|
+
@apply h-full;
|
|
5
|
+
}
|
|
3
6
|
|
|
4
|
-
h1{
|
|
5
|
-
|
|
7
|
+
h1 {
|
|
8
|
+
@apply text-primary-500;
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
:root {
|
|
9
|
-
--background:rgb(var(--color-surface-200))
|
|
10
|
-
|
|
12
|
+
--background: rgb(var(--color-surface-200));
|
|
13
|
+
}
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
--tw-ring-color
|
|
15
|
+
[type='text']:focus {
|
|
16
|
+
--tw-ring-color: #00000;
|
|
14
17
|
}
|