@iankibetsh/shframework 0.8.1 → 0.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.
package/dist/library.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import Axios from 'axios';
2
2
  import moment from 'moment';
3
- import { inject, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, renderSlot, createStaticVNode, withCtx, shallowRef, Teleport, computed, isRef, vModelCheckbox, watch, pushScopeId, popScopeId } from 'vue';
3
+ import { inject, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, Teleport, computed, isRef, vModelCheckbox, watch, pushScopeId, popScopeId } from 'vue';
4
4
  import NProgress from 'nprogress';
5
5
  import Editor from '@tinymce/tinymce-vue';
6
6
  import Swal from 'sweetalert2';
@@ -1562,7 +1562,7 @@ const countries = [
1562
1562
  }
1563
1563
  ];
1564
1564
 
1565
- var script$c = {
1565
+ var script$e = {
1566
1566
  name: 'ShPhone',
1567
1567
  props: ['modelValue', 'country_code'],
1568
1568
  data () {
@@ -1624,8 +1624,8 @@ var script$c = {
1624
1624
  }
1625
1625
  };
1626
1626
 
1627
- const _hoisted_1$c = { class: "sh-phone mb-3" };
1628
- const _hoisted_2$b = {
1627
+ const _hoisted_1$e = { class: "sh-phone mb-3" };
1628
+ const _hoisted_2$c = {
1629
1629
  key: 0,
1630
1630
  style: {"display":"contents"}
1631
1631
  };
@@ -1633,9 +1633,9 @@ const _hoisted_3$b = ["src"];
1633
1633
  const _hoisted_4$b = ["value"];
1634
1634
 
1635
1635
  function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1636
- return (openBlock(), createElementBlock("div", _hoisted_1$c, [
1636
+ return (openBlock(), createElementBlock("div", _hoisted_1$e, [
1637
1637
  ($data.selectedCountry)
1638
- ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
1638
+ ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
1639
1639
  createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$b),
1640
1640
  createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
1641
1641
  ]))
@@ -1667,10 +1667,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1667
1667
  ]))
1668
1668
  }
1669
1669
 
1670
- script$c.render = render$7;
1671
- script$c.__file = "src/lib/components/ShPhone.vue";
1670
+ script$e.render = render$7;
1671
+ script$e.__file = "src/lib/components/ShPhone.vue";
1672
1672
 
1673
- var script$b = {
1673
+ var script$d = {
1674
1674
  name: 'ShEditor',
1675
1675
  props: ['modelValue'],
1676
1676
  components: {
@@ -1709,7 +1709,7 @@ var script$b = {
1709
1709
  }
1710
1710
  };
1711
1711
 
1712
- const _hoisted_1$b = /*#__PURE__*/createElementVNode("textarea", {
1712
+ const _hoisted_1$d = /*#__PURE__*/createElementVNode("textarea", {
1713
1713
  id: "tiny",
1714
1714
  style: {"display":"none"},
1715
1715
  "data-cy": "tinymce_editor"
@@ -1719,7 +1719,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1719
1719
  const _component_editor = resolveComponent("editor");
1720
1720
 
1721
1721
  return (openBlock(), createElementBlock(Fragment, null, [
1722
- _hoisted_1$b,
1722
+ _hoisted_1$d,
1723
1723
  createElementVNode("div", {
1724
1724
  onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
1725
1725
  class: "sh-editor w-100"
@@ -1744,14 +1744,14 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1744
1744
  ], 64 /* STABLE_FRAGMENT */))
1745
1745
  }
1746
1746
 
1747
- script$b.render = render$6;
1748
- script$b.__file = "src/lib/components/FormComponent/ShEditor.vue";
1747
+ script$d.render = render$6;
1748
+ script$d.__file = "src/lib/components/FormComponent/ShEditor.vue";
1749
1749
 
1750
- const _hoisted_1$a = {
1750
+ const _hoisted_1$c = {
1751
1751
  key: 0,
1752
1752
  class: "dropdown sh-suggest"
1753
1753
  };
1754
- const _hoisted_2$a = ["id"];
1754
+ const _hoisted_2$b = ["id"];
1755
1755
  const _hoisted_3$a = { class: "badge bg-secondary m-1 sh-selected-item" };
1756
1756
  const _hoisted_4$a = ["onClick"];
1757
1757
  const _hoisted_5$6 = ["id"];
@@ -1768,7 +1768,7 @@ const _hoisted_10$3 = {
1768
1768
  };
1769
1769
 
1770
1770
 
1771
- var script$a = {
1771
+ var script$c = {
1772
1772
  __name: 'ShSuggest',
1773
1773
  props: ['fillSelects','modelValue'],
1774
1774
  emits: ['update:modelValue'],
@@ -1849,7 +1849,7 @@ function filterData(e){
1849
1849
 
1850
1850
  return (_ctx, _cache) => {
1851
1851
  return (unref(id))
1852
- ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
1852
+ ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
1853
1853
  createElementVNode("div", {
1854
1854
  id: unref(id),
1855
1855
  "data-bs-toggle": "dropdown",
@@ -1876,7 +1876,7 @@ return (_ctx, _cache) => {
1876
1876
  onInput: filterData,
1877
1877
  class: "flex-fill h-100 sh-suggestion-input"
1878
1878
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$6)
1879
- ], 8 /* PROPS */, _hoisted_2$a),
1879
+ ], 8 /* PROPS */, _hoisted_2$b),
1880
1880
  createElementVNode("ul", {
1881
1881
  class: "dropdown-menu w-100",
1882
1882
  id: 'dropwdown_section' + unref(id),
@@ -1909,15 +1909,15 @@ return (_ctx, _cache) => {
1909
1909
 
1910
1910
  };
1911
1911
 
1912
- script$a.__scopeId = "data-v-5b767123";
1913
- script$a.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1912
+ script$c.__scopeId = "data-v-5b767123";
1913
+ script$c.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1914
1914
 
1915
- var script$9 = {
1915
+ var script$b = {
1916
1916
  name: 'ShForm',
1917
1917
  components: {
1918
- ShSuggest: script$a,
1919
- ShEditor: script$b,
1920
- ShPhone: script$c
1918
+ ShSuggest: script$c,
1919
+ ShEditor: script$d,
1920
+ ShPhone: script$e
1921
1921
  },
1922
1922
  props: [
1923
1923
  'action',
@@ -2158,6 +2158,7 @@ var script$9 = {
2158
2158
  console.log(reason,message);
2159
2159
  if (reason.status === 422) { // change this to 422 validation error response as received from laravel
2160
2160
  this.form_errors = reason.data.errors;
2161
+ this.errorText = 'Fill all the details correctly';
2161
2162
  } else {
2162
2163
  this.errorText = message;
2163
2164
  }
@@ -2228,40 +2229,41 @@ var script$9 = {
2228
2229
  }
2229
2230
  };
2230
2231
 
2231
- const _hoisted_1$9 = {
2232
+ const _hoisted_1$b = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2233
+ const _hoisted_2$a = {
2232
2234
  ref: "ShAutoForm",
2233
2235
  class: "sh-form"
2234
2236
  };
2235
- const _hoisted_2$9 = {
2237
+ const _hoisted_3$9 = {
2236
2238
  key: 0,
2237
2239
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2238
2240
  role: "alert"
2239
2241
  };
2240
- const _hoisted_3$9 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2241
- const _hoisted_4$9 = { key: 0 };
2242
- const _hoisted_5$5 = { key: 1 };
2243
- const _hoisted_6$4 = { class: "row" };
2244
- const _hoisted_7$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2245
- const _hoisted_8$2 = { class: "col-md-12" };
2246
- const _hoisted_9$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2247
- const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2242
+ const _hoisted_4$9 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2243
+ const _hoisted_5$5 = { key: 0 };
2244
+ const _hoisted_6$4 = { key: 1 };
2245
+ const _hoisted_7$3 = { class: "row" };
2246
+ const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2247
+ const _hoisted_9$3 = { class: "col-md-12" };
2248
+ const _hoisted_10$2 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2248
2249
  const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2249
2250
  const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2250
- const _hoisted_13$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2251
- const _hoisted_14$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2252
- const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
2251
+ const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2252
+ const _hoisted_14$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2253
+ const _hoisted_15$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2253
2254
  const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
2254
- const _hoisted_17$2 = ["value"];
2255
- const _hoisted_18$2 = {
2255
+ const _hoisted_17$2 = ["name", "onFocus", "onUpdate:modelValue"];
2256
+ const _hoisted_18$2 = ["value"];
2257
+ const _hoisted_19$2 = {
2256
2258
  key: 12,
2257
2259
  class: "invalid-feedback"
2258
2260
  };
2259
- const _hoisted_19$2 = {
2261
+ const _hoisted_20$2 = {
2260
2262
  key: 1,
2261
2263
  class: "row"
2262
2264
  };
2263
- const _hoisted_20$2 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
2264
- const _hoisted_21$2 = /*#__PURE__*/createElementVNode("p", null, [
2265
+ const _hoisted_21$2 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
2266
+ const _hoisted_22$2 = /*#__PURE__*/createElementVNode("p", null, [
2265
2267
  /*#__PURE__*/createTextVNode("By clicking submit, you agree to our "),
2266
2268
  /*#__PURE__*/createElementVNode("a", {
2267
2269
  target: "_blank",
@@ -2273,11 +2275,11 @@ const _hoisted_21$2 = /*#__PURE__*/createElementVNode("p", null, [
2273
2275
  href: "https://hauzisha.co.ke/privacy-policy"
2274
2276
  }, "privacy policy")
2275
2277
  ], -1 /* HOISTED */);
2276
- const _hoisted_22$2 = [
2277
- _hoisted_20$2,
2278
- _hoisted_21$2
2278
+ const _hoisted_23$1 = [
2279
+ _hoisted_21$2,
2280
+ _hoisted_22$2
2279
2281
  ];
2280
- const _hoisted_23$1 = /*#__PURE__*/createElementVNode("span", {
2282
+ const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
2281
2283
  class: "spinner-border spinner-border-sm",
2282
2284
  role: "status",
2283
2285
  "aria-hidden": "true"
@@ -2288,225 +2290,391 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2288
2290
  const _component_ShSuggest = resolveComponent("ShSuggest");
2289
2291
  const _component_ShEditor = resolveComponent("ShEditor");
2290
2292
 
2291
- return (openBlock(), createElementBlock("form", _hoisted_1$9, [
2292
- createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2293
- createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2294
- (_ctx.form_status == 3)
2295
- ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
2296
- _hoisted_3$9,
2297
- (_ctx.errorText)
2298
- ? (openBlock(), createElementBlock("span", _hoisted_4$9, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2299
- : (openBlock(), createElementBlock("span", _hoisted_5$5, "Unexpected Error Occurred")),
2300
- createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2301
- ]))
2302
- : createCommentVNode("v-if", true),
2303
- withDirectives(createElementVNode("input", {
2304
- type: "hidden",
2305
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.form_elements['id']) = $event))
2306
- }, null, 512 /* NEED_PATCH */), [
2307
- [vModelText, _ctx.form_elements['id']]
2308
- ]),
2309
- createElementVNode("div", _hoisted_6$4, [
2310
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
2311
- return (openBlock(), createElementBlock("div", {
2312
- class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
2313
- key: field
2314
- }, [
2315
- createElementVNode("label", _hoisted_7$3, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2316
- createElementVNode("div", _hoisted_8$2, [
2317
- ($options.getFieldType(field) === 'component')
2318
- ? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
2319
- key: 0,
2320
- "data-cy": field,
2321
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2322
- name: field,
2323
- onFocus: $event => ($options.removeErrors(field)),
2324
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2325
- modelValue: _ctx.form_elements[field],
2326
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2327
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, ["data-cy", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2328
- : createCommentVNode("v-if", true),
2329
- ($options.getFieldType(field) === 'file')
2330
- ? (openBlock(), createElementBlock("input", {
2331
- key: 1,
2332
- "data-cy": field,
2333
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2334
- name: field,
2335
- onFocus: $event => ($options.removeErrors(field)),
2336
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2337
- ref_for: true,
2338
- ref: 'file_'+field,
2339
- onChange: $event => ($options.handleFileUpload(field)),
2340
- type: "file"
2341
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_9$3))
2342
- : createCommentVNode("v-if", true),
2343
- ($options.getFieldType(field) === 'numeric')
2344
- ? withDirectives((openBlock(), createElementBlock("input", {
2345
- key: 2,
2346
- "data-cy": field,
2347
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2348
- name: field,
2349
- onFocus: $event => ($options.removeErrors(field)),
2350
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2351
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2352
- type: "number"
2353
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$2)), [
2354
- [vModelText, _ctx.form_elements[field]]
2355
- ])
2356
- : createCommentVNode("v-if", true),
2357
- ($options.getFieldType(field) === 'password')
2358
- ? withDirectives((openBlock(), createElementBlock("input", {
2359
- key: 3,
2360
- "data-cy": field,
2361
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2362
- name: field,
2363
- onFocus: $event => ($options.removeErrors(field)),
2364
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2365
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2366
- type: "password"
2367
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
2368
- [vModelText, _ctx.form_elements[field]]
2369
- ])
2370
- : createCommentVNode("v-if", true),
2371
- ($options.getFieldType(field) === 'email')
2372
- ? withDirectives((openBlock(), createElementBlock("input", {
2373
- key: 4,
2374
- "data-cy": field,
2375
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2376
- name: field,
2377
- onFocus: $event => ($options.removeErrors(field)),
2378
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2379
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2380
- type: "email",
2381
- required: ""
2382
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
2383
- [vModelText, _ctx.form_elements[field]]
2384
- ])
2385
- : createCommentVNode("v-if", true),
2386
- ($options.getFieldType(field) === 'datepicker' && $options.isDisabled(field) === false)
2387
- ? withDirectives((openBlock(), createElementBlock("input", {
2388
- key: 5,
2389
- "data-cy": field,
2390
- type: "datetime-local",
2391
- name: field,
2392
- onFocus: $event => ($options.removeErrors(field)),
2393
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
2394
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2395
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
2396
- [vModelText, _ctx.form_elements[field]]
2397
- ])
2398
- : createCommentVNode("v-if", true),
2399
- ($options.getFieldType(field) === 'phone')
2400
- ? (openBlock(), createBlock(_component_ShPhone, {
2401
- key: 6,
2402
- country_code: $props.country_code,
2403
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2404
- name: field,
2405
- onFocus: $event => ($options.removeErrors(field)),
2406
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2407
- modelValue: _ctx.form_elements[field],
2408
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2409
- required: ""
2410
- }, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2411
- : createCommentVNode("v-if", true),
2412
- ($options.getFieldType(field) === 'suggest')
2413
- ? (openBlock(), createBlock(_component_ShSuggest, {
2414
- key: 7,
2415
- "select-data": _ctx.selectData[field],
2416
- "fill-selects": $props.fillSelects[field],
2417
- class: normalizeClass(_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field),
2418
- modelValue: _ctx.form_elements[field],
2419
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2420
- }, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
2421
- : createCommentVNode("v-if", true),
2422
- ($options.getFieldType(field) === 'editor')
2423
- ? (openBlock(), createBlock(_component_ShEditor, {
2424
- key: 8,
2425
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2426
- name: field,
2427
- onFocus: $event => ($options.removeErrors(field)),
2428
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2429
- modelValue: _ctx.form_elements[field],
2430
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2431
- }, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2432
- : createCommentVNode("v-if", true),
2433
- ($options.getFieldType(field) === 'text')
2434
- ? withDirectives((openBlock(), createElementBlock("input", {
2435
- key: 9,
2436
- disabled: $options.isDisabled(field),
2437
- placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
2438
- name: field,
2439
- onFocus: $event => ($options.removeErrors(field)),
2440
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2441
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2442
- type: "text"
2443
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
2444
- [vModelText, _ctx.form_elements[field]]
2445
- ])
2446
- : createCommentVNode("v-if", true),
2447
- ($options.getFieldType(field) === 'textarea')
2448
- ? withDirectives((openBlock(), createElementBlock("textarea", {
2449
- key: 10,
2450
- name: field,
2451
- onFocus: $event => ($options.removeErrors(field)),
2452
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2453
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2454
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_15$2)), [
2455
- [vModelText, _ctx.form_elements[field]]
2456
- ])
2457
- : createCommentVNode("v-if", true),
2458
- ($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
2459
- ? withDirectives((openBlock(), createElementBlock("select", {
2460
- key: 11,
2461
- name: field,
2462
- onFocus: $event => ($options.removeErrors(field)),
2463
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2464
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2465
- }, [
2466
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectData[field], (item) => {
2467
- return (openBlock(), createElementBlock("option", {
2468
- key: item.id,
2469
- value: item.id
2470
- }, toDisplayString(item.name), 9 /* TEXT, PROPS */, _hoisted_17$2))
2471
- }), 128 /* KEYED_FRAGMENT */))
2472
- ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_16$2)), [
2473
- [vModelSelect, _ctx.form_elements[field]]
2474
- ])
2475
- : createCommentVNode("v-if", true),
2476
- (_ctx.form_errors[field] != null )
2477
- ? (openBlock(), createElementBlock("div", _hoisted_18$2, toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
2478
- : createCommentVNode("v-if", true)
2293
+ return (openBlock(), createElementBlock(Fragment, null, [
2294
+ _hoisted_1$b,
2295
+ createElementVNode("form", _hoisted_2$a, [
2296
+ createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2297
+ createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2298
+ (_ctx.form_status == 3)
2299
+ ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
2300
+ _hoisted_4$9,
2301
+ (_ctx.errorText)
2302
+ ? (openBlock(), createElementBlock("span", _hoisted_5$5, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2303
+ : (openBlock(), createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
2304
+ createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2305
+ ]))
2306
+ : createCommentVNode("v-if", true),
2307
+ withDirectives(createElementVNode("input", {
2308
+ type: "hidden",
2309
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.form_elements['id']) = $event))
2310
+ }, null, 512 /* NEED_PATCH */), [
2311
+ [vModelText, _ctx.form_elements['id']]
2312
+ ]),
2313
+ createElementVNode("div", _hoisted_7$3, [
2314
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
2315
+ return (openBlock(), createElementBlock("div", {
2316
+ class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
2317
+ key: field
2318
+ }, [
2319
+ createElementVNode("label", _hoisted_8$2, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2320
+ createElementVNode("div", _hoisted_9$3, [
2321
+ ($options.getFieldType(field) === 'component')
2322
+ ? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
2323
+ key: 0,
2324
+ "data-cy": field,
2325
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2326
+ name: field,
2327
+ onFocus: $event => ($options.removeErrors(field)),
2328
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2329
+ modelValue: _ctx.form_elements[field],
2330
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2331
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, ["data-cy", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2332
+ : createCommentVNode("v-if", true),
2333
+ ($options.getFieldType(field) === 'file')
2334
+ ? (openBlock(), createElementBlock("input", {
2335
+ key: 1,
2336
+ "data-cy": field,
2337
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2338
+ name: field,
2339
+ onFocus: $event => ($options.removeErrors(field)),
2340
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2341
+ ref_for: true,
2342
+ ref: 'file_'+field,
2343
+ onChange: $event => ($options.handleFileUpload(field)),
2344
+ type: "file"
2345
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$2))
2346
+ : createCommentVNode("v-if", true),
2347
+ ($options.getFieldType(field) === 'numeric')
2348
+ ? withDirectives((openBlock(), createElementBlock("input", {
2349
+ key: 2,
2350
+ "data-cy": field,
2351
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2352
+ name: field,
2353
+ onFocus: $event => ($options.removeErrors(field)),
2354
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2355
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2356
+ type: "number"
2357
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
2358
+ [vModelText, _ctx.form_elements[field]]
2359
+ ])
2360
+ : createCommentVNode("v-if", true),
2361
+ ($options.getFieldType(field) === 'password')
2362
+ ? withDirectives((openBlock(), createElementBlock("input", {
2363
+ key: 3,
2364
+ "data-cy": field,
2365
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2366
+ name: field,
2367
+ onFocus: $event => ($options.removeErrors(field)),
2368
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2369
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2370
+ type: "password"
2371
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
2372
+ [vModelText, _ctx.form_elements[field]]
2373
+ ])
2374
+ : createCommentVNode("v-if", true),
2375
+ ($options.getFieldType(field) === 'email')
2376
+ ? withDirectives((openBlock(), createElementBlock("input", {
2377
+ key: 4,
2378
+ "data-cy": field,
2379
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2380
+ name: field,
2381
+ onFocus: $event => ($options.removeErrors(field)),
2382
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2383
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2384
+ type: "email",
2385
+ required: ""
2386
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
2387
+ [vModelText, _ctx.form_elements[field]]
2388
+ ])
2389
+ : createCommentVNode("v-if", true),
2390
+ ($options.getFieldType(field) === 'datepicker' && $options.isDisabled(field) === false)
2391
+ ? withDirectives((openBlock(), createElementBlock("input", {
2392
+ key: 5,
2393
+ "data-cy": field,
2394
+ type: "datetime-local",
2395
+ name: field,
2396
+ onFocus: $event => ($options.removeErrors(field)),
2397
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
2398
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2399
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
2400
+ [vModelText, _ctx.form_elements[field]]
2401
+ ])
2402
+ : createCommentVNode("v-if", true),
2403
+ ($options.getFieldType(field) === 'phone')
2404
+ ? (openBlock(), createBlock(_component_ShPhone, {
2405
+ key: 6,
2406
+ country_code: $props.country_code,
2407
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2408
+ name: field,
2409
+ onFocus: $event => ($options.removeErrors(field)),
2410
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2411
+ modelValue: _ctx.form_elements[field],
2412
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2413
+ required: ""
2414
+ }, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2415
+ : createCommentVNode("v-if", true),
2416
+ ($options.getFieldType(field) === 'suggest')
2417
+ ? (openBlock(), createBlock(_component_ShSuggest, {
2418
+ key: 7,
2419
+ "select-data": _ctx.selectData[field],
2420
+ "fill-selects": $props.fillSelects[field],
2421
+ class: normalizeClass(_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field),
2422
+ modelValue: _ctx.form_elements[field],
2423
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2424
+ }, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
2425
+ : createCommentVNode("v-if", true),
2426
+ ($options.getFieldType(field) === 'editor')
2427
+ ? (openBlock(), createBlock(_component_ShEditor, {
2428
+ key: 8,
2429
+ placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2430
+ name: field,
2431
+ onFocus: $event => ($options.removeErrors(field)),
2432
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2433
+ modelValue: _ctx.form_elements[field],
2434
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2435
+ }, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2436
+ : createCommentVNode("v-if", true),
2437
+ ($options.getFieldType(field) === 'text')
2438
+ ? withDirectives((openBlock(), createElementBlock("input", {
2439
+ key: 9,
2440
+ disabled: $options.isDisabled(field),
2441
+ placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
2442
+ name: field,
2443
+ onFocus: $event => ($options.removeErrors(field)),
2444
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2445
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2446
+ type: "text"
2447
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_15$2)), [
2448
+ [vModelText, _ctx.form_elements[field]]
2449
+ ])
2450
+ : createCommentVNode("v-if", true),
2451
+ ($options.getFieldType(field) === 'textarea')
2452
+ ? withDirectives((openBlock(), createElementBlock("textarea", {
2453
+ key: 10,
2454
+ name: field,
2455
+ onFocus: $event => ($options.removeErrors(field)),
2456
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2457
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2458
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_16$2)), [
2459
+ [vModelText, _ctx.form_elements[field]]
2460
+ ])
2461
+ : createCommentVNode("v-if", true),
2462
+ ($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
2463
+ ? withDirectives((openBlock(), createElementBlock("select", {
2464
+ key: 11,
2465
+ name: field,
2466
+ onFocus: $event => ($options.removeErrors(field)),
2467
+ class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2468
+ "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2469
+ }, [
2470
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectData[field], (item) => {
2471
+ return (openBlock(), createElementBlock("option", {
2472
+ key: item.id,
2473
+ value: item.id
2474
+ }, toDisplayString(item.name), 9 /* TEXT, PROPS */, _hoisted_18$2))
2475
+ }), 128 /* KEYED_FRAGMENT */))
2476
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_17$2)), [
2477
+ [vModelSelect, _ctx.form_elements[field]]
2478
+ ])
2479
+ : createCommentVNode("v-if", true),
2480
+ (_ctx.form_errors[field] != null )
2481
+ ? (openBlock(), createElementBlock("div", _hoisted_19$2, toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
2482
+ : createCommentVNode("v-if", true)
2483
+ ])
2484
+ ], 2 /* CLASS */))
2485
+ }), 128 /* KEYED_FRAGMENT */))
2486
+ ]),
2487
+ ($props.hasTerms)
2488
+ ? (openBlock(), createElementBlock("div", _hoisted_20$2, _hoisted_23$1))
2489
+ : createCommentVNode("v-if", true),
2490
+ (_ctx.form_status == 1)
2491
+ ? (openBlock(), createElementBlock("button", {
2492
+ key: 2,
2493
+ class: normalizeClass(["btn btn-primary", $options.getSubmitBtnClass()]),
2494
+ type: "button",
2495
+ disabled: ""
2496
+ }, [
2497
+ _hoisted_24$1,
2498
+ createTextVNode(" Processing... ")
2499
+ ], 2 /* CLASS */))
2500
+ : (openBlock(), createElementBlock("button", {
2501
+ key: 3,
2502
+ "data-cy": "sh_form_submit",
2503
+ class: normalizeClass(["mb-2 form-submit-btn", $options.getSubmitBtnClass()]),
2504
+ type: "button",
2505
+ onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
2506
+ }, toDisplayString($props.actionLabel ? $props.actionLabel:'Submit'), 3 /* TEXT, CLASS */))
2507
+ ], 512 /* NEED_PATCH */)
2508
+ ], 64 /* STABLE_FRAGMENT */))
2509
+ }
2510
+
2511
+ script$b.render = render$5;
2512
+ script$b.__file = "src/lib/components/ShForm.vue";
2513
+
2514
+ const _hoisted_1$a = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
2515
+ const _hoisted_2$9 = { class: "dropdown" };
2516
+
2517
+ var script$a = {
2518
+ __name: 'ShDropDownForm',
2519
+ props: ['action',
2520
+ 'classes',
2521
+ 'hasTerms',
2522
+ 'country_code',
2523
+ 'submitBtnClass',
2524
+ 'fields',
2525
+ 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission',
2526
+ 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback',
2527
+ 'failedCallback', 'labels', 'editors',
2528
+ 'datePickers',
2529
+ 'textAreas',
2530
+ 'files',
2531
+ 'phones',
2532
+ 'numbers',
2533
+ 'customComponent','modalTitle','class'],
2534
+ setup(__props) {
2535
+
2536
+ const props = __props;
2537
+
2538
+
2539
+
2540
+ ref(props);
2541
+ let btnClass=props.class;
2542
+ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
2543
+
2544
+
2545
+ return (_ctx, _cache) => {
2546
+ return (openBlock(), createElementBlock(Fragment, null, [
2547
+ _hoisted_1$a,
2548
+ createElementVNode("div", _hoisted_2$9, [
2549
+ createElementVNode("a", {
2550
+ class: normalizeClass(unref(btnClass)),
2551
+ href: "#",
2552
+ role: "button",
2553
+ id: dropdownId,
2554
+ "data-bs-toggle": "dropdown",
2555
+ "data-bs-auto-close": "outside",
2556
+ "aria-expanded": "false"
2557
+ }, [
2558
+ renderSlot(_ctx.$slots, "default")
2559
+ ], 2 /* CLASS */),
2560
+ createElementVNode("div", {
2561
+ class: "dropdown-menu px-2 py-1",
2562
+ "aria-labelledby": dropdownId
2563
+ }, [
2564
+ createVNode(script$b, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
2565
+ ])
2566
+ ])
2567
+ ], 64 /* STABLE_FRAGMENT */))
2568
+ }
2569
+ }
2570
+
2571
+ };
2572
+
2573
+ script$a.__file = "src/lib/components/ShDropDownForm.vue";
2574
+
2575
+ var script$9 = {
2576
+ name: 'ShModal',
2577
+ props: ['modalTitle', 'modalId', 'modalSize'],
2578
+ components: {
2579
+ }
2580
+ };
2581
+
2582
+ const _hoisted_1$9 = ["id"];
2583
+ const _hoisted_2$8 = { class: "modal-content" };
2584
+ const _hoisted_3$8 = { class: "modal-header" };
2585
+ const _hoisted_4$8 = { class: "modal-title" };
2586
+ const _hoisted_5$4 = /*#__PURE__*/createElementVNode("button", {
2587
+ class: "btn btn-danger btn-sm",
2588
+ "data-bs-dismiss": "modal",
2589
+ "data-dismiss": "modal"
2590
+ }, "×", -1 /* HOISTED */);
2591
+ const _hoisted_6$3 = { class: "modal-body" };
2592
+ const _hoisted_7$2 = { class: "section" };
2593
+
2594
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2595
+ return (openBlock(), createElementBlock("div", {
2596
+ class: "modal fade",
2597
+ id: $props.modalId,
2598
+ "aria-hidden": "true"
2599
+ }, [
2600
+ createElementVNode("div", {
2601
+ class: normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
2602
+ }, [
2603
+ createElementVNode("div", _hoisted_2$8, [
2604
+ createElementVNode("div", _hoisted_3$8, [
2605
+ createElementVNode("h3", _hoisted_4$8, toDisplayString($props.modalTitle), 1 /* TEXT */),
2606
+ _hoisted_5$4
2607
+ ]),
2608
+ createElementVNode("div", _hoisted_6$3, [
2609
+ createElementVNode("div", _hoisted_7$2, [
2610
+ renderSlot(_ctx.$slots, "default")
2479
2611
  ])
2480
- ], 2 /* CLASS */))
2481
- }), 128 /* KEYED_FRAGMENT */))
2482
- ]),
2483
- ($props.hasTerms)
2484
- ? (openBlock(), createElementBlock("div", _hoisted_19$2, _hoisted_22$2))
2485
- : createCommentVNode("v-if", true),
2486
- (_ctx.form_status == 1)
2487
- ? (openBlock(), createElementBlock("button", {
2488
- key: 2,
2489
- class: normalizeClass(["btn btn-primary", $options.getSubmitBtnClass()]),
2490
- type: "button",
2491
- disabled: ""
2492
- }, [
2493
- _hoisted_23$1,
2494
- createTextVNode(" Processing... ")
2495
- ], 2 /* CLASS */))
2496
- : (openBlock(), createElementBlock("button", {
2497
- key: 3,
2498
- "data-cy": "sh_form_submit",
2499
- class: normalizeClass(["mb-2 form-submit-btn", $options.getSubmitBtnClass()]),
2500
- type: "button",
2501
- onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
2502
- }, toDisplayString($props.actionLabel ? $props.actionLabel:'Submit'), 3 /* TEXT, CLASS */))
2503
- ], 512 /* NEED_PATCH */))
2612
+ ])
2613
+ ])
2614
+ ], 2 /* CLASS */)
2615
+ ], 8 /* PROPS */, _hoisted_1$9))
2504
2616
  }
2505
2617
 
2506
- script$9.render = render$5;
2507
- script$9.__file = "src/lib/components/ShForm.vue";
2618
+ script$9.render = render$4;
2619
+ script$9.__file = "src/lib/components/ShModal.vue";
2620
+
2621
+ const _hoisted_1$8 = ["href"];
2508
2622
 
2509
2623
  var script$8 = {
2624
+ __name: 'ShModalForm',
2625
+ props: ['action',
2626
+ 'classes',
2627
+ 'hasTerms',
2628
+ 'country_code',
2629
+ 'submitBtnClass',
2630
+ 'fields',
2631
+ 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission',
2632
+ 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback',
2633
+ 'failedCallback', 'labels', 'editors',
2634
+ 'datePickers',
2635
+ 'textAreas',
2636
+ 'files',
2637
+ 'phones',
2638
+ 'numbers',
2639
+ 'customComponent','modalTitle','class'],
2640
+ setup(__props) {
2641
+
2642
+ const props = __props;
2643
+
2644
+
2645
+
2646
+ ref(props);
2647
+ let btnClass=props.class;
2648
+ const modalId = 'rand' + (Math.random() + 1).toString(36).substring(2);
2649
+
2650
+
2651
+ return (_ctx, _cache) => {
2652
+ return (openBlock(), createElementBlock(Fragment, null, [
2653
+ createElementVNode("a", {
2654
+ class: normalizeClass(unref(btnClass)),
2655
+ href: '#' + modalId,
2656
+ "data-bs-toggle": "modal"
2657
+ }, [
2658
+ renderSlot(_ctx.$slots, "default")
2659
+ ], 10 /* CLASS, PROPS */, _hoisted_1$8),
2660
+ createVNode(script$9, {
2661
+ "modal-id": modalId,
2662
+ "modal-title": __props.modalTitle
2663
+ }, {
2664
+ default: withCtx(() => [
2665
+ createVNode(script$b, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
2666
+ ]),
2667
+ _: 1 /* STABLE */
2668
+ }, 8 /* PROPS */, ["modal-title"])
2669
+ ], 64 /* STABLE_FRAGMENT */))
2670
+ }
2671
+ }
2672
+
2673
+ };
2674
+
2675
+ script$8.__file = "src/lib/components/ShModalForm.vue";
2676
+
2677
+ var script$7 = {
2510
2678
  name: 'ShCanvas',
2511
2679
  props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
2512
2680
  components: {
@@ -2523,15 +2691,15 @@ var script$8 = {
2523
2691
  }
2524
2692
  };
2525
2693
 
2526
- const _hoisted_1$8 = ["id"];
2527
- const _hoisted_2$8 = { class: "offcanvas-header" };
2528
- const _hoisted_3$8 = {
2694
+ const _hoisted_1$7 = ["id"];
2695
+ const _hoisted_2$7 = { class: "offcanvas-header" };
2696
+ const _hoisted_3$7 = {
2529
2697
  class: "offcanvas-title",
2530
2698
  id: "offcanvasScrollingLabel"
2531
2699
  };
2532
- const _hoisted_4$8 = { class: "offcanvas-body" };
2700
+ const _hoisted_4$7 = { class: "offcanvas-body" };
2533
2701
 
2534
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2702
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2535
2703
  return (openBlock(), createElementBlock("div", {
2536
2704
  class: normalizeClass(["offcanvas", $data.side +' '+ $props.canvasSize + '']),
2537
2705
  "data-bs-scroll": "true",
@@ -2539,8 +2707,8 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2539
2707
  id: $props.canvasId,
2540
2708
  "aria-labelledby": "offcanvasScrollingLabel"
2541
2709
  }, [
2542
- createElementVNode("div", _hoisted_2$8, [
2543
- createElementVNode("h5", _hoisted_3$8, toDisplayString($props.canvasTitle), 1 /* TEXT */),
2710
+ createElementVNode("div", _hoisted_2$7, [
2711
+ createElementVNode("h5", _hoisted_3$7, toDisplayString($props.canvasTitle), 1 /* TEXT */),
2544
2712
  createElementVNode("button", {
2545
2713
  type: "button",
2546
2714
  ref: "closecanvas",
@@ -2550,60 +2718,14 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2550
2718
  "aria-label": "Close"
2551
2719
  }, null, 512 /* NEED_PATCH */)
2552
2720
  ]),
2553
- createElementVNode("div", _hoisted_4$8, [
2721
+ createElementVNode("div", _hoisted_4$7, [
2554
2722
  renderSlot(_ctx.$slots, "default")
2555
2723
  ])
2556
- ], 10 /* CLASS, PROPS */, _hoisted_1$8))
2557
- }
2558
-
2559
- script$8.render = render$4;
2560
- script$8.__file = "src/lib/components/ShCanvas.vue";
2561
-
2562
- var script$7 = {
2563
- name: 'ShModal',
2564
- props: ['modalTitle', 'modalId', 'modalSize'],
2565
- components: {
2566
- }
2567
- };
2568
-
2569
- const _hoisted_1$7 = ["id"];
2570
- const _hoisted_2$7 = { class: "modal-content" };
2571
- const _hoisted_3$7 = { class: "modal-header" };
2572
- const _hoisted_4$7 = { class: "modal-title" };
2573
- const _hoisted_5$4 = /*#__PURE__*/createElementVNode("button", {
2574
- class: "btn btn-danger btn-sm",
2575
- "data-bs-dismiss": "modal",
2576
- "data-dismiss": "modal"
2577
- }, "×", -1 /* HOISTED */);
2578
- const _hoisted_6$3 = { class: "modal-body" };
2579
- const _hoisted_7$2 = { class: "section" };
2580
-
2581
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2582
- return (openBlock(), createElementBlock("div", {
2583
- class: "modal fade",
2584
- id: $props.modalId,
2585
- "aria-hidden": "true"
2586
- }, [
2587
- createElementVNode("div", {
2588
- class: normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
2589
- }, [
2590
- createElementVNode("div", _hoisted_2$7, [
2591
- createElementVNode("div", _hoisted_3$7, [
2592
- createElementVNode("h3", _hoisted_4$7, toDisplayString($props.modalTitle), 1 /* TEXT */),
2593
- _hoisted_5$4
2594
- ]),
2595
- createElementVNode("div", _hoisted_6$3, [
2596
- createElementVNode("div", _hoisted_7$2, [
2597
- renderSlot(_ctx.$slots, "default")
2598
- ])
2599
- ])
2600
- ])
2601
- ], 2 /* CLASS */)
2602
- ], 8 /* PROPS */, _hoisted_1$7))
2724
+ ], 10 /* CLASS, PROPS */, _hoisted_1$7))
2603
2725
  }
2604
2726
 
2605
2727
  script$7.render = render$3;
2606
- script$7.__file = "src/lib/components/ShModal.vue";
2728
+ script$7.__file = "src/lib/components/ShCanvas.vue";
2607
2729
 
2608
2730
  var script$6 = {
2609
2731
  name: 'Pagination',
@@ -3185,7 +3307,7 @@ var script$5 = {
3185
3307
  this.reloadData();
3186
3308
  },
3187
3309
  components: {
3188
- ShCanvas: script$8,
3310
+ ShCanvas: script$7,
3189
3311
  pagination: script$6
3190
3312
  },
3191
3313
  computed: {
@@ -4135,12 +4257,12 @@ return (_ctx, _cache) => {
4135
4257
  ]
4136
4258
  }
4137
4259
  }),
4138
- createVNode(script$7, {
4260
+ createVNode(script$9, {
4139
4261
  "modal-id": "sh-department_modal",
4140
4262
  "modal-title": "Department Form"
4141
4263
  }, {
4142
4264
  default: withCtx(() => [
4143
- createVNode(script$9, {
4265
+ createVNode(script$b, {
4144
4266
  "success-callback": "departmentAdded",
4145
4267
  onDepartmentAdded: departmentAdded,
4146
4268
  action: "admin/departments/store",
@@ -4294,12 +4416,12 @@ return (_ctx, _cache) => {
4294
4416
  headers: ['id',showModule,'created_at'],
4295
4417
  "end-point": 'admin/departments/department/list-modules/' + id.value
4296
4418
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
4297
- createVNode(script$7, {
4419
+ createVNode(script$9, {
4298
4420
  "modal-id": "addModule",
4299
4421
  "modal-title": "Add Module Department"
4300
4422
  }, {
4301
4423
  default: withCtx(() => [
4302
- createVNode(script$9, {
4424
+ createVNode(script$b, {
4303
4425
  "reload-select-items": unref(reload),
4304
4426
  "success-callback": moduleAdded,
4305
4427
  "fill-selects": {
@@ -4321,7 +4443,7 @@ return (_ctx, _cache) => {
4321
4443
  ref: permissionCanvasBtn,
4322
4444
  "data-bs-toggle": "offcanvas"
4323
4445
  }, null, 512 /* NEED_PATCH */),
4324
- createVNode(script$8, {
4446
+ createVNode(script$7, {
4325
4447
  "canvas-id": "permissionsCanvas",
4326
4448
  position: "end enlarged",
4327
4449
  "canvas-title": "Module Permissions"
@@ -4436,7 +4558,7 @@ return (_ctx, _cache) => {
4436
4558
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4437
4559
  (section.value === 'login')
4438
4560
  ? (openBlock(), createElementBlock("div", _hoisted_2, [
4439
- createVNode(script$9, {
4561
+ createVNode(script$b, {
4440
4562
  class: "sh-login-form",
4441
4563
  fields: ['email','password'],
4442
4564
  "action-label": "Login",
@@ -4461,7 +4583,7 @@ return (_ctx, _cache) => {
4461
4583
  (unref(registerSubTitle))
4462
4584
  ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
4463
4585
  : createCommentVNode("v-if", true),
4464
- createVNode(script$9, {
4586
+ createVNode(script$b, {
4465
4587
  class: "sh-login-form",
4466
4588
  fields: unref(registrationFields),
4467
4589
  "action-label": "Sign Up",
@@ -4525,4 +4647,4 @@ const ShFrontend = {
4525
4647
  }
4526
4648
  };
4527
4649
 
4528
- export { script$8 as ShCanvas, script$3 as ShDynamicTabs, script$9 as ShForm, ShFrontend, script$7 as ShModal, script$c as ShPhone, script$5 as ShTable, script$4 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
4650
+ export { script$7 as ShCanvas, script$a as ShDropDownForm, script$3 as ShDynamicTabs, script$b as ShForm, ShFrontend, script$9 as ShModal, script$8 as ShModalForm, script$e as ShPhone, script$5 as ShTable, script$4 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };