@iankibetsh/shframework 1.2.5 → 1.2.7

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
@@ -169,7 +169,8 @@ const Toast = Swal__default["default"].mixin({
169
169
  }
170
170
  });
171
171
  function getShConfig(key = null,def = '') {
172
- const config = ShStorage.getItem('ShConfig');
172
+
173
+ const config = ShStorage.getItem('ShConfig') ?? {};
173
174
  if(key) {
174
175
  return config[key] ?? def
175
176
  }
@@ -369,6 +370,7 @@ if (process.env.NODE_ENV === 'production') {
369
370
  const axios = Axios__default["default"].create({
370
371
  baseURL: apiUrl
371
372
  });
373
+ window.shAxionInstance = axios;
372
374
  function doGet (endPoint, data) {
373
375
  updateSession();
374
376
  return axios.get(endPoint, {
@@ -1870,7 +1872,7 @@ const countries = [
1870
1872
  }
1871
1873
  ];
1872
1874
 
1873
- var script$g = {
1875
+ var script$h = {
1874
1876
  name: 'ShPhone',
1875
1877
  props: ['modelValue', 'country_code'],
1876
1878
  data () {
@@ -1975,10 +1977,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1975
1977
  ]))
1976
1978
  }
1977
1979
 
1978
- script$g.render = render$7;
1979
- script$g.__file = "src/lib/components/ShPhone.vue";
1980
+ script$h.render = render$7;
1981
+ script$h.__file = "src/lib/components/form-components/ShPhone.vue";
1980
1982
 
1981
- var script$f = {
1983
+ var script$g = {
1982
1984
  name: 'ShEditor',
1983
1985
  props: ['modelValue'],
1984
1986
  components: {
@@ -2052,8 +2054,8 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
2052
2054
  ], 64 /* STABLE_FRAGMENT */))
2053
2055
  }
2054
2056
 
2055
- script$f.render = render$6;
2056
- script$f.__file = "src/lib/components/FormComponent/ShEditor.vue";
2057
+ script$g.render = render$6;
2058
+ script$g.__file = "src/lib/components/form-components/ShEditor.vue";
2057
2059
 
2058
2060
  const _hoisted_1$d = {
2059
2061
  key: 0,
@@ -2062,8 +2064,8 @@ const _hoisted_1$d = {
2062
2064
  const _hoisted_2$a = ["id"];
2063
2065
  const _hoisted_3$9 = { class: "badge bg-secondary m-1 sh-selected-item" };
2064
2066
  const _hoisted_4$9 = ["onClick"];
2065
- const _hoisted_5$6 = ["id"];
2066
- const _hoisted_6$5 = ["id", "aria-labelledby"];
2067
+ const _hoisted_5$7 = ["id"];
2068
+ const _hoisted_6$6 = ["id", "aria-labelledby"];
2067
2069
  const _hoisted_7$4 = { key: 0 };
2068
2070
  const _hoisted_8$3 = ["onClick"];
2069
2071
  const _hoisted_9$4 = {
@@ -2076,7 +2078,7 @@ const _hoisted_10$3 = {
2076
2078
  };
2077
2079
 
2078
2080
 
2079
- var script$e = {
2081
+ var script$f = {
2080
2082
  __name: 'ShSuggest',
2081
2083
  props: ['fillSelects','modelValue'],
2082
2084
  emits: ['update:modelValue'],
@@ -2183,7 +2185,7 @@ return (_ctx, _cache) => {
2183
2185
  onClick: filterData,
2184
2186
  onInput: filterData,
2185
2187
  class: "flex-fill h-100 sh-suggestion-input"
2186
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$6)
2188
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
2187
2189
  ], 8 /* PROPS */, _hoisted_2$a),
2188
2190
  vue.createElementVNode("ul", {
2189
2191
  class: "dropdown-menu w-100",
@@ -2209,7 +2211,7 @@ return (_ctx, _cache) => {
2209
2211
  : (vue.unref(searchText))
2210
2212
  ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$4, " No results found "))
2211
2213
  : (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$3, " Type to search... "))
2212
- ], 8 /* PROPS */, _hoisted_6$5)
2214
+ ], 8 /* PROPS */, _hoisted_6$6)
2213
2215
  ]))
2214
2216
  : vue.createCommentVNode("v-if", true)
2215
2217
  }
@@ -2217,15 +2219,15 @@ return (_ctx, _cache) => {
2217
2219
 
2218
2220
  };
2219
2221
 
2220
- script$e.__scopeId = "data-v-5b767123";
2221
- script$e.__file = "src/lib/components/FormComponent/ShSuggest.vue";
2222
+ script$f.__scopeId = "data-v-71cc9569";
2223
+ script$f.__file = "src/lib/components/form-components/ShSuggest.vue";
2222
2224
 
2223
- var script$d = {
2225
+ var script$e = {
2224
2226
  name: 'ShForm',
2225
2227
  components: {
2226
- ShSuggest: script$e,
2227
- ShEditor: script$f,
2228
- ShPhone: script$g
2228
+ ShSuggest: script$f,
2229
+ ShEditor: script$g,
2230
+ ShPhone: script$h
2229
2231
  },
2230
2232
  props: [
2231
2233
  'action',
@@ -2554,8 +2556,8 @@ const _hoisted_3$8 = {
2554
2556
  role: "alert"
2555
2557
  };
2556
2558
  const _hoisted_4$8 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2557
- const _hoisted_5$5 = { key: 0 };
2558
- const _hoisted_6$4 = { key: 1 };
2559
+ const _hoisted_5$6 = { key: 0 };
2560
+ const _hoisted_6$5 = { key: 1 };
2559
2561
  const _hoisted_7$3 = { class: "row" };
2560
2562
  const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2561
2563
  const _hoisted_9$3 = { class: "col-md-12" };
@@ -2613,8 +2615,8 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2613
2615
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
2614
2616
  _hoisted_4$8,
2615
2617
  (_ctx.errorText)
2616
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$5, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2617
- : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
2618
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$6, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2619
+ : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, "Unexpected Error Occurred")),
2618
2620
  vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2619
2621
  ]))
2620
2622
  : vue.createCommentVNode("v-if", true),
@@ -2822,13 +2824,13 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2822
2824
  ], 64 /* STABLE_FRAGMENT */))
2823
2825
  }
2824
2826
 
2825
- script$d.render = render$5;
2826
- script$d.__file = "src/lib/components/ShForm.vue";
2827
+ script$e.render = render$5;
2828
+ script$e.__file = "src/lib/components/ShForm.vue";
2827
2829
 
2828
2830
  const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
2829
2831
  const _hoisted_2$8 = { class: "dropdown" };
2830
2832
 
2831
- var script$c = {
2833
+ var script$d = {
2832
2834
  __name: 'ShDropDownForm',
2833
2835
  props: ['action',
2834
2836
  'classes',
@@ -2875,7 +2877,7 @@ return (_ctx, _cache) => {
2875
2877
  class: "dropdown-menu px-2 py-1",
2876
2878
  "aria-labelledby": dropdownId
2877
2879
  }, [
2878
- vue.createVNode(script$d, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
2880
+ vue.createVNode(script$e, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
2879
2881
  ])
2880
2882
  ])
2881
2883
  ], 64 /* STABLE_FRAGMENT */))
