@iankibetsh/shframework 2.0.6 → 2.0.8

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.
Files changed (3) hide show
  1. package/dist/library.js +126 -106
  2. package/dist/library.mjs +127 -107
  3. package/package.json +1 -1
package/dist/library.js CHANGED
@@ -2969,7 +2969,7 @@ vue.onMounted(()=>{
2969
2969
  if(props.data){
2970
2970
  selectOptions.value = props.data.map(item=>{
2971
2971
  return {
2972
- id: item.id ? item.id : item.key ? item.key : item.value ? item.value:item.name ? item.name:item.label,
2972
+ id: typeof item.id !== 'undefined' ? item.id : item.key ? item.key : item.value ? item.value:item.name ? item.name:item.label,
2973
2973
  name: item.label ? item.label : item.name ? item.name : item.value ? item.value:item.id ? item.id:item.option
2974
2974
  }
2975
2975
  });
@@ -4295,6 +4295,7 @@ var script$b = {
4295
4295
  order_method: '',
4296
4296
  per_page: shRepo.getShConfig('tablePerPage', 10),
4297
4297
  page: 1,
4298
+ exactMatch: false,
4298
4299
  filter_value: '',
4299
4300
  loading: 'loading',
4300
4301
  loading_error: '',
@@ -4490,7 +4491,8 @@ var script$b = {
4490
4491
  paginated: true,
4491
4492
  from: this.from,
4492
4493
  to: this.to,
4493
- period: this.period
4494
+ period: this.period,
4495
+ exact: this.exactMatch
4494
4496
  };
4495
4497
  if (this.pagination_data) {
4496
4498
  this.pagination_data.loading = 1;
@@ -4601,56 +4603,61 @@ const _hoisted_9$2 = {
4601
4603
  };
4602
4604
  const _hoisted_10$1 = ["placeholder"];
4603
4605
  const _hoisted_11$1 = {
4606
+ key: 0,
4607
+ class: "input-group-text exact_checkbox"
4608
+ };
4609
+ const _hoisted_12$1 = /*#__PURE__*/vue.createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
4610
+ const _hoisted_13$1 = {
4604
4611
  key: 0,
4605
4612
  class: "text-center"
4606
4613
  };
4607
- const _hoisted_12$1 = /*#__PURE__*/vue.createElementVNode("div", {
4614
+ const _hoisted_14$1 = /*#__PURE__*/vue.createElementVNode("div", {
4608
4615
  class: "spinner-border",
4609
4616
  role: "status"
4610
4617
  }, [
4611
4618
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4612
4619
  ], -1 /* HOISTED */);
4613
- const _hoisted_13$1 = [
4614
- _hoisted_12$1
4620
+ const _hoisted_15$1 = [
4621
+ _hoisted_14$1
4615
4622
  ];
4616
- const _hoisted_14$1 = {
4623
+ const _hoisted_16$1 = {
4617
4624
  key: 1,
4618
4625
  class: "alert alert-danger"
4619
4626
  };
4620
- const _hoisted_15$1 = { colspan: 2 };
4621
- const _hoisted_16$1 = {
4627
+ const _hoisted_17$1 = { colspan: 2 };
4628
+ const _hoisted_18$1 = {
4622
4629
  key: 0,
4623
4630
  class: "text-center"
4624
4631
  };
4625
- const _hoisted_17$1 = /*#__PURE__*/vue.createElementVNode("div", {
4632
+ const _hoisted_19 = /*#__PURE__*/vue.createElementVNode("div", {
4626
4633
  class: "spinner-border",
4627
4634
  role: "status"
4628
4635
  }, [
4629
4636
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4630
4637
  ], -1 /* HOISTED */);
4631
- const _hoisted_18$1 = [
4632
- _hoisted_17$1
4638
+ const _hoisted_20 = [
4639
+ _hoisted_19
4633
4640
  ];
4634
- const _hoisted_19 = {
4641
+ const _hoisted_21 = {
4635
4642
  key: 1,
4636
4643
  class: "alert alert-danger"
4637
4644
  };
4638
- const _hoisted_20 = { colspan: 2 };
4639
- const _hoisted_21 = { class: "sh-thead" };
4640
- const _hoisted_22 = ["onClick"];
4641
- const _hoisted_23 = ["onClick"];
4645
+ const _hoisted_22 = { colspan: 2 };
4646
+ const _hoisted_23 = { class: "sh-thead" };
4642
4647
  const _hoisted_24 = ["onClick"];
4643
- const _hoisted_25 = {
4648
+ const _hoisted_25 = ["onClick"];
4649
+ const _hoisted_26 = ["onClick"];
4650
+ const _hoisted_27 = {
4644
4651
  key: 0,
4645
4652
  class: "text-capitalize"
4646
4653
  };
4647
- const _hoisted_26 = { class: "sh-tbody" };
4648
- const _hoisted_27 = {
4654
+ const _hoisted_28 = { class: "sh-tbody" };
4655
+ const _hoisted_29 = {
4649
4656
  key: 0,
4650
4657
  class: "text-center"
4651
4658
  };
4652
- const _hoisted_28 = ["colspan"];
4653
- const _hoisted_29 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4659
+ const _hoisted_30 = ["colspan"];
4660
+ const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4654
4661
  /*#__PURE__*/vue.createElementVNode("div", {
4655
4662
  class: "spinner-border",
4656
4663
  role: "status"
@@ -4658,42 +4665,42 @@ const _hoisted_29 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
4658
4665
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4659
4666
  ])
4660
4667
  ], -1 /* HOISTED */);
4661
- const _hoisted_30 = [
4662
- _hoisted_29
4668
+ const _hoisted_32 = [
4669
+ _hoisted_31
4663
4670
  ];
4664
- const _hoisted_31 = {
4671
+ const _hoisted_33 = {
4665
4672
  key: 1,
4666
4673
  class: "text-center alert alert-danger"
4667
4674
  };
4668
- const _hoisted_32 = ["colspan"];
4669
- const _hoisted_33 = {
4675
+ const _hoisted_34 = ["colspan"];
4676
+ const _hoisted_35 = {
4670
4677
  key: 2,
4671
4678
  class: "text-center alert alert-info no_records"
4672
4679
  };
4673
- const _hoisted_34 = ["colspan"];
4674
- const _hoisted_35 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4675
- const _hoisted_36 = ["onClick"];
4676
- const _hoisted_37 = { key: 1 };
4677
- const _hoisted_38 = {
4680
+ const _hoisted_36 = ["colspan"];
4681
+ const _hoisted_37 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4682
+ const _hoisted_38 = ["onClick"];
4683
+ const _hoisted_39 = { key: 1 };
4684
+ const _hoisted_40 = {
4678
4685
  key: 2,
4679
4686
  class: "text-success fw-bold"
4680
4687
  };
4681
- const _hoisted_39 = { key: 3 };
4682
- const _hoisted_40 = ["innerHTML"];
4683
- const _hoisted_41 = ["innerHTML"];
4688
+ const _hoisted_41 = { key: 3 };
4684
4689
  const _hoisted_42 = ["innerHTML"];
4685
- const _hoisted_43 = {
4690
+ const _hoisted_43 = ["innerHTML"];
4691
+ const _hoisted_44 = ["innerHTML"];
4692
+ const _hoisted_45 = {
4686
4693
  key: 0,
4687
4694
  style: {"white-space":"nowrap"}
4688
4695
  };
4689
- const _hoisted_44 = ["href"];
4690
- const _hoisted_45 = ["title", "onClick"];
4691
- const _hoisted_46 = { key: 5 };
4692
- const _hoisted_47 = {
4696
+ const _hoisted_46 = ["href"];
4697
+ const _hoisted_47 = ["title", "onClick"];
4698
+ const _hoisted_48 = { key: 5 };
4699
+ const _hoisted_49 = {
4693
4700
  key: 0,
4694
4701
  class: "text-center"
4695
4702
  };
4696
- const _hoisted_48 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4703
+ const _hoisted_50 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4697
4704
  /*#__PURE__*/vue.createElementVNode("div", {
4698
4705
  class: "spinner-border",
4699
4706
  role: "status"
@@ -4701,40 +4708,40 @@ const _hoisted_48 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
4701
4708
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4702
4709
  ])
4703
4710
  ], -1 /* HOISTED */);
4704
- const _hoisted_49 = [
4705
- _hoisted_48
4711
+ const _hoisted_51 = [
4712
+ _hoisted_50
4706
4713
  ];
4707
- const _hoisted_50 = { key: 1 };
4708
- const _hoisted_51 = {
4714
+ const _hoisted_52 = { key: 1 };
4715
+ const _hoisted_53 = {
4709
4716
  key: 2,
4710
4717
  class: "mobile-list-items"
4711
4718
  };
4712
- const _hoisted_52 = ["onClick"];
4713
- const _hoisted_53 = {
4719
+ const _hoisted_54 = ["onClick"];
4720
+ const _hoisted_55 = {
4714
4721
  key: 0,
4715
4722
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4716
4723
  };
4717
- const _hoisted_54 = {
4724
+ const _hoisted_56 = {
4718
4725
  key: 1,
4719
4726
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4720
4727
  };
4721
- const _hoisted_55 = {
4728
+ const _hoisted_57 = {
4722
4729
  key: 2,
4723
4730
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4724
4731
  };
4725
- const _hoisted_56 = { key: 1 };
4726
- const _hoisted_57 = {
4732
+ const _hoisted_58 = { key: 1 };
4733
+ const _hoisted_59 = {
4727
4734
  key: 2,
4728
4735
  class: "text-primary fw-bold"
4729
4736
  };
4730
- const _hoisted_58 = { key: 3 };
4731
- const _hoisted_59 = ["innerHTML"];
4732
- const _hoisted_60 = ["innerHTML"];
4737
+ const _hoisted_60 = { key: 3 };
4733
4738
  const _hoisted_61 = ["innerHTML"];
4734
- const _hoisted_62 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4735
- const _hoisted_63 = { key: 0 };
4736
- const _hoisted_64 = ["href"];
4737
- const _hoisted_65 = ["title", "onClick"];
4739
+ const _hoisted_62 = ["innerHTML"];
4740
+ const _hoisted_63 = ["innerHTML"];
4741
+ const _hoisted_64 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4742
+ const _hoisted_65 = { key: 0 };
4743
+ const _hoisted_66 = ["href"];
4744
+ const _hoisted_67 = ["title", "onClick"];
4738
4745
 
4739
4746
  function render(_ctx, _cache, $props, $setup, $data, $options) {
4740
4747
  const _component_sh_range = vue.resolveComponent("sh-range");
@@ -4773,7 +4780,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4773
4780
  ]))
4774
4781
  : vue.createCommentVNode("v-if", true),
4775
4782
  vue.createElementVNode("div", {
4776
- class: vue.normalizeClass(["sh-search-bar", $props.hasRange ? 'ms-2':''])
4783
+ class: vue.normalizeClass(["sh-search-bar input-group", $props.hasRange ? 'ms-2':''])
4777
4784
  }, [
4778
4785
  vue.withDirectives(vue.createElementVNode("input", {
4779
4786
  onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
@@ -4785,7 +4792,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4785
4792
  class: "form-control sh-search-input"
4786
4793
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
4787
4794
  [vue.vModelText, $data.filter_value]
4788
- ])
4795
+ ]),
4796
+ ($data.filter_value.length > 1)
4797
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11$1, [
4798
+ vue.withDirectives(vue.createElementVNode("input", {
4799
+ onChange: _cache[5] || (_cache[5] = (...args) => ($options.reloadData && $options.reloadData(...args))),
4800
+ value: true,
4801
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => (($data.exactMatch) = $event)),
4802
+ type: "checkbox"
4803
+ }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
4804
+ [vue.vModelCheckbox, $data.exactMatch]
4805
+ ]),
4806
+ _hoisted_12$1
4807
+ ]))
4808
+ : vue.createCommentVNode("v-if", true)
4789
4809
  ], 2 /* CLASS */)
4790
4810
  ])
4791
4811
  ]))
@@ -4793,10 +4813,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4793
4813
  ($options.hasDefaultSlot)
4794
4814
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
4795
4815
  ($data.loading === 'loading')
4796
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, _hoisted_13$1))
4816
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13$1, _hoisted_15$1))
4797
4817
  : ($data.loading === 'error')
4798
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$1, [
4799
- vue.createElementVNode("span", _hoisted_15$1, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4818
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
4819
+ vue.createElementVNode("span", _hoisted_17$1, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4800
4820
  ]))
4801
4821
  : vue.createCommentVNode("v-if", true),
4802
4822
  ($data.loading === 'done')
@@ -4811,10 +4831,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4811
4831
  : ($options.hasRecordsSlot)
4812
4832
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
4813
4833
  ($data.loading === 'loading')
4814
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, _hoisted_18$1))
4834
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18$1, _hoisted_20))
4815
4835
  : ($data.loading === 'error')
4816
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
4817
- vue.createElementVNode("span", _hoisted_20, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4836
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
4837
+ vue.createElementVNode("span", _hoisted_22, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4818
4838
  ]))
4819
4839
  : vue.createCommentVNode("v-if", true),
4820
4840
  ($data.loading === 'done')
@@ -4829,7 +4849,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4829
4849
  key: 4,
4830
4850
  class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
4831
4851
  }, [
4832
- vue.createElementVNode("thead", _hoisted_21, [
4852
+ vue.createElementVNode("thead", _hoisted_23, [
4833
4853
  vue.createElementVNode("tr", null, [
4834
4854
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.tableHeaders, (title) => {
4835
4855
  return (vue.openBlock(), vue.createElementBlock("th", { key: title }, [
@@ -4838,48 +4858,48 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4838
4858
  key: 0,
4839
4859
  class: "text-capitalize",
4840
4860
  onClick: $event => ($options.changeKey('order_by',title))
4841
- }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
4861
+ }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4842
4862
  : (typeof title === 'function')
4843
4863
  ? (vue.openBlock(), vue.createElementBlock("a", {
4844
4864
  key: 1,
4845
4865
  class: "text-capitalize",
4846
4866
  onClick: $event => ($options.changeKey('order_by',title(null)))
4847
- }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
4867
+ }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
4848
4868
  : (typeof title !== 'undefined')
4849
4869
  ? (vue.openBlock(), vue.createElementBlock("a", {
4850
4870
  key: 2,
4851
4871
  class: "text-capitalize",
4852
4872
  onClick: $event => ($options.changeKey('order_by',title))
4853
- }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4873
+ }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
4854
4874
  : vue.createCommentVNode("v-if", true)
4855
4875
  ]))
4856
4876
  }), 128 /* KEYED_FRAGMENT */)),
4857
4877
  ($props.actions)
4858
- ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_25, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
4878
+ ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_27, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
4859
4879
  : vue.createCommentVNode("v-if", true)
4860
4880
  ])
4861
4881
  ]),
4862
- vue.createElementVNode("tbody", _hoisted_26, [
4882
+ vue.createElementVNode("tbody", _hoisted_28, [
4863
4883
  ($data.loading === 'loading')
4864
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_27, [
4884
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_29, [
4865
4885
  vue.createElementVNode("td", {
4866
4886
  colspan: $data.tableHeaders.length
4867
- }, _hoisted_30, 8 /* PROPS */, _hoisted_28)
4887
+ }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
4868
4888
  ]))
4869
4889
  : ($data.loading === 'error')
4870
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_31, [
4890
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
4871
4891
  vue.createElementVNode("td", {
4872
4892
  colspan: $data.tableHeaders.length
4873
- }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_32)
4893
+ }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
4874
4894
  ]))
4875
4895
  : ($data.records.length === 0)
4876
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
4896
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_35, [
4877
4897
  vue.createElementVNode("td", {
4878
4898
  colspan: $props.actions ? $data.tableHeaders.length + 1 : $data.tableHeaders.length
4879
4899
  }, [
4880
- _hoisted_35,
4900
+ _hoisted_37,
4881
4901
  vue.createTextVNode(" No records found ")
4882
- ], 8 /* PROPS */, _hoisted_34)
4902
+ ], 8 /* PROPS */, _hoisted_36)
4883
4903
  ]))
