@iankibetsh/shframework 4.1.2 → 4.1.4

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
@@ -1910,7 +1910,7 @@ const countries = [
1910
1910
  }
1911
1911
  ];
1912
1912
 
1913
- var script$u = {
1913
+ var script$v = {
1914
1914
  name: 'PhoneInput',
1915
1915
  props: ['modelValue', 'country_code'],
1916
1916
  data () {
@@ -1980,7 +1980,7 @@ var script$u = {
1980
1980
  }
1981
1981
  };
1982
1982
 
1983
- const _hoisted_1$n = { class: "sh-phone mb-3" };
1983
+ const _hoisted_1$o = { class: "sh-phone mb-3" };
1984
1984
  const _hoisted_2$e = {
1985
1985
  key: 0,
1986
1986
  style: {"display":"contents"}
@@ -1989,7 +1989,7 @@ const _hoisted_3$d = ["src"];
1989
1989
  const _hoisted_4$d = ["value"];
1990
1990
 
1991
1991
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1992
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
1992
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
1993
1993
  ($data.selectedCountry)
1994
1994
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
1995
1995
  vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
@@ -2023,10 +2023,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2023
2023
  ]))
2024
2024
  }
2025
2025
 
2026
- script$u.render = render$3;
2027
- script$u.__file = "src/lib/components/form-components/PhoneInput.vue";
2026
+ script$v.render = render$3;
2027
+ script$v.__file = "src/lib/components/form-components/PhoneInput.vue";
2028
2028
 