@@ -2884,9 +2886,9 @@ return (_ctx, _cache) => {
2884
2886
 
2885
2887
  };
2886
2888
 
2887
- script$c.__file = "src/lib/components/ShDropDownForm.vue";
2889
+ script$d.__file = "src/lib/components/ShDropDownForm.vue";
2888
2890
 
2889
- var script$b = {
2891
+ var script$c = {
2890
2892
  name: 'ShModal',
2891
2893
  props: ['modalTitle', 'modalId', 'modalSize'],
2892
2894
  components: {
@@ -2897,12 +2899,12 @@ const _hoisted_1$a = ["id"];
2897
2899
  const _hoisted_2$7 = { class: "modal-content" };
2898
2900
  const _hoisted_3$7 = { class: "modal-header" };
2899
2901
  const _hoisted_4$7 = { class: "modal-title" };
2900
- const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("button", {
2902
+ const _hoisted_5$5 = /*#__PURE__*/vue.createElementVNode("button", {
2901
2903
  class: "btn btn-danger btn-sm",
2902
2904
  "data-bs-dismiss": "modal",
2903
2905
  "data-dismiss": "modal"
2904
2906
  }, "×", -1 /* HOISTED */);
2905
- const _hoisted_6$3 = { class: "modal-body" };
2907
+ const _hoisted_6$4 = { class: "modal-body" };
2906
2908
  const _hoisted_7$2 = { class: "section" };
2907
2909
 
2908
2910
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
@@ -2917,9 +2919,9 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2917
2919
  vue.createElementVNode("div", _hoisted_2$7, [
2918
2920
  vue.createElementVNode("div", _hoisted_3$7, [
2919
2921
  vue.createElementVNode("h3", _hoisted_4$7, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
2920
- _hoisted_5$4
2922
+ _hoisted_5$5
2921
2923
  ]),
2922
- vue.createElementVNode("div", _hoisted_6$3, [
2924
+ vue.createElementVNode("div", _hoisted_6$4, [
2923
2925
  vue.createElementVNode("div", _hoisted_7$2, [
2924
2926
  vue.renderSlot(_ctx.$slots, "default")
2925
2927
  ])
@@ -2929,12 +2931,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2929
2931
  ], 8 /* PROPS */, _hoisted_1$a))
2930
2932
  }
2931
2933
 
2932
- script$b.render = render$4;
2933
- script$b.__file = "src/lib/components/ShModal.vue";
2934
+ script$c.render = render$4;
2935
+ script$c.__file = "src/lib/components/ShModal.vue";
2934
2936
 
2935
2937
  const _hoisted_1$9 = ["href"];
2936
2938
 
2937
- var script$a = {
2939
+ var script$b = {
2938
2940
  __name: 'ShModalForm',
2939
2941
  props: ['action',
2940
2942
  'classes',
@@ -2974,12 +2976,12 @@ return (_ctx, _cache) => {
2974
2976
  }, [
2975
2977
  vue.renderSlot(_ctx.$slots, "default")
2976
2978
  ], 10 /* CLASS, PROPS */, _hoisted_1$9),
2977
- vue.createVNode(script$b, {
2979
+ vue.createVNode(script$c, {
2978
2980
  "modal-id": modalId,
2979
2981
  "modal-title": __props.modalTitle
2980
2982
  }, {
2981
2983
  default: vue.withCtx(() => [
2982
- vue.createVNode(script$d, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
2984
+ vue.createVNode(script$e, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
2983
2985
  ]),
2984
2986
  _: 1 /* STABLE */
2985
2987
  }, 8 /* PROPS */, ["modal-title"])
@@ -2989,9 +2991,9 @@ return (_ctx, _cache) => {
2989
2991
 
2990
2992
  };
2991
2993
 
2992
- script$a.__file = "src/lib/components/ShModalForm.vue";
2994
+ script$b.__file = "src/lib/components/ShModalForm.vue";
2993
2995
 
2994
- var script$9 = {
2996
+ var script$a = {
2995
2997
  name: 'ShCanvas',
2996
2998
  props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
2997
2999
  components: {
@@ -3041,10 +3043,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3041
3043
  ], 10 /* CLASS, PROPS */, _hoisted_1$8))
3042
3044
  }
3043
3045
 
3044
- script$9.render = render$3;
3045
- script$9.__file = "src/lib/components/ShCanvas.vue";
3046
+ script$a.render = render$3;
3047
+ script$a.__file = "src/lib/components/ShCanvas.vue";
3046
3048
 
3047
- var script$8 = {
3049
+ var script$9 = {
3048
3050
  name: 'Pagination',
3049
3051
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
3050
3052
  data () {
@@ -3233,8 +3235,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3233
3235
  ]))
3234
3236
  }
3235
3237
 
3236
- script$8.render = render$2;
3237
- script$8.__file = "src/lib/components/list_templates/Pagination.vue";
3238
+ script$9.render = render$2;
3239
+ script$9.__file = "src/lib/components/list_templates/Pagination.vue";
3238
3240
 
3239
3241
  const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
3240
3242
  class: "spinner-border spinner-border-sm me-1",
@@ -3243,7 +3245,7 @@ const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
3243
3245
  }, null, -1 /* HOISTED */);
3244
3246
 
3245
3247
 
3246
- var script$7 = {
3248
+ var script$8 = {
3247
3249
  __name: 'ShConfirmAction',
3248
3250
  props: {
3249
3251
  data: Object,
@@ -3329,7 +3331,7 @@ return (_ctx, _cache) => {
3329
3331
 
3330
3332
  };
3331
3333
 
3332
- script$7.__file = "src/lib/components/ShConfirmAction.vue";
3334
+ script$8.__file = "src/lib/components/ShConfirmAction.vue";
3333
3335
 
3334
3336
  const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
3335
3337
  class: "spinner-border spinner-border-sm me-1",
@@ -3337,7 +3339,7 @@ const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
3337
3339
  "aria-hidden": "true"
3338
3340
  }, null, -1 /* HOISTED */);
3339
3341
 
3340
- var script$6 = {
3342
+ var script$7 = {
3341
3343
  __name: 'ShSilentAction',
3342
3344
  props: {
3343
3345
  data: Object,
@@ -3425,9 +3427,9 @@ return (_ctx, _cache) => {
3425
3427
 
3426
3428
  };
3427
3429
 
3428
- script$6.__file = "src/lib/components/ShSilentAction.vue";
3430
+ script$7.__file = "src/lib/components/ShSilentAction.vue";
3429
3431
 
3430
- var script$5 = {
3432
+ var script$6 = {
3431
3433
  name: 'sh-table',
3432
3434
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
3433
3435
  inject: ['channel'],
@@ -3659,10 +3661,10 @@ var script$5 = {
3659
3661
  this.reloadData();
3660
3662
  },
3661
3663
  components: {
3662
- ShSilentAction: script$6,
3663
- ShConfirmAction: script$7,
3664
- ShCanvas: script$9,
3665
- pagination: script$8
3664
+ ShSilentAction: script$7,
3665
+ ShConfirmAction: script$8,
3666
+ ShCanvas: script$a,
3667
+ pagination: script$9
3666
3668
  },
3667
3669
  computed: {
3668
3670
  windowWidth: function () {
@@ -3687,12 +3689,12 @@ const _hoisted_2$4 = {
3687
3689
  };
3688
3690
  const _hoisted_3$4 = ["disabled"];
3689
3691
  const _hoisted_4$4 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3690
- const _hoisted_5$3 = /*#__PURE__*/vue.createElementVNode("span", {
3692
+ const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("span", {
3691
3693
  class: "spinner-border spinner-border-sm",
3692
3694
  role: "status",
3693
3695
  "aria-hidden": "true"
3694
3696
  }, null, -1 /* HOISTED */);
3695
- const _hoisted_6$2 = /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
3697
+ const _hoisted_6$3 = /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
3696
3698
  const _hoisted_7$1 = {
3697
3699
  key: 1,
3698
3700
  class: "row"
@@ -3856,8 +3858,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3856
3858
  vue.createTextVNode(" Export ")
3857
3859
  ], 64 /* STABLE_FRAGMENT */))
3858
3860
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3859
- _hoisted_5$3,
3860
- _hoisted_6$2
3861
+ _hoisted_5$4,
3862
+ _hoisted_6$3
3861
3863
  ], 64 /* STABLE_FRAGMENT */))
3862
3864
  ], 8 /* PROPS */, _hoisted_3$4)
3863
3865
  ]))
@@ -3897,122 +3899,289 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3897
3899
  }), 128 /* KEYED_FRAGMENT */))
3898
3900
  : vue.createCommentVNode("v-if", true)
3899
3901
  ], 64 /* STABLE_FRAGMENT */))
3900
- : vue.createCommentVNode("v-if", true),
3901
- ($options.hasRecordsSlot)
3902
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
3903
- ($data.loading === 'loading')
3904
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, _hoisted_18))
3905
- : ($data.loading === 'error')
3906
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
3907
- vue.createElementVNode("span", _hoisted_20, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
3908
- ]))
3909
- : vue.createCommentVNode("v-if", true),
3910
- ($data.loading === 'done')
3911
- ? vue.renderSlot(_ctx.$slots, "records", {
3912
- key: 2,
3913
- records: $data.records
3914
- })
3915
- : vue.createCommentVNode("v-if", true)
3916
- ], 64 /* STABLE_FRAGMENT */))
3917
- : ($options.windowWidth > 700)
3918
- ? (vue.openBlock(), vue.createElementBlock("table", {
3919
- key: 4,
3920
- class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
3921
- }, [
3922
- vue.createElementVNode("thead", _hoisted_21, [
3923
- vue.createElementVNode("tr", null, [
3924
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (title) => {
3925
- return (vue.openBlock(), vue.createElementBlock("th", {
3926
- key: title[0]
3927
- }, [
3928
- (typeof title === 'string')
3929
- ? (vue.openBlock(), vue.createElementBlock("a", {
3930
- key: 0,
3931
- class: "text-capitalize",
3932
- onClick: $event => ($options.changeKey('order_by',title))
3933
- }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
3934
- : (typeof title === 'function')
3902
+ : ($options.hasRecordsSlot)
3903
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
3904
+ ($data.loading === 'loading')
3905
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, _hoisted_18))
3906
+ : ($data.loading === 'error')
3907
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
3908
+ vue.createElementVNode("span", _hoisted_20, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
3909
+ ]))
3910
+ : vue.createCommentVNode("v-if", true),
3911
+ ($data.loading === 'done')
3912
+ ? vue.renderSlot(_ctx.$slots, "records", {
3913
+ key: 2,
3914
+ records: $data.records
3915
+ })
3916
+ : vue.createCommentVNode("v-if", true)
3917
+ ], 64 /* STABLE_FRAGMENT */))
3918
+ : ($options.windowWidth > 700)
3919
+ ? (vue.openBlock(), vue.createElementBlock("table", {
3920
+ key: 4,
3921
+ class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
3922
+ }, [
3923
+ vue.createElementVNode("thead", _hoisted_21, [
3924
+ vue.createElementVNode("tr", null, [
3925
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (title) => {
3926
+ return (vue.openBlock(), vue.createElementBlock("th", {
3927
+ key: title[0]
3928
+ }, [
3929
+ (typeof title === 'string')
3935
3930
  ? (vue.openBlock(), vue.createElementBlock("a", {
3936
- key: 1,
3931
+ key: 0,
3937
3932
  class: "text-capitalize",
3938
3933
  onClick: $event => ($options.changeKey('order_by',title))
3939
- }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
3940
- : (vue.openBlock(), vue.createElementBlock("a", {
3941
- key: 2,
3942
- class: "text-capitalize",
3943
- onClick: $event => ($options.changeKey('order_by',title[0]))
3944
- }, vue.toDisplayString(title[1].replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
3945
- ]))
3946
- }), 128 /* KEYED_FRAGMENT */)),
3947
- ($props.actions)
3948
- ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_25, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
3949
- : vue.createCommentVNode("v-if", true)
3950
- ])
3951
- ]),
3952
- vue.createElementVNode("tbody", _hoisted_26, [
3953
- ($data.loading === 'loading')
3954
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_27, [
3955
- vue.createElementVNode("td", {
3956
- colspan: $props.headers.length
3957
- }, _hoisted_30, 8 /* PROPS */, _hoisted_28)
3958
- ]))
3959
- : ($data.loading === 'error')
3960
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_31, [
3934
+ }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
3935
+ : (typeof title === 'function')
3936
+ ? (vue.openBlock(), vue.createElementBlock("a", {
3937
+ key: 1,
3938
+ class: "text-capitalize",
3939
+ onClick: $event => ($options.changeKey('order_by',title))
3940
+ }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
3941
+ : (vue.openBlock(), vue.createElementBlock("a", {
3942
+ key: 2,
3943
+ class: "text-capitalize",
3944
+ onClick: $event => ($options.changeKey('order_by',title[0]))
3945
+ }, vue.toDisplayString(title[1].replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
3946
+ ]))
3947
+ }), 128 /* KEYED_FRAGMENT */)),
3948
+ ($props.actions)
3949
+ ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_25, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
3950
+ : vue.createCommentVNode("v-if", true)
3951
+ ])
3952
+ ]),
3953
+ vue.createElementVNode("tbody", _hoisted_26, [
3954
+ ($data.loading === 'loading')
3955
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_27, [
3961
3956
  vue.createElementVNode("td", {
3962
3957
  colspan: $props.headers.length
3963
- }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_32)
3958
+ }, _hoisted_30, 8 /* PROPS */, _hoisted_28)
3964
3959
  ]))
3965
- : ($data.records.length === 0)
3966
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
3960
+ : ($data.loading === 'error')
3961
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_31, [
3967
3962
  vue.createElementVNode("td", {
3968
- colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
3969
- }, [
3970
- _hoisted_35,
3971
- vue.createTextVNode(" No records found ")
3972
- ], 8 /* PROPS */, _hoisted_34)
3963
+ colspan: $props.headers.length
3964
+ }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_32)
3973
3965
  ]))
