@iankibetsh/shframework 1.5.3 → 1.5.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.
@@ -95,21 +95,6 @@
95
95
  flex-grow: 1;
96
96
  }
97
97
 
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
- }
107
- .sh-suggest-control::after{
108
- margin-top: auto;
109
- margin-bottom: auto;
110
- margin-right: 0.255em;
111
- }
112
-
113
98
  :root {
114
99
  --ck-z-default: 10555 !important;
115
100
  --ck-z-modal: calc(var(--ck-z-default) + 999) !important;
@@ -131,6 +116,21 @@
131
116
  }
132
117
  }
133
118
 
119
+ .sh-selected-item{
120
+ line-height: unset!important;
121
+ }
122
+ .sh-suggestion-input{
123
+ padding: 0.375rem 0.75rem;
124
+ }
125
+ .sh-suggest{
126
+ margin-bottom: 1rem;
127
+ }
128
+ .sh-suggest-control::after{
129
+ margin-top: auto;
130
+ margin-bottom: auto;
131
+ margin-right: 0.255em;
132
+ }
133
+
134
134
  .sh-forgot-link, .sh-register-link{
135
135
  cursor: pointer;
136
136
  }
package/dist/library.js CHANGED
@@ -3949,7 +3949,8 @@ var script$6 = {
3949
3949
  downloading: false,
3950
3950
  appUrl: window.VITE_APP_API_URL,
3951
3951
  hasCanvas: 0,
3952
- selectedRecord: null
3952
+ selectedRecord: null,
3953
+ timeOut: null
3953
3954
  }
3954
3955
  },
3955
3956
  mounted () {
@@ -3963,6 +3964,17 @@ var script$6 = {
3963
3964
  }
3964
3965
  },
3965
3966
  methods: {
3967
+ userTyping: function(){
3968
+ if (this.timeOut){
3969
+ console.log('timer cleared');
3970
+ clearTimeout(this.timeOut);
3971
+ }
3972
+ const self = this;
3973
+ this.timeOut = setTimeout(()=>{
3974
+ console.log('Searching');
3975
+ self.reloadData(1);
3976
+ },1000);
3977
+ },
3966
3978
  cleanCanvasProps: function (actions) {
3967
3979
  let replaced = actions;
3968
3980
  replaced.class = null;
@@ -4369,9 +4381,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4369
4381
  vue.createElementVNode("div", _hoisted_8$2, [
4370
4382
  vue.createElementVNode("div", _hoisted_9$2, [
4371
4383
  vue.withDirectives(vue.createElementVNode("input", {
4384
+ onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4385
+ onKeyup: _cache[2] || (_cache[2] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4372
4386
  type: "search",
4373
- onChange: _cache[1] || (_cache[1] = $event => ($options.reloadData(1))),
4374
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (($data.filter_value) = $event)),
4387
+ onChange: _cache[3] || (_cache[3] = $event => ($options.reloadData(1))),
4388
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($data.filter_value) = $event)),
4375
4389
  placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
4376
4390
  class: "form-control sh-search-input"
4377
4391
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
package/dist/library.mjs CHANGED
@@ -3936,7 +3936,8 @@ var script$6 = {
3936
3936
  downloading: false,
3937
3937
  appUrl: window.VITE_APP_API_URL,
3938
3938
  hasCanvas: 0,
3939
- selectedRecord: null
3939
+ selectedRecord: null,
3940
+ timeOut: null
3940
3941
  }
3941
3942
  },
3942
3943
  mounted () {
@@ -3950,6 +3951,17 @@ var script$6 = {
3950
3951
  }
3951
3952
  },
3952
3953
  methods: {
3954
+ userTyping: function(){
3955
+ if (this.timeOut){
3956
+ console.log('timer cleared');
3957
+ clearTimeout(this.timeOut);
3958
+ }
3959
+ const self = this;
3960
+ this.timeOut = setTimeout(()=>{
3961
+ console.log('Searching');
3962
+ self.reloadData(1);
3963
+ },1000);
3964
+ },
3953
3965
  cleanCanvasProps: function (actions) {
3954
3966
  let replaced = actions;
3955
3967
  replaced.class = null;
@@ -4356,9 +4368,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4356
4368
  createElementVNode("div", _hoisted_8$2, [
4357
4369
  createElementVNode("div", _hoisted_9$2, [
4358
4370
  withDirectives(createElementVNode("input", {
4371
+ onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4372
+ onKeyup: _cache[2] || (_cache[2] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4359
4373
  type: "search",
4360
- onChange: _cache[1] || (_cache[1] = $event => ($options.reloadData(1))),
4361
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (($data.filter_value) = $event)),
4374
+ onChange: _cache[3] || (_cache[3] = $event => ($options.reloadData(1))),
4375
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($data.filter_value) = $event)),
4362
4376
  placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
4363
4377
  class: "form-control sh-search-input"
4364
4378
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",