2029
- const _hoisted_1$m = {
2029
+ const _hoisted_1$n = {
2030
2030
  key: 0,
2031
2031
  class: "dropdown sh-suggest"
2032
2032
  };
@@ -2047,7 +2047,7 @@ const _hoisted_10$6 = {
2047
2047
  };
2048
2048
 
2049
2049
 
2050
- var script$t = {
2050
+ var script$u = {
2051
2051
  __name: 'ShSuggest',
2052
2052
  props: ['data','allowMultiple','url','modelValue'],
2053
2053
  emits: ['update:modelValue'],
@@ -2131,7 +2131,7 @@ function filterData(e){
2131
2131
 
2132
2132
  return (_ctx, _cache) => {
2133
2133
  return (vue.unref(id))
2134
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
2134
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
2135
2135
  vue.createElementVNode("div", {
2136
2136
  id: vue.unref(id),
2137
2137
  "data-bs-toggle": "dropdown",
@@ -2192,15 +2192,15 @@ return (_ctx, _cache) => {
2192
2192
 
2193
2193
  };
2194
2194
 
2195
- script$t.__scopeId = "data-v-71cc9569";
2196
- script$t.__file = "src/lib/components/form-components/ShSuggest.vue";
2195
+ script$u.__scopeId = "data-v-71cc9569";
2196
+ script$u.__file = "src/lib/components/form-components/ShSuggest.vue";
2197
2197
 
2198
- var script$s = {
2198
+ var script$t = {
2199
2199
  name: 'ShForm',
2200
2200
  components: {
2201
- PhoneInput: script$u,
2202
- ShSuggest: script$t,
2203
- ShPhone: script$u
2201
+ PhoneInput: script$v,
2202
+ ShSuggest: script$u,
2203
+ ShPhone: script$v
2204
2204
  },
2205
2205
  props: [
2206
2206
  'action',
@@ -2524,7 +2524,7 @@ var script$s = {
2524
2524
  }
2525
2525
  };
2526
2526
 
2527
- const _hoisted_1$l = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2527
+ const _hoisted_1$m = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2528
2528
  const _hoisted_2$c = {
2529
2529
  ref: "ShAutoForm",
2530
2530
  class: "sh-form"
@@ -2585,7 +2585,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2585
2585
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2586
2586
 
2587
2587
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2588
- _hoisted_1$l,
2588
+ _hoisted_1$m,
2589
2589
  vue.createElementVNode("form", _hoisted_2$c, [
2590
2590
  vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2591
2591
  vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
@@ -2793,10 +2793,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2793
2793
  ], 64 /* STABLE_FRAGMENT */))
2794
2794
  }
2795
2795
 
2796
- script$s.render = render$2;
2797
- script$s.__file = "src/lib/components/ShForm.vue";
2796
+ script$t.render = render$2;
2797
+ script$t.__file = "src/lib/components/ShForm.vue";
2798
2798
 
2799
- var script$r = {
2799
+ var script$s = {
2800
2800
  __name: 'EmailInput',
2801
2801
  props: ['modelValue','label'],
2802
2802
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2836,12 +2836,12 @@ return (_ctx, _cache) => {
2836
2836
 
2837
2837
  };
2838
2838
 
2839
- script$r.__file = "src/lib/components/form-components/EmailInput.vue";
2839
+ script$s.__file = "src/lib/components/form-components/EmailInput.vue";
2840
2840
 
2841
- const _hoisted_1$k = ["min", "max"];
2841
+ const _hoisted_1$l = ["min", "max"];
2842
2842
 
2843
2843
 
2844
- var script$q = {
2844
+ var script$r = {
2845
2845
  __name: 'NumberInput',
2846
2846
  props: ['modelValue','label','min','max'],
2847
2847
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2875,7 +2875,7 @@ return (_ctx, _cache) => {
2875
2875
  onChange: modelValueUpdated,
2876
2876
  onKeydown: modelValueUpdated,
2877
2877
  onUpdated: modelValueUpdated
2878
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$k)), [
2878
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$l)), [
2879
2879
  [vue.vModelText, inputModel.value]
2880
2880
  ])
2881
2881
  }
@@ -2883,9 +2883,9 @@ return (_ctx, _cache) => {
2883
2883
 
2884
2884
  };
2885
2885
 
2886
- script$q.__file = "src/lib/components/form-components/NumberInput.vue";
2886
+ script$r.__file = "src/lib/components/form-components/NumberInput.vue";
2887
2887
 
2888
- var script$p = {
2888
+ var script$q = {
2889
2889
  __name: 'TextInput',
2890
2890
  props: ['modelValue','label','isInvalid'],
2891
2891
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2927,9 +2927,9 @@ return (_ctx, _cache) => {
2927
2927
 
2928
2928
  };
2929
2929
 
2930
- script$p.__file = "src/lib/components/form-components/TextInput.vue";
2930
+ script$q.__file = "src/lib/components/form-components/TextInput.vue";
2931
2931
 
2932
- var script$o = {
2932
+ var script$p = {
2933
2933
  __name: 'TextAreaInput',
2934
2934
  props: ['modelValue','label'],
2935
2935
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2969,12 +2969,12 @@ return (_ctx, _cache) => {
2969
2969
 
2970
2970
  };
2971
2971
 
2972
- script$o.__file = "src/lib/components/form-components/TextAreaInput.vue";
2972
+ script$p.__file = "src/lib/components/form-components/TextAreaInput.vue";
2973
2973
 
2974
- const _hoisted_1$j = ["value"];
2974
+ const _hoisted_1$k = ["value"];
2975
2975
 
2976
2976
 
2977
- var script$n = {
2977
+ var script$o = {
2978
2978
  __name: 'SelectInput',
2979
2979
  props: ['modelValue','label','data','dataUrl'],
2980
2980
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3030,7 +3030,7 @@ return (_ctx, _cache) => {
3030
3030
  return (vue.openBlock(), vue.createElementBlock("option", {
3031
3031
  key: option.id,
3032
3032
  value: option.id
3033
- }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$j))
3033
+ }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$k))
3034
3034
  }), 128 /* KEYED_FRAGMENT */))
3035
3035
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
3036
3036
  [vue.vModelSelect, inputModel.value]
@@ -3040,9 +3040,9 @@ return (_ctx, _cache) => {
3040
3040
 
3041
3041
  };
3042
3042
 
3043
- script$n.__file = "src/lib/components/form-components/SelectInput.vue";
3043
+ script$o.__file = "src/lib/components/form-components/SelectInput.vue";
3044
3044
 
3045
- var script$m = {
3045
+ var script$n = {
3046
3046
  __name: 'PasswordInput',
3047
3047
  props: ['modelValue','label'],
3048
3048
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3078,9 +3078,9 @@ return (_ctx, _cache) => {
3078
3078
 
3079
3079
  };
3080
3080
 
3081
- script$m.__file = "src/lib/components/form-components/PasswordInput.vue";
3081
+ script$n.__file = "src/lib/components/form-components/PasswordInput.vue";
3082
3082
 
3083
- const _hoisted_1$i = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3083
+ const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3084
3084
  const _hoisted_2$b = ["onUpdate:modelValue"];
3085
3085
  const _hoisted_3$a = ["innerHTML"];
3086
3086
  const _hoisted_4$a = ["innerHTML"];
@@ -3107,7 +3107,7 @@ const _hoisted_12$3 = {
3107
3107
  const _hoisted_13$3 = { key: 1 };
3108
3108
 
3109
3109
 
3110
- var script$l = {
3110
+ var script$m = {
3111
3111
  __name: 'ShAutoForm',
3112
3112
  props: [
3113
3113
  'action','successCallback','retainDataAfterSubmission',
@@ -3140,19 +3140,19 @@ const getFieldComponent = (fieldObj)=>{
3140
3140
  const defaultPhones = ['phone'];
3141
3141
  const defaultEmails = ['email'];
3142
3142
  const formComponents = vue.inject('formComponents');
3143
- const TextComponent = formComponents.text ?? script$p;
3144
- const TextAreaComponent = formComponents.textArea ?? script$o;
3145
- const EmailComponent = formComponents.email ?? script$r;
3146
- const PhoneComponent = formComponents.phone ?? script$u;
3147
- const NumberComponent = formComponents.number ?? script$q;
3148
- const SelectComponent = formComponents.select ?? script$n;
3149
- const PasswordComponent = formComponents.password ?? script$m;
3143
+ const TextComponent = formComponents.text ?? script$q;
3144
+ const TextAreaComponent = formComponents.textArea ?? script$p;
3145
+ const EmailComponent = formComponents.email ?? script$s;
3146
+ const PhoneComponent = formComponents.phone ?? script$v;
3147
+ const NumberComponent = formComponents.number ?? script$r;
3148
+ const SelectComponent = formComponents.select ?? script$o;
3149
+ const PasswordComponent = formComponents.password ?? script$n;
3150
3150
  if(props.customComponents && props.customComponents[field]) {
3151
3151
  return props.customComponents[field]
3152
3152
  }
3153
3153
  if(fieldObj.type){
3154
3154
  if(fieldObj.type === 'suggest' || fieldObj.type === 'suggests'){
3155
- return script$t
3155
+ return script$u
3156
3156
  }
3157
3157
  return fieldObj.type === 'number' ? NumberComponent:fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type === 'password' ? PasswordComponent:fieldObj.type === 'select' ? SelectComponent:TextComponent
3158
3158
  }else
@@ -3161,16 +3161,16 @@ const getFieldComponent = (fieldObj)=>{
3161
3161
  }
3162
3162
  else
3163
3163
  if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
3164
- return formComponents.textArea ?? script$o
3164
+ return formComponents.textArea ?? script$p
3165
3165
  } else
3166
3166
  if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
3167
- return formComponents.email ?? script$r
3167
+ return formComponents.email ?? script$s
3168
3168
  } else
3169
3169
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3170
- return formComponents.phone ?? script$u
3170
+ return formComponents.phone ?? script$v
3171
3171
  } else
3172
3172
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3173
- return formComponents.number ?? script$q
3173
+ return formComponents.number ?? script$r
3174
3174
  }
3175
3175
  // else
3176
3176
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
@@ -3179,7 +3179,7 @@ const getFieldComponent = (fieldObj)=>{
3179
3179
  // if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3180
3180
  // return formComponents.date ?? DateInput
3181
3181
  // }
3182
- return formComponents.text ?? script$p
3182
+ return formComponents.text ?? script$q
3183
3183
  };
3184
3184
  const shFormElementClasses = vue.ref(null);
3185
3185
  shFormElementClasses.value = vue.inject('shFormElementClasses');
@@ -3317,7 +3317,7 @@ vue.onMounted((ev)=>{
3317
3317
 
3318
3318
  return (_ctx, _cache) => {
3319
3319
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3320
- _hoisted_1$i,
3320
+ _hoisted_1$j,
3321
3321
  vue.createElementVNode("form", {
3322
3322
  class: vue.normalizeClass([__props.formClass, "sh-form"]),
3323
3323
  ref_key: "shAutoForm",
@@ -3403,12 +3403,12 @@ return (_ctx, _cache) => {
3403
3403
 
3404
3404
  };
3405
3405
 
3406
- script$l.__file = "src/lib/components/ShAutoForm.vue";
3406
+ script$m.__file = "src/lib/components/ShAutoForm.vue";
3407
3407
 
3408
- const _hoisted_1$h = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3408
+ const _hoisted_1$i = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3409
3409
  const _hoisted_2$a = { class: "dropdown" };
3410
3410
 
3411
- var script$k = {
3411
+ var script$l = {
3412
3412
  __name: 'ShDropDownForm',
3413
3413
  props: ['action',
3414
3414
  'classes',
@@ -3438,7 +3438,7 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3438
3438
 
3439
3439
  return (_ctx, _cache) => {
3440
3440
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3441
- _hoisted_1$h,
3441
+ _hoisted_1$i,
3442
3442
  vue.createElementVNode("div", _hoisted_2$a, [
3443
3443
  vue.createElementVNode("a", {
3444
3444
  class: vue.normalizeClass(vue.unref(btnClass)),
@@ -3455,7 +3455,7 @@ return (_ctx, _cache) => {
3455
3455
  class: "dropdown-menu px-2 py-1",
3456
3456
  "aria-labelledby": dropdownId
3457
3457
  }, [
3458
- vue.createVNode(script$s, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3458
+ vue.createVNode(script$t, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3459
3459
  ])
3460
3460
  ])
3461
3461
  ], 64 /* STABLE_FRAGMENT */))
@@ -3464,9 +3464,9 @@ return (_ctx, _cache) => {
3464
3464
 
3465
3465
  };
3466
3466
 
3467
- script$k.__file = "src/lib/components/ShDropDownForm.vue";
3467
+ script$l.__file = "src/lib/components/ShDropDownForm.vue";
3468
3468
 
3469
- const _hoisted_1$g = ["id"];
3469
+ const _hoisted_1$h = ["id"];
3470
3470
  const _hoisted_2$9 = { class: "modal-content" };
3471
3471
  const _hoisted_3$9 = { class: "modal-header" };
3472
3472
  const _hoisted_4$9 = { class: "modal-title" };
@@ -3479,7 +3479,7 @@ const _hoisted_6$5 = { class: "modal-body" };
3479
3479
  const _hoisted_7$4 = { class: "section" };
3480
3480
 
3481
3481
 
3482
- var script$j = {
3482
+ var script$k = {
3483
3483
  __name: 'ShModal',
3484
3484
  props: {
3485
3485
  modalId: {
@@ -3536,17 +3536,17 @@ return (_ctx, _cache) => {
3536
3536
  ])
3537
3537
  ])
3538
3538
  ], 2 /* CLASS */)
3539
- ], 8 /* PROPS */, _hoisted_1$g))
3539
+ ], 8 /* PROPS */, _hoisted_1$h))
3540
3540
  }
3541
3541
  }
3542
3542
 
3543
3543
  };
3544
3544
 
3545
- script$j.__file = "src/lib/components/ShModal.vue";
3545
+ script$k.__file = "src/lib/components/ShModal.vue";
3546
3546
 
3547
- const _hoisted_1$f = ["href"];
3547
+ const _hoisted_1$g = ["href"];
3548
3548
 
3549
- var script$i = {
3549
+ var script$j = {
3550
3550
  __name: 'ShModalForm',
3551
3551
  props: ['action',
3552
3552
  'classes',
@@ -3585,13 +3585,13 @@ return (_ctx, _cache) => {
3585
3585
  "data-bs-toggle": "modal"
3586
3586
  }, [
3587
3587
  vue.renderSlot(_ctx.$slots, "default")
3588
- ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3589
- vue.createVNode(script$j, {
3588
+ ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3589
+ vue.createVNode(script$k, {
3590
3590
  "modal-id": modalId,
3591
3591
  "modal-title": __props.modalTitle
3592
3592
  }, {
3593
3593
  default: vue.withCtx(() => [
3594
- vue.createVNode(script$s, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3594
+ vue.createVNode(script$t, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3595
3595
  ]),
3596
3596
  _: 1 /* STABLE */
3597
3597
  }, 8 /* PROPS */, ["modal-title"])
@@ -3601,11 +3601,11 @@ return (_ctx, _cache) => {
3601
3601
 
3602
3602
  };
3603
3603
 
3604
- script$i.__file = "src/lib/components/ShModalForm.vue";
3604
+ script$j.__file = "src/lib/components/ShModalForm.vue";
3605
3605
 
3606
- const _hoisted_1$e = ["href"];
3606
+ const _hoisted_1$f = ["href"];
3607
3607
 
3608
- var script$h = {
3608
+ var script$i = {
3609
3609
  __name: 'ShModalFormAuto',
3610
3610
  props: ['action',
3611
3611
  'classes',
@@ -3645,13 +3645,13 @@ return (_ctx, _cache) => {
3645
3645
  "data-bs-toggle": "modal"
3646
3646
  }, [
3647
3647
  vue.renderSlot(_ctx.$slots, "default")
3648
- ], 10 /* CLASS, PROPS */, _hoisted_1$e),
3649
- vue.createVNode(script$j, {
3648
+ ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3649
+ vue.createVNode(script$k, {
3650
3650
  "modal-id": modalId,
3651
3651
  "modal-title": __props.modalTitle
3652
3652
  }, {
3653
3653
  default: vue.withCtx(() => [
3654
- vue.createVNode(script$l, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3654
+ vue.createVNode(script$m, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3655
3655
  ]),
3656
3656
  _: 1 /* STABLE */
3657
3657
  }, 8 /* PROPS */, ["modal-title"])
@@ -3661,9 +3661,9 @@ return (_ctx, _cache) => {
3661
3661
 
3662
3662
  };
3663
3663
 
3664
- script$h.__file = "src/lib/components/ShModalFormAuto.vue";
3664
+ script$i.__file = "src/lib/components/ShModalFormAuto.vue";
3665
3665
 
3666
- const _hoisted_1$d = ["id"];
3666
+ const _hoisted_1$e = ["id"];
3667
3667
  const _hoisted_2$8 = { class: "offcanvas-header" };
3668
3668
  const _hoisted_3$8 = {
3669
3669
  class: "offcanvas-title",
@@ -3671,7 +3671,7 @@ const _hoisted_3$8 = {
3671
3671
  };
3672
3672
  const _hoisted_4$8 = { class: "offcanvas-body" };
3673
3673
 
3674
- var script$g = {
3674
+ var script$h = {
3675
3675
  __name: 'ShCanvas',
3676
3676
  props: {
3677
3677
  canvasId: {
@@ -3730,13 +3730,29 @@ return (_ctx, _cache) => {
3730
3730
  vue.createElementVNode("div", _hoisted_4$8, [
3731
3731
  vue.renderSlot(_ctx.$slots, "default")
3732
3732
  ])
3733
- ], 10 /* CLASS, PROPS */, _hoisted_1$d))
3733
+ ], 10 /* CLASS, PROPS */, _hoisted_1$e))
3734
3734
  }
3735
3735
  }
3736
3736
 
3737
3737
  };
3738
3738
 
3739
- script$g.__file = "src/lib/components/ShCanvas.vue";
3739
+ script$h.__file = "src/lib/components/ShCanvas.vue";
3740
+
3741
+ const _hoisted_1$d = { class: "callout callout-info" };
3742
+
3743
+ function render$1(_ctx, _cache) {
3744
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
3745
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3746
+ vue.createTextVNode(" No records found ")
3747
+ ])
3748
+ ]))
3749
+ }
3750
+
3751
+ const script$g = {};
3752
+
3753
+ script$g.render = render$1;
3754
+ script$g.__scopeId = "data-v-55cf77fb";
3755
+ script$g.__file = "src/lib/components/others/NoRecords.vue";
3740
3756
 
3741
3757
  var script$f = {
3742
3758
  name: 'Pagination',
@@ -3857,7 +3873,7 @@ const _hoisted_23$1 = {
3857
3873
  class: "spinner-border"
3858
3874
  };
3859
3875
 
3860
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3876
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
3861
3877
  return ($props.paginationStyle !== 'loadMore')
3862
3878
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
3863
3879
  vue.createElementVNode("div", _hoisted_2$7, [
@@ -3934,7 +3950,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3934
3950
  ]))
3935
3951
  }
3936
3952
 
3937
- script$f.render = render$1;
3953
+ script$f.render = render;
3938
3954
  script$f.__file = "src/lib/components/list_templates/Pagination.vue";
3939
3955
 
3940
3956
  const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("span", {
@@ -4327,309 +4343,6 @@ return (_ctx, _cache) => {
4327
4343
 
4328
4344
  script$c.__file = "src/lib/components/ShRange.vue";
4329
4345
 
4330
- var script$b = {
4331
- name: 'sh-table',
4332
- props: ['endPoint', 'headers','cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange'],
4333
- data() {
4334
- return {
4335
- order_by: '',
4336
- order_method: '',
4337
- per_page: this.pageCount ?? shRepo.getShConfig('tablePerPage', 10),
4338
- page: 1,
4339
- exactMatch: false,
4340
- filter_value: '',
4341
- loading: 'loading',
4342
- loading_error: '',
4343
- records: [],
4344
- total: 0,
4345
- pagination_data: null,
4346
- moreDetailsId: null,
4347
- moreDetailsModel: null,
4348
- downloading: false,
4349
- appUrl: window.VITE_APP_API_URL,
4350
- hasCanvas: 0,
4351
- selectedRecord: null,
4352
- timeOut: null,
4353
- tableHeaders: [],
4354
- pageStyle: this.paginationStyle ?? shRepo.getShConfig('tablePaginationStyle', 'loadMore'),
4355
- range: null,
4356
- from: null,
4357
- to: null,
4358
- period: null
4359
- }
4360
- },
4361
- mounted() {
4362
- if (this.headers) {
4363
- this.tableHeaders = this.headers;
4364
- }
4365
-
4366
- if (this.actions && this.actions.actions) {
4367
- this.actions.actions.forEach(action => {
4368
- if (action.canvasComponent) {
4369
- this.hasCanvas = true;
4370
- }
4371
- });
4372
- }
4373
- if(this.cacheKey){
4374
- this.setCachedData();
4375
- }
4376
- this.reloadData();
4377
- },
4378
- methods: {
4379
- rangeChanged: function (newRange) {
4380
- this.range = newRange;
4381
- this.from = newRange.from.format('L');
4382
- this.to = newRange.to.format('L');
4383
- this.period = newRange.period;
4384
- this.reloadData();
4385
- },
4386
- userTyping: function () {
4387
- if (this.timeOut) {
4388
- clearTimeout(this.timeOut);
4389
- }
4390
- const self = this;
4391
- this.timeOut = setTimeout(() => {
4392
- self.reloadData(1);
4393
- }, 800);
4394
- },
4395
- cleanCanvasProps: function (actions) {
4396
- let replaced = actions;
4397
- replaced.class = null;
4398
- return replaced
4399
- },
4400
- newRecordAdded: function (ev) {
4401
- const record = ev.log;
4402
- if (record.user) {
4403
- record.user = record.user.name;
4404
- }
4405
- this.records.unshift(record);
4406
- },
4407
- canvasClosed: function () {
4408
- this.selectedRecord = null;
4409
- },
4410
- rowSelected: function (row) {
4411
- this.selectedRecord = null;
4412
- setTimeout(() => {
4413
- this.selectedRecord = row;
4414
- this.$emit('rowSelected', row);
4415
- }, 100);
4416
- },
4417
- changeKey: function (key, value) {
4418
- this[key] = value;
4419
- if (key === 'order_by') {
4420
- this.order_method = (this.order_method === 'desc') ? 'asc' : 'desc';
4421
- }
4422
- if (key === 'per_page') {
4423
- this.page = 1;
4424
- }
4425
- this.reloadData();
4426
- },
4427
- getLinkClass: function (config) {
4428
- if (typeof config === 'object') {
4429
- return config.class
4430
- }
4431
- return ''
4432
- },
4433
- reloadNotifications: function () {
4434
- this.reloadData();
4435
- },
4436
- replaceActionUrl: function (path, obj) {
4437
- if (path) {
4438
- var matches = path.match(/\{(.*?)\}/g);
4439
- try {
4440
- matches.forEach(key => {
4441
- key = key.replace('{', '');
4442
- key = key.replace('}', '');
4443
- path = path.replace(`{${key}}`, obj[key]);
4444
- });
4445
- return path
4446
- } catch (e) {
4447
- return path
4448
- }
4449
- }
4450
- return ''
4451
- },
4452
- doEmitAction: function (action, data) {
4453
- if (typeof action === 'function') {
4454
- action(data);
4455
- } else {
4456
- this.$emit(action, data);
4457
- }
4458
- },
4459
- getFieldType: function (field) {
4460
- const numbers = ['age', 'interest_rate_pa'];
4461
- const moneys = ['amount', 'paid_amount', 'total_paid', 'total', 'monthly_fee', 'share_cost', 'min_contribution', 'min_membership_contribution'];
4462
- const dates = ['invoice_date', 'free_tier_days', 'updated_at', 'created_at', 'end_time'];
4463
- if (numbers.includes(field)) {
4464
- return 'numeric'
4465
- }
4466
- if (moneys.includes(field)) {
4467
- return 'money'
4468
- }
4469
- if (dates.includes(field)) {
4470
- return 'date'
4471
- }
4472
- return 'string'
4473
- },
4474
- replaceLinkUrl: function (path, obj) {
4475
- if (typeof path === 'object') {
4476
- path = path.link ?? path.url;
4477
- }
4478
- var matches = path.match(/\{(.*?)\}/g);
4479
- matches && matches.forEach(key => {
4480
- key = key.replace('{', '');
4481
- key = key.replace('}', '');
4482
- path = path.replace(`{${key}}`, obj[key]);
4483
- });
4484
- return path
4485
- },
4486
- formatDate: function (date) {
4487
- return moment__default["default"](date).format('lll')
4488
- },
4489
- setMoreDetailsModel: function (row) {
4490
- this.moreDetailsModel = null;
4491
- this.moreDetailsModel = row;
4492
- },
4493
- loadMoreRecords: function () {
4494
- this.reloadData(this.page + 1, 1);
4495
- },
4496
- exportData: function (template) {
4497
- this.downloading = true;
4498
- const headers = [];
4499
- const fields = this.downloadFields ? this.downloadFields : this.headers;
4500
- fields.forEach(header => {
4501
- if (typeof header === 'string') {
4502
- headers.push(header);
4503
- }
4504
- });
4505
- const data = {
4506
- titles: headers,
4507
- export: 1
4508
- };
4509
- shApis.doPost(this.endPoint, data).then(res => {
4510
- this.downloading = false;
4511
- if (res.data.file) {
4512
- const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
4513
- window.location.href = url;
4514
- // window.open('https://facebook.com')
4515
- // window.open(this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name, '_blank').focus()
4516
- }
4517
- }).catch(reason => {
4518
- this.downloading = false;
4519
- const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText}`;
4520
- shRepo.swalError('Error', error);
4521
- });
4522
- },
4523
- setCachedData: function () {
4524
- if (this.cacheKey) {
4525
- this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey, []);
4526
- }
4527
- },
4528
- reloadData: function (page, append) {
4529
- if (typeof page !== 'undefined') {
4530
- this.page = page;
4531
- }
4532
- if (this.cacheKey && this.records && this.records.length > 0 && this.page < 2 ) {
4533
- this.loading = 'done';
4534
- } else if(!append){
4535
- this.loading = 'loading';
4536
- }
4537
- const data = {
4538
- order_by: this.order_by,
4539
- order_method: this.order_method,
4540
- per_page: this.per_page,
4541
- page: this.page,
4542
- filter_value: this.filter_value,
4543
- paginated: true,
4544
- from: this.from,
4545
- to: this.to,
4546
- period: this.period,
4547
- exact: this.exactMatch
4548
- };
4549
- if (this.pagination_data) {
4550
- this.pagination_data.loading = 1;
4551
- }
4552
- let endPoint = this.endPoint;
4553
- if (!this.endPoint && this.query) {
4554
- //send ql query
4555
- endPoint = 'sh-ql';
4556
- data.query = this.query;
4557
- }
4558
- shApis.doGet(endPoint, data).then(req => {
4559
- this.$emit('dataReloaded', this.pagination_data);
4560
- this.loading = 'done';
4561
- const response = req.data.data;
4562
- if(this.page < 2 && this.cacheKey){
4563
- ShStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
4564
- }
4565
- this.pagination_data = {
4566
- current: response.current_page,
4567
- start: response.from,
4568
- end: response.last_page,
4569
- record_count: response.total,
4570
- per_page: response.per_page,
4571
- loading: 0,
4572
- displayCount: response.total > response.per_page ? response.per_page : response.total
4573
- };
4574
- if (!this.headers && response.total > 0) {
4575
- this.tableHeaders = Object.keys(response.data[0]);
4576
- }
4577
- if (append) {
4578
- this.records.push(...response.data);
4579
- let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
4580
- if (totalShown > response.total) {
4581
- totalShown = response.total;
4582
- }
4583
- this.pagination_data.displayCount = totalShown;
4584
- const scrollingElement = (document.scrollingElement || document.body);
4585
- scrollingElement.scrollTop = scrollingElement.scrollHeight;
4586
- } else {
4587
- this.records = response.data;
4588
- }
4589
- }).catch(reason => {
4590
- const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
4591
- this.loading_error = error;
4592
- this.loading = 'error';
4593
- });
4594
- }
4595
- },
4596
- watch: {
4597
- hideIds: {
4598
- handler(newValue) {
4599
- this.records = this.records.filter(record => !newValue.includes(record.id) && record);
4600
- },
4601
- deep: true
4602
- },
4603
- reload() {
4604
- this.reloadData();
4605
- },
4606
- endPoint() {
4607
- this.reloadData();
4608
- }
4609
- },
4610
- components: {
4611
- ShRange: script$c,
4612
- ShSilentAction: script$d,
4613
- ShConfirmAction: script$e,
4614
- ShCanvas: script$g,
4615
- pagination: script$f
4616
- },
4617
- computed: {
4618
- windowWidth: function () {
4619
- return window.innerWidth
4620
- },
4621
- user() {
4622
- return null
4623
- },
4624
- hasDefaultSlot() {
4625
- return !!this.$slots.default
4626
- },
4627
- hasRecordsSlot() {
4628
- return !!this.$slots.records
4629
- }
4630
- }
4631
- };
4632
-
4633
4346
  const _hoisted_1$8 = { class: "auto-table mt-2" };
4634
4347
  const _hoisted_2$5 = {
4635
4348
  key: 0,
@@ -4675,40 +4388,39 @@ const _hoisted_16$1 = {
4675
4388
  key: 1,
4676
4389
  class: "alert alert-danger"
4677
4390
  };
4678
- const _hoisted_17$1 = { colspan: 2 };
4679
- const _hoisted_18$1 = {
4391
+ const _hoisted_17$1 = {
4680
4392
  key: 0,
4681
4393
  class: "text-center"
4682
4394
  };
4683
- const _hoisted_19 = /*#__PURE__*/vue.createElementVNode("div", {
4395
+ const _hoisted_18$1 = /*#__PURE__*/vue.createElementVNode("div", {
4684
4396
  class: "spinner-border",
4685
4397
  role: "status"
4686
4398
  }, [
4687
4399
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4688
4400
  ], -1 /* HOISTED */);
4689
- const _hoisted_20 = [
4690
- _hoisted_19
4401
+ const _hoisted_19 = [
4402
+ _hoisted_18$1
4691
4403
  ];
4692
- const _hoisted_21 = {
4404
+ const _hoisted_20 = {
4693
4405
  key: 1,
4694
4406
  class: "alert alert-danger"
4695
4407
  };
4696
- const _hoisted_22 = { colspan: 2 };
4697
- const _hoisted_23 = { class: "sh-thead" };
4408
+ const _hoisted_21 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4409
+ const _hoisted_22 = { class: "sh-thead" };
4410
+ const _hoisted_23 = ["onClick"];
4698
4411
  const _hoisted_24 = ["onClick"];
4699
4412
  const _hoisted_25 = ["onClick"];
4700
- const _hoisted_26 = ["onClick"];
4701
- const _hoisted_27 = {
4413
+ const _hoisted_26 = {
4702
4414
  key: 0,
4703
4415
  class: "text-capitalize"
4704
4416
  };
4705
- const _hoisted_28 = { class: "sh-tbody" };
4706
- const _hoisted_29 = {
4417
+ const _hoisted_27 = { class: "sh-tbody" };
4418
+ const _hoisted_28 = {
4707
4419
  key: 0,
4708
4420
  class: "text-center"
4709
4421
  };
4710
- const _hoisted_30 = ["colspan"];
4711
- const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4422
+ const _hoisted_29 = ["colspan"];
4423
+ const _hoisted_30 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4712
4424
  /*#__PURE__*/vue.createElementVNode("div", {
4713
4425
  class: "spinner-border",
4714
4426
  role: "status"
@@ -4716,42 +4428,42 @@ const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
4716
4428
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4717
4429
  ])
4718
4430
  ], -1 /* HOISTED */);
4719
- const _hoisted_32 = [
4720
- _hoisted_31
4431
+ const _hoisted_31 = [
4432
+ _hoisted_30
4721
4433
  ];
4722
- const _hoisted_33 = {
4434
+ const _hoisted_32 = {
4723
4435
  key: 1,
4724
4436
  class: "text-center alert alert-danger"
4725
4437
  };
4726
- const _hoisted_34 = ["colspan"];
4727
- const _hoisted_35 = {
4438
+ const _hoisted_33 = ["colspan"];
4439
+ const _hoisted_34 = {
4728
4440
  key: 2,
4729
4441
  class: "text-center alert alert-info no_records"
4730
4442
  };
4731
- const _hoisted_36 = ["colspan"];
4732
- const _hoisted_37 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4733
- const _hoisted_38 = ["onClick"];
4734
- const _hoisted_39 = { key: 1 };
4735
- const _hoisted_40 = {
4443
+ const _hoisted_35 = ["colspan"];
4444
+ const _hoisted_36 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
4445
+ const _hoisted_37 = ["onClick"];
4446
+ const _hoisted_38 = { key: 1 };
4447
+ const _hoisted_39 = {
4736
4448
  key: 2,
4737
4449
  class: "text-success fw-bold"
4738
4450
  };
4739
- const _hoisted_41 = { key: 3 };
4451
+ const _hoisted_40 = { key: 3 };
4452
+ const _hoisted_41 = ["innerHTML"];
4740
4453
  const _hoisted_42 = ["innerHTML"];
4741
4454
  const _hoisted_43 = ["innerHTML"];
4742
- const _hoisted_44 = ["innerHTML"];
4743
- const _hoisted_45 = {
4455
+ const _hoisted_44 = {
4744
4456
  key: 0,
4745
4457
  style: {"white-space":"nowrap"}
4746
4458
  };
4747
- const _hoisted_46 = ["href"];
4748
- const _hoisted_47 = ["title", "onClick"];
4749
- const _hoisted_48 = { key: 5 };
4750
- const _hoisted_49 = {
4459
+ const _hoisted_45 = ["href"];
4460
+ const _hoisted_46 = ["title", "onClick"];
4461
+ const _hoisted_47 = { key: 5 };
4462
+ const _hoisted_48 = {
4751
4463
  key: 0,
4752
4464
  class: "text-center"
4753
4465
  };
4754
- const _hoisted_50 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4466
+ const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
4755
4467
  /*#__PURE__*/vue.createElementVNode("div", {
4756
4468
  class: "spinner-border",
4757
4469
  role: "status"
@@ -4759,58 +4471,362 @@ const _hoisted_50 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
4759
4471
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4760
4472
  ])
4761
4473
  ], -1 /* HOISTED */);
4762
- const _hoisted_51 = [
4763
- _hoisted_50
4474
+ const _hoisted_50 = [
4475
+ _hoisted_49
4764
4476
  ];
4765
- const _hoisted_52 = { key: 1 };
4766
- const _hoisted_53 = {
4477
+ const _hoisted_51 = { key: 1 };
4478
+ const _hoisted_52 = {
4767
4479
  key: 2,
4768
4480
  class: "mobile-list-items"
4769
4481
  };
4770
- const _hoisted_54 = ["onClick"];
4771
- const _hoisted_55 = {
4482
+ const _hoisted_53 = ["onClick"];
4483
+ const _hoisted_54 = {
4772
4484
  key: 0,
4773
4485
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4774
4486
  };
4775
- const _hoisted_56 = {
4487
+ const _hoisted_55 = {
4776
4488
  key: 1,
4777
4489
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4778
4490
  };
4779
- const _hoisted_57 = {
4491
+ const _hoisted_56 = {
4780
4492
  key: 2,
4781
4493
  class: "mb-1 font-weight-bold text-capitalize profile-form-title"
4782
4494
  };
4783
- const _hoisted_58 = { key: 1 };
4784
- const _hoisted_59 = {
4495
+ const _hoisted_57 = { key: 1 };
4496
+ const _hoisted_58 = {
4785
4497
  key: 2,
4786
4498
  class: "text-primary fw-bold"
4787
4499
  };
4788
- const _hoisted_60 = { key: 3 };
4500
+ const _hoisted_59 = { key: 3 };
4501
+ const _hoisted_60 = ["innerHTML"];
4789
4502
  const _hoisted_61 = ["innerHTML"];
4790
4503
  const _hoisted_62 = ["innerHTML"];
4791
- const _hoisted_63 = ["innerHTML"];
4792
- const _hoisted_64 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4793
- const _hoisted_65 = { key: 0 };
4794
- const _hoisted_66 = ["href"];
4795
- const _hoisted_67 = ["title", "onClick"];
4504
+ const _hoisted_63 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
4505
+ const _hoisted_64 = { key: 0 };
4506
+ const _hoisted_65 = ["href"];
4507
+ const _hoisted_66 = ["title", "onClick"];
4508
+
4509
+ const __default__ = {
4510
+ name: 'sh-table',
4511
+ props: ['endPoint', 'headers', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','noRecordsMessage'],
4512
+ data(){
4513
+ return {
4514
+ order_by: '',
4515
+ order_method: '',
4516
+ per_page: this.pageCount ?? shRepo.getShConfig('tablePerPage', 10),
4517
+ page: 1,
4518
+ exactMatch: false,
4519
+ filter_value: '',
4520
+ loading: 'loading',
4521
+ loading_error: '',
4522
+ records: [],
4523
+ total: 0,
4524
+ pagination_data: null,
4525
+ moreDetailsId: null,
4526
+ moreDetailsModel: null,
4527
+ downloading: false,
4528
+ appUrl: window.VITE_APP_API_URL,
4529
+ hasCanvas: 0,
4530
+ selectedRecord: null,
4531
+ timeOut: null,
4532
+ tableHeaders: [],
4533
+ pageStyle: this.paginationStyle ?? shRepo.getShConfig('tablePaginationStyle', 'loadMore'),
4534
+ range: null,
4535
+ from: null,
4536
+ to: null,
4537
+ period: null
4538
+ }
4539
+ },
4540
+ mounted(){
4541
+ if (this.headers) {
4542
+ this.tableHeaders = this.headers;
4543
+ }
4796
4544
 
4797
- function render(_ctx, _cache, $props, $setup, $data, $options) {
4798
- const _component_sh_range = vue.resolveComponent("sh-range");
4545
+ if (this.actions && this.actions.actions) {
4546
+ this.actions.actions.forEach(action => {
4547
+ if (action.canvasComponent) {
4548
+ this.hasCanvas = true;
4549
+ }
4550
+ });
4551
+ }
4552
+ if (this.cacheKey) {
4553
+ this.setCachedData();
4554
+ }
4555
+ this.reloadData();
4556
+ },
4557
+ methods: {
4558
+ rangeChanged: function (newRange){
4559
+ this.range = newRange;
4560
+ this.from = newRange.from.format('L');
4561
+ this.to = newRange.to.format('L');
4562
+ this.period = newRange.period;
4563
+ this.reloadData();
4564
+ },
4565
+ userTyping: function (){
4566
+ if (this.timeOut) {
4567
+ clearTimeout(this.timeOut);
4568
+ }
4569
+ const self = this;
4570
+ this.timeOut = setTimeout(() => {
4571
+ self.reloadData(1);
4572
+ }, 800);
4573
+ },
4574
+ cleanCanvasProps: function (actions){
4575
+ let replaced = actions;
4576
+ replaced.class = null;
4577
+ return replaced
4578
+ },
4579
+ newRecordAdded: function (ev){
4580
+ const record = ev.log;
4581
+ if (record.user) {
4582
+ record.user = record.user.name;
4583
+ }
4584
+ this.records.unshift(record);
4585
+ },
4586
+ canvasClosed: function (){
4587
+ this.selectedRecord = null;
4588
+ },
4589
+ rowSelected: function (row){
4590
+ this.selectedRecord = null;
4591
+ setTimeout(() => {
4592
+ this.selectedRecord = row;
4593
+ this.$emit('rowSelected', row);
4594
+ }, 100);
4595
+ },
4596
+ changeKey: function (key, value){
4597
+ this[key] = value;
4598
+ if (key === 'order_by') {
4599
+ this.order_method = (this.order_method === 'desc') ? 'asc' : 'desc';
4600
+ }
4601
+ if (key === 'per_page') {
4602
+ this.page = 1;
4603
+ }
4604
+ this.reloadData();
4605
+ },
4606
+ getLinkClass: function (config){
4607
+ if (typeof config === 'object') {
4608
+ return config.class
4609
+ }
4610
+ return ''
4611
+ },
4612
+ reloadNotifications: function (){
4613
+ this.reloadData();
4614
+ },
4615
+ replaceActionUrl: function (path, obj){
4616
+ if (path) {
4617
+ var matches = path.match(/\{(.*?)\}/g);
4618
+ try {
4619
+ matches.forEach(key => {
4620
+ key = key.replace('{', '');
4621
+ key = key.replace('}', '');
4622
+ path = path.replace(`{${key}}`, obj[key]);
4623
+ });
4624
+ return path
4625
+ } catch (e) {
4626
+ return path
4627
+ }
4628
+ }
4629
+ return ''
4630
+ },
4631
+ doEmitAction: function (action, data){
4632
+ if (typeof action === 'function') {
4633
+ action(data);
4634
+ } else {
4635
+ this.$emit(action, data);
4636
+ }
4637
+ },
4638
+ getFieldType: function (field){
4639
+ const numbers = ['age', 'interest_rate_pa'];
4640
+ const moneys = ['amount', 'paid_amount', 'total_paid', 'total', 'monthly_fee', 'share_cost', 'min_contribution', 'min_membership_contribution'];
4641
+ const dates = ['invoice_date', 'free_tier_days', 'updated_at', 'created_at', 'end_time'];
4642
+ if (numbers.includes(field)) {
4643
+ return 'numeric'
4644
+ }
4645
+ if (moneys.includes(field)) {
4646
+ return 'money'
4647
+ }
4648
+ if (dates.includes(field)) {
4649
+ return 'date'
4650
+ }
4651
+ return 'string'
4652
+ },
4653
+ replaceLinkUrl: function (path, obj){
4654
+ if (typeof path === 'object') {
4655
+ path = path.link ?? path.url;
4656
+ }
4657
+ var matches = path.match(/\{(.*?)\}/g);
4658
+ matches && matches.forEach(key => {
4659
+ key = key.replace('{', '');
4660
+ key = key.replace('}', '');
4661
+ path = path.replace(`{${key}}`, obj[key]);
4662
+ });
4663
+ return path
4664
+ },
4665
+ formatDate: function (date){
4666
+ return moment__default["default"](date).format('lll')
4667
+ },
4668
+ setMoreDetailsModel: function (row){
4669
+ this.moreDetailsModel = null;
4670
+ this.moreDetailsModel = row;
4671
+ },
4672
+ loadMoreRecords: function (){
4673
+ this.reloadData(this.page + 1, 1);
4674
+ },
4675
+ exportData: function (template){
4676
+ this.downloading = true;
4677
+ const headers = [];
4678
+ const fields = this.downloadFields ? this.downloadFields : this.headers;
4679
+ fields.forEach(header => {
4680
+ if (typeof header === 'string') {
4681
+ headers.push(header);
4682
+ }
4683
+ });
4684
+ const data = {
4685
+ titles: headers,
4686
+ export: 1
4687
+ };
4688
+ shApis.doPost(this.endPoint, data).then(res => {
4689
+ this.downloading = false;
4690
+ if (res.data.file) {
4691
+ const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
4692
+ window.location.href = url;
4693
+ // window.open('https://facebook.com')
4694
+ // window.open(this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name, '_blank').focus()
4695
+ }
4696
+ }).catch(reason => {
4697
+ this.downloading = false;
4698
+ const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText}`;
4699
+ shRepo.swalError('Error', error);
4700
+ });
4701
+ },
4702
+ setCachedData: function (){
4703
+ if (this.cacheKey) {
4704
+ this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey, []);
4705
+ }
4706
+ },
4707
+ reloadData: function (page, append){
4708
+ if (typeof page !== 'undefined') {
4709
+ this.page = page;
4710
+ }
4711
+ if (this.cacheKey && this.records && this.page < 2) {
4712
+ this.loading = 'done';
4713
+ } else if (!append) {
4714
+ this.loading = 'loading';
4715
+ }
4716
+ const data = {
4717
+ order_by: this.order_by,
4718
+ order_method: this.order_method,
4719
+ per_page: this.per_page,
4720
+ page: this.page,
4721
+ filter_value: this.filter_value,
4722
+ paginated: true,
4723
+ from: this.from,
4724
+ to: this.to,
4725
+ period: this.period,
4726
+ exact: this.exactMatch
4727
+ };
4728
+ if (this.pagination_data) {
4729
+ this.pagination_data.loading = 1;
4730
+ }
4731
+ let endPoint = this.endPoint;
4732
+ if (!this.endPoint && this.query) {
4733
+ //send ql query
4734
+ endPoint = 'sh-ql';
4735
+ data.query = this.query;
4736
+ }
4737
+ shApis.doGet(endPoint, data).then(req => {
4738
+ this.$emit('dataReloaded', this.pagination_data);
4739
+ this.loading = 'done';
4740
+ const response = req.data.data;
4741
+ if (this.page < 2 && this.cacheKey) {
4742
+ ShStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
4743
+ }
4744
+ this.pagination_data = {
4745
+ current: response.current_page,
4746
+ start: response.from,
4747
+ end: response.last_page,
4748
+ record_count: response.total,
4749
+ per_page: response.per_page,
4750
+ loading: 0,
4751
+ displayCount: response.total > response.per_page ? response.per_page : response.total
4752
+ };
4753
+ if (!this.headers && response.total > 0) {
4754
+ this.tableHeaders = Object.keys(response.data[0]);
4755
+ }
4756
+ if (append) {
4757
+ this.records.push(...response.data);
4758
+ let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
4759
+ if (totalShown > response.total) {
4760
+ totalShown = response.total;
4761
+ }
4762
+ this.pagination_data.displayCount = totalShown;
4763
+ const scrollingElement = (document.scrollingElement || document.body);
4764
+ scrollingElement.scrollTop = scrollingElement.scrollHeight;
4765
+ } else {
4766
+ this.records = response.data;
4767
+ }
4768
+ }).catch(reason => {
4769
+ const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
4770
+ this.loading_error = error;
4771
+ this.loading = 'error';
4772
+ });
4773
+ }
4774
+ },
4775
+ watch: {
4776
+ hideIds: {
4777
+ handler(newValue){
4778
+ this.records = this.records.filter(record => !newValue.includes(record.id) && record);
4779
+ },
4780
+ deep: true
4781
+ },
4782
+ reload(){
4783
+ this.reloadData();
4784
+ },
4785
+ endPoint(){
4786
+ this.reloadData();
4787
+ }
4788
+ },
4789
+ components: {
4790
+ ShRange: script$c,
4791
+ ShSilentAction: script$d,
4792
+ ShConfirmAction: script$e,
4793
+ ShCanvas: script$h,
4794
+ pagination: script$f
4795
+ },
4796
+ computed: {
4797
+ windowWidth: function (){
4798
+ return window.innerWidth
4799
+ },
4800
+ user(){
4801
+ return null
4802
+ },
4803
+ hasDefaultSlot(){
4804
+ return !!this.$slots.default
4805
+ },
4806
+ hasRecordsSlot(){
4807
+ return !!this.$slots.records
4808
+ }
4809
+ }
4810
+ };
4811
+
4812
+
4813
+ var script$b = /*#__PURE__*/Object.assign(__default__, {
4814
+ setup(__props) {
4815
+
4816
+ const noRecordsComponent = vue.inject('noRecordsComponent', script$g);
4817
+
4818
+ return (_ctx, _cache) => {
4799
4819
  const _component_router_link = vue.resolveComponent("router-link");
4800
- const _component_sh_confirm_action = vue.resolveComponent("sh-confirm-action");
4801
- const _component_sh_silent_action = vue.resolveComponent("sh-silent-action");
4802
- const _component_pagination = vue.resolveComponent("pagination");
4803
- const _component_sh_canvas = vue.resolveComponent("sh-canvas");
4804
4820
 
4805
4821
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
4806
- ($props.hasDownload)
4822
+ (__props.hasDownload)
4807
4823
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
4808
4824
  vue.createElementVNode("button", {
4809
- disabled: $data.downloading,
4825
+ disabled: _ctx.downloading,
4810
4826
  class: "btn btn-warning btn-sm",
4811
- onClick: _cache[0] || (_cache[0] = $event => ($options.exportData()))
4827
+ onClick: _cache[0] || (_cache[0] = $event => (_ctx.exportData()))
4812
4828
  }, [
4813
- (!$data.downloading)
4829
+ (!_ctx.downloading)
4814
4830
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4815
4831
  _hoisted_4$5,
4816
4832
  vue.createTextVNode(" Export ")
@@ -4822,37 +4838,37 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4822
4838
  ], 8 /* PROPS */, _hoisted_3$5)
4823
4839
  ]))
4824
4840
  : vue.createCommentVNode("v-if", true),
4825
- (!$props.hideSearch)
4841
+ (!__props.hideSearch)
4826
4842
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
4827
4843
  vue.createElementVNode("div", _hoisted_8$2, [
4828
- ($props.hasRange)
4844
+ (__props.hasRange)
4829
4845
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$2, [
4830
- vue.createVNode(_component_sh_range, { onRangeSelected: $options.rangeChanged }, null, 8 /* PROPS */, ["onRangeSelected"])
4846
+ vue.createVNode(script$c, { onRangeSelected: _ctx.rangeChanged }, null, 8 /* PROPS */, ["onRangeSelected"])
4831
4847
  ]))
4832
4848
  : vue.createCommentVNode("v-if", true),
4833
4849
  vue.createElementVNode("div", {
4834
- class: vue.normalizeClass(["sh-search-bar input-group", $props.hasRange ? 'ms-2':''])
4850
+ class: vue.normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'ms-2':''])
4835
4851
  }, [
4836
4852
  vue.withDirectives(vue.createElementVNode("input", {
4837
- onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4838
- onKeyup: _cache[2] || (_cache[2] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4853
+ onKeydown: _cache[1] || (_cache[1] = (...args) => (_ctx.userTyping && _ctx.userTyping(...args))),
4854
+ onKeyup: _cache[2] || (_cache[2] = (...args) => (_ctx.userTyping && _ctx.userTyping(...args))),
4839
4855
  type: "search",
4840
- onChange: _cache[3] || (_cache[3] = $event => ($options.reloadData(1))),
4841
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($data.filter_value) = $event)),
4842
- placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
4856
+ onChange: _cache[3] || (_cache[3] = $event => (_ctx.reloadData(1))),
4857
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((_ctx.filter_value) = $event)),
4858
+ placeholder: __props.searchPlaceholder ? __props.searchPlaceholder : 'Search',
4843
4859
  class: "form-control sh-search-input"
4844
4860
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
4845
- [vue.vModelText, $data.filter_value]
4861
+ [vue.vModelText, _ctx.filter_value]
4846
4862
  ]),
4847
- ($data.filter_value.length > 1)
4863
+ (_ctx.filter_value.length > 1)
4848
4864
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11$1, [
4849
4865
  vue.withDirectives(vue.createElementVNode("input", {
4850
- onChange: _cache[5] || (_cache[5] = (...args) => ($options.reloadData && $options.reloadData(...args))),
4866
+ onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
4851
4867
  value: true,
4852
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => (($data.exactMatch) = $event)),
4868
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((_ctx.exactMatch) = $event)),
4853
4869
  type: "checkbox"
4854
4870
  }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
4855
- [vue.vModelCheckbox, $data.exactMatch]
4871
+ [vue.vModelCheckbox, _ctx.exactMatch]
4856
4872
  ]),
4857
4873
  _hoisted_12$1
4858
4874
  ]))
@@ -4861,17 +4877,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4861
4877
  ])
4862
4878
  ]))
4863
4879
  : vue.createCommentVNode("v-if", true),
4864
- ($options.hasDefaultSlot)
4880
+ (_ctx.hasDefaultSlot)
4865
4881
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
4866
- ($data.loading === 'loading')
4882
+ (_ctx.loading === 'loading')
4867
4883
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13$1, _hoisted_15$1))
4868
- : ($data.loading === 'error')
4884
+ : (_ctx.loading === 'error')
4869
4885
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
4870
- vue.createElementVNode("span", _hoisted_17$1, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4886
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
4871
4887
  ]))
4872
4888
  : vue.createCommentVNode("v-if", true),
4873
- ($data.loading === 'done')
4874
- ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList($data.records, (record) => {
4889
+ (_ctx.loading === 'done')
4890
+ ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.records, (record) => {
4875
4891
  return vue.renderSlot(_ctx.$slots, "default", {
4876
4892
  key: record.id,
4877
4893
  record: record
@@ -4879,137 +4895,145 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4879
4895
  }), 128 /* KEYED_FRAGMENT */))
4880
4896
  : vue.createCommentVNode("v-if", true)
4881
4897
  ], 64 /* STABLE_FRAGMENT */))
4882
- : ($options.hasRecordsSlot)
4898
+ : (_ctx.hasRecordsSlot)
4883
4899
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
4884
- ($data.loading === 'loading')
4885
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18$1, _hoisted_20))
4886
- : ($data.loading === 'error')
4887
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
4888
- vue.createElementVNode("span", _hoisted_22, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4900
+ (_ctx.loading === 'loading')
4901
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17$1, _hoisted_19))
4902
+ : (_ctx.loading === 'error')
4903
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
4904
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
4889
4905
  ]))