3974
- : ($data.loading === 'done')
3975
- ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
3976
- return (vue.openBlock(), vue.createElementBlock("tr", {
3966
+ : ($data.records.length === 0)
3967
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
3968
+ vue.createElementVNode("td", {
3969
+ colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
3970
+ }, [
3971
+ _hoisted_35,
3972
+ vue.createTextVNode(" No records found ")
3973
+ ], 8 /* PROPS */, _hoisted_34)
3974
+ ]))
3975
+ : ($data.loading === 'done')
3976
+ ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
3977
+ return (vue.openBlock(), vue.createElementBlock("tr", {
3978
+ key: record.id,
3979
+ class: vue.normalizeClass(record.class),
3980
+ onClick: $event => ($options.rowSelected(record))
3981
+ }, [
3982
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
3983
+ return (vue.openBlock(), vue.createElementBlock("td", {
3984
+ key: key[0]
3985
+ }, [
3986
+ (typeof key === 'string' && $props.links && $props.links[key])
3987
+ ? (vue.openBlock(), vue.createBlock(_component_router_link, {
3988
+ key: 0,
3989
+ to: $options.replaceLinkUrl($props.links[key],record),
3990
+ class: vue.normalizeClass($options.getLinkClass($props.links[key])),
3991
+ innerHTML: record[key]
3992
+ }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3993
+ : ($options.getFieldType(key) === 'numeric')
3994
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_37, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3995
+ : ($options.getFieldType(key) === 'money')
3996
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_38, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3997
+ : ($options.getFieldType(key) === 'date')
3998
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3999
+ : (typeof key === 'string')
4000
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4001
+ key: 4,
4002
+ innerHTML: record[key]
4003
+ }, null, 8 /* PROPS */, _hoisted_40))
4004
+ : (typeof key === 'function')
4005
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4006
+ key: 5,
4007
+ innerHTML: key(record, index)
4008
+ }, null, 8 /* PROPS */, _hoisted_41))
4009
+ : (vue.openBlock(), vue.createElementBlock("span", {
4010
+ key: 6,
4011
+ innerHTML: record[key[0]]
4012
+ }, null, 8 /* PROPS */, _hoisted_42))
4013
+ ]))
4014
+ }), 128 /* KEYED_FRAGMENT */)),
4015
+ ($props.actions)
4016
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_43, [
4017
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
4018
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4019
+ key: act.path
4020
+ }, [
4021
+ (!act.permission || $options.user.isAllowedTo(act.permission))
4022
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4023
+ (!act.validator || act.validator(record))
4024
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4025
+ (act.type === 'confirmAction')
4026
+ ? (vue.openBlock(), vue.createBlock(_component_sh_confirm_action, {
4027
+ key: 0,
4028
+ onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
4029
+ onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
4030
+ onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
4031
+ "loading-message": act.label,
4032
+ class: vue.normalizeClass(act.class),
4033
+ url: $options.replaceActionUrl(act.url,record)
4034
+ }, {
4035
+ default: vue.withCtx(() => [
4036
+ (act.icon)
4037
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4038
+ key: 0,
4039
+ class: vue.normalizeClass(act.icon)
4040
+ }, null, 2 /* CLASS */))
4041
+ : vue.createCommentVNode("v-if", true),
4042
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4043
+ ]),
4044
+ _: 2 /* DYNAMIC */
4045
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4046
+ : (act.type === 'silentAction')
4047
+ ? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
4048
+ key: 1,
4049
+ onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
4050
+ onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
4051
+ onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
4052
+ "loading-message": act.label,
4053
+ class: vue.normalizeClass(act.class),
4054
+ url: $options.replaceActionUrl(act.url,record)
4055
+ }, {
4056
+ default: vue.withCtx(() => [
4057
+ (act.icon)
4058
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4059
+ key: 0,
4060
+ class: vue.normalizeClass(act.icon)
4061
+ }, null, 2 /* CLASS */))
4062
+ : vue.createCommentVNode("v-if", true),
4063
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4064
+ ]),
4065
+ _: 2 /* DYNAMIC */
4066
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4067
+ : (act.canvasId || act.type === 'offcanvas')
4068
+ ? (vue.openBlock(), vue.createElementBlock("a", {
4069
+ key: 2,
4070
+ href: '#' + act.canvasId,
4071
+ "data-bs-toggle": "offcanvas",
4072
+ class: vue.normalizeClass(act.class)
4073
+ }, [
4074
+ (act.icon)
4075
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4076
+ key: 0,
4077
+ class: vue.normalizeClass(act.icon)
4078
+ }, null, 2 /* CLASS */))
4079
+ : vue.createCommentVNode("v-if", true),
4080
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4081
+ ], 10 /* CLASS, PROPS */, _hoisted_44))
4082
+ : (act.emits)
4083
+ ? (vue.openBlock(), vue.createElementBlock("button", {
4084
+ key: 3,
4085
+ title: act.title,
4086
+ class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
4087
+ onClick: $event => ($options.doEmitAction(act.emits,record))
4088
+ }, [
4089
+ (act.icon)
4090
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4091
+ key: 0,
4092
+ class: vue.normalizeClass(act.icon)
4093
+ }, null, 2 /* CLASS */))
4094
+ : vue.createCommentVNode("v-if", true),
4095
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4096
+ ], 10 /* CLASS, PROPS */, _hoisted_45))
4097
+ : (!act.emits)
4098
+ ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4099
+ key: 4,
4100
+ title: act.title,
4101
+ to: $options.replaceActionUrl(act.path,record),
4102
+ class: vue.normalizeClass(act.class)
4103
+ }, {
4104
+ default: vue.withCtx(() => [
4105
+ (act.icon)
4106
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4107
+ key: 0,
4108
+ class: vue.normalizeClass(act.icon)
4109
+ }, null, 2 /* CLASS */))
4110
+ : vue.createCommentVNode("v-if", true),
4111
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4112
+ ]),
4113
+ _: 2 /* DYNAMIC */
4114
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
4115
+ : vue.createCommentVNode("v-if", true)
4116
+ ], 64 /* STABLE_FRAGMENT */))
4117
+ : vue.createCommentVNode("v-if", true)
4118
+ ], 64 /* STABLE_FRAGMENT */))
4119
+ : vue.createCommentVNode("v-if", true)
4120
+ ], 64 /* STABLE_FRAGMENT */))
4121
+ }), 128 /* KEYED_FRAGMENT */))
4122
+ ]))
4123
+ : vue.createCommentVNode("v-if", true)
4124
+ ], 10 /* CLASS, PROPS */, _hoisted_36))
4125
+ }), 128 /* KEYED_FRAGMENT */))
4126
+ : vue.createCommentVNode("v-if", true)
4127
+ ])
4128
+ ], 2 /* CLASS */))
4129
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, [
4130
+ ($data.loading === 'loading')
4131
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, _hoisted_49))
4132
+ : ($data.loading === 'error')
4133
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
4134
+ vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4135
+ ]))
4136
+ : ($data.loading === 'done')
4137
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
4138
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
4139
+ return (vue.openBlock(), vue.createElementBlock("div", {
3977
4140
  key: record.id,
3978
- class: vue.normalizeClass(record.class),
4141
+ class: "single-mobile-req bg-light p-3",
3979
4142
  onClick: $event => ($options.rowSelected(record))
3980
4143
  }, [
3981
4144
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
3982
- return (vue.openBlock(), vue.createElementBlock("td", {
4145
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3983
4146
  key: key[0]
3984
4147
  }, [
3985
- (typeof key === 'string' && $props.links && $props.links[key])
3986
- ? (vue.openBlock(), vue.createBlock(_component_router_link, {
3987
- key: 0,
3988
- to: $options.replaceLinkUrl($props.links[key],record),
3989
- class: vue.normalizeClass($options.getLinkClass($props.links[key])),
3990
- innerHTML: record[key]
3991
- }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
3992
- : ($options.getFieldType(key) === 'numeric')
3993
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_37, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3994
- : ($options.getFieldType(key) === 'money')
3995
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_38, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
3996
- : ($options.getFieldType(key) === 'date')
3997
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
3998
- : (typeof key === 'string')
4148
+ (typeof key === 'string' )
4149
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_53, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
4150
+ : (typeof key === 'function')
4151
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
4152
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
4153
+ vue.createElementVNode("span", null, [
4154
+ (typeof key === 'string' && $props.links && $props.links[key])
4155
+ ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4156
+ key: 0,
4157
+ to: $options.replaceLinkUrl($props.links[key],record),
4158
+ class: vue.normalizeClass($options.getLinkClass($props.links[key])),
4159
+ innerHTML: record[key]
4160
+ }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
4161
+ : ($options.getFieldType(key) === 'numeric')
4162
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_56, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4163
+ : ($options.getFieldType(key) === 'money')
4164
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4165
+ : (typeof key === 'string')
3999
4166
  ? (vue.openBlock(), vue.createElementBlock("span", {
4000
- key: 4,
4167
+ key: 3,
4001
4168
  innerHTML: record[key]
4002
- }, null, 8 /* PROPS */, _hoisted_40))
4169
+ }, null, 8 /* PROPS */, _hoisted_58))
4003
4170
  : (typeof key === 'function')
4004
4171
  ? (vue.openBlock(), vue.createElementBlock("span", {
4005
- key: 5,
4006
- innerHTML: key(record, index)
4007
- }, null, 8 /* PROPS */, _hoisted_41))
4172
+ key: 4,
4173
+ innerHTML: key(record, index )
4174
+ }, null, 8 /* PROPS */, _hoisted_59))
4008
4175
  : (vue.openBlock(), vue.createElementBlock("span", {
4009
- key: 6,
4176
+ key: 5,
4010
4177
  innerHTML: record[key[0]]
4011
- }, null, 8 /* PROPS */, _hoisted_42))
4012
- ]))
4178
+ }, null, 8 /* PROPS */, _hoisted_60))
4179
+ ]),
4180
+ _hoisted_61
4181
+ ], 64 /* STABLE_FRAGMENT */))
4013
4182
  }), 128 /* KEYED_FRAGMENT */)),
