@iankibetsh/shframework 1.9.3 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/library.js +283 -240
  2. package/dist/library.mjs +249 -225
  3. package/package.json +1 -1
package/dist/library.js CHANGED
@@ -14,6 +14,24 @@ var bootstrap = require('bootstrap');
14
14
 
15
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
16
 
17
+ function _interopNamespace(e) {
18
+ if (e && e.__esModule) return e;
19
+ var n = Object.create(null);
20
+ if (e) {
21
+ Object.keys(e).forEach(function (k) {
22
+ if (k !== 'default') {
23
+ var d = Object.getOwnPropertyDescriptor(e, k);
24
+ Object.defineProperty(n, k, d.get ? d : {
25
+ enumerable: true,
26
+ get: function () { return e[k]; }
27
+ });
28
+ }
29
+ });
30
+ }
31
+ n["default"] = e;
32
+ return Object.freeze(n);
33
+ }
34
+
17
35
  var Axios__default = /*#__PURE__*/_interopDefaultLegacy(Axios);
18
36
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
19
37
  var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
@@ -154,21 +172,7 @@ const signOutUser = ()=>{
154
172
  };
155
173
 
156
174
 
157
- const Toast = Swal__default["default"].mixin({
158
- toast: true,
159
- position: 'top-end',
160
- showConfirmButton: false,
161
- customClass: {
162
- popup: 'colored-toast'
163
- },
164
- iconColor: 'white',
165
- timer: 2000,
166
- timerProgressBar: true,
167
- didOpen: (toast) => {
168
- toast.addEventListener('mouseenter', Swal__default["default"].stopTimer);
169
- toast.addEventListener('mouseleave', Swal__default["default"].resumeTimer);
170
- }
171
- });
175
+
172
176
  function getShConfig(key = null,def = '') {
173
177
 
174
178
  const config = ShStorage.getItem('ShConfig') ?? {};
@@ -177,19 +181,37 @@ function getShConfig(key = null,def = '') {
177
181
  }
178
182
  return config
179
183
  }
180
- function showToast (message, toastType, position) {
184
+ function showToast (message, toastType, config) {
185
+ const mixinConfig = {
186
+ toast: true,
187
+ position: 'top-end',
188
+ showConfirmButton: false,
189
+ customClass: {
190
+ popup: 'colored-toast'
191
+ },
192
+ iconColor: 'white',
193
+ timer: 2000,
194
+ timerProgressBar: true,
195
+ didOpen: (toast) => {
196
+ toast.addEventListener('mouseenter', Swal__default["default"].stopTimer);
197
+ toast.addEventListener('mouseleave', Swal__default["default"].resumeTimer);
198
+ }
199
+ };
181
200
  if (!toastType) {
182
201
  toastType = 'success';
183
202
  }
184
- if(!position){
185
- position = window.swalPosition;
203
+ if(config){
204
+ // alert(config.position)
205
+ Object.keys(config).map(key=>mixinConfig[key] = config.key);
186
206
  }
207
+ const Toast = Swal__default["default"].mixin(mixinConfig);
187
208
  Toast.mixin({
188
- position: position
209
+ position: 'top'
189
210
  });
190
211
  Toast.fire({
191
212
  icon: toastType,
192
- title: message
213
+ title: message,
214
+ postion: 'bottom'
193
215
  });
194
216
  }
195
217
 
@@ -1888,7 +1910,7 @@ const countries = [
1888
1910
  }
1889
1911
  ];
1890
1912
 
1891
- var script$u = {
1913
+ var script$v = {
1892
1914
  name: 'PhoneInput',
1893
1915
  props: ['modelValue', 'country_code'],
1894
1916
  data () {
@@ -1959,18 +1981,18 @@ var script$u = {
1959
1981
  };
1960
1982
 
1961
1983
  const _hoisted_1$o = { class: "sh-phone mb-3" };
1962
- const _hoisted_2$e = {
1984
+ const _hoisted_2$f = {
1963
1985
  key: 0,
1964
1986
  style: {"display":"contents"}
1965
1987
  };
1966
- const _hoisted_3$d = ["src"];
1967
- const _hoisted_4$d = ["value"];
1988
+ const _hoisted_3$e = ["src"];
1989
+ const _hoisted_4$e = ["value"];
1968
1990
 
1969
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1991
+ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
1970
1992
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
1971
1993
  ($data.selectedCountry)
1972
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
1973
- vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
1994
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
1995
+ vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$e),
1974
1996
  vue.createTextVNode(" " + vue.toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
1975
1997
  ]))
1976
1998
  : vue.createCommentVNode("v-if", true),
@@ -1983,7 +2005,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1983
2005
  return (vue.openBlock(), vue.createElementBlock("option", {
1984
2006
  value: country,
1985
2007
  key: country.dialCode
1986
- }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$d))
2008
+ }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$e))
1987
2009
  }), 128 /* KEYED_FRAGMENT */))
1988
2010
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
1989
2011
  [vue.vModelSelect, $data.selectedCountry]
@@ -2001,16 +2023,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2001
2023
  ]))
2002
2024
  }
2003
2025
 
2004
- script$u.render = render$3;
2005
- script$u.__file = "src/lib/components/form-components/PhoneInput.vue";
2026
+ script$v.render = render$5;
2027
+ script$v.__file = "src/lib/components/form-components/PhoneInput.vue";
2006
2028
 
2007
2029
  const _hoisted_1$n = {
2008
2030
  key: 0,
2009
2031
  class: "dropdown sh-suggest"
2010
2032
  };
2011
- const _hoisted_2$d = ["id"];
2012
- const _hoisted_3$c = { class: "badge bg-secondary m-1 sh-selected-item" };
2013
- const _hoisted_4$c = ["onClick"];
2033
+ const _hoisted_2$e = ["id"];
2034
+ const _hoisted_3$d = { class: "badge bg-secondary m-1 sh-selected-item" };
2035
+ const _hoisted_4$d = ["onClick"];
2014
2036
  const _hoisted_5$a = ["id"];
2015
2037
  const _hoisted_6$9 = ["id", "aria-labelledby"];
2016
2038
  const _hoisted_7$7 = { key: 0 };
@@ -2025,7 +2047,7 @@ const _hoisted_10$5 = {
2025
2047
  };
2026
2048
 
2027
2049
 
2028
- var script$t = {
2050
+ var script$u = {
2029
2051
  __name: 'ShSuggest',
2030
2052
  props: ['fillSelects','modelValue'],
2031
2053
  emits: ['update:modelValue'],
@@ -2115,14 +2137,14 @@ return (_ctx, _cache) => {
2115
2137
  }, [
2116
2138
  vue.createElementVNode("div", null, [
2117
2139
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(selectedSuggestions), (sgt) => {
2118
- return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$c, [
2140
+ return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$d, [
2119
2141
  vue.createTextVNode(vue.toDisplayString(sgt.name) + " ", 1 /* TEXT */),
2120
2142
  vue.createElementVNode("button", {
2121
2143
  onClick: $event => (removeSuggestion(sgt.id)),
2122
2144
  type: "button",
2123
2145
  class: "btn-close border-start border-1 ms-1",
2124
2146
  "aria-label": "Close"
2125
- }, null, 8 /* PROPS */, _hoisted_4$c)
2147
+ }, null, 8 /* PROPS */, _hoisted_4$d)
2126
2148
  ]))
2127
2149
  }), 256 /* UNKEYED_FRAGMENT */))
