@iankibetsh/shframework 1.8.7 → 1.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/library.mjs CHANGED
@@ -2,7 +2,7 @@ import Axios from 'axios';
2
2
  import moment from 'moment';
3
3
  import Swal from 'sweetalert2';
4
4
  import NProgress from 'nprogress';
5
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
5
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, defineAsyncComponent, markRaw, computed, isRef } from 'vue';
6
6
  import _ from 'lodash';
7
7
  import { useRoute, useRouter } from 'vue-router';
8
8
  import { defineStore, storeToRefs } from 'pinia';
@@ -382,10 +382,25 @@ function doPost (endPoint, data) {
382
382
  }
383
383
  )
384
384
  }
385
+ function graphQlQuery(query) {
386
+ updateSession();
387
+ const data = {
388
+ query: query
389
+ };
390
+ return axios.get('sh-ql', {
391
+ params: data,
392
+ crossOrigin: true,
393
+ headers: {
394
+ Authorization: 'Bearer ' + ShStorage.getItem('access_token')
395
+ // 'X-CSRF-TOKEN': 'INVALID'
396
+ }
397
+ })
398
+ }
385
399
 
386
400
  var shApis = {
387
401
  doGet,
388
- doPost
402
+ doPost,
403
+ graphQlQuery
389
404
  };
390
405
 
391
406
  const countries = [
@@ -1861,7 +1876,7 @@ const countries = [
1861
1876
  }
1862
1877
  ];
1863
1878
 
1864
- var script$s = {
1879
+ var script$w = {
1865
1880
  name: 'PhoneInput',
1866
1881
  props: ['modelValue', 'country_code'],
1867
1882
  data () {
@@ -1931,19 +1946,19 @@ var script$s = {
1931
1946
  }
1932
1947
  };
1933
1948
 
1934
- const _hoisted_1$n = { class: "sh-phone mb-3" };
1935
- const _hoisted_2$e = {
1949
+ const _hoisted_1$o = { class: "sh-phone mb-3" };
1950
+ const _hoisted_2$f = {
1936
1951
  key: 0,
1937
1952
  style: {"display":"contents"}
1938
1953
  };
1939
- const _hoisted_3$d = ["src"];
1940
- const _hoisted_4$d = ["value"];
1954
+ const _hoisted_3$e = ["src"];
1955
+ const _hoisted_4$e = ["value"];
1941
1956
 
1942
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1943
- return (openBlock(), createElementBlock("div", _hoisted_1$n, [
1957
+ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
1958
+ return (openBlock(), createElementBlock("div", _hoisted_1$o, [
1944
1959
  ($data.selectedCountry)
1945
- ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
1946
- createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
1960
+ ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
1961
+ createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$e),
1947
1962
  createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
1948
1963
  ]))
1949
1964
  : createCommentVNode("v-if", true),
@@ -1956,7 +1971,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1956
1971
  return (openBlock(), createElementBlock("option", {
1957
1972
  value: country,
1958
1973
  key: country.dialCode
1959
- }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$d))
1974
+ }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$e))
1960
1975
  }), 128 /* KEYED_FRAGMENT */))
1961
1976
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
1962
1977
  [vModelSelect, $data.selectedCountry]
@@ -1974,16 +1989,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1974
1989
  ]))
1975
1990
  }
1976
1991
 
1977
- script$s.render = render$3;
1978
- script$s.__file = "src/lib/components/form-components/PhoneInput.vue";
1992
+ script$w.render = render$5;
1993
+ script$w.__file = "src/lib/components/form-components/PhoneInput.vue";
1979
1994
 