4014
4183
  ($props.actions)
4015
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_43, [
4184
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_62, [
4016
4185
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
4017
4186
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4018
4187
  key: act.path
@@ -4021,17 +4190,28 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4021
4190
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4022
4191
  (!act.validator || act.validator(record))
4023
4192
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4024
- (act.type === 'confirmAction')
4025
- ? (vue.openBlock(), vue.createBlock(_component_sh_confirm_action, {
4193
+ (act.canvasId)
4194
+ ? (vue.openBlock(), vue.createElementBlock("a", {
4026
4195
  key: 0,
4027
- onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
4028
- onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
4029
- onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
4030
- "loading-message": act.label,
4031
- class: vue.normalizeClass(act.class),
4032
- url: $options.replaceActionUrl(act.url,record)
4033
- }, {
4034
- default: vue.withCtx(() => [
4196
+ href: '#' + act.canvasId,
4197
+ "data-bs-toggle": "offcanvas",
4198
+ class: vue.normalizeClass(act.class)
4199
+ }, [
4200
+ (act.icon)
4201
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4202
+ key: 0,
4203
+ class: vue.normalizeClass(act.icon)
4204
+ }, null, 2 /* CLASS */))
4205
+ : vue.createCommentVNode("v-if", true),
4206
+ vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4207
+ ], 10 /* CLASS, PROPS */, _hoisted_63))
4208
+ : (act.emits)
4209
+ ? (vue.openBlock(), vue.createElementBlock("button", {
4210
+ key: 1,
4211
+ title: act.title,
4212
+ class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
4213
+ onClick: $event => ($options.doEmitAction(act.emits,record))
4214
+ }, [
4035
4215
  (act.icon)
4036
4216
  ? (vue.openBlock(), vue.createElementBlock("span", {
4037
4217
  key: 0,
@@ -4039,52 +4219,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4039
4219
  }, null, 2 /* CLASS */))
4040
4220
  : vue.createCommentVNode("v-if", true),
4041
4221
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4042
- ]),
4043
- _: 2 /* DYNAMIC */
4044
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4045
- : (act.type === 'silentAction')
4046
- ? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
4047
- key: 1,
4048
- onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
4049
- onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
4050
- onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
4051
- "loading-message": act.label,
4052
- class: vue.normalizeClass(act.class),
4053
- url: $options.replaceActionUrl(act.url,record)
4054
- }, {
4055
- default: vue.withCtx(() => [
4056
- (act.icon)
4057
- ? (vue.openBlock(), vue.createElementBlock("span", {
4058
- key: 0,
4059
- class: vue.normalizeClass(act.icon)
4060
- }, null, 2 /* CLASS */))
4061
- : vue.createCommentVNode("v-if", true),
4062
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4063
- ]),
4064
- _: 2 /* DYNAMIC */
4065
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4066
- : (act.canvasId || act.type === 'offcanvas')
4067
- ? (vue.openBlock(), vue.createElementBlock("a", {
4222
+ ], 10 /* CLASS, PROPS */, _hoisted_64))
4223
+ : (!act.emits)
4224
+ ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4068
4225
  key: 2,
4069
- href: '#' + act.canvasId,
4070
- "data-bs-toggle": "offcanvas",
4226
+ title: act.title,
4227
+ to: $options.replaceActionUrl(act.path,record),
4071
4228
  class: vue.normalizeClass(act.class)
4072
- }, [
4073
- (act.icon)
4074
- ? (vue.openBlock(), vue.createElementBlock("span", {
4075
- key: 0,
4076
- class: vue.normalizeClass(act.icon)
4077
- }, null, 2 /* CLASS */))
4078
- : vue.createCommentVNode("v-if", true),
4079
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4080
- ], 10 /* CLASS, PROPS */, _hoisted_44))
4081
- : (act.emits)
4082
- ? (vue.openBlock(), vue.createElementBlock("button", {
4083
- key: 3,
4084
- title: act.title,
4085
- class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
4086
- onClick: $event => ($options.doEmitAction(act.emits,record))
4087
- }, [
4229
+ }, {
4230
+ default: vue.withCtx(() => [
4088
4231
  (act.icon)
4089
4232
  ? (vue.openBlock(), vue.createElementBlock("span", {
4090
4233
  key: 0,
@@ -4092,26 +4235,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4092
4235
  }, null, 2 /* CLASS */))
4093
4236
  : vue.createCommentVNode("v-if", true),
4094
4237
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4095
- ], 10 /* CLASS, PROPS */, _hoisted_45))
4096
- : (!act.emits)
4097
- ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4098
- key: 4,
4099
- title: act.title,
4100
- to: $options.replaceActionUrl(act.path,record),
4101
- class: vue.normalizeClass(act.class)
4102
- }, {
4103
- default: vue.withCtx(() => [
4104
- (act.icon)
4105
- ? (vue.openBlock(), vue.createElementBlock("span", {
4106
- key: 0,
4107
- class: vue.normalizeClass(act.icon)
4108
- }, null, 2 /* CLASS */))
4109
- : vue.createCommentVNode("v-if", true),
4110
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4111
- ]),
4112
- _: 2 /* DYNAMIC */
4113
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
4114
- : vue.createCommentVNode("v-if", true)
4238
+ ]),
4239
+ _: 2 /* DYNAMIC */
4240
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
4241
+ : vue.createCommentVNode("v-if", true)
4115
4242
  ], 64 /* STABLE_FRAGMENT */))