4890
4906
  : vue.createCommentVNode("v-if", true),
4891
- ($data.loading === 'done')
4892
- ? vue.renderSlot(_ctx.$slots, "records", {
4893
- key: 2,
4894
- records: $data.records
4895
- })
4907
+ (_ctx.loading === 'done')
4908
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
4909
+ (_ctx.records.length === 0)
4910
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(noRecordsComponent)), { key: 0 }, {
4911
+ default: vue.withCtx(() => [
4912
+ _hoisted_21,
4913
+ vue.createTextVNode(" " + vue.toDisplayString(__props.noRecordsMessage ?? 'No records found'), 1 /* TEXT */)
4914
+ ]),
4915
+ _: 1 /* STABLE */
4916
+ }))
4917
+ : vue.createCommentVNode("v-if", true),
4918
+ vue.renderSlot(_ctx.$slots, "records", { records: _ctx.records })
4919
+ ], 64 /* STABLE_FRAGMENT */))
4896
4920
  : vue.createCommentVNode("v-if", true)
4897
4921
  ], 64 /* STABLE_FRAGMENT */))
4898
- : ($options.windowWidth > 700)
4922
+ : (_ctx.windowWidth > 700)
4899
4923
  ? (vue.openBlock(), vue.createElementBlock("table", {
4900
4924
  key: 4,
4901
- class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
4925
+ class: vue.normalizeClass(["table sh-table", __props.tableHover ? 'table-hover':''])
4902
4926
  }, [
4903
- vue.createElementVNode("thead", _hoisted_23, [
4927
+ vue.createElementVNode("thead", _hoisted_22, [
4904
4928
  vue.createElementVNode("tr", null, [
4905
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.tableHeaders, (title) => {
4929
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tableHeaders, (title) => {
4906
4930
  return (vue.openBlock(), vue.createElementBlock("th", { key: title }, [
4907
4931
  (typeof title === 'string')
4908
4932
  ? (vue.openBlock(), vue.createElementBlock("a", {
4909
4933
  key: 0,
4910
4934
  class: "text-capitalize",
4911
- onClick: $event => ($options.changeKey('order_by',title))
4912
- }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4935
+ onClick: $event => (_ctx.changeKey('order_by',title))
4936
+ }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
4913
4937
  : (typeof title === 'function')
4914
4938
  ? (vue.openBlock(), vue.createElementBlock("a", {
4915
4939
  key: 1,
4916
4940
  class: "text-capitalize",
4917
- onClick: $event => ($options.changeKey('order_by',title(null)))
4918
- }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
4941
+ onClick: $event => (_ctx.changeKey('order_by',title(null)))
4942
+ }, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
4919
4943
  : (typeof title !== 'undefined')
4920
4944
  ? (vue.openBlock(), vue.createElementBlock("a", {
4921
4945
  key: 2,
4922
4946
  class: "text-capitalize",
4923
- onClick: $event => ($options.changeKey('order_by',title))
4924
- }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
4947
+ onClick: $event => (_ctx.changeKey('order_by',title))
4948
+ }, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
4925
4949
  : vue.createCommentVNode("v-if", true)
4926
4950
  ]))
4927
4951
  }), 128 /* KEYED_FRAGMENT */)),
4928
- ($props.actions)
4929
- ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_27, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
4952
+ (__props.actions)
4953
+ ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_26, vue.toDisplayString(__props.actions.label), 1 /* TEXT */))
4930
4954
  : vue.createCommentVNode("v-if", true)
4931
4955
  ])
4932
4956
  ]),
4933
- vue.createElementVNode("tbody", _hoisted_28, [
4934
- ($data.loading === 'loading')
4935
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_29, [
4957
+ vue.createElementVNode("tbody", _hoisted_27, [
4958
+ (_ctx.loading === 'loading')
4959
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_28, [
4936
4960
  vue.createElementVNode("td", {
4937
- colspan: $data.tableHeaders.length
4938
- }, _hoisted_32, 8 /* PROPS */, _hoisted_30)
4961
+ colspan: _ctx.tableHeaders.length
4962
+ }, _hoisted_31, 8 /* PROPS */, _hoisted_29)
4939
4963
  ]))
4940
- : ($data.loading === 'error')
4941
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
4964
+ : (_ctx.loading === 'error')
4965
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_32, [
4942
4966
  vue.createElementVNode("td", {
4943
- colspan: $data.tableHeaders.length
4944
- }, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
4967
+ colspan: _ctx.tableHeaders.length
4968
+ }, vue.toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */, _hoisted_33)
4945
4969
  ]))
4946
- : ($data.records.length === 0)
4947
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_35, [
4970
+ : (_ctx.records.length === 0)
4971
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_34, [
4948
4972
  vue.createElementVNode("td", {
4949
- colspan: $props.actions ? $data.tableHeaders.length + 1 : $data.tableHeaders.length
4973
+ colspan: __props.actions ? _ctx.tableHeaders.length + 1 : _ctx.tableHeaders.length
4950
4974
  }, [
4951
- _hoisted_37,
4975
+ _hoisted_36,
4952
4976
  vue.createTextVNode(" No records found ")
4953
- ], 8 /* PROPS */, _hoisted_36)
4977
+ ], 8 /* PROPS */, _hoisted_35)
4954
4978
  ]))