4884
4904
  : ($data.loading === 'done')
4885
4905
  ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
@@ -4899,29 +4919,29 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4899
4919
  innerHTML: record[key]
4900
4920
  }, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
4901
4921
  : ($options.getFieldType(key) === 'numeric')
4902
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_37, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4922
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4903
4923
  : ($options.getFieldType(key) === 'money')
4904
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_38, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4924
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4905
4925
  : ($options.getFieldType(key) === 'date')
4906
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
4926
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
4907
4927
  : (typeof key === 'string')
4908
4928
  ? (vue.openBlock(), vue.createElementBlock("span", {
4909
4929
  key: 4,
4910
4930
  innerHTML: record[key]
4911
- }, null, 8 /* PROPS */, _hoisted_40))
4931
+ }, null, 8 /* PROPS */, _hoisted_42))
4912
4932
  : (typeof key === 'function')
4913
4933
  ? (vue.openBlock(), vue.createElementBlock("span", {
4914
4934
  key: 5,
4915
4935
  innerHTML: key(record, index)
4916
- }, null, 8 /* PROPS */, _hoisted_41))
4936
+ }, null, 8 /* PROPS */, _hoisted_43))
4917
4937
  : (vue.openBlock(), vue.createElementBlock("span", {
4918
4938
  key: 6,
4919
4939
  innerHTML: record[key[0]]
4920
- }, null, 8 /* PROPS */, _hoisted_42))
4940
+ }, null, 8 /* PROPS */, _hoisted_44))
4921
4941
  ]))