4116
4243
  : vue.createCommentVNode("v-if", true)
4117
4244
  ], 64 /* STABLE_FRAGMENT */))
@@ -4120,137 +4247,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4120
4247
  }), 128 /* KEYED_FRAGMENT */))
4121
4248
  ]))
4122
4249
  : vue.createCommentVNode("v-if", true)
4123
- ], 10 /* CLASS, PROPS */, _hoisted_36))
4250
+ ], 8 /* PROPS */, _hoisted_52))
4124
4251
  }), 128 /* KEYED_FRAGMENT */))
4125
- : vue.createCommentVNode("v-if", true)
4126
- ])
4127
- ], 2 /* CLASS */))
4128
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, [
4129
- ($data.loading === 'loading')
4130
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, _hoisted_49))
4131
- : ($data.loading === 'error')
4132
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
4133
- vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4134
- ]))
4135
- : ($data.loading === 'done')
4136
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
4137
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
4138
- return (vue.openBlock(), vue.createElementBlock("div", {
4139
- key: record.id,
4140
- class: "single-mobile-req bg-light p-3",
4141
- onClick: $event => ($options.rowSelected(record))
4142
- }, [
4143
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
4144
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4145
- key: key[0]
4146
- }, [
4147
- (typeof key === 'string' )
4148
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_53, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
4149
- : (typeof key === 'function')
4150
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
4151
- : (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
4152
- vue.createElementVNode("span", null, [
4153
- (typeof key === 'string' && $props.links && $props.links[key])
4154
- ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4155
- key: 0,
4156
- to: $options.replaceLinkUrl($props.links[key],record),
4157
- class: vue.normalizeClass($options.getLinkClass($props.links[key])),
4158
- innerHTML: record[key]
4159
- }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
4160
- : ($options.getFieldType(key) === 'numeric')
4161
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_56, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4162
- : ($options.getFieldType(key) === 'money')
4163
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4164
- : (typeof key === 'string')
4165
- ? (vue.openBlock(), vue.createElementBlock("span", {
4166
- key: 3,
4167
- innerHTML: record[key]
4168
- }, null, 8 /* PROPS */, _hoisted_58))
4169
- : (typeof key === 'function')
4170
- ? (vue.openBlock(), vue.createElementBlock("span", {
4171
- key: 4,
4172
- innerHTML: key(record, index )
4173
- }, null, 8 /* PROPS */, _hoisted_59))
4174
- : (vue.openBlock(), vue.createElementBlock("span", {
4175
- key: 5,
4176
- innerHTML: record[key[0]]
4177
- }, null, 8 /* PROPS */, _hoisted_60))
4178
- ]),
4179
- _hoisted_61
4180
- ], 64 /* STABLE_FRAGMENT */))
4181
- }), 128 /* KEYED_FRAGMENT */)),
4182
- ($props.actions)
4183
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_62, [
4184
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
4185
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4186
- key: act.path
4187
- }, [
4188
- (!act.permission || $options.user.isAllowedTo(act.permission))
4189
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4190
- (!act.validator || act.validator(record))
4191
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4192
- (act.canvasId)
4193
- ? (vue.openBlock(), vue.createElementBlock("a", {
4194
- key: 0,
4195
- href: '#' + act.canvasId,
4196
- "data-bs-toggle": "offcanvas",
4197
- class: vue.normalizeClass(act.class)
4198
- }, [
4199
- (act.icon)
4200
- ? (vue.openBlock(), vue.createElementBlock("span", {
4201
- key: 0,
4202
- class: vue.normalizeClass(act.icon)
4203
- }, null, 2 /* CLASS */))
4204
- : vue.createCommentVNode("v-if", true),
4205
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4206
- ], 10 /* CLASS, PROPS */, _hoisted_63))
4207
- : (act.emits)
4208
- ? (vue.openBlock(), vue.createElementBlock("button", {
4209
- key: 1,
4210
- title: act.title,
4211
- class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
4212
- onClick: $event => ($options.doEmitAction(act.emits,record))
4213
- }, [
4214
- (act.icon)
4215
- ? (vue.openBlock(), vue.createElementBlock("span", {
4216
- key: 0,
4217
- class: vue.normalizeClass(act.icon)
4218
- }, null, 2 /* CLASS */))
4219
- : vue.createCommentVNode("v-if", true),
4220
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4221
- ], 10 /* CLASS, PROPS */, _hoisted_64))
4222
- : (!act.emits)
4223
- ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4224
- key: 2,
4225
- title: act.title,
4226
- to: $options.replaceActionUrl(act.path,record),
4227
- class: vue.normalizeClass(act.class)
4228
- }, {
4229
- default: vue.withCtx(() => [
4230
- (act.icon)
4231
- ? (vue.openBlock(), vue.createElementBlock("span", {
4232
- key: 0,
4233
- class: vue.normalizeClass(act.icon)
4234
- }, null, 2 /* CLASS */))
4235
- : vue.createCommentVNode("v-if", true),
4236
- vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
4237
- ]),
4238
- _: 2 /* DYNAMIC */
4239
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
4240
- : vue.createCommentVNode("v-if", true)
4241
- ], 64 /* STABLE_FRAGMENT */))
4242
- : vue.createCommentVNode("v-if", true)
4243
- ], 64 /* STABLE_FRAGMENT */))
4244
- : vue.createCommentVNode("v-if", true)
4245
- ], 64 /* STABLE_FRAGMENT */))
4246
- }), 128 /* KEYED_FRAGMENT */))
4247
- ]))
4248
- : vue.createCommentVNode("v-if", true)
4249
- ], 8 /* PROPS */, _hoisted_52))
4250
- }), 128 /* KEYED_FRAGMENT */))
4251
- ]))
4252
- : vue.createCommentVNode("v-if", true)
4253
- ])),
4252
+ ]))
4253
+ : vue.createCommentVNode("v-if", true)
4254
+ ])),
4254
4255
  ($data.pagination_data)
