@iankibetsh/shframework 5.0.0 → 5.0.2

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
@@ -4563,11 +4563,11 @@ const _hoisted_2$a = {
4563
4563
  "aria-expanded": "false"
4564
4564
  };
4565
4565
  const _hoisted_3$9 = {
4566
- key: 0,
4566
+ key: 1,
4567
4567
  class: "bi bi-three-dots"
4568
4568
  };
4569
4569
  const _hoisted_4$9 = {
4570
- key: 1,
4570
+ key: 2,
4571
4571
  class: "bi bi-three-dots-vertical"
4572
4572
  };
4573
4573
  const _hoisted_5$8 = { class: "dropdown-menu" };
@@ -4582,14 +4582,20 @@ const props = __props;
4582
4582
 
4583
4583
  const actionItems = props.actions.actions;
4584
4584
  const type = props.actions.type; // dropdown, button
4585
+ const icon = props.actions.icon;
4585
4586
 
4586
4587
  return (_ctx, _cache) => {
4587
4588
  return (vue.unref(type) && vue.unref(type).includes('dropdown'))
4588
4589
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
4589
4590
  vue.createElementVNode("strong", _hoisted_2$a, [
4590
- (vue.unref(type) === 'dropdown-horizontal')
4591
- ? (vue.openBlock(), vue.createElementBlock("i", _hoisted_3$9))
4592
- : (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$9))
4591
+ (vue.unref(icon))
4592
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4593
+ key: 0,
4594
+ class: vue.normalizeClass(vue.unref(icon))
4595
+ }, null, 2 /* CLASS */))
4596
+ : (vue.unref(type) === 'dropdown-horizontal')
4597
+ ? (vue.openBlock(), vue.createElementBlock("i", _hoisted_3$9))
4598
+ : (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$9))
4593
4599
  ]),
4594
4600
  vue.createElementVNode("ul", _hoisted_5$8, [
4595
4601
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(actionItems), (act) => {
@@ -5133,16 +5139,18 @@ const _hoisted_42 = ["innerHTML"];
5133
5139
  const _hoisted_43 = ["innerHTML"];
5134
5140
  const _hoisted_44 = ["innerHTML"];
5135
5141
  const _hoisted_45 = ["innerHTML"];
5136
- const _hoisted_46 = {
5142
+ const _hoisted_46 = ["innerHTML"];
5143
+ const _hoisted_47 = ["innerHTML"];
5144
+ const _hoisted_48 = {
5137
5145
  key: 0,
5138
5146
  style: {"white-space":"nowrap"}
5139
5147
  };
5140
- const _hoisted_47 = { key: 5 };
5141
- const _hoisted_48 = {
5148
+ const _hoisted_49 = { key: 5 };
5149
+ const _hoisted_50 = {
5142
5150
  key: 0,
5143
5151
  class: "text-center"
5144
5152
  };
5145
- const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
5153
+ const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
5146
5154
  /*#__PURE__*/vue.createElementVNode("div", {
5147
5155
  class: "spinner-border",
5148
5156
  role: "status"
@@ -5150,43 +5158,45 @@ const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
5150
5158
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
5151
5159
  ])
5152
5160
  ], -1 /* HOISTED */);
5153
- const _hoisted_50 = [
5154
- _hoisted_49
5161
+ const _hoisted_52 = [
5162
+ _hoisted_51
5155
5163
  ];
5156
- const _hoisted_51 = { key: 1 };
5157
- const _hoisted_52 = {
5164
+ const _hoisted_53 = { key: 1 };
5165
+ const _hoisted_54 = {
5158
5166
  key: 2,
5159
5167
  class: "mobile-list-items"
5160
5168
  };
5161
- const _hoisted_53 = ["onClick"];
5162
- const _hoisted_54 = {
5169
+ const _hoisted_55 = ["onClick"];
5170
+ const _hoisted_56 = {
5163
5171
  key: 0,
5164
5172
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5165
5173
  };
5166
- const _hoisted_55 = {
5174
+ const _hoisted_57 = {
5167
5175
  key: 1,
5168
5176
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5169
5177
  };
5170
- const _hoisted_56 = {
5178
+ const _hoisted_58 = {
5171
5179
  key: 2,
5172
5180
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5173
5181
  };
5174
- const _hoisted_57 = {
5182
+ const _hoisted_59 = {
5175
5183
  key: 3,
5176
5184
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5177
5185
  };
5178
- const _hoisted_58 = { key: 1 };
5179
- const _hoisted_59 = {
5186
+ const _hoisted_60 = { key: 1 };
5187
+ const _hoisted_61 = {
5180
5188
  key: 2,
5181
5189
  class: "text-primary fw-bold"
5182
5190
  };
5183
- const _hoisted_60 = { key: 3 };
5184
- const _hoisted_61 = ["innerHTML"];
5185
- const _hoisted_62 = ["innerHTML"];
5191
+ const _hoisted_62 = { key: 3 };
5186
5192
  const _hoisted_63 = ["innerHTML"];
5187
5193
  const _hoisted_64 = ["innerHTML"];
5188
- const _hoisted_65 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5189
- const _hoisted_66 = { key: 0 };
5194
+ const _hoisted_65 = ["innerHTML"];
5195
+ const _hoisted_66 = ["innerHTML"];
5196
+ const _hoisted_67 = ["innerHTML"];
5197
+ const _hoisted_68 = ["innerHTML"];
5198
+ const _hoisted_69 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5199
+ const _hoisted_70 = { key: 0 };
5190
5200
 
5191
5201
  const __default__ = {
5192
5202
  name: 'sh-table',
@@ -5721,25 +5731,35 @@ return (_ctx, _cache) => {
5721
5731
  key: 5,
5722
5732
  innerHTML: key(record, index)
5723
5733
  }, null, 8 /* PROPS */, _hoisted_43))
5724
- : (typeof key === 'object' && key.component)
5725
- ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5734
+ : (typeof key === 'object' && key.callBack)
5735
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5726
5736
  key: 6,
5727
- item: record,
5728
- ref_for: true
5729
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5730
- : (typeof key === 'object')
5737
+ innerHTML: key.callBack(record, index)
5738
+ }, null, 8 /* PROPS */, _hoisted_44))
5739
+ : (typeof key === 'object' && key.callback)
5731
5740
  ? (vue.openBlock(), vue.createElementBlock("span", {
5732
5741
  key: 7,
5733
- innerHTML: record[key.key ?? key.field]
5734
- }, null, 8 /* PROPS */, _hoisted_44))
5735
- : (vue.openBlock(), vue.createElementBlock("span", {
5736
- key: 8,
5737
- innerHTML: record[key[0]]
5742
+ innerHTML: key.callback(record, index)
5738
5743
  }, null, 8 /* PROPS */, _hoisted_45))
5744
+ : (typeof key === 'object' && key.component)
5745
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5746
+ key: 8,
5747
+ item: record,
5748
+ ref_for: true
5749
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5750
+ : (typeof key === 'object')
5751
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5752
+ key: 9,
5753
+ innerHTML: record[key.key ?? key.field]
5754
+ }, null, 8 /* PROPS */, _hoisted_46))
5755
+ : (vue.openBlock(), vue.createElementBlock("span", {
5756
+ key: 10,
5757
+ innerHTML: record[key[0]]
5758
+ }, null, 8 /* PROPS */, _hoisted_47))
5739
5759
  ]))
5740
5760
  }), 128 /* KEYED_FRAGMENT */)),
5741
5761
  (__props.actions)
5742
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
5762
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_48, [
5743
5763
  vue.createVNode(script$g, {
5744
5764
  emitAction: _ctx.doEmitAction,
5745
5765
  actions: __props.actions,
@@ -5752,15 +5772,15 @@ return (_ctx, _cache) => {
5752
5772
  : vue.createCommentVNode("v-if", true)
5753
5773
  ])
5754
5774
  ], 2 /* CLASS */))
