@iankibetsh/shframework 0.3.9 → 0.4.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.
Files changed (3) hide show
  1. package/dist/library.js +185 -155
  2. package/dist/library.mjs +185 -155
  3. package/package.json +1 -1
package/dist/library.mjs CHANGED
@@ -1600,7 +1600,7 @@ const _hoisted_2$6 = {
1600
1600
  style: {"display":"contents"}
1601
1601
  };
1602
1602
  const _hoisted_3$6 = ["src"];
1603
- const _hoisted_4$5 = ["value"];
1603
+ const _hoisted_4$6 = ["value"];
1604
1604
 
1605
1605
  function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1606
1606
  return (openBlock(), createElementBlock("div", _hoisted_1$7, [
@@ -1619,7 +1619,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1619
1619
  return (openBlock(), createElementBlock("option", {
1620
1620
  value: country,
1621
1621
  key: country.dialCode
1622
- }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$5))
1622
+ }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$6))
1623
1623
  }), 128 /* KEYED_FRAGMENT */))
1624
1624
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
1625
1625
  [vModelSelect, $data.selectedCountry]
@@ -2021,10 +2021,10 @@ const _hoisted_2$5 = {
2021
2021
  class: "alert alert-danger"
2022
2022
  };
2023
2023
  const _hoisted_3$5 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-warning" }, null, -1 /* HOISTED */);