4255
4256
  ? (vue.openBlock(), vue.createBlock(_component_pagination, {
4256
4257
  key: 6,
@@ -4293,10 +4294,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4293
4294
  ]))
4294
4295
  }
4295
4296
 
4296
- script$5.render = render$1;
4297
- script$5.__file = "src/lib/components/ShTable.vue";
4297
+ script$6.render = render$1;
4298
+ script$6.__file = "src/lib/components/ShTable.vue";
4298
4299
 
4299
- var script$4 = {
4300
+ var script$5 = {
4300
4301
  name: 'ShTabs',
4301
4302
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
4302
4303
  data () {
@@ -4417,8 +4418,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4417
4418
  ], 64 /* STABLE_FRAGMENT */))
4418
4419
  }
4419
4420
 
4420
- script$4.render = render;
4421
- script$4.__file = "src/lib/components/ShTabs.vue";
4421
+ script$5.render = render;
4422
+ script$5.__file = "src/lib/components/ShTabs.vue";
4422
4423
 
4423
4424
  const _hoisted_1$3 = {
4424
4425
  class: "nav nav-tabs",
@@ -4429,9 +4430,11 @@ const _hoisted_2$3 = {
4429
4430
  role: "presentation"
4430
4431
  };
4431
4432
  const _hoisted_3$3 = ["onClick"];
4432
- const _hoisted_4$3 = { class: "tab-content" };
4433
+ const _hoisted_4$3 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
4434
+ const _hoisted_5$3 = { class: "sh_tab_count" };
4435
+ const _hoisted_6$2 = { class: "tab-content" };
4433
4436
 
4434
- var script$3 = {
4437
+ var script$4 = {
4435
4438
  __name: 'ShDynamicTabs',
4436
4439
  props: ['tabs','data'],
4437
4440
  setup(__props) {
@@ -4462,11 +4465,19 @@ return (_ctx, _cache) => {
4462
4465
  vue.createElementVNode("button", {
4463
4466
  onClick: $event => (setTab(tab)),
4464
4467
  class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
4465
- }, vue.toDisplayString(tab.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_3$3)
4468
+ }, [
4469
+ vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
4470
+ (tab.count || tab.tabCount)
4471
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4472
+ _hoisted_4$3,
4473
+ vue.createElementVNode("sup", _hoisted_5$3, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
4474
+ ], 64 /* STABLE_FRAGMENT */))
4475
+ : vue.createCommentVNode("v-if", true)
4476
+ ], 10 /* CLASS, PROPS */, _hoisted_3$3)
4466
4477
  ]))
