@bexis2/bexis2-core-ui 0.1.11 → 0.1.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 +11 -0
- package/dist/components/form/MultiSelect.svelte +16 -3
- package/dist/components/form/MultiSelect.svelte.d.ts +26 -2
- package/dist/components/page/Page.svelte +31 -9
- package/dist/components/page/Page.svelte.d.ts +3 -0
- package/dist/components/page/menu/Menu.svelte +10 -6
- package/dist/components/page/menu/MenuBar.svelte +1 -0
- package/dist/components/page/menu/MenuBar.svelte.d.ts +1 -1
- package/dist/components/page/menu/MenuItem.svelte +1 -1
- package/dist/components/page/menu/MenuItem.svelte.d.ts +2 -1
- package/dist/components/page/menu/SettingsBar.svelte +1 -1
- package/dist/components/page/menu/SettingsBar.svelte.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/form/MultiSelect.svelte +16 -3
- package/src/lib/components/page/Page.svelte +31 -9
- package/src/lib/components/page/menu/Menu.svelte +10 -6
- package/src/lib/components/page/menu/MenuBar.svelte +2 -1
- package/src/lib/components/page/menu/MenuItem.svelte +3 -2
- package/src/lib/components/page/menu/SettingsBar.svelte +2 -2
package/README.md
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
export let complexSource = false;
|
|
16
16
|
export let complexTarget = false;
|
|
17
17
|
export let required = false;
|
|
18
|
-
export let feedback = [];
|
|
18
|
+
export let feedback = [''];
|
|
19
19
|
export let placeholder = "-- Please select --"
|
|
20
|
+
export let invalid = false
|
|
21
|
+
export let loading = false
|
|
20
22
|
|
|
21
23
|
let isLoaded = false;
|
|
22
24
|
|
|
@@ -79,7 +81,7 @@
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
onMount(async () => {
|
|
82
|
-
|
|
84
|
+
console.log("on mount multiselect");
|
|
83
85
|
////console.log(source);
|
|
84
86
|
|
|
85
87
|
//a) source is complex model is simple
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
|
|
120
122
|
if(!isMulti)
|
|
121
123
|
{
|
|
122
|
-
console.log("onmount",complexSource,complexTarget,value,target)
|
|
124
|
+
//console.log("onmount",complexSource,complexTarget,value,target)
|
|
123
125
|
if(!complexSource && !complexTarget)
|
|
124
126
|
{
|
|
125
127
|
value = {
|
|
@@ -157,6 +159,17 @@
|
|
|
157
159
|
multiple={isMulti}
|
|
158
160
|
bind:value
|
|
159
161
|
{placeholder}
|
|
162
|
+
hasError={invalid}
|
|
163
|
+
{loading}
|
|
164
|
+
on:change
|
|
165
|
+
on:input
|
|
166
|
+
on:focus
|
|
167
|
+
on:blur
|
|
168
|
+
on:clear
|
|
169
|
+
on:loaded
|
|
170
|
+
on:error
|
|
171
|
+
on:filter
|
|
172
|
+
on:hoverItem
|
|
160
173
|
/>
|
|
161
174
|
|
|
162
175
|
</InputContainer>
|
|
@@ -7,7 +7,8 @@ export default class MultiSelect extends SvelteComponentTyped<{
|
|
|
7
7
|
source: any;
|
|
8
8
|
title: any;
|
|
9
9
|
required?: boolean | undefined;
|
|
10
|
-
|
|
10
|
+
invalid?: boolean | undefined;
|
|
11
|
+
feedback?: string[] | undefined;
|
|
11
12
|
complexTarget?: boolean | undefined;
|
|
12
13
|
itemId?: string | undefined;
|
|
13
14
|
itemLabel?: string | undefined;
|
|
@@ -15,7 +16,18 @@ export default class MultiSelect extends SvelteComponentTyped<{
|
|
|
15
16
|
isMulti?: boolean | undefined;
|
|
16
17
|
complexSource?: boolean | undefined;
|
|
17
18
|
placeholder?: string | undefined;
|
|
19
|
+
loading?: boolean | undefined;
|
|
18
20
|
}, {
|
|
21
|
+
change: CustomEvent<any>;
|
|
22
|
+
input: CustomEvent<any>;
|
|
23
|
+
focus: CustomEvent<any>;
|
|
24
|
+
blur: CustomEvent<any>;
|
|
25
|
+
clear: CustomEvent<any>;
|
|
26
|
+
loaded: CustomEvent<any>;
|
|
27
|
+
error: CustomEvent<any>;
|
|
28
|
+
filter: CustomEvent<any>;
|
|
29
|
+
hoverItem: CustomEvent<any>;
|
|
30
|
+
} & {
|
|
19
31
|
[evt: string]: CustomEvent<any>;
|
|
20
32
|
}, {}> {
|
|
21
33
|
}
|
|
@@ -30,7 +42,8 @@ declare const __propDef: {
|
|
|
30
42
|
source: any;
|
|
31
43
|
title: any;
|
|
32
44
|
required?: boolean | undefined;
|
|
33
|
-
|
|
45
|
+
invalid?: boolean | undefined;
|
|
46
|
+
feedback?: string[] | undefined;
|
|
34
47
|
complexTarget?: boolean | undefined;
|
|
35
48
|
itemId?: string | undefined;
|
|
36
49
|
itemLabel?: string | undefined;
|
|
@@ -38,8 +51,19 @@ declare const __propDef: {
|
|
|
38
51
|
isMulti?: boolean | undefined;
|
|
39
52
|
complexSource?: boolean | undefined;
|
|
40
53
|
placeholder?: string | undefined;
|
|
54
|
+
loading?: boolean | undefined;
|
|
41
55
|
};
|
|
42
56
|
events: {
|
|
57
|
+
change: CustomEvent<any>;
|
|
58
|
+
input: CustomEvent<any>;
|
|
59
|
+
focus: CustomEvent<any>;
|
|
60
|
+
blur: CustomEvent<any>;
|
|
61
|
+
clear: CustomEvent<any>;
|
|
62
|
+
loaded: CustomEvent<any>;
|
|
63
|
+
error: CustomEvent<any>;
|
|
64
|
+
filter: CustomEvent<any>;
|
|
65
|
+
hoverItem: CustomEvent<any>;
|
|
66
|
+
} & {
|
|
43
67
|
[evt: string]: CustomEvent<any>;
|
|
44
68
|
};
|
|
45
69
|
slots: {};
|
|
@@ -11,22 +11,44 @@ export let footer = true;
|
|
|
11
11
|
{/if}
|
|
12
12
|
|
|
13
13
|
<div class="px-5 grid gap-5 content-center" >
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
<h3 class="h3">{title}</h3>
|
|
15
16
|
{#if note}
|
|
16
17
|
<blockquote class="blockquote">{note}</blockquote>
|
|
17
18
|
{/if}
|
|
18
19
|
|
|
19
20
|
<slot name="description" />
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<div class="w-full flex flex-col sm:flex-row flex-wrap sm:flex-nowrap py-4 flex-grow">
|
|
24
|
+
{#if $$slots.left}
|
|
25
|
+
<div class="w-fixed w-full max-w-min flex-shrink flex-grow-1 px-4">
|
|
26
|
+
<slot name="left" />
|
|
26
27
|
</div>
|
|
27
28
|
{/if}
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
<div class="w-full flex-initial items-center justify-center pt-1 px-3">
|
|
31
|
+
<slot name="middle" />
|
|
32
|
+
{#if links.length>0}
|
|
33
|
+
<div class="py-5">
|
|
34
|
+
{#each links as link}
|
|
35
|
+
<a class="chip variant-ringed" href={link.url}>{link.label}</a>
|
|
36
|
+
{/each}
|
|
37
|
+
</div>
|
|
38
|
+
{/if}
|
|
39
|
+
<slot/>
|
|
40
|
+
</div>
|
|
41
|
+
{#if $$slots.right}
|
|
42
|
+
<div class="w-fixed w-full max-w-min flex-shrink flex-grow-0 px-2">
|
|
43
|
+
<slot name="right" />
|
|
44
|
+
</div>
|
|
45
|
+
{/if}
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
30
52
|
|
|
31
53
|
{#if menu}
|
|
32
54
|
<!-- footer -->
|
|
@@ -7,28 +7,32 @@ import SettingsBar from "./SettingsBar.svelte";
|
|
|
7
7
|
let menu;
|
|
8
8
|
onMount(async () => {
|
|
9
9
|
menu = await getMenuItems();
|
|
10
|
+
console.log(menu);
|
|
10
11
|
});
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
{#if menu}
|
|
14
15
|
|
|
15
16
|
<div class="flex flex-row md:flex px-3 py-2">
|
|
16
|
-
<div class="basis-
|
|
17
|
+
<div class="basis-8">
|
|
17
18
|
{#if menu.Logo}
|
|
18
19
|
<img src='data:{menu.Logo.Mime};charset=utf-8;base64, {menu.Logo.Data}' alt='{menu.Logo.Name}' style='height:40px;' />
|
|
19
20
|
{/if}
|
|
20
21
|
</div>
|
|
21
22
|
|
|
22
|
-
<div class="flex-auto w-64 flex items-center md:space-x-3 justify-end">
|
|
23
23
|
|
|
24
|
+
<div class="flex items-center md:space-x-5 px-3 text-lg justify-start">
|
|
25
|
+
|
|
26
|
+
<MenuBar menuBar={menu.MenuBar} />
|
|
27
|
+
<MenuBar menuBar={menu.Extended} />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex-auto w-64 flex items-left md:space-x-3 justify-end">
|
|
24
30
|
<MenuBar menuBar={menu.AccountBar} />
|
|
25
31
|
<MenuBar menuBar={menu.LaunchBar} />
|
|
26
32
|
<SettingsBar menuBar={menu.Settings} />
|
|
33
|
+
|
|
27
34
|
</div>
|
|
28
35
|
|
|
29
36
|
</div>
|
|
30
|
-
|
|
31
|
-
<MenuBar menuBar={menu.MenuBar} />
|
|
32
|
-
<MenuBar menuBar={menu.Extended} />
|
|
33
|
-
</div>
|
|
37
|
+
|
|
34
38
|
{/if}
|
|
@@ -28,7 +28,7 @@ let popupCombobox = {
|
|
|
28
28
|
<ListBox rounded="rounded-none">
|
|
29
29
|
{#each menubarItem.Items as item}
|
|
30
30
|
|
|
31
|
-
<ListBoxItem class="bg-white text-gray-900 py-1 text-sm"
|
|
31
|
+
<ListBoxItem class="bg-white text-gray-900 py-1 text-sm" bind:group={item.Title} name="medium" value={item.Title}><a class="bg-white text-gray-900 py-1 text-sm" href={item.Url}>{item.Title}</a></ListBoxItem>
|
|
32
32
|
{/each}
|
|
33
33
|
</ListBox>
|
|
34
34
|
</div>
|
|
@@ -35,7 +35,7 @@ let popupCombobox = {
|
|
|
35
35
|
<ListBox rounded="rounded-none bg-white">
|
|
36
36
|
{#each menuBar as menubarItem}
|
|
37
37
|
{#if isNewModule(menubarItem.Module) }<hr class="bg-gray-900">{/if}
|
|
38
|
-
<ListBoxItem class="bg-white text-gray-900 py-1" bind:group={menubarItem.Title} name="medium" value={menubarItem.Title}>{menubarItem.Title}</ListBoxItem>
|
|
38
|
+
<ListBoxItem class="bg-white text-gray-900 py-1" href="{menubarItem.Url}" bind:group={menubarItem.Title} name="medium" value={menubarItem.Title}><a href={menubarItem.Url}>{menubarItem.Title}</a></ListBoxItem>
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
export let complexSource = false;
|
|
16
16
|
export let complexTarget = false;
|
|
17
17
|
export let required = false;
|
|
18
|
-
export let feedback = [];
|
|
18
|
+
export let feedback = [''];
|
|
19
19
|
export let placeholder = "-- Please select --"
|
|
20
|
+
export let invalid = false
|
|
21
|
+
export let loading = false
|
|
20
22
|
|
|
21
23
|
let isLoaded = false;
|
|
22
24
|
|
|
@@ -79,7 +81,7 @@
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
onMount(async () => {
|
|
82
|
-
|
|
84
|
+
console.log("on mount multiselect");
|
|
83
85
|
////console.log(source);
|
|
84
86
|
|
|
85
87
|
//a) source is complex model is simple
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
|
|
120
122
|
if(!isMulti)
|
|
121
123
|
{
|
|
122
|
-
console.log("onmount",complexSource,complexTarget,value,target)
|
|
124
|
+
//console.log("onmount",complexSource,complexTarget,value,target)
|
|
123
125
|
if(!complexSource && !complexTarget)
|
|
124
126
|
{
|
|
125
127
|
value = {
|
|
@@ -157,6 +159,17 @@
|
|
|
157
159
|
multiple={isMulti}
|
|
158
160
|
bind:value
|
|
159
161
|
{placeholder}
|
|
162
|
+
hasError={invalid}
|
|
163
|
+
{loading}
|
|
164
|
+
on:change
|
|
165
|
+
on:input
|
|
166
|
+
on:focus
|
|
167
|
+
on:blur
|
|
168
|
+
on:clear
|
|
169
|
+
on:loaded
|
|
170
|
+
on:error
|
|
171
|
+
on:filter
|
|
172
|
+
on:hoverItem
|
|
160
173
|
/>
|
|
161
174
|
|
|
162
175
|
</InputContainer>
|
|
@@ -19,22 +19,44 @@
|
|
|
19
19
|
{/if}
|
|
20
20
|
|
|
21
21
|
<div class="px-5 grid gap-5 content-center" >
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
<h3 class="h3">{title}</h3>
|
|
23
24
|
{#if note}
|
|
24
25
|
<blockquote class="blockquote">{note}</blockquote>
|
|
25
26
|
{/if}
|
|
26
27
|
|
|
27
28
|
<slot name="description" />
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<div class="w-full flex flex-col sm:flex-row flex-wrap sm:flex-nowrap py-4 flex-grow">
|
|
32
|
+
{#if $$slots.left}
|
|
33
|
+
<div class="w-fixed w-full max-w-min flex-shrink flex-grow-1 px-4">
|
|
34
|
+
<slot name="left" />
|
|
34
35
|
</div>
|
|
35
36
|
{/if}
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
<div class="w-full flex-initial items-center justify-center pt-1 px-3">
|
|
39
|
+
<slot name="middle" />
|
|
40
|
+
{#if links.length>0}
|
|
41
|
+
<div class="py-5">
|
|
42
|
+
{#each links as link}
|
|
43
|
+
<a class="chip variant-ringed" href={link.url}>{link.label}</a>
|
|
44
|
+
{/each}
|
|
45
|
+
</div>
|
|
46
|
+
{/if}
|
|
47
|
+
<slot/>
|
|
48
|
+
</div>
|
|
49
|
+
{#if $$slots.right}
|
|
50
|
+
<div class="w-fixed w-full max-w-min flex-shrink flex-grow-0 px-2">
|
|
51
|
+
<slot name="right" />
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
38
60
|
|
|
39
61
|
{#if menu}
|
|
40
62
|
<!-- footer -->
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
onMount(async () => {
|
|
18
18
|
|
|
19
19
|
menu = await getMenuItems();
|
|
20
|
+
console.log(menu);
|
|
20
21
|
|
|
21
22
|
})
|
|
22
23
|
|
|
@@ -28,22 +29,25 @@
|
|
|
28
29
|
{#if menu}
|
|
29
30
|
|
|
30
31
|
<div class="flex flex-row md:flex px-3 py-2">
|
|
31
|
-
<div class="basis-
|
|
32
|
+
<div class="basis-8">
|
|
32
33
|
{#if menu.Logo}
|
|
33
34
|
<img src='data:{menu.Logo.Mime};charset=utf-8;base64, {menu.Logo.Data}' alt='{menu.Logo.Name}' style='height:40px;' />
|
|
34
35
|
{/if}
|
|
35
36
|
</div>
|
|
36
37
|
|
|
37
|
-
<div class="flex-auto w-64 flex items-center md:space-x-3 justify-end">
|
|
38
38
|
|
|
39
|
+
<div class="flex items-center md:space-x-5 px-3 text-lg justify-start">
|
|
40
|
+
|
|
41
|
+
<MenuBar menuBar={menu.MenuBar} />
|
|
42
|
+
<MenuBar menuBar={menu.Extended} />
|
|
43
|
+
</div>
|
|
44
|
+
<div class="flex-auto w-64 flex items-left md:space-x-3 justify-end">
|
|
39
45
|
<MenuBar menuBar={menu.AccountBar} />
|
|
40
46
|
<MenuBar menuBar={menu.LaunchBar} />
|
|
41
47
|
<SettingsBar menuBar={menu.Settings} />
|
|
48
|
+
|
|
42
49
|
</div>
|
|
43
50
|
|
|
44
51
|
</div>
|
|
45
|
-
|
|
46
|
-
<MenuBar menuBar={menu.MenuBar} />
|
|
47
|
-
<MenuBar menuBar={menu.Extended} />
|
|
48
|
-
</div>
|
|
52
|
+
|
|
49
53
|
{/if}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { storePopup } from '@skeletonlabs/skeleton';
|
|
6
6
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
7
7
|
|
|
8
|
-
import type { MenuItem } from "
|
|
8
|
+
import type { MenuItem } from "./menu";
|
|
9
9
|
import Item from "./MenuItem.svelte";
|
|
10
10
|
|
|
11
11
|
export let menuBar:MenuItem [];
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
let radomNumber = Math.floor(Math.random() * 100);
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
console.log(menuBar);
|
|
18
19
|
</script>
|
|
19
20
|
|
|
20
21
|
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
4
4
|
|
|
5
5
|
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
6
|
+
import type { MenuItem } from "./menu";
|
|
6
7
|
|
|
7
|
-
export let menubarItem;
|
|
8
|
+
export let menubarItem:MenuItem;
|
|
8
9
|
export let comboboxValue;
|
|
9
10
|
|
|
10
11
|
let radomNumber = Math.floor(Math.random() * 100).toString();
|
|
@@ -35,7 +36,7 @@ closeQuery: '.listbox-item'
|
|
|
35
36
|
<ListBox rounded="rounded-none">
|
|
36
37
|
{#each menubarItem.Items as item}
|
|
37
38
|
|
|
38
|
-
<ListBoxItem class="bg-white text-gray-900 py-1 text-sm"
|
|
39
|
+
<ListBoxItem class="bg-white text-gray-900 py-1 text-sm" bind:group={item.Title} name="medium" value={item.Title}><a class="bg-white text-gray-900 py-1 text-sm" href={item.Url}>{item.Title}</a></ListBoxItem>
|
|
39
40
|
{/each}
|
|
40
41
|
</ListBox>
|
|
41
42
|
</div>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
4
4
|
|
|
5
5
|
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
6
|
-
import type { MenuItem } from "
|
|
6
|
+
import type { MenuItem } from "./menu";
|
|
7
7
|
import Fa from 'svelte-fa/src/fa.svelte'
|
|
8
8
|
import { faCog } from '@fortawesome/free-solid-svg-icons'
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ closeQuery: '.listbox-item'
|
|
|
50
50
|
<ListBox rounded="rounded-none bg-white">
|
|
51
51
|
{#each menuBar as menubarItem}
|
|
52
52
|
{#if isNewModule(menubarItem.Module) }<hr class="bg-gray-900">{/if}
|
|
53
|
-
<ListBoxItem class="bg-white text-gray-900 py-1" bind:group={menubarItem.Title} name="medium" value={menubarItem.Title}>{menubarItem.Title}</ListBoxItem>
|
|
53
|
+
<ListBoxItem class="bg-white text-gray-900 py-1" href="{menubarItem.Url}" bind:group={menubarItem.Title} name="medium" value={menubarItem.Title}><a href={menubarItem.Url}>{menubarItem.Title}</a></ListBoxItem>
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|