4955
- : ($data.loading === 'done')
4956
- ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
4979
+ : (_ctx.loading === 'done')
4980
+ ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.records, (record, index) => {
4957
4981
  return (vue.openBlock(), vue.createElementBlock("tr", {
4958
4982
  key: record.id,
4959
4983
  class: vue.normalizeClass(record.class),
4960
- onClick: $event => ($options.rowSelected(record))
4984
+ onClick: $event => (_ctx.rowSelected(record))
4961
4985
  }, [
4962
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.tableHeaders, (key) => {
4986
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tableHeaders, (key) => {
4963
4987
  return (vue.openBlock(), vue.createElementBlock("td", { key: key }, [
4964
- (typeof key === 'string' && $props.links && $props.links[key])
4988
+ (typeof key === 'string' && __props.links && __props.links[key])
4965
4989
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4966
4990
  key: 0,
4967
- target: $props.links[key].target ? '_blank':'',
4968
- to: $options.replaceLinkUrl($props.links[key],record),
4969
- class: vue.normalizeClass($options.getLinkClass($props.links[key])),
4991
+ target: __props.links[key].target ? '_blank':'',
4992
+ to: _ctx.replaceLinkUrl(__props.links[key],record),
4993
+ class: vue.normalizeClass(_ctx.getLinkClass(__props.links[key])),
4970
4994
  innerHTML: record[key]
4971
4995
  }, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
4972
- : ($options.getFieldType(key) === 'numeric')
4973
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4974
- : ($options.getFieldType(key) === 'money')
4975
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4976
- : ($options.getFieldType(key) === 'date')
4977
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
4996
+ : (_ctx.getFieldType(key) === 'numeric')
4997
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_38, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
4998
+ : (_ctx.getFieldType(key) === 'money')
4999
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5000
+ : (_ctx.getFieldType(key) === 'date')
5001
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
4978
5002
  : (typeof key === 'string')
4979
5003
  ? (vue.openBlock(), vue.createElementBlock("span", {
4980
5004
  key: 4,
4981
5005
  innerHTML: record[key]
4982
- }, null, 8 /* PROPS */, _hoisted_42))
5006
+ }, null, 8 /* PROPS */, _hoisted_41))
4983
5007
  : (typeof key === 'function')
4984
5008
  ? (vue.openBlock(), vue.createElementBlock("span", {
4985
5009
  key: 5,
4986
5010
  innerHTML: key(record, index)
4987
- }, null, 8 /* PROPS */, _hoisted_43))
5011
+ }, null, 8 /* PROPS */, _hoisted_42))
4988
5012
  : (vue.openBlock(), vue.createElementBlock("span", {
4989
5013
  key: 6,
4990
5014
  innerHTML: record[key[0]]
4991
- }, null, 8 /* PROPS */, _hoisted_44))
5015
+ }, null, 8 /* PROPS */, _hoisted_43))
4992
5016
  ]))
