@iankibetsh/shframework 5.0.0 → 5.0.3

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
@@ -4478,7 +4478,7 @@ return (_ctx, _cache) => {
4478
4478
  onActionFailed: _cache[4] || (_cache[4] = $event => (doEmitAction('actionFailed',__props.record))),
4479
4479
  onActionCanceled: _cache[5] || (_cache[5] = $event => (doEmitAction('actionCanceled',__props.record))),
4480
4480
  "loading-message": __props.action.label,
4481
- class: vue.normalizeClass(__props.action.class + __props.actionClass),
4481
+ class: vue.normalizeClass(__props.action.class +' '+ __props.actionClass),
4482
4482
  url: url.value
4483
4483
  }, {
4484
4484
  default: vue.withCtx(() => [
@@ -4497,7 +4497,7 @@ return (_ctx, _cache) => {
4497
4497
  key: 2,
4498
4498
  href: '#' + __props.action.canvasId,
4499
4499
  "data-bs-toggle": "offcanvas",
4500
- class: vue.normalizeClass(__props.action.class + __props.actionClass)
4500
+ class: vue.normalizeClass(__props.action.class + ' ' + __props.actionClass)
4501
4501
  }, [
4502
4502
  (__props.action.icon)
4503
4503
  ? (vue.openBlock(), vue.createElementBlock("span", {
@@ -4511,7 +4511,7 @@ return (_ctx, _cache) => {
4511
4511
  ? (vue.openBlock(), vue.createElementBlock("button", {
4512
4512
  key: 3,
4513
4513
  title: __props.action.title,
4514
- class: vue.normalizeClass(__props.action.class ? __props.action.class:'btn btn-default' + __props.actionClass),
4514
+ class: vue.normalizeClass(__props.action.class ? __props.action.class:'btn btn-default ' + __props.actionClass),
4515
4515
  onClick: _cache[6] || (_cache[6] = $event => (doEmitAction(__props.action.emits, __props.record)))
4516
4516
  }, [
4517
4517
  (__props.action.icon)
@@ -4527,7 +4527,7 @@ return (_ctx, _cache) => {
4527
4527
  key: 4,
4528
4528
  title: __props.action.title,
4529
4529
  to: url.value,
4530
- class: vue.normalizeClass(__props.action.class + __props.actionClass)
4530
+ class: vue.normalizeClass(__props.action.class +' '+ __props.actionClass)
4531
4531
  }, {
4532
4532
  default: vue.withCtx(() => [
4533
4533
  (__props.action.icon)
@@ -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) => {
@@ -4609,6 +4615,7 @@ return (_ctx, _cache) => {
4609
4615
  ]))
4610
4616
  : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(vue.unref(actionItems), (act) => {
4611
4617
  return (vue.openBlock(), vue.createBlock(script$h, {
4618
+ "action-class": " ",
4612
4619
  key: act.label,
4613
4620
  "emit-action": __props.emitAction,
4614
4621
  action: act,
@@ -5133,16 +5140,18 @@ const _hoisted_42 = ["innerHTML"];
5133
5140
  const _hoisted_43 = ["innerHTML"];
5134
5141
  const _hoisted_44 = ["innerHTML"];
5135
5142
  const _hoisted_45 = ["innerHTML"];
5136
- const _hoisted_46 = {
5143
+ const _hoisted_46 = ["innerHTML"];
5144
+ const _hoisted_47 = ["innerHTML"];
5145
+ const _hoisted_48 = {
5137
5146
  key: 0,
5138
5147
  style: {"white-space":"nowrap"}
5139
5148
  };
5140
- const _hoisted_47 = { key: 5 };
5141
- const _hoisted_48 = {
5149
+ const _hoisted_49 = { key: 5 };
5150
+ const _hoisted_50 = {
5142
5151
  key: 0,
5143
5152
  class: "text-center"
5144
5153
  };
5145
- const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
5154
+ const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
5146
5155
  /*#__PURE__*/vue.createElementVNode("div", {
5147
5156
  class: "spinner-border",
5148
5157
  role: "status"
@@ -5150,43 +5159,45 @@ const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
5150
5159
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
5151
5160
  ])
5152
5161
  ], -1 /* HOISTED */);
5153
- const _hoisted_50 = [
5154
- _hoisted_49
5162
+ const _hoisted_52 = [
5163
+ _hoisted_51
5155
5164
  ];
5156
- const _hoisted_51 = { key: 1 };
5157
- const _hoisted_52 = {
5165
+ const _hoisted_53 = { key: 1 };
5166
+ const _hoisted_54 = {
5158
5167
  key: 2,
5159
5168
  class: "mobile-list-items"
5160
5169
  };
5161
- const _hoisted_53 = ["onClick"];
5162
- const _hoisted_54 = {
5170
+ const _hoisted_55 = ["onClick"];
5171
+ const _hoisted_56 = {
5163
5172
  key: 0,
5164
5173
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5165
5174
  };
5166
- const _hoisted_55 = {
5175
+ const _hoisted_57 = {
5167
5176
  key: 1,
5168
5177
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5169
5178
  };
5170
- const _hoisted_56 = {
5179
+ const _hoisted_58 = {
5171
5180
  key: 2,
5172
5181
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5173
5182
  };
5174
- const _hoisted_57 = {
5183
+ const _hoisted_59 = {
5175
5184
  key: 3,
5176
5185
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5177
5186
  };
5178
- const _hoisted_58 = { key: 1 };
5179
- const _hoisted_59 = {
5187
+ const _hoisted_60 = { key: 1 };
5188
+ const _hoisted_61 = {
5180
5189
  key: 2,
5181
5190
  class: "text-primary fw-bold"
5182
5191
  };
5183
- const _hoisted_60 = { key: 3 };
5184
- const _hoisted_61 = ["innerHTML"];
5185
- const _hoisted_62 = ["innerHTML"];
5192
+ const _hoisted_62 = { key: 3 };
5186
5193
  const _hoisted_63 = ["innerHTML"];
5187
5194
  const _hoisted_64 = ["innerHTML"];
5188
- const _hoisted_65 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5189
- const _hoisted_66 = { key: 0 };
5195
+ const _hoisted_65 = ["innerHTML"];
5196
+ const _hoisted_66 = ["innerHTML"];
5197
+ const _hoisted_67 = ["innerHTML"];
5198
+ const _hoisted_68 = ["innerHTML"];
5199
+ const _hoisted_69 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5200
+ const _hoisted_70 = { key: 0 };
5190
5201
 
5191
5202
  const __default__ = {
5192
5203
  name: 'sh-table',
@@ -5721,25 +5732,35 @@ return (_ctx, _cache) => {
5721
5732
  key: 5,
5722
5733
  innerHTML: key(record, index)
5723
5734
  }, null, 8 /* PROPS */, _hoisted_43))
5724
- : (typeof key === 'object' && key.component)
5725
- ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5735
+ : (typeof key === 'object' && key.callBack)
5736
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5726
5737
  key: 6,
5727
- item: record,
5728
- ref_for: true
5729
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5730
- : (typeof key === 'object')
5738
+ innerHTML: key.callBack(record, index)
5739
+ }, null, 8 /* PROPS */, _hoisted_44))
5740
+ : (typeof key === 'object' && key.callback)
5731
5741
  ? (vue.openBlock(), vue.createElementBlock("span", {
5732
5742
  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]]
5743
+ innerHTML: key.callback(record, index)
5738
5744
  }, null, 8 /* PROPS */, _hoisted_45))
5745
+ : (typeof key === 'object' && key.component)
5746
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5747
+ key: 8,
5748
+ item: record,
5749
+ ref_for: true
5750
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5751
+ : (typeof key === 'object')
5752
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5753
+ key: 9,
5754
+ innerHTML: record[key.key ?? key.field]
5755
+ }, null, 8 /* PROPS */, _hoisted_46))
5756
+ : (vue.openBlock(), vue.createElementBlock("span", {
5757
+ key: 10,
5758
+ innerHTML: record[key[0]]
5759
+ }, null, 8 /* PROPS */, _hoisted_47))
5739
5760
  ]))
5740
5761
  }), 128 /* KEYED_FRAGMENT */)),
5741
5762
  (__props.actions)
5742
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
5763
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_48, [
5743
5764
  vue.createVNode(script$g, {
5744
5765
  emitAction: _ctx.doEmitAction,
5745
5766
  actions: __props.actions,
@@ -5752,15 +5773,15 @@ return (_ctx, _cache) => {
5752
5773
  : vue.createCommentVNode("v-if", true)
5753
5774
  ])
5754
5775
  ], 2 /* CLASS */))
5755
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, [
5776
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, [
5756
5777
  (_ctx.loading === 'loading')
5757
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [..._hoisted_50]))
5778
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [..._hoisted_52]))
5758
5779
  : (_ctx.loading === 'error')
5759
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
5780
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
5760
5781
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
5761
5782
  ]))
5762
5783
  : (_ctx.loading === 'done')
5763
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
5784
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
5764
5785
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
5765
5786
  return (vue.openBlock(), vue.createElementBlock("div", {
5766
5787
  key: record.id,
@@ -5772,12 +5793,12 @@ return (_ctx, _cache) => {
5772
5793
  key: key[0]
5773
5794
  }, [
5774
5795
  (typeof key === 'string' )
5775
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5796
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5776
5797
  : (typeof key === 'function')
5777
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5798
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5778
5799
  : (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 */)),
5800
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_58, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5801
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_59, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5781
5802
  vue.createElementVNode("span", null, [
5782
5803
  (typeof key === 'string' && __props.links && __props.links[key])
5783
5804
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -5787,42 +5808,52 @@ return (_ctx, _cache) => {
5787
5808
  innerHTML: record[key]
5788
5809
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5789
5810
  : (_ctx.getFieldType(key) === 'numeric')
5790
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5811
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5791
5812
  : (_ctx.getFieldType(key) === 'money')
5792
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5813
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_61, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5793
5814
  : (_ctx.getFieldType(key) === 'date')
5794
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5815
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_62, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5795
5816
  : (typeof key === 'string')
5796
5817
  ? (vue.openBlock(), vue.createElementBlock("span", {
5797
5818
  key: 4,
5798
5819
  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({
5820
+ }, null, 8 /* PROPS */, _hoisted_63))
5821
+ : (typeof key === 'object' && key.callBack)
5822
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5802
5823
  key: 5,
5803
- item: record,
5804
- ref_for: true
5805
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5806
- : (typeof key === 'object')
5824
+ innerHTML: key.callBack(record, index)
5825
+ }, null, 8 /* PROPS */, _hoisted_64))
5826
+ : (typeof key === 'object' && key.callback)
5807
5827
  ? (vue.openBlock(), vue.createElementBlock("span", {
5808
5828
  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", {
5829
+ innerHTML: key.callback(record, index)
5830
+ }, null, 8 /* PROPS */, _hoisted_65))
5831
+ : (typeof key === 'object' && key.component)
5832
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), vue.mergeProps({
5813
5833
  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))
5834
+ item: record,
5835
+ ref_for: true
5836
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5837
+ : (typeof key === 'object')
5838
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5839
+ key: 8,
5840
+ innerHTML: record[key.key ?? key.field]
5841
+ }, null, 8 /* PROPS */, _hoisted_66))
5842
+ : (typeof key === 'function')
5843
+ ? (vue.openBlock(), vue.createElementBlock("span", {
5844
+ key: 9,
5845
+ innerHTML: key(record, index )
5846
+ }, null, 8 /* PROPS */, _hoisted_67))
5847
+ : (vue.openBlock(), vue.createElementBlock("span", {
5848
+ key: 10,
5849
+ innerHTML: record[key[0]]
5850
+ }, null, 8 /* PROPS */, _hoisted_68))
5820
5851
  ]),
5821
- _hoisted_65
5852
+ _hoisted_69
5822
5853
  ], 64 /* STABLE_FRAGMENT */))