1980
- const _hoisted_1$m = {
1995
+ const _hoisted_1$n = {
1981
1996
  key: 0,
1982
1997
  class: "dropdown sh-suggest"
1983
1998
  };
1984
- const _hoisted_2$d = ["id"];
1985
- const _hoisted_3$c = { class: "badge bg-secondary m-1 sh-selected-item" };
1986
- const _hoisted_4$c = ["onClick"];
1999
+ const _hoisted_2$e = ["id"];
2000
+ const _hoisted_3$d = { class: "badge bg-secondary m-1 sh-selected-item" };
2001
+ const _hoisted_4$d = ["onClick"];
1987
2002
  const _hoisted_5$a = ["id"];
1988
2003
  const _hoisted_6$9 = ["id", "aria-labelledby"];
1989
2004
  const _hoisted_7$7 = { key: 0 };
@@ -1998,7 +2013,7 @@ const _hoisted_10$5 = {
1998
2013
  };
1999
2014
 
2000
2015
 
2001
- var script$r = {
2016
+ var script$v = {
2002
2017
  __name: 'ShSuggest',
2003
2018
  props: ['fillSelects','modelValue'],
2004
2019
  emits: ['update:modelValue'],
@@ -2079,7 +2094,7 @@ function filterData(e){
2079
2094
 
2080
2095
  return (_ctx, _cache) => {
2081
2096
  return (unref(id))
2082
- ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
2097
+ ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
2083
2098
  createElementVNode("div", {
2084
2099
  id: unref(id),
2085
2100
  "data-bs-toggle": "dropdown",
@@ -2088,14 +2103,14 @@ return (_ctx, _cache) => {
2088
2103
  }, [
2089
2104
  createElementVNode("div", null, [
2090
2105
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
2091
- return (openBlock(), createElementBlock("h5", _hoisted_3$c, [
2106
+ return (openBlock(), createElementBlock("h5", _hoisted_3$d, [
2092
2107
  createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
2093
2108
  createElementVNode("button", {
2094
2109
  onClick: $event => (removeSuggestion(sgt.id)),
2095
2110
  type: "button",
2096
2111
  class: "btn-close border-start border-1 ms-1",
2097
2112
  "aria-label": "Close"
2098
- }, null, 8 /* PROPS */, _hoisted_4$c)
2113
+ }, null, 8 /* PROPS */, _hoisted_4$d)
2099
2114
  ]))
2100
2115
  }), 256 /* UNKEYED_FRAGMENT */))
2101
2116
  ]),
@@ -2106,7 +2121,7 @@ return (_ctx, _cache) => {
2106
2121
  onInput: filterData,
2107
2122
  class: "flex-fill h-100 sh-suggestion-input"
2108
2123
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$a)
2109
- ], 8 /* PROPS */, _hoisted_2$d),
2124
+ ], 8 /* PROPS */, _hoisted_2$e),
2110
2125
  createElementVNode("ul", {
2111
2126
  class: "dropdown-menu w-100",
2112
2127
  id: 'dropwdown_section' + unref(id),
@@ -2139,15 +2154,15 @@ return (_ctx, _cache) => {
2139
2154
 
2140
2155
  };
2141
2156
 
2142
- script$r.__scopeId = "data-v-71cc9569";
2143
- script$r.__file = "src/lib/components/form-components/ShSuggest.vue";
2157
+ script$v.__scopeId = "data-v-71cc9569";
2158
+ script$v.__file = "src/lib/components/form-components/ShSuggest.vue";
2144
2159
 
2145
- var script$q = {
2160
+ var script$u = {
2146
2161
  name: 'ShForm',
2147
2162
  components: {
2148
- PhoneInput: script$s,
2149
- ShSuggest: script$r,
2150
- ShPhone: script$s
2163
+ PhoneInput: script$w,
2164
+ ShSuggest: script$v,
2165
+ ShPhone: script$w
2151
2166
  },
2152
2167
  props: [
2153
2168
  'action',
@@ -2469,17 +2484,17 @@ var script$q = {
2469
2484
  }
2470
2485
  };
2471
2486
 
2472
- const _hoisted_1$l = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2473
- const _hoisted_2$c = {
2487
+ const _hoisted_1$m = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2488
+ const _hoisted_2$d = {
2474
2489
  ref: "ShAutoForm",
2475
2490
  class: "sh-form"
2476
2491
  };
2477
- const _hoisted_3$b = {
2492
+ const _hoisted_3$c = {
2478
2493
  key: 0,
2479
2494
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2480
2495
  role: "alert"
2481
2496
  };
2482
- const _hoisted_4$b = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2497
+ const _hoisted_4$c = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2483
2498
  const _hoisted_5$9 = { key: 0 };
2484
2499
  const _hoisted_6$8 = { key: 1 };
2485
2500
  const _hoisted_7$6 = { class: "row" };
@@ -2525,18 +2540,18 @@ const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
2525
2540
  "aria-hidden": "true"
2526
2541
  }, null, -1 /* HOISTED */);
2527
2542
 
2528
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2543
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2529
2544
  const _component_phone_input = resolveComponent("phone-input");
2530
2545
  const _component_ShSuggest = resolveComponent("ShSuggest");
2531
2546
 
2532
2547
  return (openBlock(), createElementBlock(Fragment, null, [
2533
- _hoisted_1$l,
2534
- createElementVNode("form", _hoisted_2$c, [
2548
+ _hoisted_1$m,
2549
+ createElementVNode("form", _hoisted_2$d, [
2535
2550
  createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2536
2551
  createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2537
2552
  (_ctx.form_status == 3)
2538
- ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
2539
- _hoisted_4$b,
2553
+ ? (openBlock(), createElementBlock("div", _hoisted_3$c, [
2554
+ _hoisted_4$c,
2540
2555
  (_ctx.errorText)
2541
2556
  ? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2542
2557
  : (openBlock(), createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
@@ -2736,10 +2751,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2736
2751
  ], 64 /* STABLE_FRAGMENT */))
2737
2752
  }
2738
2753
 
2739
- script$q.render = render$2;
2740
- script$q.__file = "src/lib/components/ShForm.vue";
2754
+ script$u.render = render$4;
2755
+ script$u.__file = "src/lib/components/ShForm.vue";
2741
2756
 
2742
- var script$p = {
2757
+ var script$t = {
2743
2758
  __name: 'EmailInput',
2744
2759
  props: ['modelValue','label'],
2745
2760
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2779,12 +2794,12 @@ return (_ctx, _cache) => {
2779
2794
 
2780
2795
  };
2781
2796
 
2782
- script$p.__file = "src/lib/components/form-components/EmailInput.vue";
2797
+ script$t.__file = "src/lib/components/form-components/EmailInput.vue";
2783
2798
 
2784
- const _hoisted_1$k = ["min", "max"];
2799
+ const _hoisted_1$l = ["min", "max"];
2785
2800
 
2786
2801
 
2787
- var script$o = {
2802
+ var script$s = {
2788
2803
  __name: 'NumberInput',
2789
2804
  props: ['modelValue','label','min','max'],
2790
2805
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2818,7 +2833,7 @@ return (_ctx, _cache) => {
2818
2833
  onChange: modelValueUpdated,
2819
2834
  onKeydown: modelValueUpdated,
2820
2835
  onUpdated: modelValueUpdated
2821
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$k)), [
2836
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$l)), [
2822
2837
  [vModelText, inputModel.value]
2823
2838
  ])
2824
2839
  }
@@ -2826,9 +2841,9 @@ return (_ctx, _cache) => {
2826
2841
 
2827
2842
  };
2828
2843
 
2829
- script$o.__file = "src/lib/components/form-components/NumberInput.vue";
2844
+ script$s.__file = "src/lib/components/form-components/NumberInput.vue";
2830
2845
 
2831
- var script$n = {
2846
+ var script$r = {
2832
2847
  __name: 'TextInput',
2833
2848
  props: ['modelValue','label','isInvalid'],
2834
2849
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2870,9 +2885,9 @@ return (_ctx, _cache) => {
2870
2885
 
2871
2886
  };
2872
2887
 
2873
- script$n.__file = "src/lib/components/form-components/TextInput.vue";
2888
+ script$r.__file = "src/lib/components/form-components/TextInput.vue";
2874
2889
 
2875
- var script$m = {
2890
+ var script$q = {
2876
2891
  __name: 'TextAreaInput',
2877
2892
  props: ['modelValue','label'],
2878
2893
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2912,12 +2927,12 @@ return (_ctx, _cache) => {
2912
2927
 
2913
2928
  };
2914
2929
 
2915
- script$m.__file = "src/lib/components/form-components/TextAreaInput.vue";
2930
+ script$q.__file = "src/lib/components/form-components/TextAreaInput.vue";
2916
2931
 
2917
- const _hoisted_1$j = ["value"];
2932
+ const _hoisted_1$k = ["value"];
2918
2933
 
2919
2934
 
2920
- var script$l = {
2935
+ var script$p = {
2921
2936
  __name: 'SelectInput',
2922
2937
  props: ['modelValue','label','data','dataUrl'],
2923
2938
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2972,7 +2987,7 @@ return (_ctx, _cache) => {
2972
2987
  return (openBlock(), createElementBlock("option", {
2973
2988
  key: option.id,
2974
2989
  value: option.id
2975
- }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$j))
2990
+ }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$k))
2976
2991
  }), 128 /* KEYED_FRAGMENT */))
2977
2992
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
2978
2993
  [vModelSelect, inputModel.value]
@@ -2982,9 +2997,9 @@ return (_ctx, _cache) => {
2982
2997
 
2983
2998
  };
2984
2999
 
2985
- script$l.__file = "src/lib/components/form-components/SelectInput.vue";
3000
+ script$p.__file = "src/lib/components/form-components/SelectInput.vue";
2986
3001
 
2987
- var script$k = {
3002
+ var script$o = {
2988
3003
  __name: 'PasswordInput',
2989
3004
  props: ['modelValue','label'],
2990
3005
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3020,12 +3035,12 @@ return (_ctx, _cache) => {
3020
3035
 
3021
3036
  };
3022
3037
 
3023
- script$k.__file = "src/lib/components/form-components/PasswordInput.vue";
3038
+ script$o.__file = "src/lib/components/form-components/PasswordInput.vue";
3024
3039
 
3025
- const _hoisted_1$i = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3026
- const _hoisted_2$b = ["onUpdate:modelValue"];
3027
- const _hoisted_3$a = ["innerHTML"];
3028
- const _hoisted_4$a = ["innerHTML"];
3040
+ const _hoisted_1$j = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3041
+ const _hoisted_2$c = ["onUpdate:modelValue"];
3042
+ const _hoisted_3$b = ["innerHTML"];
3043
+ const _hoisted_4$b = ["innerHTML"];
3029
3044
  const _hoisted_5$8 = ["innerHTML"];
3030
3045
  const _hoisted_6$7 = ["disabled"];
3031
3046
  const _hoisted_7$5 = {
@@ -3037,7 +3052,7 @@ const _hoisted_7$5 = {
3037
3052
  const _hoisted_8$4 = { key: 1 };
3038
3053
 
3039
3054
 
3040
- var script$j = {
3055
+ var script$n = {
3041
3056
  __name: 'ShAutoForm',
3042
3057
  props: [
3043
3058
  'action','successCallback','retainDataAfterSubmission',
@@ -3070,13 +3085,13 @@ const getFieldComponent = (fieldObj)=>{
3070
3085
  const defaultPhones = ['phone'];
3071
3086
  const defaultEmails = ['email'];
3072
3087
  const formComponents = inject('formComponents');
3073
- const TextComponent = formComponents.text ?? script$n;
3074
- const TextAreaComponent = formComponents.textArea ?? script$m;
3075
- const EmailComponent = formComponents.email ?? script$p;
3076
- const PhoneComponent = formComponents.phone ?? script$s;
3077
- const NumberComponent = formComponents.number ?? script$o;
3078
- const SelectComponent = formComponents.select ?? script$l;
3079
- const PasswordComponent = formComponents.password ?? script$k;
3088
+ const TextComponent = formComponents.text ?? script$r;
3089
+ const TextAreaComponent = formComponents.textArea ?? script$q;
3090
+ const EmailComponent = formComponents.email ?? script$t;
3091
+ const PhoneComponent = formComponents.phone ?? script$w;
3092
+ const NumberComponent = formComponents.number ?? script$s;
3093
+ const SelectComponent = formComponents.select ?? script$p;
3094
+ const PasswordComponent = formComponents.password ?? script$o;
3080
3095
  if(props.customComponents && props.customComponents[field]) {
3081
3096
  return props.customComponents[field]
3082
3097
  }
@@ -3088,16 +3103,16 @@ const getFieldComponent = (fieldObj)=>{
3088
3103
  }
3089
3104
  else
3090
3105
  if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
3091
- return formComponents.textArea ?? script$m
3106
+ return formComponents.textArea ?? script$q
3092
3107
  } else
3093
3108
  if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
3094
- return formComponents.email ?? script$p
3109
+ return formComponents.email ?? script$t
3095
3110
  } else
3096
3111
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3097
- return formComponents.phone ?? script$s
3112
+ return formComponents.phone ?? script$w
3098
3113
  } else
3099
3114
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3100
- return formComponents.number ?? script$o
3115
+ return formComponents.number ?? script$s
3101
3116
  }
3102
3117
  // else
3103
3118
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
@@ -3106,7 +3121,7 @@ const getFieldComponent = (fieldObj)=>{
3106
3121
  // if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3107
3122
  // return formComponents.date ?? DateInput
3108
3123
  // }
3109
- return formComponents.text ?? script$n
3124
+ return formComponents.text ?? script$r
3110
3125
  };
3111
3126
  const shFormElementClasses = ref(null);
3112
3127
  shFormElementClasses.value = inject('shFormElementClasses');
@@ -3220,7 +3235,7 @@ onMounted((ev)=>{
3220
3235
 
3221
3236
  return (_ctx, _cache) => {
3222
3237
  return (openBlock(), createElementBlock(Fragment, null, [
3223
- _hoisted_1$i,
3238
+ _hoisted_1$j,
3224
3239
  createElementVNode("form", {
3225
3240
  class: normalizeClass([__props.formClass, "sh-form"]),
3226
3241
  ref_key: "shAutoForm",
@@ -3237,7 +3252,7 @@ return (_ctx, _cache) => {
3237
3252
  key: 0,
3238
3253
  type: "hidden",
3239
3254
  "onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
3240
- }, null, 8 /* PROPS */, _hoisted_2$b)), [
3255
+ }, null, 8 /* PROPS */, _hoisted_2$c)), [
3241
3256
  [vModelText, formFields.value[index].value]
3242
3257
  ])
3243
3258
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -3246,7 +3261,7 @@ return (_ctx, _cache) => {
3246
3261
  key: 0,
3247
3262
  class: normalizeClass(getElementClass('formLabel')),
3248
3263
  innerHTML: field.label
3249
- }, null, 10 /* CLASS, PROPS */, _hoisted_3$a))
3264
+ }, null, 10 /* CLASS, PROPS */, _hoisted_3$b))
3250
3265
  : createCommentVNode("v-if", true),
3251
3266
  (openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
3252
3267
  isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
@@ -3260,7 +3275,7 @@ return (_ctx, _cache) => {
3260
3275
  key: 1,
3261
3276
  class: normalizeClass(getElementClass('formLabel')),
3262
3277
  innerHTML: field.label
3263
- }, null, 10 /* CLASS, PROPS */, _hoisted_4$a))
3278
+ }, null, 10 /* CLASS, PROPS */, _hoisted_4$b))
3264
3279
  : createCommentVNode("v-if", true),
3265
3280
  (field.helper)
3266
3281
  ? (openBlock(), createElementBlock("div", {
@@ -3303,12 +3318,12 @@ return (_ctx, _cache) => {
3303
3318
 
3304
3319
  };
3305
3320
 
3306
- script$j.__file = "src/lib/components/ShAutoForm.vue";
3321
+ script$n.__file = "src/lib/components/ShAutoForm.vue";
3307
3322
 
3308
- const _hoisted_1$h = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3309
- const _hoisted_2$a = { class: "dropdown" };
3323
+ const _hoisted_1$i = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3324
+ const _hoisted_2$b = { class: "dropdown" };
3310
3325
 
3311
- var script$i = {
3326
+ var script$m = {
3312
3327
  __name: 'ShDropDownForm',
3313
3328
  props: ['action',
3314
3329
  'classes',
@@ -3338,8 +3353,8 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3338
3353
 
3339
3354
  return (_ctx, _cache) => {
3340
3355
  return (openBlock(), createElementBlock(Fragment, null, [
3341
- _hoisted_1$h,
3342
- createElementVNode("div", _hoisted_2$a, [
3356
+ _hoisted_1$i,
3357
+ createElementVNode("div", _hoisted_2$b, [
3343
3358
  createElementVNode("a", {
3344
3359
  class: normalizeClass(unref(btnClass)),
3345
3360
  href: "#",
@@ -3355,7 +3370,7 @@ return (_ctx, _cache) => {
3355
3370
  class: "dropdown-menu px-2 py-1",
3356
3371
  "aria-labelledby": dropdownId
3357
3372
  }, [
3358
- createVNode(script$q, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3373
+ createVNode(script$u, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3359
3374
  ])
3360
3375
  ])
3361
3376
  ], 64 /* STABLE_FRAGMENT */))
@@ -3364,12 +3379,12 @@ return (_ctx, _cache) => {
3364
3379
 
3365
3380
  };
3366
3381
 
3367
- script$i.__file = "src/lib/components/ShDropDownForm.vue";
3382
+ script$m.__file = "src/lib/components/ShDropDownForm.vue";
3368
3383
 
3369
- const _hoisted_1$g = ["id"];
3370
- const _hoisted_2$9 = { class: "modal-content" };
3371
- const _hoisted_3$9 = { class: "modal-header" };
3372
- const _hoisted_4$9 = { class: "modal-title" };
3384
+ const _hoisted_1$h = ["id"];
3385
+ const _hoisted_2$a = { class: "modal-content" };
3386
+ const _hoisted_3$a = { class: "modal-header" };
3387
+ const _hoisted_4$a = { class: "modal-title" };
3373
3388
  const _hoisted_5$7 = /*#__PURE__*/createElementVNode("button", {
3374
3389
  class: "btn btn-danger btn-sm",
3375
3390
  "data-bs-dismiss": "modal",
@@ -3378,7 +3393,7 @@ const _hoisted_5$7 = /*#__PURE__*/createElementVNode("button", {
3378
3393
  const _hoisted_6$6 = { class: "modal-body" };
3379
3394
  const _hoisted_7$4 = { class: "section" };
3380
3395
 
3381
- var script$h = {
3396
+ var script$l = {
3382
3397
  __name: 'ShModal',
3383
3398
  props: {
3384
3399
  modalId: {
@@ -3415,9 +3430,9 @@ return (_ctx, _cache) => {
3415
3430
  createElementVNode("div", {
3416
3431
  class: normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
3417
3432
  }, [
3418
- createElementVNode("div", _hoisted_2$9, [
3419
- createElementVNode("div", _hoisted_3$9, [
3420
- createElementVNode("h3", _hoisted_4$9, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3433
+ createElementVNode("div", _hoisted_2$a, [
3434
+ createElementVNode("div", _hoisted_3$a, [
3435
+ createElementVNode("h3", _hoisted_4$a, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3421
3436
  _hoisted_5$7
3422
3437
  ]),
3423
3438
  createElementVNode("div", _hoisted_6$6, [
@@ -3427,17 +3442,17 @@ return (_ctx, _cache) => {
3427
3442
  ])
3428
3443
  ])
3429
3444
  ], 2 /* CLASS */)
3430
- ], 8 /* PROPS */, _hoisted_1$g))
3445
+ ], 8 /* PROPS */, _hoisted_1$h))
3431
3446
  }
3432
3447
  }
3433
3448
 
3434
3449
  };
3435
3450
 
3436
- script$h.__file = "src/lib/components/ShModal.vue";
3451
+ script$l.__file = "src/lib/components/ShModal.vue";
3437
3452
 
3438
- const _hoisted_1$f = ["href"];
3453
+ const _hoisted_1$g = ["href"];
3439
3454
 
3440
- var script$g = {
3455
+ var script$k = {
3441
3456
  __name: 'ShModalForm',
3442
3457
  props: ['action',
3443
3458
  'classes',
@@ -3476,13 +3491,13 @@ return (_ctx, _cache) => {
3476
3491
  "data-bs-toggle": "modal"
3477
3492
  }, [
3478
3493
  renderSlot(_ctx.$slots, "default")
3479
- ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3480
- createVNode(script$h, {
3494
+ ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3495
+ createVNode(script$l, {
3481
3496
  "modal-id": modalId,
3482
3497
  "modal-title": __props.modalTitle
3483
3498
  }, {
3484
3499
  default: withCtx(() => [
3485
- createVNode(script$q, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3500
+ createVNode(script$u, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3486
3501
  ]),
3487
3502
  _: 1 /* STABLE */
3488
3503
  }, 8 /* PROPS */, ["modal-title"])
@@ -3492,11 +3507,11 @@ return (_ctx, _cache) => {
3492
3507
 
3493
3508
  };
3494
3509
 
3495
- script$g.__file = "src/lib/components/ShModalForm.vue";
3510
+ script$k.__file = "src/lib/components/ShModalForm.vue";
3496
3511
 
3497
- const _hoisted_1$e = ["href"];
3512
+ const _hoisted_1$f = ["href"];
3498
3513
 
3499
- var script$f = {
3514
+ var script$j = {
3500
3515
  __name: 'ShModalFormAuto',
3501
3516
  props: ['action',
3502
3517
  'classes',
@@ -3536,13 +3551,13 @@ return (_ctx, _cache) => {
3536
3551
  "data-bs-toggle": "modal"
3537
3552
  }, [
3538
3553
  renderSlot(_ctx.$slots, "default")
3539
- ], 10 /* CLASS, PROPS */, _hoisted_1$e),
3540
- createVNode(script$h, {
3554
+ ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3555
+ createVNode(script$l, {
3541
3556
  "modal-id": modalId,
3542
3557
  "modal-title": __props.modalTitle
3543
3558
  }, {
3544
3559
  default: withCtx(() => [
3545
- createVNode(script$j, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3560
+ createVNode(script$n, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3546
3561
  ]),
3547
3562
  _: 1 /* STABLE */
3548
3563
  }, 8 /* PROPS */, ["modal-title"])
@@ -3552,17 +3567,17 @@ return (_ctx, _cache) => {
3552
3567
 
3553
3568
  };
3554
3569
 
3555
- script$f.__file = "src/lib/components/ShModalFormAuto.vue";
3570
+ script$j.__file = "src/lib/components/ShModalFormAuto.vue";
3556
3571
 
3557
- const _hoisted_1$d = ["id"];
3558
- const _hoisted_2$8 = { class: "offcanvas-header" };
3559
- const _hoisted_3$8 = {
3572
+ const _hoisted_1$e = ["id"];
3573
+ const _hoisted_2$9 = { class: "offcanvas-header" };
3574
+ const _hoisted_3$9 = {
3560
3575
  class: "offcanvas-title",
3561
3576
  id: "offcanvasScrollingLabel"
3562
3577
  };
3563
- const _hoisted_4$8 = { class: "offcanvas-body" };
3578
+ const _hoisted_4$9 = { class: "offcanvas-body" };
3564
3579
 
3565
- var script$e = {
3580
+ var script$i = {
3566
3581
  __name: 'ShCanvas',
3567
3582
  props: {
3568
3583
  canvasId: {
@@ -3607,8 +3622,8 @@ return (_ctx, _cache) => {
3607
3622
  id: __props.canvasId,
3608
3623
  "aria-labelledby": "offcanvasScrollingLabel"
3609
3624
  }, [
3610
- createElementVNode("div", _hoisted_2$8, [
3611
- createElementVNode("h5", _hoisted_3$8, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3625
+ createElementVNode("div", _hoisted_2$9, [
3626
+ createElementVNode("h5", _hoisted_3$9, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3612
3627
  createElementVNode("button", {
3613
3628
  type: "button",
3614
3629
  ref: "closecanvas",
@@ -3618,18 +3633,18 @@ return (_ctx, _cache) => {
3618
3633
  "aria-label": "Close"
3619
3634
  }, null, 512 /* NEED_PATCH */)
3620
3635
  ]),
3621
- createElementVNode("div", _hoisted_4$8, [
3636
+ createElementVNode("div", _hoisted_4$9, [
3622
3637
  renderSlot(_ctx.$slots, "default")
3623
3638
  ])
3624
- ], 10 /* CLASS, PROPS */, _hoisted_1$d))
3639
+ ], 10 /* CLASS, PROPS */, _hoisted_1$e))
3625
3640
  }
3626
3641
  }
3627
3642
 
3628
3643
  };
3629
3644
 
3630
- script$e.__file = "src/lib/components/ShCanvas.vue";
3645
+ script$i.__file = "src/lib/components/ShCanvas.vue";
3631
3646
 
3632
- var script$d = {
3647
+ var script$h = {
3633
3648
  name: 'Pagination',
3634
3649
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
3635
3650
  data () {
@@ -3700,12 +3715,12 @@ var script$d = {
3700
3715
  }
3701
3716
  };
3702
3717
 
3703
- const _hoisted_1$c = { key: 0 };
3704
- const _hoisted_2$7 = { class: "record_count_body mb-3" };
3705
- const _hoisted_3$7 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3706
- const _hoisted_4$7 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
3718
+ const _hoisted_1$d = { key: 0 };
3719
+ const _hoisted_2$8 = { class: "record_count_body mb-3" };
3720
+ const _hoisted_3$8 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3721
+ const _hoisted_4$8 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
3707
3722
  const _hoisted_9$4 = [
3708
- _hoisted_4$7
3723
+ _hoisted_4$8
3709
3724
  ];
3710
3725
  const _hoisted_10$3 = { class: "record_counts" };
3711
3726
  const _hoisted_11$2 = {
@@ -3748,11 +3763,11 @@ const _hoisted_23$1 = {
3748
3763
  class: "spinner-border"
3749
3764
  };
3750
3765
 
3751
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3766
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3752
3767
  return ($props.paginationStyle !== 'loadMore')
3753
- ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
3754
- createElementVNode("div", _hoisted_2$7, [
3755
- _hoisted_3$7,
3768
+ ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
3769
+ createElementVNode("div", _hoisted_2$8, [
3770
+ _hoisted_3$8,
3756
3771
  createTextVNode("  "),
3757
3772
  withDirectives(createElementVNode("select", {
3758
3773
  class: "select_per_page",
@@ -3825,17 +3840,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3825
3840
  ]))
3826
3841
  }
3827
3842
 
3828
- script$d.render = render$1;
3829
- script$d.__file = "src/lib/components/list_templates/Pagination.vue";
3843
+ script$h.render = render$3;
3844
+ script$h.__file = "src/lib/components/list_templates/Pagination.vue";
3830
3845
 
3831
- const _hoisted_1$b = /*#__PURE__*/createElementVNode("span", {
3846
+ const _hoisted_1$c = /*#__PURE__*/createElementVNode("span", {
3832
3847
  class: "spinner-border spinner-border-sm me-1",
3833
3848
  role: "status",
3834
3849
  "aria-hidden": "true"
3835
3850
  }, null, -1 /* HOISTED */);
3836
3851
 
3837
3852
 
3838
- var script$c = {
3853
+ var script$g = {
3839
3854
  __name: 'ShConfirmAction',
3840
3855
  props: {
3841
3856
  data: Object,
@@ -3908,7 +3923,7 @@ return (_ctx, _cache) => {
3908
3923
  }, [
3909
3924
  (processing.value)
3910
3925
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3911
- _hoisted_1$b,
3926
+ _hoisted_1$c,
3912
3927
  createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
3913
3928
  ], 64 /* STABLE_FRAGMENT */))
3914
3929
  : createCommentVNode("v-if", true),
@@ -3921,15 +3936,15 @@ return (_ctx, _cache) => {
3921
3936
 
3922
3937
  };
3923
3938
 
3924
- script$c.__file = "src/lib/components/ShConfirmAction.vue";
3939
+ script$g.__file = "src/lib/components/ShConfirmAction.vue";
3925
3940
 
3926
- const _hoisted_1$a = /*#__PURE__*/createElementVNode("span", {
3941
+ const _hoisted_1$b = /*#__PURE__*/createElementVNode("span", {
3927
3942
  class: "spinner-border spinner-border-sm me-1",
3928
3943
  role: "status",
3929
3944
  "aria-hidden": "true"
3930
3945
  }, null, -1 /* HOISTED */);
3931
3946
 
3932
- var script$b = {
3947
+ var script$f = {
3933
3948
  __name: 'ShSilentAction',
3934
3949
  props: {
3935
3950
  data: Object,
@@ -4004,7 +4019,7 @@ return (_ctx, _cache) => {
4004
4019
  }, [
4005
4020
  (processing.value)
4006
4021
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4007
- _hoisted_1$a,
4022
+ _hoisted_1$b,
4008
4023
  createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4009
4024
  ], 64 /* STABLE_FRAGMENT */))
4010
4025
  : createCommentVNode("v-if", true),
@@ -4017,9 +4032,9 @@ return (_ctx, _cache) => {
4017
4032
 
4018
4033
  };
4019
4034
 
4020
- script$b.__file = "src/lib/components/ShSilentAction.vue";
4035
+ script$f.__file = "src/lib/components/ShSilentAction.vue";
4021
4036
 
4022
- var script$a = {
4037
+ var script$e = {
4023
4038
  name: 'sh-table',
4024
4039
  props: ['endPoint', 'headers','query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
4025
4040
  inject: ['channel'],
@@ -4209,7 +4224,8 @@ var script$a = {
4209
4224
  order_method: this.order_method,
4210
4225
  per_page: this.per_page,
4211
4226
  page: this.page,
4212
- filter_value: this.filter_value
4227
+ filter_value: this.filter_value,
4228
+ paginated: true
4213
4229
  };
4214
4230
  if (this.pagination_data) {
4215
4231
  this.pagination_data.loading = 1;
@@ -4273,10 +4289,10 @@ var script$a = {
4273
4289
  this.reloadData();
4274
4290
  },
4275
4291
  components: {
4276
- ShSilentAction: script$b,
4277
- ShConfirmAction: script$c,
4278
- ShCanvas: script$e,
4279
- pagination: script$d
4292
+ ShSilentAction: script$f,
4293
+ ShConfirmAction: script$g,
4294
+ ShCanvas: script$i,
4295
+ pagination: script$h
4280
4296
  },
4281
4297
  computed: {
4282
4298
  windowWidth: function () {
@@ -4294,13 +4310,13 @@ var script$a = {
4294
4310
  }
4295
4311
  };
4296
4312
 
4297
- const _hoisted_1$9 = { class: "auto-table mt-2" };
4298
- const _hoisted_2$6 = {
4313
+ const _hoisted_1$a = { class: "auto-table mt-2" };
4314
+ const _hoisted_2$7 = {
4299
4315
  key: 0,
4300
4316
  class: "col-md-4 mb-2"
4301
4317
  };
4302
- const _hoisted_3$6 = ["disabled"];
4303
- const _hoisted_4$6 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4318
+ const _hoisted_3$7 = ["disabled"];
4319
+ const _hoisted_4$7 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4304
4320
  const _hoisted_5$6 = /*#__PURE__*/createElementVNode("span", {
4305
4321
  class: "spinner-border spinner-border-sm",
4306
4322
  role: "status",
@@ -4450,16 +4466,16 @@ const _hoisted_63 = { key: 0 };
4450
4466
  const _hoisted_64 = ["href"];
4451
4467
  const _hoisted_65 = ["title", "onClick"];
4452
4468
 
4453
- function render(_ctx, _cache, $props, $setup, $data, $options) {
4469
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
4454
4470
  const _component_router_link = resolveComponent("router-link");
4455
4471
  const _component_sh_confirm_action = resolveComponent("sh-confirm-action");
4456
4472
  const _component_sh_silent_action = resolveComponent("sh-silent-action");
4457
4473
  const _component_pagination = resolveComponent("pagination");
4458
4474
  const _component_sh_canvas = resolveComponent("sh-canvas");
4459
4475
 
4460
- return (openBlock(), createElementBlock("div", _hoisted_1$9, [
4476
+ return (openBlock(), createElementBlock("div", _hoisted_1$a, [
4461
4477
  ($props.hasDownload)
4462
- ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
4478
+ ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
4463
4479
  createElementVNode("button", {
4464
4480
  disabled: $data.downloading,
4465
4481
  class: "btn btn-warning btn-sm",
@@ -4467,14 +4483,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4467
4483
  }, [
4468
4484
  (!$data.downloading)
4469
4485
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4470
- _hoisted_4$6,
4486
+ _hoisted_4$7,
4471
4487
  createTextVNode(" Export ")
4472
4488
  ], 64 /* STABLE_FRAGMENT */))
4473
4489
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4474
4490
  _hoisted_5$6,
4475
4491
  _hoisted_6$5
4476
4492
  ], 64 /* STABLE_FRAGMENT */))
4477
- ], 8 /* PROPS */, _hoisted_3$6)
4493
+ ], 8 /* PROPS */, _hoisted_3$7)
4478
4494
  ]))
4479
4495
  : createCommentVNode("v-if", true),
4480
4496
  (!$props.hideSearch)
@@ -4910,10 +4926,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4910
4926
  ]))
4911
4927
  }
4912
4928
 
4913
- script$a.render = render;
4914
- script$a.__file = "src/lib/components/ShTable.vue";
4929
+ script$e.render = render$2;
4930
+ script$e.__file = "src/lib/components/ShTable.vue";
4915
4931
 
4916
- var script$9 = {
4932
+ var script$d = {
4917
4933
  __name: 'ShTabs',
4918
4934
  props: {
4919
4935
  tabs: {
@@ -5058,22 +5074,22 @@ return (_ctx, _cache) => {
5058
5074
 
5059
5075
  };
5060
5076
 
5061
- script$9.__file = "src/lib/components/ShTabs.vue";
5077
+ script$d.__file = "src/lib/components/ShTabs.vue";
5062
5078
 
5063
- const _hoisted_1$8 = {
5079
+ const _hoisted_1$9 = {
5064
5080
  class: "nav nav-tabs",
5065
5081
  role: "tablist"
5066
5082
  };
5067
- const _hoisted_2$5 = {
5083
+ const _hoisted_2$6 = {
5068
5084
  class: "nav-item",
5069
5085
  role: "presentation"
5070
5086
  };
5071
- const _hoisted_3$5 = ["onClick"];
5072
- const _hoisted_4$5 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5087
+ const _hoisted_3$6 = ["onClick"];
5088
+ const _hoisted_4$6 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5073
5089
  const _hoisted_5$5 = { class: "sh_tab_count" };
5074
5090
  const _hoisted_6$4 = { class: "tab-content" };
5075
5091
 
5076
- var script$8 = {
5092
+ var script$c = {
5077
5093
  __name: 'ShDynamicTabs',
5078
5094
  props: ['tabs','data'],
5079
5095
  setup(__props) {
@@ -5098,9 +5114,9 @@ function setTab(tab){
5098
5114
 
5099
5115
  return (_ctx, _cache) => {
5100
5116
  return (openBlock(), createElementBlock(Fragment, null, [
5101
- createElementVNode("ul", _hoisted_1$8, [
5117
+ createElementVNode("ul", _hoisted_1$9, [
5102
5118
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab) => {
5103
- return (openBlock(), createElementBlock("li", _hoisted_2$5, [
5119
+ return (openBlock(), createElementBlock("li", _hoisted_2$6, [
5104
5120
  createElementVNode("button", {
5105
5121
  onClick: $event => (setTab(tab)),
5106
5122
  class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
@@ -5108,11 +5124,11 @@ return (_ctx, _cache) => {
5108
5124
  createTextVNode(toDisplayString(tab.label) + " ", 1 /* TEXT */),
5109
5125
  (tab.count || tab.tabCount)
5110
5126
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5111
- _hoisted_4$5,
5127
+ _hoisted_4$6,
5112
5128
  createElementVNode("sup", _hoisted_5$5, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
5113
5129
  ], 64 /* STABLE_FRAGMENT */))
5114
5130
  : createCommentVNode("v-if", true)
5115
- ], 10 /* CLASS, PROPS */, _hoisted_3$5)
5131
+ ], 10 /* CLASS, PROPS */, _hoisted_3$6)
5116
5132
  ]))
5117
5133
  }), 256 /* UNKEYED_FRAGMENT */))
5118
5134
  ]),
@@ -5127,12 +5143,12 @@ return (_ctx, _cache) => {
5127
5143
 
5128
5144
  };
5129
5145
 
5130
- script$8.__file = "src/lib/components/ShDynamicTabs.vue";
5146
+ script$c.__file = "src/lib/components/ShDynamicTabs.vue";
5131
5147
 
5132
- const _hoisted_1$7 = ["href"];
5148
+ const _hoisted_1$8 = ["href"];
5133
5149
 
5134
5150
 
5135
- var script$7 = {
5151
+ var script$b = {
5136
5152
  __name: 'ShModalBtn',
5137
5153
  props: {
5138
5154
  modalId: {
@@ -5149,18 +5165,18 @@ return (_ctx, _cache) => {
5149
5165
  "data-bs-toggle": "modal"
5150
5166
  }, [
5151
5167
  renderSlot(_ctx.$slots, "default")
5152
- ], 8 /* PROPS */, _hoisted_1$7))
5168
+ ], 8 /* PROPS */, _hoisted_1$8))
5153
5169
  }
5154
5170
  }
5155
5171
 
5156
5172
  };
5157
5173
 
5158
- script$7.__file = "src/lib/components/ShModalBtn.vue";
5174
+ script$b.__file = "src/lib/components/ShModalBtn.vue";
5159
5175
 
5160
- const _hoisted_1$6 = ["href"];
5176
+ const _hoisted_1$7 = ["href"];
5161
5177
 
5162
5178
 
5163
- var script$6 = {
5179
+ var script$a = {
5164
5180
  __name: 'ShCanvasBtn',
5165
5181
  props: {
5166
5182
  canvasId: {
@@ -5178,13 +5194,13 @@ return (_ctx, _cache) => {
5178
5194
  "data-bs-toggle": "offcanvas"
5179
5195
  }, [
5180
5196
  renderSlot(_ctx.$slots, "default")
5181
- ], 8 /* PROPS */, _hoisted_1$6))
5197
+ ], 8 /* PROPS */, _hoisted_1$7))
5182
5198
  }
5183
5199
  }
5184
5200
 
5185
5201
  };
5186
5202
 
5187
- script$6.__file = "src/lib/components/ShCanvasBtn.vue";
5203
+ script$a.__file = "src/lib/components/ShCanvasBtn.vue";
5188
5204
 
5189
5205
  const useUserStore = defineStore('user-store', {
5190
5206
  state: () => ({
@@ -5283,18 +5299,18 @@ const useUserStore = defineStore('user-store', {
5283
5299
  });
5284
5300
 
5285
5301
  const _withScopeId$1 = n => (pushScopeId("data-v-0d4fa0ac"),n=n(),popScopeId(),n);
5286
- const _hoisted_1$5 = { class: "row permissions-main d-flex" };
5287
- const _hoisted_2$4 = {
5302
+ const _hoisted_1$6 = { class: "row permissions-main d-flex" };
5303
+ const _hoisted_2$5 = {
5288
5304
  id: "permissions-nav",
5289
5305
  class: "col-md-3 d-flex align-items-center py-4"
5290
5306
  };
5291
- const _hoisted_3$4 = {
5307
+ const _hoisted_3$5 = {
5292
5308
  key: 0,
5293
5309
  class: "mx-auto"
5294
5310
  };
5295
- const _hoisted_4$4 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5311
+ const _hoisted_4$5 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5296
5312
  const _hoisted_5$4 = [
5297
- _hoisted_4$4
5313
+ _hoisted_4$5
5298
5314
  ];
5299
5315
  const _hoisted_6$3 = {
5300
5316
  key: 1,
@@ -5323,7 +5339,7 @@ const _hoisted_17 = { class: "col-md-3" };
5323
5339
  const _hoisted_18 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
5324
5340
 
5325
5341
 
5326
- var script$5 = {
5342
+ var script$9 = {
5327
5343
  __name: 'ManagePermissions',
5328
5344
  emits: ['success'],
5329
5345
  setup(__props, { emit }) {
@@ -5427,10 +5443,10 @@ const getPermissionStyle = permission => {
5427
5443
  };
5428
5444
 
5429
5445
  return (_ctx, _cache) => {
5430
- return (openBlock(), createElementBlock("div", _hoisted_1$5, [
5431
- createElementVNode("div", _hoisted_2$4, [
5446
+ return (openBlock(), createElementBlock("div", _hoisted_1$6, [
5447
+ createElementVNode("div", _hoisted_2$5, [
5432
5448
  (loadingModules.value)
5433
- ? (openBlock(), createElementBlock("div", _hoisted_3$4, _hoisted_5$4))
5449
+ ? (openBlock(), createElementBlock("div", _hoisted_3$5, _hoisted_5$4))
5434
5450
  : (openBlock(), createElementBlock("ul", _hoisted_6$3, [
5435
5451
  (openBlock(true), createElementBlock(Fragment, null, renderList(modules.value, (module) => {
5436
5452
  return (openBlock(), createElementBlock("li", {
@@ -5481,7 +5497,7 @@ return (_ctx, _cache) => {
5481
5497
  (permissionsChanged.value)
5482
5498
  ? (openBlock(), createElementBlock("div", _hoisted_16, [
5483
5499
  createElementVNode("div", _hoisted_17, [
5484
- createVNode(script$b, {
5500
+ createVNode(script$f, {
5485
5501
  onSuccess: permissionsUpdated,
5486
5502
  url: `sh-departments/department/permissions/${unref(departmentId)}/${selectedModule.value}`,
5487
5503
  data: {permissions: selectedPermissions.value},
@@ -5505,14 +5521,167 @@ return (_ctx, _cache) => {
5505
5521
 
5506
5522
  };
5507
5523
 
5508
- script$5.__scopeId = "data-v-0d4fa0ac";
5509
- script$5.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5524
+ script$9.__scopeId = "data-v-0d4fa0ac";
5525
+ script$9.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5526
+
5527
+ const _hoisted_1$5 = { class: "alert alert-info" };
5528
+ const _hoisted_2$4 = /*#__PURE__*/createElementVNode("span", { class: "spinner-border" }, null, -1 /* HOISTED */);
5529
+ const _hoisted_3$4 = /*#__PURE__*/createElementVNode("span", null, "Loading", -1 /* HOISTED */);
5530
+ const _hoisted_4$4 = [
5531
+ _hoisted_2$4,
5532
+ _hoisted_3$4
5533
+ ];
5534
+
5535
+ function render$1(_ctx, _cache) {
5536
+ return (openBlock(), createElementBlock("div", _hoisted_1$5, _hoisted_4$4))
5537
+ }
5538
+
5539
+ const script$8 = {};
5540
+
5541
+
5542
+ script$8.render = render$1;
5543
+ script$8.__file = "src/lib/components/popups/etc/PopupLoading.vue";
5544
+
5545
+ function render(_ctx, _cache) {
5546
+ return (openBlock(), createElementBlock("h5", null, "Error loading popup"))
5547
+ }
5548
+
5549
+ const script$7 = {};
5550
+
5551
+
5552
+ script$7.render = render;
5553
+ script$7.__file = "src/lib/components/popups/etc/ErrorLoadingPopup.vue";
5554
+
5555
+ var script$6 = {
5556
+ __name: 'Popups',
5557
+ setup(__props) {
5558
+
5559
+ const route = useRoute();
5560
+ const popUp = ref(route.meta.popUp);
5561
+ const modalId = _.uniqueId('modal_');
5562
+ const canvasId = _.uniqueId('canvas_');
5563
+ let PopupComponent = ref(null);
5564
+ ref(null);
5565
+ const router = useRouter();
5566
+ const position = ref(null);
5567
+ const size = ref(null);
5568
+ const AsyncComp =ref(null);
5569
+ watch(() => route.query.popup, pop => {
5570
+ popUp.value = pop;
5571
+ position.value = route.query.position ?? route.query.side;
5572
+ size.value = route.query.size;
5573
+ if (popUp.value) {
5574
+ loadPopupComponent();
5575
+ setTimeout(() => {
5576
+ initPopup();
5577
+ }, 100);
5578
+ } else {
5579
+ //no pop up, check if we have any unclosed backdrop
5580
+ setTimeout(() => {
5581
+ closeOrphanedBackdrops();
5582
+ }, 100);
5583
+ }
5584
+ });
5585
+ const loadPopupComponent = ()=>{
5586
+ const component = route.query.comp || '';
5587
+ PopupComponent.value = defineAsyncComponent({
5588
+ // the loader function
5589
+ loader: () => import(`/src/views/popups/${component}Popup.vue`),
5590
+
5591
+ // A component to use while the async component is loading
5592
+ loadingComponent: script$8,
5593
+ // Delay before showing the loading component. Default: 200ms.
5594
+ delay: 200,
5595
+
5596
+ // A component to use if the load fails
5597
+ errorComponent: script$7,
5598
+ // The error component will be displayed if a timeout is
5599
+ // provided and exceeded. Default: Infinity.
5600
+ timeout: 3000
5601
+ });
5602
+ };
5603
+ const closeOrphanedBackdrops = () => {
5604
+ const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
5605
+ if (offCanvasBackdrop) {
5606
+ if (!document.querySelector('.offcanvas.show')) {
5607
+ offCanvasBackdrop.remove();
5608
+ }
5609
+ }
5610
+ const modalBackdrop = document.querySelector('.modal-backdrop');
5611
+ if (modalBackdrop) {
5612
+ if (!document.querySelector('.modal.show')) {
5613
+ modalBackdrop.remove();
5614
+ }
5615
+ }
5616
+ };
5617
+ const initPopup = () => {
5618
+ if (popUp.value === 'modal') {
5619
+ // modalButton.value.click()
5620
+ const modal = document.getElementById(modalId);
5621
+ const bsModal = new Modal(modal, {});
5622
+ bsModal.show();
5623
+ modal.addEventListener('hidden.bs.modal', event => {
5624
+ event.target.id === modalId && goBack();
5625
+ });
5626
+ } else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
5627
+ const offCanvas = document.getElementById(canvasId);
5628
+ const bsOffCanvas = new Offcanvas(offCanvas, {});
5629
+ bsOffCanvas.show();
5630
+ offCanvas.addEventListener('hidden.bs.offcanvas', event => {
5631
+ event.target.id === canvasId && goBack();
5632
+ });
5633
+ }
5634
+ };
5635
+ const goBack = () => {
5636
+ if (route.matched.length) {
5637
+ let backUrl = route.path;
5638
+ // const params = route.params
5639
+ // Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]))
5640
+ router.push(backUrl);
5641
+ }
5642
+ };
5643
+
5644
+ return (_ctx, _cache) => {
5645
+ return (openBlock(), createElementBlock(Fragment, null, [
5646
+ (popUp.value === 'modal')
5647
+ ? (openBlock(), createBlock(script$l, {
5648
+ key: 0,
5649
+ "modal-id": unref(modalId),
5650
+ "modal-size": size.value
5651
+ }, {
5652
+ default: withCtx(() => [
5653
+ createVNode(unref(PopupComponent))
5654
+ ]),
5655
+ _: 1 /* STABLE */
5656
+ }, 8 /* PROPS */, ["modal-id", "modal-size"]))
5657
+ : createCommentVNode("v-if", true),
5658
+ (['offcanvas','canvas','offCanvas'].includes(popUp.value))
5659
+ ? (openBlock(), createBlock(script$i, {
5660
+ key: 1,
5661
+ "canvas-id": unref(canvasId),
5662
+ "canvas-size": size.value,
5663
+ position: position.value
5664
+ }, {
5665
+ default: withCtx(() => [
5666
+ createVNode(unref(PopupComponent)),
5667
+ createVNode(unref(AsyncComp))
5668
+ ]),
5669
+ _: 1 /* STABLE */
5670
+ }, 8 /* PROPS */, ["canvas-id", "canvas-size", "position"]))
5671
+ : createCommentVNode("v-if", true)
5672
+ ], 64 /* STABLE_FRAGMENT */))
5673
+ }
5674
+ }
5675
+
5676
+ };
5677
+
5678
+ script$6.__file = "src/lib/components/popups/Popups.vue";
5510
5679
 
5511
5680
  const _hoisted_1$4 = ["href"];
5512
5681
 
5513
5682
 
5514
- var script$4 = {
5515
- __name: 'ShPopups',
5683
+ var script$5 = {
5684
+ __name: 'RoutePopups',
5516
5685
  setup(__props) {
5517
5686
 
5518
5687
  const route = useRoute();
@@ -5524,13 +5693,11 @@ ref(null);
5524
5693
  const router = useRouter();
5525
5694
  const position = ref(null);
5526
5695
  const size = ref(null);
5527
- const popups = [];
5528
- const popupPaths = [];
5529
5696
  watch(() => route.meta, meta => {
5530
5697
  popUp.value = meta.popUp ?? meta.popup;
5531
5698
  if (popUp.value) {
5532
5699
  // popups.push(meta)
5533
- !popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta);
5700
+ // !popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta)
5534
5701
  position.value = meta.position ?? meta.side;
5535
5702
  size.value = meta.size;
5536
5703
  componentView.value = markRaw(route.matched[route.matched.length - 1].components.default);
@@ -5594,7 +5761,7 @@ return (_ctx, _cache) => {
5594
5761
  class: "d-none"
5595
5762
  }, "Open Modal", 8 /* PROPS */, _hoisted_1$4),
5596
5763
  (popUp.value === 'modal')
5597
- ? (openBlock(), createBlock(script$h, {
5764
+ ? (openBlock(), createBlock(script$l, {
5598
5765
  key: 0,
5599
5766
  "modal-id": unref(modalId),
5600
5767
  "modal-size": size.value
@@ -5606,7 +5773,7 @@ return (_ctx, _cache) => {
5606
5773
  }, 8 /* PROPS */, ["modal-id", "modal-size"]))
5607
5774
  : createCommentVNode("v-if", true),
5608
5775
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
5609
- ? (openBlock(), createBlock(script$e, {
5776
+ ? (openBlock(), createBlock(script$i, {
5610
5777
  key: 1,
5611
5778
  "canvas-id": unref(canvasId),
5612
5779
  "canvas-size": size.value,
@@ -5624,6 +5791,23 @@ return (_ctx, _cache) => {
5624
5791
 
5625
5792
  };
5626
5793
 
5794
+ script$5.__file = "src/lib/components/popups/RoutePopups.vue";
5795
+
5796
+ var script$4 = {
5797
+ __name: 'ShPopups',
5798
+ setup(__props) {
5799
+
5800
+
5801
+ return (_ctx, _cache) => {
5802
+ return (openBlock(), createElementBlock(Fragment, null, [
5803
+ createVNode(script$6),
5804
+ createVNode(script$5)
5805
+ ], 64 /* STABLE_FRAGMENT */))
5806
+ }
5807
+ }
5808
+
5809
+ };
5810
+
5627
5811
  script$4.__file = "src/lib/components/ShPopups.vue";
5628
5812
 
5629
5813
  const _hoisted_1$3 = { class: "sh-range" };
@@ -5840,7 +6024,7 @@ return (_ctx, _cache) => {
5840
6024
  _hoisted_5$2,
5841
6025
  createTextVNode(" ADD DEPARTMENT")
5842
6026
  ], 512 /* NEED_PATCH */),
5843
- createVNode(script$a, {
6027
+ createVNode(script$e, {
5844
6028
  headers: ['id','name','description', 'created_at'],
5845
6029
  "end-point": "sh-departments/list",
5846
6030
  actions: {
@@ -5854,12 +6038,12 @@ return (_ctx, _cache) => {
5854
6038
  ]
5855
6039
  }
5856
6040
  }),
5857
- createVNode(script$h, {
6041
+ createVNode(script$l, {
5858
6042
  "modal-id": "sh-department_modal",
5859
6043
  "modal-title": "Department Form"
5860
6044
  }, {
5861
6045
  default: withCtx(() => [
5862
- createVNode(script$q, {
6046
+ createVNode(script$u, {
5863
6047
  "success-callback": "departmentAdded",
5864
6048
  onDepartmentAdded: departmentAdded,
5865
6049
  action: "admin/departments/store",
@@ -5993,7 +6177,7 @@ return (_ctx, _cache) => {
5993
6177
  createElementVNode("div", _hoisted_2$1, [
5994
6178
  _hoisted_3$1,
5995
6179
  createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
5996
- createVNode(script$a, {
6180
+ createVNode(script$e, {
5997
6181
  actions: {
5998
6182
  label: 'Actions',
5999
6183
  actions: [
@@ -6013,12 +6197,12 @@ return (_ctx, _cache) => {
6013
6197
  headers: ['id',showModule,'created_at'],
6014
6198
  "end-point": 'admin/departments/department/list-modules/' + id.value
6015
6199
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6016
- createVNode(script$h, {
6200
+ createVNode(script$l, {
6017
6201
  "modal-id": "addModule",
6018
6202
  "modal-title": "Add Module Department"
6019
6203
  }, {
6020
6204
  default: withCtx(() => [
6021
- createVNode(script$q, {
6205
+ createVNode(script$u, {
6022
6206
  "reload-select-items": unref(reload),
6023
6207
  "success-callback": moduleAdded,
6024
6208
  "fill-selects": {
@@ -6040,7 +6224,7 @@ return (_ctx, _cache) => {
6040
6224
  ref: permissionCanvasBtn,
6041
6225
  "data-bs-toggle": "offcanvas"
6042
6226
  }, null, 512 /* NEED_PATCH */),
6043
- createVNode(script$e, {
6227
+ createVNode(script$i, {
6044
6228
  "canvas-id": "permissionsCanvas",
6045
6229
  position: "end enlarged",
6046
6230
  "canvas-title": "Module Permissions"
@@ -6155,7 +6339,7 @@ return (_ctx, _cache) => {
6155
6339
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6156
6340
  (section.value === 'login')
6157
6341
  ? (openBlock(), createElementBlock("div", _hoisted_2, [
6158
- createVNode(script$q, {
6342
+ createVNode(script$u, {
6159
6343
  class: "sh-login-form",
6160
6344
  fields: ['email','password'],
6161
6345
  "action-label": "Login",
@@ -6180,7 +6364,7 @@ return (_ctx, _cache) => {
6180
6364
  (unref(registerSubTitle))
6181
6365
  ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
6182
6366
  : createCommentVNode("v-if", true),
6183
- createVNode(script$q, {
6367
+ createVNode(script$u, {
6184
6368
  class: "sh-login-form",
6185
6369
  fields: unref(registrationFields),
6186
6370
  "action-label": "Sign Up",
@@ -6227,7 +6411,7 @@ const ShFrontend = {
6227
6411
  const registerTitle = options.registerTitle ?? 'Create a new account';
6228
6412
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
6229
6413
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
6230
- options.formTextInput ?? script$n;
6414
+ options.formTextInput ?? script$r;
6231
6415
  const loginUrl = options.loginUrl ?? `/login`;
6232
6416
  const redirectLogin = options.redirectLogin ?? `/`;
6233
6417
  const redirectRegister = options.redirectRegister ?? `/`;
@@ -6260,7 +6444,7 @@ const ShFrontend = {
6260
6444
  });
6261
6445
  options.router.addRoute({
6262
6446
  path: '/sh-departments/manage-permissions/:id',
6263
- component: script$5
6447
+ component: script$9
6264
6448
  });
6265
6449
  }
6266
6450
  //filter unwanted config items from options to be put in local storage
@@ -6272,4 +6456,4 @@ const ShFrontend = {
6272
6456
  }
6273
6457
  };
6274
6458
 
6275
- export { countries as Countries, script$5 as ManagePermissions, script$j as ShAutoForm, script$e as ShCanvas, script$6 as ShCanvasBtn, script$c as ShConfirmAction, script$i as ShDropDownForm, script$8 as ShDynamicTabs, script$q as ShForm, ShFrontend, script$h as ShModal, script$7 as ShModalBtn, script$g as ShModalForm, script$f as ShModalFormAuto, script$s as ShPhone, script$4 as ShPopups, script$3 as ShRange, script$b as ShSilentAction, script$a as ShTable, script$9 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
6459
+ export { countries as Countries, script$9 as ManagePermissions, script$n as ShAutoForm, script$i as ShCanvas, script$a as ShCanvasBtn, script$g as ShConfirmAction, script$m as ShDropDownForm, script$c as ShDynamicTabs, script$u as ShForm, ShFrontend, script$l as ShModal, script$b as ShModalBtn, script$k as ShModalForm, script$j as ShModalFormAuto, script$w as ShPhone, script$4 as ShPopups, script$3 as ShRange, script$f as ShSilentAction, script$e as ShTable, script$d as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };