@bexis2/bexis2-core-ui 0.4.51 → 0.4.52

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.
@@ -15,6 +15,7 @@ storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
15
15
  import Docs from "./Docs.svelte";
16
16
  import GoToTop from "./GoToTop.svelte";
17
17
  import { getAntiForgeryToken } from "./PageCaller";
18
+ import { isNullOrUndefined } from "util";
18
19
  export let title = "";
19
20
  export let note = "";
20
21
  export let links = [];
@@ -23,6 +24,7 @@ export let footer = true;
23
24
  export let help = false;
24
25
  export let contentLayoutType = pageContentLayoutType.center;
25
26
  export let fixLeft = true;
27
+ let aftIsReady = false;
26
28
  errorStore.subscribe((error) => {
27
29
  console.log("\u{1F680} ~ errorStore.subscribe ~ value:", error.error);
28
30
  notificationStore.showNotification({
@@ -37,6 +39,11 @@ onMount(async () => {
37
39
  const data = await getAntiForgeryToken();
38
40
  csrfTokenStore.set(data.csrfToken);
39
41
  });
42
+ csrfTokenStore.subscribe((value) => {
43
+ if (value.length > 0) {
44
+ aftIsReady = true;
45
+ }
46
+ });
40
47
  let app;
41
48
  function scrollToTop() {
42
49
  app.scrollIntoView();
@@ -64,6 +71,8 @@ function scrollToTop() {
64
71
 
65
72
  <slot name="description" />
66
73
 
74
+ {#if aftIsReady}
75
+
67
76
  <div class="flex flex-initial space-x-5">
68
77
  {#if $$slots.left}
69
78
  <div class="p-5 flex-shrink-0 w-96 w-min-96 border-y border-solid border-surface-500">
@@ -92,7 +101,7 @@ function scrollToTop() {
92
101
  {/if}
93
102
  </div>
94
103
 
95
-
104
+ {/if}
96
105
 
97
106
  <GoToTop/>
98
107
  <HelpPopUp active={help} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.51",
3
+ "version": "0.4.52",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -28,6 +28,7 @@ import type { helpItemType, helpStoreType } from '$models/Models';
28
28
  import Docs from './Docs.svelte';
29
29
  import GoToTop from './GoToTop.svelte';
30
30
  import { getAntiForgeryToken } from './PageCaller';
31
+ import { isNullOrUndefined } from 'util';
31
32
 
32
33
  export let title = '';
33
34
  export let note = '';
@@ -40,6 +41,8 @@ import type { helpItemType, helpStoreType } from '$models/Models';
40
41
  export let contentLayoutType: pageContentLayoutType = pageContentLayoutType.center;
41
42
  export let fixLeft: boolean = true;
42
43
 
44
+ let aftIsReady = false;
45
+
43
46
  errorStore.subscribe((error:errorType) => {
44
47
  console.log("🚀 ~ errorStore.subscribe ~ value:", error.error)
45
48
  notificationStore.showNotification({
@@ -52,11 +55,18 @@ import type { helpItemType, helpStoreType } from '$models/Models';
52
55
  console.log('page');
53
56
  breadcrumbStore.clean();
54
57
  breadcrumbStore.addItem({ label: title, link: window.location.pathname });
55
-
56
58
  const data = await getAntiForgeryToken();
57
59
  csrfTokenStore.set(data.csrfToken);
58
60
  });
59
61
 
62
+
63
+ csrfTokenStore.subscribe(value => {
64
+ if(value.length>0){
65
+ aftIsReady = true;
66
+ }
67
+ });
68
+
69
+
60
70
  let app;
61
71
  function scrollToTop() {
62
72
  app.scrollIntoView();
@@ -85,6 +95,8 @@ import type { helpItemType, helpStoreType } from '$models/Models';
85
95
 
86
96
  <slot name="description" />
87
97
 
98
+ {#if aftIsReady}
99
+
88
100
  <div class="flex flex-initial space-x-5">
89
101
  {#if $$slots.left}
90
102
  <div class="p-5 flex-shrink-0 w-96 w-min-96 border-y border-solid border-surface-500">
@@ -113,7 +125,7 @@ import type { helpItemType, helpStoreType } from '$models/Models';
113
125
  {/if}
114
126
  </div>
115
127
 
116
-
128
+ {/if}
117
129
 
118
130
  <GoToTop/>
119
131
  <HelpPopUp active={help} />