4993
5017
  }), 128 /* KEYED_FRAGMENT */)),
4994
- ($props.actions)
4995
- ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_45, [
4996
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
5018
+ (__props.actions)
5019
+ ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_44, [
5020
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
4997
5021
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
4998
5022
  key: act.path
4999
5023
  }, [
5000
- (!act.permission || $options.user.isAllowedTo(act.permission))
5024
+ (!act.permission || _ctx.user.isAllowedTo(act.permission))
5001
5025
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5002
5026
  (!act.validator || act.validator(record))
5003
5027
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5004
5028
  (['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
5005
- ? (vue.openBlock(), vue.createBlock(_component_sh_confirm_action, {
5029
+ ? (vue.openBlock(), vue.createBlock(script$e, {
5006
5030
  key: 0,
5007
- onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
5008
- onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
5009
- onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
5031
+ onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
5032
+ onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
5033
+ onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
5010
5034
  "loading-message": act.label,
5011
5035
  class: vue.normalizeClass(act.class),
5012
- url: $options.replaceActionUrl(act.url,record)
5036
+ url: _ctx.replaceActionUrl(act.url,record)
5013
5037
  }, {
5014
5038
  default: vue.withCtx(() => [
5015
5039
  (act.icon)
@@ -5023,14 +5047,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5023
5047
  _: 2 /* DYNAMIC */
5024
5048
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
5025
5049
  : (['silentAction','silentaction','silent-action','silent'].includes(act.type))
5026
- ? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
5050
+ ? (vue.openBlock(), vue.createBlock(script$d, {
5027
5051
  key: 1,
5028
- onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
5029
- onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
5030
- onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
5052
+ onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
5053
+ onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
5054
+ onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
5031
5055
  "loading-message": act.label,
5032
5056
  class: vue.normalizeClass(act.class),
5033
- url: $options.replaceActionUrl(act.url,record)
5057
+ url: _ctx.replaceActionUrl(act.url,record)
5034
5058
  }, {
5035
5059
  default: vue.withCtx(() => [
5036
5060
  (act.icon)
@@ -5057,13 +5081,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5057
5081
  }, null, 2 /* CLASS */))
5058
5082
  : vue.createCommentVNode("v-if", true),
5059
5083
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5060
- ], 10 /* CLASS, PROPS */, _hoisted_46))
5084
+ ], 10 /* CLASS, PROPS */, _hoisted_45))
5061
5085
  : (act.emits)
5062
5086
  ? (vue.openBlock(), vue.createElementBlock("button", {
5063
5087
  key: 3,
5064
5088
  title: act.title,
5065
5089
  class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
5066
- onClick: $event => ($options.doEmitAction(act.emits,record))
5090
+ onClick: $event => (_ctx.doEmitAction(act.emits,record))
5067
5091
  }, [
5068
5092
  (act.icon)
5069
5093
  ? (vue.openBlock(), vue.createElementBlock("span", {
@@ -5072,12 +5096,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5072
5096
  }, null, 2 /* CLASS */))
5073
5097
  : vue.createCommentVNode("v-if", true),
5074
5098
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5075
- ], 10 /* CLASS, PROPS */, _hoisted_47))
5099
+ ], 10 /* CLASS, PROPS */, _hoisted_46))
5076
5100
  : (!act.emits)
5077
5101
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
5078
5102
  key: 4,
5079
5103
  title: act.title,
5080
- to: $options.replaceActionUrl(act.path,record),
5104
+ to: _ctx.replaceActionUrl(act.path,record),
5081
5105
  class: vue.normalizeClass(act.class)
5082
5106
  }, {
5083
5107
  default: vue.withCtx(() => [
@@ -5100,74 +5124,74 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5100
5124
  }), 128 /* KEYED_FRAGMENT */))
5101
5125
  ]))
