@iankibetsh/shframework 0.3.8 → 0.3.9

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
@@ -2738,7 +2738,7 @@ var helpers = {
2738
2738
 
2739
2739
  var script$1 = {
2740
2740
  name: 'sh-table',
2741
- props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
2741
+ props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover'],
2742
2742
  inject: ['channel', 'global'],
2743
2743
  data () {
2744
2744
  return {
@@ -3013,10 +3013,7 @@ const _hoisted_21 = {
3013
3013
  class: "alert alert-danger"
3014
3014
  };
3015
3015
  const _hoisted_22 = { colspan: 2 };
3016
- const _hoisted_23 = {
3017
- key: 4,
3018
- class: "table"
3019
- };
3016
+ const _hoisted_23 = { class: "sh-thead" };
3020
3017
  const _hoisted_24 = ["onClick"];
3021
3018
  const _hoisted_25 = ["onClick"];
3022
3019
  const _hoisted_26 = ["onClick"];
@@ -3024,12 +3021,13 @@ const _hoisted_27 = {
3024
3021
  key: 0,
3025
3022
  class: "text-capitalize"
3026
3023
  };
3027
- const _hoisted_28 = {
3024
+ const _hoisted_28 = { class: "sh-tbody" };
3025
+ const _hoisted_29 = {
3028
3026
  key: 0,
3029
3027
  class: "text-center"
3030
3028
  };
3031
- const _hoisted_29 = ["colspan"];
3032
- const _hoisted_30 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
3029
+ const _hoisted_30 = ["colspan"];
3030
+ const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
3033
3031
  /*#__PURE__*/vue.createElementVNode("div", {
3034
3032
  class: "spinner-border",
3035
3033
  role: "status"
@@ -3037,46 +3035,46 @@ const _hoisted_30 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
3037
3035
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3038
3036
  ])
3039
3037
  ], -1 /* HOISTED */);
3040
- const _hoisted_31 = [
3041
- _hoisted_30
3038
+ const _hoisted_32 = [
3039
+ _hoisted_31
3042
3040
  ];
3043
- const _hoisted_32 = {
3041
+ const _hoisted_33 = {
3044
3042
  key: 1,
3045
3043
  class: "text-center alert alert-danger"
3046
3044
  };
3047
- const _hoisted_33 = ["colspan"];
3048
- const _hoisted_34 = {
3045
+ const _hoisted_34 = ["colspan"];
3046
+ const _hoisted_35 = {
3049
3047
  key: 2,
3050
3048
  class: "text-center alert alert-info no_records"
3051
3049
  };
3052
- const _hoisted_35 = ["colspan"];
3053
- const _hoisted_36 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
3054
- const _hoisted_37 = /*#__PURE__*/vue.createTextVNode(" No records found ");
3055
- const _hoisted_38 = [
3056
- _hoisted_36,
3057
- _hoisted_37
3050
+ const _hoisted_36 = ["colspan"];
3051
+ const _hoisted_37 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
3052
+ const _hoisted_38 = /*#__PURE__*/vue.createTextVNode(" No records found ");
3053
+ const _hoisted_39 = [
3054
+ _hoisted_37,
3055
+ _hoisted_38
3058
3056
  ];
3059
- const _hoisted_39 = ["onClick"];
3060
- const _hoisted_40 = { key: 1 };
3061
- const _hoisted_41 = {
3057
+ const _hoisted_40 = ["onClick"];
3058
+ const _hoisted_41 = { key: 1 };
3059
+ const _hoisted_42 = {
3062
3060
  key: 2,
3063
3061
  class: "text-success fw-bold"
3064
3062
  };
3065
- const _hoisted_42 = { key: 3 };
3066
- const _hoisted_43 = ["innerHTML"];
3063
+ const _hoisted_43 = { key: 3 };
3067
3064
  const _hoisted_44 = ["innerHTML"];
3068
3065
  const _hoisted_45 = ["innerHTML"];
3069
- const _hoisted_46 = {
3066
+ const _hoisted_46 = ["innerHTML"];
3067
+ const _hoisted_47 = {
3070
3068
  key: 0,
3071
3069
  style: {"white-space":"nowrap"}
3072
3070
  };
3073
- const _hoisted_47 = ["title", "onClick"];
3074
- const _hoisted_48 = { key: 5 };
3075
- const _hoisted_49 = {
3071
+ const _hoisted_48 = ["title", "onClick"];
3072
+ const _hoisted_49 = { key: 5 };
3073
+ const _hoisted_50 = {
3076
3074
  key: 0,
3077
3075
  class: "text-center"
3078
3076
  };
3079
- const _hoisted_50 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
3077
+ const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
3080
3078
  /*#__PURE__*/vue.createElementVNode("div", {
3081
3079
  class: "spinner-border",
3082
3080
  role: "status"
@@ -3084,38 +3082,38 @@ const _hoisted_50 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
3084
3082
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3085
3083
  ])
3086
3084
  ], -1 /* HOISTED */);
3087
- const _hoisted_51 = [
3088
- _hoisted_50
3085
+ const _hoisted_52 = [
3086
+ _hoisted_51
3089
3087
  ];
3090
- const _hoisted_52 = { key: 1 };
3091
- const _hoisted_53 = {
3088
+ const _hoisted_53 = { key: 1 };
3089
+ const _hoisted_54 = {
3092
3090
  key: 2,
3093
3091
  class: "mobile-list-items"
3094
3092
  };
3095
- const _hoisted_54 = ["onClick"];
3096
- const _hoisted_55 = {
3093
+ const _hoisted_55 = ["onClick"];
3094
+ const _hoisted_56 = {
3097
3095
  key: 0,
3098
3096
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3099
3097
  };
3100
- const _hoisted_56 = {
3098
+ const _hoisted_57 = {
3101
3099
  key: 1,
3102
3100
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3103
3101
  };
3104
- const _hoisted_57 = {
3102
+ const _hoisted_58 = {
3105
3103
  key: 2,
3106
3104
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3107
3105
  };
3108
- const _hoisted_58 = { key: 1 };
3109
- const _hoisted_59 = {
3106
+ const _hoisted_59 = { key: 1 };
3107
+ const _hoisted_60 = {
3110
3108
  key: 2,
3111
3109
  class: "text-primary fw-bold"
3112
3110
  };
3113
- const _hoisted_60 = ["innerHTML"];
3114
3111
  const _hoisted_61 = ["innerHTML"];
3115
3112
  const _hoisted_62 = ["innerHTML"];
3116
- const _hoisted_63 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
3117
- const _hoisted_64 = { key: 0 };
3118
- const _hoisted_65 = ["title", "onClick"];
3113
+ const _hoisted_63 = ["innerHTML"];
3114
+ const _hoisted_64 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
3115
+ const _hoisted_65 = { key: 0 };
3116
+ const _hoisted_66 = ["title", "onClick"];
3119
3117
 
3120
3118
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3121
3119
  const _component_router_link = vue.resolveComponent("router-link");
@@ -3195,8 +3193,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3195
3193
  : vue.createCommentVNode("v-if", true)
3196
3194
  ], 64 /* STABLE_FRAGMENT */))
3197
3195
  : ($options.windowWidth > 700)
3198
- ? (vue.openBlock(), vue.createElementBlock("table", _hoisted_23, [
3199
- vue.createElementVNode("thead", null, [
3196
+ ? (vue.openBlock(), vue.createElementBlock("table", {
3197
+ key: 4,
3198
+ class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
3199
+ }, [
3200
+ vue.createElementVNode("thead", _hoisted_23, [
3200
3201
  vue.createElementVNode("tr", null, [
3201
3202
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (title) => {
3202
3203
  return (vue.openBlock(), vue.createElementBlock("th", {
@@ -3226,24 +3227,24 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3226
3227
  : vue.createCommentVNode("v-if", true)
3227
3228
  ])
3228
3229
  ]),
3229
- vue.createElementVNode("tbody", null, [
3230
+ vue.createElementVNode("tbody", _hoisted_28, [
3230
3231
  ($data.loading === 'loading')
3231
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_28, [
3232
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_29, [
3232
3233
  vue.createElementVNode("td", {
3233
3234
  colspan: $props.headers.length
3234
- }, _hoisted_31, 8 /* PROPS */, _hoisted_29)
3235
+ }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
3235
3236
  ]))
3236
3237
  : ($data.loading === 'error')
3237
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_32, [
3238
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
3238
3239
  vue.createElementVNode("td", {
3239
3240
  colspan: $props.headers.length
3240
- }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_33)
3241
+ }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
3241
3242
  ]))
3242
3243
  : ($data.records.length === 0)
3243
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_34, [
3244
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_35, [
3244
3245
  vue.createElementVNode("td", {
3245
3246
  colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
3246
- }, _hoisted_38, 8 /* PROPS */, _hoisted_35)
3247
+ }, _hoisted_39, 8 /* PROPS */, _hoisted_36)
3247
3248
  ]))
3248
3249
  : ($data.loading === 'done')
3249
3250
  ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
@@ -3264,29 +3265,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3264
3265
  innerHTML: record[key]
3265
3266
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3266
3267
  : ($options.getFieldType(key) === 'numeric')
3267
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3268
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3268
3269
  : ($options.getFieldType(key) === 'money')
3269
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3270
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_42, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3270
3271
  : ($options.getFieldType(key) === 'date')
3271
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_42, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3272
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_43, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3272
3273
  : (typeof key === 'string')
3273
3274
  ? (vue.openBlock(), vue.createElementBlock("span", {
3274
3275
  key: 4,
3275
3276
  innerHTML: record[key]
3276
- }, null, 8 /* PROPS */, _hoisted_43))
3277
+ }, null, 8 /* PROPS */, _hoisted_44))
3277
3278
  : (typeof key === 'function')
3278
3279
  ? (vue.openBlock(), vue.createElementBlock("span", {
3279
3280
  key: 5,
3280
3281
  innerHTML: key(record, index)
3281
- }, null, 8 /* PROPS */, _hoisted_44))
3282
+ }, null, 8 /* PROPS */, _hoisted_45))
3282
3283
  : (vue.openBlock(), vue.createElementBlock("span", {
3283
3284
  key: 6,
3284
3285
  innerHTML: record[key[0]]
3285
- }, null, 8 /* PROPS */, _hoisted_45))
3286
+ }, null, 8 /* PROPS */, _hoisted_46))
3286
3287
  ]))
3287
3288
  }), 128 /* KEYED_FRAGMENT */)),
3288
3289
  ($props.actions)
3289
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
3290
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_47, [
3290
3291
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
3291
3292
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3292
3293
  key: act.path
@@ -3301,7 +3302,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3301
3302
  title: act.title,
3302
3303
  class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
3303
3304
  onClick: $event => ($options.doEmitAction(act.emits,record))
3304
- }, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_47))
3305
+ }, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_48))
3305
3306
  : vue.createCommentVNode("v-if", true),
3306
3307
  (!act.emits)
3307
3308
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -3324,20 +3325,20 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3324
3325
  }), 128 /* KEYED_FRAGMENT */))
3325
3326
  ]))
3326
3327
  : vue.createCommentVNode("v-if", true)
3327
- ], 10 /* CLASS, PROPS */, _hoisted_39))
3328
+ ], 10 /* CLASS, PROPS */, _hoisted_40))
3328
3329
  }), 128 /* KEYED_FRAGMENT */))
3329
3330
  : vue.createCommentVNode("v-if", true)
3330
3331
  ])
3331
- ]))
3332
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [
3332
+ ], 2 /* CLASS */))
3333
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, [
3333
3334
  ($data.loading === 'loading')
3334
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, _hoisted_51))
3335
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, _hoisted_52))
3335
3336
  : ($data.loading === 'error')
3336
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
3337
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
3337
3338
  vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
3338
3339
  ]))
3339
3340
  : ($data.loading === 'done')
3340
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
3341
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
3341
3342
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
3342
3343
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3343
3344
  key: record.id
@@ -3352,10 +3353,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3352
3353
  key: key[0]
3353
3354
  }, [
3354
3355
  (typeof key === 'string' )
3355
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3356
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3356
3357
  : (typeof key === 'function')
3357
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
3358
- : (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
3358
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
3359
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_58, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
3359
3360
  vue.createElementVNode("span", null, [
3360
3361
  (typeof key === 'string' && $props.links && $props.links[key])
3361
3362
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -3365,29 +3366,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3365
3366
  innerHTML: record[key]
3366
3367
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3367
3368
  : ($options.getFieldType(key) === 'numeric')
3368
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3369
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3369
3370
  : ($options.getFieldType(key) === 'money')
3370
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3371
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3371
3372
  : (typeof key === 'string')
3372
3373
  ? (vue.openBlock(), vue.createElementBlock("span", {
3373
3374
  key: 3,
3374
3375
  innerHTML: record[key]
3375
- }, null, 8 /* PROPS */, _hoisted_60))
3376
+ }, null, 8 /* PROPS */, _hoisted_61))
3376
3377
  : (typeof key === 'function')
3377
3378
  ? (vue.openBlock(), vue.createElementBlock("span", {
3378
3379
  key: 4,
3379
3380
  innerHTML: key(record, index )
3380
- }, null, 8 /* PROPS */, _hoisted_61))
3381
+ }, null, 8 /* PROPS */, _hoisted_62))
3381
3382
  : (vue.openBlock(), vue.createElementBlock("span", {
3382
3383
  key: 5,
3383
3384
  innerHTML: record[key[0]]
3384
- }, null, 8 /* PROPS */, _hoisted_62))
3385
+ }, null, 8 /* PROPS */, _hoisted_63))
3385
3386
  ]),