5823
5854
  }), 128 /* KEYED_FRAGMENT */)),
5824
5855
  (__props.actions)
5825
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_66, [
5856
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_70, [
5826
5857
  vue.createVNode(script$g, {
5827
5858
  emitAction: _ctx.doEmitAction,
5828
5859
  actions: __props.actions,
@@ -5830,7 +5861,7 @@ return (_ctx, _cache) => {
5830
5861
  }, null, 8 /* PROPS */, ["emitAction", "actions", "record"])
5831
5862
  ]))
5832
5863
  : vue.createCommentVNode("v-if", true)
5833
- ], 8 /* PROPS */, _hoisted_53))
5864
+ ], 8 /* PROPS */, _hoisted_55))
5834
5865
  }), 128 /* KEYED_FRAGMENT */))
5835
5866
  ]))
5836
5867
  : vue.createCommentVNode("v-if", true)
package/dist/library.mjs CHANGED
@@ -4466,7 +4466,7 @@ return (_ctx, _cache) => {
4466
4466
  onActionFailed: _cache[4] || (_cache[4] = $event => (doEmitAction('actionFailed',__props.record))),
4467
4467
  onActionCanceled: _cache[5] || (_cache[5] = $event => (doEmitAction('actionCanceled',__props.record))),
4468
4468
  "loading-message": __props.action.label,
4469
- class: normalizeClass(__props.action.class + __props.actionClass),
4469
+ class: normalizeClass(__props.action.class +' '+ __props.actionClass),
4470
4470
  url: url.value
4471
4471
  }, {
4472
4472
  default: withCtx(() => [
@@ -4485,7 +4485,7 @@ return (_ctx, _cache) => {
4485
4485
  key: 2,
4486
4486
  href: '#' + __props.action.canvasId,
4487
4487
  "data-bs-toggle": "offcanvas",
4488
- class: normalizeClass(__props.action.class + __props.actionClass)
4488
+ class: normalizeClass(__props.action.class + ' ' + __props.actionClass)
4489
4489
  }, [
4490
4490
  (__props.action.icon)
4491
4491
  ? (openBlock(), createElementBlock("span", {
@@ -4499,7 +4499,7 @@ return (_ctx, _cache) => {
4499
4499
  ? (openBlock(), createElementBlock("button", {
4500
4500
  key: 3,
4501
4501
  title: __props.action.title,
4502
- class: normalizeClass(__props.action.class ? __props.action.class:'btn btn-default' + __props.actionClass),
4502
+ class: normalizeClass(__props.action.class ? __props.action.class:'btn btn-default ' + __props.actionClass),
4503
4503
  onClick: _cache[6] || (_cache[6] = $event => (doEmitAction(__props.action.emits, __props.record)))
4504
4504
  }, [
4505
4505
  (__props.action.icon)
@@ -4515,7 +4515,7 @@ return (_ctx, _cache) => {
4515
4515
  key: 4,
4516
4516
  title: __props.action.title,
4517
4517
  to: url.value,
4518
- class: normalizeClass(__props.action.class + __props.actionClass)
4518
+ class: normalizeClass(__props.action.class +' '+ __props.actionClass)
4519
4519
  }, {
4520
4520
  default: withCtx(() => [
4521
4521
  (__props.action.icon)
@@ -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) => {
@@ -4597,6 +4603,7 @@ return (_ctx, _cache) => {
4597
4603
  ]))
4598
4604
  : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(actionItems), (act) => {
4599
4605
  return (openBlock(), createBlock(script$h, {
4606
+ "action-class": " ",
4600
4607
  key: act.label,
4601
4608
  "emit-action": __props.emitAction,
4602
4609
  action: act,
@@ -5121,16 +5128,18 @@ const _hoisted_42 = ["innerHTML"];
5121
5128
  const _hoisted_43 = ["innerHTML"];
5122
5129
  const _hoisted_44 = ["innerHTML"];
5123
5130
  const _hoisted_45 = ["innerHTML"];
5124
- const _hoisted_46 = {
5131
+ const _hoisted_46 = ["innerHTML"];
5132
+ const _hoisted_47 = ["innerHTML"];
5133
+ const _hoisted_48 = {
5125
5134
  key: 0,
5126
5135
  style: {"white-space":"nowrap"}
5127
5136
  };
5128
- const _hoisted_47 = { key: 5 };
5129
- const _hoisted_48 = {
5137
+ const _hoisted_49 = { key: 5 };
5138
+ const _hoisted_50 = {
5130
5139
  key: 0,
5131
5140
  class: "text-center"
5132
5141
  };
5133
- const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
5142
+ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
5134
5143
  /*#__PURE__*/createElementVNode("div", {
5135
5144
  class: "spinner-border",
5136
5145
  role: "status"
@@ -5138,43 +5147,45 @@ const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center
5138
5147
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
5139
5148
  ])
5140
5149
  ], -1 /* HOISTED */);
5141
- const _hoisted_50 = [
5142
- _hoisted_49
5150
+ const _hoisted_52 = [
5151
+ _hoisted_51
5143
5152
  ];
5144
- const _hoisted_51 = { key: 1 };
5145
- const _hoisted_52 = {
5153
+ const _hoisted_53 = { key: 1 };
5154
+ const _hoisted_54 = {
5146
5155
  key: 2,
5147
5156
  class: "mobile-list-items"
5148
5157
  };
5149
- const _hoisted_53 = ["onClick"];
5150
- const _hoisted_54 = {
5158
+ const _hoisted_55 = ["onClick"];
5159
+ const _hoisted_56 = {
5151
5160
  key: 0,
5152
5161
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5153
5162
  };
5154
- const _hoisted_55 = {
5163
+ const _hoisted_57 = {
5155
5164
  key: 1,
5156
5165
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5157
5166
  };
5158
- const _hoisted_56 = {
5167
+ const _hoisted_58 = {
5159
5168
  key: 2,
5160
5169
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5161
5170
  };
5162
- const _hoisted_57 = {
5171
+ const _hoisted_59 = {
5163
5172
  key: 3,
5164
5173
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
5165
5174
  };
5166
- const _hoisted_58 = { key: 1 };
5167
- const _hoisted_59 = {
5175
+ const _hoisted_60 = { key: 1 };
5176
+ const _hoisted_61 = {
5168
5177
  key: 2,
5169
5178
  class: "text-primary fw-bold"
5170
5179
  };
5171
- const _hoisted_60 = { key: 3 };
5172
- const _hoisted_61 = ["innerHTML"];
5173
- const _hoisted_62 = ["innerHTML"];
5180
+ const _hoisted_62 = { key: 3 };
5174
5181
  const _hoisted_63 = ["innerHTML"];
5175
5182
  const _hoisted_64 = ["innerHTML"];
5176
- const _hoisted_65 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5177
- const _hoisted_66 = { key: 0 };
5183
+ const _hoisted_65 = ["innerHTML"];
5184
+ const _hoisted_66 = ["innerHTML"];
5185
+ const _hoisted_67 = ["innerHTML"];
5186
+ const _hoisted_68 = ["innerHTML"];
5187
+ const _hoisted_69 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
5188
+ const _hoisted_70 = { key: 0 };
5178
5189
 
5179
5190
  const __default__ = {
5180
5191
  name: 'sh-table',
@@ -5709,25 +5720,35 @@ return (_ctx, _cache) => {
5709
5720
  key: 5,
5710
5721
  innerHTML: key(record, index)
5711
5722
  }, null, 8 /* PROPS */, _hoisted_43))
5712
- : (typeof key === 'object' && key.component)
5713
- ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5723
+ : (typeof key === 'object' && key.callBack)
5724
+ ? (openBlock(), createElementBlock("span", {
5714
5725
  key: 6,
5715
- item: record,
5716
- ref_for: true
5717
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5718
- : (typeof key === 'object')
5726
+ innerHTML: key.callBack(record, index)
5727
+ }, null, 8 /* PROPS */, _hoisted_44))
5728
+ : (typeof key === 'object' && key.callback)
5719
5729
  ? (openBlock(), createElementBlock("span", {
5720
5730
  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]]
5731
+ innerHTML: key.callback(record, index)
5726
5732
  }, null, 8 /* PROPS */, _hoisted_45))
5733
+ : (typeof key === 'object' && key.component)
5734
+ ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5735
+ key: 8,
5736
+ item: record,
5737
+ ref_for: true
5738
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5739
+ : (typeof key === 'object')
5740
+ ? (openBlock(), createElementBlock("span", {
5741
+ key: 9,
5742
+ innerHTML: record[key.key ?? key.field]
5743
+ }, null, 8 /* PROPS */, _hoisted_46))
5744
+ : (openBlock(), createElementBlock("span", {
5745
+ key: 10,
5746
+ innerHTML: record[key[0]]
5747
+ }, null, 8 /* PROPS */, _hoisted_47))
5727
5748
  ]))
5728
5749
  }), 128 /* KEYED_FRAGMENT */)),
5729
5750
  (__props.actions)
5730
- ? (openBlock(), createElementBlock("td", _hoisted_46, [
5751
+ ? (openBlock(), createElementBlock("td", _hoisted_48, [
5731
5752
  createVNode(script$g, {
5732
5753
  emitAction: _ctx.doEmitAction,
5733
5754
  actions: __props.actions,
@@ -5740,15 +5761,15 @@ return (_ctx, _cache) => {
5740
5761
  : createCommentVNode("v-if", true)
5741
5762
  ])
5742
5763
  ], 2 /* CLASS */))
5743
- : (openBlock(), createElementBlock("div", _hoisted_47, [
5764
+ : (openBlock(), createElementBlock("div", _hoisted_49, [
5744
5765
  (_ctx.loading === 'loading')
5745
- ? (openBlock(), createElementBlock("div", _hoisted_48, [..._hoisted_50]))
5766
+ ? (openBlock(), createElementBlock("div", _hoisted_50, [..._hoisted_52]))
5746
5767
  : (_ctx.loading === 'error')
5747
- ? (openBlock(), createElementBlock("div", _hoisted_51, [
5768
+ ? (openBlock(), createElementBlock("div", _hoisted_53, [
5748
5769
  createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
5749
5770
  ]))
5750
5771
  : (_ctx.loading === 'done')
5751
- ? (openBlock(), createElementBlock("div", _hoisted_52, [
5772
+ ? (openBlock(), createElementBlock("div", _hoisted_54, [
5752
5773
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
5753
5774
  return (openBlock(), createElementBlock("div", {
5754
5775
  key: record.id,
@@ -5760,12 +5781,12 @@ return (_ctx, _cache) => {
5760
5781
  key: key[0]
5761
5782
  }, [
5762
5783
  (typeof key === 'string' )
5763
- ? (openBlock(), createElementBlock("p", _hoisted_54, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5784
+ ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5764
5785
  : (typeof key === 'function')
5765
- ? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5786
+ ? (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5766
5787
  : (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 */)),
5788
+ ? (openBlock(), createElementBlock("p", _hoisted_58, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
5789
+ : (openBlock(), createElementBlock("p", _hoisted_59, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5769
5790
  createElementVNode("span", null, [
5770
5791
  (typeof key === 'string' && __props.links && __props.links[key])
5771
5792
  ? (openBlock(), createBlock(_component_router_link, {
@@ -5775,42 +5796,52 @@ return (_ctx, _cache) => {
5775
5796
  innerHTML: record[key]
5776
5797
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5777
5798
  : (_ctx.getFieldType(key) === 'numeric')
5778
- ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5799
+ ? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5779
5800
  : (_ctx.getFieldType(key) === 'money')
5780
- ? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5801
+ ? (openBlock(), createElementBlock("span", _hoisted_61, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5781
5802
  : (_ctx.getFieldType(key) === 'date')
5782
- ? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5803
+ ? (openBlock(), createElementBlock("span", _hoisted_62, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5783
5804
  : (typeof key === 'string')
5784
5805
  ? (openBlock(), createElementBlock("span", {
5785
5806
  key: 4,
5786
5807
  innerHTML: record[key]
5787
- }, null, 8 /* PROPS */, _hoisted_61))
5788
- : (typeof key === 'object' && key.component)
5789
- ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5808
+ }, null, 8 /* PROPS */, _hoisted_63))
5809
+ : (typeof key === 'object' && key.callBack)
5810
+ ? (openBlock(), createElementBlock("span", {
5790
5811
  key: 5,
5791
- item: record,
5792
- ref_for: true
5793
- }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5794
- : (typeof key === 'object')
5812
+ innerHTML: key.callBack(record, index)
5813
+ }, null, 8 /* PROPS */, _hoisted_64))
5814
+ : (typeof key === 'object' && key.callback)
5795
5815
  ? (openBlock(), createElementBlock("span", {
5796
5816
  key: 6,
5797
- innerHTML: record[key.key ?? key.field]
5798
- }, null, 8 /* PROPS */, _hoisted_62))
5799
- : (typeof key === 'function')
5800
- ? (openBlock(), createElementBlock("span", {
5817
+ innerHTML: key.callback(record, index)
5818
+ }, null, 8 /* PROPS */, _hoisted_65))
5819
+ : (typeof key === 'object' && key.component)
5820
+ ? (openBlock(), createBlock(resolveDynamicComponent(key.component), mergeProps({
5801
5821
  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))
5822
+ item: record,
5823
+ ref_for: true
5824
+ }, cleanColumn(key)), null, 16 /* FULL_PROPS */, ["item"]))
5825
+ : (typeof key === 'object')
5826
+ ? (openBlock(), createElementBlock("span", {
5827
+ key: 8,
5828
+ innerHTML: record[key.key ?? key.field]
5829
+ }, null, 8 /* PROPS */, _hoisted_66))
5830
+ : (typeof key === 'function')
5831
+ ? (openBlock(), createElementBlock("span", {
5832
+ key: 9,
5833
+ innerHTML: key(record, index )
5834
+ }, null, 8 /* PROPS */, _hoisted_67))
5835
+ : (openBlock(), createElementBlock("span", {
5836
+ key: 10,
5837
+ innerHTML: record[key[0]]
5838
+ }, null, 8 /* PROPS */, _hoisted_68))
5808
5839
  ]),
5809
- _hoisted_65
5840
+ _hoisted_69
5810
5841
  ], 64 /* STABLE_FRAGMENT */))
5811
5842
  }), 128 /* KEYED_FRAGMENT */)),
5812
5843
  (__props.actions)
5813
- ? (openBlock(), createElementBlock("div", _hoisted_66, [
5844
+ ? (openBlock(), createElementBlock("div", _hoisted_70, [
5814
5845
  createVNode(script$g, {
5815
5846
  emitAction: _ctx.doEmitAction,
5816
5847
  actions: __props.actions,
@@ -5818,7 +5849,7 @@ return (_ctx, _cache) => {
5818
5849
  }, null, 8 /* PROPS */, ["emitAction", "actions", "record"])
5819
5850
  ]))
5820
5851
  : createCommentVNode("v-if", true)
5821
- ], 8 /* PROPS */, _hoisted_53))
5852
+ ], 8 /* PROPS */, _hoisted_55))
5822
5853
  }), 128 /* KEYED_FRAGMENT */))
5823
5854
  ]))
5824
5855
  : 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.3",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",