@iankibetsh/shframework 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/library.js CHANGED
@@ -1874,7 +1874,7 @@ const countries = [
1874
1874
  }
1875
1875
  ];
1876
1876
 
1877
- var script$p = {
1877
+ var script$r = {
1878
1878
  name: 'PhoneInput',
1879
1879
  props: ['modelValue', 'country_code'],
1880
1880
  data () {
@@ -1936,7 +1936,7 @@ var script$p = {
1936
1936
  }
1937
1937
  };
1938
1938
 
1939
- const _hoisted_1$k = { class: "sh-phone mb-3" };
1939
+ const _hoisted_1$m = { class: "sh-phone mb-3" };
1940
1940
  const _hoisted_2$d = {
1941
1941
  key: 0,
1942
1942
  style: {"display":"contents"}
@@ -1944,8 +1944,8 @@ const _hoisted_2$d = {
1944
1944
  const _hoisted_3$c = ["src"];
1945
1945
  const _hoisted_4$c = ["value"];
1946
1946
 
1947
- function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1948
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
1947
+ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
1948
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
1949
1949
  ($data.selectedCountry)
1950
1950
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$d, [
1951
1951
  vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$c),
@@ -1979,10 +1979,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1979
1979
  ]))
1980
1980
  }
1981
1981
 
1982
- script$p.render = render$7;
1983
- script$p.__file = "src/lib/components/form-components/PhoneInput.vue";
1982
+ script$r.render = render$5;
1983
+ script$r.__file = "src/lib/components/form-components/PhoneInput.vue";
1984
1984
 
