@iankibetsh/shframework 4.8.2 → 4.8.3

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 +583 -376
  2. package/dist/library.mjs +573 -365
  3. package/package.json +1 -1
package/dist/library.js CHANGED
@@ -10,7 +10,6 @@ var NProgress = require('nprogress');
10
10
  var vue = require('vue');
11
11
  var _ = require('lodash');
12
12
  var pinia = require('pinia');
13
- var TableActions = require('@/lib/components/table/TableActions.vue');
14
13
  var vueRouter = require('vue-router');
15
14
 
16
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -20,7 +19,6 @@ var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
20
19
  var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
21
20
  var NProgress__default = /*#__PURE__*/_interopDefaultLegacy(NProgress);
22
21
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
23
- var TableActions__default = /*#__PURE__*/_interopDefaultLegacy(TableActions);
24
22
 
25
23
  function setItem (key, value) {
26
24
  let toStore = value;
@@ -2008,7 +2006,7 @@ const countries = [
2008
2006
  }
2009
2007
  ];
2010
2008
 
2011
- var script$y = {
2009
+ var script$A = {
2012
2010
  name: 'PhoneInput',
2013
2011
  props: ['modelValue', 'country_code','disabled'],
2014
2012
  data () {
@@ -2078,23 +2076,23 @@ var script$y = {
2078
2076
  }
2079
2077
  };
2080
2078
 
2081
- const _hoisted_1$q = {
2079
+ const _hoisted_1$s = {
2082
2080
  class: "sh-phone mb-3",
2083
2081
  style: {"display":"flex"}
2084
2082
  };
2085
- const _hoisted_2$g = {
2083
+ const _hoisted_2$i = {
2086
2084
  key: 0,
2087
2085
  style: {"display":"contents"}
2088
2086
  };
2089
- const _hoisted_3$f = ["src"];
2090
- const _hoisted_4$f = ["value"];
2091
- const _hoisted_5$c = ["disabled"];
2087
+ const _hoisted_3$g = ["src"];
2088
+ const _hoisted_4$g = ["value"];
2089
+ const _hoisted_5$d = ["disabled"];
2092
2090
 
2093
2091
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2094
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
2092
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
2095
2093
  ($data.selectedCountry)
2096
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, [
2097
- vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$f),
2094
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$i, [
2095
+ vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$g),
2098
2096
  vue.createTextVNode(" " + vue.toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
2099
2097
  ]))
2100
2098
  : vue.createCommentVNode("v-if", true),
@@ -2107,7 +2105,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2107
2105
  return (vue.openBlock(), vue.createElementBlock("option", {
2108
2106
  value: country,
2109
2107
  key: country.dialCode
2110
- }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$f))
2108
+ }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$g))
2111
2109
  }), 128 /* KEYED_FRAGMENT */))
2112
2110
  ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
2113
2111
  [vue.vModelSelect, $data.selectedCountry]
@@ -2120,23 +2118,23 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2120
2118
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2121
2119
  placeholder: "712345678",
2122
2120
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2123
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$c), [
2121
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2124
2122
  [vue.vModelText, $data.input]
2125
2123
  ])
2126
2124
  ]))
2127
2125
  }
2128
2126
 
2129
- script$y.render = render$4;
2130
- script$y.__file = "src/lib/components/form-components/PhoneInput.vue";
2127
+ script$A.render = render$4;
2128
+ script$A.__file = "src/lib/components/form-components/PhoneInput.vue";
2131
2129
 
