@iankibetsh/shframework 5.8.7 → 5.9.1

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/README.md CHANGED
@@ -66,15 +66,17 @@ The flagship component for generating complex forms from simple configurations.
66
66
  - **Auto-Detection**: Infers input types from field names (email, phone, date, etc.).
67
67
  - **Multi-Step Support**: Break long forms into logical steps with progress indicators.
68
68
  - **Validation**: Seamlessly handles and displays Laravel validation errors (422).
69
- - **GraphQL Support**: Integrate with GraphQL mutations via the `gqlMutation` prop.
70
- - **Checkbox Support**: Easily handle boolean or multiple-choice fields with `type: 'checkbox'`.
71
69
  - **Modern Reactivity**: Built using Vue 3.4's `defineModel` for clean, conflict-free two-way binding.
72
70
 
73
71
  ```html
74
72
  <sh-auto-form
75
- :fields="['name', 'email', 'password', 'gender']"
76
- :required="['name', 'email']"
77
- action="auth/register"
73
+ :fields="[
74
+ { field: 'name', label: 'Name', required: true },
75
+ { field: 'email', type: 'email', label: 'Email', required: true },
76
+ { field: 'password', type: 'password', label: 'Password' },
77
+ { field: 'gender', type: 'select', label: 'Gender' }
78
+ ]"
79
+ :action="getActionUrl('register')"
78
80
  :successCallback="onRegistered"
79
81
  />
80
82
  ```
