@iankibetsh/shframework 5.0.8 → 5.1.0

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,4 +1,36 @@
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
+
2
34
  .sh-phone{
3
35
  display: flex;
4
36
  width: 100%;
@@ -31,36 +63,20 @@
31
63
  opacity: 0.5;
32
64
  }
33
65
 
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;
66
+ .sh-selected-item{
67
+ line-height: unset!important;
52
68
  }
53
-
54
- .colored-toast .swal2-title {
55
- color: white;
69
+ .sh-suggestion-input{
70
+ padding: 0.375rem 0.75rem;
56
71
  }
57
-
58
- .colored-toast .swal2-close {
59
- color: white;
72
+ .sh-suggest{
73
+ margin-bottom: 1rem;
74
+ padding: 0rem 0rem;
60
75
  }
61
-
62
- .colored-toast .swal2-html-container {
63
- color: white;
76
+ .sh-suggest-control::after{
77
+ margin-top: auto;
78
+ margin-bottom: auto;
79
+ margin-right: 0.255em;
64
80
  }
65
81
 
66
82
  .permissions-main {
@@ -95,22 +111,6 @@
95
111
  flex-grow: 1;
96
112
  }
97
113
 
98
- .sh-selected-item{
99
- line-height: unset!important;
100
- }
101
- .sh-suggestion-input{
102
- padding: 0.375rem 0.75rem;
103
- }
104
- .sh-suggest{
105
- margin-bottom: 1rem;
106
- padding: 0rem 0rem;
107
- }
108
- .sh-suggest-control::after{
109
- margin-top: auto;
110
- margin-bottom: auto;
111
- margin-right: 0.255em;
112
- }
113
-
114
114
  .callout{
115
115
  --bs-link-color-rgb: 110,168,254;
116
116
  --bs-code-color: #e685b5;
package/dist/library.js CHANGED
@@ -225,41 +225,22 @@ async function runPlainRequest(url, message, title, data){
225
225
  reverseButtons: true,
226
226
  showLoaderOnConfirm: true,
227
227
  preConfirm: () => {
228
- return shApis.doPost(url, data)
229
- .then(response => {
230
- return {
231
- response: response.data,
232
- success: true
233
- };
234
- })
228
+ return shApis.doPost(url, data).then(function (response){
229
+ return {
230
+ response: response.data,
231
+ success: true
232
+ }
233
+ })
235
234
  .catch(error => {
236
235
  return {
237
236
  success: false,
238
237
  error: error,
239
238
  message: error.message
240
- };
241
- });
239
+ }
240
+ })
242
241
  },
243
242
  allowOutsideClick: () => !Swal__default["default"].isLoading()
244
- }).then((result) => {
245
- if (result.isDismissed) {
246
- // Handle the cancel action
247
- throw new Error();
248
- }
249
-
250
- // Continue processing on confirm
251
- if (result.isConfirmed) {
252
- const { success, response, error } = result.value;
253
- if (!success) {
254
- // Handle the API error
255
- console.error('API error:', error);
256
- throw new Error('API request failed: ' + error.message);
257
- }
258
- // Handle the successful response
259
- return response;
260
- }
261
- });
262
-
243
+ })
263
244
  }
264
245
  async function confirmAction(title,message){
265
246
  if (typeof title === 'undefined') {
@@ -5996,6 +5977,14 @@ vue.watch(()=>props.tabCounts, () => {
5996
5977
  resetTabCounts();
5997
5978
  });
5998
5979
 
5980
+ vue.watch(()=>route.path,()=>{
5981
+ route.fullPath.split('/');
5982
+ if (!tabExistsInUrl()) {
5983
+ resetTabCounts();
5984
+ }
5985
+
5986
+ });
5987
+
5999
5988
  vue.watch(()=>route.path,(newPath)=>{
6000
5989
  path.value = newPath;
6001
5990
  });
package/dist/library.mjs CHANGED
@@ -213,41 +213,22 @@ async function runPlainRequest(url, message, title, data){
213
213
  reverseButtons: true,
214
214
  showLoaderOnConfirm: true,
215
215
  preConfirm: () => {
216
- return shApis.doPost(url, data)
217
- .then(response => {
218
- return {
219
- response: response.data,
220
- success: true
221
- };
222
- })
216
+ return shApis.doPost(url, data).then(function (response){
217
+ return {
218
+ response: response.data,
219
+ success: true
220
+ }
221
+ })
223
222
  .catch(error => {
224
223
  return {
225
224
  success: false,
226
225
  error: error,
227
226
  message: error.message
228
- };
229
- });
227
+ }
228
+ })
230
229
  },
231
230
  allowOutsideClick: () => !Swal.isLoading()
232
- }).then((result) => {
233
- if (result.isDismissed) {
234
- // Handle the cancel action
235
- throw new Error();
236
- }
237
-
238
- // Continue processing on confirm
239
- if (result.isConfirmed) {
240
- const { success, response, error } = result.value;
241
- if (!success) {
242
- // Handle the API error
243
- console.error('API error:', error);
244
- throw new Error('API request failed: ' + error.message);
245
- }
246
- // Handle the successful response
247
- return response;
248
- }
249
- });
250
-
231
+ })
251
232
  }
252
233
  async function confirmAction(title,message){
253
234
  if (typeof title === 'undefined') {
@@ -5984,6 +5965,14 @@ watch(()=>props.tabCounts, () => {
5984
5965
  resetTabCounts();
5985
5966
  });
5986
5967
 
5968
+ watch(()=>route.path,()=>{
5969
+ route.fullPath.split('/');
5970
+ if (!tabExistsInUrl()) {
5971
+ resetTabCounts();
5972
+ }
5973
+
5974
+ });
5975
+
5987
5976
  watch(()=>route.path,(newPath)=>{
5988
5977
  path.value = newPath;
5989
5978
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.0.8",
3
+ "version": "5.1.0",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",