2132
- const _hoisted_1$p = {
2130
+ const _hoisted_1$r = {
2133
2131
  key: 0,
2134
2132
  class: "dropdown sh-suggest"
2135
2133
  };
2136
- const _hoisted_2$f = ["id"];
2137
- const _hoisted_3$e = { class: "sh-suggestions-holder" };
2138
- const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
2139
- const _hoisted_5$b = ["onClick"];
2134
+ const _hoisted_2$h = ["id"];
2135
+ const _hoisted_3$f = { class: "sh-suggestions-holder" };
2136
+ const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2137
+ const _hoisted_5$c = ["onClick"];
2140
2138
  const _hoisted_6$a = ["id"];
2141
2139
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2142
2140
  const _hoisted_8$8 = ["onClick"];
@@ -2150,7 +2148,7 @@ const _hoisted_10$8 = {
2150
2148
  };
2151
2149
 
2152
2150
 
2153
- var script$x = {
2151
+ var script$z = {
2154
2152
  __name: 'ShSuggest',
2155
2153
  props: ['data','allowMultiple','url','modelValue','optionTemplate'],
2156
2154
  emits: ['update:modelValue'],
@@ -2286,23 +2284,23 @@ vue.watch(()=>props.modelValue, (newValue)=>{
2286
2284
 
2287
2285
  return (_ctx, _cache) => {
2288
2286
  return (vue.unref(id))
2289
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
2287
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
2290
2288
  vue.createElementVNode("div", {
2291
2289
  id: vue.unref(id),
2292
2290
  "data-bs-toggle": "dropdown",
2293
2291
  class: "p-0 d-flex sh-suggest-control dropdown-toggle",
2294
2292
  "aria-expanded": "false"
2295
2293
  }, [
2296
- vue.createElementVNode("div", _hoisted_3$e, [
2294
+ vue.createElementVNode("div", _hoisted_3$f, [
2297
2295
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(selectedSuggestions), (sgt) => {
2298
- return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_4$e, [
2296
+ return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_4$f, [
2299
2297
  vue.createTextVNode(vue.toDisplayString(sgt.name) + " ", 1 /* TEXT */),
2300
2298
  vue.createElementVNode("button", {
2301
2299
  onClick: $event => (removeSuggestion(sgt.id)),
2302
2300
  type: "button",
2303
2301
  class: "btn-close border-start border-1 ms-1",
2304
2302
  "aria-label": "Close"
2305
- }, null, 8 /* PROPS */, _hoisted_5$b)
2303
+ }, null, 8 /* PROPS */, _hoisted_5$c)
2306
2304
  ]))
2307
2305
  }), 256 /* UNKEYED_FRAGMENT */))
2308
2306
  ]),
@@ -2313,7 +2311,7 @@ return (_ctx, _cache) => {
2313
2311
  onChange: filterData,
2314
2312
  class: "flex-fill h-100 sh-suggestion-input"
2315
2313
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6$a)
2316
- ], 8 /* PROPS */, _hoisted_2$f),
2314
+ ], 8 /* PROPS */, _hoisted_2$h),
2317
2315
  vue.createElementVNode("ul", {
2318
2316
  class: "dropdown-menu w-100",
2319
2317
  id: 'dropwdown_section' + vue.unref(id),
@@ -2355,15 +2353,15 @@ return (_ctx, _cache) => {
2355
2353
 
2356
2354
  };
2357
2355
 
2358
- script$x.__scopeId = "data-v-71cc9569";
2359
- script$x.__file = "src/lib/components/form-components/ShSuggest.vue";
2356
+ script$z.__scopeId = "data-v-71cc9569";
2357
+ script$z.__file = "src/lib/components/form-components/ShSuggest.vue";
2360
2358
 
2361
- var script$w = {
2359
+ var script$y = {
2362
2360
  name: 'ShForm',
2363
2361
  components: {
2364
- PhoneInput: script$y,
2365
- ShSuggest: script$x,
2366
- ShPhone: script$y
2362
+ PhoneInput: script$A,
2363
+ ShSuggest: script$z,
2364
+ ShPhone: script$A
2367
2365
  },
2368
2366
  props: [
2369
2367
  'action',
@@ -2712,18 +2710,18 @@ var script$w = {
2712
2710
  }
2713
2711
  };
2714
2712
 
2715
- const _hoisted_1$o = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2716
- const _hoisted_2$e = {
2713
+ const _hoisted_1$q = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2714
+ const _hoisted_2$g = {
2717
2715
  ref: "ShAutoForm",
2718
2716
  class: "sh-form"
2719
2717
  };
2720
- const _hoisted_3$d = {
2718
+ const _hoisted_3$e = {
2721
2719
  key: 0,
2722
2720
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2723
2721
  role: "alert"
2724
2722
  };
2725
- const _hoisted_4$d = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2726
- const _hoisted_5$a = { key: 0 };
2723
+ const _hoisted_4$e = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2724
+ const _hoisted_5$b = { key: 0 };
2727
2725
  const _hoisted_6$9 = { key: 1 };
2728
2726
  const _hoisted_7$8 = { class: "row" };
2729
2727
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2779,15 +2777,15 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2779
2777
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2780
2778
 
2781
2779
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2782
- _hoisted_1$o,
2783
- vue.createElementVNode("form", _hoisted_2$e, [
2780
+ _hoisted_1$q,
2781
+ vue.createElementVNode("form", _hoisted_2$g, [
2784
2782
  vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2785
2783
  vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2786
2784
  (_ctx.form_status == 3)
2787
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$d, [
2788
- _hoisted_4$d,
2785
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$e, [
2786
+ _hoisted_4$e,
2789
2787
  (_ctx.errorText)
2790
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$a, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2788
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$b, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2791
2789
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2792
2790
  vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2793
2791
  ]))
@@ -3018,10 +3016,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3018
3016
  ], 64 /* STABLE_FRAGMENT */))
3019
3017
  }
3020
3018
 
3021
- script$w.render = render$3;
3022
- script$w.__file = "src/lib/components/ShForm.vue";
3019
+ script$y.render = render$3;
3020
+ script$y.__file = "src/lib/components/ShForm.vue";
3023
3021
 
3024
- var script$v = {
3022
+ var script$x = {
3025
3023
  __name: 'EmailInput',
3026
3024
  props: ['modelValue','label'],
3027
3025
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3059,12 +3057,12 @@ return (_ctx, _cache) => {
3059
3057
 
3060
3058
  };
3061
3059
 
3062
- script$v.__file = "src/lib/components/form-components/EmailInput.vue";
3060
+ script$x.__file = "src/lib/components/form-components/EmailInput.vue";
3063
3061
 
3064
- const _hoisted_1$n = ["min", "max"];
3062
+ const _hoisted_1$p = ["min", "max"];
3065
3063
 
3066
3064
 
3067
- var script$u = {
3065
+ var script$w = {
3068
3066
  __name: 'NumberInput',
3069
3067
  props: ['modelValue','label','min','max'],
3070
3068
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3096,7 +3094,7 @@ return (_ctx, _cache) => {
3096
3094
  onChange: modelValueUpdated,
3097
3095
  onKeydown: modelValueUpdated,
3098
3096
  onUpdated: modelValueUpdated
3099
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$n)), [
3097
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$p)), [
3100
3098
  [vue.vModelText, inputModel.value]
3101
3099
  ])
3102
3100
  }
@@ -3104,9 +3102,9 @@ return (_ctx, _cache) => {
3104
3102
 
3105
3103
  };
3106
3104
 
3107
- script$u.__file = "src/lib/components/form-components/NumberInput.vue";
3105
+ script$w.__file = "src/lib/components/form-components/NumberInput.vue";
3108
3106
 
3109
- var script$t = {
3107
+ var script$v = {
3110
3108
  __name: 'TextInput',
3111
3109
  props: ['modelValue','label','isInvalid'],
3112
3110
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3146,9 +3144,9 @@ return (_ctx, _cache) => {
3146
3144
 
3147
3145
  };
3148
3146
 
3149
- script$t.__file = "src/lib/components/form-components/TextInput.vue";
3147
+ script$v.__file = "src/lib/components/form-components/TextInput.vue";
3150
3148
 
3151
- var script$s = {
3149
+ var script$u = {
3152
3150
  __name: 'TextAreaInput',
3153
3151
  props: ['modelValue','label'],
3154
3152
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3186,12 +3184,12 @@ return (_ctx, _cache) => {
3186
3184
 
3187
3185
  };
3188
3186
 
3189
- script$s.__file = "src/lib/components/form-components/TextAreaInput.vue";
3187
+ script$u.__file = "src/lib/components/form-components/TextAreaInput.vue";
3190
3188
 
3191
- const _hoisted_1$m = ["value"];
3189
+ const _hoisted_1$o = ["value"];
3192
3190
 
3193
3191
 
3194
- var script$r = {
3192
+ var script$t = {
3195
3193
  __name: 'SelectInput',
3196
3194
  props: ['modelValue','label','url','required','options','dataUrl','data'],
3197
3195
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3246,7 +3244,7 @@ return (_ctx, _cache) => {
3246
3244
  return (vue.openBlock(), vue.createElementBlock("option", {
3247
3245
  key: option.id,
3248
3246
  value: option.id
3249
- }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$m))
3247
+ }, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$o))
3250
3248
  }), 128 /* KEYED_FRAGMENT */))
3251
3249
  ], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
3252
3250
  [vue.vModelSelect, inputModel.value]
@@ -3256,9 +3254,9 @@ return (_ctx, _cache) => {
3256
3254
 
3257
3255
  };
3258
3256
 
3259
- script$r.__file = "src/lib/components/form-components/SelectInput.vue";
3257
+ script$t.__file = "src/lib/components/form-components/SelectInput.vue";
3260
3258
 
3261
- var script$q = {
3259
+ var script$s = {
3262
3260
  __name: 'PasswordInput',
3263
3261
  props: ['modelValue','label'],
3264
3262
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3292,9 +3290,9 @@ return (_ctx, _cache) => {
3292
3290
 
3293
3291
  };
3294
3292
 
3295
- script$q.__file = "src/lib/components/form-components/PasswordInput.vue";
3293
+ script$s.__file = "src/lib/components/form-components/PasswordInput.vue";
3296
3294
 
3297
- var script$p = {
3295
+ var script$r = {
3298
3296
  __name: 'DateInput',
3299
3297
  props: ['modelValue','label','isInvalid'],
3300
3298
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3334,16 +3332,16 @@ return (_ctx, _cache) => {
3334
3332
 
3335
3333
  };
3336
3334
 
3337
- script$p.__file = "src/lib/components/form-components/DateInput.vue";
3335
+ script$r.__file = "src/lib/components/form-components/DateInput.vue";
3338
3336
 
3339
- const _hoisted_1$l = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3340
- const _hoisted_2$d = ["onUpdate:modelValue"];
3341
- const _hoisted_3$c = ["innerHTML"];
3342
- const _hoisted_4$c = {
3337
+ const _hoisted_1$n = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
3338
+ const _hoisted_2$f = ["onUpdate:modelValue"];
3339
+ const _hoisted_3$d = ["innerHTML"];
3340
+ const _hoisted_4$d = {
3343
3341
  key: 0,
3344
3342
  class: "text-danger sh-required"
3345
3343
  };
3346
- const _hoisted_5$9 = ["innerHTML"];
3344
+ const _hoisted_5$a = ["innerHTML"];
3347
3345
  const _hoisted_6$8 = {
3348
3346
  key: 2,
3349
3347
  class: "form-notch"
@@ -3367,7 +3365,7 @@ const _hoisted_13$3 = {
3367
3365
  const _hoisted_14$3 = { key: 1 };
3368
3366
 
3369
3367
 
3370
- var script$o = {
3368
+ var script$q = {
3371
3369
  __name: 'ShAutoForm',
3372
3370
  props: [
3373
3371
  'action', 'successCallback', 'retainDataAfterSubmission',
@@ -3402,13 +3400,13 @@ const getFieldComponent = (fieldObj) => {
3402
3400
  const defaultPhones = ['phone'];
3403
3401
  const defaultEmails = ['email'];
3404
3402
  const formComponents = vue.inject('formComponents');
3405
- const TextComponent = formComponents.text ?? script$t;
3406
- const TextAreaComponent = formComponents.textArea ?? script$s;
3407
- const EmailComponent = formComponents.email ?? script$v;
3408
- const PhoneComponent = formComponents.phone ?? script$y;
3409
- const NumberComponent = formComponents.number ?? script$u;
3410
- const SelectComponent = formComponents.select ?? script$r;
3411
- const PasswordComponent = formComponents.password ?? script$q;
3403
+ const TextComponent = formComponents.text ?? script$v;
3404
+ const TextAreaComponent = formComponents.textArea ?? script$u;
3405
+ const EmailComponent = formComponents.email ?? script$x;
3406
+ const PhoneComponent = formComponents.phone ?? script$A;
3407
+ const NumberComponent = formComponents.number ?? script$w;
3408
+ const SelectComponent = formComponents.select ?? script$t;
3409
+ const PasswordComponent = formComponents.password ?? script$s;
3412
3410
  if (props.customComponents && props.customComponents[field]) {
3413
3411
  return props.customComponents[field]
3414
3412
  }
@@ -3426,28 +3424,28 @@ const getFieldComponent = (fieldObj) => {
3426
3424
 
3427
3425
  if (fieldObj.type) {
3428
3426
  if (fieldObj.type === 'suggest' || fieldObj.type === 'suggests') {
3429
- return script$x
3427
+ return script$z
3430
3428
  }
3431
3429
  return fieldObj.type === 'number' ? NumberComponent : fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type === 'password' ? PasswordComponent : fieldObj.type === 'select' ? SelectComponent : TextComponent
3432
3430
  } else if (passwords.includes(field)) {
3433
3431
  return PasswordComponent
3434
3432
  } else if ((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)) {
3435
- return formComponents.textArea ?? script$s
3433
+ return formComponents.textArea ?? script$u
3436
3434
  } else if ((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)) {
3437
- return formComponents.email ?? script$v
3435
+ return formComponents.email ?? script$x
3438
3436
  } else if ((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)) {
3439
- return formComponents.phone ?? script$y
3437
+ return formComponents.phone ?? script$A
3440
3438
  } else if ((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)) {
3441
- return formComponents.number ?? script$u
3439
+ return formComponents.number ?? script$w
3442
3440
  }
3443
3441
  // else
3444
3442
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
3445
3443
  // return formComponents.select ?? SelectInput
3446
3444
  // } else
3447
3445
  if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3448
- return formComponents.date ?? script$p
3446
+ return formComponents.date ?? script$r
3449
3447
  }
3450
- return formComponents.text ?? script$t
3448
+ return formComponents.text ?? script$v
3451
3449
  };
3452
3450
  const shFormElementClasses = vue.ref(null);
3453
3451
  shFormElementClasses.value = vue.inject('shFormElementClasses');
@@ -3597,7 +3595,7 @@ vue.onMounted((ev) => {
3597
3595
 
3598
3596
  return (_ctx, _cache) => {
3599
3597
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3600
- _hoisted_1$l,
3598
+ _hoisted_1$n,
3601
3599
  vue.createElementVNode("form", {
3602
3600
  class: vue.normalizeClass([__props.formClass, "sh-auto-form"]),
3603
3601
  ref_key: "shAutoForm",
@@ -3614,7 +3612,7 @@ return (_ctx, _cache) => {
3614
3612
  key: 0,
3615
3613
  type: "hidden",
3616
3614
  "onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
3617
- }, null, 8 /* PROPS */, _hoisted_2$d)), [
3615
+ }, null, 8 /* PROPS */, _hoisted_2$f)), [
3618
3616
  [vue.vModelText, formFields.value[index].value]
3619
3617
  ])
3620
3618
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
@@ -3626,9 +3624,9 @@ return (_ctx, _cache) => {
3626
3624
  vue.createElementVNode("span", {
3627
3625
  innerHTML: field.label,
3628
3626
  class: "sh-label"
3629
- }, null, 8 /* PROPS */, _hoisted_3$c),
3627
+ }, null, 8 /* PROPS */, _hoisted_3$d),
3630
3628
  (field.required)
3631
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, "*"))
3629
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, "*"))
3632
3630
  : vue.createCommentVNode("v-if", true)
3633
3631
  ], 2 /* CLASS */))
3634
3632
  : vue.createCommentVNode("v-if", true),
@@ -3644,7 +3642,7 @@ return (_ctx, _cache) => {
3644
3642
  key: 1,
3645
3643
  class: vue.normalizeClass(getElementClass('formLabel')),
3646
3644
  innerHTML: field.label
3647
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$9))
3645
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3648
3646
  : vue.createCommentVNode("v-if", true),
3649
3647
  (vue.unref(isFloating))
3650
3648
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3691,13 +3689,13 @@ return (_ctx, _cache) => {
3691
3689
 
3692
3690
  };
3693
3691
 
3694
- script$o.__file = "src/lib/components/ShAutoForm.vue";
3692
+ script$q.__file = "src/lib/components/ShAutoForm.vue";
3695
3693
 
3696
- const _hoisted_1$k = ["id", "data-bs-backdrop"];
3697
- const _hoisted_2$c = { class: "modal-content" };
3698
- const _hoisted_3$b = { class: "modal-header" };
3699
- const _hoisted_4$b = { class: "modal-title flex-fill" };
3700
- const _hoisted_5$8 = /*#__PURE__*/vue.createElementVNode("button", {
3694
+ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3695
+ const _hoisted_2$e = { class: "modal-content" };
3696
+ const _hoisted_3$c = { class: "modal-header" };
3697
+ const _hoisted_4$c = { class: "modal-title flex-fill" };
3698
+ const _hoisted_5$9 = /*#__PURE__*/vue.createElementVNode("button", {
3701
3699
  class: "btn btn-danger btn-sm",
3702
3700
  "data-bs-dismiss": "modal",
3703
3701
  "data-dismiss": "modal"
@@ -3706,7 +3704,7 @@ const _hoisted_6$7 = { class: "modal-body" };
3706
3704
  const _hoisted_7$6 = { class: "section" };
3707
3705
 
3708
3706
 
3709
- var script$n = {
3707
+ var script$p = {
3710
3708
  __name: 'ShModal',
3711
3709
  props: {
3712
3710
  modalId: {
@@ -3764,10 +3762,10 @@ return (_ctx, _cache) => {
3764
3762
  vue.createElementVNode("div", {
3765
3763
  class: vue.normalizeClass(["modal-dialog", modalClasses.value])
3766
3764
  }, [
3767
- vue.createElementVNode("div", _hoisted_2$c, [
3768
- vue.createElementVNode("div", _hoisted_3$b, [
3769
- vue.createElementVNode("h3", _hoisted_4$b, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3770
- _hoisted_5$8
3765
+ vue.createElementVNode("div", _hoisted_2$e, [
3766
+ vue.createElementVNode("div", _hoisted_3$c, [
3767
+ vue.createElementVNode("h3", _hoisted_4$c, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3768
+ _hoisted_5$9
3771
3769
  ]),
3772
3770
  vue.createElementVNode("div", _hoisted_6$7, [
3773
3771
  vue.createElementVNode("div", _hoisted_7$6, [
@@ -3776,20 +3774,20 @@ return (_ctx, _cache) => {
3776
3774
  ])
3777
3775
  ])
3778
3776
  ], 2 /* CLASS */)
3779
- ], 8 /* PROPS */, _hoisted_1$k))
3777
+ ], 8 /* PROPS */, _hoisted_1$m))
3780
3778
  }
3781
3779
  }
3782
3780
 
3783
3781
  };
3784
3782
 
3785
- script$n.__file = "src/lib/components/ShModal.vue";
3783
+ script$p.__file = "src/lib/components/ShModal.vue";
3786
3784
 
3787
- const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3788
- const _hoisted_2$b = { class: "dropdown" };
3789
- const _hoisted_3$a = ["id"];
3790
- const _hoisted_4$a = ["aria-labelledby"];
3785
+ const _hoisted_1$l = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3786
+ const _hoisted_2$d = { class: "dropdown" };
3787
+ const _hoisted_3$b = ["id"];
3788
+ const _hoisted_4$b = ["aria-labelledby"];
3791
3789
 
3792
- var script$m = {
3790
+ var script$o = {
3793
3791
  __name: 'ShDropDownForm',
3794
3792
  props: ['action',
3795
3793
  'classes',
@@ -3837,8 +3835,8 @@ const formError = (res)=>{
3837
3835
 
3838
3836
  return (_ctx, _cache) => {
3839
3837
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3840
- _hoisted_1$j,
3841
- vue.createElementVNode("div", _hoisted_2$b, [
3838
+ _hoisted_1$l,
3839
+ vue.createElementVNode("div", _hoisted_2$d, [
3842
3840
  vue.createElementVNode("a", {
3843
3841
  class: vue.normalizeClass(vue.unref(btnClass)),
3844
3842
  href: "#",
@@ -3849,19 +3847,19 @@ return (_ctx, _cache) => {
3849
3847
  "aria-expanded": "false"
3850
3848
  }, [
3851
3849
  vue.renderSlot(_ctx.$slots, "default")
3852
- ], 10 /* CLASS, PROPS */, _hoisted_3$a),
3850
+ ], 10 /* CLASS, PROPS */, _hoisted_3$b),
3853
3851
  vue.createElementVNode("div", {
3854
3852
  class: "dropdown-menu px-2 py-1",
3855
3853
  "aria-labelledby": _ctx.dropdownId
3856
3854
  }, [
3857
- (vue.openBlock(), vue.createBlock(script$o, vue.mergeProps({
3855
+ (vue.openBlock(), vue.createBlock(script$q, vue.mergeProps({
3858
3856
  onSuccess: success,
3859
3857
  onFieldChanged: fieldChanged,
3860
3858
  onFormSubmitted: formSubmitted,
3861
3859
  onFormError: formError,
3862
3860
  key: JSON.stringify(__props.currentData ?? {})
3863
3861
  }, props), null, 16 /* FULL_PROPS */))
3864
- ], 8 /* PROPS */, _hoisted_4$a)
3862
+ ], 8 /* PROPS */, _hoisted_4$b)
3865
3863
  ])
3866
3864
  ], 64 /* STABLE_FRAGMENT */))
3867
3865
  }
@@ -3869,11 +3867,11 @@ return (_ctx, _cache) => {
3869
3867
 
3870
3868
  };
3871
3869
 
3872
- script$m.__file = "src/lib/components/ShDropDownForm.vue";
3870
+ script$o.__file = "src/lib/components/ShDropDownForm.vue";
3873
3871
 
3874
- const _hoisted_1$i = ["href"];
3872
+ const _hoisted_1$k = ["href"];
3875
3873
 
3876
- var script$l = {
3874
+ var script$n = {
3877
3875
  __name: 'ShModalForm',
3878
3876
  props: ['action',
3879
3877
  'classes',
@@ -3933,14 +3931,14 @@ return (_ctx, _cache) => {
3933
3931
  onClick: emitClick
3934
3932
  }, [
3935
3933
  vue.renderSlot(_ctx.$slots, "default")
3936
- ], 10 /* CLASS, PROPS */, _hoisted_1$i),
3937
- vue.createVNode(script$n, {
3934
+ ], 10 /* CLASS, PROPS */, _hoisted_1$k),
3935
+ vue.createVNode(script$p, {
3938
3936
  "modal-size": __props.modalSize,
3939
3937
  "modal-id": vue.unref(realModalId),
3940
3938
  "modal-title": __props.modalTitle
3941
3939
  }, {
3942
3940
  default: vue.withCtx(() => [
3943
- (vue.openBlock(), vue.createBlock(script$o, vue.mergeProps({
3941
+ (vue.openBlock(), vue.createBlock(script$q, vue.mergeProps({
3944
3942
  onSuccess: success,
3945
3943
  onFieldChanged: fieldChanged,
3946
3944
  onFormSubmitted: formSubmitted,
@@ -3956,11 +3954,11 @@ return (_ctx, _cache) => {
3956
3954
 
3957
3955
  };
3958
3956
 
3959
- script$l.__file = "src/lib/components/ShModalForm.vue";
3957
+ script$n.__file = "src/lib/components/ShModalForm.vue";
3960
3958
 
3961
- const _hoisted_1$h = ["href"];
3959
+ const _hoisted_1$j = ["href"];
3962
3960
 
3963
- var script$k = {
3961
+ var script$m = {
3964
3962
  __name: 'ShModalFormAuto',
3965
3963
  props: ['action',
3966
3964
  'classes',
@@ -3999,14 +3997,14 @@ return (_ctx, _cache) => {
3999
3997
  "data-bs-toggle": "modal"
4000
3998
  }, [
4001
3999
  vue.renderSlot(_ctx.$slots, "default")
4002
- ], 10 /* CLASS, PROPS */, _hoisted_1$h),
4003
- vue.createVNode(script$n, {
4000
+ ], 10 /* CLASS, PROPS */, _hoisted_1$j),
4001
+ vue.createVNode(script$p, {
4004
4002
  "modal-id": modalId,
4005
4003
  "modal-title": __props.modalTitle,
4006
4004
  "modal-size": __props.modalSize
4007
4005
  }, {
4008
4006
  default: vue.withCtx(() => [
4009
- vue.createVNode(script$o, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
4007
+ vue.createVNode(script$q, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
4010
4008
  ]),
4011
4009
  _: 1 /* STABLE */
4012
4010
  }, 8 /* PROPS */, ["modal-title", "modal-size"])
@@ -4016,17 +4014,17 @@ return (_ctx, _cache) => {
4016
4014
 
4017
4015
  };
4018
4016
 
4019
- script$k.__file = "src/lib/components/ShModalFormAuto.vue";
4017
+ script$m.__file = "src/lib/components/ShModalFormAuto.vue";
4020
4018
 
4021
- const _hoisted_1$g = ["data-bs-scroll", "id"];
4022
- const _hoisted_2$a = { class: "offcanvas-header" };
4023
- const _hoisted_3$9 = {
4019
+ const _hoisted_1$i = ["data-bs-scroll", "id"];
4020
+ const _hoisted_2$c = { class: "offcanvas-header" };
4021
+ const _hoisted_3$a = {
4024
4022
  class: "offcanvas-title",
4025
4023
  id: "offcanvasScrollingLabel"
4026
4024
  };
4027
- const _hoisted_4$9 = { class: "offcanvas-body" };
4025
+ const _hoisted_4$a = { class: "offcanvas-body" };
4028
4026
 
4029
- var script$j = {
4027
+ var script$l = {
4030
4028
  __name: 'ShCanvas',
4031
4029
  props: {
4032
4030
  canvasId: {
@@ -4072,8 +4070,8 @@ return (_ctx, _cache) => {
4072
4070
  id: __props.canvasId,
4073
4071
  "aria-labelledby": "offcanvasScrollingLabel"
4074
4072
  }, [
4075
- vue.createElementVNode("div", _hoisted_2$a, [
4076
- vue.createElementVNode("h5", _hoisted_3$9, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4073
+ vue.createElementVNode("div", _hoisted_2$c, [
4074
+ vue.createElementVNode("h5", _hoisted_3$a, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4077
4075
  vue.createElementVNode("button", {
4078
4076
  type: "button",
4079
4077
  ref: "closecanvas",
@@ -4083,32 +4081,32 @@ return (_ctx, _cache) => {
4083
4081
  "aria-label": "Close"
4084
4082
  }, null, 512 /* NEED_PATCH */)
4085
4083
  ]),
4086
- vue.createElementVNode("div", _hoisted_4$9, [
4084
+ vue.createElementVNode("div", _hoisted_4$a, [
4087
4085
  vue.renderSlot(_ctx.$slots, "default")
4088
4086
  ])
4089
- ], 10 /* CLASS, PROPS */, _hoisted_1$g))
4087
+ ], 10 /* CLASS, PROPS */, _hoisted_1$i))
4090
4088
  }
4091
4089
  }
4092
4090
 
4093
4091
  };
4094
4092
 
4095
- script$j.__file = "src/lib/components/ShCanvas.vue";
4093
+ script$l.__file = "src/lib/components/ShCanvas.vue";
4096
4094
 
4097
- const _hoisted_1$f = { class: "callout callout-info" };
4095
+ const _hoisted_1$h = { class: "callout callout-info" };
4098
4096
 
4099
4097
  function render$2(_ctx, _cache) {
4100
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
4098
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
4101
4099
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
4102
4100
  vue.createTextVNode(" No records found ")
4103
4101
  ])
4104
4102
  ]))
4105
4103
  }
4106
4104
 
4107
- const script$i = {};
4105
+ const script$k = {};
4108
4106
 
4109
- script$i.render = render$2;
4110
- script$i.__scopeId = "data-v-55cf77fb";
4111
- script$i.__file = "src/lib/components/others/NoRecords.vue";
4107
+ script$k.render = render$2;
4108
+ script$k.__scopeId = "data-v-55cf77fb";
4109
+ script$k.__file = "src/lib/components/others/NoRecords.vue";
4112
4110
 
4113
4111
  const useUserStore = pinia.defineStore('user-store', {
4114
4112
  state: () => ({
@@ -4207,7 +4205,410 @@ const useUserStore = pinia.defineStore('user-store', {
4207
4205
  }
4208
4206
  });
4209
4207
 
4208
+ const _hoisted_1$g = /*#__PURE__*/vue.createElementVNode("span", {
4209
+ class: "spinner-border spinner-border-sm me-1",
4210
+ role: "status",
4211
+ "aria-hidden": "true"
4212
+ }, null, -1 /* HOISTED */);
4213
+
4214
+
4215
+ var script$j = {
4216
+ __name: 'ShConfirmAction',
4217
+ props: {
4218
+ data: Object,
4219
+ title: String,
4220
+ message: String,
4221
+ url: {
4222
+ type: String,
4223
+ required: true
4224
+ },
4225
+ loadingMessage: {
4226
+ type: String,
4227
+ default: 'Processing...'
4228
+ },
4229
+ successMessage: {
4230
+ type: String,
4231
+ default: 'Action Successful'
4232
+ },
4233
+ failMessage: {
4234
+ type: String,
4235
+ default: 'Action failed'
4236
+ }
4237
+ },
4238
+ emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
4239
+ setup(__props, { emit: __emit }) {
4240
+
4241
+ const props = __props;
4242
+
4243
+ const processing = vue.ref(false);
4244
+ const emit = __emit;
4245
+ const actionSuccessful = (res)=>{
4246
+ processing.value = false;
4247
+ res.actionType = 'silentAction';
4248
+ emit('actionSuccessful',res);
4249
+ emit('success',res);
4250
+ shRepo.showToast(res.message ?? props.successMessage);
4251
+ };
4252
+
4253
+ const actionFailed = reason =>{
4254
+ console.log(reason);
4255
+ processing.value = false;
4256
+ reason.actionType = 'silentAction';
4257
+ emit('actionFailed', reason);
4258
+ emit('failed', reason);
4259
+ shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
4260
+ };
4261
+ function runAction () {
4262
+ processing.value = true;
4263
+ shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
4264
+ if(res.isConfirmed){
4265
+ const value = res.value;
4266
+ if(value.success){
4267
+ actionSuccessful(res.value.response);
4268
+ } else {
4269
+ actionFailed(res);
4270
+ }
4271
+ } else {
4272
+ emit('actionCanceled');
4273
+ emit('canceled');
4274
+ processing.value = false;
4275
+ }
4276
+ }).catch(ex => {
4277
+ actionFailed(ex);
4278
+ });
4279
+ }
4280
+
4281
+ return (_ctx, _cache) => {
4282
+ return (vue.openBlock(), vue.createElementBlock("a", {
4283
+ class: vue.normalizeClass(processing.value ? 'disabled':''),
4284
+ onClick: runAction
4285
+ }, [
4286
+ (processing.value)
4287
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4288
+ _hoisted_1$g,
4289
+ vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4290
+ ], 64 /* STABLE_FRAGMENT */))
4291
+ : vue.createCommentVNode("v-if", true),
4292
+ (!processing.value)
4293
+ ? vue.renderSlot(_ctx.$slots, "default", { key: 1 })
4294
+ : vue.createCommentVNode("v-if", true)
4295
+ ], 2 /* CLASS */))
4296
+ }
4297
+ }
4298
+
4299
+ };
4300
+
4301
+ script$j.__file = "src/lib/components/ShConfirmAction.vue";
4302
+
4303
+ const _hoisted_1$f = /*#__PURE__*/vue.createElementVNode("span", {
4304
+ class: "spinner-border spinner-border-sm me-1",
4305
+ role: "status",
4306
+ "aria-hidden": "true"
4307
+ }, null, -1 /* HOISTED */);
4308
+
4309
+ var script$i = {
4310
+ __name: 'ShSilentAction',
4311
+ props: {
4312
+ data: Object,
4313
+ loadingMessage: {
4314
+ type: String,
4315
+ default: 'Processing'
4316
+ },
4317
+ successMessage: {
4318
+ type: String,
4319
+ default: 'Action Successful'
4320
+ },
4321
+ failMessage: {
4322
+ type: String,
4323
+ default: 'Action failed'
4324
+ },
4325
+ method: {
4326
+ type: String,
4327
+ default: 'POST'
4328
+ },
4329
+ url: {
4330
+ type: String,
4331
+ required: true
4332
+ },
4333
+ disableSuccessMessage: {
4334
+ type: Boolean
4335
+ }
4336
+ },
4337
+ emits: ['actionSuccessful','actionFailed','success'],
4338
+ setup(__props, { emit: __emit }) {
4339
+
4340
+ const props = __props;
4341
+ const processing = vue.ref(false);
4342
+ const emit = __emit;
4343
+ const actionSuccessful = (res)=>{
4344
+ processing.value = false;
4345
+ res.actionType = 'silentAction';
4346
+ console.log(res.data,props.successMessage);
4347
+ emit('actionSuccessful',res);
4348
+ emit('success',res);
4349
+ if(!props.disableSuccessMessage) {
4350
+ shRepo.showToast(res.data.message ?? props.successMessage);
4351
+ }
4352
+ };
4353
+
4354
+ const actionFailed = reason =>{
4355
+ processing.value = false;
4356
+ console.log(reason);
4357
+ shRepo.showToast('Failed');
4358
+ reason.actionType = 'silentAction';
4359
+ emit('actionFailed', reason);
4360
+ shRepo.showToast(reason.message ?? props.failMessage,'error');
4361
+ };
4362
+ function runAction(){
4363
+ processing.value = true;
4364
+ if(props.method === 'POST'){
4365
+ shApis.doPost(props.url,props.data).then(res=>{
4366
+ actionSuccessful(res);
4367
+ }).catch(reason=>{
4368
+ actionFailed(reason);
4369
+ });
4370
+ }
4371
+ if(props.method === 'GET'){
4372
+ shApis.doGet(props.url,props.data).then(res=>{
4373
+ actionSuccessful(res);
4374
+ }).catch(reason=>{
4375
+ actionFailed(reason);
4376
+ });
4377
+ }
4378
+ }
4379
+
4380
+ return (_ctx, _cache) => {
4381
+ return (vue.openBlock(), vue.createElementBlock("a", {
4382
+ class: vue.normalizeClass(processing.value ? 'disabled':''),
4383
+ onClick: runAction
4384
+ }, [
4385
+ (processing.value)
4386
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4387
+ _hoisted_1$f,
4388
+ vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4389
+ ], 64 /* STABLE_FRAGMENT */))
4390
+ : vue.createCommentVNode("v-if", true),
4391
+ (!processing.value)
4392
+ ? vue.renderSlot(_ctx.$slots, "default", { key: 1 })
4393
+ : vue.createCommentVNode("v-if", true)
4394
+ ], 2 /* CLASS */))
4395
+ }
4396
+ }
4397
+
4398
+ };
4399
+
4400
+ script$i.__file = "src/lib/components/ShSilentAction.vue";
4401
+
4402
+ const _hoisted_1$e = ["href"];
4403
+ const _hoisted_2$b = ["title"];
4404
+
4405
+
4210
4406
  var script$h = {
4407
+ __name: 'SingleAction',
4408
+ props: ['action','record'],
4409
+ emits: ['actionSuccessful','actionFailed','actionCanceled'],
4410
+ setup(__props, { emit: __emit }) {
4411
+
4412
+ const props = __props;
4413
+
4414
+ const doEmitAction = __emit;
4415
+
4416
+ const url = vue.ref(props.action.path || props.action.url || props.action.link);
4417
+
4418
+ vue.onMounted(()=>{
4419
+ if(!url.value) {
4420
+ url.value = '';
4421
+ }
4422
+ // replace params in url with record key e.g {id} replaced with record.id
4423
+ url.value = url.value.replace(/{(\w+)}/g, (match, key) => {
4424
+ return props.record[key]
4425
+ });
4426
+
4427
+ // replace params e.g :id replaced with record.id
4428
+ url.value = url.value.replace(/:(\w+)/g, (match, key) => {
4429
+ return props.record[key]
4430
+ });
4431
+ });
4432
+
4433
+ const {user} = pinia.storeToRefs(useUserStore());
4434
+
4435
+ return (_ctx, _cache) => {
4436
+ const _component_router_link = vue.resolveComponent("router-link");
4437
+
4438
+ return (!__props.action.permission || vue.unref(user).isAllowedTo(__props.action.permission))
4439
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4440
+ (!__props.action.validator || __props.action.validator(__props.record))
4441
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4442
+ (['confirmAction','confirmaction','confirm-action','confirm'].includes(__props.action.type))
4443
+ ? (vue.openBlock(), vue.createBlock(script$j, {
4444
+ key: 0,
4445
+ onActionSuccessful: _cache[0] || (_cache[0] = $event => (doEmitAction('actionSuccessful',__props.record))),
4446
+ onActionFailed: _cache[1] || (_cache[1] = $event => (doEmitAction('actionFailed',__props.record))),
4447
+ onActionCanceled: _cache[2] || (_cache[2] = $event => (doEmitAction('actionCanceled',__props.record))),
4448
+ "loading-message": __props.action.label,
4449
+ class: vue.normalizeClass(__props.action.class),
4450
+ url: url.value
4451
+ }, {
4452
+ default: vue.withCtx(() => [
4453
+ (__props.action.icon)
4454
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4455
+ key: 0,
4456
+ class: vue.normalizeClass(__props.action.icon)
4457
+ }, null, 2 /* CLASS */))
4458
+ : vue.createCommentVNode("v-if", true),
4459
+ vue.createTextVNode(" " + vue.toDisplayString(__props.action.label), 1 /* TEXT */)
4460
+ ]),
4461
+ _: 1 /* STABLE */
4462
+ }, 8 /* PROPS */, ["loading-message", "class", "url"]))
4463
+ : (['silentAction','silentaction','silent-action','silent'].includes(__props.action.type))
4464
+ ? (vue.openBlock(), vue.createBlock(script$i, {
4465
+ key: 1,
4466
+ onActionSuccessful: _cache[3] || (_cache[3] = $event => (doEmitAction('actionSuccessful',__props.record))),
4467
+ onActionFailed: _cache[4] || (_cache[4] = $event => (doEmitAction('actionFailed',__props.record))),
4468
+ onActionCanceled: _cache[5] || (_cache[5] = $event => (doEmitAction('actionCanceled',__props.record))),
4469
+ "loading-message": __props.action.label,
4470
+ class: vue.normalizeClass(__props.action.class),
4471
+ url: url.value
4472
+ }, {
4473
+ default: vue.withCtx(() => [
4474
+ (__props.action.icon)
4475
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4476
+ key: 0,
4477
+ class: vue.normalizeClass(__props.action.icon)
4478
+ }, null, 2 /* CLASS */))
4479
+ : vue.createCommentVNode("v-if", true),
4480
+ vue.createTextVNode(" " + vue.toDisplayString(__props.action.label), 1 /* TEXT */)
4481
+ ]),
4482
+ _: 1 /* STABLE */
4483
+ }, 8 /* PROPS */, ["loading-message", "class", "url"]))
4484
+ : (__props.action.canvasId || __props.action.type === 'offcanvas')
4485
+ ? (vue.openBlock(), vue.createElementBlock("a", {
4486
+ key: 2,
4487
+ href: '#' + __props.action.canvasId,
4488
+ "data-bs-toggle": "offcanvas",
4489
+ class: vue.normalizeClass(__props.action.class)
4490
+ }, [
4491
+ (__props.action.icon)
4492
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4493
+ key: 0,
4494
+ class: vue.normalizeClass(__props.action.icon)
4495
+ }, null, 2 /* CLASS */))
4496
+ : vue.createCommentVNode("v-if", true),
4497
+ vue.createTextVNode(" " + vue.toDisplayString(__props.action.label), 1 /* TEXT */)
4498
+ ], 10 /* CLASS, PROPS */, _hoisted_1$e))
4499
+ : (__props.action.emits)
4500
+ ? (vue.openBlock(), vue.createElementBlock("button", {
4501
+ key: 3,
4502
+ title: __props.action.title,
4503
+ class: vue.normalizeClass(__props.action.class ? __props.action.class:'btn btn-default'),
4504
+ onClick: _cache[6] || (_cache[6] = $event => (doEmitAction(__props.action.emits,__props.record)))
4505
+ }, [
4506
+ (__props.action.icon)
4507
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4508
+ key: 0,
4509
+ class: vue.normalizeClass(__props.action.icon)
4510
+ }, null, 2 /* CLASS */))
4511
+ : vue.createCommentVNode("v-if", true),
4512
+ vue.createTextVNode(" " + vue.toDisplayString(__props.action.label), 1 /* TEXT */)
4513
+ ], 10 /* CLASS, PROPS */, _hoisted_2$b))
4514
+ : (!__props.action.emits)
4515
+ ? (vue.openBlock(), vue.createBlock(_component_router_link, {
4516
+ key: 4,
4517
+ title: __props.action.title,
4518
+ to: url.value,
4519
+ class: vue.normalizeClass(__props.action.class)
4520
+ }, {
4521
+ default: vue.withCtx(() => [
4522
+ (__props.action.icon)
4523
+ ? (vue.openBlock(), vue.createElementBlock("span", {
4524
+ key: 0,
4525
+ class: vue.normalizeClass(__props.action.icon)
4526
+ }, null, 2 /* CLASS */))
4527
+ : vue.createCommentVNode("v-if", true),
4528
+ vue.createTextVNode(" " + vue.toDisplayString(__props.action.label), 1 /* TEXT */)
4529
+ ]),
4530
+ _: 1 /* STABLE */
4531
+ }, 8 /* PROPS */, ["title", "to", "class"]))
4532
+ : vue.createCommentVNode("v-if", true)
4533
+ ], 64 /* STABLE_FRAGMENT */))
4534
+ : vue.createCommentVNode("v-if", true)
4535
+ ], 64 /* STABLE_FRAGMENT */))
4536
+ : vue.createCommentVNode("v-if", true)
4537
+ }
4538
+ }
4539
+
4540
+ };
4541
+
4542
+ script$h.__file = "src/lib/components/table/SingleAction.vue";
4543
+
4544
+ const _hoisted_1$d = {
4545
+ key: 0,
4546
+ class: "dropdown"
4547
+ };
4548
+ const _hoisted_2$a = {
4549
+ class: "sh-table-dropdown",
4550
+ type: "button",
4551
+ "data-bs-toggle": "dropdown",
4552
+ "aria-expanded": "false"
4553
+ };
4554
+ const _hoisted_3$9 = {
4555
+ key: 0,
4556
+ class: "bi bi-three-dots"
4557
+ };
4558
+ const _hoisted_4$9 = {
4559
+ key: 1,
4560
+ class: "bi bi-three-dots-vertical"
4561
+ };
4562
+ const _hoisted_5$8 = { class: "dropdown-menu" };
4563
+
4564
+
4565
+ var script$g = {
4566
+ __name: 'TableActions',
4567
+ props: ['actions','record'],
4568
+ setup(__props) {
4569
+
4570
+ const props = __props;
4571
+
4572
+ const actionItems = props.actions.actions;
4573
+ const type = props.actions.type; // dropdown, button
4574
+
4575
+ return (_ctx, _cache) => {
4576
+ return (vue.unref(type).includes('dropdown'))
4577
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
4578
+ vue.createElementVNode("strong", _hoisted_2$a, [
4579
+ (vue.unref(type) === 'dropdown-horizontal')
4580
+ ? (vue.openBlock(), vue.createElementBlock("i", _hoisted_3$9))
4581
+ : (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$9))
4582
+ ]),
4583
+ vue.createElementVNode("ul", _hoisted_5$8, [
4584
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(actionItems), (act) => {
4585
+ return (vue.openBlock(), vue.createElementBlock("li", {
4586
+ key: act.label
4587
+ }, [
4588
+ vue.createVNode(script$h, {
4589
+ class: vue.normalizeClass(act.class),
4590
+ action: act,
4591
+ record: __props.record
4592
+ }, null, 8 /* PROPS */, ["class", "action", "record"])
4593
+ ]))
4594
+ }), 128 /* KEYED_FRAGMENT */))
4595
+ ])
4596
+ ]))
4597
+ : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(vue.unref(actionItems), (act) => {
4598
+ return (vue.openBlock(), vue.createBlock(script$h, {
4599
+ key: act.label,
4600
+ action: act,
4601
+ record: __props.record
4602
+ }, null, 8 /* PROPS */, ["action", "record"]))
4603
+ }), 128 /* KEYED_FRAGMENT */))
4604
+ }
4605
+ }
4606
+
4607
+ };
4608
+
4609
+ script$g.__file = "src/lib/components/table/TableActions.vue";
4610
+
4611
+ var script$f = {
4211
4612
  name: 'Pagination',
4212
4613
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
4213
4614
  data () {
@@ -4286,7 +4687,7 @@ var script$h = {
4286
4687
  }
4287
4688
  };
4288
4689
 
4289
- const _hoisted_1$e = { key: 0 };
4690
+ const _hoisted_1$c = { key: 0 };
4290
4691
  const _hoisted_2$9 = { class: "record_count_body mb-3" };
4291
4692
  const _hoisted_3$8 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
4292
4693
  const _hoisted_4$8 = ["value"];
@@ -4333,7 +4734,7 @@ const _hoisted_18$2 = {
4333
4734
 
4334
4735
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4335
4736
  return ($props.paginationStyle !== 'loadMore')
4336
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
4737
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
4337
4738
  vue.createElementVNode("div", _hoisted_2$9, [
4338
4739
  _hoisted_3$8,
4339
4740
  vue.createTextVNode("  "),
@@ -4412,202 +4813,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4412
4813
  ]))
4413
4814
  }
4414
4815
 
4415
- script$h.render = render$1;
4416
- script$h.__file = "src/lib/components/list_templates/Pagination.vue";
4417
-
4418
- const _hoisted_1$d = /*#__PURE__*/vue.createElementVNode("span", {
4419
- class: "spinner-border spinner-border-sm me-1",
4420
- role: "status",
4421
- "aria-hidden": "true"
4422
- }, null, -1 /* HOISTED */);
4423
-
4424
-
4425
- var script$g = {
4426
- __name: 'ShConfirmAction',
4427
- props: {
4428
- data: Object,
4429
- title: String,
4430
- message: String,
4431
- url: {
4432
- type: String,
4433
- required: true
4434
- },
4435
- loadingMessage: {
4436
- type: String,
4437
- default: 'Processing...'
4438
- },
4439
- successMessage: {
4440
- type: String,
4441
- default: 'Action Successful'
4442
- },
4443
- failMessage: {
4444
- type: String,
4445
- default: 'Action failed'
4446
- }
4447
- },
4448
- emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
4449
- setup(__props, { emit: __emit }) {
4450
-
4451
- const props = __props;
4452
-
4453
- const processing = vue.ref(false);
4454
- const emit = __emit;
4455
- const actionSuccessful = (res)=>{
4456
- processing.value = false;
4457
- res.actionType = 'silentAction';
4458
- emit('actionSuccessful',res);
4459
- emit('success',res);
4460
- shRepo.showToast(res.message ?? props.successMessage);
4461
- };
4462
-
4463
- const actionFailed = reason =>{
4464
- console.log(reason);
4465
- processing.value = false;
4466
- reason.actionType = 'silentAction';
4467
- emit('actionFailed', reason);
4468
- emit('failed', reason);
4469
- shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
4470
- };
4471
- function runAction () {
4472
- processing.value = true;
4473
- shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
4474
- if(res.isConfirmed){
4475
- const value = res.value;
4476
- if(value.success){
4477
- actionSuccessful(res.value.response);
4478
- } else {
4479
- actionFailed(res);
4480
- }
4481
- } else {
4482
- emit('actionCanceled');
4483
- emit('canceled');
4484
- processing.value = false;
4485
- }
4486
- }).catch(ex => {
4487
- actionFailed(ex);
4488
- });
4489
- }
4490
-
4491
- return (_ctx, _cache) => {
4492
- return (vue.openBlock(), vue.createElementBlock("a", {
4493
- class: vue.normalizeClass(processing.value ? 'disabled':''),
4494
- onClick: runAction
4495
- }, [
4496
- (processing.value)
4497
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4498
- _hoisted_1$d,
4499
- vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4500
- ], 64 /* STABLE_FRAGMENT */))
4501
- : vue.createCommentVNode("v-if", true),
4502
- (!processing.value)
4503
- ? vue.renderSlot(_ctx.$slots, "default", { key: 1 })
4504
- : vue.createCommentVNode("v-if", true)
4505
- ], 2 /* CLASS */))
4506
- }
4507
- }
4508
-
4509
- };
4510
-
4511
- script$g.__file = "src/lib/components/ShConfirmAction.vue";
4512
-
4513
- const _hoisted_1$c = /*#__PURE__*/vue.createElementVNode("span", {
4514
- class: "spinner-border spinner-border-sm me-1",
4515
- role: "status",
4516
- "aria-hidden": "true"
4517
- }, null, -1 /* HOISTED */);
4518
-
4519
- var script$f = {
4520
- __name: 'ShSilentAction',
4521
- props: {
4522
- data: Object,
4523
- loadingMessage: {
4524
- type: String,
4525
- default: 'Processing'
4526
- },
4527
- successMessage: {
4528
- type: String,
4529
- default: 'Action Successful'
4530
- },
4531
- failMessage: {
4532
- type: String,
4533
- default: 'Action failed'
4534
- },
4535
- method: {
4536
- type: String,
4537
- default: 'POST'
4538
- },
4539
- url: {
4540
- type: String,
4541
- required: true
4542
- },
4543
- disableSuccessMessage: {
4544
- type: Boolean
4545
- }
4546
- },
4547
- emits: ['actionSuccessful','actionFailed','success'],
4548
- setup(__props, { emit: __emit }) {
4549
-
4550
- const props = __props;
4551
- const processing = vue.ref(false);
4552
- const emit = __emit;
4553
- const actionSuccessful = (res)=>{
4554
- processing.value = false;
4555
- res.actionType = 'silentAction';
4556
- console.log(res.data,props.successMessage);
4557
- emit('actionSuccessful',res);
4558
- emit('success',res);
4559
- if(!props.disableSuccessMessage) {
4560
- shRepo.showToast(res.data.message ?? props.successMessage);
4561
- }
4562
- };
4563
-
4564
- const actionFailed = reason =>{
4565
- processing.value = false;
4566
- console.log(reason);
4567
- shRepo.showToast('Failed');
4568
- reason.actionType = 'silentAction';
4569
- emit('actionFailed', reason);
4570
- shRepo.showToast(reason.message ?? props.failMessage,'error');
4571
- };
4572
- function runAction(){
4573
- processing.value = true;
4574
- if(props.method === 'POST'){
4575
- shApis.doPost(props.url,props.data).then(res=>{
4576
- actionSuccessful(res);
4577
- }).catch(reason=>{
4578
- actionFailed(reason);
4579
- });
4580
- }
4581
- if(props.method === 'GET'){
4582
- shApis.doGet(props.url,props.data).then(res=>{
4583
- actionSuccessful(res);
4584
- }).catch(reason=>{
4585
- actionFailed(reason);
4586
- });
4587
- }
4588
- }
4589
-
4590
- return (_ctx, _cache) => {
4591
- return (vue.openBlock(), vue.createElementBlock("a", {
4592
- class: vue.normalizeClass(processing.value ? 'disabled':''),
4593
- onClick: runAction
4594
- }, [
4595
- (processing.value)
4596
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4597
- _hoisted_1$c,
4598
- vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4599
- ], 64 /* STABLE_FRAGMENT */))
4600
- : vue.createCommentVNode("v-if", true),
4601
- (!processing.value)
4602
- ? vue.renderSlot(_ctx.$slots, "default", { key: 1 })
4603
- : vue.createCommentVNode("v-if", true)
4604
- ], 2 /* CLASS */))
4605
- }
4606
- }
4607
-
4608
- };
4609
-
4610
- script$f.__file = "src/lib/components/ShSilentAction.vue";
4816
+ script$f.render = render$1;
4817
+ script$f.__file = "src/lib/components/list_templates/Pagination.vue";
4611
4818
 
