@bexis2/bexis2-core-ui 0.3.7 → 0.3.9

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,14 @@
1
1
  # bexis-core-ui
2
+
3
+ ## 0.3.9
4
+
5
+ - add application name into the breadcrumb component
6
+
7
+ ## 0.3.8
8
+
9
+ - change home within breadcrumb from "app"-based home to "/" in general
10
+ - There was an issue in case the application is routing through sub-apps. By that, "home" was redirecting to the home of the sub-app, but not to the general "/" anymore.
11
+
2
12
  ## 0.3.7
3
13
 
4
14
  - listeItemType
@@ -6,7 +16,7 @@
6
16
 
7
17
  ## 0.3.6
8
18
 
9
- - FileUpload
19
+ - FileUpload
10
20
  - add progressbar during upload
11
21
  - Table
12
22
  - fix update issue with first row entry
@@ -16,7 +26,6 @@
16
26
  - listeItemType
17
27
  - add description
18
28
 
19
-
20
29
  ## 0.3.4
21
30
 
22
31
  - Page
@@ -1,6 +1,7 @@
1
1
  <script>import { breadcrumbStore } from "../../../stores/pageStores";
2
2
  import { browser } from "$app/environment";
3
- import { base } from "$app/paths";
3
+ import { onMount } from "svelte";
4
+ import { getApplicationName } from "./BreadcrumbDataCaller";
4
5
  export let title;
5
6
  $:
6
7
  update(title);
@@ -16,12 +17,16 @@ $:
16
17
  breadcrumbStore.subscribe((value) => {
17
18
  list = value?.items;
18
19
  });
20
+ let applicationName = "BEXIS2";
21
+ onMount(async () => {
22
+ applicationName = await getApplicationName();
23
+ });
19
24
  </script>
20
25
 
21
26
  <div class="px-5 py-2">
22
27
  <ol class="breadcrumb -p50">
23
28
  <!--default home-->
24
- <li class="crumb"><a class="anchor" href={base + '/'}>Home</a></li>
29
+ <li class="crumb"><a class="anchor" href={'/'}>{applicationName} (Home)</a></li>
25
30
  <li class="crumb-separator" aria-hidden>&rsaquo;</li>
26
31
 
27
32
  {#each list as crumb, i}
@@ -0,0 +1 @@
1
+ export function getApplicationName(): Promise<any>;
@@ -0,0 +1,19 @@
1
+ import { Api } from '../../../services/Api';
2
+
3
+ export const getApplicationName = async () => {
4
+ try
5
+ {
6
+ const response = await Api.get(`/Home/GetApplicationName`);
7
+
8
+ if(response.status == 200)
9
+ {
10
+ return response.data;
11
+ }
12
+ else
13
+ {
14
+ return "BEXIS2";
15
+ }
16
+ } catch (error) {
17
+ return "BEXIS2"
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -2,7 +2,8 @@
2
2
  import { breadcrumbStore } from '$store/pageStores';
3
3
  import type { breadcrumbItemType } from '$models/Page';
4
4
  import { browser } from '$app/environment';
5
- import { base } from '$app/paths';
5
+ import { onMount } from 'svelte';
6
+ import {getApplicationName} from './BreadcrumbDataCaller';
6
7
 
7
8
  export let title;
8
9
 
@@ -20,12 +21,19 @@
20
21
  $: breadcrumbStore.subscribe((value) => {
21
22
  list = value?.items;
22
23
  });
24
+
25
+ let applicationName = "BEXIS2";
26
+
27
+ onMount(async () => {
28
+ applicationName = await getApplicationName();
29
+ });
30
+
23
31
  </script>
24
32
 
25
33
  <div class="px-5 py-2">
26
34
  <ol class="breadcrumb -p50">
27
35
  <!--default home-->
28
- <li class="crumb"><a class="anchor" href={base + '/'}>Home</a></li>
36
+ <li class="crumb"><a class="anchor" href={'/'}>{applicationName} (Home)</a></li>
29
37
  <li class="crumb-separator" aria-hidden>&rsaquo;</li>
30
38
 
31
39
  {#each list as crumb, i}
@@ -0,0 +1,19 @@
1
+ import { Api } from '$lib/services/Api';
2
+
3
+ export const getApplicationName = async () => {
4
+ try
5
+ {
6
+ const response = await Api.get(`/Home/GetApplicationName`);
7
+
8
+ if(response.status == 200)
9
+ {
10
+ return response.data;
11
+ }
12
+ else
13
+ {
14
+ return "BEXIS2";
15
+ }
16
+ } catch (error) {
17
+ return "BEXIS2"
18
+ }
19
+ }