5102
5126
  : vue.createCommentVNode("v-if", true)
5103
- ], 10 /* CLASS, PROPS */, _hoisted_38))
5127
+ ], 10 /* CLASS, PROPS */, _hoisted_37))
5104
5128
  }), 128 /* KEYED_FRAGMENT */))
5105
5129
  : vue.createCommentVNode("v-if", true)
5106
5130
  ])
5107
5131
  ], 2 /* CLASS */))
5108
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [
5109
- ($data.loading === 'loading')
5110
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, _hoisted_51))
5111
- : ($data.loading === 'error')
5112
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
5113
- vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
5132
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, [
5133
+ (_ctx.loading === 'loading')
5134
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, _hoisted_50))
5135
+ : (_ctx.loading === 'error')
5136
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
5137
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
5114
5138
  ]))
5115
- : ($data.loading === 'done')
5116
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
5117
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
5139
+ : (_ctx.loading === 'done')
5140
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
5141
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
5118
5142
  return (vue.openBlock(), vue.createElementBlock("div", {
5119
5143
  key: record.id,
5120
5144
  class: "single-mobile-req bg-light p-3",
5121
- onClick: $event => ($options.rowSelected(record))
5145
+ onClick: $event => (_ctx.rowSelected(record))
5122
5146
  }, [
5123
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.tableHeaders, (key) => {
5147
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tableHeaders, (key) => {
5124
5148
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5125
5149
  key: key[0]
5126
5150
  }, [
5127
5151
  (typeof key === 'string' )
5128
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5152
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
5129
5153
  : (typeof key === 'function')
5130
- ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5131
- : (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5154
+ ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
5155
+ : (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
5132
5156
  vue.createElementVNode("span", null, [
5133
- (typeof key === 'string' && $props.links && $props.links[key])
5157
+ (typeof key === 'string' && __props.links && __props.links[key])
5134
5158
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
5135
5159
  key: 0,
5136
- to: $options.replaceLinkUrl($props.links[key],record),
5137
- class: vue.normalizeClass($options.getLinkClass($props.links[key])),
5160
+ to: _ctx.replaceLinkUrl(__props.links[key],record),
5161
+ class: vue.normalizeClass(_ctx.getLinkClass(__props.links[key])),
5138
5162
  innerHTML: record[key]
5139
5163
  }, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
5140
- : ($options.getFieldType(key) === 'numeric')
5141
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5142
- : ($options.getFieldType(key) === 'money')
5143
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5144
- : ($options.getFieldType(key) === 'date')
5145
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
5164
+ : (_ctx.getFieldType(key) === 'numeric')
5165
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5166
+ : (_ctx.getFieldType(key) === 'money')
5167
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
5168
+ : (_ctx.getFieldType(key) === 'date')
5169
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
5146
5170
  : (typeof key === 'string')
5147
5171
  ? (vue.openBlock(), vue.createElementBlock("span", {
5148
5172
  key: 4,
5149
5173
  innerHTML: record[key]
5150
- }, null, 8 /* PROPS */, _hoisted_61))
5174
+ }, null, 8 /* PROPS */, _hoisted_60))
5151
5175
  : (typeof key === 'function')
5152
5176
  ? (vue.openBlock(), vue.createElementBlock("span", {
5153
5177
  key: 5,
5154
5178
  innerHTML: key(record, index )
5155
- }, null, 8 /* PROPS */, _hoisted_62))
5179
+ }, null, 8 /* PROPS */, _hoisted_61))
5156
5180
  : (vue.openBlock(), vue.createElementBlock("span", {
5157
5181
  key: 6,
5158
5182
  innerHTML: record[key[0]]
5159
- }, null, 8 /* PROPS */, _hoisted_63))
5183
+ }, null, 8 /* PROPS */, _hoisted_62))
5160
5184
  ]),