5755
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, [
5775
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, [
5756
5776
  (_ctx.loading === 'loading')
5757
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [..._hoisted_50]))
5777
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [..._hoisted_52]))
5758
5778
  : (_ctx.loading === 'error')
5759
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
5779
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
5760
5780
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
5761
5781
  ]))
5762
5782
  : (_ctx.loading === 'done')
5763
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
5783
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
5764
5784
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
5765
5785
  return (vue.openBlock(), vue.createElementBlock("div", {
5766
5786
  key: record.id,
@@ -5772,12 +5792,12 @@ return (_ctx, _cache) => {
5772
5792
  key: key[0]
5773
5793
  }, [
5774
5794
  (typeof key === 'string' )
5775
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5795
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5776
5796
  : (typeof key === 'function')
5777
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5797
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5778
5798
  : (typeof key === 'object')
5779
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5780
- : (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5799
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_58, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5800
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_59, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5781
5801
  vue.createElementVNode("span", null, [
5782
5802
  (typeof key === 'string' && __props.links && __props.links[key])
5783
5803
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -5787,42 +5807,52 @@ return (_ctx, _cache) => {
5787
5807
  innerHTML: record[key]
5788
5808
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5789
5809
  : (_ctx.getFieldType(key) === 'numeric')
5790
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5810
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5791
5811
  : (_ctx.getFieldType(key) === 'money')
5792
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5812
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_61, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5793
5813
  : (_ctx.getFieldType(key) === 'date')
5794
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5814
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_62, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5795
5815
  : (typeof key === 'string')
5796
5816
  ? (vue.openBlock(), vue.createElementBlock("span", {
5797
5817
  key: 4,
5798
5818
  innerHTML: record[key]
5799
- }, null, 8 /* PROPS */, _hoisted_61))
5800
- : (typeof key === 'object' && key.component)
5801
- ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5819
+ }, null, 8 /* PROPS */, _hoisted_63))
5820
+ : (typeof key === 'object' && key.callBack)
5821
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5802
5822
  key: 5,
5803
- item: record,
5804
- ref_for: true
5805
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5806
- : (typeof key === 'object')
5823
+ innerHTML: key.callBack(record, index)
5824
+ }, null, 8 /* PROPS */, _hoisted_64))
5825
+ : (typeof key === 'object' && key.callback)
5807
5826
  ? (vue.openBlock(), vue.createElementBlock("span", {
5808
5827
  key: 6,
5809
- innerHTML: record[key.key ?? key.field]
5810
- }, null, 8 /* PROPS */, _hoisted_62))
5811
- : (typeof key === 'function')
5812
- ? (vue.openBlock(), vue.createElementBlock("span", {
5828
+ innerHTML: key.callback(record, index)
5829
+ }, null, 8 /* PROPS */, _hoisted_65))
5830
+ : (typeof key === 'object' && key.component)
5831
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5813
5832
  key: 7,
5814
- innerHTML: key(record, index )
5815
- }, null, 8 /* PROPS */, _hoisted_63))
5816
- : (vue.openBlock(), vue.createElementBlock("span", {
5817
- key: 8,
5818
- innerHTML: record[key[0]]
5819
- }, null, 8 /* PROPS */, _hoisted_64))
5833
+ item: record,
5834
+ ref_for: true
5835
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5836
+ : (typeof key === 'object')
5837
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5838
+ key: 8,
5839
+ innerHTML: record[key.key ?? key.field]
5840
+ }, null, 8 /* PROPS */, _hoisted_66))
5841
+ : (typeof key === 'function')
5842
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5843
+ key: 9,
5844
+ innerHTML: key(record, index )
5845
+ }, null, 8 /* PROPS */, _hoisted_67))
5846
+ : (vue.openBlock(), vue.createElementBlock("span", {
5847
+ key: 10,
5848
+ innerHTML: record[key[0]]
5849
+ }, null, 8 /* PROPS */, _hoisted_68))
5820
5850
  ]),