4467
4478
  }), 256 /* UNKEYED_FRAGMENT */))
4468
4479
  ]),
4469
- vue.createElementVNode("div", _hoisted_4$3, [
4480
+ vue.createElementVNode("div", _hoisted_6$2, [
4470
4481
  (vue.unref(currentTab))
4471
4482
  ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentTab).component), vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(currentTab))), null, 16 /* FULL_PROPS */))
4472
4483
  : vue.createCommentVNode("v-if", true)
@@ -4477,7 +4488,7 @@ return (_ctx, _cache) => {
4477
4488
 
4478
4489
  };
4479
4490
 
4480
- script$3.__file = "src/lib/components/ShDynamicTabs.vue";
4491
+ script$4.__file = "src/lib/components/ShDynamicTabs.vue";
4481
4492
 
4482
4493
  const useUserStore = pinia.defineStore('user-store', {
4483
4494
  state: () => ({
@@ -4587,7 +4598,7 @@ const _hoisted_4$2 = {
4587
4598
  const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4588
4599
 
4589
4600
 
4590
- var script$2 = {
4601
+ var script$3 = {
4591
4602
  __name: 'Departments',
4592
4603
  setup(__props) {
4593
4604
 
@@ -4617,7 +4628,7 @@ return (_ctx, _cache) => {
4617
4628
  _hoisted_5$2,
4618
4629
  vue.createTextVNode(" ADD DEPARTMENT")
4619
4630
  ], 512 /* NEED_PATCH */),
4620
- vue.createVNode(script$5, {
4631
+ vue.createVNode(script$6, {
4621
4632
  headers: ['id','name','description', 'created_at'],
4622
4633
  "end-point": "admin/departments/list",
4623
4634
  actions: {
@@ -4631,12 +4642,12 @@ return (_ctx, _cache) => {
4631
4642
  ]
4632
4643
  }
4633
4644
  }),
4634
- vue.createVNode(script$b, {
4645
+ vue.createVNode(script$c, {
4635
4646
  "modal-id": "sh-department_modal",
4636
4647
  "modal-title": "Department Form"
4637
4648
  }, {
4638
4649
  default: vue.withCtx(() => [
4639
- vue.createVNode(script$d, {
4650
+ vue.createVNode(script$e, {
4640
4651
  "success-callback": "departmentAdded",
4641
4652
  onDepartmentAdded: departmentAdded,
4642
4653
  action: "admin/departments/store",
@@ -4653,7 +4664,7 @@ return (_ctx, _cache) => {
4653
4664
 
4654
4665
  };
4655
4666
 
4656
- script$2.__file = "src/lib/components/core/Departments/Departments.vue";
4667
+ script$3.__file = "src/lib/components/core/Departments/Departments.vue";
4657
4668
 
4658
4669
  const _hoisted_1$1 = {
4659
4670
  key: 0,
@@ -4672,7 +4683,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
4672
4683
  const _hoisted_5$1 = ["value"];
4673
4684
  const _hoisted_6$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
4674
4685
 
4675
- var script$1 = {
4686
+ var script$2 = {
4676
4687
  __name: 'Department',
4677
4688
  setup(__props) {
4678
4689
 
@@ -4770,7 +4781,7 @@ return (_ctx, _cache) => {
4770
4781
  vue.createElementVNode("div", _hoisted_2$1, [
4771
4782
  _hoisted_3$1,
4772
4783
  vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
4773
- vue.createVNode(script$5, {
4784
+ vue.createVNode(script$6, {
4774
4785
  actions: {
4775
4786
  label: 'Actions',
4776
4787
  actions: [
@@ -4790,12 +4801,12 @@ return (_ctx, _cache) => {
4790
4801
  headers: ['id',showModule,'created_at'],
4791
4802
  "end-point": 'admin/departments/department/list-modules/' + id.value
4792
4803
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
4793
- vue.createVNode(script$b, {
4804
+ vue.createVNode(script$c, {
4794
4805
  "modal-id": "addModule",
4795
4806
  "modal-title": "Add Module Department"
4796
4807
  }, {
4797
4808
  default: vue.withCtx(() => [
4798
- vue.createVNode(script$d, {
4809
+ vue.createVNode(script$e, {
4799
4810
  "reload-select-items": vue.unref(reload),
4800
4811
  "success-callback": moduleAdded,
4801
4812
  "fill-selects": {
@@ -4817,7 +4828,7 @@ return (_ctx, _cache) => {
4817
4828
  ref: permissionCanvasBtn,
4818
4829
  "data-bs-toggle": "offcanvas"
4819
4830
  }, null, 512 /* NEED_PATCH */),
4820
- vue.createVNode(script$9, {
4831
+ vue.createVNode(script$a, {
4821
4832
  "canvas-id": "permissionsCanvas",
4822
4833
  position: "end enlarged",
4823
4834
  "canvas-title": "Module Permissions"
@@ -4865,7 +4876,7 @@ return (_ctx, _cache) => {
4865
4876
 
4866
4877
  };
4867
4878
 
4868
- script$1.__file = "src/lib/components/core/Departments/department/Department.vue";
4879
+ script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
4869
4880
 
4870
4881
  const _withScopeId = n => (vue.pushScopeId("data-v-2911509a"),n=n(),vue.popScopeId(),n);
4871
4882
  const _hoisted_1 = {
@@ -4893,7 +4904,7 @@ const _hoisted_8 = {
4893
4904
  };
4894
4905
  const _hoisted_9 = { class: "sh-auth-footer" };
4895
4906
 
4896
- var script = {
4907
+ var script$1 = {
4897
4908
  __name: 'ShAuth',
4898
4909
  setup(__props) {
4899
4910
 
@@ -4920,7 +4931,7 @@ vue.watch(user,(newUser) => {
4920
4931
  function loginSuccessful(res){
4921
4932
  userStore.setAccessToken(res.token);
4922
4933
  userStore.setUser();
4923
- router.push(redirectLogin);
4934
+ window.location.href = redirectLogin;
4924
4935
  }
4925
4936
 
4926
4937
  return (_ctx, _cache) => {
@@ -4932,7 +4943,7 @@ return (_ctx, _cache) => {
4932
4943
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
4933
4944
  (section.value === 'login')
4934
4945
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
4935
- vue.createVNode(script$d, {
4946
+ vue.createVNode(script$e, {
4936
4947
  class: "sh-login-form",
4937
4948
  fields: ['email','password'],
4938
4949
  "action-label": "Login",
@@ -4957,7 +4968,7 @@ return (_ctx, _cache) => {
4957
4968
  (vue.unref(registerSubTitle))
4958
4969
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
4959
4970
  : vue.createCommentVNode("v-if", true),
4960
- vue.createVNode(script$d, {
4971
+ vue.createVNode(script$e, {
4961
4972
  class: "sh-login-form",
4962
4973
  fields: vue.unref(registrationFields),
4963
4974
  "action-label": "Sign Up",
@@ -4978,27 +4989,73 @@ return (_ctx, _cache) => {
4978
4989
 
4979
4990
  };
4980
4991
 
4981
- script.__scopeId = "data-v-2911509a";
4982
- script.__file = "src/lib/components/core/auth/ShAuth.vue";
4992
+ script$1.__scopeId = "data-v-2911509a";
4993
+ script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
4994
+
4995
+ var script = {
4996
+ __name: 'TextInput',
4997
+ props: ['modelValue'],
4998
+ emits: ['update:modelValue'],
4999
+ setup(__props, { emit }) {
5000
+
5001
+ const props = __props;
5002
+
5003
+
5004
+
5005
+
5006
+ const inputModel = vue.ref(null);
5007
+
5008
+ const modelValueUpdated = (e) => {
5009
+ emit('update:modelValue',inputModel);
5010
+ };
5011
+ vue.onMounted(()=>{
5012
+ inputModel.value = props.modelValue;
5013
+ });
5014
+
5015
+
5016
+ return (_ctx, _cache) => {
5017
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
5018
+ type: "text",
5019
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
5020
+ onChange: modelValueUpdated,
5021
+ onKeydown: _cache[1] || (_cache[1] = (...args) => (__props.modelValue && __props.modelValue(...args))),
5022
+ onUpdated: modelValueUpdated
5023
+ }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
5024
+ [vue.vModelText, inputModel.value]
5025
+ ])
5026
+ }
5027
+ }
5028
+
5029
+ };
5030
+
5031
+ script.__file = "src/lib/components/form-components/TextInput.vue";
4983
5032
 
4984
5033
  const ShFrontend = {
4985
5034
  install: (app, options) => {
4986
- ShStorage.setItem('ShConfig',options);
4987
5035
  if(options.sessionTimeout){
4988
5036
  app.provide('sessionTimeout',options.sessionTimeout);
4989
5037
  ShStorage.setItem('sessionTimeout',options.sessionTimeout);
4990
5038
  }
5039
+ const shFormElements = options.shFormElementClasses ?? {};
5040
+
5041
+ const defaultFormElementClasses = {
5042
+ formGroup: shFormElements.formGroup ?? 'mb-2',
5043
+ formLabel: shFormElements.formLabel ?? 'form-label',
5044
+ helperText: shFormElements.helperText ?? 'form-text',
5045
+ actionBtn: shFormElements.actionBtn ?? 'btn btn-primary'
5046
+ };
4991
5047
  const swalPosition = options.swalPosition ?? 'top-end';
4992
5048
  const loginEndpoint = options.loginEndpoint ?? 'auth/login';
4993
5049
  const registerEndpoint = options.registerEndpoint ?? 'auth/register';
4994
5050
  const registerTitle = options.registerTitle ?? 'Create a new account';
4995
5051
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
4996
5052
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
5053
+ const formTextInput = options.formTextInput ?? script;
4997
5054
  const loginUrl = options.loginUrl ?? `/login`;
4998
5055
  const redirectLogin = options.redirectLogin ?? `/`;
4999
5056
  const redirectRegister = options.redirectRegister ?? `/`;
5000
5057
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
5001
- const AuthComponent = options.authComponent ?? script;
5058
+ const AuthComponent = options.authComponent ?? script$1;
5002
5059
  app.provide('loginEndpoint',loginEndpoint);
5003
5060
  app.provide('registerEndpoint', registerEndpoint);
5004
5061
  app.provide('registrationFields', registrationFields);
@@ -5007,7 +5064,9 @@ const ShFrontend = {
5007
5064
  app.provide('redirectLogin', redirectLogin);
5008
5065
  app.provide('redirectRegister', redirectRegister);
5009
5066
  app.provide('logoutApiEndpoint', logoutApiEndpoint);
5067
+ app.provide('formTextInput', formTextInput);
5010
5068
  app.provide('loginUrl', loginUrl);
5069
+ app.provide('shFormElementClasses',defaultFormElementClasses);
5011
5070
  window.swalPosition = swalPosition;
5012
5071
  if(options.router) {
5013
5072
  options.router.addRoute({
@@ -5016,28 +5075,34 @@ const ShFrontend = {
5016
5075
  });
5017
5076
  options.router.addRoute({
5018
5077
  path: '/sh-departments',
5019
- component: script$2
5078
+ component: script$3
5020
5079
  });
5021
5080
  options.router.addRoute({
5022
5081
  path: '/sh-departments/permissions/:id',
5023
- component: script$1
5082
+ component: script$2
5024
5083
  });
5025
5084
  }
5085
+ //filter unwanted config items from options to be put in local storage
5086
+ const removeKeys = ['formTextInput','router','shFormElementClasses'];
5087
+ const allowKeys = [];
5088
+ Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
5089
+
5090
+ ShStorage.setItem('ShConfig',options);
5026
5091
  }
5027
5092
  };
5028
5093
 
5029
- exports.ShCanvas = script$9;
5030
- exports.ShConfirmAction = script$7;
5031
- exports.ShDropDownForm = script$c;
5032
- exports.ShDynamicTabs = script$3;
5033
- exports.ShForm = script$d;
5094
+ exports.ShCanvas = script$a;
5095
+ exports.ShConfirmAction = script$8;
5096
+ exports.ShDropDownForm = script$d;
5097
+ exports.ShDynamicTabs = script$4;
5098
+ exports.ShForm = script$e;
5034
5099
  exports.ShFrontend = ShFrontend;
5035
- exports.ShModal = script$b;
5036
- exports.ShModalForm = script$a;
5037
- exports.ShPhone = script$g;
5038
- exports.ShSilentAction = script$6;
5039
- exports.ShTable = script$5;
5040
- exports.ShTabs = script$4;
5100
+ exports.ShModal = script$c;
5101
+ exports.ShModalForm = script$b;
5102
+ exports.ShPhone = script$h;
5103
+ exports.ShSilentAction = script$7;
5104
+ exports.ShTable = script$6;
5105
+ exports.ShTabs = script$5;
5041
5106
  exports.shApis = shApis;
5042
5107
  exports.shRepo = shRepo;
5043
5108
  exports.shStorage = ShStorage;