5161
- _hoisted_64
5185
+ _hoisted_63
5162
5186
  ], 64 /* STABLE_FRAGMENT */))
5163
5187
  }), 128 /* KEYED_FRAGMENT */)),
5164
- ($props.actions)
5165
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_65, [
5166
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
5188
+ (__props.actions)
5189
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_64, [
5190
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
5167
5191
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5168
5192
  key: act.path
5169
5193
  }, [
5170
- (!act.permission || $options.user.isAllowedTo(act.permission))
5194
+ (!act.permission || _ctx.user.isAllowedTo(act.permission))
5171
5195
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5172
5196
  (!act.validator || act.validator(record))
5173
5197
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -5185,13 +5209,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5185
5209
  }, null, 2 /* CLASS */))
5186
5210
  : vue.createCommentVNode("v-if", true),
5187
5211
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5188
- ], 10 /* CLASS, PROPS */, _hoisted_66))
5212
+ ], 10 /* CLASS, PROPS */, _hoisted_65))
5189
5213
  : (act.emits)
5190
5214
  ? (vue.openBlock(), vue.createElementBlock("button", {
5191
5215
  key: 1,
5192
5216
  title: act.title,
5193
5217
  class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
5194
- onClick: $event => ($options.doEmitAction(act.emits,record))
5218
+ onClick: $event => (_ctx.doEmitAction(act.emits,record))
5195
5219
  }, [
5196
5220
  (act.icon)
5197
5221
  ? (vue.openBlock(), vue.createElementBlock("span", {
@@ -5200,12 +5224,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5200
5224
  }, null, 2 /* CLASS */))
5201
5225
  : vue.createCommentVNode("v-if", true),
5202
5226
  vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
5203
- ], 10 /* CLASS, PROPS */, _hoisted_67))
5227
+ ], 10 /* CLASS, PROPS */, _hoisted_66))
5204
5228
  : (!act.emits)
5205
5229
  ? (vue.openBlock(), vue.createBlock(_component_router_link, {
5206
5230
  key: 2,
5207
5231
  title: act.title,
5208
- to: $options.replaceActionUrl(act.path,record),
5232
+ to: _ctx.replaceActionUrl(act.path,record),
5209
5233
  class: vue.normalizeClass(act.class)
5210
5234
  }, {
5211
5235
  default: vue.withCtx(() => [
@@ -5228,42 +5252,42 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5228
5252
  }), 128 /* KEYED_FRAGMENT */))
5229
5253
  ]))
5230
5254
  : vue.createCommentVNode("v-if", true)
5231
- ], 8 /* PROPS */, _hoisted_54))
5255
+ ], 8 /* PROPS */, _hoisted_53))
5232
5256
  }), 128 /* KEYED_FRAGMENT */))
5233
5257
  ]))
5234
5258
  : vue.createCommentVNode("v-if", true)
5235
5259
  ])),
