@iankibetsh/shframework 0.6.2 → 0.6.4

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);
@@ -1888,6 +1888,7 @@ return (_ctx, _cache) => {
1888
1888
  vue.createElementVNode("div", {
1889
1889
  id: 'input_' + vue.unref(id),
1890
1890
  contenteditable: "true",
1891
+ onClick: filterData,
1891
1892
  onInput: filterData,
1892
1893
  class: "flex-fill h-100 sh-suggestion-input"
1893
1894
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
@@ -2122,7 +2123,7 @@ var script$8 = {
2122
2123
  Object.keys(this.form_files).forEach(key => {
2123
2124
  data.append(key, this.form_files[key].value);
2124
2125
  });
2125
- shApis$1.doPost(this.action, data).then(res => {
2126
+ shApis.doPost(this.action, data).then(res => {
2126
2127
  // console.log(res)
2127
2128
  this.form_status = 2;
2128
2129
  Object.keys(this.form_elements).forEach(key => {
@@ -2210,7 +2211,7 @@ var script$8 = {
2210
2211
  this.selectData = selectData;
2211
2212
  console.log(this.selectData);
2212
2213
  } else {
2213
- shApis$1.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2214
+ shApis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2214
2215
  // selectData[key] = res.data
2215
2216
  // console.log(res)
2216
2217
  this.selectData[key] = res.data.data;
@@ -2842,11 +2843,11 @@ function swalHttpError (reason) {
2842
2843
  }
2843
2844
 
2844
2845
  function runSilentRequest (url) {
2845
- return shApis$1.doPost(url)
2846
+ return shApis.doPost(url)
2846
2847
  }
2847
2848
 
2848
2849
  function setTabCounts (url) {
2849
- shApis$1.doGet(url).then(res => {
2850
+ shApis.doGet(url).then(res => {
2850
2851
  Object.keys(res.data).forEach(key => {
2851
2852
  const elem = document.getElementById(key);
2852
2853
  if (elem === null) {
@@ -2893,7 +2894,7 @@ function formatHttpCatchError (reason) {
2893
2894
  return error
2894
2895
  }
2895
2896
  function getMenuCount (url) {
2896
- shApis$1.doGet(url).then(res => {
2897
+ shApis.doGet(url).then(res => {
2897
2898
  console.log(res);
2898
2899
  });
2899
2900
  }
@@ -2936,7 +2937,7 @@ async function runPlainRequest (url, message, title, data) {
2936
2937
  reverseButtons: true,
2937
2938
  showLoaderOnConfirm: true,
2938
2939
  preConfirm: () => {
2939
- return shApis$1.doPost(url, data).then(function (response) {
2940
+ return shApis.doPost(url, data).then(function (response) {
2940
2941
  Swal__default["default"].fire('Success!', 'Action completed successfully', 'success');
2941
2942
  return {
2942
2943
  response: response.data,
@@ -3104,7 +3105,7 @@ var script$4 = {
3104
3105
  titles: headers,
3105
3106
  export: 1
3106
3107
  };
3107
- shApis$1.doPost(this.endPoint, data).then(res => {
3108
+ shApis.doPost(this.endPoint, data).then(res => {
3108
3109
  this.downloading = false;
3109
3110
  if (res.data.file) {
3110
3111
  const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
@@ -3134,7 +3135,7 @@ var script$4 = {
3134
3135
  if (this.pagination_data) {
3135
3136
  this.pagination_data.loading = 1;
3136
3137
  }
3137
- shApis$1.doGet(this.endPoint, data).then(req => {
3138
+ shApis.doGet(this.endPoint, data).then(req => {
3138
3139
  this.loading = 'done';
3139
3140
  const response = req.data.data;
3140
3141
  this.pagination_data = {
@@ -3728,7 +3729,7 @@ var script$3 = {
3728
3729
  if (typeof tabCounts === 'object') {
3729
3730
  this.setCounts(tabCounts);
3730
3731
  } else {
3731
- shApis$1.doGet(tabCounts).then(res => {
3732
+ shApis.doGet(tabCounts).then(res => {
3732
3733
  this.setCounts(res.data);
3733
3734
  });
3734
3735
  }
@@ -3927,7 +3928,7 @@ const useUserStore = pinia.defineStore('user-store', {
3927
3928
  };
3928
3929
  }
3929
3930
  this.user = user;
3930
- shApis$1.doGet('auth/user').then(res => {
3931
+ shApis.doGet('auth/user').then(res => {
3931
3932
  const user = res.data;
3932
3933
  ShStorage.setItem('user',res.data);
3933
3934
  user.isAllowedTo = function (slug) {
@@ -4007,7 +4008,7 @@ let reload = vue.ref(0);
4007
4008
  vue.ref(null);
4008
4009
 
4009
4010
  vue.onMounted(() => {
4010
- shApis$1.doGet('admin/departments/all-permissions').then(res => {
4011
+ shApis.doGet('admin/departments/all-permissions').then(res => {
4011
4012
  allPermissions.value = res.data;
4012
4013
  });
4013
4014
  });
@@ -4291,7 +4292,7 @@ exports.ShModal = script$6;
4291
4292
  exports.ShPhone = script$b;
4292
4293
  exports.ShTable = script$4;
4293
4294
  exports.ShTabs = script$3;
4294
- exports.shApis = shApis$1;
4295
+ exports.shApis = shApis;
4295
4296
  exports.shRepo = shRepo$1;
4296
4297
  exports.shStorage = ShStorage;
4297
4298
  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);
@@ -1876,6 +1876,7 @@ return (_ctx, _cache) => {
1876
1876
  createElementVNode("div", {
1877
1877
  id: 'input_' + unref(id),
1878
1878
  contenteditable: "true",
1879
+ onClick: filterData,
1879
1880
  onInput: filterData,
1880
1881
  class: "flex-fill h-100 sh-suggestion-input"
1881
1882
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
@@ -2110,7 +2111,7 @@ var script$8 = {
2110
2111
  Object.keys(this.form_files).forEach(key => {
2111
2112
  data.append(key, this.form_files[key].value);
2112
2113
  });
2113
- shApis$1.doPost(this.action, data).then(res => {
2114
+ shApis.doPost(this.action, data).then(res => {
2114
2115
  // console.log(res)
2115
2116
  this.form_status = 2;
2116
2117
  Object.keys(this.form_elements).forEach(key => {
@@ -2198,7 +2199,7 @@ var script$8 = {
2198
2199
  this.selectData = selectData;
2199
2200
  console.log(this.selectData);
2200
2201
  } else {
2201
- shApis$1.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2202
+ shApis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
2202
2203
  // selectData[key] = res.data
2203
2204
  // console.log(res)
2204
2205
  this.selectData[key] = res.data.data;
@@ -2830,11 +2831,11 @@ function swalHttpError (reason) {
2830
2831
  }
2831
2832
 
2832
2833
  function runSilentRequest (url) {
2833
- return shApis$1.doPost(url)
2834
+ return shApis.doPost(url)
2834
2835
  }
2835
2836
 
2836
2837
  function setTabCounts (url) {
2837
- shApis$1.doGet(url).then(res => {
2838
+ shApis.doGet(url).then(res => {
2838
2839
  Object.keys(res.data).forEach(key => {
2839
2840
  const elem = document.getElementById(key);
2840
2841
  if (elem === null) {
@@ -2881,7 +2882,7 @@ function formatHttpCatchError (reason) {
2881
2882
  return error
2882
2883
  }
2883
2884
  function getMenuCount (url) {
2884
- shApis$1.doGet(url).then(res => {
2885
+ shApis.doGet(url).then(res => {
2885
2886
  console.log(res);
2886
2887
  });
2887
2888
  }
@@ -2924,7 +2925,7 @@ async function runPlainRequest (url, message, title, data) {
2924
2925
  reverseButtons: true,
2925
2926
  showLoaderOnConfirm: true,
2926
2927
  preConfirm: () => {
2927
- return shApis$1.doPost(url, data).then(function (response) {
2928
+ return shApis.doPost(url, data).then(function (response) {
2928
2929
  Swal.fire('Success!', 'Action completed successfully', 'success');
2929
2930
  return {
2930
2931
  response: response.data,
@@ -3092,7 +3093,7 @@ var script$4 = {
3092
3093
  titles: headers,
3093
3094
  export: 1
3094
3095
  };
3095
- shApis$1.doPost(this.endPoint, data).then(res => {
3096
+ shApis.doPost(this.endPoint, data).then(res => {
3096
3097
  this.downloading = false;
3097
3098
  if (res.data.file) {
3098
3099
  const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
@@ -3122,7 +3123,7 @@ var script$4 = {
3122
3123
  if (this.pagination_data) {
3123
3124
  this.pagination_data.loading = 1;
3124
3125
  }
3125
- shApis$1.doGet(this.endPoint, data).then(req => {
3126
+ shApis.doGet(this.endPoint, data).then(req => {
3126
3127
  this.loading = 'done';
3127
3128
  const response = req.data.data;
3128
3129
  this.pagination_data = {
@@ -3716,7 +3717,7 @@ var script$3 = {
3716
3717
  if (typeof tabCounts === 'object') {
3717
3718
  this.setCounts(tabCounts);
3718
3719
  } else {
3719
- shApis$1.doGet(tabCounts).then(res => {
3720
+ shApis.doGet(tabCounts).then(res => {
3720
3721
  this.setCounts(res.data);
3721
3722
  });
3722
3723
  }
@@ -3915,7 +3916,7 @@ const useUserStore = defineStore('user-store', {
3915
3916
  };
3916
3917
  }
3917
3918
  this.user = user;
3918
- shApis$1.doGet('auth/user').then(res => {
3919
+ shApis.doGet('auth/user').then(res => {
3919
3920
  const user = res.data;
3920
3921
  ShStorage.setItem('user',res.data);
3921
3922
  user.isAllowedTo = function (slug) {
@@ -3995,7 +3996,7 @@ let reload = ref(0);
3995
3996
  ref(null);
3996
3997
 
3997
3998
  onMounted(() => {
3998
- shApis$1.doGet('admin/departments/all-permissions').then(res => {
3999
+ shApis.doGet('admin/departments/all-permissions').then(res => {
3999
4000
  allPermissions.value = res.data;
4000
4001
  });
4001
4002
  });
@@ -4271,4 +4272,4 @@ const ShFrontend = {
4271
4272
  }
4272
4273
  };
4273
4274
 
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 };
4275
+ 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.4",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",