@iankibetsh/shframework 5.4.6 → 5.4.8

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.
@@ -1,36 +1,4 @@
1
1
 
2
- .colored-toast.swal2-icon-success {
3
- background-color: #a5dc86 !important;
4
- }
5
-
6
- .colored-toast.swal2-icon-error {
7
- background-color: #f27474 !important;
8
- }
9
-
10
- .colored-toast.swal2-icon-warning {
11
- background-color: #f8bb86 !important;
12
- }
13
-
14
- .colored-toast.swal2-icon-info {
15
- background-color: #3fc3ee !important;
16
- }
17
-
18
- .colored-toast.swal2-icon-question {
19
- background-color: #87adbd !important;
20
- }
21
-
22
- .colored-toast .swal2-title {
23
- color: white;
24
- }
25
-
26
- .colored-toast .swal2-close {
27
- color: white;
28
- }
29
-
30
- .colored-toast .swal2-html-container {
31
- color: white;
32
- }
33
-
34
2
  .sh-phone{
35
3
  display: flex;
36
4
  width: 100%;
@@ -63,6 +31,38 @@
63
31
  opacity: 0.5;
64
32
  }
65
33
 
34
+ .colored-toast.swal2-icon-success {
35
+ background-color: #a5dc86 !important;
36
+ }
37
+
38
+ .colored-toast.swal2-icon-error {
39
+ background-color: #f27474 !important;
40
+ }
41
+
42
+ .colored-toast.swal2-icon-warning {
43
+ background-color: #f8bb86 !important;
44
+ }
45
+
46
+ .colored-toast.swal2-icon-info {
47
+ background-color: #3fc3ee !important;
48
+ }
49
+
50
+ .colored-toast.swal2-icon-question {
51
+ background-color: #87adbd !important;
52
+ }
53
+
54
+ .colored-toast .swal2-title {
55
+ color: white;
56
+ }
57
+
58
+ .colored-toast .swal2-close {
59
+ color: white;
60
+ }
61
+
62
+ .colored-toast .swal2-html-container {
63
+ color: white;
64
+ }
65
+
66
66
  .permissions-main {
67
67
  background: #edeff2;
68
68
  }
package/dist/library.js CHANGED
@@ -4160,7 +4160,7 @@ const useUserStore = pinia.defineStore('user-store', {
4160
4160
  loggedOut: false
4161
4161
  }),
4162
4162
  actions: {
4163
- setUser (){
4163
+ setUser (defaultEndpoint) {
4164
4164
  let user = null;
4165
4165
  try {
4166
4166
  user = shStorage.getItem('user') ? shStorage.getItem('user') : null;
@@ -4185,7 +4185,7 @@ const useUserStore = pinia.defineStore('user-store', {
4185
4185
  };
4186
4186
  }
4187
4187
  this.user = user;
4188
- const userEndpoint = vue.inject('userEndpoint','auth/user') ?? 'auth/user?defaults=1';
4188
+ const userEndpoint = defaultEndpoint ?? vue.inject('userEndpoint','auth/user') ?? 'auth/user?defaults=1';
4189
4189
 
4190
4190
  shApis.doGet(userEndpoint).then(res => {
4191
4191
  let user = res.data.user;
@@ -6087,6 +6087,7 @@ const setTab = (tab) => {
6087
6087
  }
6088
6088
  };
6089
6089
  const setTabCounts = (tabCounts) => {
6090
+ console.log('Setting tab counts', tabCounts);
6090
6091
  if (typeof tabCounts === 'object') {
6091
6092
  setCounts(tabCounts);
6092
6093
  } else {
@@ -6102,8 +6103,12 @@ const resetTabCounts = () => {
6102
6103
  } else {
6103
6104
  setTab(arr[arr.length - 1]);
6104
6105
  }
6106
+ let tbCounts = props.tabCounts;
6107
+ if(!tbCounts && typeof props.tabs[0] == 'object'){
6108
+ tbCounts = props.tabs;
6109
+ }
6105
6110
  if (props.tabCounts) {
6106
- setTabCounts(props.tabCounts);
6111
+ setTabCounts(tbCounts);
6107
6112
  }
6108
6113
  };
6109
6114
  const tabExistsInUrl = () => {
@@ -6118,6 +6123,7 @@ const tabExistsInUrl = () => {
6118
6123
  };
6119
6124
  const setCounts = (res) => {
6120
6125
  Object.keys(res).forEach(key => {
6126
+ console.log('Setting count for tab', key, res[key]);
6121
6127
  let elem = document.getElementsByClassName('sh_tab_' + key);
6122
6128
  if (elem.length > 0) {
6123
6129
  elem = elem[0];
package/dist/library.mjs CHANGED
@@ -4148,7 +4148,7 @@ const useUserStore = defineStore('user-store', {
4148
4148
  loggedOut: false
4149
4149
  }),
4150
4150
  actions: {
4151
- setUser (){
4151
+ setUser (defaultEndpoint) {
4152
4152
  let user = null;
4153
4153
  try {
4154
4154
  user = shStorage.getItem('user') ? shStorage.getItem('user') : null;
@@ -4173,7 +4173,7 @@ const useUserStore = defineStore('user-store', {
4173
4173
  };
4174
4174
  }
4175
4175
  this.user = user;
4176
- const userEndpoint = inject('userEndpoint','auth/user') ?? 'auth/user?defaults=1';
4176
+ const userEndpoint = defaultEndpoint ?? inject('userEndpoint','auth/user') ?? 'auth/user?defaults=1';
4177
4177
 
4178
4178
  shApis.doGet(userEndpoint).then(res => {
4179
4179
  let user = res.data.user;
@@ -6075,6 +6075,7 @@ const setTab = (tab) => {
6075
6075
  }
6076
6076
  };
6077
6077
  const setTabCounts = (tabCounts) => {
6078
+ console.log('Setting tab counts', tabCounts);
6078
6079
  if (typeof tabCounts === 'object') {
6079
6080
  setCounts(tabCounts);
6080
6081
  } else {
@@ -6090,8 +6091,12 @@ const resetTabCounts = () => {
6090
6091
  } else {
6091
6092
  setTab(arr[arr.length - 1]);
6092
6093
  }
6094
+ let tbCounts = props.tabCounts;
6095
+ if(!tbCounts && typeof props.tabs[0] == 'object'){
6096
+ tbCounts = props.tabs;
6097
+ }
6093
6098
  if (props.tabCounts) {
6094
- setTabCounts(props.tabCounts);
6099
+ setTabCounts(tbCounts);
6095
6100
  }
6096
6101
  };
6097
6102
  const tabExistsInUrl = () => {
@@ -6106,6 +6111,7 @@ const tabExistsInUrl = () => {
6106
6111
  };
6107
6112
  const setCounts = (res) => {
6108
6113
  Object.keys(res).forEach(key => {
6114
+ console.log('Setting count for tab', key, res[key]);
6109
6115
  let elem = document.getElementsByClassName('sh_tab_' + key);
6110
6116
  if (elem.length > 0) {
6111
6117
  elem = elem[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.4.6",
3
+ "version": "5.4.8",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",