@bexis2/bexis2-core-ui 0.2.12 → 0.2.13
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 +10 -0
- package/dist/components/Table/TableFilter.svelte +117 -117
- package/dist/components/page/menu/Menu.svelte +52 -26
- package/dist/components/page/menu/MenuBar.svelte +9 -8
- package/dist/components/page/menu/MenuBar.svelte.d.ts +2 -2
- package/dist/components/page/menu/MenuItem.svelte +27 -10
- package/dist/components/page/menu/MenuSublist.svelte +16 -19
- package/dist/components/page/menu/MenuSublist.svelte.d.ts +0 -1
- package/dist/components/page/menu/SettingsBar.svelte +24 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/models/Enums.d.ts +18 -0
- package/dist/models/Enums.js +22 -0
- package/dist/models/Models.d.ts +18 -0
- package/dist/models/Models.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/Table/TableFilter.svelte +222 -222
- package/src/lib/components/page/menu/Menu.svelte +65 -40
- package/src/lib/components/page/menu/MenuBar.svelte +20 -20
- package/src/lib/components/page/menu/MenuItem.svelte +28 -11
- package/src/lib/components/page/menu/MenuSublist.svelte +40 -43
- package/src/lib/components/page/menu/SettingsBar.svelte +42 -31
- package/src/lib/index.ts +5 -2
- package/src/lib/models/Enums.ts +22 -0
- package/src/lib/models/Models.ts +23 -0
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
-
import type { menuItemType } from '$models/Page';
|
|
4
|
-
import { goTo } from '$services/BaseCaller';
|
|
5
|
-
|
|
6
|
-
export let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{/each}
|
|
42
|
-
</ListBox>
|
|
43
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
+
import type { menuItemType } from '$models/Page';
|
|
4
|
+
import { goTo } from '$services/BaseCaller';
|
|
5
|
+
|
|
6
|
+
export let items: menuItemType[];
|
|
7
|
+
|
|
8
|
+
let lastModule = '';
|
|
9
|
+
let first = true;
|
|
10
|
+
|
|
11
|
+
// store last module
|
|
12
|
+
function isNewModule(module) {
|
|
13
|
+
if (module === lastModule) {
|
|
14
|
+
return false;
|
|
15
|
+
} else {
|
|
16
|
+
lastModule = module;
|
|
17
|
+
if (first) {
|
|
18
|
+
first = false;
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<ListBox class="sm:bg-white sm:border">
|
|
28
|
+
{#each items as item}
|
|
29
|
+
{#if isNewModule(item.Module)}<hr class="text-surface-800" />{/if}
|
|
30
|
+
<ListBoxItem
|
|
31
|
+
class="text-md sm:text-sm text-surface-800 py-1 hover:text-secondary-500 bg-transparent hover:bg-surface-200"
|
|
32
|
+
bind:group={item.Title}
|
|
33
|
+
name="medium"
|
|
34
|
+
value={item.Title}
|
|
35
|
+
on:click={() => goTo(item.Url)}
|
|
36
|
+
>
|
|
37
|
+
{item.Title}
|
|
38
|
+
</ListBoxItem>
|
|
39
|
+
{/each}
|
|
40
|
+
</ListBox>
|
|
@@ -1,31 +1,42 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { popup } from '@skeletonlabs/skeleton';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
3
|
+
|
|
4
|
+
import { AccordionItem, type PopupSettings } from '@skeletonlabs/skeleton';
|
|
5
|
+
import type { menuItemType } from '$models/Page';
|
|
6
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
7
|
+
import { faCog } from '@fortawesome/free-solid-svg-icons';
|
|
8
|
+
|
|
9
|
+
export let menuBar: menuItemType[];
|
|
10
|
+
//uicomponents
|
|
11
|
+
import MenuSublist from './MenuSublist.svelte';
|
|
12
|
+
|
|
13
|
+
let popupCombobox: PopupSettings = {
|
|
14
|
+
event: 'click',
|
|
15
|
+
target: 'settings',
|
|
16
|
+
placement: 'bottom',
|
|
17
|
+
// Close the popup when the item is clicked
|
|
18
|
+
closeQuery: '.listbox-item'
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
{#if menuBar}
|
|
23
|
+
<div class="sm:hidden">
|
|
24
|
+
<AccordionItem padding="p-2">
|
|
25
|
+
<svelte:fragment slot="summary"
|
|
26
|
+
><button class="flex items-center gap-x-1 text-sm text-surface-800 w-5 h-full">
|
|
27
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
28
|
+
</button></svelte:fragment
|
|
29
|
+
>
|
|
30
|
+
<svelte:fragment slot="content"><MenuSublist items={menuBar} /></svelte:fragment>
|
|
31
|
+
</AccordionItem>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="hidden sm:block place-self-center" use:popup={popupCombobox}>
|
|
34
|
+
<button class="flex items-center gap-x-1">
|
|
35
|
+
<div class="hidden sm:block" />
|
|
36
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
37
|
+
</button>
|
|
38
|
+
<div class="z-50 w-max" data-popup="settings">
|
|
39
|
+
<MenuSublist items={menuBar} />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
{/if}
|
package/src/lib/index.ts
CHANGED
|
@@ -60,7 +60,10 @@ export type {
|
|
|
60
60
|
fileUploaderModel,
|
|
61
61
|
linkType,
|
|
62
62
|
listItemType,
|
|
63
|
-
keyValuePairType
|
|
63
|
+
keyValuePairType,
|
|
64
|
+
fileInfoType,
|
|
65
|
+
fileReaderInfoType,
|
|
66
|
+
asciiFileReaderInfoType
|
|
64
67
|
} from './models/Models.js';
|
|
65
68
|
|
|
66
69
|
//help
|
|
@@ -68,7 +71,7 @@ export { helpStore } from '$store/pageStores';
|
|
|
68
71
|
export type { helpStoreType, helpItemType } from './models/Models';
|
|
69
72
|
|
|
70
73
|
//enum
|
|
71
|
-
export { positionType, pageContentLayoutType } from './models/Enums';
|
|
74
|
+
export { positionType, pageContentLayoutType,decimalCharacterType,orientationType,textMarkerType,textSeperatorType } from './models/Enums';
|
|
72
75
|
|
|
73
76
|
// Table
|
|
74
77
|
export { Table, TableFilter, columnFilter, searchFilter };
|
package/src/lib/models/Enums.ts
CHANGED
|
@@ -8,3 +8,25 @@ export enum pageContentLayoutType {
|
|
|
8
8
|
full = 'full',
|
|
9
9
|
center = 'center'
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export enum decimalCharacterType {
|
|
13
|
+
point,
|
|
14
|
+
comma
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum orientationType {
|
|
18
|
+
columnwise,
|
|
19
|
+
rowwise
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum textSeperatorType {
|
|
23
|
+
tab = 9,
|
|
24
|
+
comma = 44,
|
|
25
|
+
semicolon = 59,
|
|
26
|
+
space = 32
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum textMarkerType {
|
|
30
|
+
quotes,
|
|
31
|
+
doubleQuotes
|
|
32
|
+
}
|
package/src/lib/models/Models.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { SvelteComponent } from 'svelte';
|
|
|
2
2
|
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
|
|
3
3
|
import type { Writable } from 'svelte/store';
|
|
4
4
|
|
|
5
|
+
import {decimalCharacterType, orientationType,textMarkerType,textSeperatorType} from './Enums'
|
|
6
|
+
|
|
5
7
|
// page
|
|
6
8
|
export interface linkType {
|
|
7
9
|
label: string;
|
|
@@ -34,8 +36,29 @@ export interface fileUploaderModel {
|
|
|
34
36
|
multiple: boolean;
|
|
35
37
|
maxSize: number;
|
|
36
38
|
lastModification: Date;
|
|
39
|
+
allFilesReadable: boolean;
|
|
40
|
+
asciiFileReaderInfo: asciiFileReaderInfoType
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface asciiFileReaderInfoType extends fileReaderInfoType {
|
|
44
|
+
cells: boolean[];
|
|
45
|
+
seperator: textSeperatorType;
|
|
46
|
+
textMarker: textMarkerType;
|
|
37
47
|
}
|
|
38
48
|
|
|
49
|
+
|
|
50
|
+
export interface fileReaderInfoType {
|
|
51
|
+
decimal: decimalCharacterType;
|
|
52
|
+
orientation: orientationType;
|
|
53
|
+
offset: number;
|
|
54
|
+
variables: number;
|
|
55
|
+
data: number;
|
|
56
|
+
unit: number;
|
|
57
|
+
description: number;
|
|
58
|
+
dateformat: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
39
62
|
export interface filesType {
|
|
40
63
|
accepted: Blob[];
|
|
41
64
|
rejected: Blob[];
|