5821
- _hoisted_65
5851
+ _hoisted_69
5822
5852
  ], 64 /* STABLE_FRAGMENT */))
5823
5853
  }), 128 /* KEYED_FRAGMENT */)),
5824
5854
  (__props.actions)
5825
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_66, [
5855
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_70, [
5826
5856
  vue.createVNode(script$g, {
5827
5857
  emitAction: _ctx.doEmitAction,
5828
5858
  actions: __props.actions,
@@ -5830,7 +5860,7 @@ return (_ctx, _cache) => {
5830
5860
  }, null, 8 /* PROPS */, ["emitAction", "actions", "record"])
5831
5861
  ]))
5832
5862
  : vue.createCommentVNode("v-if", true)
5833
- ], 8 /* PROPS */, _hoisted_53))
5863
+ ], 8 /* PROPS */, _hoisted_55))
5834
5864
  }), 128 /* KEYED_FRAGMENT */))
5835
5865
  ]))
5836
5866
  : vue.createCommentVNode("v-if", true)
package/dist/library.mjs CHANGED
@@ -4551,11 +4551,11 @@ const _hoisted_2$a = {
4551
4551
  "aria-expanded": "false"
4552
4552
  };
4553
4553
  const _hoisted_3$9 = {
4554
- key: 0,
4554
+ key: 1,
4555
4555
  class: "bi bi-three-dots"
4556
4556
  };
4557
4557
  const _hoisted_4$9 = {
4558
- key: 1,
4558
+ key: 2,
4559
4559
  class: "bi bi-three-dots-vertical"
4560
4560
  };
4561
4561
  const _hoisted_5$8 = { class: "dropdown-menu" };
@@ -4570,14 +4570,20 @@ const props = __props;
4570
4570
 
4571
4571
  const actionItems = props.actions.actions;
4572
4572
  const type = props.actions.type; // dropdown, button
4573
+ const icon = props.actions.icon;
4573
4574
 