4922
4942
  }), 128 /* KEYED_FRAGMENT */)),
4923
4943
  ($props.actions)
4924
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_43, [
4944
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_45, [
4925
4945
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
4926
4946
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4927
4947
  key: act.path
@@ -4986,7 +5006,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4986
5006
  }, null, 2 /* CLASS */))
4987
5007
  : vue.createCommentVNode("v-if", true),
4988
5008
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4989
- ], 10 /* CLASS, PROPS */, _hoisted_44))
5009
+ ], 10 /* CLASS, PROPS */, _hoisted_46))
4990
5010
  : (act.emits)
4991
5011
  ? (vue.openBlock(), vue.createElementBlock("button", {
4992
5012
  key: 3,
@@ -5001,7 +5021,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5001
5021
  }, null, 2 /* CLASS */))
5002
5022
  : vue.createCommentVNode("v-if", true),
5003
5023
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5004
- ], 10 /* CLASS, PROPS */, _hoisted_45))
5024
+ ], 10 /* CLASS, PROPS */, _hoisted_47))
5005
5025
  : (!act.emits)
5006
5026
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
5007
5027
  key: 4,
@@ -5029,20 +5049,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5029
5049
  }), 128 /* KEYED_FRAGMENT */))
5030
5050
  ]))
5031
5051
  : vue.createCommentVNode("v-if", true)