5236
- ($data.pagination_data)
5237
- ? (vue.openBlock(), vue.createBlock(_component_pagination, {
5260
+ (_ctx.pagination_data)
5261
+ ? (vue.openBlock(), vue.createBlock(script$f, {
5238
5262
  key: 6,
5239
- onLoadMoreRecords: $options.loadMoreRecords,
5240
- "hide-load-more": $props.hideLoadMore,
5241
- "hide-count": $props.hideCount,
5242
- pagination_data: $data.pagination_data,
5243
- onChangeKey: $options.changeKey,
5244
- "pagination-style": $data.pageStyle
5263
+ onLoadMoreRecords: _ctx.loadMoreRecords,
5264
+ "hide-load-more": __props.hideLoadMore,
5265
+ "hide-count": __props.hideCount,
5266
+ pagination_data: _ctx.pagination_data,
5267
+ onChangeKey: _ctx.changeKey,
5268
+ "pagination-style": _ctx.pageStyle
5245
5269
  }, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
5246
5270
  : vue.createCommentVNode("v-if", true),
5247
- ($props.actions)
5248
- ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 7 }, vue.renderList($props.actions.actions, (action) => {
5271
+ (__props.actions)
5272
+ ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 7 }, vue.renderList(__props.actions.actions, (action) => {
5249
5273
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5250
5274
  key: action.label
5251
5275
  }, [
5252
5276
  (action.canvasId)
5253
- ? (vue.openBlock(), vue.createBlock(_component_sh_canvas, {
5277
+ ? (vue.openBlock(), vue.createBlock(script$h, {
5254
5278
  key: 0,
5255
- onOffcanvasClosed: $options.canvasClosed,
5279
+ onOffcanvasClosed: _ctx.canvasClosed,
5256
5280
  position: action.canvasPosition,
5257
5281
  "canvas-size": action.canvasSize,
5258
5282
  "canvas-title": action.canvasTitle,
5259
5283
  "canvas-id": action.canvasId
5260
5284
  }, {
5261
5285
  default: vue.withCtx(() => [
5262
- ($data.selectedRecord)
5286
+ (_ctx.selectedRecord)
5263
5287
  ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.canvasComponent), vue.mergeProps({
5264
5288
  key: 0,
5265
- onRecordUpdated: $options.reloadData
5266
- }, $options.cleanCanvasProps(action), { record: $data.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
5289
+ onRecordUpdated: _ctx.reloadData
5290
+ }, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
5267
5291
  : vue.createCommentVNode("v-if", true)
5268
5292
  ]),
5269
5293
  _: 2 /* DYNAMIC */
@@ -5274,8 +5298,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5274
5298
  : vue.createCommentVNode("v-if", true)
5275
5299
  ]))
5276
5300
  }
5301
+ }
5302
+
5303
+ });
5277
5304
 
5278
- script$b.render = render;
5279
5305
  script$b.__file = "src/lib/components/ShTable.vue";
5280
5306
 
5281
5307
  var script$a = {
@@ -5958,7 +5984,7 @@ return (_ctx, _cache) => {
5958
5984
  class: "d-none"
5959
5985
  }, "Open Modal", 8 /* PROPS */, _hoisted_1$3),
5960
5986
  (popUp.value === 'modal')
5961
- ? (vue.openBlock(), vue.createBlock(script$j, {
5987
+ ? (vue.openBlock(), vue.createBlock(script$k, {
5962
5988
  key: 0,
5963
5989
  "modal-title": title.value,
5964
5990
  "modal-id": vue.unref(modalId),
@@ -5973,7 +5999,7 @@ return (_ctx, _cache) => {
5973
5999
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
5974
6000
  : vue.createCommentVNode("v-if", true),
5975
6001
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
5976
- ? (vue.openBlock(), vue.createBlock(script$g, {
6002
+ ? (vue.openBlock(), vue.createBlock(script$h, {
5977
6003
  key: 1,
5978
6004
  "canvas-id": vue.unref(canvasId),
5979
6005
  "canvas-title": title.value,
@@ -6004,7 +6030,7 @@ const fields = route.query.fields.split(',');
6004
6030
  const action = route.query.action;
6005
6031
 
6006
6032
  return (_ctx, _cache) => {
6007
- return (vue.openBlock(), vue.createBlock(script$l, {
6033
+ return (vue.openBlock(), vue.createBlock(script$m, {
6008
6034
  fields: vue.unref(fields),
6009
6035
  action: vue.unref(action)
6010
6036
  }, null, 8 /* PROPS */, ["fields", "action"]))
@@ -6105,7 +6131,7 @@ const goBack = () => {
6105
6131
  return (_ctx, _cache) => {
6106
6132
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
6107
6133
  (popUp.value === 'modal')
6108
- ? (vue.openBlock(), vue.createBlock(script$j, {
6134
+ ? (vue.openBlock(), vue.createBlock(script$k, {
6109
6135
  key: 0,
6110
6136
  "modal-title": title.value,
6111
6137
  "data-bs-backdrop": "static",
@@ -6120,7 +6146,7 @@ return (_ctx, _cache) => {
6120
6146
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6121
6147
  : vue.createCommentVNode("v-if", true),
6122
6148
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6123
- ? (vue.openBlock(), vue.createBlock(script$g, {
6149
+ ? (vue.openBlock(), vue.createBlock(script$h, {
6124
6150
  "canvas-title": title.value,
6125
6151
  key: size.value + position.value,
6126
6152
  "canvas-id": vue.unref(canvasId),
@@ -6225,12 +6251,12 @@ return (_ctx, _cache) => {
6225
6251
  ]
6226
6252
  }
6227
6253
  }, null, 8 /* PROPS */, ["reload", "actions"]),
6228
- vue.createVNode(script$j, {
6254
+ vue.createVNode(script$k, {
6229
6255
  "modal-id": "sh_department_modal",
6230
6256
  "modal-title": "Department Form"
6231
6257
  }, {
6232
6258
  default: vue.withCtx(() => [
6233
- vue.createVNode(script$s, {
6259
+ vue.createVNode(script$t, {
6234
6260
  "success-callback": "departmentAdded",
6235
6261
  "current-data": department.value,
6236
6262
  onDepartmentAdded: departmentAdded,
@@ -6385,12 +6411,12 @@ return (_ctx, _cache) => {
6385
6411
  headers: ['id',showModule,'created_at'],
6386
6412
  "end-point": 'admin/departments/department/list-modules/' + id.value
6387
6413
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6388
- vue.createVNode(script$j, {
6414
+ vue.createVNode(script$k, {
6389
6415
  "modal-id": "addModule",
6390
6416
  "modal-title": "Add Module Department"
6391
6417
  }, {
6392
6418
  default: vue.withCtx(() => [
6393
- vue.createVNode(script$s, {
6419
+ vue.createVNode(script$t, {
6394
6420
  "reload-select-items": vue.unref(reload),
6395
6421
  "success-callback": moduleAdded,
6396
6422
  "fill-selects": {
@@ -6412,7 +6438,7 @@ return (_ctx, _cache) => {
6412
6438
  ref: permissionCanvasBtn,
6413
6439
  "data-bs-toggle": "offcanvas"
6414
6440
  }, null, 512 /* NEED_PATCH */),
6415
- vue.createVNode(script$g, {
6441
+ vue.createVNode(script$h, {
6416
6442
  "canvas-id": "permissionsCanvas",
6417
6443
  position: "end enlarged",
6418
6444
  "canvas-title": "Module Permissions"
@@ -6527,7 +6553,7 @@ return (_ctx, _cache) => {
6527
6553
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
6528
6554
  (section.value === 'login')
6529
6555
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
6530
- vue.createVNode(script$s, {
6556
+ vue.createVNode(script$t, {
6531
6557
  class: "sh-login-form",
6532
6558
  fields: ['email','password'],
6533
6559
  "action-label": "Login",
@@ -6552,7 +6578,7 @@ return (_ctx, _cache) => {
6552
6578
  (vue.unref(registerSubTitle))
6553
6579
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
6554
6580
  : vue.createCommentVNode("v-if", true),
6555
- vue.createVNode(script$s, {
6581
+ vue.createVNode(script$t, {
6556
6582
  class: "sh-login-form",
6557
6583
  fields: vue.unref(registrationFields),
6558
6584
  "action-label": "Sign Up",
@@ -6599,10 +6625,11 @@ const ShFrontend = {
6599
6625
  const registerTitle = options.registerTitle ?? 'Create a new account';
6600
6626
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
6601
6627
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
6602
- options.formTextInput ?? script$p;
6628
+ options.formTextInput ?? script$q;
6603
6629
  const loginUrl = options.loginUrl ?? `/login`;
6604
6630
  const redirectLogin = options.redirectLogin ?? `/`;
6605
6631
  const redirectRegister = options.redirectRegister ?? `/`;
6632
+ const noRecordsComponent = options.noRecordsComponent ?? script$g;
6606
6633
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
6607
6634
  const AuthComponent = options.authComponent ?? script;
6608
6635
  app.provide('loginEndpoint',loginEndpoint);
@@ -6616,6 +6643,7 @@ const ShFrontend = {
6616
6643
  app.provide('formComponents', options.shFormComponents ?? {});
6617
6644
  app.provide('loginUrl', loginUrl);
6618
6645
  app.provide('shFormElementClasses',defaultFormElementClasses);
6646
+ app.provide('noRecordsComponent',noRecordsComponent);
6619
6647
  window.swalPosition = swalPosition;
6620
6648
  if(options.router) {
6621
6649
  options.router.addRoute({
@@ -6659,24 +6687,24 @@ var shGql = {
6659
6687
 
6660
6688
  exports.Countries = countries;
6661
6689
  exports.ManagePermissions = script$6;
6662
- exports.ShAutoForm = script$l;
6663
- exports.ShCanvas = script$g;
6690
+ exports.ShAutoForm = script$m;
6691
+ exports.ShCanvas = script$h;
6664
6692
  exports.ShCanvasBtn = script$7;
6665
6693
  exports.ShConfirmAction = script$e;
6666
- exports.ShDropDownForm = script$k;
6694
+ exports.ShDropDownForm = script$l;
6667
6695
  exports.ShDynamicTabs = script$9;
6668
- exports.ShForm = script$s;
6696
+ exports.ShForm = script$t;
6669
6697
  exports.ShFrontend = ShFrontend;
6670
- exports.ShModal = script$j;
6698
+ exports.ShModal = script$k;
6671
6699
  exports.ShModalBtn = script$8;
6672
- exports.ShModalForm = script$i;
6673
- exports.ShModalFormAuto = script$h;
6674
- exports.ShPhone = script$u;
6700
+ exports.ShModalForm = script$j;
6701
+ exports.ShModalFormAuto = script$i;
6702
+ exports.ShPhone = script$v;
6675
6703
  exports.ShQueryPopups = script$3;
6676
6704
  exports.ShRange = script$c;
6677
6705
  exports.ShRoutePopups = script$5;
6678
6706
  exports.ShSilentAction = script$d;
6679
- exports.ShSuggest = script$t;
6707
+ exports.ShSuggest = script$u;
6680
6708
  exports.ShTable = script$b;
6681
6709
  exports.ShTabs = script$a;
6682
6710
  exports.shApis = shApis;