2128
2150
  ]),
@@ -2133,7 +2155,7 @@ return (_ctx, _cache) => {
2133
2155
  onInput: filterData,
2134
2156
  class: "flex-fill h-100 sh-suggestion-input"
2135
2157
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$a)
2136
- ], 8 /* PROPS */, _hoisted_2$d),
2158
+ ], 8 /* PROPS */, _hoisted_2$e),
2137
2159
  vue.createElementVNode("ul", {
2138
2160
  class: "dropdown-menu w-100",
2139
2161
  id: 'dropwdown_section' + vue.unref(id),
@@ -2166,15 +2188,15 @@ return (_ctx, _cache) => {
2166
2188
 
2167
2189
  };
2168
2190
 
2169
- script$t.__scopeId = "data-v-71cc9569";
2170
- script$t.__file = "src/lib/components/form-components/ShSuggest.vue";
2191
+ script$u.__scopeId = "data-v-71cc9569";
2192
+ script$u.__file = "src/lib/components/form-components/ShSuggest.vue";
2171
2193
 
2172
- var script$s = {
2194
+ var script$t = {
2173
2195
  name: 'ShForm',
2174
2196
  components: {
2175
- PhoneInput: script$u,
2176
- ShSuggest: script$t,
2177
- ShPhone: script$u
2197
+ PhoneInput: script$v,
2198
+ ShSuggest: script$u,
2199
+ ShPhone: script$v
2178
2200
  },
2179
2201
  props: [
2180
2202
  'action',
@@ -2497,16 +2519,16 @@ var script$s = {
2497
2519
  };
2498
2520
 
2499
2521
  const _hoisted_1$m = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2500
- const _hoisted_2$c = {
2522
+ const _hoisted_2$d = {
2501
2523
  ref: "ShAutoForm",
2502
2524
  class: "sh-form"
2503
2525
  };
2504
- const _hoisted_3$b = {
2526
+ const _hoisted_3$c = {
2505
2527
  key: 0,
2506
2528
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2507
2529
  role: "alert"
2508
2530
  };
2509
- const _hoisted_4$b = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2531
+ const _hoisted_4$c = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2510
2532
  const _hoisted_5$9 = { key: 0 };
2511
2533
  const _hoisted_6$8 = { key: 1 };
2512
2534
  const _hoisted_7$6 = { class: "row" };
@@ -2552,18 +2574,18 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
2552
2574
  "aria-hidden": "true"
2553
2575
  }, null, -1 /* HOISTED */);
2554
2576
 
2555
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2577
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2556
2578
  const _component_phone_input = vue.resolveComponent("phone-input");
2557
2579
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2558
2580
 
2559
2581
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2560
2582
  _hoisted_1$m,
2561
- vue.createElementVNode("form", _hoisted_2$c, [
2583
+ vue.createElementVNode("form", _hoisted_2$d, [
2562
2584
  vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2563
2585
  vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2564
2586
  (_ctx.form_status == 3)
2565
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
2566
- _hoisted_4$b,
2587
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$c, [
2588
+ _hoisted_4$c,
2567
2589
  (_ctx.errorText)
2568
2590
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$9, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2569
2591
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
@@ -2763,10 +2785,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2763
2785
  ], 64 /* STABLE_FRAGMENT */))
2764
2786
  }
2765
2787
 
2766
- script$s.render = render$2;
2767
- script$s.__file = "src/lib/components/ShForm.vue";
2788
+ script$t.render = render$4;
2789
+ script$t.__file = "src/lib/components/ShForm.vue";
2768
2790
 
2769
- var script$r = {
2791
+ var script$s = {
2770
2792
  __name: 'EmailInput',
2771
2793
  props: ['modelValue','label'],
2772
2794
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2806,12 +2828,12 @@ return (_ctx, _cache) => {
2806
2828
 
2807
2829
  };
2808
2830
 
2809
- script$r.__file = "src/lib/components/form-components/EmailInput.vue";
2831
+ script$s.__file = "src/lib/components/form-components/EmailInput.vue";
2810
2832
 
2811
2833
  const _hoisted_1$l = ["min", "max"];
2812
2834
 
2813
2835
 
2814
- var script$q = {
2836
+ var script$r = {
2815
2837
  __name: 'NumberInput',
2816
2838
  props: ['modelValue','label','min','max'],
2817
2839
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2853,9 +2875,9 @@ return (_ctx, _cache) => {
2853
2875
 
2854
2876
  };
2855
2877
 
2856
- script$q.__file = "src/lib/components/form-components/NumberInput.vue";
2878
+ script$r.__file = "src/lib/components/form-components/NumberInput.vue";
2857
2879
 
2858
- var script$p = {
2880
+ var script$q = {
2859
2881
  __name: 'TextInput',
2860
2882
  props: ['modelValue','label','isInvalid'],
2861
2883
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2897,9 +2919,9 @@ return (_ctx, _cache) => {
2897
2919
 
2898
2920
  };
2899
2921
 
2900
- script$p.__file = "src/lib/components/form-components/TextInput.vue";
2922
+ script$q.__file = "src/lib/components/form-components/TextInput.vue";
2901
2923
 
2902
- var script$o = {
2924
+ var script$p = {
2903
2925
  __name: 'TextAreaInput',
2904
2926
  props: ['modelValue','label'],
2905
2927
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2939,12 +2961,12 @@ return (_ctx, _cache) => {
2939
2961
 
2940
2962
  };
2941
2963
 
2942
- script$o.__file = "src/lib/components/form-components/TextAreaInput.vue";
2964
+ script$p.__file = "src/lib/components/form-components/TextAreaInput.vue";
2943
2965
 
2944
2966
  const _hoisted_1$k = ["value"];
2945
2967
 
2946
2968
 
2947
- var script$n = {
2969
+ var script$o = {
2948
2970
  __name: 'SelectInput',
2949
2971
  props: ['modelValue','label','data','dataUrl'],
2950
2972
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3009,9 +3031,9 @@ return (_ctx, _cache) => {
3009
3031
 
3010
3032
  };
3011
3033
 
3012
- script$n.__file = "src/lib/components/form-components/SelectInput.vue";
3034
+ script$o.__file = "src/lib/components/form-components/SelectInput.vue";
3013
3035
 
3014
- var script$m = {
3036
+ var script$n = {
3015
3037
  __name: 'PasswordInput',
3016
3038
  props: ['modelValue','label'],
3017
3039
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3047,12 +3069,12 @@ return (_ctx, _cache) => {
3047
3069
 
3048
3070
  };
3049
3071
 
3050
- script$m.__file = "src/lib/components/form-components/PasswordInput.vue";
3072
+ script$n.__file = "src/lib/components/form-components/PasswordInput.vue";
3051
3073
 
3052
3074
  const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3053
- const _hoisted_2$b = ["onUpdate:modelValue"];
3054
- const _hoisted_3$a = ["innerHTML"];
3055
- const _hoisted_4$a = ["innerHTML"];
3075
+ const _hoisted_2$c = ["onUpdate:modelValue"];
3076
+ const _hoisted_3$b = ["innerHTML"];
3077
+ const _hoisted_4$b = ["innerHTML"];
3056
3078
  const _hoisted_5$8 = ["innerHTML"];
3057
3079
  const _hoisted_6$7 = ["disabled"];
3058
3080
  const _hoisted_7$5 = {
@@ -3064,7 +3086,7 @@ const _hoisted_7$5 = {
3064
3086
  const _hoisted_8$4 = { key: 1 };
3065
3087
 
3066
3088
 
3067
- var script$l = {
3089
+ var script$m = {
3068
3090
  __name: 'ShAutoForm',
3069
3091
  props: [
3070
3092
  'action','successCallback','retainDataAfterSubmission',
@@ -3097,13 +3119,13 @@ const getFieldComponent = (fieldObj)=>{
3097
3119
  const defaultPhones = ['phone'];
3098
3120
  const defaultEmails = ['email'];
3099
3121
  const formComponents = vue.inject('formComponents');
3100
- const TextComponent = formComponents.text ?? script$p;
3101
- const TextAreaComponent = formComponents.textArea ?? script$o;
3102
- const EmailComponent = formComponents.email ?? script$r;
3103
- const PhoneComponent = formComponents.phone ?? script$u;
3104
- const NumberComponent = formComponents.number ?? script$q;
3105
- const SelectComponent = formComponents.select ?? script$n;
3106
- const PasswordComponent = formComponents.password ?? script$m;
3122
+ const TextComponent = formComponents.text ?? script$q;
3123
+ const TextAreaComponent = formComponents.textArea ?? script$p;
3124
+ const EmailComponent = formComponents.email ?? script$s;
3125
+ const PhoneComponent = formComponents.phone ?? script$v;
3126
+ const NumberComponent = formComponents.number ?? script$r;
3127
+ const SelectComponent = formComponents.select ?? script$o;
3128
+ const PasswordComponent = formComponents.password ?? script$n;
3107
3129
  if(props.customComponents && props.customComponents[field]) {
3108
3130
  return props.customComponents[field]
3109
3131
  }
@@ -3115,16 +3137,16 @@ const getFieldComponent = (fieldObj)=>{
3115
3137
  }
3116
3138
  else
3117
3139
  if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
3118
- return formComponents.textArea ?? script$o
3140
+ return formComponents.textArea ?? script$p
3119
3141
  } else
3120
3142
  if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
3121
- return formComponents.email ?? script$r
3143
+ return formComponents.email ?? script$s
3122
3144
  } else
3123
3145
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3124
- return formComponents.phone ?? script$u
3146
+ return formComponents.phone ?? script$v
3125
3147
  } else
3126
3148
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3127
- return formComponents.number ?? script$q
3149
+ return formComponents.number ?? script$r
3128
3150
  }
3129
3151
  // else
3130
3152
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
@@ -3133,7 +3155,7 @@ const getFieldComponent = (fieldObj)=>{
3133
3155
  // if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3134
3156
  // return formComponents.date ?? DateInput
3135
3157
  // }
3136
- return formComponents.text ?? script$p
3158
+ return formComponents.text ?? script$q
3137
3159
  };
3138
3160
  const shFormElementClasses = vue.ref(null);
3139
3161
  shFormElementClasses.value = vue.inject('shFormElementClasses');
@@ -3288,7 +3310,7 @@ return (_ctx, _cache) => {
3288
3310
  key: 0,
3289
3311
  type: "hidden",
3290
3312
  "onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
3291
- }, null, 8 /* PROPS */, _hoisted_2$b)), [
3313
+ }, null, 8 /* PROPS */, _hoisted_2$c)), [
3292
3314
  [vue.vModelText, formFields.value[index].value]
3293
3315
  ])
3294
3316
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
@@ -3297,7 +3319,7 @@ return (_ctx, _cache) => {
3297
3319
  key: 0,
3298
3320
  class: vue.normalizeClass(getElementClass('formLabel')),
3299
3321
  innerHTML: field.label
3300
- }, null, 10 /* CLASS, PROPS */, _hoisted_3$a))
3322
+ }, null, 10 /* CLASS, PROPS */, _hoisted_3$b))
3301
3323
  : vue.createCommentVNode("v-if", true),
3302
3324
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
3303
3325
  isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
@@ -3311,7 +3333,7 @@ return (_ctx, _cache) => {
3311
3333
  key: 1,
3312
3334
  class: vue.normalizeClass(getElementClass('formLabel')),
3313
3335
  innerHTML: field.label
3314
- }, null, 10 /* CLASS, PROPS */, _hoisted_4$a))
3336
+ }, null, 10 /* CLASS, PROPS */, _hoisted_4$b))
3315
3337
  : vue.createCommentVNode("v-if", true),
3316
3338
  (field.helper)
3317
3339
  ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -3354,12 +3376,12 @@ return (_ctx, _cache) => {
3354
3376
 
3355
3377
  };
3356
3378
 
3357
- script$l.__file = "src/lib/components/ShAutoForm.vue";
3379
+ script$m.__file = "src/lib/components/ShAutoForm.vue";
3358
3380
 
3359
3381
  const _hoisted_1$i = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3360
- const _hoisted_2$a = { class: "dropdown" };
3382
+ const _hoisted_2$b = { class: "dropdown" };
3361
3383
 
3362
- var script$k = {
3384
+ var script$l = {
3363
3385
  __name: 'ShDropDownForm',
3364
3386
  props: ['action',
3365
3387
  'classes',
@@ -3390,7 +3412,7 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3390
3412
  return (_ctx, _cache) => {
3391
3413
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3392
3414
  _hoisted_1$i,
3393
- vue.createElementVNode("div", _hoisted_2$a, [
3415
+ vue.createElementVNode("div", _hoisted_2$b, [
3394
3416
  vue.createElementVNode("a", {
3395
3417
  class: vue.normalizeClass(vue.unref(btnClass)),
3396
3418
  href: "#",
@@ -3406,7 +3428,7 @@ return (_ctx, _cache) => {
3406
3428
  class: "dropdown-menu px-2 py-1",
3407
3429
  "aria-labelledby": dropdownId
3408
3430
  }, [
3409
- vue.createVNode(script$s, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3431
+ vue.createVNode(script$t, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3410
3432
  ])
3411
3433
  ])
3412
3434
  ], 64 /* STABLE_FRAGMENT */))
@@ -3415,12 +3437,12 @@ return (_ctx, _cache) => {
3415
3437
 
3416
3438
  };
3417
3439
 
3418
- script$k.__file = "src/lib/components/ShDropDownForm.vue";
3440
+ script$l.__file = "src/lib/components/ShDropDownForm.vue";
3419
3441
 
3420
3442
  const _hoisted_1$h = ["id"];
3421
- const _hoisted_2$9 = { class: "modal-content" };
3422
- const _hoisted_3$9 = { class: "modal-header" };
3423
- const _hoisted_4$9 = { class: "modal-title" };
3443
+ const _hoisted_2$a = { class: "modal-content" };
3444
+ const _hoisted_3$a = { class: "modal-header" };
3445
+ const _hoisted_4$a = { class: "modal-title" };
3424
3446
  const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
3425
3447
  class: "btn btn-danger btn-sm",
3426
3448
  "data-bs-dismiss": "modal",
@@ -3429,7 +3451,7 @@ const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
3429
3451
  const _hoisted_6$6 = { class: "modal-body" };
3430
3452
  const _hoisted_7$4 = { class: "section" };
3431
3453
 
3432
- var script$j = {
3454
+ var script$k = {
3433
3455
  __name: 'ShModal',
3434
3456
  props: {
3435
3457
  modalId: {
@@ -3466,9 +3488,9 @@ return (_ctx, _cache) => {
3466
3488
  vue.createElementVNode("div", {
3467
3489
  class: vue.normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
3468
3490
  }, [
3469
- vue.createElementVNode("div", _hoisted_2$9, [
3470
- vue.createElementVNode("div", _hoisted_3$9, [
3471
- vue.createElementVNode("h3", _hoisted_4$9, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3491
+ vue.createElementVNode("div", _hoisted_2$a, [
3492
+ vue.createElementVNode("div", _hoisted_3$a, [
3493
+ vue.createElementVNode("h3", _hoisted_4$a, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3472
3494
  _hoisted_5$7
3473
3495
  ]),
3474
3496
  vue.createElementVNode("div", _hoisted_6$6, [
@@ -3484,11 +3506,11 @@ return (_ctx, _cache) => {
3484
3506
 
3485
3507
  };
3486
3508
 
3487
- script$j.__file = "src/lib/components/ShModal.vue";
3509
+ script$k.__file = "src/lib/components/ShModal.vue";
3488
3510
 
3489
3511
  const _hoisted_1$g = ["href"];
3490
3512
 
3491
- var script$i = {
3513
+ var script$j = {
3492
3514
  __name: 'ShModalForm',
3493
3515
  props: ['action',
3494
3516
  'classes',
@@ -3528,12 +3550,12 @@ return (_ctx, _cache) => {
3528
3550
  }, [
3529
3551
  vue.renderSlot(_ctx.$slots, "default")
3530
3552
  ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3531
- vue.createVNode(script$j, {
3553
+ vue.createVNode(script$k, {
3532
3554
  "modal-id": modalId,
3533
3555
  "modal-title": __props.modalTitle
3534
3556
  }, {
3535
3557
  default: vue.withCtx(() => [
3536
- vue.createVNode(script$s, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3558
+ vue.createVNode(script$t, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3537
3559
  ]),
3538
3560
  _: 1 /* STABLE */
3539
3561
  }, 8 /* PROPS */, ["modal-title"])
@@ -3543,11 +3565,11 @@ return (_ctx, _cache) => {
3543
3565
 
3544
3566
  };
3545
3567
 
3546
- script$i.__file = "src/lib/components/ShModalForm.vue";
3568
+ script$j.__file = "src/lib/components/ShModalForm.vue";
3547
3569
 
3548
3570
  const _hoisted_1$f = ["href"];
3549
3571
 
3550
- var script$h = {
3572
+ var script$i = {
3551
3573
  __name: 'ShModalFormAuto',
3552
3574
  props: ['action',
3553
3575
  'classes',
@@ -3588,12 +3610,12 @@ return (_ctx, _cache) => {
3588
3610
  }, [
3589
3611
  vue.renderSlot(_ctx.$slots, "default")
3590
3612
  ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3591
- vue.createVNode(script$j, {
3613
+ vue.createVNode(script$k, {
3592
3614
  "modal-id": modalId,
3593
3615
  "modal-title": __props.modalTitle
3594
3616
  }, {
3595
3617
  default: vue.withCtx(() => [
3596
- vue.createVNode(script$l, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3618
+ vue.createVNode(script$m, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3597
3619
  ]),
3598
3620
  _: 1 /* STABLE */
3599
3621
  }, 8 /* PROPS */, ["modal-title"])
@@ -3603,17 +3625,17 @@ return (_ctx, _cache) => {
3603
3625
 
3604
3626
  };
3605
3627
 
3606
- script$h.__file = "src/lib/components/ShModalFormAuto.vue";
3628
+ script$i.__file = "src/lib/components/ShModalFormAuto.vue";
3607
3629
 
3608
3630
  const _hoisted_1$e = ["id"];
3609
- const _hoisted_2$8 = { class: "offcanvas-header" };
3610
- const _hoisted_3$8 = {
3631
+ const _hoisted_2$9 = { class: "offcanvas-header" };
3632
+ const _hoisted_3$9 = {
3611
3633
  class: "offcanvas-title",
3612
3634
  id: "offcanvasScrollingLabel"
3613
3635
  };
3614
- const _hoisted_4$8 = { class: "offcanvas-body" };
3636
+ const _hoisted_4$9 = { class: "offcanvas-body" };
3615
3637
 
3616
- var script$g = {
3638
+ var script$h = {
3617
3639
  __name: 'ShCanvas',
3618
3640
  props: {
3619
3641
  canvasId: {
@@ -3658,8 +3680,8 @@ return (_ctx, _cache) => {
3658
3680
  id: __props.canvasId,
3659
3681
  "aria-labelledby": "offcanvasScrollingLabel"
3660
3682
  }, [
3661
- vue.createElementVNode("div", _hoisted_2$8, [
3662
- vue.createElementVNode("h5", _hoisted_3$8, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3683
+ vue.createElementVNode("div", _hoisted_2$9, [
3684
+ vue.createElementVNode("h5", _hoisted_3$9, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3663
3685
  vue.createElementVNode("button", {
3664
3686
  type: "button",
3665
3687
  ref: "closecanvas",
@@ -3669,7 +3691,7 @@ return (_ctx, _cache) => {
3669
3691
  "aria-label": "Close"
3670
3692
  }, null, 512 /* NEED_PATCH */)
3671
3693
  ]),
3672
- vue.createElementVNode("div", _hoisted_4$8, [
3694
+ vue.createElementVNode("div", _hoisted_4$9, [
3673
3695
  vue.renderSlot(_ctx.$slots, "default")
3674
3696
  ])
3675
3697
  ], 10 /* CLASS, PROPS */, _hoisted_1$e))
@@ -3678,9 +3700,9 @@ return (_ctx, _cache) => {
3678
3700
 
3679
3701
  };
3680
3702
 
3681
- script$g.__file = "src/lib/components/ShCanvas.vue";
3703
+ script$h.__file = "src/lib/components/ShCanvas.vue";
3682
3704
 
3683
- var script$f = {
3705
+ var script$g = {
3684
3706
  name: 'Pagination',
3685
3707
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
3686
3708
  data () {
@@ -3752,11 +3774,11 @@ var script$f = {
3752
3774
  };
3753
3775
 
3754
3776
  const _hoisted_1$d = { key: 0 };
3755
- const _hoisted_2$7 = { class: "record_count_body mb-3" };
3756
- const _hoisted_3$7 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3757
- const _hoisted_4$7 = /*#__PURE__*/vue.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);
3777
+ const _hoisted_2$8 = { class: "record_count_body mb-3" };
3778
+ const _hoisted_3$8 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3779
+ const _hoisted_4$8 = /*#__PURE__*/vue.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);
3758
3780
  const _hoisted_9$4 = [
3759
- _hoisted_4$7
3781
+ _hoisted_4$8
3760
3782
  ];
3761
3783
  const _hoisted_10$3 = { class: "record_counts" };
3762
3784
  const _hoisted_11$2 = {
@@ -3799,11 +3821,11 @@ const _hoisted_23$1 = {
3799
3821
  class: "spinner-border"
3800
3822
  };
3801
3823
 
3802
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3824
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3803
3825
  return ($props.paginationStyle !== 'loadMore')
3804
3826
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
3805
- vue.createElementVNode("div", _hoisted_2$7, [
3806
- _hoisted_3$7,
3827
+ vue.createElementVNode("div", _hoisted_2$8, [
3828
+ _hoisted_3$8,
3807
3829
  vue.createTextVNode("  "),
3808
3830
  vue.withDirectives(vue.createElementVNode("select", {
3809
3831
  class: "select_per_page",
@@ -3876,8 +3898,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3876
3898
  ]))
3877
3899
  }
3878
3900
 
3879
- script$f.render = render$1;
3880
- script$f.__file = "src/lib/components/list_templates/Pagination.vue";
3901
+ script$g.render = render$3;
3902
+ script$g.__file = "src/lib/components/list_templates/Pagination.vue";
3881
3903
 
3882
3904
  const _hoisted_1$c = /*#__PURE__*/vue.createElementVNode("span", {
3883
3905
  class: "spinner-border spinner-border-sm me-1",
@@ -3886,7 +3908,7 @@ const _hoisted_1$c = /*#__PURE__*/vue.createElementVNode("span", {
3886
3908
  }, null, -1 /* HOISTED */);
3887
3909
 
3888
3910
 
3889
- var script$e = {
3911
+ var script$f = {
3890
3912
  __name: 'ShConfirmAction',
3891
3913
  props: {
3892
3914
  data: Object,
@@ -3972,7 +3994,7 @@ return (_ctx, _cache) => {
3972
3994
 
3973
3995
  };
3974
3996
 
3975
- script$e.__file = "src/lib/components/ShConfirmAction.vue";
3997
+ script$f.__file = "src/lib/components/ShConfirmAction.vue";
3976
3998
 
3977
3999
  const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("span", {
3978
4000
  class: "spinner-border spinner-border-sm me-1",
@@ -3980,7 +4002,7 @@ const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("span", {
3980
4002
  "aria-hidden": "true"
3981
4003
  }, null, -1 /* HOISTED */);
3982
4004
 
3983
- var script$d = {
4005
+ var script$e = {
3984
4006
  __name: 'ShSilentAction',
3985
4007
  props: {
3986
4008
  data: Object,
@@ -4068,9 +4090,9 @@ return (_ctx, _cache) => {
4068
4090
 
4069
4091
  };
4070
4092
 
4071
- script$d.__file = "src/lib/components/ShSilentAction.vue";
4093
+ script$e.__file = "src/lib/components/ShSilentAction.vue";
4072
4094
 
4073
- var script$c = {
4095
+ var script$d = {
4074
4096
  name: 'sh-table',
4075
4097
  props: ['endPoint', 'headers','query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
4076
4098
  inject: ['channel'],
@@ -4325,10 +4347,10 @@ var script$c = {
4325
4347
  this.reloadData();
4326
4348
  },
4327
4349
  components: {
4328
- ShSilentAction: script$d,
4329
- ShConfirmAction: script$e,
4330
- ShCanvas: script$g,
4331
- pagination: script$f
4350
+ ShSilentAction: script$e,
4351
+ ShConfirmAction: script$f,
4352
+ ShCanvas: script$h,
4353
+ pagination: script$g
4332
4354
  },
4333
4355
  computed: {
4334
4356
  windowWidth: function () {
@@ -4347,12 +4369,12 @@ var script$c = {
4347
4369
  };
4348
4370
 
4349
4371
  const _hoisted_1$a = { class: "auto-table mt-2" };
4350
- const _hoisted_2$6 = {
4372
+ const _hoisted_2$7 = {
4351
4373
  key: 0,
4352
4374
  class: "col-md-4 mb-2"
4353
4375
  };
4354
- const _hoisted_3$6 = ["disabled"];
4355
- const _hoisted_4$6 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4376
+ const _hoisted_3$7 = ["disabled"];
4377
+ const _hoisted_4$7 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4356
4378
  const _hoisted_5$6 = /*#__PURE__*/vue.createElementVNode("span", {
4357
4379
  class: "spinner-border spinner-border-sm",
4358
4380
  role: "status",
@@ -4502,7 +4524,7 @@ const _hoisted_63 = { key: 0 };
4502
4524
  const _hoisted_64 = ["href"];
4503
4525
  const _hoisted_65 = ["title", "onClick"];
4504
4526
 
4505
- function render(_ctx, _cache, $props, $setup, $data, $options) {
4527
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
4506
4528
  const _component_router_link = vue.resolveComponent("router-link");
4507
4529
  const _component_sh_confirm_action = vue.resolveComponent("sh-confirm-action");
4508
4530
  const _component_sh_silent_action = vue.resolveComponent("sh-silent-action");
@@ -4511,7 +4533,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4511
4533
 
4512
4534
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
4513
4535
  ($props.hasDownload)
4514
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
4536
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
4515
4537
  vue.createElementVNode("button", {
4516
4538
  disabled: $data.downloading,
4517
4539
  class: "btn btn-warning btn-sm",
@@ -4519,14 +4541,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4519
4541
  }, [
4520
4542
  (!$data.downloading)
4521
4543
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4522
- _hoisted_4$6,
4544
+ _hoisted_4$7,
4523
4545
  vue.createTextVNode(" Export ")
4524
4546
  ], 64 /* STABLE_FRAGMENT */))
4525
4547
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
4526
4548
  _hoisted_5$6,
4527
4549
  _hoisted_6$5
4528
4550
  ], 64 /* STABLE_FRAGMENT */))
4529
- ], 8 /* PROPS */, _hoisted_3$6)
4551
+ ], 8 /* PROPS */, _hoisted_3$7)
4530
4552
  ]))
4531
4553
  : vue.createCommentVNode("v-if", true),
4532
4554
  (!$props.hideSearch)
@@ -4962,10 +4984,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4962
4984
  ]))
4963
4985
  }
4964
4986
 
4965
- script$c.render = render;
4966
- script$c.__file = "src/lib/components/ShTable.vue";
4987
+ script$d.render = render$2;
4988
+ script$d.__file = "src/lib/components/ShTable.vue";
4967
4989
 
4968
- var script$b = {
4990
+ var script$c = {
4969
4991
  __name: 'ShTabs',
4970
4992
  props: {
4971
4993
  tabs: {
@@ -5110,22 +5132,22 @@ return (_ctx, _cache) => {
5110
5132
 
5111
5133
  };
5112
5134
 
5113
- script$b.__file = "src/lib/components/ShTabs.vue";
5135
+ script$c.__file = "src/lib/components/ShTabs.vue";
5114
5136
 
5115
5137
  const _hoisted_1$9 = {
5116
5138
  class: "nav nav-tabs",
5117
5139
  role: "tablist"
5118
5140
  };
5119
- const _hoisted_2$5 = {
5141
+ const _hoisted_2$6 = {
5120
5142
  class: "nav-item",
5121
5143
  role: "presentation"
5122
5144
  };
5123
- const _hoisted_3$5 = ["onClick"];
5124
- const _hoisted_4$5 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5145
+ const _hoisted_3$6 = ["onClick"];
5146
+ const _hoisted_4$6 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5125
5147
  const _hoisted_5$5 = { class: "sh_tab_count" };
5126
5148
  const _hoisted_6$4 = { class: "tab-content" };
5127
5149
 
5128
- var script$a = {
5150
+ var script$b = {
5129
5151
  __name: 'ShDynamicTabs',
5130
5152
  props: ['tabs','data'],
5131
5153
  setup(__props) {
@@ -5152,7 +5174,7 @@ return (_ctx, _cache) => {
5152
5174
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
5153
5175
  vue.createElementVNode("ul", _hoisted_1$9, [
5154
5176
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tabs), (tab) => {
5155
- return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$5, [
5177
+ return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$6, [
5156
5178
  vue.createElementVNode("button", {
5157
5179
  onClick: $event => (setTab(tab)),
5158
5180
  class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
@@ -5160,11 +5182,11 @@ return (_ctx, _cache) => {
5160
5182
  vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
5161
5183
  (tab.count || tab.tabCount)
5162
5184
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5163
- _hoisted_4$5,
5185
+ _hoisted_4$6,
5164
5186
  vue.createElementVNode("sup", _hoisted_5$5, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
5165
5187
  ], 64 /* STABLE_FRAGMENT */))
5166
5188
  : vue.createCommentVNode("v-if", true)
5167
- ], 10 /* CLASS, PROPS */, _hoisted_3$5)
5189
+ ], 10 /* CLASS, PROPS */, _hoisted_3$6)
5168
5190
  ]))
5169
5191
  }), 256 /* UNKEYED_FRAGMENT */))
5170
5192
  ]),
@@ -5179,12 +5201,12 @@ return (_ctx, _cache) => {
5179
5201
 
5180
5202
  };
5181
5203
 
5182
- script$a.__file = "src/lib/components/ShDynamicTabs.vue";
5204
+ script$b.__file = "src/lib/components/ShDynamicTabs.vue";
5183
5205
 
5184
5206
  const _hoisted_1$8 = ["href"];
5185
5207
 
5186
5208
 
5187
- var script$9 = {
5209
+ var script$a = {
5188
5210
  __name: 'ShModalBtn',
5189
5211
  props: {
5190
5212
  modalId: {
@@ -5207,12 +5229,12 @@ return (_ctx, _cache) => {
5207
5229
 
5208
5230
  };
5209
5231
 
5210
- script$9.__file = "src/lib/components/ShModalBtn.vue";
5232
+ script$a.__file = "src/lib/components/ShModalBtn.vue";
5211
5233
 
5212
5234
  const _hoisted_1$7 = ["href"];
5213
5235
 
5214
5236
 
5215
- var script$8 = {
5237
+ var script$9 = {
5216
5238
  __name: 'ShCanvasBtn',
5217
5239
  props: {
5218
5240
  canvasId: {
@@ -5236,7 +5258,7 @@ return (_ctx, _cache) => {
5236
5258
 
5237
5259
  };
5238
5260
 
5239
- script$8.__file = "src/lib/components/ShCanvasBtn.vue";
5261
+ script$9.__file = "src/lib/components/ShCanvasBtn.vue";
5240
5262
 
5241
5263
  const useUserStore = pinia.defineStore('user-store', {
5242
5264
  state: () => ({
@@ -5336,17 +5358,17 @@ const useUserStore = pinia.defineStore('user-store', {
5336
5358
 
5337
5359
  const _withScopeId$1 = n => (vue.pushScopeId("data-v-0d4fa0ac"),n=n(),vue.popScopeId(),n);
5338
5360
  const _hoisted_1$6 = { class: "row permissions-main d-flex" };
5339
- const _hoisted_2$4 = {
5361
+ const _hoisted_2$5 = {
5340
5362
  id: "permissions-nav",
5341
5363
  class: "col-md-3 d-flex align-items-center py-4"
5342
5364
  };
5343
- const _hoisted_3$4 = {
5365
+ const _hoisted_3$5 = {
5344
5366
  key: 0,
5345
5367
  class: "mx-auto"
5346
5368
  };
5347
- const _hoisted_4$4 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5369
+ const _hoisted_4$5 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5348
5370
  const _hoisted_5$4 = [
5349
- _hoisted_4$4
5371
+ _hoisted_4$5
5350
5372
  ];
5351
5373
  const _hoisted_6$3 = {
5352
5374
  key: 1,
@@ -5375,7 +5397,7 @@ const _hoisted_17 = { class: "col-md-3" };
5375
5397
  const _hoisted_18 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
5376
5398
 
5377
5399
 
5378
- var script$7 = {
5400
+ var script$8 = {
5379
5401
  __name: 'ManagePermissions',
5380
5402
  emits: ['success'],
5381
5403
  setup(__props, { emit }) {
@@ -5480,9 +5502,9 @@ const getPermissionStyle = permission => {
5480
5502
 
5481
5503
  return (_ctx, _cache) => {
5482
5504
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
5483
- vue.createElementVNode("div", _hoisted_2$4, [
5505
+ vue.createElementVNode("div", _hoisted_2$5, [
5484
5506
  (loadingModules.value)
5485
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, _hoisted_5$4))
5507
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, _hoisted_5$4))
5486
5508
  : (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$3, [
5487
5509
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modules.value, (module) => {
5488
5510
  return (vue.openBlock(), vue.createElementBlock("li", {
@@ -5533,7 +5555,7 @@ return (_ctx, _cache) => {
5533
5555
  (permissionsChanged.value)
5534
5556
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
5535
5557
  vue.createElementVNode("div", _hoisted_17, [
5536
- vue.createVNode(script$d, {
5558
+ vue.createVNode(script$e, {
5537
5559
  onSuccess: permissionsUpdated,
5538
5560
  url: `sh-departments/department/permissions/${vue.unref(departmentId)}/${selectedModule.value}`,
5539
5561
  data: {permissions: selectedPermissions.value},
@@ -5557,14 +5579,14 @@ return (_ctx, _cache) => {
5557
5579
 
5558
5580
  };
5559
5581
 
5560
- script$7.__scopeId = "data-v-0d4fa0ac";
5561
- script$7.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5582
+ script$8.__scopeId = "data-v-0d4fa0ac";
5583
+ script$8.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5562
5584
 
5563
5585
  const _hoisted_1$5 = ["href"];
5564
5586
 
5565
5587
 
5566
- var script$6 = {
5567
- __name: 'Popups',
5588
+ var script$7 = {
5589
+ __name: 'ShRoutePopups',
5568
5590
  setup(__props) {
5569
5591
 
5570
5592
  const route = vueRouter.useRoute();
@@ -5644,7 +5666,7 @@ return (_ctx, _cache) => {
5644
5666
  class: "d-none"
5645
5667
  }, "Open Modal", 8 /* PROPS */, _hoisted_1$5),
5646
5668
  (popUp.value === 'modal')
5647
- ? (vue.openBlock(), vue.createBlock(script$j, {
5669
+ ? (vue.openBlock(), vue.createBlock(script$k, {
5648
5670
  key: 0,
5649
5671
  "modal-id": vue.unref(modalId),
5650
5672
  "modal-size": size.value
@@ -5656,7 +5678,7 @@ return (_ctx, _cache) => {
5656
5678
  }, 8 /* PROPS */, ["modal-id", "modal-size"]))
5657
5679
  : vue.createCommentVNode("v-if", true),
5658
5680
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
5659
- ? (vue.openBlock(), vue.createBlock(script$g, {
5681
+ ? (vue.openBlock(), vue.createBlock(script$h, {
5660
5682
  key: 1,
5661
5683
  "canvas-id": vue.unref(canvasId),
5662
5684
  "canvas-size": size.value,
@@ -5674,32 +5696,56 @@ return (_ctx, _cache) => {
5674
5696
 
5675
5697
  };
5676
5698
 
5677
- script$6.__file = "src/lib/components/popups/Popups.vue";
5699
+ script$7.__file = "src/lib/components/popups/ShRoutePopups.vue";
5678
5700
 
5679
- const _hoisted_1$4 = ["href"];
5701
+ const _hoisted_1$4 = { class: "alert alert-info" };
5702
+ const _hoisted_2$4 = /*#__PURE__*/vue.createElementVNode("span", { class: "spinner-border" }, null, -1 /* HOISTED */);
5703
+ const _hoisted_3$4 = /*#__PURE__*/vue.createElementVNode("span", null, "Loading", -1 /* HOISTED */);
5704
+ const _hoisted_4$4 = [
5705
+ _hoisted_2$4,
5706
+ _hoisted_3$4
5707
+ ];
5680
5708
 
5709
+ function render$1(_ctx, _cache) {
5710
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, _hoisted_4$4))
5711
+ }
5681
5712
 
5682
- var script$5 = {
5683
- __name: 'RoutePopups',
5713
+ const script$6 = {};
5714
+
5715
+
5716
+ script$6.render = render$1;
5717
+ script$6.__file = "src/lib/components/popups/etc/PopupLoading.vue";
5718
+
5719
+ function render(_ctx, _cache) {
5720
+ return (vue.openBlock(), vue.createElementBlock("h5", null, "Error loading popup"))
5721
+ }
5722
+
5723
+ const script$5 = {};
5724
+
5725
+
5726
+ script$5.render = render;
5727
+ script$5.__file = "src/lib/components/popups/etc/ErrorLoadingPopup.vue";
5728
+
5729
+ var script$4 = {
5730
+ __name: 'ShQueryPopups',
5684
5731
  setup(__props) {
5685
5732
 
5686
5733
  const route = vueRouter.useRoute();
5687
5734
  const popUp = vue.ref(route.meta.popUp);
5688
5735
  const modalId = ___default["default"].uniqueId('modal_');
5689
5736
  const canvasId = ___default["default"].uniqueId('canvas_');
5690
- const componentView = vue.ref(null);
5737
+ let PopupComponent = vue.ref(null);
5691
5738
  vue.ref(null);
5692
5739
  const router = vueRouter.useRouter();
5693
5740
  const position = vue.ref(null);
5694
5741
  const size = vue.ref(null);
5695
- vue.watch(() => route.meta, meta => {
5696
- popUp.value = meta.popUp ?? meta.popup;
5742
+ const AsyncComp =vue.ref(null);
5743
+ vue.watch(() => route.query.popup, pop => {
5744
+ popUp.value = pop;
5745
+ position.value = route.query.position ?? route.query.side;
5746
+ size.value = route.query.size;
5697
5747
  if (popUp.value) {
5698
- // popups.push(meta)
5699
- // !popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta)
5700
- position.value = meta.position ?? meta.side;
5701
- size.value = meta.size;
5702
- componentView.value = vue.markRaw(route.matched[route.matched.length - 1].components.default);
5748
+ loadPopupComponent();
5703
5749
  setTimeout(() => {
5704
5750
  initPopup();
5705
5751
  }, 100);
@@ -5710,6 +5756,24 @@ vue.watch(() => route.meta, meta => {
5710
5756
  }, 100);
5711
5757
  }
5712
5758
  });
5759
+ const loadPopupComponent = ()=>{
5760
+ const component = route.query.comp || '';
5761
+ PopupComponent.value = vue.defineAsyncComponent({
5762
+ // the loader function
5763
+ loader: () => (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(`../../../views/popups/${component}Popup.vue`),
5764
+
5765
+ // A component to use while the async component is loading
5766
+ loadingComponent: script$6,
5767
+ // Delay before showing the loading component. Default: 200ms.
5768
+ delay: 200,
5769
+
5770
+ // A component to use if the load fails
5771
+ errorComponent: script$5,
5772
+ // The error component will be displayed if a timeout is
5773
+ // provided and exceeded. Default: Infinity.
5774
+ timeout: 3000
5775
+ });
5776
+ };
5713
5777
  const closeOrphanedBackdrops = () => {
5714
5778
  const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
5715
5779
  if (offCanvasBackdrop) {
@@ -5744,42 +5808,37 @@ const initPopup = () => {
5744
5808
  };
5745
5809
  const goBack = () => {
5746
5810
  if (route.matched.length) {
5747
- let backUrl = route.matched[route.matched.length - 2].path;
5748
- const params = route.params;
5749
- Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]));
5811
+ let backUrl = route.path;
5812
+ // const params = route.params
5813
+ // Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]))
5750
5814
  router.push(backUrl);
5751
5815
  }
5752
5816
  };
5753
5817
 
5754
5818
  return (_ctx, _cache) => {
5755
5819
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
5756
- vue.createElementVNode("a", {
5757
- "data-bs-toggle": "offcanvas",
5758
- href: '#' + vue.unref(canvasId),
5759
- shallowRef: "canvasButton",
5760
- class: "d-none"
5761
- }, "Open Modal", 8 /* PROPS */, _hoisted_1$4),
5762
5820
  (popUp.value === 'modal')
5763
- ? (vue.openBlock(), vue.createBlock(script$j, {
5821
+ ? (vue.openBlock(), vue.createBlock(script$k, {
5764
5822
  key: 0,
5765
5823
  "modal-id": vue.unref(modalId),
5766
5824
  "modal-size": size.value
5767
5825
  }, {
5768
5826
  default: vue.withCtx(() => [
5769
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(componentView.value)))
5827
+ vue.createVNode(vue.unref(PopupComponent))
5770
5828
  ]),
5771
5829
  _: 1 /* STABLE */
5772
5830
  }, 8 /* PROPS */, ["modal-id", "modal-size"]))
5773
5831
  : vue.createCommentVNode("v-if", true),
5774
5832
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
5775
- ? (vue.openBlock(), vue.createBlock(script$g, {
5833
+ ? (vue.openBlock(), vue.createBlock(script$h, {
5776
5834
  key: 1,
5777
5835
  "canvas-id": vue.unref(canvasId),
5778
5836
  "canvas-size": size.value,
5779
5837
  position: position.value
5780
5838
  }, {
5781
5839
  default: vue.withCtx(() => [
5782
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(componentView.value)))
5840
+ vue.createVNode(vue.unref(PopupComponent)),
5841
+ vue.createVNode(vue.unref(AsyncComp))
5783
5842
  ]),
5784
5843
  _: 1 /* STABLE */
5785
5844
  }, 8 /* PROPS */, ["canvas-id", "canvas-size", "position"]))
@@ -5790,24 +5849,7 @@ return (_ctx, _cache) => {
5790
5849
 
5791
5850
  };
5792
5851
 
5793
- script$5.__file = "src/lib/components/popups/RoutePopups.vue";
5794
-
5795
- var script$4 = {
5796
- __name: 'ShPopups',
5797
- setup(__props) {
5798
-
5799
-
5800
- return (_ctx, _cache) => {
5801
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
5802
- vue.createVNode(script$6),
5803
- vue.createVNode(script$5)
5804
- ], 64 /* STABLE_FRAGMENT */))
5805
- }
5806
- }
5807
-
5808
- };
5809
-
5810
- script$4.__file = "src/lib/components/ShPopups.vue";
5852
+ script$4.__file = "src/lib/components/popups/ShQueryPopups.vue";
5811
5853
 
5812
5854
  const _hoisted_1$3 = { class: "sh-range" };
5813
5855
  const _hoisted_2$3 = { class: "dropdown" };
@@ -6023,7 +6065,7 @@ return (_ctx, _cache) => {
6023
6065
  _hoisted_5$2,
6024
6066
  vue.createTextVNode(" ADD DEPARTMENT")
6025
6067
  ], 512 /* NEED_PATCH */),
6026
- vue.createVNode(script$c, {
6068
+ vue.createVNode(script$d, {
6027
6069
  headers: ['id','name','description', 'created_at'],
6028
6070
  "end-point": "sh-departments/list",
6029
6071
  actions: {
@@ -6037,12 +6079,12 @@ return (_ctx, _cache) => {
6037
6079
  ]
6038
6080
  }
6039
6081
  }),
6040
- vue.createVNode(script$j, {
6082
+ vue.createVNode(script$k, {
6041
6083
  "modal-id": "sh-department_modal",
6042
6084
  "modal-title": "Department Form"
6043
6085
  }, {
6044
6086
  default: vue.withCtx(() => [
6045
- vue.createVNode(script$s, {
6087
+ vue.createVNode(script$t, {
6046
6088
  "success-callback": "departmentAdded",
6047
6089
  onDepartmentAdded: departmentAdded,
6048
6090
  action: "admin/departments/store",
@@ -6176,7 +6218,7 @@ return (_ctx, _cache) => {
6176
6218
  vue.createElementVNode("div", _hoisted_2$1, [
6177
6219
  _hoisted_3$1,
6178
6220
  vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
6179
- vue.createVNode(script$c, {
6221
+ vue.createVNode(script$d, {
6180
6222
  actions: {
6181
6223
  label: 'Actions',
6182
6224
  actions: [
@@ -6196,12 +6238,12 @@ return (_ctx, _cache) => {
6196
6238
  headers: ['id',showModule,'created_at'],
6197
6239
  "end-point": 'admin/departments/department/list-modules/' + id.value
6198
6240
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6199
- vue.createVNode(script$j, {
6241
+ vue.createVNode(script$k, {
6200
6242
  "modal-id": "addModule",
6201
6243
  "modal-title": "Add Module Department"
6202
6244
  }, {
6203
6245
  default: vue.withCtx(() => [
6204
- vue.createVNode(script$s, {
6246
+ vue.createVNode(script$t, {
6205
6247
  "reload-select-items": vue.unref(reload),
6206
6248
  "success-callback": moduleAdded,
6207
6249
  "fill-selects": {
@@ -6223,7 +6265,7 @@ return (_ctx, _cache) => {
6223
6265
  ref: permissionCanvasBtn,
6224
6266
  "data-bs-toggle": "offcanvas"
6225
6267
  }, null, 512 /* NEED_PATCH */),
6226
- vue.createVNode(script$g, {
6268
+ vue.createVNode(script$h, {
6227
6269
  "canvas-id": "permissionsCanvas",
6228
6270
  position: "end enlarged",
6229
6271
  "canvas-title": "Module Permissions"
@@ -6338,7 +6380,7 @@ return (_ctx, _cache) => {
6338
6380
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
6339
6381
  (section.value === 'login')
6340
6382
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
6341
- vue.createVNode(script$s, {
6383
+ vue.createVNode(script$t, {
6342
6384
  class: "sh-login-form",
6343
6385
  fields: ['email','password'],
6344
6386
  "action-label": "Login",
@@ -6363,7 +6405,7 @@ return (_ctx, _cache) => {
6363
6405
  (vue.unref(registerSubTitle))
6364
6406
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
6365
6407
  : vue.createCommentVNode("v-if", true),
6366
- vue.createVNode(script$s, {
6408
+ vue.createVNode(script$t, {
6367
6409
  class: "sh-login-form",
6368
6410
  fields: vue.unref(registrationFields),
6369
6411
  "action-label": "Sign Up",
@@ -6410,7 +6452,7 @@ const ShFrontend = {
6410
6452
  const registerTitle = options.registerTitle ?? 'Create a new account';
6411
6453
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
6412
6454
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
6413
- options.formTextInput ?? script$p;
6455
+ options.formTextInput ?? script$q;
6414
6456
  const loginUrl = options.loginUrl ?? `/login`;
6415
6457
  const redirectLogin = options.redirectLogin ?? `/`;
6416
6458
  const redirectRegister = options.redirectRegister ?? `/`;
@@ -6443,7 +6485,7 @@ const ShFrontend = {
6443
6485
  });
6444
6486
  options.router.addRoute({
6445
6487
  path: '/sh-departments/manage-permissions/:id',
6446
- component: script$7
6488
+ component: script$8
6447
6489
  });
6448
6490
  }
6449
6491
  //filter unwanted config items from options to be put in local storage
@@ -6469,25 +6511,26 @@ var shGql = {
6469
6511
  };
6470
6512
 
6471
6513
  exports.Countries = countries;
6472
- exports.ManagePermissions = script$7;
6473
- exports.ShAutoForm = script$l;
6474
- exports.ShCanvas = script$g;
6475
- exports.ShCanvasBtn = script$8;
6476
- exports.ShConfirmAction = script$e;
6477
- exports.ShDropDownForm = script$k;
6478
- exports.ShDynamicTabs = script$a;
6479
- exports.ShForm = script$s;
6514
+ exports.ManagePermissions = script$8;
6515
+ exports.ShAutoForm = script$m;
6516
+ exports.ShCanvas = script$h;
6517
+ exports.ShCanvasBtn = script$9;
6518
+ exports.ShConfirmAction = script$f;
6519
+ exports.ShDropDownForm = script$l;
6520
+ exports.ShDynamicTabs = script$b;
6521
+ exports.ShForm = script$t;
6480
6522
  exports.ShFrontend = ShFrontend;
6481
- exports.ShModal = script$j;
6482
- exports.ShModalBtn = script$9;
6483
- exports.ShModalForm = script$i;
6484
- exports.ShModalFormAuto = script$h;
6485
- exports.ShPhone = script$u;
6486
- exports.ShPopups = script$4;
6523
+ exports.ShModal = script$k;
6524
+ exports.ShModalBtn = script$a;
6525
+ exports.ShModalForm = script$j;
6526
+ exports.ShModalFormAuto = script$i;
6527
+ exports.ShPhone = script$v;
6528
+ exports.ShQueryPopups = script$4;
6487
6529
  exports.ShRange = script$3;
6488
- exports.ShSilentAction = script$d;
6489
- exports.ShTable = script$c;
6490
- exports.ShTabs = script$b;
6530
+ exports.ShRoutePopups = script$7;
6531
+ exports.ShSilentAction = script$e;
6532
+ exports.ShTable = script$d;
6533
+ exports.ShTabs = script$c;
6491
6534
  exports.shApis = shApis;
6492
6535
  exports.shGql = shGql;
6493
6536
  exports.shRepo = shRepo;