1985
- var script$o = {
1985
+ var script$q = {
1986
1986
  name: 'ShEditor',
1987
1987
  props: ['modelValue'],
1988
1988
  components: {
@@ -2021,17 +2021,17 @@ var script$o = {
2021
2021
  }
2022
2022
  };
2023
2023
 
2024
- const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("textarea", {
2024
+ const _hoisted_1$l = /*#__PURE__*/vue.createElementVNode("textarea", {
2025
2025
  id: "tiny",
2026
2026
  style: {"display":"none"},
2027
2027
  "data-cy": "tinymce_editor"
2028
2028
  }, null, -1 /* HOISTED */);
2029
2029
 
2030
- function render$6(_ctx, _cache, $props, $setup, $data, $options) {
2030
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2031
2031
  const _component_editor = vue.resolveComponent("editor");
2032
2032
 
2033
2033
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2034
- _hoisted_1$j,
2034
+ _hoisted_1$l,
2035
2035
  vue.createElementVNode("div", {
2036
2036
  onFocusin: _cache[1] || (_cache[1] = vue.withModifiers(() => {}, ["stop"])),
2037
2037
  class: "sh-editor w-100"
@@ -2056,10 +2056,10 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
2056
2056
  ], 64 /* STABLE_FRAGMENT */))
2057
2057
  }
2058
2058
 
2059
- script$o.render = render$6;
2060
- script$o.__file = "src/lib/components/form-components/ShEditor.vue";
2059
+ script$q.render = render$4;
2060
+ script$q.__file = "src/lib/components/form-components/ShEditor.vue";
2061
2061
 
2062
- const _hoisted_1$i = {
2062
+ const _hoisted_1$k = {
2063
2063
  key: 0,
2064
2064
  class: "dropdown sh-suggest"
2065
2065
  };
@@ -2080,7 +2080,7 @@ const _hoisted_10$4 = {
2080
2080
  };
2081
2081
 
2082
2082
 
2083
- var script$n = {
2083
+ var script$p = {
2084
2084
  __name: 'ShSuggest',
2085
2085
  props: ['fillSelects','modelValue'],
2086
2086
  emits: ['update:modelValue'],
@@ -2161,7 +2161,7 @@ function filterData(e){
2161
2161
 
2162
2162
  return (_ctx, _cache) => {
2163
2163
  return (vue.unref(id))
2164
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
2164
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
2165
2165
  vue.createElementVNode("div", {
2166
2166
  id: vue.unref(id),
2167
2167
  "data-bs-toggle": "dropdown",
@@ -2221,16 +2221,16 @@ return (_ctx, _cache) => {
2221
2221
 
2222
2222
  };
2223
2223
 
2224
- script$n.__scopeId = "data-v-71cc9569";
2225
- script$n.__file = "src/lib/components/form-components/ShSuggest.vue";
2224
+ script$p.__scopeId = "data-v-71cc9569";
2225
+ script$p.__file = "src/lib/components/form-components/ShSuggest.vue";
2226
2226
 
2227
- var script$m = {
2227
+ var script$o = {
2228
2228
  name: 'ShForm',
2229
2229
  components: {
2230
- PhoneInput: script$p,
2231
- ShSuggest: script$n,
2232
- ShEditor: script$o,
2233
- ShPhone: script$p
2230
+ PhoneInput: script$r,
2231
+ ShSuggest: script$p,
2232
+ ShEditor: script$q,
2233
+ ShPhone: script$r
2234
2234
  },
2235
2235
  props: [
2236
2236
  'action',
@@ -2396,10 +2396,21 @@ var script$m = {
2396
2396
  closeModal: function () {
2397
2397
  document.body.style = '';
2398
2398
  setTimeout(() => {
2399
- const modal = this.$refs.ShAutoForm.closest('.modal-dialog');
2400
- if(modal){
2401
- const closeBtn = modal.querySelector('[data-bs-dismiss="modal"]');
2402
- closeBtn && closeBtn.click();
2399
+ const form = this.$refs.ShAutoForm;
2400
+ if(form){
2401
+ const modal = form.closest('.modal-dialog');
2402
+ if(modal){
2403
+ const closeBtn = modal.querySelector('[data-bs-dismiss="modal"]');
2404
+ closeBtn && closeBtn.click();
2405
+ }
2406
+ } else {
2407
+ //form was mysteriously unmounted! try remove any modal backdrop if possible
2408
+ const modalBackdrop = document.querySelector('.modal-backdrop');
2409
+ if(modalBackdrop) {
2410
+ if(!document.querySelector('.modal.show')){
2411
+ modalBackdrop.remove();
2412
+ }
2413
+ }
2403
2414
  }
2404
2415
  this.form_status = 0;
2405
2416
  }, 1500);
@@ -2541,7 +2552,7 @@ var script$m = {
2541
2552
  }
2542
2553
  };
2543
2554
 
2544
- const _hoisted_1$h = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2555
+ const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2545
2556
  const _hoisted_2$b = {
2546
2557
  ref: "ShAutoForm",
2547
2558
  class: "sh-form"
@@ -2597,13 +2608,13 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
2597
2608
  "aria-hidden": "true"
2598
2609
  }, null, -1 /* HOISTED */);
2599
2610
 
2600
- function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2611
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2601
2612
  const _component_phone_input = vue.resolveComponent("phone-input");
2602
2613
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2603
2614
  const _component_ShEditor = vue.resolveComponent("ShEditor");
2604
2615
 
2605
2616
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2606
- _hoisted_1$h,
2617
+ _hoisted_1$j,
2607
2618
  vue.createElementVNode("form", _hoisted_2$b, [
2608
2619
  vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2609
2620
  vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
@@ -2820,10 +2831,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2820
2831
  ], 64 /* STABLE_FRAGMENT */))
2821
2832
  }
2822
2833
 
2823
- script$m.render = render$5;
2824
- script$m.__file = "src/lib/components/ShForm.vue";
2834
+ script$o.render = render$3;
2835
+ script$o.__file = "src/lib/components/ShForm.vue";
2825
2836
 
2826
- var script$l = {
2837
+ var script$n = {
2827
2838
  __name: 'EmailInput',
2828
2839
  props: ['modelValue','label'],
2829
2840
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2859,12 +2870,12 @@ return (_ctx, _cache) => {
2859
2870
 
2860
2871
  };
2861
2872
 
2862
- script$l.__file = "src/lib/components/form-components/EmailInput.vue";
2873
+ script$n.__file = "src/lib/components/form-components/EmailInput.vue";
2863
2874
 
2864
- const _hoisted_1$g = ["min", "max"];
2875
+ const _hoisted_1$i = ["min", "max"];
2865
2876
 
2866
2877
 
2867
- var script$k = {
2878
+ var script$m = {
2868
2879
  __name: 'NumberInput',
2869
2880
  props: ['modelValue','label','min','max'],
2870
2881
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2894,7 +2905,7 @@ return (_ctx, _cache) => {
2894
2905
  onChange: modelValueUpdated,
2895
2906
  onKeydown: modelValueUpdated,
2896
2907
  onUpdated: modelValueUpdated
2897
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$g)), [
2908
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$i)), [
2898
2909
  [vue.vModelText, inputModel.value]
2899
2910
  ])
2900
2911
  }
@@ -2902,9 +2913,9 @@ return (_ctx, _cache) => {
2902
2913
 
2903
2914
  };
2904
2915
 
2905
- script$k.__file = "src/lib/components/form-components/NumberInput.vue";
2916
+ script$m.__file = "src/lib/components/form-components/NumberInput.vue";
2906
2917
 
2907
- var script$j = {
2918
+ var script$l = {
2908
2919
  __name: 'TextInput',
2909
2920
  props: ['modelValue','label','isInvalid'],
2910
2921
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2940,9 +2951,9 @@ return (_ctx, _cache) => {
2940
2951
 
2941
2952
  };
2942
2953
 
2943
- script$j.__file = "src/lib/components/form-components/TextInput.vue";
2954
+ script$l.__file = "src/lib/components/form-components/TextInput.vue";
2944
2955
 
2945
- var script$i = {
2956
+ var script$k = {
2946
2957
  __name: 'TextAreaInput',
2947
2958
  props: ['modelValue','label'],
2948
2959
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2978,12 +2989,12 @@ return (_ctx, _cache) => {
2978
2989
 
2979
2990
  };
2980
2991
 
2981
- script$i.__file = "src/lib/components/form-components/TextAreaInput.vue";
2992
+ script$k.__file = "src/lib/components/form-components/TextAreaInput.vue";
2982
2993
 
2983
- const _hoisted_1$f = ["value"];
2994
+ const _hoisted_1$h = ["value"];
2984
2995
 
2985
2996
 
2986
- var script$h = {
2997
+ var script$j = {
2987
2998
  __name: 'SelectInput',
2988
2999
  props: ['modelValue','label','data','dataUrl'],
2989
3000
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3034,7 +3045,7 @@ return (_ctx, _cache) => {
3034
3045
  return (vue.openBlock(), vue.createElementBlock("option", {
3035
3046
  key: option.id,
3036
3047
  value: option.id
3037
- }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$f))
3048
+ }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$h))
3038
3049
  }), 128 /* KEYED_FRAGMENT */))
3039
3050
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
3040
3051
  [vue.vModelSelect, inputModel.value]
@@ -3044,9 +3055,9 @@ return (_ctx, _cache) => {
3044
3055
 
3045
3056
  };
3046
3057
 
3047
- script$h.__file = "src/lib/components/form-components/SelectInput.vue";
3058
+ script$j.__file = "src/lib/components/form-components/SelectInput.vue";
3048
3059
 
3049
- var script$g = {
3060
+ var script$i = {
3050
3061
  __name: 'PasswordInput',
3051
3062
  props: ['modelValue','label'],
3052
3063
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3082,9 +3093,9 @@ return (_ctx, _cache) => {
3082
3093
 
3083
3094
  };
3084
3095
 
3085
- script$g.__file = "src/lib/components/form-components/PasswordInput.vue";
3096
+ script$i.__file = "src/lib/components/form-components/PasswordInput.vue";
3086
3097
 
3087
- const _hoisted_1$e = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3098
+ const _hoisted_1$g = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3088
3099
  const _hoisted_2$a = ["innerHTML"];
3089
3100
  const _hoisted_3$9 = ["innerHTML"];
3090
3101
  const _hoisted_4$9 = ["innerHTML"];
@@ -3098,13 +3109,14 @@ const _hoisted_6$6 = {
3098
3109
  const _hoisted_7$4 = { key: 1 };
3099
3110
 
3100
3111
 
3101
- var script$f = {
3112
+ var script$h = {
3102
3113
  __name: 'ShAutoForm',
3103
3114
  props: [
3104
3115
  'action','successCallback','retainDataAfterSubmission',
3105
3116
  'successMessage','fields','customComponents','placeHolders',
3106
3117
  'formClasses',
3107
3118
  'helperTexts','labels','data',
3119
+ 'formClass',
3108
3120
  'actionLabel',
3109
3121
  'textAreas',
3110
3122
  'currentData',
@@ -3130,13 +3142,13 @@ const getFieldComponent = (fieldObj)=>{
3130
3142
  const defaultPhones = ['phone'];
3131
3143
  const defaultEmails = ['email'];
3132
3144
  const formComponents = vue.inject('formComponents');
3133
- const TextComponent = formComponents.text ?? script$j;
3134
- const TextAreaComponent = formComponents.textArea ?? script$i;
3135
- const EmailComponent = formComponents.email ?? script$l;
3136
- const PhoneComponent = formComponents.phone ?? script$p;
3137
- const NumberComponent = formComponents.number ?? script$k;
3138
- const SelectComponent = formComponents.select ?? script$h;
3139
- const PasswordComponent = formComponents.password ?? script$g;
3145
+ const TextComponent = formComponents.text ?? script$l;
3146
+ const TextAreaComponent = formComponents.textArea ?? script$k;
3147
+ const EmailComponent = formComponents.email ?? script$n;
3148
+ const PhoneComponent = formComponents.phone ?? script$r;
3149
+ const NumberComponent = formComponents.number ?? script$m;
3150
+ const SelectComponent = formComponents.select ?? script$j;
3151
+ const PasswordComponent = formComponents.password ?? script$i;
3140
3152
  if(props.customComponents && props.customComponents[field]) {
3141
3153
  return props.customComponents[field]
3142
3154
  }
@@ -3148,16 +3160,16 @@ const getFieldComponent = (fieldObj)=>{
3148
3160
  }
3149
3161
  else
3150
3162
  if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
3151
- return formComponents.textArea ?? script$i
3163
+ return formComponents.textArea ?? script$k
3152
3164
  } else
3153
3165
  if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
3154
- return formComponents.email ?? script$l
3166
+ return formComponents.email ?? script$n
3155
3167
  } else
3156
3168
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3157
- return formComponents.phone ?? script$p
3169
+ return formComponents.phone ?? script$r
3158
3170
  } else
3159
3171
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3160
- return formComponents.number ?? script$k
3172
+ return formComponents.number ?? script$m
3161
3173
  }
3162
3174
  // else
3163
3175
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
@@ -3166,14 +3178,14 @@ const getFieldComponent = (fieldObj)=>{
3166
3178
  // if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3167
3179
  // return formComponents.date ?? DateInput
3168
3180
  // }
3169
- return formComponents.text ?? script$j
3181
+ return formComponents.text ?? script$l
3170
3182
  };
3171
3183
  const shFormElementClasses = vue.ref(null);
3172
3184
  shFormElementClasses.value = vue.inject('shFormElementClasses');
3173
3185
  const shAutoForm = vue.ref(null);
3174
3186
  const closeModal = e => {
3175
3187
  setTimeout(() => {
3176
- const modal = script$f.value.closest('.modal-dialog');
3188
+ const modal = script$h.value.closest('.modal-dialog');
3177
3189
  if(modal){
3178
3190
  const closeBtn = modal.querySelector('[data-bs-dismiss="modal"]');
3179
3191
  closeBtn && closeBtn.click();
@@ -3269,11 +3281,11 @@ vue.onMounted((ev)=>{
3269
3281
 
3270
3282
  return (_ctx, _cache) => {
3271
3283
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3272
- _hoisted_1$e,
3284
+ _hoisted_1$g,
3273
3285
  vue.createElementVNode("form", {
3286
+ class: vue.normalizeClass([__props.formClass, "sh-form"]),
3274
3287
  ref_key: "shAutoForm",
3275
3288
  ref: shAutoForm,
3276
- class: "sh-form",
3277
3289
  onSubmit: _cache[0] || (_cache[0] = e => submitForm(e))
3278
3290
  }, [
3279
3291
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(formFields.value, (field, index) => {
@@ -3337,19 +3349,19 @@ return (_ctx, _cache) => {
3337
3349
  : vue.createCommentVNode("v-if", true)
3338
3350
  ], 14 /* CLASS, STYLE, PROPS */, _hoisted_5$7)
3339
3351
  ], 2 /* CLASS */)
3340
- ], 544 /* HYDRATE_EVENTS, NEED_PATCH */)
3352
+ ], 34 /* CLASS, HYDRATE_EVENTS */)
3341
3353
  ], 64 /* STABLE_FRAGMENT */))
3342
3354
  }
3343
3355
  }
3344
3356
 
3345
3357
  };
3346
3358
 
3347
- script$f.__file = "src/lib/components/ShAutoForm.vue";
3359
+ script$h.__file = "src/lib/components/ShAutoForm.vue";
3348
3360
 
3349
- const _hoisted_1$d = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3361
+ const _hoisted_1$f = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3350
3362
  const _hoisted_2$9 = { class: "dropdown" };
3351
3363
 
3352
- var script$e = {
3364
+ var script$g = {
3353
3365
  __name: 'ShDropDownForm',
3354
3366
  props: ['action',
3355
3367
  'classes',
@@ -3379,7 +3391,7 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3379
3391
 
3380
3392
  return (_ctx, _cache) => {
3381
3393
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3382
- _hoisted_1$d,
3394
+ _hoisted_1$f,
3383
3395
  vue.createElementVNode("div", _hoisted_2$9, [
3384
3396
  vue.createElementVNode("a", {
3385
3397
  class: vue.normalizeClass(vue.unref(btnClass)),
@@ -3396,7 +3408,7 @@ return (_ctx, _cache) => {
3396
3408
  class: "dropdown-menu px-2 py-1",
3397
3409
  "aria-labelledby": dropdownId
3398
3410
  }, [
3399
- vue.createVNode(script$m, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3411
+ vue.createVNode(script$o, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3400
3412
  ])
3401
3413
  ])
3402
3414
  ], 64 /* STABLE_FRAGMENT */))
@@ -3405,16 +3417,9 @@ return (_ctx, _cache) => {
3405
3417
 
3406
3418
  };
3407
3419
 
3408
- script$e.__file = "src/lib/components/ShDropDownForm.vue";
3420
+ script$g.__file = "src/lib/components/ShDropDownForm.vue";
3409
3421
 
3410
- var script$d = {
3411
- name: 'ShModal',
3412
- props: ['modalTitle', 'modalId', 'modalSize'],
3413
- components: {
3414
- }
3415
- };
3416
-
3417
- const _hoisted_1$c = ["id"];
3422
+ const _hoisted_1$e = ["id"];
3418
3423
  const _hoisted_2$8 = { class: "modal-content" };
3419
3424
  const _hoisted_3$8 = { class: "modal-header" };
3420
3425
  const _hoisted_4$8 = { class: "modal-title" };
@@ -3426,18 +3431,46 @@ const _hoisted_5$6 = /*#__PURE__*/vue.createElementVNode("button", {
3426
3431
  const _hoisted_6$5 = { class: "modal-body" };
3427
3432
  const _hoisted_7$3 = { class: "section" };
3428
3433
 
3429
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
3434
+ var script$f = {
3435
+ __name: 'ShModal',
3436
+ props: {
3437
+ modalId: {
3438
+ required: true,
3439
+ type: String
3440
+ },
3441
+ modalTitle: {
3442
+ type: String
3443
+ },
3444
+ modalSize: {
3445
+ type: String
3446
+ }
3447
+ },
3448
+ emits: ['modalClosed'],
3449
+ setup(__props, { emit }) {
3450
+
3451
+ const props = __props;
3452
+
3453
+
3454
+
3455
+ vue.onMounted(()=>{
3456
+ const modal = document.getElementById(props.modalId);
3457
+ modal.addEventListener('hidden.bs.modal', event => {
3458
+ event.target.id == props.modalId && emit('modalClosed');
3459
+ });
3460
+ });
3461
+
3462
+ return (_ctx, _cache) => {
3430
3463
  return (vue.openBlock(), vue.createElementBlock("div", {
3431
3464
  class: "modal fade",
3432
- id: $props.modalId,
3465
+ id: __props.modalId,
3433
3466
  "aria-hidden": "true"
3434
3467
  }, [
3435
3468
  vue.createElementVNode("div", {
3436
- class: vue.normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
3469
+ class: vue.normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
3437
3470
  }, [
3438
3471
  vue.createElementVNode("div", _hoisted_2$8, [
3439
3472
  vue.createElementVNode("div", _hoisted_3$8, [
3440
- vue.createElementVNode("h3", _hoisted_4$8, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
3473
+ vue.createElementVNode("h3", _hoisted_4$8, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3441
3474
  _hoisted_5$6
3442
3475
  ]),
3443
3476
  vue.createElementVNode("div", _hoisted_6$5, [
@@ -3447,15 +3480,17 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
3447
3480
  ])
3448
3481
  ])
3449
3482
  ], 2 /* CLASS */)
3450
- ], 8 /* PROPS */, _hoisted_1$c))
3483
+ ], 8 /* PROPS */, _hoisted_1$e))
3484
+ }
3451
3485
  }
3452
3486
 
3453
- script$d.render = render$4;
3454
- script$d.__file = "src/lib/components/ShModal.vue";
3487
+ };
3455
3488
 
3456
- const _hoisted_1$b = ["href"];
3489
+ script$f.__file = "src/lib/components/ShModal.vue";
3457
3490
 
3458
- var script$c = {
3491
+ const _hoisted_1$d = ["href"];
3492
+
3493
+ var script$e = {
3459
3494
  __name: 'ShModalForm',
3460
3495
  props: ['action',
3461
3496
  'classes',
@@ -3494,13 +3529,13 @@ return (_ctx, _cache) => {
3494
3529
  "data-bs-toggle": "modal"
3495
3530
  }, [
3496
3531
  vue.renderSlot(_ctx.$slots, "default")
3497
- ], 10 /* CLASS, PROPS */, _hoisted_1$b),
3498
- vue.createVNode(script$d, {
3532
+ ], 10 /* CLASS, PROPS */, _hoisted_1$d),
3533
+ vue.createVNode(script$f, {
3499
3534
  "modal-id": modalId,
3500
3535
  "modal-title": __props.modalTitle
3501
3536
  }, {
3502
3537
  default: vue.withCtx(() => [
3503
- vue.createVNode(script$m, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3538
+ vue.createVNode(script$o, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3504
3539
  ]),
3505
3540
  _: 1 /* STABLE */
3506
3541
  }, 8 /* PROPS */, ["modal-title"])
@@ -3510,11 +3545,11 @@ return (_ctx, _cache) => {
3510
3545
 
3511
3546
  };
3512
3547
 
3513
- script$c.__file = "src/lib/components/ShModalForm.vue";
3548
+ script$e.__file = "src/lib/components/ShModalForm.vue";
3514
3549
 
3515
- const _hoisted_1$a = ["href"];
3550
+ const _hoisted_1$c = ["href"];
3516
3551
 
3517
- var script$b = {
3552
+ var script$d = {
3518
3553
  __name: 'ShModalFormAuto',
3519
3554
  props: ['action',
3520
3555
  'classes',
@@ -3554,13 +3589,13 @@ return (_ctx, _cache) => {
3554
3589
  "data-bs-toggle": "modal"
3555
3590
  }, [
3556
3591
  vue.renderSlot(_ctx.$slots, "default")
3557
- ], 10 /* CLASS, PROPS */, _hoisted_1$a),
3558
- vue.createVNode(script$d, {
3592
+ ], 10 /* CLASS, PROPS */, _hoisted_1$c),
3593
+ vue.createVNode(script$f, {
3559
3594
  "modal-id": modalId,
3560
3595
  "modal-title": __props.modalTitle
3561
3596
  }, {
3562
3597
  default: vue.withCtx(() => [
3563
- vue.createVNode(script$f, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3598
+ vue.createVNode(script$h, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3564
3599
  ]),
3565
3600
  _: 1 /* STABLE */
3566
3601
  }, 8 /* PROPS */, ["modal-title"])
@@ -3570,26 +3605,9 @@ return (_ctx, _cache) => {
3570
3605
 
3571
3606
  };
3572
3607
 
3573
- script$b.__file = "src/lib/components/ShModalFormAuto.vue";
3574
-
3575
- var script$a = {
3576
- name: 'ShCanvas',
3577
- props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
3578
- components: {
3579
- },
3580
- data () {
3581
- return {
3582
- side: this.position === undefined ? 'offcanvas-start' : 'offcanvas-' + this.position
3583
- }
3584
- },
3585
- methods: {
3586
- offcanvasClosed: function () {
3587
- this.$emit('offcanvasClosed');
3588
- }
3589
- }
3590
- };
3608
+ script$d.__file = "src/lib/components/ShModalFormAuto.vue";
3591
3609
 
3592
- const _hoisted_1$9 = ["id"];
3610
+ const _hoisted_1$b = ["id"];
3593
3611
  const _hoisted_2$7 = { class: "offcanvas-header" };
3594
3612
  const _hoisted_3$7 = {
3595
3613
  class: "offcanvas-title",
@@ -3597,20 +3615,57 @@ const _hoisted_3$7 = {
3597
3615
  };
3598
3616
  const _hoisted_4$7 = { class: "offcanvas-body" };
3599
3617
 
3600
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3618
+ var script$c = {
3619
+ __name: 'ShCanvas',
3620
+ props: {
3621
+ canvasId: {
3622
+ required: true,
3623
+ type: String
3624
+ },
3625
+ canvasTitle: {
3626
+ type: String
3627
+ },
3628
+ position: {
3629
+ type: String
3630
+ },
3631
+ canvasSize: {
3632
+ type: String
3633
+ },
3634
+ side: {
3635
+ type: String
3636
+ }
3637
+ },
3638
+ emits: ['canvasClosed'],
3639
+ setup(__props, { emit }) {
3640
+
3641
+ const props = __props;
3642
+
3643
+
3644
+
3645
+ const pos = vue.ref(props.position ?? props.side);
3646
+ const canvasSide = vue.ref(pos.value ? `offcanvas-${pos.value}` : 'offcanvas-start');
3647
+
3648
+ vue.onMounted(()=>{
3649
+ const canvas = document.getElementById(props.canvasId);
3650
+ canvas.addEventListener('hidden.bs.offcanvas', event => {
3651
+ event.target.id === props.canvasId && emit('canvasClosed');
3652
+ });
3653
+ });
3654
+
3655
+ return (_ctx, _cache) => {
3601
3656
  return (vue.openBlock(), vue.createElementBlock("div", {
3602
- class: vue.normalizeClass(["offcanvas", $data.side +' '+ $props.canvasSize + '']),
3657
+ class: vue.normalizeClass(["offcanvas", canvasSide.value +' '+ __props.canvasSize + '']),
3603
3658
  "data-bs-scroll": "true",
3604
3659
  tabindex: "-1",
3605
- id: $props.canvasId,
3660
+ id: __props.canvasId,
3606
3661
  "aria-labelledby": "offcanvasScrollingLabel"
3607
3662
  }, [
3608
3663
  vue.createElementVNode("div", _hoisted_2$7, [
3609
- vue.createElementVNode("h5", _hoisted_3$7, vue.toDisplayString($props.canvasTitle), 1 /* TEXT */),
3664
+ vue.createElementVNode("h5", _hoisted_3$7, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3610
3665
  vue.createElementVNode("button", {
3611
3666
  type: "button",
3612
3667
  ref: "closecanvas",
3613
- onClick: _cache[0] || (_cache[0] = (...args) => ($options.offcanvasClosed && $options.offcanvasClosed(...args))),
3668
+ onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.offcanvasClosed && _ctx.offcanvasClosed(...args))),
3614
3669
  class: "btn-close text-reset",
3615
3670
  "data-bs-dismiss": "offcanvas",
3616
3671
  "aria-label": "Close"
@@ -3619,13 +3674,15 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3619
3674
  vue.createElementVNode("div", _hoisted_4$7, [
3620
3675
  vue.renderSlot(_ctx.$slots, "default")
3621
3676
  ])
3622
- ], 10 /* CLASS, PROPS */, _hoisted_1$9))
3677
+ ], 10 /* CLASS, PROPS */, _hoisted_1$b))
3678
+ }
3623
3679
  }
3624
3680
 
3625
- script$a.render = render$3;
3626
- script$a.__file = "src/lib/components/ShCanvas.vue";
3681
+ };
3627
3682
 
3628
- var script$9 = {
3683
+ script$c.__file = "src/lib/components/ShCanvas.vue";
3684
+
3685
+ var script$b = {
3629
3686
  name: 'Pagination',
3630
3687
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
3631
3688
  data () {
@@ -3696,7 +3753,7 @@ var script$9 = {
3696
3753
  }
3697
3754
  };
3698
3755
 
3699
- const _hoisted_1$8 = { key: 0 };
3756
+ const _hoisted_1$a = { key: 0 };
3700
3757
  const _hoisted_2$6 = { class: "record_count_body mb-3" };
3701
3758
  const _hoisted_3$6 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3702
3759
  const _hoisted_4$6 = /*#__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);
@@ -3742,7 +3799,7 @@ const _hoisted_22$1 = {
3742
3799
 
3743
3800
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3744
3801
  return ($props.paginationStyle !== 'loadMore')
3745
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
3802
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
3746
3803
  vue.createElementVNode("div", _hoisted_2$6, [
3747
3804
  _hoisted_3$6,
3748
3805
  vue.createTextVNode("  "),
@@ -3814,17 +3871,17 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3814
3871
  ]))
3815
3872
  }
3816
3873
 
3817
- script$9.render = render$2;
3818
- script$9.__file = "src/lib/components/list_templates/Pagination.vue";
3874
+ script$b.render = render$2;
3875
+ script$b.__file = "src/lib/components/list_templates/Pagination.vue";
3819
3876
 
3820
- const _hoisted_1$7 = /*#__PURE__*/vue.createElementVNode("span", {
3877
+ const _hoisted_1$9 = /*#__PURE__*/vue.createElementVNode("span", {
3821
3878
  class: "spinner-border spinner-border-sm me-1",
3822
3879
  role: "status",
3823
3880
  "aria-hidden": "true"
3824
3881
  }, null, -1 /* HOISTED */);
3825
3882
 
3826
3883
 
3827
- var script$8 = {
3884
+ var script$a = {
3828
3885
  __name: 'ShConfirmAction',
3829
3886
  props: {
3830
3887
  data: Object,
@@ -3897,7 +3954,7 @@ return (_ctx, _cache) => {
3897
3954
  }, [
3898
3955
  (processing.value)
3899
3956
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3900
- _hoisted_1$7,
3957
+ _hoisted_1$9,
3901
3958
  vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
3902
3959
  ], 64 /* STABLE_FRAGMENT */))
3903
3960
  : vue.createCommentVNode("v-if", true),
@@ -3910,15 +3967,15 @@ return (_ctx, _cache) => {
3910
3967
 
3911
3968
  };
3912
3969
 
3913
- script$8.__file = "src/lib/components/ShConfirmAction.vue";
3970
+ script$a.__file = "src/lib/components/ShConfirmAction.vue";
3914
3971
 
3915
- const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
3972
+ const _hoisted_1$8 = /*#__PURE__*/vue.createElementVNode("span", {
3916
3973
  class: "spinner-border spinner-border-sm me-1",
3917
3974
  role: "status",
3918
3975
  "aria-hidden": "true"
3919
3976
  }, null, -1 /* HOISTED */);
3920
3977
 
3921
- var script$7 = {
3978
+ var script$9 = {
3922
3979
  __name: 'ShSilentAction',
3923
3980
  props: {
3924
3981
  data: Object,
@@ -3993,7 +4050,7 @@ return (_ctx, _cache) => {
3993
4050
  }, [
3994
4051
  (processing.value)
3995
4052
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3996
- _hoisted_1$6,
4053
+ _hoisted_1$8,
3997
4054
  vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
3998
4055
  ], 64 /* STABLE_FRAGMENT */))
3999
4056
  : vue.createCommentVNode("v-if", true),
@@ -4006,9 +4063,9 @@ return (_ctx, _cache) => {
4006
4063
 
4007
4064
  };
4008
4065
 
4009
- script$7.__file = "src/lib/components/ShSilentAction.vue";
4066
+ script$9.__file = "src/lib/components/ShSilentAction.vue";
4010
4067
 
4011
- var script$6 = {
4068
+ var script$8 = {
4012
4069
  name: 'sh-table',
4013
4070
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
4014
4071
  inject: ['channel'],
@@ -4047,14 +4104,12 @@ var script$6 = {
4047
4104
  methods: {
4048
4105
  userTyping: function(){
4049
4106
  if (this.timeOut){
4050
- console.log('timer cleared');
4051
4107
  clearTimeout(this.timeOut);
4052
4108
  }
4053
4109
  const self = this;
4054
4110
  this.timeOut = setTimeout(()=>{
4055
- console.log('Searching');
4056
4111
  self.reloadData(1);
4057
- },1000);
4112
+ },800);
4058
4113
  },
4059
4114
  cleanCanvasProps: function (actions) {
4060
4115
  let replaced = actions;
@@ -4089,7 +4144,6 @@ var script$6 = {
4089
4144
  this.reloadData();
4090
4145
  },
4091
4146
  getLinkClass: function (config) {
4092
- console.log(config);
4093
4147
  if (typeof config === 'object') {
4094
4148
  return config.class
4095
4149
  }
@@ -4138,10 +4192,10 @@ var script$6 = {
4138
4192
  },
4139
4193
  replaceLinkUrl: function (path, obj) {
4140
4194
  if (typeof path === 'object') {
4141
- path = path.link;
4195
+ path = path.link ?? path.url;
4142
4196
  }
4143
4197
  var matches = path.match(/\{(.*?)\}/g);
4144
- matches.forEach(key => {
4198
+ matches && matches.forEach(key => {
4145
4199
  key = key.replace('{', '');
4146
4200
  key = key.replace('}', '');
4147
4201
  path = path.replace(`{${key}}`, obj[key]);
@@ -4180,7 +4234,6 @@ var script$6 = {
4180
4234
  // window.open(this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name, '_blank').focus()
4181
4235
  }
4182
4236
  }).catch(reason => {
4183
- console.log(reason);
4184
4237
  this.downloading = false;
4185
4238
  const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText}`;
4186
4239
  shRepo.swalError('Error', error);
@@ -4225,9 +4278,6 @@ var script$6 = {
4225
4278
  this.pagination_data.displayCount = totalShown;
4226
4279
  const scrollingElement = (document.scrollingElement || document.body);
4227
4280
  scrollingElement.scrollTop = scrollingElement.scrollHeight;
4228
- // const all = []
4229
- // console.log(all.push(response.data))
4230
- // console.log(this.records, response.data)
4231
4281
  } else {
4232
4282
  this.records = response.data;
4233
4283
  }
@@ -4253,10 +4303,10 @@ var script$6 = {
4253
4303
  this.reloadData();
4254
4304
  },
4255
4305
  components: {
4256
- ShSilentAction: script$7,
4257
- ShConfirmAction: script$8,
4258
- ShCanvas: script$a,
4259
- pagination: script$9
4306
+ ShSilentAction: script$9,
4307
+ ShConfirmAction: script$a,
4308
+ ShCanvas: script$c,
4309
+ pagination: script$b
4260
4310
  },
4261
4311
  computed: {
4262
4312
  windowWidth: function () {
@@ -4274,7 +4324,7 @@ var script$6 = {
4274
4324
  }
4275
4325
  };
4276
4326
 
4277
- const _hoisted_1$5 = { class: "auto-table mt-2" };
4327
+ const _hoisted_1$7 = { class: "auto-table mt-2" };
4278
4328
  const _hoisted_2$5 = {
4279
4329
  key: 0,
4280
4330
  class: "col-md-4 mb-2"
@@ -4437,7 +4487,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4437
4487
  const _component_pagination = vue.resolveComponent("pagination");
4438
4488
  const _component_sh_canvas = vue.resolveComponent("sh-canvas");
4439
4489
 
4440
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
4490
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
4441
4491
  ($props.hasDownload)
4442
4492
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
4443
4493
  vue.createElementVNode("button", {
@@ -4891,10 +4941,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4891
4941
  ]))
4892
4942
  }
4893
4943
 
4894
- script$6.render = render$1;
4895
- script$6.__file = "src/lib/components/ShTable.vue";
4944
+ script$8.render = render$1;
4945
+ script$8.__file = "src/lib/components/ShTable.vue";
4896
4946
 
4897
- var script$5 = {
4947
+ var script$7 = {
4898
4948
  name: 'ShTabs',
4899
4949
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
4900
4950
  data () {
@@ -5015,10 +5065,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5015
5065
  ], 64 /* STABLE_FRAGMENT */))
5016
5066
  }
5017
5067
 
5018
- script$5.render = render;
5019
- script$5.__file = "src/lib/components/ShTabs.vue";
5068
+ script$7.render = render;
5069
+ script$7.__file = "src/lib/components/ShTabs.vue";
5020
5070
 
5021
- const _hoisted_1$4 = {
5071
+ const _hoisted_1$6 = {
5022
5072
  class: "nav nav-tabs",
5023
5073
  role: "tablist"
5024
5074
  };
@@ -5031,7 +5081,7 @@ const _hoisted_4$4 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none"
5031
5081
  const _hoisted_5$4 = { class: "sh_tab_count" };
5032
5082
  const _hoisted_6$3 = { class: "tab-content" };
5033
5083
 
5034
- var script$4 = {
5084
+ var script$6 = {
5035
5085
  __name: 'ShDynamicTabs',
5036
5086
  props: ['tabs','data'],
5037
5087
  setup(__props) {
@@ -5056,7 +5106,7 @@ function setTab(tab){
5056
5106
 
5057
5107
  return (_ctx, _cache) => {
5058
5108
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
5059
- vue.createElementVNode("ul", _hoisted_1$4, [
5109
+ vue.createElementVNode("ul", _hoisted_1$6, [
5060
5110
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tabs), (tab) => {
5061
5111
  return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$4, [
5062
5112
  vue.createElementVNode("button", {
@@ -5085,7 +5135,64 @@ return (_ctx, _cache) => {
5085
5135
 
5086
5136
  };
5087
5137
 
5088
- script$4.__file = "src/lib/components/ShDynamicTabs.vue";
5138
+ script$6.__file = "src/lib/components/ShDynamicTabs.vue";
5139
+
5140
+ const _hoisted_1$5 = ["href"];
5141
+
5142
+
5143
+ var script$5 = {
5144
+ __name: 'ShModalBtn',
5145
+ props: {
5146
+ modalId: {
5147
+ required: true
5148
+ }
5149
+ },
5150
+ setup(__props) {
5151
+
5152
+
5153
+
5154
+ return (_ctx, _cache) => {
5155
+ return (vue.openBlock(), vue.createElementBlock("a", {
5156
+ href: `#${__props.modalId}`,
5157
+ "data-bs-toggle": "modal"
5158
+ }, [
5159
+ vue.renderSlot(_ctx.$slots, "default")
5160
+ ], 8 /* PROPS */, _hoisted_1$5))
5161
+ }
5162
+ }
5163
+
5164
+ };
5165
+
5166
+ script$5.__file = "src/lib/components/ShModalBtn.vue";
5167
+
5168
+ const _hoisted_1$4 = ["href"];
5169
+
5170
+
5171
+ var script$4 = {
5172
+ __name: 'ShCanvasBtn',
5173
+ props: {
5174
+ canvasId: {
5175
+ required: true,
5176
+ type: String
5177
+ }
5178
+ },
5179
+ setup(__props) {
5180
+
5181
+
5182
+
5183
+ return (_ctx, _cache) => {
5184
+ return (vue.openBlock(), vue.createElementBlock("a", {
5185
+ href: `#${__props.canvasId}`,
5186
+ "data-bs-toggle": "offcanvas"
5187
+ }, [
5188
+ vue.renderSlot(_ctx.$slots, "default")
5189
+ ], 8 /* PROPS */, _hoisted_1$4))
5190
+ }
5191
+ }
5192
+
5193
+ };
5194
+
5195
+ script$4.__file = "src/lib/components/ShCanvasBtn.vue";
5089
5196
 
5090
5197
  const useUserStore = pinia.defineStore('user-store', {
5091
5198
  state: () => ({
@@ -5381,7 +5488,7 @@ return (_ctx, _cache) => {
5381
5488
  (permissionsChanged.value)
5382
5489
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
5383
5490
  vue.createElementVNode("div", _hoisted_17, [
5384
- vue.createVNode(script$7, {
5491
+ vue.createVNode(script$9, {
5385
5492
  onSuccess: permissionsUpdated,
5386
5493
  url: `sh-departments/department/permissions/${vue.unref(departmentId)}/${selectedModule.value}`,
5387
5494
  data: {permissions: selectedPermissions.value},
@@ -5450,7 +5557,7 @@ return (_ctx, _cache) => {
5450
5557
  _hoisted_5$2,
5451
5558
  vue.createTextVNode(" ADD DEPARTMENT")
5452
5559
  ], 512 /* NEED_PATCH */),
5453
- vue.createVNode(script$6, {
5560
+ vue.createVNode(script$8, {
5454
5561
  headers: ['id','name','description', 'created_at'],
5455
5562
  "end-point": "sh-departments/list",
5456
5563
  actions: {
@@ -5464,12 +5571,12 @@ return (_ctx, _cache) => {
5464
5571
  ]
5465
5572
  }
5466
5573
  }),
5467
- vue.createVNode(script$d, {
5574
+ vue.createVNode(script$f, {
5468
5575
  "modal-id": "sh-department_modal",
5469
5576
  "modal-title": "Department Form"
5470
5577
  }, {
5471
5578
  default: vue.withCtx(() => [
5472
- vue.createVNode(script$m, {
5579
+ vue.createVNode(script$o, {
5473
5580
  "success-callback": "departmentAdded",
5474
5581
  onDepartmentAdded: departmentAdded,
5475
5582
  action: "admin/departments/store",
@@ -5603,7 +5710,7 @@ return (_ctx, _cache) => {
5603
5710
  vue.createElementVNode("div", _hoisted_2$1, [
5604
5711
  _hoisted_3$1,
5605
5712
  vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
5606
- vue.createVNode(script$6, {
5713
+ vue.createVNode(script$8, {
5607
5714
  actions: {
5608
5715
  label: 'Actions',
5609
5716
  actions: [
@@ -5623,12 +5730,12 @@ return (_ctx, _cache) => {
5623
5730
  headers: ['id',showModule,'created_at'],
5624
5731
  "end-point": 'admin/departments/department/list-modules/' + id.value
5625
5732
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
5626
- vue.createVNode(script$d, {
5733
+ vue.createVNode(script$f, {
5627
5734
  "modal-id": "addModule",
5628
5735
  "modal-title": "Add Module Department"
5629
5736
  }, {
5630
5737
  default: vue.withCtx(() => [
5631
- vue.createVNode(script$m, {
5738
+ vue.createVNode(script$o, {
5632
5739
  "reload-select-items": vue.unref(reload),
5633
5740
  "success-callback": moduleAdded,
5634
5741
  "fill-selects": {
@@ -5650,7 +5757,7 @@ return (_ctx, _cache) => {
5650
5757
  ref: permissionCanvasBtn,
5651
5758
  "data-bs-toggle": "offcanvas"
5652
5759
  }, null, 512 /* NEED_PATCH */),
5653
- vue.createVNode(script$a, {
5760
+ vue.createVNode(script$c, {
5654
5761
  "canvas-id": "permissionsCanvas",
5655
5762
  position: "end enlarged",
5656
5763
  "canvas-title": "Module Permissions"
@@ -5765,7 +5872,7 @@ return (_ctx, _cache) => {
5765
5872
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
5766
5873
  (section.value === 'login')
5767
5874
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
5768
- vue.createVNode(script$m, {
5875
+ vue.createVNode(script$o, {
5769
5876
  class: "sh-login-form",
5770
5877
  fields: ['email','password'],
5771
5878
  "action-label": "Login",
@@ -5790,7 +5897,7 @@ return (_ctx, _cache) => {
5790
5897
  (vue.unref(registerSubTitle))
5791
5898
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
5792
5899
  : vue.createCommentVNode("v-if", true),
5793
- vue.createVNode(script$m, {
5900
+ vue.createVNode(script$o, {
5794
5901
  class: "sh-login-form",
5795
5902
  fields: vue.unref(registrationFields),
5796
5903
  "action-label": "Sign Up",
@@ -5837,7 +5944,7 @@ const ShFrontend = {
5837
5944
  const registerTitle = options.registerTitle ?? 'Create a new account';
5838
5945
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
5839
5946
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
5840
- options.formTextInput ?? script$j;
5947
+ options.formTextInput ?? script$l;
5841
5948
  const loginUrl = options.loginUrl ?? `/login`;
5842
5949
  const redirectLogin = options.redirectLogin ?? `/`;
5843
5950
  const redirectRegister = options.redirectRegister ?? `/`;
@@ -5884,20 +5991,22 @@ const ShFrontend = {
5884
5991
 
5885
5992
  exports.Countries = countries;
5886
5993
  exports.ManagePermissions = script$3;
5887
- exports.ShAutoForm = script$f;
5888
- exports.ShCanvas = script$a;
5889
- exports.ShConfirmAction = script$8;
5890
- exports.ShDropDownForm = script$e;
5891
- exports.ShDynamicTabs = script$4;
5892
- exports.ShForm = script$m;
5994
+ exports.ShAutoForm = script$h;
5995
+ exports.ShCanvas = script$c;
5996
+ exports.ShCanvasBtn = script$4;
5997
+ exports.ShConfirmAction = script$a;
5998
+ exports.ShDropDownForm = script$g;
5999
+ exports.ShDynamicTabs = script$6;
6000
+ exports.ShForm = script$o;
5893
6001
  exports.ShFrontend = ShFrontend;
5894
- exports.ShModal = script$d;
5895
- exports.ShModalForm = script$c;
5896
- exports.ShModalFormAuto = script$b;
5897
- exports.ShPhone = script$p;
5898
- exports.ShSilentAction = script$7;
5899
- exports.ShTable = script$6;
5900
- exports.ShTabs = script$5;
6002
+ exports.ShModal = script$f;
6003
+ exports.ShModalBtn = script$5;
6004
+ exports.ShModalForm = script$e;
6005
+ exports.ShModalFormAuto = script$d;
6006
+ exports.ShPhone = script$r;
6007
+ exports.ShSilentAction = script$9;
6008
+ exports.ShTable = script$8;
6009
+ exports.ShTabs = script$7;
5901
6010
  exports.shApis = shApis;
5902
6011
  exports.shRepo = shRepo;
5903
6012
  exports.shStorage = ShStorage;