5032
- ], 10 /* CLASS, PROPS */, _hoisted_36))
5052
+ ], 10 /* CLASS, PROPS */, _hoisted_38))
5033
5053
  }), 128 /* KEYED_FRAGMENT */))
5034
5054
  : vue.createCommentVNode("v-if", true)
5035
5055
  ])
5036
5056
  ], 2 /* CLASS */))
5037
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, [
5057
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [
5038
5058
  ($data.loading === 'loading')
5039
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, _hoisted_49))
5059
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, _hoisted_51))
5040
5060
  : ($data.loading === 'error')
5041
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
5061
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
5042
5062
  vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
5043
5063
  ]))
5044
5064
  : ($data.loading === 'done')
5045
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
5065
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
5046
5066
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
5047
5067
  return (vue.openBlock(), vue.createElementBlock("div", {
5048
5068
  key: record.id,
@@ -5054,10 +5074,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5054
5074
  key: key[0]
5055
5075
  }, [
5056
5076
  (typeof key === 'string' )
5057
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_53, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5077
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5058
5078
  : (typeof key === 'function')
5059
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5060
- : (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5079
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5080
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5061
5081
  vue.createElementVNode("span", null, [
5062
5082
  (typeof key === 'string' && $props.links && $props.links[key])
5063
5083
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -5067,31 +5087,31 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5067
5087
  innerHTML: record[key]
5068
5088
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5069
5089
  : ($options.getFieldType(key) === 'numeric')
5070
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_56, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5090
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5071
5091
  : ($options.getFieldType(key) === 'money')
5072
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5092
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5073
5093
  : ($options.getFieldType(key) === 'date')
5074
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
5094
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
5075
5095
  : (typeof key === 'string')
5076
5096
  ? (vue.openBlock(), vue.createElementBlock("span", {
5077
5097
  key: 4,
5078
5098
  innerHTML: record[key]
5079
- }, null, 8 /* PROPS */, _hoisted_59))
5099
+ }, null, 8 /* PROPS */, _hoisted_61))
5080
5100
  : (typeof key === 'function')
5081
5101
  ? (vue.openBlock(), vue.createElementBlock("span", {
5082
5102
  key: 5,
5083
5103
  innerHTML: key(record, index )
5084
- }, null, 8 /* PROPS */, _hoisted_60))
5104
+ }, null, 8 /* PROPS */, _hoisted_62))
5085
5105
  : (vue.openBlock(), vue.createElementBlock("span", {
5086
5106
  key: 6,
5087
5107
  innerHTML: record[key[0]]
5088
- }, null, 8 /* PROPS */, _hoisted_61))
5108
+ }, null, 8 /* PROPS */, _hoisted_63))
5089
5109
  ]),
5090
- _hoisted_62
5110
+ _hoisted_64
5091
5111
  ], 64 /* STABLE_FRAGMENT */))
5092
5112
  }), 128 /* KEYED_FRAGMENT */)),
5093
5113
  ($props.actions)
5094
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_63, [
5114
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_65, [
5095
5115
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
5096
5116
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5097
5117
  key: act.path
@@ -5114,7 +5134,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5114
5134
  }, null, 2 /* CLASS */))
5115
5135
  : vue.createCommentVNode("v-if", true),
5116
5136
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5117
- ], 10 /* CLASS, PROPS */, _hoisted_64))
5137
+ ], 10 /* CLASS, PROPS */, _hoisted_66))
5118
5138
  : (act.emits)
5119
5139
  ? (vue.openBlock(), vue.createElementBlock("button", {
5120
5140
  key: 1,
@@ -5129,7 +5149,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5129
5149
  }, null, 2 /* CLASS */))
5130
5150
  : vue.createCommentVNode("v-if", true),
5131
5151
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5132
- ], 10 /* CLASS, PROPS */, _hoisted_65))
5152
+ ], 10 /* CLASS, PROPS */, _hoisted_67))
5133
5153
  : (!act.emits)
5134
5154
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
5135
5155
  key: 2,
@@ -5157,7 +5177,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5157
5177
  }), 128 /* KEYED_FRAGMENT */))
5158
5178
  ]))
5159
5179
  : vue.createCommentVNode("v-if", true)
5160
- ], 8 /* PROPS */, _hoisted_52))
5180
+ ], 8 /* PROPS */, _hoisted_54))
5161
5181
  }), 128 /* KEYED_FRAGMENT */))
5162
5182
  ]))
5163
5183
  : vue.createCommentVNode("v-if", true)
package/dist/library.mjs CHANGED
@@ -2,7 +2,7 @@ import Axios from 'axios';
2
2
  import moment from 'moment';
3
3
  import Swal from 'sweetalert2';
4
4
  import NProgress from 'nprogress';
5
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
5
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, vModelCheckbox, shallowRef, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
6
6
  import _ from 'lodash';
7
7
  import { useRoute, useRouter } from 'vue-router';
8
8
  import { defineStore, storeToRefs } from 'pinia';