@@ -91,8 +93,11 @@ A convenience component that wraps a trigger button, a Bootstrap modal, and an `
91
93
  <sh-modal-form
92
94
  modal-id="addTaskModal"
93
95
  modal-title="Create New Task"
94
- :fields="['title', 'description']"
95
- action="tasks/store"
96
+ :fields="[
97
+ { field: 'title', label: 'Task Title', required: true },
98
+ { field: 'description', type: 'textarea', label: 'Description' }
99
+ ]"
100
+ :action="getActionUrl('storeTask')"
96
101
  >
97
102
  Add Task
98
103
  </sh-modal-form>
@@ -1,4 +1,36 @@
1
1
 
2
+ .sh-phone{
3
+ display: flex;
4
+ width: 100%;
5
+ align-items: center;
6
+ padding: 0 0.25rem;
7
+ }
8
+ .phone-country{
9
+ width: 2rem;
10
+ border: none;
11
+ align-self: center;
12
+ outline: none !important;
13
+ padding: 0.4rem;
14
+ border-right: 1px solid #0003;
15
+ }
16
+ .phone-number{
17
+ width: calc(100% - 2.2rem);
18
+ border: none;
19
+ align-self: center;
20
+ outline: none;
21
+ margin-bottom: 0;
22
+ padding: 0.4rem;
23
+ }
24
+ .sh-phone img{
25
+ padding: 0.125rem;
26
+ width: 2rem;
27
+ height: 2rem;
28
+ }
29
+ .phone-number::placeholder{
30
+ font-weight: 300;
31
+ opacity: 0.5;
32
+ }
33
+
2
34
  /* Step Container */
3
35
  .sh-form-steps-container {
4
36
  margin-bottom: 2.5rem;
@@ -304,38 +336,6 @@
304
336
  cursor: pointer;
305
337
  }
306
338
 
307
- .sh-phone{
308
- display: flex;
309
- width: 100%;
310
- align-items: center;
311
- padding: 0 0.25rem;
312
- }
313
- .phone-country{
314
- width: 2rem;
315
- border: none;
316
- align-self: center;
317
- outline: none !important;
318
- padding: 0.4rem;
319
- border-right: 1px solid #0003;
320
- }
321
- .phone-number{
322
- width: calc(100% - 2.2rem);
323
- border: none;
324
- align-self: center;
325
- outline: none;
326
- margin-bottom: 0;
327
- padding: 0.4rem;
328
- }
329
- .sh-phone img{
330
- padding: 0.125rem;
331
- width: 2rem;
332
- height: 2rem;
333
- }
334
- .phone-number::placeholder{
335
- font-weight: 300;
336
- opacity: 0.5;
337
- }
338
-
339
339
  .permissions-main {
340
340
  background: #edeff2;
341
341
  }
@@ -384,6 +384,11 @@
384
384
  margin-right: 0.255em;
385
385
  }
386
386
 
387
+ .sh-checkbox-group {
388
+ display: flex;
389
+ flex-wrap: wrap;
390
+ }
391
+
387
392
  .callout{
388
393
  --bs-link-color-rgb: 110,168,254;
389
394
  --bs-code-color: #e685b5;
@@ -400,11 +405,6 @@
400
405
  --bd-callout-border: var(--bs-info-border-subtle);
401
406
  }
402
407
 
403
- .sh-checkbox-group {
404
- display: flex;
405
- flex-wrap: wrap;
406
- }
407
-
408
408
  .sh-forgot-link, .sh-register-link{
409
409
  cursor: pointer;
410
410
  }
package/dist/library.js CHANGED
@@ -619,7 +619,6 @@ const updateSession = () =>{
619
619
  shStorage.setItem('last_activity', timeNow);
620
620
  };
621
621
 
622
- const graphQlEndpoint = 'sh-ql';
623
622
  // eslint-disable-next-line no-undef
624
623
  let axios;
625
624
 
@@ -729,28 +728,14 @@ function doPatch(endPoint, data, extraConfig) {
729
728
 
730
729
  }
731
730
 
732
- function graphQlQuery(query) {
733
- const data = {
734
- query
735
- };
736
- return doGet(graphQlEndpoint, data)
737
- }
738
731
 
739
- function graphQlMutate(mutation) {
740
- const data = {
741
- query: `mutation ${mutation}`
742
- };
743
- return doPost(graphQlEndpoint, data)
744
- }
745
732
 
746
733
  var shApis = {
747
734
  doGet,
748
735
  doPost,
749
- graphQlQuery,
750
736
  doDelete,
751
737
  doPut,
752
- doPatch,
753
- graphQlMutate
738
+ doPatch
754
739
  };
755
740
 
756
741
  const countries = [
@@ -3730,10 +3715,6 @@ var script$q = {
3730
3715
  type: Array,
3731
3716
  required: false
3732
3717
  },
3733
- gqlMutation: {
3734
- type: String,
3735
- required: false
3736
- },
3737
3718
  required: {
3738
3719
  type: Array,
3739
3720
  required: false
@@ -3745,6 +3726,10 @@ var script$q = {
3745
3726
  steps: {
3746
3727
  type: Array,
3747
3728
  required: false
3729
+ },
3730
+ hideButton: {
3731
+ type: Boolean,
3732
+ default: false
3748
3733
  }
3749
3734
  },
3750
3735
  emits: ['success', 'preSubmit', 'fieldChanged', 'formSubmitted', 'formError'],
@@ -3942,34 +3927,16 @@ const submitForm = async (e) => {
3942
3927
 
3943
3928
  emit('preSubmit', data);
3944
3929
 
3945
- // Handle GraphQL mutation
3946
- if (props.gqlMutation) {
3947
- const selectFields = Object.keys(data);
3948
- let args = selectFields
3949
- .filter(key => data[key])
3950
- .map(key => `${key}: "${data[key]}"`)
3951
- .join(', ');
3930
+ // Handle REST API
3931
+ const method = props.method === 'put'
3932
+ ? shApis.doPut
3933
+ : props.method === 'delete'
3934
+ ? shApis.doDelete
3935
+ : shApis.doPost;
3952
3936
 
3953
- if (args) {
3954
- args = `(${args})`;
3955
- }
3956
-
3957
- const mutation = `{\n${props.gqlMutation}${args} {\n${selectFields.join('\n')}\n}\n}`;
3958
- shApis.graphQlMutate(mutation)
3959
- .then(handleSuccessRequest)
3960
- .catch(handleFailedRequest);
3961
- } else {
3962
- // Handle REST API
3963
- const method = props.method === 'put'
3964
- ? shApis.doPut
3965
- : props.method === 'delete'
3966
- ? shApis.doDelete
3967
- : shApis.doPost;
3968
-
3969
- method(props.action, data)
3970
- .then(handleSuccessRequest)
3971
- .catch(handleFailedRequest);
3972
- }
3937
+ method(props.action, data)
3938
+ .then(handleSuccessRequest)
3939
+ .catch(handleFailedRequest);
3973
3940
 
3974
3941
  return false
3975
3942
  };
@@ -4308,7 +4275,7 @@ return (_ctx, _cache) => {
4308
4275
  ], 10 /* CLASS, PROPS */, _hoisted_21$1)
4309
4276
  ], 2 /* CLASS */))
4310
4277
  : vue.createCommentVNode("v-if", true),
4311
- (isLastStep.value)
4278
+ (isLastStep.value && !__props.hideButton)
4312
4279
  ? (vue.openBlock(), vue.createElementBlock("div", {
4313
4280
  key: 2,
4314
4281
  class: vue.normalizeClass(getElementClass('formGroup') + ' ms-auto')
@@ -4549,6 +4516,7 @@ var script$n = {
4549
4516
  'files',
4550
4517
  'phones',
4551
4518
  'numbers',
4519
+ 'hideButton',
4552
4520
  'customComponent','modalTitle','class','successMessage', 'modalId'],
4553
4521
  emits: ['success','fieldChanged','formSubmitted','formError','modalId'],
4554
4522
  setup(__props, { emit: __emit }) {
@@ -4591,7 +4559,7 @@ const cleanedProp = vue.computed(()=>{
4591
4559
  });
4592
4560
 
4593
4561
  return (_ctx, _cache) => {
4594
- return (vue.openBlock(), vue.createElementBlock("a", {
4562
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("a", {
4595
4563
  class: vue.normalizeClass(vue.unref(btnClass)),
4596
4564
  href: '#' + vue.unref(realModalId),
4597
4565
  "data-bs-toggle": "modal"
@@ -4617,7 +4585,9 @@ return (_ctx, _cache) => {
4617
4585
  _: 1 /* STABLE */
4618
4586
  }, 8 /* PROPS */, ["modal-size", "modal-id", "modal-title"])
4619
4587
  ]))
4620
- ], 10 /* CLASS, PROPS */, _hoisted_1$i))
4588
+ ], 10 /* CLASS, PROPS */, _hoisted_1$i)), [
4589
+ [vue.vShow, !__props.hideButton]
4590
+ ])
4621
4591
  }
4622
4592
  }
4623
4593
 
@@ -5605,22 +5575,26 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
5605
5575
  return ($props.paginationStyle !== 'loadMore')
5606
5576
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
5607
5577
  vue.createElementVNode("div", _hoisted_2$9, [
5608
- _cache[5] || (_cache[5] = vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* CACHED */)),
5609
- _cache[6] || (_cache[6] = vue.createTextVNode("  ", -1 /* CACHED */)),
5610
- vue.withDirectives(vue.createElementVNode("select", {
5611
- class: "select_per_page",
5612
- onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
5613
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
5614
- }, [
5615
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.pageOptions, (option) => {
5616
- return (vue.openBlock(), vue.createElementBlock("option", { value: option }, vue.toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_3$7))
5617
- }), 256 /* UNKEYED_FRAGMENT */))
5618
- ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
5619
- [vue.vModelSelect, $data.per_page]
5620
- ]),
5621
- vue.createElementVNode("span", _hoisted_4$7, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
5578
+ ($props.pagination_data.end > 1)
5579
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5580
+ _cache[5] || (_cache[5] = vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* CACHED */)),
5581
+ _cache[6] || (_cache[6] = vue.createTextVNode("  ", -1 /* CACHED */)),
5582
+ vue.withDirectives(vue.createElementVNode("select", {
5583
+ class: "select_per_page",
5584
+ onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
5585
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
5586
+ }, [
5587
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.pageOptions, (option) => {
5588
+ return (vue.openBlock(), vue.createElementBlock("option", { value: option }, vue.toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_3$7))
5589
+ }), 256 /* UNKEYED_FRAGMENT */))
5590
+ ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
5591
+ [vue.vModelSelect, $data.per_page]
5592
+ ])
5593
+ ], 64 /* STABLE_FRAGMENT */))
5594
+ : vue.createCommentVNode("v-if", true),
5595
+ vue.createElementVNode("span", _hoisted_4$7, " Showing " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
5622
5596
  ]),
5623
- ($props.pagination_data != null)
5597
+ ($props.pagination_data != null && $props.pagination_data.end > 1)
5624
5598
  ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_5$5, [
5625
5599
  vue.createElementVNode("ul", _hoisted_6$4, [
5626
5600
  vue.createElementVNode("li", {
@@ -6411,7 +6385,7 @@ return (_ctx, _cache) => {
6411
6385
  ], 8 /* PROPS */, _hoisted_3$6)
6412
6386
  ]))
6413
6387
  : vue.createCommentVNode("v-if", true),
6414
- (!__props.hideSearch && (records.value.length > 0 || !hasEmptySlot.value || filter_value.value.length > 0))
6388
+ (!__props.hideSearch && (pagination_data.value?.end > 1 || filter_value.value.length > 0))
6415
6389
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$6, [
6416
6390
  vue.createElementVNode("div", _hoisted_5$4, [
6417
6391
  vue.createElementVNode("div", {
@@ -6866,7 +6840,7 @@ return (_ctx, _cache) => {
6866
6840
  ]))
6867
6841
  : vue.createCommentVNode("v-if", true)
6868
6842
  ])),
6869
- (pagination_data.value && (records.value.length > 0 || !hasEmptySlot.value || filter_value.value.length > 0))
6843
+ (pagination_data.value && (records.value.length > 0 || filter_value.value.length > 0))
6870
6844
  ? (vue.openBlock(), vue.createBlock(script$e, {
6871
6845
  key: 7,
6872
6846
  onLoadMoreRecords: loadMoreRecords,
@@ -8682,19 +8656,6 @@ const ShFrontend = {
8682
8656
  }
8683
8657
  };
8684
8658
 
8685
- const query = async qlQuery => {
8686
- const result = await shApis.graphQlQuery(qlQuery);
8687
- return result.data
8688
- };
8689
- const mutate = async mutation => {
8690
- const result = await shApis.graphQlMutate(mutation);
8691
- return result.data
8692
- };
8693
- var shGql = {
8694
- query,
8695
- mutate
8696
- };
8697
-
8698
8659
  /**
8699
8660
  * useShFetch is a custom hook for fetching data from a given URL and caching it.
8700
8661
  * @param {string} url - The URL to fetch data from.
@@ -8779,7 +8740,6 @@ exports.ShSuggest = script$A;
8779
8740
  exports.ShTable = script$d;
8780
8741
  exports.ShTabs = script$c;
8781
8742
  exports.shApis = shApis;
8782
- exports.shGql = shGql;
8783
8743
  exports.shRepo = shRepo;
8784
8744
  exports.shStorage = shStorage;
8785
8745
  exports.useAppStore = useAppStore;
package/dist/library.mjs CHANGED
@@ -608,7 +608,6 @@ const updateSession = () =>{
608
608
  shStorage.setItem('last_activity', timeNow);
609
609
  };
610
610
 
611
- const graphQlEndpoint = 'sh-ql';
612
611
  // eslint-disable-next-line no-undef
613
612
  let axios;
614
613
 
@@ -718,28 +717,14 @@ function doPatch(endPoint, data, extraConfig) {
718
717
 
719
718
  }
720
719
 
721
- function graphQlQuery(query) {
722
- const data = {
723
- query
724
- };
725
- return doGet(graphQlEndpoint, data)
726
- }
727
720
 
728
- function graphQlMutate(mutation) {
729
- const data = {
730
- query: `mutation ${mutation}`
731
- };
732
- return doPost(graphQlEndpoint, data)
733
- }
734
721
 
735
722
  var shApis = {
736
723
  doGet,
737
724
  doPost,
738
- graphQlQuery,
739
725
  doDelete,
740
726
  doPut,
741
- doPatch,
742
- graphQlMutate
727
+ doPatch
743
728
  };
744
729
 
745
730
  const countries = [
@@ -3719,10 +3704,6 @@ var script$q = {
3719
3704
  type: Array,
3720
3705
  required: false
3721
3706
  },
3722
- gqlMutation: {
3723
- type: String,
3724
- required: false
3725
- },
3726
3707
  required: {
3727
3708
  type: Array,
3728
3709
  required: false
@@ -3734,6 +3715,10 @@ var script$q = {
3734
3715
  steps: {
3735
3716
  type: Array,
3736
3717
  required: false
3718
+ },
3719
+ hideButton: {
3720
+ type: Boolean,
3721
+ default: false
3737
3722
  }
3738
3723
  },
3739
3724
  emits: ['success', 'preSubmit', 'fieldChanged', 'formSubmitted', 'formError'],
@@ -3931,34 +3916,16 @@ const submitForm = async (e) => {
3931
3916
 
3932
3917
  emit('preSubmit', data);
3933
3918
 
3934
- // Handle GraphQL mutation
3935
- if (props.gqlMutation) {
3936
- const selectFields = Object.keys(data);
3937
- let args = selectFields
3938
- .filter(key => data[key])
3939
- .map(key => `${key}: "${data[key]}"`)
3940
- .join(', ');
3919
+ // Handle REST API
3920
+ const method = props.method === 'put'
3921
+ ? shApis.doPut
3922
+ : props.method === 'delete'
3923
+ ? shApis.doDelete
3924
+ : shApis.doPost;
3941
3925
 
3942
- if (args) {
3943
- args = `(${args})`;
3944
- }
3945
-
3946
- const mutation = `{\n${props.gqlMutation}${args} {\n${selectFields.join('\n')}\n}\n}`;
3947
- shApis.graphQlMutate(mutation)
3948
- .then(handleSuccessRequest)
3949
- .catch(handleFailedRequest);
3950
- } else {
3951
- // Handle REST API
3952
- const method = props.method === 'put'
3953
- ? shApis.doPut
3954
- : props.method === 'delete'
3955
- ? shApis.doDelete
3956
- : shApis.doPost;
3957
-
3958
- method(props.action, data)
3959
- .then(handleSuccessRequest)
3960
- .catch(handleFailedRequest);
3961
- }
3926
+ method(props.action, data)
3927
+ .then(handleSuccessRequest)
3928
+ .catch(handleFailedRequest);
3962
3929
 
3963
3930
  return false
3964
3931
  };
@@ -4297,7 +4264,7 @@ return (_ctx, _cache) => {
4297
4264
  ], 10 /* CLASS, PROPS */, _hoisted_21$1)
4298
4265
  ], 2 /* CLASS */))
4299
4266
  : createCommentVNode("v-if", true),
4300
- (isLastStep.value)
4267
+ (isLastStep.value && !__props.hideButton)
4301
4268
  ? (openBlock(), createElementBlock("div", {
4302
4269
  key: 2,
4303
4270
  class: normalizeClass(getElementClass('formGroup') + ' ms-auto')
@@ -4538,6 +4505,7 @@ var script$n = {
4538
4505
  'files',
4539
4506
  'phones',
4540
4507
  'numbers',
4508
+ 'hideButton',
4541
4509
  'customComponent','modalTitle','class','successMessage', 'modalId'],
4542
4510
  emits: ['success','fieldChanged','formSubmitted','formError','modalId'],
4543
4511
  setup(__props, { emit: __emit }) {
@@ -4580,7 +4548,7 @@ const cleanedProp = computed(()=>{
4580
4548
  });
4581
4549
 
4582
4550
  return (_ctx, _cache) => {
4583
- return (openBlock(), createElementBlock("a", {
4551
+ return withDirectives((openBlock(), createElementBlock("a", {
4584
4552
  class: normalizeClass(unref(btnClass)),
4585
4553
  href: '#' + unref(realModalId),
4586
4554
  "data-bs-toggle": "modal"
@@ -4606,7 +4574,9 @@ return (_ctx, _cache) => {
4606
4574
  _: 1 /* STABLE */
4607
4575
  }, 8 /* PROPS */, ["modal-size", "modal-id", "modal-title"])
4608
4576
  ]))
4609
- ], 10 /* CLASS, PROPS */, _hoisted_1$i))
4577
+ ], 10 /* CLASS, PROPS */, _hoisted_1$i)), [
4578
+ [vShow, !__props.hideButton]
4579
+ ])
4610
4580
  }
4611
4581
  }
4612
4582
 
@@ -5594,22 +5564,26 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
5594
5564
  return ($props.paginationStyle !== 'loadMore')
5595
5565
  ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
5596
5566
  createElementVNode("div", _hoisted_2$9, [
5597
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* CACHED */)),
5598
- _cache[6] || (_cache[6] = createTextVNode("  ", -1 /* CACHED */)),
5599
- withDirectives(createElementVNode("select", {
5600
- class: "select_per_page",
5601
- onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
5602
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
5603
- }, [
5604
- (openBlock(true), createElementBlock(Fragment, null, renderList($data.pageOptions, (option) => {
5605
- return (openBlock(), createElementBlock("option", { value: option }, toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_3$7))
5606
- }), 256 /* UNKEYED_FRAGMENT */))
5607
- ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
5608
- [vModelSelect, $data.per_page]
5609
- ]),
5610
- createElementVNode("span", _hoisted_4$7, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
5567
+ ($props.pagination_data.end > 1)
5568
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5569
+ _cache[5] || (_cache[5] = createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* CACHED */)),
5570
+ _cache[6] || (_cache[6] = createTextVNode("  ", -1 /* CACHED */)),
5571
+ withDirectives(createElementVNode("select", {
5572
+ class: "select_per_page",
5573
+ onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
5574
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
5575
+ }, [
5576
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.pageOptions, (option) => {
5577
+ return (openBlock(), createElementBlock("option", { value: option }, toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_3$7))
5578
+ }), 256 /* UNKEYED_FRAGMENT */))
5579
+ ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
5580
+ [vModelSelect, $data.per_page]
5581
+ ])
5582
+ ], 64 /* STABLE_FRAGMENT */))
5583
+ : createCommentVNode("v-if", true),
5584
+ createElementVNode("span", _hoisted_4$7, " Showing " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
5611
5585
  ]),
5612
- ($props.pagination_data != null)
5586
+ ($props.pagination_data != null && $props.pagination_data.end > 1)
5613
5587
  ? (openBlock(), createElementBlock("nav", _hoisted_5$5, [
5614
5588
  createElementVNode("ul", _hoisted_6$4, [
5615
5589
  createElementVNode("li", {
@@ -6400,7 +6374,7 @@ return (_ctx, _cache) => {
6400
6374
  ], 8 /* PROPS */, _hoisted_3$6)
6401
6375
  ]))
6402
6376
  : createCommentVNode("v-if", true),
6403
- (!__props.hideSearch && (records.value.length > 0 || !hasEmptySlot.value || filter_value.value.length > 0))
6377
+ (!__props.hideSearch && (pagination_data.value?.end > 1 || filter_value.value.length > 0))
6404
6378
  ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
6405
6379
  createElementVNode("div", _hoisted_5$4, [
6406
6380
  createElementVNode("div", {
@@ -6855,7 +6829,7 @@ return (_ctx, _cache) => {
6855
6829
  ]))
6856
6830
  : createCommentVNode("v-if", true)
6857
6831
  ])),
6858
- (pagination_data.value && (records.value.length > 0 || !hasEmptySlot.value || filter_value.value.length > 0))
6832
+ (pagination_data.value && (records.value.length > 0 || filter_value.value.length > 0))
6859
6833
  ? (openBlock(), createBlock(script$e, {
6860
6834
  key: 7,
6861
6835
  onLoadMoreRecords: loadMoreRecords,
@@ -8671,19 +8645,6 @@ const ShFrontend = {
8671
8645
  }
8672
8646
  };
8673
8647
 
8674
- const query = async qlQuery => {
8675
- const result = await shApis.graphQlQuery(qlQuery);
8676
- return result.data
8677
- };
8678
- const mutate = async mutation => {
8679
- const result = await shApis.graphQlMutate(mutation);
8680
- return result.data
8681
- };
8682
- var shGql = {
8683
- query,
8684
- mutate
8685
- };
8686
-
8687
8648
  /**
8688
8649
  * useShFetch is a custom hook for fetching data from a given URL and caching it.
8689
8650
  * @param {string} url - The URL to fetch data from.
@@ -8744,4 +8705,4 @@ const useShFetch = (url, path, cacheKey) => {
8744
8705
  }
8745
8706
  };
8746
8707
 
8747
- export { countries as Countries, script$8 as ManagePermissions, script$q as ShAutoForm, script$l as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$j as ShConfirmAction, script$o as ShDropDownForm, script$b as ShDynamicTabs, script$z as ShForm, ShFrontend, script$p as ShModal, script$a as ShModalBtn, script$n as ShModalForm, script$m as ShModalFormAuto, script$B as ShPhone, script$5 as ShQueryPopups, script$f as ShRange, script$7 as ShRoutePopups, script$i as ShSilentAction, script$A as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shGql, shRepo, shStorage, useAppStore, useShFetch, useUserStore };
8708
+ export { countries as Countries, script$8 as ManagePermissions, script$q as ShAutoForm, script$l as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$j as ShConfirmAction, script$o as ShDropDownForm, script$b as ShDynamicTabs, script$z as ShForm, ShFrontend, script$p as ShModal, script$a as ShModalBtn, script$n as ShModalForm, script$m as ShModalFormAuto, script$B as ShPhone, script$5 as ShQueryPopups, script$f as ShRange, script$7 as ShRoutePopups, script$i as ShSilentAction, script$A as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shRepo, shStorage, useAppStore, useShFetch, useUserStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.8.7",
3
+ "version": "5.9.1",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "repository": {
6
6
  "type": "git",