3386
- _hoisted_63
3387
+ _hoisted_64
3387
3388
  ], 64 /* STABLE_FRAGMENT */))
3388
3389
  }), 128 /* KEYED_FRAGMENT */)),
3389
3390
  ($props.actions)
3390
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_64, [
3391
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_65, [
3391
3392
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
3392
3393
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3393
3394
  key: act.path
@@ -3402,7 +3403,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3402
3403
  title: act.title,
3403
3404
  class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
3404
3405
  onClick: $event => ($options.doEmitAction(act.emits,record))
3405
- }, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_65))
3406
+ }, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_66))
3406
3407
  : vue.createCommentVNode("v-if", true),
3407
3408
  (!act.emits)
3408
3409
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
@@ -3425,7 +3426,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3425
3426
  }), 128 /* KEYED_FRAGMENT */))
3426
3427
  ]))
3427
3428
  : vue.createCommentVNode("v-if", true)
3428
- ], 8 /* PROPS */, _hoisted_54)
3429
+ ], 8 /* PROPS */, _hoisted_55)
3429
3430
  ], 64 /* STABLE_FRAGMENT */))
3430
3431
  }), 128 /* KEYED_FRAGMENT */))
3431
3432
  ]))
package/dist/library.mjs CHANGED
@@ -2726,7 +2726,7 @@ var helpers = {
2726
2726
 
2727
2727
  var script$1 = {
2728
2728
  name: 'sh-table',
2729
- props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
2729
+ props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover'],
2730
2730
  inject: ['channel', 'global'],
2731
2731
  data () {
2732
2732
  return {
@@ -3001,10 +3001,7 @@ const _hoisted_21 = {
3001
3001
  class: "alert alert-danger"
3002
3002
  };
3003
3003
  const _hoisted_22 = { colspan: 2 };
3004
- const _hoisted_23 = {
3005
- key: 4,
3006
- class: "table"
3007
- };
3004
+ const _hoisted_23 = { class: "sh-thead" };
3008
3005
  const _hoisted_24 = ["onClick"];
3009
3006
  const _hoisted_25 = ["onClick"];
3010
3007
  const _hoisted_26 = ["onClick"];
@@ -3012,12 +3009,13 @@ const _hoisted_27 = {
3012
3009
  key: 0,
3013
3010
  class: "text-capitalize"
3014
3011
  };
3015
- const _hoisted_28 = {
3012
+ const _hoisted_28 = { class: "sh-tbody" };
3013
+ const _hoisted_29 = {
3016
3014
  key: 0,
3017
3015
  class: "text-center"
3018
3016
  };
3019
- const _hoisted_29 = ["colspan"];
3020
- const _hoisted_30 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3017
+ const _hoisted_30 = ["colspan"];
3018
+ const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3021
3019
  /*#__PURE__*/createElementVNode("div", {
3022
3020
  class: "spinner-border",
3023
3021
  role: "status"
@@ -3025,46 +3023,46 @@ const _hoisted_30 = /*#__PURE__*/createElementVNode("div", { class: "text-center
3025
3023
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3026
3024
  ])
3027
3025
  ], -1 /* HOISTED */);
3028
- const _hoisted_31 = [
3029
- _hoisted_30
3026
+ const _hoisted_32 = [
3027
+ _hoisted_31
3030
3028
  ];
3031
- const _hoisted_32 = {
3029
+ const _hoisted_33 = {
3032
3030
  key: 1,
3033
3031
  class: "text-center alert alert-danger"
3034
3032
  };
3035
- const _hoisted_33 = ["colspan"];
3036
- const _hoisted_34 = {
3033
+ const _hoisted_34 = ["colspan"];
3034
+ const _hoisted_35 = {
3037
3035
  key: 2,
3038
3036
  class: "text-center alert alert-info no_records"
3039
3037
  };
3040
- const _hoisted_35 = ["colspan"];
3041
- const _hoisted_36 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
3042
- const _hoisted_37 = /*#__PURE__*/createTextVNode(" No records found ");
3043
- const _hoisted_38 = [
3044
- _hoisted_36,
3045
- _hoisted_37
3038
+ const _hoisted_36 = ["colspan"];
3039
+ const _hoisted_37 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
3040
+ const _hoisted_38 = /*#__PURE__*/createTextVNode(" No records found ");
3041
+ const _hoisted_39 = [
3042
+ _hoisted_37,
3043
+ _hoisted_38
3046
3044
  ];
3047
- const _hoisted_39 = ["onClick"];
3048
- const _hoisted_40 = { key: 1 };
3049
- const _hoisted_41 = {
3045
+ const _hoisted_40 = ["onClick"];
3046
+ const _hoisted_41 = { key: 1 };
3047
+ const _hoisted_42 = {
3050
3048
  key: 2,
3051
3049
  class: "text-success fw-bold"
3052
3050
  };
3053
- const _hoisted_42 = { key: 3 };
3054
- const _hoisted_43 = ["innerHTML"];
3051
+ const _hoisted_43 = { key: 3 };
3055
3052
  const _hoisted_44 = ["innerHTML"];
3056
3053
  const _hoisted_45 = ["innerHTML"];
3057
- const _hoisted_46 = {
3054
+ const _hoisted_46 = ["innerHTML"];
3055
+ const _hoisted_47 = {
3058
3056
  key: 0,
3059
3057
  style: {"white-space":"nowrap"}
3060
3058
  };
3061
- const _hoisted_47 = ["title", "onClick"];
3062
- const _hoisted_48 = { key: 5 };
3063
- const _hoisted_49 = {
3059
+ const _hoisted_48 = ["title", "onClick"];
3060
+ const _hoisted_49 = { key: 5 };
3061
+ const _hoisted_50 = {
3064
3062
  key: 0,
3065
3063
  class: "text-center"
3066
3064
  };
3067
- const _hoisted_50 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3065
+ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3068
3066
  /*#__PURE__*/createElementVNode("div", {
3069
3067
  class: "spinner-border",
3070
3068
  role: "status"
@@ -3072,38 +3070,38 @@ const _hoisted_50 = /*#__PURE__*/createElementVNode("div", { class: "text-center
3072
3070
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3073
3071
  ])
3074
3072
  ], -1 /* HOISTED */);
3075
- const _hoisted_51 = [
3076
- _hoisted_50
3073
+ const _hoisted_52 = [
3074
+ _hoisted_51
3077
3075
  ];
3078
- const _hoisted_52 = { key: 1 };
3079
- const _hoisted_53 = {
3076
+ const _hoisted_53 = { key: 1 };
3077
+ const _hoisted_54 = {
3080
3078
  key: 2,
3081
3079
  class: "mobile-list-items"
3082
3080
  };
3083
- const _hoisted_54 = ["onClick"];
3084
- const _hoisted_55 = {
3081
+ const _hoisted_55 = ["onClick"];
3082
+ const _hoisted_56 = {
3085
3083
  key: 0,
3086
3084
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3087
3085
  };
3088
- const _hoisted_56 = {
3086
+ const _hoisted_57 = {
3089
3087
  key: 1,
3090
3088
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3091
3089
  };
3092
- const _hoisted_57 = {
3090
+ const _hoisted_58 = {
3093
3091
  key: 2,
3094
3092
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3095
3093
  };
3096
- const _hoisted_58 = { key: 1 };
3097
- const _hoisted_59 = {
3094
+ const _hoisted_59 = { key: 1 };
3095
+ const _hoisted_60 = {
3098
3096
  key: 2,
3099
3097
  class: "text-primary fw-bold"
3100
3098
  };
3101
- const _hoisted_60 = ["innerHTML"];
3102
3099
  const _hoisted_61 = ["innerHTML"];
3103
3100
  const _hoisted_62 = ["innerHTML"];
3104
- const _hoisted_63 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
3105
- const _hoisted_64 = { key: 0 };
3106
- const _hoisted_65 = ["title", "onClick"];
3101
+ const _hoisted_63 = ["innerHTML"];
3102
+ const _hoisted_64 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
3103
+ const _hoisted_65 = { key: 0 };
3104
+ const _hoisted_66 = ["title", "onClick"];
3107
3105
 
3108
3106
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3109
3107
  const _component_router_link = resolveComponent("router-link");
@@ -3183,8 +3181,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3183
3181
  : createCommentVNode("v-if", true)
3184
3182
  ], 64 /* STABLE_FRAGMENT */))
3185
3183
  : ($options.windowWidth > 700)
3186
- ? (openBlock(), createElementBlock("table", _hoisted_23, [
3187
- createElementVNode("thead", null, [
3184
+ ? (openBlock(), createElementBlock("table", {
3185
+ key: 4,
3186
+ class: normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
3187
+ }, [
3188
+ createElementVNode("thead", _hoisted_23, [
3188
3189
  createElementVNode("tr", null, [
3189
3190
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (title) => {
3190
3191
  return (openBlock(), createElementBlock("th", {
@@ -3214,24 +3215,24 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3214
3215
  : createCommentVNode("v-if", true)
3215
3216
  ])
3216
3217
  ]),
3217
- createElementVNode("tbody", null, [
3218
+ createElementVNode("tbody", _hoisted_28, [
3218
3219
  ($data.loading === 'loading')
3219
- ? (openBlock(), createElementBlock("tr", _hoisted_28, [
3220
+ ? (openBlock(), createElementBlock("tr", _hoisted_29, [
3220
3221
  createElementVNode("td", {
3221
3222
  colspan: $props.headers.length
3222
- }, _hoisted_31, 8 /* PROPS */, _hoisted_29)
3223
+ }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
3223
3224
  ]))
3224
3225
  : ($data.loading === 'error')
3225
- ? (openBlock(), createElementBlock("tr", _hoisted_32, [
3226
+ ? (openBlock(), createElementBlock("tr", _hoisted_33, [
3226
3227
  createElementVNode("td", {
3227
3228
  colspan: $props.headers.length
3228
- }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_33)
3229
+ }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
3229
3230
  ]))
3230
3231
  : ($data.records.length === 0)
3231
- ? (openBlock(), createElementBlock("tr", _hoisted_34, [
3232
+ ? (openBlock(), createElementBlock("tr", _hoisted_35, [
3232
3233
  createElementVNode("td", {
3233
3234
  colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
3234
- }, _hoisted_38, 8 /* PROPS */, _hoisted_35)
3235
+ }, _hoisted_39, 8 /* PROPS */, _hoisted_36)
3235
3236
  ]))
3236
3237
  : ($data.loading === 'done')
3237
3238
  ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList($data.records, (record, index) => {
@@ -3252,29 +3253,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3252
3253
  innerHTML: record[key]
3253
3254
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3254
3255
  : ($options.getFieldType(key) === 'numeric')
3255
- ? (openBlock(), createElementBlock("span", _hoisted_40, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3256
+ ? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3256
3257
  : ($options.getFieldType(key) === 'money')
3257
- ? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3258
+ ? (openBlock(), createElementBlock("span", _hoisted_42, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3258
3259
  : ($options.getFieldType(key) === 'date')
3259
- ? (openBlock(), createElementBlock("span", _hoisted_42, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3260
+ ? (openBlock(), createElementBlock("span", _hoisted_43, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3260
3261
  : (typeof key === 'string')
3261
3262
  ? (openBlock(), createElementBlock("span", {
3262
3263
  key: 4,
3263
3264
  innerHTML: record[key]
3264
- }, null, 8 /* PROPS */, _hoisted_43))
3265
+ }, null, 8 /* PROPS */, _hoisted_44))
3265
3266
  : (typeof key === 'function')
3266
3267
  ? (openBlock(), createElementBlock("span", {
3267
3268
  key: 5,
3268
3269
  innerHTML: key(record, index)
3269
- }, null, 8 /* PROPS */, _hoisted_44))
3270
+ }, null, 8 /* PROPS */, _hoisted_45))
3270
3271
  : (openBlock(), createElementBlock("span", {
3271
3272
  key: 6,
3272
3273
  innerHTML: record[key[0]]
3273
- }, null, 8 /* PROPS */, _hoisted_45))
3274
+ }, null, 8 /* PROPS */, _hoisted_46))
3274
3275
  ]))
3275
3276
  }), 128 /* KEYED_FRAGMENT */)),
3276
3277
  ($props.actions)
3277
- ? (openBlock(), createElementBlock("td", _hoisted_46, [
3278
+ ? (openBlock(), createElementBlock("td", _hoisted_47, [
3278
3279
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
3279
3280
  return (openBlock(), createElementBlock(Fragment, {
3280
3281
  key: act.path
@@ -3289,7 +3290,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3289
3290
  title: act.title,
3290
3291
  class: normalizeClass(act.class ? act.class:'btn btn-default'),
3291
3292
  onClick: $event => ($options.doEmitAction(act.emits,record))
3292
- }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_47))
3293
+ }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_48))
3293
3294
  : createCommentVNode("v-if", true),
3294
3295
  (!act.emits)
3295
3296
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3312,20 +3313,20 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3312
3313
  }), 128 /* KEYED_FRAGMENT */))
3313
3314
  ]))
3314
3315
  : createCommentVNode("v-if", true)
3315
- ], 10 /* CLASS, PROPS */, _hoisted_39))
3316
+ ], 10 /* CLASS, PROPS */, _hoisted_40))
3316
3317
  }), 128 /* KEYED_FRAGMENT */))
3317
3318
  : createCommentVNode("v-if", true)
3318
3319
  ])
3319
- ]))
3320
- : (openBlock(), createElementBlock("div", _hoisted_48, [
3320
+ ], 2 /* CLASS */))
3321
+ : (openBlock(), createElementBlock("div", _hoisted_49, [
3321
3322
  ($data.loading === 'loading')
3322
- ? (openBlock(), createElementBlock("div", _hoisted_49, _hoisted_51))
3323
+ ? (openBlock(), createElementBlock("div", _hoisted_50, _hoisted_52))
3323
3324
  : ($data.loading === 'error')
3324
- ? (openBlock(), createElementBlock("div", _hoisted_52, [
3325
+ ? (openBlock(), createElementBlock("div", _hoisted_53, [
3325
3326
  createElementVNode("span", null, toDisplayString($data.loading_error), 1 /* TEXT */)
3326
3327
  ]))
3327
3328
  : ($data.loading === 'done')
3328
- ? (openBlock(), createElementBlock("div", _hoisted_53, [
3329
+ ? (openBlock(), createElementBlock("div", _hoisted_54, [
3329
3330
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.records, (record, index) => {
3330
3331
  return (openBlock(), createElementBlock(Fragment, {
3331
3332
  key: record.id
@@ -3340,10 +3341,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3340
3341
  key: key[0]
3341
3342
  }, [
3342
3343
  (typeof key === 'string' )
3343
- ? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3344
+ ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3344
3345
  : (typeof key === 'function')
3345
- ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
3346
- : (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
3346
+ ? (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
3347
+ : (openBlock(), createElementBlock("p", _hoisted_58, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
3347
3348
  createElementVNode("span", null, [
3348
3349
  (typeof key === 'string' && $props.links && $props.links[key])
3349
3350
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3353,29 +3354,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3353
3354
  innerHTML: record[key]
3354
3355
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3355
3356
  : ($options.getFieldType(key) === 'numeric')
3356
- ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3357
+ ? (openBlock(), createElementBlock("span", _hoisted_59, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3357
3358
  : ($options.getFieldType(key) === 'money')
3358
- ? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3359
+ ? (openBlock(), createElementBlock("span", _hoisted_60, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3359
3360
  : (typeof key === 'string')
3360
3361
  ? (openBlock(), createElementBlock("span", {
3361
3362
  key: 3,
3362
3363
  innerHTML: record[key]
3363
- }, null, 8 /* PROPS */, _hoisted_60))
3364
+ }, null, 8 /* PROPS */, _hoisted_61))
3364
3365
  : (typeof key === 'function')
3365
3366
  ? (openBlock(), createElementBlock("span", {
3366
3367
  key: 4,
3367
3368
  innerHTML: key(record, index )
3368
- }, null, 8 /* PROPS */, _hoisted_61))
3369
+ }, null, 8 /* PROPS */, _hoisted_62))
3369
3370
  : (openBlock(), createElementBlock("span", {
3370
3371
  key: 5,
3371
3372
  innerHTML: record[key[0]]
3372
- }, null, 8 /* PROPS */, _hoisted_62))
3373
+ }, null, 8 /* PROPS */, _hoisted_63))
3373
3374
  ]),
3374
- _hoisted_63
3375
+ _hoisted_64
3375
3376
  ], 64 /* STABLE_FRAGMENT */))
3376
3377
  }), 128 /* KEYED_FRAGMENT */)),
3377
3378
  ($props.actions)
3378
- ? (openBlock(), createElementBlock("div", _hoisted_64, [
3379
+ ? (openBlock(), createElementBlock("div", _hoisted_65, [
3379
3380
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
3380
3381
  return (openBlock(), createElementBlock(Fragment, {
3381
3382
  key: act.path
@@ -3390,7 +3391,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3390
3391
  title: act.title,
3391
3392
  class: normalizeClass(act.class ? act.class:'btn btn-default'),
3392
3393
  onClick: $event => ($options.doEmitAction(act.emits,record))
3393
- }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_65))
3394
+ }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_66))
3394
3395
  : createCommentVNode("v-if", true),
3395
3396
  (!act.emits)
3396
3397
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3413,7 +3414,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3413
3414
  }), 128 /* KEYED_FRAGMENT */))
3414
3415
  ]))
3415
3416
  : createCommentVNode("v-if", true)
3416
- ], 8 /* PROPS */, _hoisted_54)
3417
+ ], 8 /* PROPS */, _hoisted_55)
3417
3418
  ], 64 /* STABLE_FRAGMENT */))
3418
3419
  }), 128 /* KEYED_FRAGMENT */))
3419
3420
  ]))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",