4612
4819
  const _hoisted_1$b = { class: "sh-range" };
4613
4820
  const _hoisted_2$8 = { class: "dropdown" };
@@ -5259,10 +5466,10 @@ const __default__ = {
5259
5466
  },
5260
5467
  components: {
5261
5468
  ShRange: script$e,
5262
- ShSilentAction: script$f,
5263
- ShConfirmAction: script$g,
5264
- ShCanvas: script$j,
5265
- pagination: script$h
5469
+ ShSilentAction: script$i,
5470
+ ShConfirmAction: script$j,
5471
+ ShCanvas: script$l,
5472
+ pagination: script$f
5266
5473
  },
5267
5474
  computed: {
5268
5475
  windowWidth: function (){
@@ -5284,7 +5491,7 @@ const __default__ = {
5284
5491
  var script$d = /*#__PURE__*/Object.assign(__default__, {
5285
5492
  setup(__props) {
5286
5493
 
5287
- const noRecordsComponent = vue.inject('noRecordsComponent', script$i);
5494
+ const noRecordsComponent = vue.inject('noRecordsComponent', script$k);
5288
5495
 
5289
5496
  pinia.storeToRefs(useUserStore());
5290
5497
 
@@ -5510,7 +5717,7 @@ return (_ctx, _cache) => {
5510
5717
  }), 128 /* KEYED_FRAGMENT */)),
5511
5718
  (__props.actions)
5512
5719
  ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
5513
- vue.createVNode(TableActions__default["default"], {
5720
+ vue.createVNode(script$g, {
5514
5721
  actions: __props.actions,
5515
5722
  record: record
5516
5723
  }, null, 8 /* PROPS */, ["actions", "record"])
@@ -5591,7 +5798,7 @@ return (_ctx, _cache) => {
5591
5798
  }), 128 /* KEYED_FRAGMENT */)),
5592
5799
  (__props.actions)
5593
5800
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_66, [
5594
- vue.createVNode(TableActions__default["default"], {
5801
+ vue.createVNode(script$g, {
5595
5802
  actions: __props.actions,
5596
5803
  record: record
5597
5804
  }, null, 8 /* PROPS */, ["actions", "record"])
@@ -5603,7 +5810,7 @@ return (_ctx, _cache) => {
5603
5810
  : vue.createCommentVNode("v-if", true)
5604
5811
  ])),
5605
5812
  (_ctx.pagination_data)
5606
- ? (vue.openBlock(), vue.createBlock(script$h, {
5813
+ ? (vue.openBlock(), vue.createBlock(script$f, {
5607
5814
  key: 6,
5608
5815
  onLoadMoreRecords: _ctx.loadMoreRecords,
5609
5816
  "hide-load-more": __props.hideLoadMore,
@@ -5620,7 +5827,7 @@ return (_ctx, _cache) => {
5620
5827
  key: action.label
5621
5828
  }, [
5622
5829
  (action.canvasId)
5623
- ? (vue.openBlock(), vue.createBlock(script$j, {
5830
+ ? (vue.openBlock(), vue.createBlock(script$l, {
5624
5831
  key: 0,
5625
5832
  onOffcanvasClosed: _ctx.canvasClosed,
5626
5833
  position: action.canvasPosition,
@@ -6121,7 +6328,7 @@ return (_ctx, _cache) => {
6121
6328
  (permissionsChanged.value)
6122
6329
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
6123
6330
  vue.createElementVNode("div", _hoisted_17, [
6124
- vue.createVNode(script$f, {
6331
+ vue.createVNode(script$i, {
6125
6332
  onSuccess: permissionsUpdated,
6126
6333
  url: `sh-departments/department/permissions/${vue.unref(departmentId)}/${selectedModule.value}`,
6127
6334
  data: {permissions: selectedPermissions.value},
@@ -6265,7 +6472,7 @@ return (_ctx, _cache) => {
6265
6472
  class: "d-none"
6266
6473
  }, "Open Modal", 8 /* PROPS */, _hoisted_1$5),
6267
6474
  (popUp.value === 'modal')
6268
- ? (vue.openBlock(), vue.createBlock(script$n, {
6475
+ ? (vue.openBlock(), vue.createBlock(script$p, {
6269
6476
  key: 0,
6270
6477
  "modal-title": title.value,
6271
6478
  "modal-id": vue.unref(modalId),
@@ -6280,7 +6487,7 @@ return (_ctx, _cache) => {
6280
6487
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6281
6488
  : vue.createCommentVNode("v-if", true),
6282
6489
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6283
- ? (vue.openBlock(), vue.createBlock(script$j, {
6490
+ ? (vue.openBlock(), vue.createBlock(script$l, {
6284
6491
  key: 1,
6285
6492
  "canvas-id": vue.unref(canvasId),
6286
6493
  "canvas-title": title.value,
@@ -6311,7 +6518,7 @@ const fields = route.query.fields.split(',');
6311
6518
  const action = route.query.action;
6312
6519
 
6313
6520
  return (_ctx, _cache) => {
6314
- return (vue.openBlock(), vue.createBlock(script$o, {
6521
+ return (vue.openBlock(), vue.createBlock(script$q, {
6315
6522
  fields: vue.unref(fields),
6316
6523
  action: vue.unref(action)
6317
6524
  }, null, 8 /* PROPS */, ["fields", "action"]))
@@ -6414,7 +6621,7 @@ const goBack = () => {
6414
6621
  return (_ctx, _cache) => {
6415
6622
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
6416
6623
  (popUp.value === 'modal')
6417
- ? (vue.openBlock(), vue.createBlock(script$n, {
6624
+ ? (vue.openBlock(), vue.createBlock(script$p, {
6418
6625
  key: 0,
6419
6626
  "modal-title": title.value,
6420
6627
  "data-bs-backdrop": "static",
@@ -6429,7 +6636,7 @@ return (_ctx, _cache) => {
6429
6636
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6430
6637
  : vue.createCommentVNode("v-if", true),
6431
6638
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6432
- ? (vue.openBlock(), vue.createBlock(script$j, {
6639
+ ? (vue.openBlock(), vue.createBlock(script$l, {
6433
6640
  "canvas-title": title.value,
6434
6641
  key: size.value + position.value,
6435
6642
  "canvas-id": vue.unref(canvasId),
@@ -6536,7 +6743,7 @@ return (_ctx, _cache) => {
6536
6743
  ]),
6537
6744
  vue.createElementVNode("div", _hoisted_6$2, [
6538
6745
  (vue.unref(user))
6539
- ? (vue.openBlock(), vue.createBlock(script$l, {
6746
+ ? (vue.openBlock(), vue.createBlock(script$n, {
6540
6747
  key: 0,
6541
6748
  "current-data": vue.unref(user),
6542
6749
  "modal-title": "Edit Details",
@@ -6553,7 +6760,7 @@ return (_ctx, _cache) => {
6553
6760
  }, 8 /* PROPS */, ["current-data"]))
6554
6761
  : vue.createCommentVNode("v-if", true),
6555
6762
  (vue.unref(user))
6556
- ? (vue.openBlock(), vue.createBlock(script$l, {
6763
+ ? (vue.openBlock(), vue.createBlock(script$n, {
6557
6764
  key: 1,
6558
6765
  "modal-title": "Update Password",
6559
6766
  class: "btn btn-info ms-2 my-2",
@@ -6590,7 +6797,7 @@ return (_ctx, _cache) => {
6590
6797
  vue.createElementVNode("div", _hoisted_9$1, [
6591
6798
  vue.createVNode(script$4, null, {
6592
6799
  default: vue.withCtx(() => [
6593
- vue.createVNode(script$l, {
6800
+ vue.createVNode(script$n, {
6594
6801
  "modal-title": "Edit Profile Image",
6595
6802
  class: "btn btn-info btn-sm float-end my-2",
6596
6803
  action: 'auth/profile-picture',
@@ -6692,12 +6899,12 @@ return (_ctx, _cache) => {
6692
6899
  ]
6693
6900
  }
6694
6901
  }, null, 8 /* PROPS */, ["reload", "actions"]),
6695
- vue.createVNode(script$n, {
6902
+ vue.createVNode(script$p, {
6696
6903
  "modal-id": "sh_department_modal",
6697
6904
  "modal-title": "Department Form"
6698
6905
  }, {
6699
6906
  default: vue.withCtx(() => [
6700
- vue.createVNode(script$w, {
6907
+ vue.createVNode(script$y, {
6701
6908
  "success-callback": "departmentAdded",
6702
6909
  "current-data": department.value,
6703
6910
  onDepartmentAdded: departmentAdded,
@@ -6852,12 +7059,12 @@ return (_ctx, _cache) => {
6852
7059
  headers: ['id',showModule,'created_at'],
6853
7060
  "end-point": 'admin/departments/department/list-modules/' + id.value
6854
7061
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6855
- vue.createVNode(script$n, {
7062
+ vue.createVNode(script$p, {
6856
7063
  "modal-id": "addModule",
6857
7064
  "modal-title": "Add Module Department"
6858
7065
  }, {
6859
7066
  default: vue.withCtx(() => [
6860
- vue.createVNode(script$w, {
7067
+ vue.createVNode(script$y, {
6861
7068
  "reload-select-items": vue.unref(reload),
6862
7069
  "success-callback": moduleAdded,
6863
7070
  "fill-selects": {
@@ -6879,7 +7086,7 @@ return (_ctx, _cache) => {
6879
7086
  ref: permissionCanvasBtn,
6880
7087
  "data-bs-toggle": "offcanvas"
6881
7088
  }, null, 512 /* NEED_PATCH */),
6882
- vue.createVNode(script$j, {
7089
+ vue.createVNode(script$l, {
6883
7090
  "canvas-id": "permissionsCanvas",
6884
7091
  position: "end enlarged",
6885
7092
  "canvas-title": "Module Permissions"
@@ -7015,7 +7222,7 @@ return (_ctx, _cache) => {
7015
7222
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
7016
7223
  (section.value === 'forgot')
7017
7224
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
7018
- vue.createVNode(script$w, {
7225
+ vue.createVNode(script$y, {
7019
7226
  class: "sh-login-form",
7020
7227
  fields: ['email'],
7021
7228
  "action-label": "Send Reset Link",
@@ -7038,7 +7245,7 @@ return (_ctx, _cache) => {
7038
7245
  (vue.unref(loginTitle))
7039
7246
  ? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_6, vue.toDisplayString(vue.unref(loginTitle)), 1 /* TEXT */))
7040
7247
  : vue.createCommentVNode("v-if", true),
7041
- vue.createVNode(script$w, {
7248
+ vue.createVNode(script$y, {
7042
7249
  class: "sh-login-form",
7043
7250
  fields: ['email','password'],
7044
7251
  "action-label": "Login",
@@ -7066,7 +7273,7 @@ return (_ctx, _cache) => {
7066
7273
  (vue.unref(registerSubTitle))
7067
7274
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
7068
7275
  : vue.createCommentVNode("v-if", true),
7069
- vue.createVNode(script$w, {
7276
+ vue.createVNode(script$y, {
7070
7277
  class: "sh-login-form",
7071
7278
  fields: vue.unref(registrationFields),
7072
7279
  "action-label": "Sign Up",
@@ -7162,11 +7369,11 @@ const ShFrontend = {
7162
7369
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
7163
7370
  const loginTitle = options.loginTitle ?? `Login to your account`;
7164
7371
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
7165
- options.formTextInput ?? script$t;
7372
+ options.formTextInput ?? script$v;
7166
7373
  const loginUrl = options.loginUrl ?? `/login`;
7167
7374
  const redirectLogin = options.redirectLogin ?? `/`;
7168
7375
  const redirectRegister = options.redirectRegister ?? `/`;
7169
- const noRecordsComponent = options.noRecordsComponent ?? script$i;
7376
+ const noRecordsComponent = options.noRecordsComponent ?? script$k;
7170
7377
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
7171
7378
  const AuthComponent = options.authComponent ?? script;
7172
7379
  app.provide('loginEndpoint',loginEndpoint);
@@ -7290,25 +7497,25 @@ const useShFetch = (url, path, cacheKey) => {
7290
7497
 
7291
7498
  exports.Countries = countries;
7292
7499
  exports.ManagePermissions = script$8;
7293
- exports.ShAutoForm = script$o;
7294
- exports.ShCanvas = script$j;
7500
+ exports.ShAutoForm = script$q;
7501
+ exports.ShCanvas = script$l;
7295
7502
  exports.ShCanvasBtn = script$9;
7296
7503
  exports.ShCardLayout = script$4;
7297
- exports.ShConfirmAction = script$g;
7298
- exports.ShDropDownForm = script$m;
7504
+ exports.ShConfirmAction = script$j;
7505
+ exports.ShDropDownForm = script$o;
7299
7506
  exports.ShDynamicTabs = script$b;
7300
- exports.ShForm = script$w;
7507
+ exports.ShForm = script$y;
7301
7508
  exports.ShFrontend = ShFrontend;
7302
- exports.ShModal = script$n;
7509
+ exports.ShModal = script$p;
7303
7510
  exports.ShModalBtn = script$a;
7304
- exports.ShModalForm = script$l;
7305
- exports.ShModalFormAuto = script$k;
7306
- exports.ShPhone = script$y;
7511
+ exports.ShModalForm = script$n;
7512
+ exports.ShModalFormAuto = script$m;
7513
+ exports.ShPhone = script$A;
7307
7514
  exports.ShQueryPopups = script$5;
7308
7515
  exports.ShRange = script$e;
7309
7516
  exports.ShRoutePopups = script$7;
7310
- exports.ShSilentAction = script$f;
7311
- exports.ShSuggest = script$x;
7517
+ exports.ShSilentAction = script$i;
7518
+ exports.ShSuggest = script$z;
7312
7519
  exports.ShTable = script$d;
7313
7520
  exports.ShTabs = script$c;
7314
7521
  exports.shApis = shApis;