@bexis2/bexis2-core-ui 0.3.8 → 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,5 +1,9 @@
1
1
  # bexis-core-ui
2
2
 
3
+ ## 0.3.9
4
+
5
+ - add application name into the breadcrumb component
6
+
3
7
  ## 0.3.8
4
8
 
5
9
  - change home within breadcrumb from "app"-based home to "/" in general
@@ -1,5 +1,7 @@
1
1
  <script>import { breadcrumbStore } from "../../../stores/pageStores";
2
2
  import { browser } from "$app/environment";
3
+ import { onMount } from "svelte";
4
+ import { getApplicationName } from "./BreadcrumbDataCaller";
3
5
  export let title;
4
6
  $:
5
7
  update(title);
@@ -15,12 +17,16 @@ $:
15
17
  breadcrumbStore.subscribe((value) => {
16
18
  list = value?.items;
17
19
  });
20
+ let applicationName = "BEXIS2";
21
+ onMount(async () => {
22
+ applicationName = await getApplicationName();
23
+ });
18
24
  </script>
19
25
 
20
26
  <div class="px-5 py-2">
21
27
  <ol class="breadcrumb -p50">
22
28
  <!--default home-->
23
- <li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
29
+ <li class="crumb"><a class="anchor" href={'/'}>{applicationName} (Home)</a></li>
24
30
  <li class="crumb-separator" aria-hidden>&rsaquo;</li>
25
31
 
26
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.8",
3
+ "version": "0.3.9",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -2,6 +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 { onMount } from 'svelte';
6
+ import {getApplicationName} from './BreadcrumbDataCaller';
5
7
 
6
8
  export let title;
7
9
 
@@ -19,12 +21,19 @@
19
21
  $: breadcrumbStore.subscribe((value) => {
20
22
  list = value?.items;
21
23
  });
24
+
25
+ let applicationName = "BEXIS2";
26
+
27
+ onMount(async () => {
28
+ applicationName = await getApplicationName();
29
+ });
30
+
22
31
  </script>
23
32
 
24
33
  <div class="px-5 py-2">
25
34
  <ol class="breadcrumb -p50">
26
35
  <!--default home-->
27
- <li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
36
+ <li class="crumb"><a class="anchor" href={'/'}>{applicationName} (Home)</a></li>
28
37
  <li class="crumb-separator" aria-hidden>&rsaquo;</li>
29
38
 
30
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
+ }