@bexis2/bexis2-core-ui 0.1.10 → 0.1.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 CHANGED
@@ -1,12 +1,22 @@
1
1
  # bexis-core-ui
2
+ ## v0.1.11
3
+ ### update
4
+ - MultiSelect
5
+ - grouped source also works now in case of complex source & return single value
2
6
 
3
- ## v0.1.9
7
+ ## v0.1.10
4
8
  ### update
5
9
  - MultiSelect
6
- - pass events - placeholder
7
10
  - set isMulti to false to get also a single value
8
11
 
9
12
 
13
+ ## v0.1.9
14
+ ### update
15
+ - MultiSelect
16
+ - pass events
17
+ - placeholder
18
+
19
+
10
20
  ## v0.1.8
11
21
  ### update
12
22
  - MultiSelect
@@ -131,6 +131,7 @@
131
131
  if(complexSource && complexTarget)
132
132
  {
133
133
  value = target;
134
+ groupBy = (item) => item[itemGroup]
134
135
  }
135
136
 
136
137
  if(complexSource && !complexTarget)
@@ -156,6 +157,15 @@
156
157
  multiple={isMulti}
157
158
  bind:value
158
159
  {placeholder}
160
+ on:change
161
+ on:input
162
+ on:focus
163
+ on:blur
164
+ on:clear
165
+ on:loaded
166
+ on:error
167
+ on:filter
168
+ on:hoverItem
159
169
  />
160
170
 
161
171
  </InputContainer>
@@ -16,6 +16,16 @@ export default class MultiSelect extends SvelteComponentTyped<{
16
16
  complexSource?: boolean | undefined;
17
17
  placeholder?: string | undefined;
18
18
  }, {
19
+ change: CustomEvent<any>;
20
+ input: CustomEvent<any>;
21
+ focus: CustomEvent<any>;
22
+ blur: CustomEvent<any>;
23
+ clear: CustomEvent<any>;
24
+ loaded: CustomEvent<any>;
25
+ error: CustomEvent<any>;
26
+ filter: CustomEvent<any>;
27
+ hoverItem: CustomEvent<any>;
28
+ } & {
19
29
  [evt: string]: CustomEvent<any>;
20
30
  }, {}> {
21
31
  }
@@ -40,6 +50,16 @@ declare const __propDef: {
40
50
  placeholder?: string | undefined;
41
51
  };
42
52
  events: {
53
+ change: CustomEvent<any>;
54
+ input: CustomEvent<any>;
55
+ focus: CustomEvent<any>;
56
+ blur: CustomEvent<any>;
57
+ clear: CustomEvent<any>;
58
+ loaded: CustomEvent<any>;
59
+ error: CustomEvent<any>;
60
+ filter: CustomEvent<any>;
61
+ hoverItem: CustomEvent<any>;
62
+ } & {
43
63
  [evt: string]: CustomEvent<any>;
44
64
  };
45
65
  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
- <h1 class="h1">{title}</h1>
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
- {#if links.length>0}
22
- <div class="py-5">
23
- {#each links as link}
24
- <a class="chip variant-ringed" href={link.url}>{link.label}</a>
25
- {/each}
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
- <slot/>
29
- </div>
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 -->
@@ -13,7 +13,10 @@ declare const __propDef: {
13
13
  };
14
14
  slots: {
15
15
  description: {};
16
+ left: {};
17
+ middle: {};
16
18
  default: {};
19
+ right: {};
17
20
  };
18
21
  };
19
22
  export type PageProps = typeof __propDef.props;
@@ -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-2/3">
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
- <div class="flex items-center md:space-x-5 px-3 text-lg">
31
- <MenuBar menuBar={menu.MenuBar} />
32
- <MenuBar menuBar={menu.Extended} />
33
- </div>
37
+
34
38
  {/if}
@@ -6,6 +6,7 @@ import Item from "./MenuItem.svelte";
6
6
  export let menuBar;
7
7
  let comboboxValue;
8
8
  let radomNumber = Math.floor(Math.random() * 100);
9
+ console.log(menuBar);
9
10
  </script>
10
11
 
11
12
 
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { MenuItem } from "../../models/menu";
2
+ import type { MenuItem } from "./menu";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  menuBar: MenuItem[];
@@ -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" bind:group={menubarItem.Title} name="medium" value={item.Title}>{item.Title}</ListBoxItem>
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>
@@ -1,7 +1,8 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { MenuItem } from "./menu";
2
3
  declare const __propDef: {
3
4
  props: {
4
- menubarItem: any;
5
+ menubarItem: MenuItem;
5
6
  comboboxValue: any;
6
7
  };
7
8
  events: {
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { MenuItem } from "../../models/menu";
2
+ import type { MenuItem } from "./menu";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  menuBar: MenuItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -131,6 +131,7 @@
131
131
  if(complexSource && complexTarget)
132
132
  {
133
133
  value = target;
134
+ groupBy = (item) => item[itemGroup]
134
135
  }
135
136
 
136
137
  if(complexSource && !complexTarget)
@@ -156,6 +157,15 @@
156
157
  multiple={isMulti}
157
158
  bind:value
158
159
  {placeholder}
160
+ on:change
161
+ on:input
162
+ on:focus
163
+ on:blur
164
+ on:clear
165
+ on:loaded
166
+ on:error
167
+ on:filter
168
+ on:hoverItem
159
169
  />
160
170
 
161
171
  </InputContainer>
@@ -19,22 +19,44 @@
19
19
  {/if}
20
20
 
21
21
  <div class="px-5 grid gap-5 content-center" >
22
- <h1 class="h1">{title}</h1>
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
- {#if links.length>0}
30
- <div class="py-5">
31
- {#each links as link}
32
- <a class="chip variant-ringed" href={link.url}>{link.label}</a>
33
- {/each}
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
- <slot/>
37
- </div>
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-2/3">
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
- <div class="flex items-center md:space-x-5 px-3 text-lg">
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 "../../models/menu";
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" bind:group={menubarItem.Title} name="medium" value={item.Title}>{item.Title}</ListBoxItem>
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 "../../models/menu";
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