@iankibetsh/shframework 4.8.2 → 4.8.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.mjs CHANGED
@@ -6,7 +6,6 @@ import NProgress from 'nprogress';
6
6
  import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, renderSlot, normalizeStyle, computed, createVNode, withCtx, vModelCheckbox, shallowRef, normalizeProps, pushScopeId, popScopeId, markRaw, isRef } from 'vue';
7
7
  import _ from 'lodash';
8
8
  import { defineStore, storeToRefs } from 'pinia';
9
- import TableActions from '@/lib/components/table/TableActions.vue';
10
9
  import { useRoute, useRouter } from 'vue-router';
11
10
 
12
11
  function setItem (key, value) {
@@ -1995,7 +1994,7 @@ const countries = [
1995
1994
  }
1996
1995
  ];
1997
1996
 
1998
- var script$y = {
1997
+ var script$A = {
1999
1998
  name: 'PhoneInput',
2000
1999
  props: ['modelValue', 'country_code','disabled'],
2001
2000
  data () {
@@ -2065,23 +2064,23 @@ var script$y = {
2065
2064
  }
2066
2065
  };
2067
2066
 
2068
- const _hoisted_1$q = {
2067
+ const _hoisted_1$s = {
2069
2068
  class: "sh-phone mb-3",
2070
2069
  style: {"display":"flex"}
2071
2070
  };
2072
- const _hoisted_2$g = {
2071
+ const _hoisted_2$i = {
2073
2072
  key: 0,
2074
2073
  style: {"display":"contents"}
2075
2074
  };
2076
- const _hoisted_3$f = ["src"];
2077
- const _hoisted_4$f = ["value"];
2078
- const _hoisted_5$c = ["disabled"];
2075
+ const _hoisted_3$g = ["src"];
2076
+ const _hoisted_4$g = ["value"];
2077
+ const _hoisted_5$d = ["disabled"];
2079
2078
 
2080
2079
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2081
- return (openBlock(), createElementBlock("div", _hoisted_1$q, [
2080
+ return (openBlock(), createElementBlock("div", _hoisted_1$s, [
2082
2081
  ($data.selectedCountry)
2083
- ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
2084
- createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$f),
2082
+ ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
2083
+ createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$g),
2085
2084
  createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
2086
2085
  ]))
2087
2086
  : createCommentVNode("v-if", true),
@@ -2094,7 +2093,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2094
2093
  return (openBlock(), createElementBlock("option", {
2095
2094
  value: country,
2096
2095
  key: country.dialCode
2097
- }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$f))
2096
+ }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$g))
2098
2097
  }), 128 /* KEYED_FRAGMENT */))
2099
2098
  ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
2100
2099
  [vModelSelect, $data.selectedCountry]
@@ -2107,23 +2106,23 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2107
2106
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2108
2107
  placeholder: "712345678",
2109
2108
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2110
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$c), [
2109
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2111
2110
  [vModelText, $data.input]
2112
2111
  ])
2113
2112
  ]))
2114
2113
  }
2115
2114
 
2116
- script$y.render = render$4;
2117
- script$y.__file = "src/lib/components/form-components/PhoneInput.vue";
2115
+ script$A.render = render$4;
2116
+ script$A.__file = "src/lib/components/form-components/PhoneInput.vue";
2118
2117
 
