@bexis2/bexis2-core-ui 0.4.24 → 0.4.25

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,4 +1,8 @@
1
1
  # bexis-core-ui
2
+ ## 0.4.25
3
+ - menu
4
+ - add internal & target to menuItemType to support handle menuEntries open in same or other window
5
+
2
6
  ## 0.4.24
3
7
  - Table
4
8
  - Adds option for enabling/disabling show/hide column menu in table.
@@ -1,4 +1,4 @@
1
- <script>import { ListBox, ListBoxItem } from "@skeletonlabs/skeleton";
1
+ <script>import { ListBox, ListBoxItem, TreeViewItem } from "@skeletonlabs/skeleton";
2
2
  import { goTo } from "../../../services/BaseCaller";
3
3
  export let items;
4
4
  let lastModule = "";
@@ -20,7 +20,7 @@ function clickFn(item) {
20
20
  logOffFn();
21
21
  return;
22
22
  } else {
23
- goTo(item.Url);
23
+ goTo(item.Url, item.Internal, item.Target);
24
24
  }
25
25
  }
26
26
  async function logOffFn() {
@@ -21,6 +21,7 @@ export interface menuItemType {
21
21
  Url: string;
22
22
  Target: string;
23
23
  Module: string;
24
+ Internal: boolean;
24
25
  Items: menuItemType[];
25
26
  }
26
27
  export interface logoType {
@@ -1 +1 @@
1
- export function goTo(url: any, intern?: boolean): Promise<void>;
1
+ export function goTo(url: any, intern?: boolean, target?: string): Promise<void>;
@@ -3,11 +3,11 @@
3
3
  import { host } from '../stores/apiStores';
4
4
 
5
5
  // go to a internal action
6
- export const goTo = async (url, intern = true) => {
6
+ export const goTo = async (url, intern = true, target="_self") => {
7
7
  if (intern == true) {
8
8
  // go to inside bexis2
9
9
  if (window != null && host != null && url != null) {
10
- window.open(host + url, '_self')?.focus();
10
+ window.open(host + url, target)?.focus();
11
11
  }
12
12
  } // go to a external page
13
13
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.24",
3
+ "version": "0.4.25",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
2
+ import { ListBox, ListBoxItem, TreeViewItem } from '@skeletonlabs/skeleton';
3
3
  import type { menuItemType } from '../../../models/Page';
4
4
  import { goTo } from '../../../services/BaseCaller';
5
5
 
@@ -31,7 +31,7 @@
31
31
  return;
32
32
  }
33
33
  else{
34
- goTo(item.Url)
34
+ goTo(item.Url, item.Internal, item.Target);
35
35
  }
36
36
  }
37
37
 
@@ -29,6 +29,7 @@ export interface menuItemType {
29
29
  Url: string;
30
30
  Target: string;
31
31
  Module: string;
32
+ Internal: boolean;
32
33
  Items: menuItemType[];
33
34
  }
34
35
 
@@ -3,11 +3,11 @@
3
3
  import { host } from '$store/apiStores';
4
4
 
5
5
  // go to a internal action
6
- export const goTo = async (url, intern = true) => {
6
+ export const goTo = async (url, intern = true, target="_self") => {
7
7
  if (intern == true) {
8
8
  // go to inside bexis2
9
9
  if (window != null && host != null && url != null) {
10
- window.open(host + url, '_self')?.focus();
10
+ window.open(host + url, target)?.focus();
11
11
  }
12
12
  } // go to a external page
13
13
  else {