@@ -2957,7 +2957,7 @@ onMounted(()=>{
2957
2957
  if(props.data){
2958
2958
  selectOptions.value = props.data.map(item=>{
2959
2959
  return {
2960
- id: item.id ? item.id : item.key ? item.key : item.value ? item.value:item.name ? item.name:item.label,
2960
+ id: typeof item.id !== 'undefined' ? item.id : item.key ? item.key : item.value ? item.value:item.name ? item.name:item.label,
2961
2961
  name: item.label ? item.label : item.name ? item.name : item.value ? item.value:item.id ? item.id:item.option
2962
2962
  }
2963
2963
  });
@@ -4283,6 +4283,7 @@ var script$b = {
4283
4283
  order_method: '',
4284
4284
  per_page: shRepo.getShConfig('tablePerPage', 10),
4285
4285
  page: 1,
4286
+ exactMatch: false,
4286
4287
  filter_value: '',
4287
4288
  loading: 'loading',
4288
4289
  loading_error: '',
@@ -4478,7 +4479,8 @@ var script$b = {
4478
4479
  paginated: true,
4479
4480
  from: this.from,
4480
4481
  to: this.to,
4481
- period: this.period
4482
+ period: this.period,
4483
+ exact: this.exactMatch
4482
4484
  };
4483
4485
  if (this.pagination_data) {
4484
4486
  this.pagination_data.loading = 1;
@@ -4589,56 +4591,61 @@ const _hoisted_9$2 = {
4589
4591
  };
4590
4592
  const _hoisted_10$1 = ["placeholder"];
4591
4593
  const _hoisted_11$1 = {
4594
+ key: 0,
4595
+ class: "input-group-text exact_checkbox"
4596
+ };
4597
+ const _hoisted_12$1 = /*#__PURE__*/createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
4598
+ const _hoisted_13$1 = {
4592
4599
  key: 0,
4593
4600
  class: "text-center"
4594
4601
  };
4595
- const _hoisted_12$1 = /*#__PURE__*/createElementVNode("div", {
4602
+ const _hoisted_14$1 = /*#__PURE__*/createElementVNode("div", {
4596
4603
  class: "spinner-border",
4597
4604
  role: "status"
4598
4605
  }, [
4599
4606
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4600
4607
  ], -1 /* HOISTED */);
4601
- const _hoisted_13$1 = [
4602
- _hoisted_12$1
4608
+ const _hoisted_15$1 = [
4609
+ _hoisted_14$1
4603
4610
  ];
4604
- const _hoisted_14$1 = {
4611
+ const _hoisted_16$1 = {
4605
4612
  key: 1,
4606
4613
  class: "alert alert-danger"
4607
4614
  };
4608
- const _hoisted_15$1 = { colspan: 2 };
4609
- const _hoisted_16$1 = {
4615
+ const _hoisted_17$1 = { colspan: 2 };
4616
+ const _hoisted_18$1 = {
4610
4617
  key: 0,
4611
4618
  class: "text-center"
4612
4619
  };
4613
- const _hoisted_17$1 = /*#__PURE__*/createElementVNode("div", {
4620
+ const _hoisted_19 = /*#__PURE__*/createElementVNode("div", {
4614
4621
  class: "spinner-border",
4615
4622
  role: "status"
4616
4623
  }, [
4617
4624
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4618
4625
  ], -1 /* HOISTED */);
4619
- const _hoisted_18$1 = [
4620
- _hoisted_17$1
4626
+ const _hoisted_20 = [
4627
+ _hoisted_19
4621
4628
  ];
4622
- const _hoisted_19 = {
4629
+ const _hoisted_21 = {
4623
4630
  key: 1,
4624
4631
  class: "alert alert-danger"
4625
4632
  };
4626
- const _hoisted_20 = { colspan: 2 };
4627
- const _hoisted_21 = { class: "sh-thead" };
4628
- const _hoisted_22 = ["onClick"];
4629
- const _hoisted_23 = ["onClick"];
4633
+ const _hoisted_22 = { colspan: 2 };
4634
+ const _hoisted_23 = { class: "sh-thead" };
4630
4635
  const _hoisted_24 = ["onClick"];
4631
- const _hoisted_25 = {
4636
+ const _hoisted_25 = ["onClick"];
4637
+ const _hoisted_26 = ["onClick"];
4638
+ const _hoisted_27 = {
4632
4639
  key: 0,
4633
4640
  class: "text-capitalize"
4634
4641
  };
4635
- const _hoisted_26 = { class: "sh-tbody" };
4636
- const _hoisted_27 = {
4642
+ const _hoisted_28 = { class: "sh-tbody" };
4643
+ const _hoisted_29 = {
4637
4644
  key: 0,
4638
4645
  class: "text-center"
4639
4646
  };
4640
- const _hoisted_28 = ["colspan"];
4641
- const _hoisted_29 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
4647
+ const _hoisted_30 = ["colspan"];
4648
+ const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
4642
4649
  /*#__PURE__*/createElementVNode("div", {
4643
4650
  class: "spinner-border",
4644
4651
  role: "status"
@@ -4646,42 +4653,42 @@ const _hoisted_29 = /*#__PURE__*/createElementVNode("div", { class: "text-center
4646
4653
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4647
4654
  ])
4648
4655
  ], -1 /* HOISTED */);
4649
- const _hoisted_30 = [
4650
- _hoisted_29
4656
+ const _hoisted_32 = [
4657
+ _hoisted_31
4651
4658
  ];
4652
- const _hoisted_31 = {
4659
+ const _hoisted_33 = {
4653
4660
  key: 1,
4654
4661
  class: "text-center alert alert-danger"
4655
4662
  };
4656
- const _hoisted_32 = ["colspan"];
4657
- const _hoisted_33 = {
4663
+ const _hoisted_34 = ["colspan"];
4664
+ const _hoisted_35 = {
4658
4665
  key: 2,
4659
4666
  class: "text-center alert alert-info no_records"
4660
4667
  };
4661
- const _hoisted_34 = ["colspan"];
4662
- const _hoisted_35 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4663
- const _hoisted_36 = ["onClick"];
4664
- const _hoisted_37 = { key: 1 };
4665
- const _hoisted_38 = {
4668
+ const _hoisted_36 = ["colspan"];
4669
+ const _hoisted_37 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4670
+ const _hoisted_38 = ["onClick"];
4671
+ const _hoisted_39 = { key: 1 };
4672
+ const _hoisted_40 = {
4666
4673
  key: 2,
4667
4674
  class: "text-success fw-bold"
4668
4675
  };
4669
- const _hoisted_39 = { key: 3 };
4670
- const _hoisted_40 = ["innerHTML"];
4671
- const _hoisted_41 = ["innerHTML"];
4676
+ const _hoisted_41 = { key: 3 };
4672
4677
  const _hoisted_42 = ["innerHTML"];
4673
- const _hoisted_43 = {
4678
+ const _hoisted_43 = ["innerHTML"];
4679
+ const _hoisted_44 = ["innerHTML"];
4680
+ const _hoisted_45 = {
4674
4681
  key: 0,
4675
4682
  style: {"white-space":"nowrap"}
4676
4683
  };
4677
- const _hoisted_44 = ["href"];
4678
- const _hoisted_45 = ["title", "onClick"];
4679
- const _hoisted_46 = { key: 5 };
4680
- const _hoisted_47 = {
4684
+ const _hoisted_46 = ["href"];
4685
+ const _hoisted_47 = ["title", "onClick"];
4686
+ const _hoisted_48 = { key: 5 };
4687
+ const _hoisted_49 = {
4681
4688
  key: 0,
4682
4689
  class: "text-center"
4683
4690
  };
4684
- const _hoisted_48 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
4691
+ const _hoisted_50 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
4685
4692
  /*#__PURE__*/createElementVNode("div", {
4686
4693
  class: "spinner-border",
4687
4694
  role: "status"
@@ -4689,40 +4696,40 @@ const _hoisted_48 = /*#__PURE__*/createElementVNode("div", { class: "text-center
4689
4696
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4690
4697
  ])
4691
4698
  ], -1 /* HOISTED */);
4692
- const _hoisted_49 = [
4693
- _hoisted_48
4699
+ const _hoisted_51 = [
4700
+ _hoisted_50
4694
4701
  ];
4695
- const _hoisted_50 = { key: 1 };
4696
- const _hoisted_51 = {
4702
+ const _hoisted_52 = { key: 1 };
4703
+ const _hoisted_53 = {
4697
4704
  key: 2,
4698
4705
  class: "mobile-list-items"
4699
4706
  };
4700
- const _hoisted_52 = ["onClick"];
4701
- const _hoisted_53 = {
4707
+ const _hoisted_54 = ["onClick"];
4708
+ const _hoisted_55 = {
4702
4709
  key: 0,
4703
4710
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4704
4711
  };
4705
- const _hoisted_54 = {
4712
+ const _hoisted_56 = {
4706
4713
  key: 1,
4707
4714
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4708
4715
  };
4709
- const _hoisted_55 = {
4716
+ const _hoisted_57 = {
4710
4717
  key: 2,
4711
4718
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4712
4719
  };
4713
- const _hoisted_56 = { key: 1 };
4714
- const _hoisted_57 = {
4720
+ const _hoisted_58 = { key: 1 };
4721
+ const _hoisted_59 = {
4715
4722
  key: 2,
4716
4723
  class: "text-primary fw-bold"
4717
4724
  };
4718
- const _hoisted_58 = { key: 3 };
4719
- const _hoisted_59 = ["innerHTML"];
4720
- const _hoisted_60 = ["innerHTML"];
4725
+ const _hoisted_60 = { key: 3 };
4721
4726
  const _hoisted_61 = ["innerHTML"];
4722
- const _hoisted_62 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4723
- const _hoisted_63 = { key: 0 };
4724
- const _hoisted_64 = ["href"];
4725
- const _hoisted_65 = ["title", "onClick"];
4727
+ const _hoisted_62 = ["innerHTML"];
4728
+ const _hoisted_63 = ["innerHTML"];
4729
+ const _hoisted_64 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4730
+ const _hoisted_65 = { key: 0 };
4731
+ const _hoisted_66 = ["href"];
4732
+ const _hoisted_67 = ["title", "onClick"];
4726
4733
 
4727
4734
  function render(_ctx, _cache, $props, $setup, $data, $options) {
4728
4735
  const _component_sh_range = resolveComponent("sh-range");
@@ -4761,7 +4768,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4761
4768
  ]))
4762
4769
  : createCommentVNode("v-if", true),
4763
4770
  createElementVNode("div", {
4764
- class: normalizeClass(["sh-search-bar", $props.hasRange ? 'ms-2':''])
4771
+ class: normalizeClass(["sh-search-bar input-group", $props.hasRange ? 'ms-2':''])
4765
4772
  }, [
4766
4773
  withDirectives(createElementVNode("input", {
4767
4774
  onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
@@ -4773,7 +4780,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4773
4780
  class: "form-control sh-search-input"
4774
4781
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
4775
4782
  [vModelText, $data.filter_value]
4776
- ])
4783
+ ]),
4784
+ ($data.filter_value.length > 1)
4785
+ ? (openBlock(), createElementBlock("span", _hoisted_11$1, [
4786
+ withDirectives(createElementVNode("input", {
4787
+ onChange: _cache[5] || (_cache[5] = (...args) => ($options.reloadData && $options.reloadData(...args))),
4788
+ value: true,
4789
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => (($data.exactMatch) = $event)),
4790
+ type: "checkbox"
4791
+ }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
4792
+ [vModelCheckbox, $data.exactMatch]
4793
+ ]),
4794
+ _hoisted_12$1
4795
+ ]))
4796
+ : createCommentVNode("v-if", true)
4777
4797
  ], 2 /* CLASS */)
4778
4798
  ])
4779
4799
  ]))
@@ -4781,10 +4801,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4781
4801
  ($options.hasDefaultSlot)
4782
4802
  ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4783
4803
  ($data.loading === 'loading')
4784
- ? (openBlock(), createElementBlock("div", _hoisted_11$1, _hoisted_13$1))
4804
+ ? (openBlock(), createElementBlock("div", _hoisted_13$1, _hoisted_15$1))
4785
4805
  : ($data.loading === 'error')
4786
- ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
4787
- createElementVNode("span", _hoisted_15$1, toDisplayString($data.loading_error), 1 /* TEXT */)
4806
+ ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
4807
+ createElementVNode("span", _hoisted_17$1, toDisplayString($data.loading_error), 1 /* TEXT */)
4788
4808
  ]))
4789
4809
  : createCommentVNode("v-if", true),
4790
4810
  ($data.loading === 'done')
@@ -4799,10 +4819,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4799
4819
  : ($options.hasRecordsSlot)
4800
4820
  ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
4801
4821
  ($data.loading === 'loading')
4802
- ? (openBlock(), createElementBlock("div", _hoisted_16$1, _hoisted_18$1))
4822
+ ? (openBlock(), createElementBlock("div", _hoisted_18$1, _hoisted_20))
4803
4823
  : ($data.loading === 'error')
4804
- ? (openBlock(), createElementBlock("div", _hoisted_19, [
4805
- createElementVNode("span", _hoisted_20, toDisplayString($data.loading_error), 1 /* TEXT */)
4824
+ ? (openBlock(), createElementBlock("div", _hoisted_21, [
4825
+ createElementVNode("span", _hoisted_22, toDisplayString($data.loading_error), 1 /* TEXT */)
4806
4826
  ]))
4807
4827
  : createCommentVNode("v-if", true),
4808
4828
  ($data.loading === 'done')
@@ -4817,7 +4837,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4817
4837
  key: 4,
4818
4838
  class: normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
4819
4839
  }, [
4820
- createElementVNode("thead", _hoisted_21, [
4840
+ createElementVNode("thead", _hoisted_23, [
4821
4841
  createElementVNode("tr", null, [
4822
4842
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.tableHeaders, (title) => {
4823
4843
  return (openBlock(), createElementBlock("th", { key: title }, [
@@ -4826,48 +4846,48 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4826
4846
  key: 0,
4827
4847
  class: "text-capitalize",
4828
4848
  onClick: $event => ($options.changeKey('order_by',title))
4829
- }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
4849
+ }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4830
4850
  : (typeof title === 'function')
4831
4851
  ? (openBlock(), createElementBlock("a", {
4832
4852
  key: 1,
4833
4853
  class: "text-capitalize",
4834
4854
  onClick: $event => ($options.changeKey('order_by',title(null)))
4835
- }, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
4855
+ }, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
4836
4856
  : (typeof title !== 'undefined')
4837
4857
  ? (openBlock(), createElementBlock("a", {
4838
4858
  key: 2,
4839
4859
  class: "text-capitalize",
4840
4860
  onClick: $event => ($options.changeKey('order_by',title))
4841
- }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4861
+ }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
4842
4862
  : createCommentVNode("v-if", true)
4843
4863
  ]))
4844
4864
  }), 128 /* KEYED_FRAGMENT */)),
4845
4865
  ($props.actions)
4846
- ? (openBlock(), createElementBlock("th", _hoisted_25, toDisplayString($props.actions.label), 1 /* TEXT */))
4866
+ ? (openBlock(), createElementBlock("th", _hoisted_27, toDisplayString($props.actions.label), 1 /* TEXT */))
4847
4867
  : createCommentVNode("v-if", true)
4848
4868
  ])
4849
4869
  ]),
4850
- createElementVNode("tbody", _hoisted_26, [
4870
+ createElementVNode("tbody", _hoisted_28, [
4851
4871
  ($data.loading === 'loading')
4852
- ? (openBlock(), createElementBlock("tr", _hoisted_27, [
4872
+ ? (openBlock(), createElementBlock("tr", _hoisted_29, [
4853
4873
  createElementVNode("td", {
4854
4874
  colspan: $data.tableHeaders.length
4855
- }, _hoisted_30, 8 /* PROPS */, _hoisted_28)
4875
+ }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
4856
4876
  ]))
4857
4877
  : ($data.loading === 'error')
4858
- ? (openBlock(), createElementBlock("tr", _hoisted_31, [
4878
+ ? (openBlock(), createElementBlock("tr", _hoisted_33, [
4859
4879
  createElementVNode("td", {
4860
4880
  colspan: $data.tableHeaders.length
4861
- }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_32)
4881
+ }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
4862
4882
  ]))
4863
4883
  : ($data.records.length === 0)
4864
- ? (openBlock(), createElementBlock("tr", _hoisted_33, [
4884
+ ? (openBlock(), createElementBlock("tr", _hoisted_35, [
4865
4885
  createElementVNode("td", {
4866
4886
  colspan: $props.actions ? $data.tableHeaders.length + 1 : $data.tableHeaders.length
4867
4887
  }, [
4868
- _hoisted_35,
4888
+ _hoisted_37,
4869
4889
  createTextVNode(" No records found ")
4870
- ], 8 /* PROPS */, _hoisted_34)
4890
+ ], 8 /* PROPS */, _hoisted_36)
4871
4891
  ]))
4872
4892
  : ($data.loading === 'done')
4873
4893
  ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList($data.records, (record, index) => {
@@ -4887,29 +4907,29 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4887
4907
  innerHTML: record[key]
4888
4908
  }, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
4889
4909
  : ($options.getFieldType(key) === 'numeric')
4890
- ? (openBlock(), createElementBlock("span", _hoisted_37, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4910
+ ? (openBlock(), createElementBlock("span", _hoisted_39, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4891
4911
  : ($options.getFieldType(key) === 'money')
4892
- ? (openBlock(), createElementBlock("span", _hoisted_38, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4912
+ ? (openBlock(), createElementBlock("span", _hoisted_40, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4893
4913
  : ($options.getFieldType(key) === 'date')
4894
- ? (openBlock(), createElementBlock("span", _hoisted_39, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
4914
+ ? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
4895
4915
  : (typeof key === 'string')
4896
4916
  ? (openBlock(), createElementBlock("span", {
4897
4917
  key: 4,
4898
4918
  innerHTML: record[key]
4899
- }, null, 8 /* PROPS */, _hoisted_40))
4919
+ }, null, 8 /* PROPS */, _hoisted_42))
4900
4920
  : (typeof key === 'function')
4901
4921
  ? (openBlock(), createElementBlock("span", {
4902
4922
  key: 5,
4903
4923
  innerHTML: key(record, index)
4904
- }, null, 8 /* PROPS */, _hoisted_41))
4924
+ }, null, 8 /* PROPS */, _hoisted_43))
4905
4925
  : (openBlock(), createElementBlock("span", {
4906
4926
  key: 6,
4907
4927
  innerHTML: record[key[0]]
4908
- }, null, 8 /* PROPS */, _hoisted_42))
4928
+ }, null, 8 /* PROPS */, _hoisted_44))
4909
4929
  ]))
4910
4930
  }), 128 /* KEYED_FRAGMENT */)),
4911
4931
  ($props.actions)
4912
- ? (openBlock(), createElementBlock("td", _hoisted_43, [
4932
+ ? (openBlock(), createElementBlock("td", _hoisted_45, [
4913
4933
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
4914
4934
  return (openBlock(), createElementBlock(Fragment, {
4915
4935
  key: act.path
@@ -4974,7 +4994,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4974
4994
  }, null, 2 /* CLASS */))
4975
4995
  : createCommentVNode("v-if", true),
4976
4996
  createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
4977
- ], 10 /* CLASS, PROPS */, _hoisted_44))
4997
+ ], 10 /* CLASS, PROPS */, _hoisted_46))
4978
4998
  : (act.emits)
4979
4999
  ? (openBlock(), createElementBlock("button", {
4980
5000
  key: 3,
@@ -4989,7 +5009,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4989
5009
  }, null, 2 /* CLASS */))
4990
5010
  : createCommentVNode("v-if", true),
4991
5011
  createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
4992
- ], 10 /* CLASS, PROPS */, _hoisted_45))
5012
+ ], 10 /* CLASS, PROPS */, _hoisted_47))
4993
5013
  : (!act.emits)
4994
5014
  ? (openBlock(), createBlock(_component_router_link, {
4995
5015
  key: 4,
@@ -5017,20 +5037,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5017
5037
  }), 128 /* KEYED_FRAGMENT */))
5018
5038
  ]))
5019
5039
  : createCommentVNode("v-if", true)
5020
- ], 10 /* CLASS, PROPS */, _hoisted_36))
5040
+ ], 10 /* CLASS, PROPS */, _hoisted_38))
5021
5041
  }), 128 /* KEYED_FRAGMENT */))
5022
5042
  : createCommentVNode("v-if", true)
5023
5043
  ])