2119
- const _hoisted_1$p = {
2118
+ const _hoisted_1$r = {
2120
2119
  key: 0,
2121
2120
  class: "dropdown sh-suggest"
2122
2121
  };
2123
- const _hoisted_2$f = ["id"];
2124
- const _hoisted_3$e = { class: "sh-suggestions-holder" };
2125
- const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
2126
- const _hoisted_5$b = ["onClick"];
2122
+ const _hoisted_2$h = ["id"];
2123
+ const _hoisted_3$f = { class: "sh-suggestions-holder" };
2124
+ const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2125
+ const _hoisted_5$c = ["onClick"];
2127
2126
  const _hoisted_6$a = ["id"];
2128
2127
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2129
2128
  const _hoisted_8$8 = ["onClick"];
@@ -2137,7 +2136,7 @@ const _hoisted_10$8 = {
2137
2136
  };
2138
2137
 
2139
2138
 
2140
- var script$x = {
2139
+ var script$z = {
2141
2140
  __name: 'ShSuggest',
2142
2141
  props: ['data','allowMultiple','url','modelValue','optionTemplate'],
2143
2142
  emits: ['update:modelValue'],
@@ -2273,23 +2272,23 @@ watch(()=>props.modelValue, (newValue)=>{
2273
2272
 
2274
2273
  return (_ctx, _cache) => {
2275
2274
  return (unref(id))
2276
- ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
2275
+ ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
2277
2276
  createElementVNode("div", {
2278
2277
  id: unref(id),
2279
2278
  "data-bs-toggle": "dropdown",
2280
2279
  class: "p-0 d-flex sh-suggest-control dropdown-toggle",
2281
2280
  "aria-expanded": "false"
2282
2281
  }, [
2283
- createElementVNode("div", _hoisted_3$e, [
2282
+ createElementVNode("div", _hoisted_3$f, [
2284
2283
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
2285
- return (openBlock(), createElementBlock("h5", _hoisted_4$e, [
2284
+ return (openBlock(), createElementBlock("h5", _hoisted_4$f, [
2286
2285
  createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
2287
2286
  createElementVNode("button", {
2288
2287
  onClick: $event => (removeSuggestion(sgt.id)),
2289
2288
  type: "button",
2290
2289
  class: "btn-close border-start border-1 ms-1",
2291
2290
  "aria-label": "Close"
2292
- }, null, 8 /* PROPS */, _hoisted_5$b)
2291
+ }, null, 8 /* PROPS */, _hoisted_5$c)
2293
2292
  ]))
2294
2293
  }), 256 /* UNKEYED_FRAGMENT */))
2295
2294
  ]),
@@ -2300,7 +2299,7 @@ return (_ctx, _cache) => {
2300
2299
  onChange: filterData,
2301
2300
  class: "flex-fill h-100 sh-suggestion-input"
2302
2301
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6$a)
2303
- ], 8 /* PROPS */, _hoisted_2$f),
2302
+ ], 8 /* PROPS */, _hoisted_2$h),
2304
2303
  createElementVNode("ul", {
2305
2304
  class: "dropdown-menu w-100",
2306
2305
  id: 'dropwdown_section' + unref(id),
@@ -2342,15 +2341,15 @@ return (_ctx, _cache) => {
2342
2341
 
2343
2342
  };
2344
2343
 
2345
- script$x.__scopeId = "data-v-71cc9569";
2346
- script$x.__file = "src/lib/components/form-components/ShSuggest.vue";
2344
+ script$z.__scopeId = "data-v-71cc9569";
2345
+ script$z.__file = "src/lib/components/form-components/ShSuggest.vue";
2347
2346
 
2348
- var script$w = {
2347
+ var script$y = {
2349
2348
  name: 'ShForm',
2350
2349
  components: {
2351
- PhoneInput: script$y,
2352
- ShSuggest: script$x,
2353
- ShPhone: script$y
2350
+ PhoneInput: script$A,
2351
+ ShSuggest: script$z,
2352
+ ShPhone: script$A
2354
2353
  },
2355
2354
  props: [
2356
2355
  'action',
@@ -2699,18 +2698,18 @@ var script$w = {
2699
2698
  }
2700
2699
  };
2701
2700
 
2702
- const _hoisted_1$o = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2703
- const _hoisted_2$e = {
2701
+ const _hoisted_1$q = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2702
+ const _hoisted_2$g = {
2704
2703
  ref: "ShAutoForm",
2705
2704
  class: "sh-form"
2706
2705
  };
2707
- const _hoisted_3$d = {
2706
+ const _hoisted_3$e = {
2708
2707
  key: 0,
2709
2708
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2710
2709
  role: "alert"
2711
2710
  };
2712
- const _hoisted_4$d = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2713
- const _hoisted_5$a = { key: 0 };
2711
+ const _hoisted_4$e = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2712
+ const _hoisted_5$b = { key: 0 };
2714
2713
  const _hoisted_6$9 = { key: 1 };
2715
2714
  const _hoisted_7$8 = { class: "row" };
2716
2715
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2766,15 +2765,15 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2766
2765
  const _component_ShSuggest = resolveComponent("ShSuggest");
2767
2766
 
2768
2767
  return (openBlock(), createElementBlock(Fragment, null, [
2769
- _hoisted_1$o,
2770
- createElementVNode("form", _hoisted_2$e, [
2768
+ _hoisted_1$q,
2769
+ createElementVNode("form", _hoisted_2$g, [
2771
2770
  createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2772
2771
  createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2773
2772
  (_ctx.form_status == 3)
2774
- ? (openBlock(), createElementBlock("div", _hoisted_3$d, [
2775
- _hoisted_4$d,
2773
+ ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
2774
+ _hoisted_4$e,
2776
2775
  (_ctx.errorText)
2777
- ? (openBlock(), createElementBlock("span", _hoisted_5$a, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2776
+ ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2778
2777
  : (openBlock(), createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2779
2778
  createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2780
2779
  ]))
@@ -3005,10 +3004,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3005
3004
  ], 64 /* STABLE_FRAGMENT */))
3006
3005
  }
3007
3006
 
3008
- script$w.render = render$3;
3009
- script$w.__file = "src/lib/components/ShForm.vue";
3007
+ script$y.render = render$3;
3008
+ script$y.__file = "src/lib/components/ShForm.vue";
3010
3009
 
3011
- var script$v = {
3010
+ var script$x = {
3012
3011
  __name: 'EmailInput',
3013
3012
  props: ['modelValue','label'],
3014
3013
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3046,12 +3045,12 @@ return (_ctx, _cache) => {
3046
3045
 
3047
3046
  };
3048
3047
 
3049
- script$v.__file = "src/lib/components/form-components/EmailInput.vue";
3048
+ script$x.__file = "src/lib/components/form-components/EmailInput.vue";
3050
3049
 
3051
- const _hoisted_1$n = ["min", "max"];
3050
+ const _hoisted_1$p = ["min", "max"];
3052
3051
 
3053
3052
 
3054
- var script$u = {
3053
+ var script$w = {
3055
3054
  __name: 'NumberInput',
3056
3055
  props: ['modelValue','label','min','max'],
3057
3056
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3083,7 +3082,7 @@ return (_ctx, _cache) => {
3083
3082
  onChange: modelValueUpdated,
3084
3083
  onKeydown: modelValueUpdated,
3085
3084
  onUpdated: modelValueUpdated
3086
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$n)), [
3085
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$p)), [
3087
3086
  [vModelText, inputModel.value]
3088
3087
  ])
3089
3088
  }
@@ -3091,9 +3090,9 @@ return (_ctx, _cache) => {
3091
3090
 
3092
3091
  };
3093
3092
 
3094
- script$u.__file = "src/lib/components/form-components/NumberInput.vue";
3093
+ script$w.__file = "src/lib/components/form-components/NumberInput.vue";
3095
3094
 
3096
- var script$t = {
3095
+ var script$v = {
3097
3096
  __name: 'TextInput',
3098
3097
  props: ['modelValue','label','isInvalid'],
3099
3098
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3133,9 +3132,9 @@ return (_ctx, _cache) => {
3133
3132
 
3134
3133
  };
3135
3134
 
3136
- script$t.__file = "src/lib/components/form-components/TextInput.vue";
3135
+ script$v.__file = "src/lib/components/form-components/TextInput.vue";
3137
3136
 
3138
- var script$s = {
3137
+ var script$u = {
3139
3138
  __name: 'TextAreaInput',
3140
3139
  props: ['modelValue','label'],
3141
3140
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3173,12 +3172,12 @@ return (_ctx, _cache) => {
3173
3172
 
3174
3173
  };
3175
3174
 
3176
- script$s.__file = "src/lib/components/form-components/TextAreaInput.vue";
3175
+ script$u.__file = "src/lib/components/form-components/TextAreaInput.vue";
3177
3176
 
3178
- const _hoisted_1$m = ["value"];
3177
+ const _hoisted_1$o = ["value"];
3179
3178
 
3180
3179
 
3181
- var script$r = {
3180
+ var script$t = {
3182
3181
  __name: 'SelectInput',
3183
3182
  props: ['modelValue','label','url','required','options','dataUrl','data'],
3184
3183
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3233,7 +3232,7 @@ return (_ctx, _cache) => {
3233
3232
  return (openBlock(), createElementBlock("option", {
3234
3233
  key: option.id,
3235
3234
  value: option.id
3236
- }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$m))
3235
+ }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$o))
3237
3236
  }), 128 /* KEYED_FRAGMENT */))
3238
3237
  ], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
3239
3238
  [vModelSelect, inputModel.value]
@@ -3243,9 +3242,9 @@ return (_ctx, _cache) => {
3243
3242
 
3244
3243
  };
3245
3244
 
3246
- script$r.__file = "src/lib/components/form-components/SelectInput.vue";
3245
+ script$t.__file = "src/lib/components/form-components/SelectInput.vue";
3247
3246
 
3248
- var script$q = {
3247
+ var script$s = {
3249
3248
  __name: 'PasswordInput',
3250
3249
  props: ['modelValue','label'],
3251
3250
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3279,9 +3278,9 @@ return (_ctx, _cache) => {
3279
3278
 
3280
3279
  };
3281
3280
 
3282
- script$q.__file = "src/lib/components/form-components/PasswordInput.vue";
3281
+ script$s.__file = "src/lib/components/form-components/PasswordInput.vue";
3283
3282
 
3284
- var script$p = {
3283
+ var script$r = {
3285
3284
  __name: 'DateInput',
3286
3285
  props: ['modelValue','label','isInvalid'],
3287
3286
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3321,16 +3320,16 @@ return (_ctx, _cache) => {
3321
3320
 
3322
3321
  };
3323
3322
 
3324
- script$p.__file = "src/lib/components/form-components/DateInput.vue";
3323
+ script$r.__file = "src/lib/components/form-components/DateInput.vue";
3325
3324
 
3326
- const _hoisted_1$l = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3327
- const _hoisted_2$d = ["onUpdate:modelValue"];
3328
- const _hoisted_3$c = ["innerHTML"];
3329
- const _hoisted_4$c = {
3325
+ const _hoisted_1$n = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3326
+ const _hoisted_2$f = ["onUpdate:modelValue"];
3327
+ const _hoisted_3$d = ["innerHTML"];
3328
+ const _hoisted_4$d = {
3330
3329
  key: 0,
3331
3330
  class: "text-danger sh-required"
3332
3331
  };
3333
- const _hoisted_5$9 = ["innerHTML"];
3332
+ const _hoisted_5$a = ["innerHTML"];
3334
3333
  const _hoisted_6$8 = {
3335
3334
  key: 2,
3336
3335
  class: "form-notch"
@@ -3354,7 +3353,7 @@ const _hoisted_13$3 = {
3354
3353
  const _hoisted_14$3 = { key: 1 };
3355
3354
 
3356
3355
 
3357
- var script$o = {
3356
+ var script$q = {
3358
3357
  __name: 'ShAutoForm',
3359
3358
  props: [
3360
3359
  'action', 'successCallback', 'retainDataAfterSubmission',
@@ -3389,13 +3388,13 @@ const getFieldComponent = (fieldObj) => {
3389
3388
  const defaultPhones = ['phone'];
3390
3389
  const defaultEmails = ['email'];
3391
3390
  const formComponents = inject('formComponents');
3392
- const TextComponent = formComponents.text ?? script$t;
3393
- const TextAreaComponent = formComponents.textArea ?? script$s;
3394
- const EmailComponent = formComponents.email ?? script$v;
3395
- const PhoneComponent = formComponents.phone ?? script$y;
3396
- const NumberComponent = formComponents.number ?? script$u;
3397
- const SelectComponent = formComponents.select ?? script$r;
3398
- const PasswordComponent = formComponents.password ?? script$q;
3391
+ const TextComponent = formComponents.text ?? script$v;
3392
+ const TextAreaComponent = formComponents.textArea ?? script$u;
3393
+ const EmailComponent = formComponents.email ?? script$x;
3394
+ const PhoneComponent = formComponents.phone ?? script$A;
3395
+ const NumberComponent = formComponents.number ?? script$w;
3396
+ const SelectComponent = formComponents.select ?? script$t;
3397
+ const PasswordComponent = formComponents.password ?? script$s;
3399
3398
  if (props.customComponents && props.customComponents[field]) {
3400
3399
  return props.customComponents[field]
3401
3400
  }
@@ -3413,28 +3412,28 @@ const getFieldComponent = (fieldObj) => {
3413
3412
 
3414
3413
  if (fieldObj.type) {
3415
3414
  if (fieldObj.type === 'suggest' || fieldObj.type === 'suggests') {
3416
- return script$x
3415
+ return script$z
3417
3416
  }
3418
3417
  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
3419
3418
  } else if (passwords.includes(field)) {
3420
3419
  return PasswordComponent
3421
3420
  } else if ((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)) {
3422
- return formComponents.textArea ?? script$s
3421
+ return formComponents.textArea ?? script$u
3423
3422
  } else if ((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)) {
3424
- return formComponents.email ?? script$v
3423
+ return formComponents.email ?? script$x
3425
3424
  } else if ((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)) {
3426
- return formComponents.phone ?? script$y
3425
+ return formComponents.phone ?? script$A
3427
3426
  } else if ((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)) {
3428
- return formComponents.number ?? script$u
3427
+ return formComponents.number ?? script$w
3429
3428
  }
3430
3429
  // else
3431
3430
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
3432
3431
  // return formComponents.select ?? SelectInput
3433
3432
  // } else
3434
3433
  if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3435
- return formComponents.date ?? script$p
3434
+ return formComponents.date ?? script$r
3436
3435
  }
3437
- return formComponents.text ?? script$t
3436
+ return formComponents.text ?? script$v
3438
3437
  };
3439
3438
  const shFormElementClasses = ref(null);
3440
3439
  shFormElementClasses.value = inject('shFormElementClasses');
@@ -3584,7 +3583,7 @@ onMounted((ev) => {
3584
3583
 
3585
3584
  return (_ctx, _cache) => {
3586
3585
  return (openBlock(), createElementBlock(Fragment, null, [
3587
- _hoisted_1$l,
3586
+ _hoisted_1$n,
3588
3587
  createElementVNode("form", {
3589
3588
  class: normalizeClass([__props.formClass, "sh-auto-form"]),
3590
3589
  ref_key: "shAutoForm",
@@ -3601,7 +3600,7 @@ return (_ctx, _cache) => {
3601
3600
  key: 0,
3602
3601
  type: "hidden",
3603
3602
  "onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
3604
- }, null, 8 /* PROPS */, _hoisted_2$d)), [
3603
+ }, null, 8 /* PROPS */, _hoisted_2$f)), [
3605
3604
  [vModelText, formFields.value[index].value]
3606
3605
  ])
3607
3606
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -3613,9 +3612,9 @@ return (_ctx, _cache) => {
3613
3612
  createElementVNode("span", {
3614
3613
  innerHTML: field.label,
3615
3614
  class: "sh-label"
3616
- }, null, 8 /* PROPS */, _hoisted_3$c),
3615
+ }, null, 8 /* PROPS */, _hoisted_3$d),
3617
3616
  (field.required)
3618
- ? (openBlock(), createElementBlock("span", _hoisted_4$c, "*"))
3617
+ ? (openBlock(), createElementBlock("span", _hoisted_4$d, "*"))
3619
3618
  : createCommentVNode("v-if", true)
3620
3619
  ], 2 /* CLASS */))
3621
3620
  : createCommentVNode("v-if", true),
@@ -3631,7 +3630,7 @@ return (_ctx, _cache) => {
3631
3630
  key: 1,
3632
3631
  class: normalizeClass(getElementClass('formLabel')),
3633
3632
  innerHTML: field.label
3634
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$9))
3633
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3635
3634
  : createCommentVNode("v-if", true),
3636
3635
  (unref(isFloating))
3637
3636
  ? (openBlock(), createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3678,13 +3677,13 @@ return (_ctx, _cache) => {
3678
3677
 
3679
3678
  };
3680
3679
 
3681
- script$o.__file = "src/lib/components/ShAutoForm.vue";
3680
+ script$q.__file = "src/lib/components/ShAutoForm.vue";
3682
3681
 
3683
- const _hoisted_1$k = ["id", "data-bs-backdrop"];
3684
- const _hoisted_2$c = { class: "modal-content" };
3685
- const _hoisted_3$b = { class: "modal-header" };
3686
- const _hoisted_4$b = { class: "modal-title flex-fill" };
3687
- const _hoisted_5$8 = /*#__PURE__*/createElementVNode("button", {
3682
+ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3683
+ const _hoisted_2$e = { class: "modal-content" };
3684
+ const _hoisted_3$c = { class: "modal-header" };
3685
+ const _hoisted_4$c = { class: "modal-title flex-fill" };
3686
+ const _hoisted_5$9 = /*#__PURE__*/createElementVNode("button", {
3688
3687
  class: "btn btn-danger btn-sm",
3689
3688
  "data-bs-dismiss": "modal",
3690
3689
  "data-dismiss": "modal"
@@ -3693,7 +3692,7 @@ const _hoisted_6$7 = { class: "modal-body" };
3693
3692
  const _hoisted_7$6 = { class: "section" };
3694
3693
 
3695
3694
 
3696
- var script$n = {
3695
+ var script$p = {
3697
3696
  __name: 'ShModal',
3698
3697
  props: {
3699
3698
  modalId: {
@@ -3751,10 +3750,10 @@ return (_ctx, _cache) => {
3751
3750
  createElementVNode("div", {
3752
3751
  class: normalizeClass(["modal-dialog", modalClasses.value])
3753
3752
  }, [
3754
- createElementVNode("div", _hoisted_2$c, [
3755
- createElementVNode("div", _hoisted_3$b, [
3756
- createElementVNode("h3", _hoisted_4$b, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3757
- _hoisted_5$8
3753
+ createElementVNode("div", _hoisted_2$e, [
3754
+ createElementVNode("div", _hoisted_3$c, [
3755
+ createElementVNode("h3", _hoisted_4$c, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3756
+ _hoisted_5$9
3758
3757
  ]),
3759
3758
  createElementVNode("div", _hoisted_6$7, [
3760
3759
  createElementVNode("div", _hoisted_7$6, [
@@ -3763,20 +3762,20 @@ return (_ctx, _cache) => {
3763
3762
  ])
3764
3763
  ])
3765
3764
  ], 2 /* CLASS */)
3766
- ], 8 /* PROPS */, _hoisted_1$k))
3765
+ ], 8 /* PROPS */, _hoisted_1$m))
3767
3766
  }
3768
3767
  }
3769
3768
 
3770
3769
  };
3771
3770
 
3772
- script$n.__file = "src/lib/components/ShModal.vue";
3771
+ script$p.__file = "src/lib/components/ShModal.vue";
3773
3772
 
3774
- const _hoisted_1$j = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3775
- const _hoisted_2$b = { class: "dropdown" };
3776
- const _hoisted_3$a = ["id"];
3777
- const _hoisted_4$a = ["aria-labelledby"];
3773
+ const _hoisted_1$l = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3774
+ const _hoisted_2$d = { class: "dropdown" };
3775
+ const _hoisted_3$b = ["id"];
3776
+ const _hoisted_4$b = ["aria-labelledby"];
3778
3777
 
3779
- var script$m = {
3778
+ var script$o = {
3780
3779
  __name: 'ShDropDownForm',
3781
3780
  props: ['action',
3782
3781
  'classes',
@@ -3824,8 +3823,8 @@ const formError = (res)=>{
3824
3823
 
3825
3824
  return (_ctx, _cache) => {
3826
3825
  return (openBlock(), createElementBlock(Fragment, null, [
3827
- _hoisted_1$j,
3828
- createElementVNode("div", _hoisted_2$b, [
3826
+ _hoisted_1$l,
3827
+ createElementVNode("div", _hoisted_2$d, [
3829
3828
  createElementVNode("a", {
3830
3829
  class: normalizeClass(unref(btnClass)),
3831
3830
  href: "#",
@@ -3836,19 +3835,19 @@ return (_ctx, _cache) => {
3836
3835
  "aria-expanded": "false"
3837
3836
  }, [
3838
3837
  renderSlot(_ctx.$slots, "default")
3839
- ], 10 /* CLASS, PROPS */, _hoisted_3$a),
3838
+ ], 10 /* CLASS, PROPS */, _hoisted_3$b),
3840
3839
  createElementVNode("div", {
3841
3840
  class: "dropdown-menu px-2 py-1",
3842
3841
  "aria-labelledby": _ctx.dropdownId
3843
3842
  }, [
3844
- (openBlock(), createBlock(script$o, mergeProps({
3843
+ (openBlock(), createBlock(script$q, mergeProps({
3845
3844
  onSuccess: success,
3846
3845
  onFieldChanged: fieldChanged,
3847
3846
  onFormSubmitted: formSubmitted,
3848
3847
  onFormError: formError,
3849
3848
  key: JSON.stringify(__props.currentData ?? {})
3850
3849
  }, props), null, 16 /* FULL_PROPS */))
3851
- ], 8 /* PROPS */, _hoisted_4$a)
3850
+ ], 8 /* PROPS */, _hoisted_4$b)
3852
3851
  ])
3853
3852
  ], 64 /* STABLE_FRAGMENT */))
3854
3853
  }
@@ -3856,11 +3855,11 @@ return (_ctx, _cache) => {
3856
3855
 
3857
3856
  };
3858
3857
 
3859
- script$m.__file = "src/lib/components/ShDropDownForm.vue";
3858
+ script$o.__file = "src/lib/components/ShDropDownForm.vue";
3860
3859
 
3861
- const _hoisted_1$i = ["href"];
3860
+ const _hoisted_1$k = ["href"];
3862
3861
 
3863
- var script$l = {
3862
+ var script$n = {
3864
3863
  __name: 'ShModalForm',
3865
3864
  props: ['action',
3866
3865
  'classes',
@@ -3920,14 +3919,14 @@ return (_ctx, _cache) => {
3920
3919
  onClick: emitClick
3921
3920
  }, [
3922
3921
  renderSlot(_ctx.$slots, "default")
3923
- ], 10 /* CLASS, PROPS */, _hoisted_1$i),
3924
- createVNode(script$n, {
3922
+ ], 10 /* CLASS, PROPS */, _hoisted_1$k),
3923
+ createVNode(script$p, {
3925
3924
  "modal-size": __props.modalSize,
3926
3925
  "modal-id": unref(realModalId),
3927
3926
  "modal-title": __props.modalTitle
3928
3927
  }, {
3929
3928
  default: withCtx(() => [
3930
- (openBlock(), createBlock(script$o, mergeProps({
3929
+ (openBlock(), createBlock(script$q, mergeProps({
3931
3930
  onSuccess: success,
3932
3931
  onFieldChanged: fieldChanged,
3933
3932
  onFormSubmitted: formSubmitted,
@@ -3943,11 +3942,11 @@ return (_ctx, _cache) => {
3943
3942
 
3944
3943
  };
3945
3944
 
3946
- script$l.__file = "src/lib/components/ShModalForm.vue";
3945
+ script$n.__file = "src/lib/components/ShModalForm.vue";
3947
3946
 
3948
- const _hoisted_1$h = ["href"];
3947
+ const _hoisted_1$j = ["href"];
3949
3948
 
3950
- var script$k = {
3949
+ var script$m = {
3951
3950
  __name: 'ShModalFormAuto',
3952
3951
  props: ['action',
3953
3952
  'classes',
@@ -3986,14 +3985,14 @@ return (_ctx, _cache) => {
3986
3985
  "data-bs-toggle": "modal"
3987
3986
  }, [
3988
3987
  renderSlot(_ctx.$slots, "default")
3989
- ], 10 /* CLASS, PROPS */, _hoisted_1$h),
3990
- createVNode(script$n, {
3988
+ ], 10 /* CLASS, PROPS */, _hoisted_1$j),
3989
+ createVNode(script$p, {
3991
3990
  "modal-id": modalId,
3992
3991
  "modal-title": __props.modalTitle,
3993
3992
  "modal-size": __props.modalSize
3994
3993
  }, {
3995
3994
  default: withCtx(() => [
3996
- createVNode(script$o, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3995
+ createVNode(script$q, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3997
3996
  ]),
3998
3997
  _: 1 /* STABLE */
3999
3998
  }, 8 /* PROPS */, ["modal-title", "modal-size"])
@@ -4003,17 +4002,17 @@ return (_ctx, _cache) => {
4003
4002
 
4004
4003
  };
4005
4004
 
4006
- script$k.__file = "src/lib/components/ShModalFormAuto.vue";
4005
+ script$m.__file = "src/lib/components/ShModalFormAuto.vue";
4007
4006
 
4008
- const _hoisted_1$g = ["data-bs-scroll", "id"];
4009
- const _hoisted_2$a = { class: "offcanvas-header" };
4010
- const _hoisted_3$9 = {
4007
+ const _hoisted_1$i = ["data-bs-scroll", "id"];
4008
+ const _hoisted_2$c = { class: "offcanvas-header" };
4009
+ const _hoisted_3$a = {
4011
4010
  class: "offcanvas-title",
4012
4011
  id: "offcanvasScrollingLabel"
4013
4012
  };
4014
- const _hoisted_4$9 = { class: "offcanvas-body" };
4013
+ const _hoisted_4$a = { class: "offcanvas-body" };
4015
4014
 
4016
- var script$j = {
4015
+ var script$l = {
4017
4016
  __name: 'ShCanvas',
4018
4017
  props: {
4019
4018
  canvasId: {
@@ -4059,8 +4058,8 @@ return (_ctx, _cache) => {
4059
4058
  id: __props.canvasId,
4060
4059
  "aria-labelledby": "offcanvasScrollingLabel"
4061
4060
  }, [
4062
- createElementVNode("div", _hoisted_2$a, [
4063
- createElementVNode("h5", _hoisted_3$9, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4061
+ createElementVNode("div", _hoisted_2$c, [
4062
+ createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4064
4063
  createElementVNode("button", {
4065
4064
  type: "button",
4066
4065
  ref: "closecanvas",
@@ -4070,32 +4069,32 @@ return (_ctx, _cache) => {
4070
4069
  "aria-label": "Close"
4071
4070
  }, null, 512 /* NEED_PATCH */)
4072
4071
  ]),
4073
- createElementVNode("div", _hoisted_4$9, [
4072
+ createElementVNode("div", _hoisted_4$a, [
4074
4073
  renderSlot(_ctx.$slots, "default")
4075
4074
  ])
4076
- ], 10 /* CLASS, PROPS */, _hoisted_1$g))
4075
+ ], 10 /* CLASS, PROPS */, _hoisted_1$i))
4077
4076
  }
4078
4077
  }
4079
4078
 
4080
4079
  };
4081
4080
 
4082
- script$j.__file = "src/lib/components/ShCanvas.vue";
4081
+ script$l.__file = "src/lib/components/ShCanvas.vue";
4083
4082
 
4084
- const _hoisted_1$f = { class: "callout callout-info" };
4083
+ const _hoisted_1$h = { class: "callout callout-info" };
4085
4084
 
4086
4085
  function render$2(_ctx, _cache) {
4087
- return (openBlock(), createElementBlock("div", _hoisted_1$f, [
4086
+ return (openBlock(), createElementBlock("div", _hoisted_1$h, [
4088
4087
  renderSlot(_ctx.$slots, "default", {}, () => [
4089
4088
  createTextVNode(" No records found ")
4090
4089
  ])
4091
4090
  ]))
4092
4091
  }
4093
4092
 
4094
- const script$i = {};
4093
+ const script$k = {};
4095
4094
 
4096
- script$i.render = render$2;
4097
- script$i.__scopeId = "data-v-55cf77fb";
4098
- script$i.__file = "src/lib/components/others/NoRecords.vue";
4095
+ script$k.render = render$2;
4096
+ script$k.__scopeId = "data-v-55cf77fb";
4097
+ script$k.__file = "src/lib/components/others/NoRecords.vue";
4099
4098
 
4100
4099
  const useUserStore = defineStore('user-store', {
4101
4100
  state: () => ({
@@ -4194,7 +4193,410 @@ const useUserStore = defineStore('user-store', {
4194
4193
  }
4195
4194
  });
4196
4195
 
4196
+ const _hoisted_1$g = /*#__PURE__*/createElementVNode("span", {
4197
+ class: "spinner-border spinner-border-sm me-1",
4198
+ role: "status",
4199
+ "aria-hidden": "true"
4200
+ }, null, -1 /* HOISTED */);
4201
+
4202
+
4203
+ var script$j = {
4204
+ __name: 'ShConfirmAction',
4205
+ props: {
4206
+ data: Object,
4207
+ title: String,
4208
+ message: String,
4209
+ url: {
4210
+ type: String,
4211
+ required: true
4212
+ },
4213
+ loadingMessage: {
4214
+ type: String,
4215
+ default: 'Processing...'
4216
+ },
4217
+ successMessage: {
4218
+ type: String,
4219
+ default: 'Action Successful'
4220
+ },
4221
+ failMessage: {
4222
+ type: String,
4223
+ default: 'Action failed'
4224
+ }
4225
+ },
4226
+ emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
4227
+ setup(__props, { emit: __emit }) {
4228
+
4229
+ const props = __props;
4230
+
4231
+ const processing = ref(false);
4232
+ const emit = __emit;
4233
+ const actionSuccessful = (res)=>{
4234
+ processing.value = false;
4235
+ res.actionType = 'silentAction';
4236
+ emit('actionSuccessful',res);
4237
+ emit('success',res);
4238
+ shRepo.showToast(res.message ?? props.successMessage);
4239
+ };
4240
+
4241
+ const actionFailed = reason =>{
4242
+ console.log(reason);
4243
+ processing.value = false;
4244
+ reason.actionType = 'silentAction';
4245
+ emit('actionFailed', reason);
4246
+ emit('failed', reason);
4247
+ shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
4248
+ };
4249
+ function runAction () {
4250
+ processing.value = true;
4251
+ shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
4252
+ if(res.isConfirmed){
4253
+ const value = res.value;
4254
+ if(value.success){
4255
+ actionSuccessful(res.value.response);
4256
+ } else {
4257
+ actionFailed(res);
4258
+ }
4259
+ } else {
4260
+ emit('actionCanceled');
4261
+ emit('canceled');
4262
+ processing.value = false;
4263
+ }
4264
+ }).catch(ex => {
4265
+ actionFailed(ex);
4266
+ });
4267
+ }
4268
+
4269
+ return (_ctx, _cache) => {
4270
+ return (openBlock(), createElementBlock("a", {
4271
+ class: normalizeClass(processing.value ? 'disabled':''),
4272
+ onClick: runAction
4273
+ }, [
4274
+ (processing.value)
4275
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4276
+ _hoisted_1$g,
4277
+ createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4278
+ ], 64 /* STABLE_FRAGMENT */))
4279
+ : createCommentVNode("v-if", true),
4280
+ (!processing.value)
4281
+ ? renderSlot(_ctx.$slots, "default", { key: 1 })
4282
+ : createCommentVNode("v-if", true)
4283
+ ], 2 /* CLASS */))
4284
+ }
4285
+ }
4286
+
4287
+ };
4288
+
4289
+ script$j.__file = "src/lib/components/ShConfirmAction.vue";
4290
+
4291
+ const _hoisted_1$f = /*#__PURE__*/createElementVNode("span", {
4292
+ class: "spinner-border spinner-border-sm me-1",
4293
+ role: "status",
4294
+ "aria-hidden": "true"
4295
+ }, null, -1 /* HOISTED */);
4296
+
4297
+ var script$i = {
4298
+ __name: 'ShSilentAction',
4299
+ props: {
4300
+ data: Object,
4301
+ loadingMessage: {
4302
+ type: String,
4303
+ default: 'Processing'
4304
+ },
4305
+ successMessage: {
4306
+ type: String,
4307
+ default: 'Action Successful'
4308
+ },
4309
+ failMessage: {
4310
+ type: String,
4311
+ default: 'Action failed'
4312
+ },
4313
+ method: {
4314
+ type: String,
4315
+ default: 'POST'
4316
+ },
4317
+ url: {
4318
+ type: String,
4319
+ required: true
4320
+ },
4321
+ disableSuccessMessage: {
4322
+ type: Boolean
4323
+ }
4324
+ },
4325
+ emits: ['actionSuccessful','actionFailed','success'],
4326
+ setup(__props, { emit: __emit }) {
4327
+
4328
+ const props = __props;
4329
+ const processing = ref(false);
4330
+ const emit = __emit;
4331
+ const actionSuccessful = (res)=>{
4332
+ processing.value = false;
4333
+ res.actionType = 'silentAction';
4334
+ console.log(res.data,props.successMessage);
4335
+ emit('actionSuccessful',res);
4336
+ emit('success',res);
4337
+ if(!props.disableSuccessMessage) {
4338
+ shRepo.showToast(res.data.message ?? props.successMessage);
4339
+ }
4340
+ };
4341
+
4342
+ const actionFailed = reason =>{
4343
+ processing.value = false;
4344
+ console.log(reason);
4345
+ shRepo.showToast('Failed');
4346
+ reason.actionType = 'silentAction';
4347
+ emit('actionFailed', reason);
4348
+ shRepo.showToast(reason.message ?? props.failMessage,'error');
4349
+ };
4350
+ function runAction(){
4351
+ processing.value = true;
4352
+ if(props.method === 'POST'){
4353
+ shApis.doPost(props.url,props.data).then(res=>{
4354
+ actionSuccessful(res);
4355
+ }).catch(reason=>{
4356
+ actionFailed(reason);
4357
+ });
4358
+ }
4359
+ if(props.method === 'GET'){
4360
+ shApis.doGet(props.url,props.data).then(res=>{
4361
+ actionSuccessful(res);
4362
+ }).catch(reason=>{
4363
+ actionFailed(reason);
4364
+ });
4365
+ }
4366
+ }
4367
+
4368
+ return (_ctx, _cache) => {
4369
+ return (openBlock(), createElementBlock("a", {
4370
+ class: normalizeClass(processing.value ? 'disabled':''),
4371
+ onClick: runAction
4372
+ }, [
4373
+ (processing.value)
4374
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4375
+ _hoisted_1$f,
4376
+ createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4377
+ ], 64 /* STABLE_FRAGMENT */))
4378
+ : createCommentVNode("v-if", true),
4379
+ (!processing.value)
4380
+ ? renderSlot(_ctx.$slots, "default", { key: 1 })
4381
+ : createCommentVNode("v-if", true)
4382
+ ], 2 /* CLASS */))
4383
+ }
4384
+ }
4385
+
4386
+ };
4387
+
4388
+ script$i.__file = "src/lib/components/ShSilentAction.vue";
4389
+
4390
+ const _hoisted_1$e = ["href"];
4391
+ const _hoisted_2$b = ["title"];
4392
+
4393
+
4197
4394
  var script$h = {
4395
+ __name: 'SingleAction',
4396
+ props: ['action','record'],
4397
+ emits: ['actionSuccessful','actionFailed','actionCanceled'],
4398
+ setup(__props, { emit: __emit }) {
4399
+
4400
+ const props = __props;
4401
+
4402
+ const doEmitAction = __emit;
4403
+
4404
+ const url = ref(props.action.path || props.action.url || props.action.link);
4405
+
4406
+ onMounted(()=>{
4407
+ if(!url.value) {
4408
+ url.value = '';
4409
+ }
4410
+ // replace params in url with record key e.g {id} replaced with record.id
4411
+ url.value = url.value.replace(/{(\w+)}/g, (match, key) => {
4412
+ return props.record[key]
4413
+ });
4414
+
4415
+ // replace params e.g :id replaced with record.id
4416
+ url.value = url.value.replace(/:(\w+)/g, (match, key) => {
4417
+ return props.record[key]
4418
+ });
4419
+ });
4420
+
4421
+ const {user} = storeToRefs(useUserStore());
4422
+
4423
+ return (_ctx, _cache) => {
4424
+ const _component_router_link = resolveComponent("router-link");
4425
+
4426
+ return (!__props.action.permission || unref(user).isAllowedTo(__props.action.permission))
4427
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4428
+ (!__props.action.validator || __props.action.validator(__props.record))
4429
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4430
+ (['confirmAction','confirmaction','confirm-action','confirm'].includes(__props.action.type))
4431
+ ? (openBlock(), createBlock(script$j, {
4432
+ key: 0,
4433
+ onActionSuccessful: _cache[0] || (_cache[0] = $event => (doEmitAction('actionSuccessful',__props.record))),
4434
+ onActionFailed: _cache[1] || (_cache[1] = $event => (doEmitAction('actionFailed',__props.record))),
4435
+ onActionCanceled: _cache[2] || (_cache[2] = $event => (doEmitAction('actionCanceled',__props.record))),
4436
+ "loading-message": __props.action.label,
4437
+ class: normalizeClass(__props.action.class),
4438
+ url: url.value
4439
+ }, {
4440
+ default: withCtx(() => [
4441
+ (__props.action.icon)
4442
+ ? (openBlock(), createElementBlock("span", {
4443
+ key: 0,
4444
+ class: normalizeClass(__props.action.icon)
4445
+ }, null, 2 /* CLASS */))
4446
+ : createCommentVNode("v-if", true),
4447
+ createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
4448
+ ]),
4449
+ _: 1 /* STABLE */
4450
+ }, 8 /* PROPS */, ["loading-message", "class", "url"]))
4451
+ : (['silentAction','silentaction','silent-action','silent'].includes(__props.action.type))
4452
+ ? (openBlock(), createBlock(script$i, {
4453
+ key: 1,
4454
+ onActionSuccessful: _cache[3] || (_cache[3] = $event => (doEmitAction('actionSuccessful',__props.record))),
4455
+ onActionFailed: _cache[4] || (_cache[4] = $event => (doEmitAction('actionFailed',__props.record))),
4456
+ onActionCanceled: _cache[5] || (_cache[5] = $event => (doEmitAction('actionCanceled',__props.record))),
4457
+ "loading-message": __props.action.label,
4458
+ class: normalizeClass(__props.action.class),
4459
+ url: url.value
4460
+ }, {
4461
+ default: withCtx(() => [
4462
+ (__props.action.icon)
4463
+ ? (openBlock(), createElementBlock("span", {
4464
+ key: 0,
4465
+ class: normalizeClass(__props.action.icon)
4466
+ }, null, 2 /* CLASS */))
4467
+ : createCommentVNode("v-if", true),
4468
+ createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
4469
+ ]),
4470
+ _: 1 /* STABLE */
4471
+ }, 8 /* PROPS */, ["loading-message", "class", "url"]))
4472
+ : (__props.action.canvasId || __props.action.type === 'offcanvas')
4473
+ ? (openBlock(), createElementBlock("a", {
4474
+ key: 2,
4475
+ href: '#' + __props.action.canvasId,
4476
+ "data-bs-toggle": "offcanvas",
4477
+ class: normalizeClass(__props.action.class)
4478
+ }, [
4479
+ (__props.action.icon)
4480
+ ? (openBlock(), createElementBlock("span", {
4481
+ key: 0,
4482
+ class: normalizeClass(__props.action.icon)
4483
+ }, null, 2 /* CLASS */))
4484
+ : createCommentVNode("v-if", true),
4485
+ createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
4486
+ ], 10 /* CLASS, PROPS */, _hoisted_1$e))
4487
+ : (__props.action.emits)
4488
+ ? (openBlock(), createElementBlock("button", {
4489
+ key: 3,
4490
+ title: __props.action.title,
4491
+ class: normalizeClass(__props.action.class ? __props.action.class:'btn btn-default'),
4492
+ onClick: _cache[6] || (_cache[6] = $event => (doEmitAction(__props.action.emits,__props.record)))
4493
+ }, [
4494
+ (__props.action.icon)
4495
+ ? (openBlock(), createElementBlock("span", {
4496
+ key: 0,
4497
+ class: normalizeClass(__props.action.icon)
4498
+ }, null, 2 /* CLASS */))
4499
+ : createCommentVNode("v-if", true),
4500
+ createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
4501
+ ], 10 /* CLASS, PROPS */, _hoisted_2$b))
4502
+ : (!__props.action.emits)
4503
+ ? (openBlock(), createBlock(_component_router_link, {
4504
+ key: 4,
4505
+ title: __props.action.title,
4506
+ to: url.value,
4507
+ class: normalizeClass(__props.action.class)
4508
+ }, {
4509
+ default: withCtx(() => [
4510
+ (__props.action.icon)
4511
+ ? (openBlock(), createElementBlock("span", {
4512
+ key: 0,
4513
+ class: normalizeClass(__props.action.icon)
4514
+ }, null, 2 /* CLASS */))
4515
+ : createCommentVNode("v-if", true),
4516
+ createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
4517
+ ]),
4518
+ _: 1 /* STABLE */
4519
+ }, 8 /* PROPS */, ["title", "to", "class"]))
4520
+ : createCommentVNode("v-if", true)
4521
+ ], 64 /* STABLE_FRAGMENT */))
4522
+ : createCommentVNode("v-if", true)
4523
+ ], 64 /* STABLE_FRAGMENT */))
4524
+ : createCommentVNode("v-if", true)
4525
+ }
4526
+ }
4527
+
4528
+ };
4529
+
4530
+ script$h.__file = "src/lib/components/table/SingleAction.vue";
4531
+
4532
+ const _hoisted_1$d = {
4533
+ key: 0,
4534
+ class: "dropdown"
4535
+ };
4536
+ const _hoisted_2$a = {
4537
+ class: "sh-table-dropdown",
4538
+ type: "button",
4539
+ "data-bs-toggle": "dropdown",
4540
+ "aria-expanded": "false"
4541
+ };
4542
+ const _hoisted_3$9 = {
4543
+ key: 0,
4544
+ class: "bi bi-three-dots"
4545
+ };
4546
+ const _hoisted_4$9 = {
4547
+ key: 1,
4548
+ class: "bi bi-three-dots-vertical"
4549
+ };
4550
+ const _hoisted_5$8 = { class: "dropdown-menu" };
4551
+
4552
+
4553
+ var script$g = {
4554
+ __name: 'TableActions',
4555
+ props: ['actions','record'],
4556
+ setup(__props) {
4557
+
4558
+ const props = __props;
4559
+
4560
+ const actionItems = props.actions.actions;
4561
+ const type = props.actions.type; // dropdown, button
4562
+
4563
+ return (_ctx, _cache) => {
4564
+ return (unref(type) && unref(type).includes('dropdown'))
4565
+ ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
4566
+ createElementVNode("strong", _hoisted_2$a, [
4567
+ (unref(type) === 'dropdown-horizontal')
4568
+ ? (openBlock(), createElementBlock("i", _hoisted_3$9))
4569
+ : (openBlock(), createElementBlock("i", _hoisted_4$9))
4570
+ ]),
4571
+ createElementVNode("ul", _hoisted_5$8, [
4572
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionItems), (act) => {
4573
+ return (openBlock(), createElementBlock("li", {
4574
+ key: act.label
4575
+ }, [
4576
+ createVNode(script$h, {
4577
+ class: normalizeClass(act.class),
4578
+ action: act,
4579
+ record: __props.record
4580
+ }, null, 8 /* PROPS */, ["class", "action", "record"])
4581
+ ]))
4582
+ }), 128 /* KEYED_FRAGMENT */))
4583
+ ])
4584
+ ]))
4585
+ : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(actionItems), (act) => {
4586
+ return (openBlock(), createBlock(script$h, {
4587
+ key: act.label,
4588
+ action: act,
4589
+ record: __props.record
4590
+ }, null, 8 /* PROPS */, ["action", "record"]))
4591
+ }), 128 /* KEYED_FRAGMENT */))
4592
+ }
4593
+ }
4594
+
4595
+ };
4596
+
4597
+ script$g.__file = "src/lib/components/table/TableActions.vue";
4598
+
4599
+ var script$f = {
4198
4600
  name: 'Pagination',
4199
4601
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
4200
4602
  data () {
@@ -4273,7 +4675,7 @@ var script$h = {
4273
4675
  }
4274
4676
  };
4275
4677
 
4276
- const _hoisted_1$e = { key: 0 };
4678
+ const _hoisted_1$c = { key: 0 };
4277
4679
  const _hoisted_2$9 = { class: "record_count_body mb-3" };
4278
4680
  const _hoisted_3$8 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
4279
4681
  const _hoisted_4$8 = ["value"];
@@ -4320,7 +4722,7 @@ const _hoisted_18$2 = {
4320
4722
 
4321
4723
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4322
4724
  return ($props.paginationStyle !== 'loadMore')
4323
- ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
4725
+ ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
4324
4726
  createElementVNode("div", _hoisted_2$9, [
4325
4727
  _hoisted_3$8,
4326
4728
  createTextVNode("  "),
@@ -4399,202 +4801,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4399
4801
  ]))
4400
4802
  }
4401
4803
 
4402
- script$h.render = render$1;
4403
- script$h.__file = "src/lib/components/list_templates/Pagination.vue";
4404
-
4405
- const _hoisted_1$d = /*#__PURE__*/createElementVNode("span", {
4406
- class: "spinner-border spinner-border-sm me-1",
4407
- role: "status",
4408
- "aria-hidden": "true"
4409
- }, null, -1 /* HOISTED */);
4410
-
4411
-
4412
- var script$g = {
4413
- __name: 'ShConfirmAction',
4414
- props: {
4415
- data: Object,
4416
- title: String,
4417
- message: String,
4418
- url: {
4419
- type: String,
4420
- required: true
4421
- },
4422
- loadingMessage: {
4423
- type: String,
4424
- default: 'Processing...'
4425
- },
4426
- successMessage: {
4427
- type: String,
4428
- default: 'Action Successful'
4429
- },
4430
- failMessage: {
4431
- type: String,
4432
- default: 'Action failed'
4433
- }
4434
- },
4435
- emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
4436
- setup(__props, { emit: __emit }) {
4437
-
4438
- const props = __props;
4439
-
4440
- const processing = ref(false);
4441
- const emit = __emit;
4442
- const actionSuccessful = (res)=>{
4443
- processing.value = false;
4444
- res.actionType = 'silentAction';
4445
- emit('actionSuccessful',res);
4446
- emit('success',res);
4447
- shRepo.showToast(res.message ?? props.successMessage);
4448
- };
4449
-
4450
- const actionFailed = reason =>{
4451
- console.log(reason);
4452
- processing.value = false;
4453
- reason.actionType = 'silentAction';
4454
- emit('actionFailed', reason);
4455
- emit('failed', reason);
4456
- shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
4457
- };
4458
- function runAction () {
4459
- processing.value = true;
4460
- shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
4461
- if(res.isConfirmed){
4462
- const value = res.value;
4463
- if(value.success){
4464
- actionSuccessful(res.value.response);
4465
- } else {
4466
- actionFailed(res);
4467
- }
4468
- } else {
4469
- emit('actionCanceled');
4470
- emit('canceled');
4471
- processing.value = false;
4472
- }
4473
- }).catch(ex => {
4474
- actionFailed(ex);
4475
- });
4476
- }
4477
-
4478
- return (_ctx, _cache) => {
4479
- return (openBlock(), createElementBlock("a", {
4480
- class: normalizeClass(processing.value ? 'disabled':''),
4481
- onClick: runAction
4482
- }, [
4483
- (processing.value)
4484
- ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4485
- _hoisted_1$d,
4486
- createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4487
- ], 64 /* STABLE_FRAGMENT */))
4488
- : createCommentVNode("v-if", true),
4489
- (!processing.value)
4490
- ? renderSlot(_ctx.$slots, "default", { key: 1 })
4491
- : createCommentVNode("v-if", true)
4492
- ], 2 /* CLASS */))
4493
- }
4494
- }
4495
-
4496
- };
4497
-
4498
- script$g.__file = "src/lib/components/ShConfirmAction.vue";
4499
-
4500
- const _hoisted_1$c = /*#__PURE__*/createElementVNode("span", {
4501
- class: "spinner-border spinner-border-sm me-1",
4502
- role: "status",
4503
- "aria-hidden": "true"
4504
- }, null, -1 /* HOISTED */);
4505
-
4506
- var script$f = {
4507
- __name: 'ShSilentAction',
4508
- props: {
4509
- data: Object,
4510
- loadingMessage: {
4511
- type: String,
4512
- default: 'Processing'
4513
- },
4514
- successMessage: {
4515
- type: String,
4516
- default: 'Action Successful'
4517
- },
4518
- failMessage: {
4519
- type: String,
4520
- default: 'Action failed'
4521
- },
4522
- method: {
4523
- type: String,
4524
- default: 'POST'
4525
- },
4526
- url: {
4527
- type: String,
4528
- required: true
4529
- },
4530
- disableSuccessMessage: {
4531
- type: Boolean
4532
- }
4533
- },
4534
- emits: ['actionSuccessful','actionFailed','success'],
4535
- setup(__props, { emit: __emit }) {
4536
-
4537
- const props = __props;
4538
- const processing = ref(false);
4539
- const emit = __emit;
4540
- const actionSuccessful = (res)=>{
4541
- processing.value = false;
4542
- res.actionType = 'silentAction';
4543
- console.log(res.data,props.successMessage);
4544
- emit('actionSuccessful',res);
4545
- emit('success',res);
4546
- if(!props.disableSuccessMessage) {
4547
- shRepo.showToast(res.data.message ?? props.successMessage);
4548
- }
4549
- };
4550
-
4551
- const actionFailed = reason =>{
4552
- processing.value = false;
4553
- console.log(reason);
4554
- shRepo.showToast('Failed');
4555
- reason.actionType = 'silentAction';
4556
- emit('actionFailed', reason);
4557
- shRepo.showToast(reason.message ?? props.failMessage,'error');
4558
- };
4559
- function runAction(){
4560
- processing.value = true;
4561
- if(props.method === 'POST'){
4562
- shApis.doPost(props.url,props.data).then(res=>{
4563
- actionSuccessful(res);
4564
- }).catch(reason=>{
4565
- actionFailed(reason);
4566
- });
4567
- }
4568
- if(props.method === 'GET'){
4569
- shApis.doGet(props.url,props.data).then(res=>{
4570
- actionSuccessful(res);
4571
- }).catch(reason=>{
4572
- actionFailed(reason);
4573
- });
4574
- }
4575
- }
4576
-
4577
- return (_ctx, _cache) => {
4578
- return (openBlock(), createElementBlock("a", {
4579
- class: normalizeClass(processing.value ? 'disabled':''),
4580
- onClick: runAction
4581
- }, [
4582
- (processing.value)
4583
- ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4584
- _hoisted_1$c,
4585
- createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4586
- ], 64 /* STABLE_FRAGMENT */))
4587
- : createCommentVNode("v-if", true),
4588
- (!processing.value)
4589
- ? renderSlot(_ctx.$slots, "default", { key: 1 })
4590
- : createCommentVNode("v-if", true)
4591
- ], 2 /* CLASS */))
4592
- }
4593
- }
4594
-
4595
- };
4596
-
4597
- script$f.__file = "src/lib/components/ShSilentAction.vue";
4804
+ script$f.render = render$1;
4805
+ script$f.__file = "src/lib/components/list_templates/Pagination.vue";
4598
4806
 
4599
4807
  const _hoisted_1$b = { class: "sh-range" };
4600
4808
  const _hoisted_2$8 = { class: "dropdown" };
@@ -5246,10 +5454,10 @@ const __default__ = {
5246
5454
  },
5247
5455
  components: {
5248
5456
  ShRange: script$e,
5249
- ShSilentAction: script$f,
5250
- ShConfirmAction: script$g,
5251
- ShCanvas: script$j,
5252
- pagination: script$h
5457
+ ShSilentAction: script$i,
5458
+ ShConfirmAction: script$j,
5459
+ ShCanvas: script$l,
5460
+ pagination: script$f
5253
5461
  },
5254
5462
  computed: {
5255
5463
  windowWidth: function (){
@@ -5271,7 +5479,7 @@ const __default__ = {
5271
5479
  var script$d = /*#__PURE__*/Object.assign(__default__, {
5272
5480
  setup(__props) {
5273
5481
 
5274
- const noRecordsComponent = inject('noRecordsComponent', script$i);
5482
+ const noRecordsComponent = inject('noRecordsComponent', script$k);
5275
5483
 
5276
5484
  storeToRefs(useUserStore());
5277
5485
 
@@ -5497,7 +5705,7 @@ return (_ctx, _cache) => {
5497
5705
  }), 128 /* KEYED_FRAGMENT */)),
5498
5706
  (__props.actions)
5499
5707
  ? (openBlock(), createElementBlock("td", _hoisted_46, [
5500
- createVNode(TableActions, {
5708
+ createVNode(script$g, {
5501
5709
  actions: __props.actions,
5502
5710
  record: record
5503
5711
  }, null, 8 /* PROPS */, ["actions", "record"])
@@ -5578,7 +5786,7 @@ return (_ctx, _cache) => {
5578
5786
  }), 128 /* KEYED_FRAGMENT */)),
5579
5787
  (__props.actions)
5580
5788
  ? (openBlock(), createElementBlock("div", _hoisted_66, [
5581
- createVNode(TableActions, {
5789
+ createVNode(script$g, {
5582
5790
  actions: __props.actions,
5583
5791
  record: record
5584
5792
  }, null, 8 /* PROPS */, ["actions", "record"])
@@ -5590,7 +5798,7 @@ return (_ctx, _cache) => {
5590
5798
  : createCommentVNode("v-if", true)
5591
5799
  ])),
5592
5800
  (_ctx.pagination_data)
5593
- ? (openBlock(), createBlock(script$h, {
5801
+ ? (openBlock(), createBlock(script$f, {
5594
5802
  key: 6,
5595
5803
  onLoadMoreRecords: _ctx.loadMoreRecords,
5596
5804
  "hide-load-more": __props.hideLoadMore,
@@ -5607,7 +5815,7 @@ return (_ctx, _cache) => {
5607
5815
  key: action.label
5608
5816
  }, [
5609
5817
  (action.canvasId)
5610
- ? (openBlock(), createBlock(script$j, {
5818
+ ? (openBlock(), createBlock(script$l, {
5611
5819
  key: 0,
5612
5820
  onOffcanvasClosed: _ctx.canvasClosed,
5613
5821
  position: action.canvasPosition,
@@ -6108,7 +6316,7 @@ return (_ctx, _cache) => {
6108
6316
  (permissionsChanged.value)
6109
6317
  ? (openBlock(), createElementBlock("div", _hoisted_16, [
6110
6318
  createElementVNode("div", _hoisted_17, [
6111
- createVNode(script$f, {
6319
+ createVNode(script$i, {
6112
6320
  onSuccess: permissionsUpdated,
6113
6321
  url: `sh-departments/department/permissions/${unref(departmentId)}/${selectedModule.value}`,
6114
6322
  data: {permissions: selectedPermissions.value},
@@ -6252,7 +6460,7 @@ return (_ctx, _cache) => {
6252
6460
  class: "d-none"
6253
6461
  }, "Open Modal", 8 /* PROPS */, _hoisted_1$5),
6254
6462
  (popUp.value === 'modal')
6255
- ? (openBlock(), createBlock(script$n, {
6463
+ ? (openBlock(), createBlock(script$p, {
6256
6464
  key: 0,
6257
6465
  "modal-title": title.value,
6258
6466
  "modal-id": unref(modalId),
@@ -6267,7 +6475,7 @@ return (_ctx, _cache) => {
6267
6475
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6268
6476
  : createCommentVNode("v-if", true),
6269
6477
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6270
- ? (openBlock(), createBlock(script$j, {
6478
+ ? (openBlock(), createBlock(script$l, {
6271
6479
  key: 1,
6272
6480
  "canvas-id": unref(canvasId),
6273
6481
  "canvas-title": title.value,
@@ -6298,7 +6506,7 @@ const fields = route.query.fields.split(',');
6298
6506
  const action = route.query.action;
6299
6507
 
6300
6508
  return (_ctx, _cache) => {
6301
- return (openBlock(), createBlock(script$o, {
6509
+ return (openBlock(), createBlock(script$q, {
6302
6510
  fields: unref(fields),
6303
6511
  action: unref(action)
6304
6512
  }, null, 8 /* PROPS */, ["fields", "action"]))
@@ -6401,7 +6609,7 @@ const goBack = () => {
6401
6609
  return (_ctx, _cache) => {
6402
6610
  return (openBlock(), createElementBlock(Fragment, null, [
6403
6611
  (popUp.value === 'modal')
6404
- ? (openBlock(), createBlock(script$n, {
6612
+ ? (openBlock(), createBlock(script$p, {
6405
6613
  key: 0,
6406
6614
  "modal-title": title.value,
6407
6615
  "data-bs-backdrop": "static",
@@ -6416,7 +6624,7 @@ return (_ctx, _cache) => {
6416
6624
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6417
6625
  : createCommentVNode("v-if", true),
6418
6626
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6419
- ? (openBlock(), createBlock(script$j, {
6627
+ ? (openBlock(), createBlock(script$l, {
6420
6628
  "canvas-title": title.value,
6421
6629
  key: size.value + position.value,
6422
6630
  "canvas-id": unref(canvasId),
@@ -6523,7 +6731,7 @@ return (_ctx, _cache) => {
6523
6731
  ]),
6524
6732
  createElementVNode("div", _hoisted_6$2, [
6525
6733
  (unref(user))
6526
- ? (openBlock(), createBlock(script$l, {
6734
+ ? (openBlock(), createBlock(script$n, {
6527
6735
  key: 0,
6528
6736
  "current-data": unref(user),
6529
6737
  "modal-title": "Edit Details",
@@ -6540,7 +6748,7 @@ return (_ctx, _cache) => {
6540
6748
  }, 8 /* PROPS */, ["current-data"]))
6541
6749
  : createCommentVNode("v-if", true),
6542
6750
  (unref(user))
6543
- ? (openBlock(), createBlock(script$l, {
6751
+ ? (openBlock(), createBlock(script$n, {
6544
6752
  key: 1,
6545
6753
  "modal-title": "Update Password",
6546
6754
  class: "btn btn-info ms-2 my-2",
@@ -6577,7 +6785,7 @@ return (_ctx, _cache) => {
6577
6785
  createElementVNode("div", _hoisted_9$1, [
6578
6786
  createVNode(script$4, null, {
6579
6787
  default: withCtx(() => [
6580
- createVNode(script$l, {
6788
+ createVNode(script$n, {
6581
6789
  "modal-title": "Edit Profile Image",
6582
6790
  class: "btn btn-info btn-sm float-end my-2",
6583
6791
  action: 'auth/profile-picture',
@@ -6679,12 +6887,12 @@ return (_ctx, _cache) => {
6679
6887
  ]
6680
6888
  }
6681
6889
  }, null, 8 /* PROPS */, ["reload", "actions"]),
6682
- createVNode(script$n, {
6890
+ createVNode(script$p, {
6683
6891
  "modal-id": "sh_department_modal",
6684
6892
  "modal-title": "Department Form"
6685
6893
  }, {
6686
6894
  default: withCtx(() => [
6687
- createVNode(script$w, {
6895
+ createVNode(script$y, {
6688
6896
  "success-callback": "departmentAdded",
6689
6897
  "current-data": department.value,
6690
6898
  onDepartmentAdded: departmentAdded,
@@ -6839,12 +7047,12 @@ return (_ctx, _cache) => {
6839
7047
  headers: ['id',showModule,'created_at'],
6840
7048
  "end-point": 'admin/departments/department/list-modules/' + id.value
6841
7049
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6842
- createVNode(script$n, {
7050
+ createVNode(script$p, {
6843
7051
  "modal-id": "addModule",
6844
7052
  "modal-title": "Add Module Department"
6845
7053
  }, {
6846
7054
  default: withCtx(() => [
6847
- createVNode(script$w, {
7055
+ createVNode(script$y, {
6848
7056
  "reload-select-items": unref(reload),
6849
7057
  "success-callback": moduleAdded,
6850
7058
  "fill-selects": {
@@ -6866,7 +7074,7 @@ return (_ctx, _cache) => {
6866
7074
  ref: permissionCanvasBtn,
6867
7075
  "data-bs-toggle": "offcanvas"
6868
7076
  }, null, 512 /* NEED_PATCH */),
6869
- createVNode(script$j, {
7077
+ createVNode(script$l, {
6870
7078
  "canvas-id": "permissionsCanvas",
6871
7079
  position: "end enlarged",
6872
7080
  "canvas-title": "Module Permissions"
@@ -7002,7 +7210,7 @@ return (_ctx, _cache) => {
7002
7210
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
7003
7211
  (section.value === 'forgot')
7004
7212
  ? (openBlock(), createElementBlock("div", _hoisted_2, [
7005
- createVNode(script$w, {
7213
+ createVNode(script$y, {
7006
7214
  class: "sh-login-form",
7007
7215
  fields: ['email'],
7008
7216
  "action-label": "Send Reset Link",
@@ -7025,7 +7233,7 @@ return (_ctx, _cache) => {
7025
7233
  (unref(loginTitle))
7026
7234
  ? (openBlock(), createElementBlock("h3", _hoisted_6, toDisplayString(unref(loginTitle)), 1 /* TEXT */))
7027
7235
  : createCommentVNode("v-if", true),
7028
- createVNode(script$w, {
7236
+ createVNode(script$y, {
7029
7237
  class: "sh-login-form",
7030
7238
  fields: ['email','password'],
7031
7239
  "action-label": "Login",
@@ -7053,7 +7261,7 @@ return (_ctx, _cache) => {
7053
7261
  (unref(registerSubTitle))
7054
7262
  ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
7055
7263
  : createCommentVNode("v-if", true),
7056
- createVNode(script$w, {
7264
+ createVNode(script$y, {
7057
7265
  class: "sh-login-form",
7058
7266
  fields: unref(registrationFields),
7059
7267
  "action-label": "Sign Up",
@@ -7149,11 +7357,11 @@ const ShFrontend = {
7149
7357
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
7150
7358
  const loginTitle = options.loginTitle ?? `Login to your account`;
7151
7359
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
7152
- options.formTextInput ?? script$t;
7360
+ options.formTextInput ?? script$v;
7153
7361
  const loginUrl = options.loginUrl ?? `/login`;
7154
7362
  const redirectLogin = options.redirectLogin ?? `/`;
7155
7363
  const redirectRegister = options.redirectRegister ?? `/`;
7156
- const noRecordsComponent = options.noRecordsComponent ?? script$i;
7364
+ const noRecordsComponent = options.noRecordsComponent ?? script$k;
7157
7365
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
7158
7366
  const AuthComponent = options.authComponent ?? script;
7159
7367
  app.provide('loginEndpoint',loginEndpoint);
@@ -7275,4 +7483,4 @@ const useShFetch = (url, path, cacheKey) => {
7275
7483
  }
7276
7484
  };
7277
7485
 
7278
- export { countries as Countries, script$8 as ManagePermissions, script$o as ShAutoForm, script$j as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$g as ShConfirmAction, script$m as ShDropDownForm, script$b as ShDynamicTabs, script$w as ShForm, ShFrontend, script$n as ShModal, script$a as ShModalBtn, script$l as ShModalForm, script$k as ShModalFormAuto, script$y as ShPhone, script$5 as ShQueryPopups, script$e as ShRange, script$7 as ShRoutePopups, script$f as ShSilentAction, script$x as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shGql, shRepo, shStorage, useAppStore, useShFetch, useUserStore };
7486
+ export { countries as Countries, script$8 as ManagePermissions, script$q as ShAutoForm, script$l as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$j as ShConfirmAction, script$o as ShDropDownForm, script$b as ShDynamicTabs, script$y as ShForm, ShFrontend, script$p as ShModal, script$a as ShModalBtn, script$n as ShModalForm, script$m as ShModalFormAuto, script$A as ShPhone, script$5 as ShQueryPopups, script$e as ShRange, script$7 as ShRoutePopups, script$i as ShSilentAction, script$z as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shGql, shRepo, shStorage, useAppStore, useShFetch, useUserStore };