4574
4575
  return (_ctx, _cache) => {
4575
4576
  return (unref(type) && unref(type).includes('dropdown'))
4576
4577
  ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
4577
4578
  createElementVNode("strong", _hoisted_2$a, [
4578
- (unref(type) === 'dropdown-horizontal')
4579
- ? (openBlock(), createElementBlock("i", _hoisted_3$9))
4580
- : (openBlock(), createElementBlock("i", _hoisted_4$9))
4579
+ (unref(icon))
4580
+ ? (openBlock(), createElementBlock("span", {
4581
+ key: 0,
4582
+ class: normalizeClass(unref(icon))
4583
+ }, null, 2 /* CLASS */))
4584
+ : (unref(type) === 'dropdown-horizontal')
4585
+ ? (openBlock(), createElementBlock("i", _hoisted_3$9))
4586
+ : (openBlock(), createElementBlock("i", _hoisted_4$9))
4581
4587
  ]),
4582
4588
  createElementVNode("ul", _hoisted_5$8, [
4583
4589
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionItems), (act) => {
@@ -5121,16 +5127,18 @@ const _hoisted_42 = ["innerHTML"];
5121
5127
  const _hoisted_43 = ["innerHTML"];
5122
5128
  const _hoisted_44 = ["innerHTML"];
5123
5129
  const _hoisted_45 = ["innerHTML"];
5124
- const _hoisted_46 = {
5130
+ const _hoisted_46 = ["innerHTML"];
5131
+ const _hoisted_47 = ["innerHTML"];
5132
+ const _hoisted_48 = {
5125
5133
  key: 0,
5126
5134
  style: {"white-space":"nowrap"}
5127
5135
  };
5128
- const _hoisted_47 = { key: 5 };
5129
- const _hoisted_48 = {
5136
+ const _hoisted_49 = { key: 5 };
5137
+ const _hoisted_50 = {
5130
5138
  key: 0,
5131
5139
  class: "text-center"
5132
5140
  };
5133
- const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
5141
+ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
5134
5142
  /*#__PURE__*/createElementVNode("div", {
5135
5143
  class: "spinner-border",
5136
5144
  role: "status"
@@ -5138,43 +5146,45 @@ const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center
5138
5146
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
5139
5147
  ])
5140
5148
  ], -1 /* HOISTED */);
5141
- const _hoisted_50 = [
5142
- _hoisted_49
5149
+ const _hoisted_52 = [
5150
+ _hoisted_51
5143
5151
  ];
5144
- const _hoisted_51 = { key: 1 };
5145
- const _hoisted_52 = {
5152
+ const _hoisted_53 = { key: 1 };
5153
+ const _hoisted_54 = {
5146
5154
  key: 2,
5147
5155
  class: "mobile-list-items"
5148
5156
  };
5149
- const _hoisted_53 = ["onClick"];
5150
- const _hoisted_54 = {
5157
+ const _hoisted_55 = ["onClick"];
5158
+ const _hoisted_56 = {
5151
5159
  key: 0,
5152
5160
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5153
5161
  };
5154
- const _hoisted_55 = {
5162
+ const _hoisted_57 = {
5155
5163
  key: 1,
5156
5164
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5157
5165
  };
5158
- const _hoisted_56 = {
5166
+ const _hoisted_58 = {
5159
5167
  key: 2,
5160
5168
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5161
5169
  };
5162
- const _hoisted_57 = {
5170
+ const _hoisted_59 = {
5163
5171
  key: 3,
5164
5172
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5165
5173
  };
5166
- const _hoisted_58 = { key: 1 };
5167
- const _hoisted_59 = {
5174
+ const _hoisted_60 = { key: 1 };
5175
+ const _hoisted_61 = {
5168
5176
  key: 2,
5169
5177
  class: "text-primary fw-bold"
5170
5178
  };
5171
- const _hoisted_60 = { key: 3 };
5172
- const _hoisted_61 = ["innerHTML"];
5173
- const _hoisted_62 = ["innerHTML"];
5179
+ const _hoisted_62 = { key: 3 };
5174
5180
  const _hoisted_63 = ["innerHTML"];
5175
5181
  const _hoisted_64 = ["innerHTML"];
5176
- const _hoisted_65 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5177
- const _hoisted_66 = { key: 0 };
5182
+ const _hoisted_65 = ["innerHTML"];
5183
+ const _hoisted_66 = ["innerHTML"];
5184
+ const _hoisted_67 = ["innerHTML"];
5185
+ const _hoisted_68 = ["innerHTML"];
5186
+ const _hoisted_69 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5187
+ const _hoisted_70 = { key: 0 };
5178
5188
 
5179
5189
  const __default__ = {
5180
5190
  name: 'sh-table',
@@ -5709,25 +5719,35 @@ return (_ctx, _cache) => {
5709
5719
  key: 5,
5710
5720
  innerHTML: key(record, index)
5711
5721
  }, null, 8 /* PROPS */, _hoisted_43))
5712
- : (typeof key === 'object' && key.component)
5713
- ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5722
+ : (typeof key === 'object' && key.callBack)
5723
+ ? (openBlock(), createElementBlock("span", {
5714
5724
  key: 6,
5715
- item: record,
5716
- ref_for: true
5717
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5718
- : (typeof key === 'object')
5725
+ innerHTML: key.callBack(record, index)
5726
+ }, null, 8 /* PROPS */, _hoisted_44))
5727
+ : (typeof key === 'object' && key.callback)
5719
5728
  ? (openBlock(), createElementBlock("span", {
5720
5729
  key: 7,
5721
- innerHTML: record[key.key ?? key.field]
5722
- }, null, 8 /* PROPS */, _hoisted_44))
5723
- : (openBlock(), createElementBlock("span", {
5724
- key: 8,
5725
- innerHTML: record[key[0]]
5730
+ innerHTML: key.callback(record, index)
5726
5731
  }, null, 8 /* PROPS */, _hoisted_45))
5732
+ : (typeof key === 'object' && key.component)
5733
+ ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5734
+ key: 8,
5735
+ item: record,
5736
+ ref_for: true
5737
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5738
+ : (typeof key === 'object')
5739
+ ? (openBlock(), createElementBlock("span", {
5740
+ key: 9,
5741
+ innerHTML: record[key.key ?? key.field]
5742
+ }, null, 8 /* PROPS */, _hoisted_46))
5743
+ : (openBlock(), createElementBlock("span", {
5744
+ key: 10,
5745
+ innerHTML: record[key[0]]
5746
+ }, null, 8 /* PROPS */, _hoisted_47))
5727
5747
  ]))
5728
5748
  }), 128 /* KEYED_FRAGMENT */)),
5729
5749
  (__props.actions)
5730
- ? (openBlock(), createElementBlock("td", _hoisted_46, [
5750
+ ? (openBlock(), createElementBlock("td", _hoisted_48, [
5731
5751
  createVNode(script$g, {
5732
5752
  emitAction: _ctx.doEmitAction,
5733
5753
  actions: __props.actions,
@@ -5740,15 +5760,15 @@ return (_ctx, _cache) => {
5740
5760
  : createCommentVNode("v-if", true)
5741
5761
  ])
5742
5762
  ], 2 /* CLASS */))
5743
- : (openBlock(), createElementBlock("div", _hoisted_47, [
5763
+ : (openBlock(), createElementBlock("div", _hoisted_49, [
5744
5764
  (_ctx.loading === 'loading')
5745
- ? (openBlock(), createElementBlock("div", _hoisted_48, [..._hoisted_50]))
5765
+ ? (openBlock(), createElementBlock("div", _hoisted_50, [..._hoisted_52]))
5746
5766
  : (_ctx.loading === 'error')
5747
- ? (openBlock(), createElementBlock("div", _hoisted_51, [
5767
+ ? (openBlock(), createElementBlock("div", _hoisted_53, [
5748
5768
  createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
5749
5769
  ]))
5750
5770
  : (_ctx.loading === 'done')
5751
- ? (openBlock(), createElementBlock("div", _hoisted_52, [
5771
+ ? (openBlock(), createElementBlock("div", _hoisted_54, [
5752
5772
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
5753
5773
  return (openBlock(), createElementBlock("div", {
5754
5774
  key: record.id,
@@ -5760,12 +5780,12 @@ return (_ctx, _cache) => {
5760
5780
  key: key[0]
5761
5781
  }, [
5762
5782
  (typeof key === 'string' )
5763
- ? (openBlock(), createElementBlock("p", _hoisted_54, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5783
+ ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5764
5784
  : (typeof key === 'function')
5765
- ? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5785
+ ? (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5766
5786
  : (typeof key === 'object')
5767
- ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5768
- : (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5787
+ ? (openBlock(), createElementBlock("p", _hoisted_58, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5788
+ : (openBlock(), createElementBlock("p", _hoisted_59, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5769
5789
  createElementVNode("span", null, [
5770
5790
  (typeof key === 'string' && __props.links && __props.links[key])
5771
5791
  ? (openBlock(), createBlock(_component_router_link, {
@@ -5775,42 +5795,52 @@ return (_ctx, _cache) => {
5775
5795
  innerHTML: record[key]
5776
5796
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5777
5797
  : (_ctx.getFieldType(key) === 'numeric')
5778
- ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5798
+ ? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5779
5799
  : (_ctx.getFieldType(key) === 'money')
5780
- ? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5800
+ ? (openBlock(), createElementBlock("span", _hoisted_61, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5781
5801
  : (_ctx.getFieldType(key) === 'date')
5782
- ? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5802
+ ? (openBlock(), createElementBlock("span", _hoisted_62, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5783
5803
  : (typeof key === 'string')
5784
5804
  ? (openBlock(), createElementBlock("span", {
5785
5805
  key: 4,
5786
5806
  innerHTML: record[key]
5787
- }, null, 8 /* PROPS */, _hoisted_61))
5788
- : (typeof key === 'object' && key.component)
5789
- ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5807
+ }, null, 8 /* PROPS */, _hoisted_63))
5808
+ : (typeof key === 'object' && key.callBack)
5809
+ ? (openBlock(), createElementBlock("span", {
5790
5810
  key: 5,
5791
- item: record,
5792
- ref_for: true
5793
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5794
- : (typeof key === 'object')
5811
+ innerHTML: key.callBack(record, index)
5812
+ }, null, 8 /* PROPS */, _hoisted_64))
5813
+ : (typeof key === 'object' && key.callback)
5795
5814
  ? (openBlock(), createElementBlock("span", {
5796
5815
  key: 6,
5797
- innerHTML: record[key.key ?? key.field]
5798
- }, null, 8 /* PROPS */, _hoisted_62))
5799
- : (typeof key === 'function')
5800
- ? (openBlock(), createElementBlock("span", {
5816
+ innerHTML: key.callback(record, index)
5817
+ }, null, 8 /* PROPS */, _hoisted_65))
5818
+ : (typeof key === 'object' && key.component)
5819
+ ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5801
5820
  key: 7,
5802
- innerHTML: key(record, index )
5803
- }, null, 8 /* PROPS */, _hoisted_63))
5804
- : (openBlock(), createElementBlock("span", {
5805
- key: 8,
5806
- innerHTML: record[key[0]]
5807
- }, null, 8 /* PROPS */, _hoisted_64))
5821
+ item: record,
5822
+ ref_for: true
5823
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5824
+ : (typeof key === 'object')
5825
+ ? (openBlock(), createElementBlock("span", {
5826
+ key: 8,
5827
+ innerHTML: record[key.key ?? key.field]
5828
+ }, null, 8 /* PROPS */, _hoisted_66))
5829
+ : (typeof key === 'function')
5830
+ ? (openBlock(), createElementBlock("span", {
5831
+ key: 9,
5832
+ innerHTML: key(record, index )
5833
+ }, null, 8 /* PROPS */, _hoisted_67))
5834
+ : (openBlock(), createElementBlock("span", {
5835
+ key: 10,
5836
+ innerHTML: record[key[0]]
5837
+ }, null, 8 /* PROPS */, _hoisted_68))
5808
5838
  ]),
5809
- _hoisted_65
5839
+ _hoisted_69
5810
5840
  ], 64 /* STABLE_FRAGMENT */))
5811
5841
  }), 128 /* KEYED_FRAGMENT */)),
5812
5842
  (__props.actions)
5813
- ? (openBlock(), createElementBlock("div", _hoisted_66, [
5843
+ ? (openBlock(), createElementBlock("div", _hoisted_70, [
5814
5844
  createVNode(script$g, {
5815
5845
  emitAction: _ctx.doEmitAction,
5816
5846
  actions: __props.actions,
@@ -5818,7 +5848,7 @@ return (_ctx, _cache) => {
5818
5848
  }, null, 8 /* PROPS */, ["emitAction", "actions", "record"])
5819
5849
  ]))
5820
5850
  : createCommentVNode("v-if", true)
5821
- ], 8 /* PROPS */, _hoisted_53))
5851
+ ], 8 /* PROPS */, _hoisted_55))
5822
5852
  }), 128 /* KEYED_FRAGMENT */))
5823
5853
  ]))
5824
5854
  : createCommentVNode("v-if", true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",