5024
5044
  ], 2 /* CLASS */))
5025
- : (openBlock(), createElementBlock("div", _hoisted_46, [
5045
+ : (openBlock(), createElementBlock("div", _hoisted_48, [
5026
5046
  ($data.loading === 'loading')
5027
- ? (openBlock(), createElementBlock("div", _hoisted_47, _hoisted_49))
5047
+ ? (openBlock(), createElementBlock("div", _hoisted_49, _hoisted_51))
5028
5048
  : ($data.loading === 'error')
5029
- ? (openBlock(), createElementBlock("div", _hoisted_50, [
5049
+ ? (openBlock(), createElementBlock("div", _hoisted_52, [
5030
5050
  createElementVNode("span", null, toDisplayString($data.loading_error), 1 /* TEXT */)
5031
5051
  ]))
5032
5052
  : ($data.loading === 'done')
5033
- ? (openBlock(), createElementBlock("div", _hoisted_51, [
5053
+ ? (openBlock(), createElementBlock("div", _hoisted_53, [
5034
5054
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.records, (record, index) => {
5035
5055
  return (openBlock(), createElementBlock("div", {
5036
5056
  key: record.id,
@@ -5042,10 +5062,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5042
5062
  key: key[0]
5043
5063
  }, [
5044
5064
  (typeof key === 'string' )
5045
- ? (openBlock(), createElementBlock("p", _hoisted_53, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5065
+ ? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5046
5066
  : (typeof key === 'function')
5047
- ? (openBlock(), createElementBlock("p", _hoisted_54, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5048
- : (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5067
+ ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5068
+ : (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5049
5069
  createElementVNode("span", null, [
5050
5070
  (typeof key === 'string' && $props.links && $props.links[key])
5051
5071
  ? (openBlock(), createBlock(_component_router_link, {
@@ -5055,31 +5075,31 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5055
5075
  innerHTML: record[key]
5056
5076
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5057
5077
  : ($options.getFieldType(key) === 'numeric')
5058
- ? (openBlock(), createElementBlock("span", _hoisted_56, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5078
+ ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5059
5079
  : ($options.getFieldType(key) === 'money')
5060
- ? (openBlock(), createElementBlock("span", _hoisted_57, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5080
+ ? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5061
5081
  : ($options.getFieldType(key) === 'date')
5062
- ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
5082
+ ? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
5063
5083
  : (typeof key === 'string')
5064
5084
  ? (openBlock(), createElementBlock("span", {
5065
5085
  key: 4,
5066
5086
  innerHTML: record[key]
5067
- }, null, 8 /* PROPS */, _hoisted_59))
5087
+ }, null, 8 /* PROPS */, _hoisted_61))
5068
5088
  : (typeof key === 'function')
5069
5089
  ? (openBlock(), createElementBlock("span", {
5070
5090
  key: 5,
5071
5091
  innerHTML: key(record, index )
5072
- }, null, 8 /* PROPS */, _hoisted_60))
5092
+ }, null, 8 /* PROPS */, _hoisted_62))
5073
5093
  : (openBlock(), createElementBlock("span", {
5074
5094
  key: 6,
5075
5095
  innerHTML: record[key[0]]
5076
- }, null, 8 /* PROPS */, _hoisted_61))
5096
+ }, null, 8 /* PROPS */, _hoisted_63))
5077
5097
  ]),
5078
- _hoisted_62
5098
+ _hoisted_64
5079
5099
  ], 64 /* STABLE_FRAGMENT */))
5080
5100
  }), 128 /* KEYED_FRAGMENT */)),
5081
5101
  ($props.actions)
5082
- ? (openBlock(), createElementBlock("div", _hoisted_63, [
5102
+ ? (openBlock(), createElementBlock("div", _hoisted_65, [
5083
5103
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
5084
5104
  return (openBlock(), createElementBlock(Fragment, {
5085
5105
  key: act.path
@@ -5102,7 +5122,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5102
5122
  }, null, 2 /* CLASS */))
5103
5123
  : createCommentVNode("v-if", true),
5104
5124
  createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
5105
- ], 10 /* CLASS, PROPS */, _hoisted_64))
5125
+ ], 10 /* CLASS, PROPS */, _hoisted_66))
5106
5126
  : (act.emits)
5107
5127
  ? (openBlock(), createElementBlock("button", {
5108
5128
  key: 1,
@@ -5117,7 +5137,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5117
5137
  }, null, 2 /* CLASS */))
5118
5138
  : createCommentVNode("v-if", true),
5119
5139
  createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
5120
- ], 10 /* CLASS, PROPS */, _hoisted_65))
5140
+ ], 10 /* CLASS, PROPS */, _hoisted_67))
5121
5141
  : (!act.emits)
5122
5142
  ? (openBlock(), createBlock(_component_router_link, {
5123
5143
  key: 2,
@@ -5145,7 +5165,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5145
5165
  }), 128 /* KEYED_FRAGMENT */))
5146
5166
  ]))
5147
5167
  : createCommentVNode("v-if", true)
5148
- ], 8 /* PROPS */, _hoisted_52))
5168
+ ], 8 /* PROPS */, _hoisted_54))
5149
5169
  }), 128 /* KEYED_FRAGMENT */))
5150
5170
  ]))
5151
5171
  : createCommentVNode("v-if", true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",