@iankibetsh/shframework 0.6.2 → 0.6.3

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/dist/library.js CHANGED
@@ -100,7 +100,7 @@ function doPost (endPoint, data) {
100
100
  )
101
101
  }
102
102
 
103
- var shApis$1 = {
103
+ var shApis = {
104
104
  doGet,
105
105
  doPost
106
106
  };
@@ -1855,7 +1855,7 @@ function filterData(e){
1855
1855
  }
1856
1856
  });
1857
1857
  } else {
1858
- shApis$1.doGet(props.fillSelects.url, { all: 1,filter_value: filterValue }).then(res => {
1858
+ shApis.doGet(props.fillSelects.url, { all: 1,filter_value: filterValue }).then(res => {
1859
1859
  suggestions.value = res.data.data;
1860
1860
  }).catch(res => {
1861
1861
  console.log(res);
@@ -2122,7 +2122,7 @@ var script$8 = {
2122
2122
  Object.keys(this.form_files).forEach(key => {
2123
2123
  data.append(key, this.form_files[key].value);
2124
2124
  });
2125
- shApis$1.doPost(this.action, data).then(res => {
2125
+ shApis.doPost(this.action, data).then(res => {
2126
2126
  // console.log(res)
2127
2127
  this.form_status = 2;
2128
2128
  Object.keys(this.form_elements).forEach(key => {
@@ -2210,7 +2210,7 @@ var script$8 = {
2210
2210
  this.selectData = selectData;
2211
2211
  console.log(this.selectData);
2212
2212
  } else {
2213
- shApis$1.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2213
+ shApis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2214
2214
  // selectData[key] = res.data
2215
2215
  // console.log(res)
2216
2216
  this.selectData[key] = res.data.data;
@@ -2842,11 +2842,11 @@ function swalHttpError (reason) {
2842
2842
  }
2843
2843
 
2844
2844
  function runSilentRequest (url) {
2845
- return shApis$1.doPost(url)
2845
+ return shApis.doPost(url)
2846
2846
  }
2847
2847
 
2848
2848
  function setTabCounts (url) {
2849
- shApis$1.doGet(url).then(res => {
2849
+ shApis.doGet(url).then(res => {
2850
2850
  Object.keys(res.data).forEach(key => {
2851
2851
  const elem = document.getElementById(key);
2852
2852
  if (elem === null) {
@@ -2893,7 +2893,7 @@ function formatHttpCatchError (reason) {
2893
2893
  return error
2894
2894
  }
2895
2895
  function getMenuCount (url) {
2896
- shApis$1.doGet(url).then(res => {
2896
+ shApis.doGet(url).then(res => {
2897
2897
  console.log(res);
2898
2898
  });
2899
2899
  }
@@ -2936,7 +2936,7 @@ async function runPlainRequest (url, message, title, data) {
2936
2936
  reverseButtons: true,
2937
2937
  showLoaderOnConfirm: true,
2938
2938
  preConfirm: () => {
2939
- return shApis$1.doPost(url, data).then(function (response) {
2939
+ return shApis.doPost(url, data).then(function (response) {
2940
2940
  Swal__default["default"].fire('Success!', 'Action completed successfully', 'success');
2941
2941
  return {
2942
2942
  response: response.data,
@@ -3104,7 +3104,7 @@ var script$4 = {
3104
3104
  titles: headers,
3105
3105
  export: 1
3106
3106
  };
3107
- shApis$1.doPost(this.endPoint, data).then(res => {
3107
+ shApis.doPost(this.endPoint, data).then(res => {
3108
3108
  this.downloading = false;
3109
3109
  if (res.data.file) {
3110
3110
  const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
@@ -3134,7 +3134,7 @@ var script$4 = {
3134
3134
  if (this.pagination_data) {
3135
3135
  this.pagination_data.loading = 1;
3136
3136
  }
3137
- shApis$1.doGet(this.endPoint, data).then(req => {
3137
+ shApis.doGet(this.endPoint, data).then(req => {
3138
3138
  this.loading = 'done';
3139
3139
  const response = req.data.data;
3140
3140
  this.pagination_data = {
@@ -3728,7 +3728,7 @@ var script$3 = {
3728
3728
  if (typeof tabCounts === 'object') {
3729
3729
  this.setCounts(tabCounts);
3730
3730
  } else {
3731
- shApis$1.doGet(tabCounts).then(res => {
3731
+ shApis.doGet(tabCounts).then(res => {
3732
3732
  this.setCounts(res.data);
3733
3733
  });
3734
3734
  }
@@ -3927,7 +3927,7 @@ const useUserStore = pinia.defineStore('user-store', {
3927
3927
  };
3928
3928
  }
3929
3929
  this.user = user;
3930
- shApis$1.doGet('auth/user').then(res => {
3930
+ shApis.doGet('auth/user').then(res => {
3931
3931
  const user = res.data;
3932
3932
  ShStorage.setItem('user',res.data);
3933
3933
  user.isAllowedTo = function (slug) {
@@ -4007,7 +4007,7 @@ let reload = vue.ref(0);
4007
4007
  vue.ref(null);
4008
4008
 
4009
4009
  vue.onMounted(() => {
4010
- shApis$1.doGet('admin/departments/all-permissions').then(res => {
4010
+ shApis.doGet('admin/departments/all-permissions').then(res => {
4011
4011
  allPermissions.value = res.data;
4012
4012
  });
4013
4013
  });
@@ -4291,7 +4291,7 @@ exports.ShModal = script$6;
4291
4291
  exports.ShPhone = script$b;
4292
4292
  exports.ShTable = script$4;
4293
4293
  exports.ShTabs = script$3;
4294
- exports.shApis = shApis$1;
4294
+ exports.shApis = shApis;
4295
4295
  exports.shRepo = shRepo$1;
4296
4296
  exports.shStorage = ShStorage;
4297
4297
  exports.useUserStore = useUserStore;
package/dist/library.mjs CHANGED
@@ -88,7 +88,7 @@ function doPost (endPoint, data) {
88
88
  )
89
89
  }
90
90
 
91
- var shApis$1 = {
91
+ var shApis = {
92
92
  doGet,
93
93
  doPost
94
94
  };
@@ -1843,7 +1843,7 @@ function filterData(e){
1843
1843
  }
1844
1844
  });
1845
1845
  } else {
1846
- shApis$1.doGet(props.fillSelects.url, { all: 1,filter_value: filterValue }).then(res => {
1846
+ shApis.doGet(props.fillSelects.url, { all: 1,filter_value: filterValue }).then(res => {
1847
1847
  suggestions.value = res.data.data;
1848
1848
  }).catch(res => {
1849
1849
  console.log(res);
@@ -2110,7 +2110,7 @@ var script$8 = {
2110
2110
  Object.keys(this.form_files).forEach(key => {
2111
2111
  data.append(key, this.form_files[key].value);
2112
2112
  });
2113
- shApis$1.doPost(this.action, data).then(res => {
2113
+ shApis.doPost(this.action, data).then(res => {
2114
2114
  // console.log(res)
2115
2115
  this.form_status = 2;
2116
2116
  Object.keys(this.form_elements).forEach(key => {
@@ -2198,7 +2198,7 @@ var script$8 = {
2198
2198
  this.selectData = selectData;
2199
2199
  console.log(this.selectData);
2200
2200
  } else {
2201
- shApis$1.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2201
+ shApis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2202
2202
  // selectData[key] = res.data
2203
2203
  // console.log(res)
2204
2204
  this.selectData[key] = res.data.data;
@@ -2830,11 +2830,11 @@ function swalHttpError (reason) {
2830
2830
  }
2831
2831
 
2832
2832
  function runSilentRequest (url) {
2833
- return shApis$1.doPost(url)
2833
+ return shApis.doPost(url)
2834
2834
  }
2835
2835
 
2836
2836
  function setTabCounts (url) {
2837
- shApis$1.doGet(url).then(res => {
2837
+ shApis.doGet(url).then(res => {
2838
2838
  Object.keys(res.data).forEach(key => {
2839
2839
  const elem = document.getElementById(key);
2840
2840
  if (elem === null) {
@@ -2881,7 +2881,7 @@ function formatHttpCatchError (reason) {
2881
2881
  return error
2882
2882
  }
2883
2883
  function getMenuCount (url) {
2884
- shApis$1.doGet(url).then(res => {
2884
+ shApis.doGet(url).then(res => {
2885
2885
  console.log(res);
2886
2886
  });
2887
2887
  }
@@ -2924,7 +2924,7 @@ async function runPlainRequest (url, message, title, data) {
2924
2924
  reverseButtons: true,
2925
2925
  showLoaderOnConfirm: true,
2926
2926
  preConfirm: () => {
2927
- return shApis$1.doPost(url, data).then(function (response) {
2927
+ return shApis.doPost(url, data).then(function (response) {
2928
2928
  Swal.fire('Success!', 'Action completed successfully', 'success');
2929
2929
  return {
2930
2930
  response: response.data,
@@ -3092,7 +3092,7 @@ var script$4 = {
3092
3092
  titles: headers,
3093
3093
  export: 1
3094
3094
  };
3095
- shApis$1.doPost(this.endPoint, data).then(res => {
3095
+ shApis.doPost(this.endPoint, data).then(res => {
3096
3096
  this.downloading = false;
3097
3097
  if (res.data.file) {
3098
3098
  const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
@@ -3122,7 +3122,7 @@ var script$4 = {
3122
3122
  if (this.pagination_data) {
3123
3123
  this.pagination_data.loading = 1;
3124
3124
  }
3125
- shApis$1.doGet(this.endPoint, data).then(req => {
3125
+ shApis.doGet(this.endPoint, data).then(req => {
3126
3126
  this.loading = 'done';
3127
3127
  const response = req.data.data;
3128
3128
  this.pagination_data = {
@@ -3716,7 +3716,7 @@ var script$3 = {
3716
3716
  if (typeof tabCounts === 'object') {
3717
3717
  this.setCounts(tabCounts);
3718
3718
  } else {
3719
- shApis$1.doGet(tabCounts).then(res => {
3719
+ shApis.doGet(tabCounts).then(res => {
3720
3720
  this.setCounts(res.data);
3721
3721
  });
3722
3722
  }
@@ -3915,7 +3915,7 @@ const useUserStore = defineStore('user-store', {
3915
3915
  };
3916
3916
  }
3917
3917
  this.user = user;
3918
- shApis$1.doGet('auth/user').then(res => {
3918
+ shApis.doGet('auth/user').then(res => {
3919
3919
  const user = res.data;
3920
3920
  ShStorage.setItem('user',res.data);
3921
3921
  user.isAllowedTo = function (slug) {
@@ -3995,7 +3995,7 @@ let reload = ref(0);
3995
3995
  ref(null);
3996
3996
 
3997
3997
  onMounted(() => {
3998
- shApis$1.doGet('admin/departments/all-permissions').then(res => {
3998
+ shApis.doGet('admin/departments/all-permissions').then(res => {
3999
3999
  allPermissions.value = res.data;
4000
4000
  });
4001
4001
  });
@@ -4271,4 +4271,4 @@ const ShFrontend = {
4271
4271
  }
4272
4272
  };
4273
4273
 
4274
- export { script$7 as ShCanvas, script$2 as ShDynamicTabs, script$8 as ShForm, ShFrontend, script$6 as ShModal, script$b as ShPhone, script$4 as ShTable, script$3 as ShTabs, shApis$1 as shApis, shRepo$1 as shRepo, ShStorage as shStorage, useUserStore };
4274
+ export { script$7 as ShCanvas, script$2 as ShDynamicTabs, script$8 as ShForm, ShFrontend, script$6 as ShModal, script$b as ShPhone, script$4 as ShTable, script$3 as ShTabs, shApis, shRepo$1 as shRepo, ShStorage as shStorage, useUserStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",