@bexis2/bexis2-core-ui 0.2.28 → 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.
Files changed (98) hide show
  1. package/README.md +21 -2
  2. package/dist/TableView.svelte +1 -1
  3. package/dist/components/{file → File}/FileIcon.svelte +45 -45
  4. package/{src/lib/components/file → dist/components/File}/FileInfo.svelte +13 -13
  5. package/dist/components/ListView.svelte +5 -5
  6. package/dist/components/Table/Table.svelte +17 -2
  7. package/dist/components/Table/TableFilter.svelte +13 -6
  8. package/dist/components/form/Checkbox.svelte +13 -13
  9. package/dist/components/form/CheckboxKvPList.svelte +16 -16
  10. package/dist/components/form/CheckboxList.svelte +10 -10
  11. package/dist/components/form/DateInput.svelte +15 -13
  12. package/dist/components/form/DateInput.svelte.d.ts +1 -0
  13. package/dist/components/form/DropdownKvP.svelte +54 -54
  14. package/dist/components/form/MultiSelect.svelte +181 -181
  15. package/dist/components/form/NumberInput.svelte +16 -14
  16. package/dist/components/form/NumberInput.svelte.d.ts +1 -0
  17. package/dist/components/form/TextArea.svelte +15 -13
  18. package/dist/components/form/TextArea.svelte.d.ts +1 -0
  19. package/dist/components/form/TextInput.svelte +16 -14
  20. package/dist/components/form/TextInput.svelte.d.ts +1 -0
  21. package/dist/components/page/Alert.svelte +28 -28
  22. package/dist/components/page/BackToTop.svelte +30 -30
  23. package/dist/components/page/Docs.svelte +22 -22
  24. package/dist/components/page/ErrorMessage.svelte +8 -8
  25. package/dist/components/page/Footer.svelte +5 -5
  26. package/dist/components/page/Header.svelte +5 -5
  27. package/dist/components/page/HelpPopUp.svelte +30 -30
  28. package/dist/components/page/PageCaller.js +19 -19
  29. package/dist/components/page/Spinner.svelte +14 -14
  30. package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -19
  31. package/dist/components/page/menu/MenuDataCaller.js +10 -10
  32. package/dist/css/core.ui.postcss +17 -17
  33. package/dist/css/themes/theme-bexis2.css +96 -96
  34. package/dist/css/themes/theme-crimson.css +101 -101
  35. package/dist/css/themes/theme-gold-nouveau.css +140 -140
  36. package/dist/css/themes/theme-hamlindigo.css +112 -112
  37. package/dist/css/themes/theme-modern.css +127 -127
  38. package/dist/css/themes/theme-rocket.css +119 -119
  39. package/dist/css/themes/theme-sahara.css +128 -128
  40. package/dist/css/themes/theme-seafoam.css +122 -122
  41. package/dist/css/themes/theme-seasonal.css +115 -115
  42. package/dist/css/themes/theme-skeleton.css +118 -118
  43. package/dist/css/themes/theme-vintage.css +125 -125
  44. package/dist/index.d.ts +3 -3
  45. package/dist/index.js +3 -3
  46. package/dist/models/Models.d.ts +3 -3
  47. package/dist/services/BaseCaller.js +16 -16
  48. package/package.json +1 -1
  49. package/src/lib/TableView.svelte +1 -1
  50. package/src/lib/components/{file → File}/FileIcon.svelte +45 -45
  51. package/{dist/components/file → src/lib/components/File}/FileInfo.svelte +13 -13
  52. package/src/lib/components/ListView.svelte +11 -11
  53. package/src/lib/components/Table/Table.svelte +19 -3
  54. package/src/lib/components/Table/TableFilter.svelte +15 -6
  55. package/src/lib/components/Table/filter.ts +141 -141
  56. package/src/lib/components/form/Checkbox.svelte +24 -24
  57. package/src/lib/components/form/CheckboxKvPList.svelte +29 -29
  58. package/src/lib/components/form/CheckboxList.svelte +21 -21
  59. package/src/lib/components/form/DateInput.svelte +27 -25
  60. package/src/lib/components/form/DropdownKvP.svelte +54 -54
  61. package/src/lib/components/form/MultiSelect.svelte +181 -181
  62. package/src/lib/components/form/NumberInput.svelte +30 -28
  63. package/src/lib/components/form/TextArea.svelte +28 -26
  64. package/src/lib/components/form/TextInput.svelte +28 -26
  65. package/src/lib/components/page/Alert.svelte +41 -41
  66. package/src/lib/components/page/BackToTop.svelte +30 -30
  67. package/src/lib/components/page/Docs.svelte +46 -46
  68. package/src/lib/components/page/ErrorMessage.svelte +10 -10
  69. package/src/lib/components/page/Footer.svelte +18 -18
  70. package/src/lib/components/page/Header.svelte +18 -18
  71. package/src/lib/components/page/HelpPopUp.svelte +72 -72
  72. package/src/lib/components/page/PageCaller.js +19 -19
  73. package/src/lib/components/page/Spinner.svelte +20 -20
  74. package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +39 -39
  75. package/src/lib/components/page/menu/MenuDataCaller.js +10 -10
  76. package/src/lib/css/core.ui.postcss +17 -17
  77. package/src/lib/css/themes/theme-bexis2.css +96 -96
  78. package/src/lib/css/themes/theme-crimson.css +101 -101
  79. package/src/lib/css/themes/theme-gold-nouveau.css +140 -140
  80. package/src/lib/css/themes/theme-hamlindigo.css +112 -112
  81. package/src/lib/css/themes/theme-modern.css +127 -127
  82. package/src/lib/css/themes/theme-rocket.css +119 -119
  83. package/src/lib/css/themes/theme-sahara.css +128 -128
  84. package/src/lib/css/themes/theme-seafoam.css +122 -122
  85. package/src/lib/css/themes/theme-seasonal.css +115 -115
  86. package/src/lib/css/themes/theme-skeleton.css +118 -118
  87. package/src/lib/css/themes/theme-vintage.css +125 -125
  88. package/src/lib/index.ts +3 -3
  89. package/src/lib/models/Models.ts +3 -3
  90. package/src/lib/models/Page.ts +40 -40
  91. package/src/lib/services/Api.ts +55 -55
  92. package/src/lib/services/BaseCaller.js +16 -16
  93. package/src/lib/stores/apiStores.ts +31 -31
  94. /package/dist/components/{file → File}/FileIcon.svelte.d.ts +0 -0
  95. /package/dist/components/{file → File}/FileInfo.svelte.d.ts +0 -0
  96. /package/dist/components/{file → File}/FileUploader.svelte +0 -0
  97. /package/dist/components/{file → File}/FileUploader.svelte.d.ts +0 -0
  98. /package/src/lib/components/{file → File}/FileUploader.svelte +0 -0
@@ -1,26 +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
- </script>
14
-
15
- <InputContainer {id} {label} {feedback} {required} {help}>
16
- <input
17
- {id}
18
- class="input variant-form-material"
19
- type="text"
20
- class:input-success={valid}
21
- class:input-error={invalid}
22
- bind:value
23
- on:input
24
- {placeholder}
25
- />
26
- </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}
@@ -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>