2024
- const _hoisted_4$4 = /*#__PURE__*/createTextVNode(" Error");
2025
- const _hoisted_5$3 = [
2024
+ const _hoisted_4$5 = /*#__PURE__*/createTextVNode(" Error");
2025
+ const _hoisted_5$4 = [
2026
2026
  _hoisted_3$5,
2027
- _hoisted_4$4
2027
+ _hoisted_4$5
2028
2028
  ];
2029
2029
  const _hoisted_6$2 = { class: "row" };
2030
2030
  const _hoisted_7$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2078,7 +2078,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2078
2078
  createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2079
2079
  createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2080
2080
  (_ctx.form_status == 3)
2081
- ? (openBlock(), createElementBlock("div", _hoisted_2$5, _hoisted_5$3))
2081
+ ? (openBlock(), createElementBlock("div", _hoisted_2$5, _hoisted_5$4))
2082
2082
  : createCommentVNode("v-if", true),
2083
2083
  withDirectives(createElementVNode("input", {
2084
2084
  type: "hidden",
@@ -2281,7 +2281,7 @@ const _hoisted_3$4 = {
2281
2281
  class: "offcanvas-title",
2282
2282
  id: "offcanvasScrollingLabel"
2283
2283
  };
2284
- const _hoisted_4$3 = { class: "offcanvas-body" };
2284
+ const _hoisted_4$4 = { class: "offcanvas-body" };
2285
2285
 
2286
2286
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2287
2287
  return (openBlock(), createElementBlock("div", {
@@ -2302,7 +2302,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2302
2302
  "aria-label": "Close"
2303
2303
  }, null, 512 /* NEED_PATCH */)
2304
2304
  ]),
2305
- createElementVNode("div", _hoisted_4$3, [
2305
+ createElementVNode("div", _hoisted_4$4, [
2306
2306
  renderSlot(_ctx.$slots, "default")
2307
2307
  ])
2308
2308
  ], 10 /* CLASS, PROPS */, _hoisted_1$4))
@@ -2321,8 +2321,8 @@ var script$3 = {
2321
2321
  const _hoisted_1$3 = ["id"];
2322
2322
  const _hoisted_2$3 = { class: "modal-content" };
2323
2323
  const _hoisted_3$3 = { class: "modal-header" };
2324
- const _hoisted_4$2 = { class: "modal-title" };
2325
- const _hoisted_5$2 = /*#__PURE__*/createElementVNode("button", {
2324
+ const _hoisted_4$3 = { class: "modal-title" };
2325
+ const _hoisted_5$3 = /*#__PURE__*/createElementVNode("button", {
2326
2326
  class: "btn btn-danger btn-sm",
2327
2327
  "data-bs-dismiss": "modal",
2328
2328
  "data-dismiss": "modal"
@@ -2343,8 +2343,8 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2343
2343
  }, [
2344
2344
  createElementVNode("div", _hoisted_2$3, [
2345
2345
  createElementVNode("div", _hoisted_3$3, [
2346
- createElementVNode("h3", _hoisted_4$2, toDisplayString($props.modalTitle), 1 /* TEXT */),
2347
- _hoisted_5$2
2346
+ createElementVNode("h3", _hoisted_4$3, toDisplayString($props.modalTitle), 1 /* TEXT */),
2347
+ _hoisted_5$3
2348
2348
  ]),
2349
2349
  createElementVNode("div", _hoisted_6$1, [
2350
2350
  createElementVNode("div", _hoisted_7$1, [
@@ -2433,10 +2433,10 @@ var script$2 = {
2433
2433
  const _hoisted_1$2 = { key: 0 };
2434
2434
  const _hoisted_2$2 = { class: "record_count_body mb-3" };
2435
2435
  const _hoisted_3$2 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
2436
- const _hoisted_4$1 = /*#__PURE__*/createTextVNode("  ");
2437
- const _hoisted_5$1 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
2436
+ const _hoisted_4$2 = /*#__PURE__*/createTextVNode("  ");
2437
+ const _hoisted_5$2 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
2438
2438
  const _hoisted_10$1 = [
2439
- _hoisted_5$1
2439
+ _hoisted_5$2
2440
2440
  ];
2441
2441
  const _hoisted_11$1 = { class: "record_counts" };
2442
2442
  const _hoisted_12$1 = {
@@ -2480,7 +2480,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2480
2480
  ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
2481
2481
  createElementVNode("div", _hoisted_2$2, [
2482
2482
  _hoisted_3$2,
2483
- _hoisted_4$1,
2483
+ _hoisted_4$2,
2484
2484
  withDirectives(createElementVNode("select", {
2485
2485
  class: "select_per_page",
2486
2486
  onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
@@ -2947,8 +2947,8 @@ const _hoisted_2$1 = {
2947
2947
  class: "col-md-4 mb-2"
2948
2948
  };
2949
2949
  const _hoisted_3$1 = ["disabled"];
2950
- const _hoisted_4 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
2951
- const _hoisted_5 = /*#__PURE__*/createTextVNode(" Export ");
2950
+ const _hoisted_4$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
2951
+ const _hoisted_5$1 = /*#__PURE__*/createTextVNode(" Export ");
2952
2952
  const _hoisted_6 = /*#__PURE__*/createElementVNode("span", {
2953
2953
  class: "spinner-border spinner-border-sm",
2954
2954
  role: "status",
@@ -2962,60 +2962,57 @@ const _hoisted_8 = {
2962
2962
  const _hoisted_9 = { class: "col-12 mb-3" };
2963
2963
  const _hoisted_10 = { class: "sh-search-bar" };
2964
2964
  const _hoisted_11 = ["placeholder"];
2965
- const _hoisted_12 = /*#__PURE__*/createElementVNode("span", { class: "sh-search-icon" }, [
2966
- /*#__PURE__*/createElementVNode("i", { class: "bi bi-search mb-0" })
2967
- ], -1 /* HOISTED */);
2968
- const _hoisted_13 = {
2965
+ const _hoisted_12 = {
2969
2966
  key: 0,
2970
2967
  class: "text-center"
2971
2968
  };
2972
- const _hoisted_14 = /*#__PURE__*/createElementVNode("div", {
2969
+ const _hoisted_13 = /*#__PURE__*/createElementVNode("div", {
2973
2970
  class: "spinner-border",
2974
2971
  role: "status"
2975
2972
  }, [
2976
2973
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
2977
2974
  ], -1 /* HOISTED */);
2978
- const _hoisted_15 = [
2979
- _hoisted_14
2975
+ const _hoisted_14 = [
2976
+ _hoisted_13
2980
2977
  ];
2981
- const _hoisted_16 = {
2978
+ const _hoisted_15 = {
2982
2979
  key: 1,
2983
2980
  class: "alert alert-danger"
2984
2981
  };
2985
- const _hoisted_17 = { colspan: 2 };
2986
- const _hoisted_18 = {
2982
+ const _hoisted_16 = { colspan: 2 };
2983
+ const _hoisted_17 = {
2987
2984
  key: 0,
2988
2985
  class: "text-center"
2989
2986
  };
2990
- const _hoisted_19 = /*#__PURE__*/createElementVNode("div", {
2987
+ const _hoisted_18 = /*#__PURE__*/createElementVNode("div", {
2991
2988
  class: "spinner-border",
2992
2989
  role: "status"
2993
2990
  }, [
2994
2991
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
2995
2992
  ], -1 /* HOISTED */);
2996
- const _hoisted_20 = [
2997
- _hoisted_19
2993
+ const _hoisted_19 = [
2994
+ _hoisted_18
2998
2995
  ];
2999
- const _hoisted_21 = {
2996
+ const _hoisted_20 = {
3000
2997
  key: 1,
3001
2998
  class: "alert alert-danger"
3002
2999
  };
3003
- const _hoisted_22 = { colspan: 2 };
3004
- const _hoisted_23 = { class: "sh-thead" };
3000
+ const _hoisted_21 = { colspan: 2 };
3001
+ const _hoisted_22 = { class: "sh-thead" };
3002
+ const _hoisted_23 = ["onClick"];
3005
3003
  const _hoisted_24 = ["onClick"];
3006
3004
  const _hoisted_25 = ["onClick"];
3007
- const _hoisted_26 = ["onClick"];
3008
- const _hoisted_27 = {
3005
+ const _hoisted_26 = {
3009
3006
  key: 0,
3010
3007
  class: "text-capitalize"
3011
3008
  };
3012
- const _hoisted_28 = { class: "sh-tbody" };
3013
- const _hoisted_29 = {
3009
+ const _hoisted_27 = { class: "sh-tbody" };
3010
+ const _hoisted_28 = {
3014
3011
  key: 0,
3015
3012
  class: "text-center"
3016
3013
  };
3017
- const _hoisted_30 = ["colspan"];
3018
- const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3014
+ const _hoisted_29 = ["colspan"];
3015
+ const _hoisted_30 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3019
3016
  /*#__PURE__*/createElementVNode("div", {
3020
3017
  class: "spinner-border",
3021
3018
  role: "status"
@@ -3023,46 +3020,46 @@ const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center
3023
3020
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3024
3021
  ])
3025
3022
  ], -1 /* HOISTED */);
3026
- const _hoisted_32 = [
3027
- _hoisted_31
3023
+ const _hoisted_31 = [
3024
+ _hoisted_30
3028
3025
  ];
3029
- const _hoisted_33 = {
3026
+ const _hoisted_32 = {
3030
3027
  key: 1,
3031
3028
  class: "text-center alert alert-danger"
3032
3029
  };
3033
- const _hoisted_34 = ["colspan"];
3034
- const _hoisted_35 = {
3030
+ const _hoisted_33 = ["colspan"];
3031
+ const _hoisted_34 = {
3035
3032
  key: 2,
3036
3033
  class: "text-center alert alert-info no_records"
3037
3034
  };
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
3035
+ const _hoisted_35 = ["colspan"];
3036
+ const _hoisted_36 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
3037
+ const _hoisted_37 = /*#__PURE__*/createTextVNode(" No records found ");
3038
+ const _hoisted_38 = [
3039
+ _hoisted_36,
3040
+ _hoisted_37
3044
3041
  ];
3045
- const _hoisted_40 = ["onClick"];
3046
- const _hoisted_41 = { key: 1 };
3047
- const _hoisted_42 = {
3042
+ const _hoisted_39 = ["onClick"];
3043
+ const _hoisted_40 = { key: 1 };
3044
+ const _hoisted_41 = {
3048
3045
  key: 2,
3049
3046
  class: "text-success fw-bold"
3050
3047
  };
3051
- const _hoisted_43 = { key: 3 };
3048
+ const _hoisted_42 = { key: 3 };
3049
+ const _hoisted_43 = ["innerHTML"];
3052
3050
  const _hoisted_44 = ["innerHTML"];
3053
3051
  const _hoisted_45 = ["innerHTML"];
3054
- const _hoisted_46 = ["innerHTML"];
3055
- const _hoisted_47 = {
3052
+ const _hoisted_46 = {
3056
3053
  key: 0,
3057
3054
  style: {"white-space":"nowrap"}
3058
3055
  };
3059
- const _hoisted_48 = ["title", "onClick"];
3060
- const _hoisted_49 = { key: 5 };
3061
- const _hoisted_50 = {
3056
+ const _hoisted_47 = ["title", "onClick"];
3057
+ const _hoisted_48 = { key: 5 };
3058
+ const _hoisted_49 = {
3062
3059
  key: 0,
3063
3060
  class: "text-center"
3064
3061
  };
3065
- const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3062
+ const _hoisted_50 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
3066
3063
  /*#__PURE__*/createElementVNode("div", {
3067
3064
  class: "spinner-border",
3068
3065
  role: "status"
@@ -3070,38 +3067,38 @@ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center
3070
3067
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
3071
3068
  ])
3072
3069
  ], -1 /* HOISTED */);
3073
- const _hoisted_52 = [
3074
- _hoisted_51
3070
+ const _hoisted_51 = [
3071
+ _hoisted_50
3075
3072
  ];
3076
- const _hoisted_53 = { key: 1 };
3077
- const _hoisted_54 = {
3073
+ const _hoisted_52 = { key: 1 };
3074
+ const _hoisted_53 = {
3078
3075
  key: 2,
3079
3076
  class: "mobile-list-items"
3080
3077
  };
3081
- const _hoisted_55 = ["onClick"];
3082
- const _hoisted_56 = {
3078
+ const _hoisted_54 = ["onClick"];
3079
+ const _hoisted_55 = {
3083
3080
  key: 0,
3084
3081
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3085
3082
  };
3086
- const _hoisted_57 = {
3083
+ const _hoisted_56 = {
3087
3084
  key: 1,
3088
3085
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3089
3086
  };
3090
- const _hoisted_58 = {
3087
+ const _hoisted_57 = {
3091
3088
  key: 2,
3092
3089
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
3093
3090
  };
3094
- const _hoisted_59 = { key: 1 };
3095
- const _hoisted_60 = {
3091
+ const _hoisted_58 = { key: 1 };
3092
+ const _hoisted_59 = {
3096
3093
  key: 2,
3097
3094
  class: "text-primary fw-bold"
3098
3095
  };
3096
+ const _hoisted_60 = ["innerHTML"];
3099
3097
  const _hoisted_61 = ["innerHTML"];
3100
3098
  const _hoisted_62 = ["innerHTML"];
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"];
3099
+ const _hoisted_63 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
3100
+ const _hoisted_64 = { key: 0 };
3101
+ const _hoisted_65 = ["title", "onClick"];
3105
3102
 
3106
3103
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3107
3104
  const _component_router_link = resolveComponent("router-link");
@@ -3117,8 +3114,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3117
3114
  }, [
3118
3115
  (!$data.downloading)
3119
3116
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3120
- _hoisted_4,
3121
- _hoisted_5
3117
+ _hoisted_4$1,
3118
+ _hoisted_5$1
3122
3119
  ], 64 /* STABLE_FRAGMENT */))
3123
3120
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3124
3121
  _hoisted_6,
@@ -3132,15 +3129,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3132
3129
  createElementVNode("div", _hoisted_9, [
3133
3130
  createElementVNode("div", _hoisted_10, [
3134
3131
  withDirectives(createElementVNode("input", {
3135
- type: "text",
3132
+ type: "search",
3136
3133
  onChange: _cache[1] || (_cache[1] = $event => ($options.reloadData(1))),
3137
3134
  "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (($data.filter_value) = $event)),
3138
3135
  placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
3139
3136
  class: "form-control sh-search-input"
3140
3137
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_11), [
3141
3138
  [vModelText, $data.filter_value]
3142
- ]),
3143
- _hoisted_12
3139
+ ])
3144
3140
  ])
3145
3141
  ])
3146
3142
  ]))
@@ -3148,10 +3144,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3148
3144
  ($options.hasDefaultSlot)
3149
3145
  ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
3150
3146
  ($data.loading === 'loading')
3151
- ? (openBlock(), createElementBlock("div", _hoisted_13, _hoisted_15))
3147
+ ? (openBlock(), createElementBlock("div", _hoisted_12, _hoisted_14))
3152
3148
  : ($data.loading === 'error')
3153
- ? (openBlock(), createElementBlock("div", _hoisted_16, [
3154
- createElementVNode("span", _hoisted_17, toDisplayString($data.loading_error), 1 /* TEXT */)
3149
+ ? (openBlock(), createElementBlock("div", _hoisted_15, [
3150
+ createElementVNode("span", _hoisted_16, toDisplayString($data.loading_error), 1 /* TEXT */)
3155
3151
  ]))
3156
3152
  : createCommentVNode("v-if", true),
3157
3153
  ($data.loading === 'done')
@@ -3167,10 +3163,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3167
3163
  ($options.hasRecordsSlot)
3168
3164
  ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
3169
3165
  ($data.loading === 'loading')
3170
- ? (openBlock(), createElementBlock("div", _hoisted_18, _hoisted_20))
3166
+ ? (openBlock(), createElementBlock("div", _hoisted_17, _hoisted_19))
3171
3167
  : ($data.loading === 'error')
3172
- ? (openBlock(), createElementBlock("div", _hoisted_21, [
3173
- createElementVNode("span", _hoisted_22, toDisplayString($data.loading_error), 1 /* TEXT */)
3168
+ ? (openBlock(), createElementBlock("div", _hoisted_20, [
3169
+ createElementVNode("span", _hoisted_21, toDisplayString($data.loading_error), 1 /* TEXT */)
3174
3170
  ]))
3175
3171
  : createCommentVNode("v-if", true),
3176
3172
  ($data.loading === 'done')
@@ -3185,7 +3181,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3185
3181
  key: 4,
3186
3182
  class: normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
3187
3183
  }, [
3188
- createElementVNode("thead", _hoisted_23, [
3184
+ createElementVNode("thead", _hoisted_22, [
3189
3185
  createElementVNode("tr", null, [
3190
3186
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (title) => {
3191
3187
  return (openBlock(), createElementBlock("th", {
@@ -3196,43 +3192,43 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3196
3192
  key: 0,
3197
3193
  class: "text-capitalize",
3198
3194
  onClick: $event => ($options.changeKey('order_by',title))
3199
- }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
3195
+ }, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
3200
3196
  : (typeof title === 'function')
3201
3197
  ? (openBlock(), createElementBlock("a", {
3202
3198
  key: 1,
3203
3199
  class: "text-capitalize",
3204
3200
  onClick: $event => ($options.changeKey('order_by',title))
3205
- }, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
3201
+ }, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
3206
3202
  : (openBlock(), createElementBlock("a", {
3207
3203
  key: 2,
3208
3204
  class: "text-capitalize",
3209
3205
  onClick: $event => ($options.changeKey('order_by',title[0]))
3210
- }, toDisplayString(title[1].replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
3206
+ }, toDisplayString(title[1].replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
3211
3207
  ]))
3212
3208
  }), 128 /* KEYED_FRAGMENT */)),
3213
3209
  ($props.actions)
3214
- ? (openBlock(), createElementBlock("th", _hoisted_27, toDisplayString($props.actions.label), 1 /* TEXT */))
3210
+ ? (openBlock(), createElementBlock("th", _hoisted_26, toDisplayString($props.actions.label), 1 /* TEXT */))
3215
3211
  : createCommentVNode("v-if", true)
3216
3212
  ])
3217
3213
  ]),
3218
- createElementVNode("tbody", _hoisted_28, [
3214
+ createElementVNode("tbody", _hoisted_27, [
3219
3215
  ($data.loading === 'loading')
3220
- ? (openBlock(), createElementBlock("tr", _hoisted_29, [
3216
+ ? (openBlock(), createElementBlock("tr", _hoisted_28, [
3221
3217
  createElementVNode("td", {
3222
3218
  colspan: $props.headers.length
3223
- }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
3219
+ }, _hoisted_31, 8 /* PROPS */, _hoisted_29)
3224
3220
  ]))
3225
3221
  : ($data.loading === 'error')
3226
- ? (openBlock(), createElementBlock("tr", _hoisted_33, [
3222
+ ? (openBlock(), createElementBlock("tr", _hoisted_32, [
3227
3223
  createElementVNode("td", {
3228
3224
  colspan: $props.headers.length
3229
- }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
3225
+ }, toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_33)
3230
3226
  ]))
3231
3227
  : ($data.records.length === 0)
3232
- ? (openBlock(), createElementBlock("tr", _hoisted_35, [
3228
+ ? (openBlock(), createElementBlock("tr", _hoisted_34, [
3233
3229
  createElementVNode("td", {
3234
3230
  colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
3235
- }, _hoisted_39, 8 /* PROPS */, _hoisted_36)
3231
+ }, _hoisted_38, 8 /* PROPS */, _hoisted_35)
3236
3232
  ]))
3237
3233
  : ($data.loading === 'done')
3238
3234
  ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList($data.records, (record, index) => {
@@ -3253,29 +3249,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3253
3249
  innerHTML: record[key]
3254
3250
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3255
3251
  : ($options.getFieldType(key) === 'numeric')
3256
- ? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3252
+ ? (openBlock(), createElementBlock("span", _hoisted_40, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3257
3253
  : ($options.getFieldType(key) === 'money')
3258
- ? (openBlock(), createElementBlock("span", _hoisted_42, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3254
+ ? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3259
3255
  : ($options.getFieldType(key) === 'date')
3260
- ? (openBlock(), createElementBlock("span", _hoisted_43, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3256
+ ? (openBlock(), createElementBlock("span", _hoisted_42, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3261
3257
  : (typeof key === 'string')
3262
3258
  ? (openBlock(), createElementBlock("span", {
3263
3259
  key: 4,
3264
3260
  innerHTML: record[key]
3265
- }, null, 8 /* PROPS */, _hoisted_44))
3261
+ }, null, 8 /* PROPS */, _hoisted_43))
3266
3262
  : (typeof key === 'function')
3267
3263
  ? (openBlock(), createElementBlock("span", {
3268
3264
  key: 5,
3269
3265
  innerHTML: key(record, index)
3270
- }, null, 8 /* PROPS */, _hoisted_45))
3266
+ }, null, 8 /* PROPS */, _hoisted_44))
3271
3267
  : (openBlock(), createElementBlock("span", {
3272
3268
  key: 6,
3273
3269
  innerHTML: record[key[0]]
3274
- }, null, 8 /* PROPS */, _hoisted_46))
3270
+ }, null, 8 /* PROPS */, _hoisted_45))
3275
3271
  ]))
3276
3272
  }), 128 /* KEYED_FRAGMENT */)),
3277
3273
  ($props.actions)
3278
- ? (openBlock(), createElementBlock("td", _hoisted_47, [
3274
+ ? (openBlock(), createElementBlock("td", _hoisted_46, [
3279
3275
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
3280
3276
  return (openBlock(), createElementBlock(Fragment, {
3281
3277
  key: act.path
@@ -3290,7 +3286,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3290
3286
  title: act.title,
3291
3287
  class: normalizeClass(act.class ? act.class:'btn btn-default'),
3292
3288
  onClick: $event => ($options.doEmitAction(act.emits,record))
3293
- }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_48))
3289
+ }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_47))
3294
3290
  : createCommentVNode("v-if", true),
3295
3291
  (!act.emits)
3296
3292
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3313,20 +3309,20 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3313
3309
  }), 128 /* KEYED_FRAGMENT */))
3314
3310
  ]))
3315
3311
  : createCommentVNode("v-if", true)
3316
- ], 10 /* CLASS, PROPS */, _hoisted_40))
3312
+ ], 10 /* CLASS, PROPS */, _hoisted_39))
3317
3313
  }), 128 /* KEYED_FRAGMENT */))
3318
3314
  : createCommentVNode("v-if", true)
3319
3315
  ])
3320
3316
  ], 2 /* CLASS */))
3321
- : (openBlock(), createElementBlock("div", _hoisted_49, [
3317
+ : (openBlock(), createElementBlock("div", _hoisted_48, [
3322
3318
  ($data.loading === 'loading')
3323
- ? (openBlock(), createElementBlock("div", _hoisted_50, _hoisted_52))
3319
+ ? (openBlock(), createElementBlock("div", _hoisted_49, _hoisted_51))
3324
3320
  : ($data.loading === 'error')
3325
- ? (openBlock(), createElementBlock("div", _hoisted_53, [
3321
+ ? (openBlock(), createElementBlock("div", _hoisted_52, [
3326
3322
  createElementVNode("span", null, toDisplayString($data.loading_error), 1 /* TEXT */)
3327
3323
  ]))
3328
3324
  : ($data.loading === 'done')
3329
- ? (openBlock(), createElementBlock("div", _hoisted_54, [
3325
+ ? (openBlock(), createElementBlock("div", _hoisted_53, [
3330
3326
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.records, (record, index) => {
3331
3327
  return (openBlock(), createElementBlock(Fragment, {
3332
3328
  key: record.id
@@ -3341,10 +3337,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3341
3337
  key: key[0]
3342
3338
  }, [
3343
3339
  (typeof key === 'string' )
3344
- ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3340
+ ? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
3345
3341
  : (typeof key === 'function')
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 */)),
3342
+ ? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
3343
+ : (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
3348
3344
  createElementVNode("span", null, [
3349
3345
  (typeof key === 'string' && $props.links && $props.links[key])
3350
3346
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3354,29 +3350,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3354
3350
  innerHTML: record[key]
3355
3351
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3356
3352
  : ($options.getFieldType(key) === 'numeric')
3357
- ? (openBlock(), createElementBlock("span", _hoisted_59, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3353
+ ? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3358
3354
  : ($options.getFieldType(key) === 'money')
3359
- ? (openBlock(), createElementBlock("span", _hoisted_60, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3355
+ ? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3360
3356
  : (typeof key === 'string')
3361
3357
  ? (openBlock(), createElementBlock("span", {
3362
3358
  key: 3,
3363
3359
  innerHTML: record[key]
3364
- }, null, 8 /* PROPS */, _hoisted_61))
3360
+ }, null, 8 /* PROPS */, _hoisted_60))
3365
3361
  : (typeof key === 'function')
3366
3362
  ? (openBlock(), createElementBlock("span", {
3367
3363
  key: 4,
3368
3364
  innerHTML: key(record, index )
3369
- }, null, 8 /* PROPS */, _hoisted_62))
3365
+ }, null, 8 /* PROPS */, _hoisted_61))
3370
3366
  : (openBlock(), createElementBlock("span", {
3371
3367
  key: 5,
3372
3368
  innerHTML: record[key[0]]
3373
- }, null, 8 /* PROPS */, _hoisted_63))
3369
+ }, null, 8 /* PROPS */, _hoisted_62))
3374
3370
  ]),
3375
- _hoisted_64
3371
+ _hoisted_63
3376
3372
  ], 64 /* STABLE_FRAGMENT */))
3377
3373
  }), 128 /* KEYED_FRAGMENT */)),
3378
3374
  ($props.actions)
3379
- ? (openBlock(), createElementBlock("div", _hoisted_65, [
3375
+ ? (openBlock(), createElementBlock("div", _hoisted_64, [
3380
3376
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
3381
3377
  return (openBlock(), createElementBlock(Fragment, {
3382
3378
  key: act.path
@@ -3391,7 +3387,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3391
3387
  title: act.title,
3392
3388
  class: normalizeClass(act.class ? act.class:'btn btn-default'),
3393
3389
  onClick: $event => ($options.doEmitAction(act.emits,record))
3394
- }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_66))
3390
+ }, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_65))
3395
3391
  : createCommentVNode("v-if", true),
3396
3392
  (!act.emits)
3397
3393
  ? (openBlock(), createBlock(_component_router_link, {
@@ -3414,7 +3410,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3414
3410
  }), 128 /* KEYED_FRAGMENT */))
3415
3411
  ]))
3416
3412
  : createCommentVNode("v-if", true)
3417
- ], 8 /* PROPS */, _hoisted_55)
3413
+ ], 8 /* PROPS */, _hoisted_54)
3418
3414
  ], 64 /* STABLE_FRAGMENT */))
3419
3415
  }), 128 /* KEYED_FRAGMENT */))
3420
3416
  ]))
@@ -3439,10 +3435,12 @@ script$1.__file = "src/views/ShTable.vue";
3439
3435
 
3440
3436
  var script = {
3441
3437
  name: 'ShTabs',
3442
- props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
3438
+ props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive'],
3443
3439
  data () {
3444
3440
  return {
3445
- currentTab: ''
3441
+ currentTab: '',
3442
+ generatedId: null,
3443
+ isResponsive: typeof this.responsive !== 'undefined'
3446
3444
  }
3447
3445
  },
3448
3446
  watch: {
@@ -3462,9 +3460,14 @@ var script = {
3462
3460
  }
3463
3461
  },
3464
3462
  mounted () {
3463
+ this.generatedId = 'tab' + Math.random().toString(36).slice(2);
3465
3464
  this.resetTabCounts();
3465
+ this.setTab(this.tabs[0]);
3466
3466
  },
3467
3467
  methods: {
3468
+ setTab: function(tab){
3469
+ this.currentTab = tab.replace(/_/g, ' ');
3470
+ },
3468
3471
  setTabCounts: function (tabCounts) {
3469
3472
  if (typeof tabCounts === 'object') {
3470
3473
  this.setCounts(tabCounts);
@@ -3496,7 +3499,7 @@ var script = {
3496
3499
  },
3497
3500
  setCounts: function (res) {
3498
3501
  Object.keys(res).forEach(key => {
3499
- const elem = document.getElementById('sh_tab_' + key);
3502
+ let elem = document.getElementsByClassName('sh_tab_' + key);
3500
3503
  if (elem) {
3501
3504
  let txt = elem.innerHTML;
3502
3505
  txt = txt.split('<i class="d-none"></i>')[0];
@@ -3509,48 +3512,75 @@ var script = {
3509
3512
  }
3510
3513
  };
3511
3514
 
3512
- const _hoisted_1 = { class: "common_tabs" };
3513
- const _hoisted_2 = {
3514
- class: "nav nav-tabs mb-2",
3515
- id: "myTab",
3516
- role: "tablist"
3515
+ const _hoisted_1 = {
3516
+ key: 0,
3517
+ class: "navbar navbar-expand-lg sh-horizontal-tabs"
3517
3518
  };
3518
- const _hoisted_3 = { class: "tab-content" };
3519
+ const _hoisted_2 = ["data-bs-target"];
3520
+ const _hoisted_3 = /*#__PURE__*/createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3521
+ const _hoisted_4 = ["id"];
3522
+ const _hoisted_5 = { class: "tab-content" };
3519
3523
 
3520
3524
  function render(_ctx, _cache, $props, $setup, $data, $options) {
3521
3525
  const _component_router_link = resolveComponent("router-link");
3522
3526
  const _component_router_view = resolveComponent("router-view");
3523
3527
 
3524
- return (openBlock(), createElementBlock("div", _hoisted_1, [
3525
- createElementVNode("ul", _hoisted_2, [
3526
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.tabs, (tab) => {
3527
- return (openBlock(), createElementBlock("li", {
3528
- class: "nav-item",
3529
- key: tab
3530
- }, [
3531
- createVNode(_component_router_link, {
3532
- "active-class": 'active',
3533
- class: "nav-link text-capitalize",
3534
- to: $props.baseUrl+'/tab/'+tab,
3535
- role: "tab",
3536
- id: 'sh_tab_' + tab
3537
- }, {
3538
- default: withCtx(() => [
3539
- createTextVNode(toDisplayString(tab.replace(/_/g, ' ')), 1 /* TEXT */)
3540
- ]),
3541
- _: 2 /* DYNAMIC */
3542
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["to", "id"])
3528
+ return (openBlock(), createElementBlock(Fragment, null, [
3529
+ ($data.generatedId)
3530
+ ? (openBlock(), createElementBlock("nav", _hoisted_1, [
3531
+ ($data.isResponsive)
3532
+ ? (openBlock(), createElementBlock("a", {
3533
+ key: 0,
3534
+ href: "#",
3535
+ class: "form-control navbar-toggler text-capitalize",
3536
+ "data-bs-toggle": "collapse",
3537
+ "data-bs-target": '#' + $data.generatedId,
3538
+ "aria-controls": "navbarNav",
3539
+ "aria-expanded": "false",
3540
+ "aria-label": "Toggle navigation"
3541
+ }, [
3542
+ createTextVNode(toDisplayString($data.currentTab) + " ", 1 /* TEXT */),
3543
+ _hoisted_3
3544
+ ], 8 /* PROPS */, _hoisted_2))
3545
+ : createCommentVNode("v-if", true),
3546
+ createElementVNode("div", {
3547
+ class: normalizeClass($data.isResponsive ? 'collapse navbar-collapse':''),
3548
+ id: $data.generatedId
3549
+ }, [
3550
+ createElementVNode("ul", {
3551
+ class: normalizeClass($data.isResponsive ? 'navbar-nav nav':'nav')
3552
+ }, [
3553
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.tabs, (tab) => {
3554
+ return (openBlock(), createElementBlock("li", {
3555
+ class: "nav-item",
3556
+ key: tab
3557
+ }, [
3558
+ createVNode(_component_router_link, {
3559
+ onClick: $event => ($options.setTab(tab)),
3560
+ "active-class": 'active',
3561
+ class: normalizeClass(["nav-link text-capitalize", 'sh_tab_' + tab]),
3562
+ to: $props.baseUrl+'/tab/'+tab,
3563
+ role: "tab"
3564
+ }, {
3565
+ default: withCtx(() => [
3566
+ createTextVNode(toDisplayString(tab.replace(/_/g, ' ')), 1 /* TEXT */)
3567
+ ]),
3568
+ _: 2 /* DYNAMIC */
3569
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
3570
+ ]))
3571
+ }), 128 /* KEYED_FRAGMENT */))
3572
+ ], 2 /* CLASS */)
3573
+ ], 10 /* CLASS, PROPS */, _hoisted_4)
3543
3574
  ]))
3544
- }), 128 /* KEYED_FRAGMENT */))
3545
- ]),
3546
- createElementVNode("div", _hoisted_3, [
3575
+ : createCommentVNode("v-if", true),
3576
+ createElementVNode("div", _hoisted_5, [
3547
3577
  createVNode(_component_router_view, {
3548
3578
  currentTab: $data.currentTab,
3549
3579
  sharedData: $props.sharedData,
3550
3580
  tabCounts: $props.tabCounts
3551
3581
  }, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"])
3552
3582
  ])
3553
- ]))
3583
+ ], 64 /* STABLE_FRAGMENT */))
3554
3584
  }
3555
3585
 
3556
3586
  script.render = render;