@iankibetsh/shframework 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/library.js CHANGED
@@ -1633,7 +1633,7 @@ const countries = [
1633
1633
  }
1634
1634
  ];
1635
1635
 
1636
- var script$8 = {
1636
+ var script$9 = {
1637
1637
  name: 'ShPhone',
1638
1638
  props: ['modelValue', 'country_code'],
1639
1639
  data () {
@@ -1695,19 +1695,19 @@ var script$8 = {
1695
1695
  }
1696
1696
  };
1697
1697
 
1698
- const _hoisted_1$8 = { class: "sh-phone mb-3" };
1699
- const _hoisted_2$7 = {
1698
+ const _hoisted_1$9 = { class: "sh-phone mb-3" };
1699
+ const _hoisted_2$8 = {
1700
1700
  key: 0,
1701
1701
  style: {"display":"contents"}
1702
1702
  };
1703
- const _hoisted_3$7 = ["src"];
1704
- const _hoisted_4$7 = ["value"];
1703
+ const _hoisted_3$8 = ["src"];
1704
+ const _hoisted_4$8 = ["value"];
1705
1705
 
1706
1706
  function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1707
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
1707
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
1708
1708
  ($data.selectedCountry)
1709
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
1710
- vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$7),
1709
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
1710
+ vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$8),
1711
1711
  vue.createTextVNode(" " + vue.toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
1712
1712
  ]))
1713
1713
  : vue.createCommentVNode("v-if", true),
@@ -1720,7 +1720,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1720
1720
  return (vue.openBlock(), vue.createElementBlock("option", {
1721
1721
  value: country,
1722
1722
  key: country.dialCode
1723
- }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$7))
1723
+ }, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$8))
1724
1724
  }), 128 /* KEYED_FRAGMENT */))
1725
1725
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
1726
1726
  [vue.vModelSelect, $data.selectedCountry]
@@ -1738,10 +1738,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1738
1738
  ]))
1739
1739
  }
1740
1740
 
1741
- script$8.render = render$7;
1742
- script$8.__file = "src/lib/components/ShPhone.vue";
1741
+ script$9.render = render$7;
1742
+ script$9.__file = "src/lib/components/ShPhone.vue";
1743
1743
 
1744
- var script$7 = {
1744
+ var script$8 = {
1745
1745
  name: 'ShEditor',
1746
1746
  props: ['modelValue'],
1747
1747
  components: {
@@ -1780,7 +1780,7 @@ var script$7 = {
1780
1780
  }
1781
1781
  };
1782
1782
 
1783
- const _hoisted_1$7 = /*#__PURE__*/vue.createElementVNode("textarea", {
1783
+ const _hoisted_1$8 = /*#__PURE__*/vue.createElementVNode("textarea", {
1784
1784
  id: "tiny",
1785
1785
  style: {"display":"none"},
1786
1786
  "data-cy": "tinymce_editor"
@@ -1790,7 +1790,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1790
1790
  const _component_editor = vue.resolveComponent("editor");
1791
1791
 
1792
1792
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
1793
- _hoisted_1$7,
1793
+ _hoisted_1$8,
1794
1794
  vue.createElementVNode("div", {
1795
1795
  onFocusin: _cache[1] || (_cache[1] = vue.withModifiers(() => {}, ["stop"])),
1796
1796
  class: "sh-editor w-100"
@@ -1815,16 +1815,16 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1815
1815
  ], 64 /* STABLE_FRAGMENT */))
1816
1816
  }
1817
1817
 
1818
- script$7.render = render$6;
1819
- script$7.__file = "src/lib/components/FormComponent/ShEditor.vue";
1818
+ script$8.render = render$6;
1819
+ script$8.__file = "src/lib/components/FormComponent/ShEditor.vue";
1820
1820
 
1821
- const _hoisted_1$6 = {
1821
+ const _hoisted_1$7 = {
1822
1822
  key: 0,
1823
1823
  class: "dropdown sh-suggest"
1824
1824
  };
1825
- const _hoisted_2$6 = ["id"];
1826
- const _hoisted_3$6 = { class: "badge bg-secondary m-1 sh-selected-item" };
1827
- const _hoisted_4$6 = ["onClick"];
1825
+ const _hoisted_2$7 = ["id"];
1826
+ const _hoisted_3$7 = { class: "badge bg-secondary m-1 sh-selected-item" };
1827
+ const _hoisted_4$7 = ["onClick"];
1828
1828
  const _hoisted_5$5 = ["id"];
1829
1829
  const _hoisted_6$3 = ["id", "aria-labelledby"];
1830
1830
  const _hoisted_7$3 = { key: 0 };
@@ -1839,7 +1839,7 @@ const _hoisted_10$3 = {
1839
1839
  };
1840
1840
 
1841
1841
 
1842
- var script$6 = {
1842
+ var script$7 = {
1843
1843
  __name: 'ShSuggest',
1844
1844
  props: ['fillSelects','modelValue'],
1845
1845
  emits: ['update:modelValue'],
@@ -1920,7 +1920,7 @@ function filterData(e){
1920
1920
 
1921
1921
  return (_ctx, _cache) => {
1922
1922
  return (vue.unref(id))
1923
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
1923
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
1924
1924
  vue.createElementVNode("div", {
1925
1925
  id: vue.unref(id),
1926
1926
  "data-bs-toggle": "dropdown",
@@ -1929,14 +1929,14 @@ return (_ctx, _cache) => {
1929
1929
  }, [
1930
1930
  vue.createElementVNode("div", null, [
1931
1931
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(selectedSuggestions), (sgt) => {
1932
- return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$6, [
1932
+ return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$7, [
1933
1933
  vue.createTextVNode(vue.toDisplayString(sgt.name) + " ", 1 /* TEXT */),
1934
1934
  vue.createElementVNode("button", {
1935
1935
  onClick: $event => (removeSuggestion(sgt.id)),
1936
1936
  type: "button",
1937
1937
  class: "btn-close border-start border-1 ms-1",
1938
1938
  "aria-label": "Close"
1939
- }, null, 8 /* PROPS */, _hoisted_4$6)
1939
+ }, null, 8 /* PROPS */, _hoisted_4$7)
1940
1940
  ]))
1941
1941
  }), 256 /* UNKEYED_FRAGMENT */))
1942
1942
  ]),
@@ -1946,7 +1946,7 @@ return (_ctx, _cache) => {
1946
1946
  onInput: filterData,
1947
1947
  class: "flex-fill h-100 sh-suggestion-input"
1948
1948
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$5)
1949
- ], 8 /* PROPS */, _hoisted_2$6),
1949
+ ], 8 /* PROPS */, _hoisted_2$7),
1950
1950
  vue.createElementVNode("ul", {
1951
1951
  class: "dropdown-menu w-100",
1952
1952
  id: 'dropwdown_section' + vue.unref(id),
@@ -1979,15 +1979,15 @@ return (_ctx, _cache) => {
1979
1979
 
1980
1980
  };
1981
1981
 
1982
- script$6.__scopeId = "data-v-5b767123";
1983
- script$6.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1982
+ script$7.__scopeId = "data-v-5b767123";
1983
+ script$7.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1984
1984
 
1985
- var script$5 = {
1985
+ var script$6 = {
1986
1986
  name: 'ShForm',
1987
1987
  components: {
1988
- ShSuggest: script$6,
1989
- ShEditor: script$7,
1990
- ShPhone: script$8
1988
+ ShSuggest: script$7,
1989
+ ShEditor: script$8,
1990
+ ShPhone: script$9
1991
1991
  },
1992
1992
  props: [
1993
1993
  'action',
@@ -2301,17 +2301,17 @@ var script$5 = {
2301
2301
  }
2302
2302
  };
2303
2303
 
2304
- const _hoisted_1$5 = {
2304
+ const _hoisted_1$6 = {
2305
2305
  ref: "ShAutoForm",
2306
2306
  class: "sh-form"
2307
2307
  };
2308
- const _hoisted_2$5 = {
2308
+ const _hoisted_2$6 = {
2309
2309
  key: 0,
2310
2310
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2311
2311
  role: "alert"
2312
2312
  };
2313
- const _hoisted_3$5 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2314
- const _hoisted_4$5 = { key: 0 };
2313
+ const _hoisted_3$6 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2314
+ const _hoisted_4$6 = { key: 0 };
2315
2315
  const _hoisted_5$4 = { key: 1 };
2316
2316
  const _hoisted_6$2 = { class: "row" };
2317
2317
  const _hoisted_7$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2366,14 +2366,14 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2366
2366
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2367
2367
  const _component_ShEditor = vue.resolveComponent("ShEditor");
2368
2368
 
2369
- return (vue.openBlock(), vue.createElementBlock("form", _hoisted_1$5, [
2369
+ return (vue.openBlock(), vue.createElementBlock("form", _hoisted_1$6, [
2370
2370
  vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2371
2371
  vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2372
2372
  (_ctx.form_status == 3)
2373
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
2374
- _hoisted_3$5,
2373
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
2374
+ _hoisted_3$6,
2375
2375
  (_ctx.errorText)
2376
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$5, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2376
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$6, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2377
2377
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$4, "Unexpected Error Occurred")),
2378
2378
  vue.createElementVNode("button", {
2379
2379
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.hideError && $options.hideError(...args))),
@@ -2571,10 +2571,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2571
2571
  ], 512 /* NEED_PATCH */))
2572
2572
  }
2573
2573
 
2574
- script$5.render = render$5;
2575
- script$5.__file = "src/lib/components/ShForm.vue";
2574
+ script$6.render = render$5;
2575
+ script$6.__file = "src/lib/components/ShForm.vue";
2576
2576
 
2577
- var script$4 = {
2577
+ var script$5 = {
2578
2578
  name: 'ShCanvas',
2579
2579
  props: ['canvasTitle', 'canvasId', 'position'],
2580
2580
  components: {
@@ -2591,13 +2591,13 @@ var script$4 = {
2591
2591
  }
2592
2592
  };
2593
2593
 
2594
- const _hoisted_1$4 = ["id"];
2595
- const _hoisted_2$4 = { class: "offcanvas-header" };
2596
- const _hoisted_3$4 = {
2594
+ const _hoisted_1$5 = ["id"];
2595
+ const _hoisted_2$5 = { class: "offcanvas-header" };
2596
+ const _hoisted_3$5 = {
2597
2597
  class: "offcanvas-title",
2598
2598
  id: "offcanvasScrollingLabel"
2599
2599
  };
2600
- const _hoisted_4$4 = { class: "offcanvas-body" };
2600
+ const _hoisted_4$5 = { class: "offcanvas-body" };
2601
2601
 
2602
2602
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2603
2603
  return (vue.openBlock(), vue.createElementBlock("div", {
@@ -2607,8 +2607,8 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2607
2607
  id: $props.canvasId,
2608
2608
  "aria-labelledby": "offcanvasScrollingLabel"
2609
2609
  }, [
2610
- vue.createElementVNode("div", _hoisted_2$4, [
2611
- vue.createElementVNode("h5", _hoisted_3$4, vue.toDisplayString($props.canvasTitle), 1 /* TEXT */),
2610
+ vue.createElementVNode("div", _hoisted_2$5, [
2611
+ vue.createElementVNode("h5", _hoisted_3$5, vue.toDisplayString($props.canvasTitle), 1 /* TEXT */),
2612
2612
  vue.createElementVNode("button", {
2613
2613
  type: "button",
2614
2614
  ref: "closecanvas",
@@ -2618,26 +2618,26 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2618
2618
  "aria-label": "Close"
2619
2619
  }, null, 512 /* NEED_PATCH */)
2620
2620
  ]),
2621
- vue.createElementVNode("div", _hoisted_4$4, [
2621
+ vue.createElementVNode("div", _hoisted_4$5, [
2622
2622
  vue.renderSlot(_ctx.$slots, "default")
2623
2623
  ])
2624
- ], 10 /* CLASS, PROPS */, _hoisted_1$4))
2624
+ ], 10 /* CLASS, PROPS */, _hoisted_1$5))
2625
2625
  }
2626
2626
 
2627
- script$4.render = render$4;
2628
- script$4.__file = "src/lib/components/ShCanvas.vue";
2627
+ script$5.render = render$4;
2628
+ script$5.__file = "src/lib/components/ShCanvas.vue";
2629
2629
 
2630
- var script$3 = {
2630
+ var script$4 = {
2631
2631
  name: 'ShModal',
2632
2632
  props: ['modalTitle', 'modalId', 'modalSize'],
2633
2633
  components: {
2634
2634
  }
2635
2635
  };
2636
2636
 
2637
- const _hoisted_1$3 = ["id"];
2638
- const _hoisted_2$3 = { class: "modal-content" };
2639
- const _hoisted_3$3 = { class: "modal-header" };
2640
- const _hoisted_4$3 = { class: "modal-title" };
2637
+ const _hoisted_1$4 = ["id"];
2638
+ const _hoisted_2$4 = { class: "modal-content" };
2639
+ const _hoisted_3$4 = { class: "modal-header" };
2640
+ const _hoisted_4$4 = { class: "modal-title" };
2641
2641
  const _hoisted_5$3 = /*#__PURE__*/vue.createElementVNode("button", {
2642
2642
  class: "btn btn-danger btn-sm",
2643
2643
  "data-bs-dismiss": "modal",
@@ -2657,9 +2657,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2657
2657
  vue.createElementVNode("div", {
2658
2658
  class: vue.normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
2659
2659
  }, [
2660
- vue.createElementVNode("div", _hoisted_2$3, [
2661
- vue.createElementVNode("div", _hoisted_3$3, [
2662
- vue.createElementVNode("h3", _hoisted_4$3, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
2660
+ vue.createElementVNode("div", _hoisted_2$4, [
2661
+ vue.createElementVNode("div", _hoisted_3$4, [
2662
+ vue.createElementVNode("h3", _hoisted_4$4, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
2663
2663
  _hoisted_5$3
2664
2664
  ]),
2665
2665
  vue.createElementVNode("div", _hoisted_6$1, [
@@ -2669,13 +2669,13 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2669
2669
  ])
2670
2670
  ])
2671
2671
  ], 2 /* CLASS */)
2672
- ], 8 /* PROPS */, _hoisted_1$3))
2672
+ ], 8 /* PROPS */, _hoisted_1$4))
2673
2673
  }
2674
2674
 
2675
- script$3.render = render$3;
2676
- script$3.__file = "src/lib/components/ShModal.vue";
2675
+ script$4.render = render$3;
2676
+ script$4.__file = "src/lib/components/ShModal.vue";
2677
2677
 
2678
- var script$2 = {
2678
+ var script$3 = {
2679
2679
  name: 'Pagination',
2680
2680
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
2681
2681
  data () {
@@ -2746,10 +2746,10 @@ var script$2 = {
2746
2746
  }
2747
2747
  };
2748
2748
 
2749
- const _hoisted_1$2 = { key: 0 };
2750
- const _hoisted_2$2 = { class: "record_count_body mb-3" };
2751
- const _hoisted_3$2 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
2752
- const _hoisted_4$2 = /*#__PURE__*/vue.createTextVNode("  ");
2749
+ const _hoisted_1$3 = { key: 0 };
2750
+ const _hoisted_2$3 = { class: "record_count_body mb-3" };
2751
+ const _hoisted_3$3 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
2752
+ const _hoisted_4$3 = /*#__PURE__*/vue.createTextVNode("  ");
2753
2753
  const _hoisted_5$2 = /*#__PURE__*/vue.createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
2754
2754
  const _hoisted_10$1 = [
2755
2755
  _hoisted_5$2
@@ -2793,10 +2793,10 @@ const _hoisted_23$1 = {
2793
2793
 
2794
2794
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2795
2795
  return (!$props.loadMore)
2796
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
2797
- vue.createElementVNode("div", _hoisted_2$2, [
2798
- _hoisted_3$2,
2799
- _hoisted_4$2,
2796
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
2797
+ vue.createElementVNode("div", _hoisted_2$3, [
2798
+ _hoisted_3$3,
2799
+ _hoisted_4$3,
2800
2800
  vue.withDirectives(vue.createElementVNode("select", {
2801
2801
  class: "select_per_page",
2802
2802
  onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
@@ -2865,8 +2865,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2865
2865
  ]))
2866
2866
  }
2867
2867
 
2868
- script$2.render = render$2;
2869
- script$2.__file = "src/lib/components/list_templates/Pagination.vue";
2868
+ script$3.render = render$2;
2869
+ script$3.__file = "src/lib/components/list_templates/Pagination.vue";
2870
2870
 
2871
2871
  function swalSuccess (message) {
2872
2872
  Swal__default["default"].fire('Success!', message, 'success');
@@ -3040,7 +3040,7 @@ var helpers = {
3040
3040
  formatDate
3041
3041
  };
3042
3042
 
3043
- var script$1 = {
3043
+ var script$2 = {
3044
3044
  name: 'sh-table',
3045
3045
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover'],
3046
3046
  inject: ['channel', 'global'],
@@ -3239,7 +3239,7 @@ var script$1 = {
3239
3239
  this.reloadData();
3240
3240
  },
3241
3241
  components: {
3242
- pagination: script$2
3242
+ pagination: script$3
3243
3243
  },
3244
3244
  computed: {
3245
3245
  windowWidth: function () {
@@ -3257,13 +3257,13 @@ var script$1 = {
3257
3257
  }
3258
3258
  };
3259
3259
 
3260
- const _hoisted_1$1 = { class: "auto-table" };
3261
- const _hoisted_2$1 = {
3260
+ const _hoisted_1$2 = { class: "auto-table" };
3261
+ const _hoisted_2$2 = {
3262
3262
  key: 0,
3263
3263
  class: "col-md-4 mb-2"
3264
3264
  };
3265
- const _hoisted_3$1 = ["disabled"];
3266
- const _hoisted_4$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3265
+ const _hoisted_3$2 = ["disabled"];
3266
+ const _hoisted_4$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3267
3267
  const _hoisted_5$1 = /*#__PURE__*/vue.createTextVNode(" Export ");
3268
3268
  const _hoisted_6 = /*#__PURE__*/vue.createElementVNode("span", {
3269
3269
  class: "spinner-border spinner-border-sm",
@@ -3420,9 +3420,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3420
3420
  const _component_router_link = vue.resolveComponent("router-link");
3421
3421
  const _component_pagination = vue.resolveComponent("pagination");
3422
3422
 
3423
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
3423
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
3424
3424
  ($props.hasDownload)
3425
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
3425
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
3426
3426
  vue.createElementVNode("button", {
3427
3427
  disabled: $data.downloading,
3428
3428
  class: "btn btn-warning btn-sm",
@@ -3430,14 +3430,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3430
3430
  }, [
3431
3431
  (!$data.downloading)
3432
3432
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3433
- _hoisted_4$1,
3433
+ _hoisted_4$2,
3434
3434
  _hoisted_5$1
3435
3435
  ], 64 /* STABLE_FRAGMENT */))
3436
3436
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3437
3437
  _hoisted_6,
3438
3438
  _hoisted_7
3439
3439
  ], 64 /* STABLE_FRAGMENT */))
3440
- ], 8 /* PROPS */, _hoisted_3$1)
3440
+ ], 8 /* PROPS */, _hoisted_3$2)
3441
3441
  ]))
3442
3442
  : vue.createCommentVNode("v-if", true),
3443
3443
  (!$props.hideSearch)
@@ -3746,10 +3746,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3746
3746
  ]))
3747
3747
  }
3748
3748
 
3749
- script$1.render = render$1;
3750
- script$1.__file = "src/lib/components/ShTable.vue";
3749
+ script$2.render = render$1;
3750
+ script$2.__file = "src/lib/components/ShTable.vue";
3751
3751
 
3752
- var script = {
3752
+ var script$1 = {
3753
3753
  name: 'ShTabs',
3754
3754
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive'],
3755
3755
  data () {
@@ -3830,13 +3830,13 @@ var script = {
3830
3830
  }
3831
3831
  };
3832
3832
 
3833
- const _hoisted_1 = {
3833
+ const _hoisted_1$1 = {
3834
3834
  key: 0,
3835
3835
  class: "navbar navbar-expand-lg sh-horizontal-tabs"
3836
3836
  };
3837
- const _hoisted_2 = ["data-bs-target"];
3838
- const _hoisted_3 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3839
- const _hoisted_4 = ["id"];
3837
+ const _hoisted_2$1 = ["data-bs-target"];
3838
+ const _hoisted_3$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3839
+ const _hoisted_4$1 = ["id"];
3840
3840
  const _hoisted_5 = { class: "tab-content" };
3841
3841
 
3842
3842
  function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -3845,7 +3845,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3845
3845
 
3846
3846
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3847
3847
  ($data.generatedId)
3848
- ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_1, [
3848
+ ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_1$1, [
3849
3849
  ($data.isResponsive)
3850
3850
  ? (vue.openBlock(), vue.createElementBlock("a", {
3851
3851
  key: 0,
@@ -3858,8 +3858,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3858
3858
  "aria-label": "Toggle navigation"
3859
3859
  }, [
3860
3860
  vue.createTextVNode(vue.toDisplayString($data.currentTab) + " ", 1 /* TEXT */),
3861
- _hoisted_3
3862
- ], 8 /* PROPS */, _hoisted_2))
3861
+ _hoisted_3$1
3862
+ ], 8 /* PROPS */, _hoisted_2$1))
3863
3863
  : vue.createCommentVNode("v-if", true),
3864
3864
  vue.createElementVNode("div", {
3865
3865
  class: vue.normalizeClass($data.isResponsive ? 'collapse navbar-collapse':''),
@@ -3888,7 +3888,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3888
3888
  ]))
3889
3889
  }), 128 /* KEYED_FRAGMENT */))
3890
3890
  ], 2 /* CLASS */)
3891
- ], 10 /* CLASS, PROPS */, _hoisted_4)
3891
+ ], 10 /* CLASS, PROPS */, _hoisted_4$1)
3892
3892
  ]))
3893
3893
  : vue.createCommentVNode("v-if", true),
3894
3894
  vue.createElementVNode("div", _hoisted_5, [
@@ -3901,15 +3901,75 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3901
3901
  ], 64 /* STABLE_FRAGMENT */))
3902
3902
  }
3903
3903
 
3904
- script.render = render;
3905
- script.__file = "src/lib/components/ShTabs.vue";
3904
+ script$1.render = render;
3905
+ script$1.__file = "src/lib/components/ShTabs.vue";
3906
+
3907
+ const _hoisted_1 = {
3908
+ class: "nav nav-tabs",
3909
+ role: "tablist"
3910
+ };
3911
+ const _hoisted_2 = {
3912
+ class: "nav-item",
3913
+ role: "presentation"
3914
+ };
3915
+ const _hoisted_3 = ["onClick"];
3916
+ const _hoisted_4 = { class: "tab-content" };
3917
+
3918
+ var script = {
3919
+ __name: 'ShDynamicTabs',
3920
+ props: ['tabs'],
3921
+ setup(__props) {
3922
+
3923
+ const props = __props;
3924
+
3925
+
3926
+ const tabs = props.tabs;
3927
+ let currentTab = vue.shallowRef(null);
3928
+ const generatedId = vue.ref(null);
3929
+ vue.ref(null);
3930
+ vue.onMounted(()=>{
3931
+ generatedId.value = 'tab' + Math.random().toString(36).slice(2);
3932
+ if(tabs.length > 0) {
3933
+ currentTab.value = tabs[0];
3934
+ }
3935
+ });
3936
+
3937
+ function setTab(tab){
3938
+ currentTab.value = tab;
3939
+ }
3940
+
3941
+ return (_ctx, _cache) => {
3942
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3943
+ vue.createElementVNode("ul", _hoisted_1, [
3944
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tabs), (tab) => {
3945
+ return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2, [
3946
+ vue.createElementVNode("button", {
3947
+ onClick: $event => (setTab(tab)),
3948
+ class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
3949
+ }, vue.toDisplayString(tab.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_3)
3950
+ ]))
3951
+ }), 256 /* UNKEYED_FRAGMENT */))
3952
+ ]),
3953
+ vue.createElementVNode("div", _hoisted_4, [
3954
+ (vue.unref(currentTab))
3955
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentTab).component), { key: 0 }))
3956
+ : vue.createCommentVNode("v-if", true)
3957
+ ])
3958
+ ], 64 /* STABLE_FRAGMENT */))
3959
+ }
3960
+ }
3961
+
3962
+ };
3963
+
3964
+ script.__file = "src/lib/components/ShDynamicTabs.vue";
3906
3965
 
3907
- exports.ShCanvas = script$4;
3908
- exports.ShForm = script$5;
3909
- exports.ShModal = script$3;
3910
- exports.ShPhone = script$8;
3911
- exports.ShTable = script$1;
3912
- exports.ShTabs = script;
3966
+ exports.ShCanvas = script$5;
3967
+ exports.ShDynamicTabs = script;
3968
+ exports.ShForm = script$6;
3969
+ exports.ShModal = script$4;
3970
+ exports.ShPhone = script$9;
3971
+ exports.ShTable = script$2;
3972
+ exports.ShTabs = script$1;
3913
3973
  exports.shApis = apis;
3914
3974
  exports.shRepo = helpers;
3915
3975
  exports.shStorage = shstorage;
package/dist/library.mjs CHANGED
@@ -2,7 +2,7 @@ import Axios from 'axios';
2
2
  import { defineStore } from 'pinia';
3
3
  import moment from 'moment';
4
4
  import NProgress from 'nprogress';
5
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx } from 'vue';
5
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx, shallowRef, resolveDynamicComponent } from 'vue';
6
6
  import Editor from '@tinymce/tinymce-vue';
7
7
  import Swal from 'sweetalert2';
8
8
 
@@ -1621,7 +1621,7 @@ const countries = [
1621
1621
  }
1622
1622
  ];
1623
1623
 
1624
- var script$8 = {
1624
+ var script$9 = {
1625
1625
  name: 'ShPhone',
1626
1626
  props: ['modelValue', 'country_code'],
1627
1627
  data () {
@@ -1683,19 +1683,19 @@ var script$8 = {
1683
1683
  }
1684
1684
  };
1685
1685
 
1686
- const _hoisted_1$8 = { class: "sh-phone mb-3" };
1687
- const _hoisted_2$7 = {
1686
+ const _hoisted_1$9 = { class: "sh-phone mb-3" };
1687
+ const _hoisted_2$8 = {
1688
1688
  key: 0,
1689
1689
  style: {"display":"contents"}
1690
1690
  };
1691
- const _hoisted_3$7 = ["src"];
1692
- const _hoisted_4$7 = ["value"];
1691
+ const _hoisted_3$8 = ["src"];
1692
+ const _hoisted_4$8 = ["value"];
1693
1693
 
1694
1694
  function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1695
- return (openBlock(), createElementBlock("div", _hoisted_1$8, [
1695
+ return (openBlock(), createElementBlock("div", _hoisted_1$9, [
1696
1696
  ($data.selectedCountry)
1697
- ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
1698
- createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$7),
1697
+ ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
1698
+ createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$8),
1699
1699
  createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
1700
1700
  ]))
1701
1701
  : createCommentVNode("v-if", true),
@@ -1708,7 +1708,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1708
1708
  return (openBlock(), createElementBlock("option", {
1709
1709
  value: country,
1710
1710
  key: country.dialCode
1711
- }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$7))
1711
+ }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$8))
1712
1712
  }), 128 /* KEYED_FRAGMENT */))
1713
1713
  ], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
1714
1714
  [vModelSelect, $data.selectedCountry]
@@ -1726,10 +1726,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
1726
1726
  ]))
1727
1727
  }
1728
1728
 
1729
- script$8.render = render$7;
1730
- script$8.__file = "src/lib/components/ShPhone.vue";
1729
+ script$9.render = render$7;
1730
+ script$9.__file = "src/lib/components/ShPhone.vue";
1731
1731
 
1732
- var script$7 = {
1732
+ var script$8 = {
1733
1733
  name: 'ShEditor',
1734
1734
  props: ['modelValue'],
1735
1735
  components: {
@@ -1768,7 +1768,7 @@ var script$7 = {
1768
1768
  }
1769
1769
  };
1770
1770
 
1771
- const _hoisted_1$7 = /*#__PURE__*/createElementVNode("textarea", {
1771
+ const _hoisted_1$8 = /*#__PURE__*/createElementVNode("textarea", {
1772
1772
  id: "tiny",
1773
1773
  style: {"display":"none"},
1774
1774
  "data-cy": "tinymce_editor"
@@ -1778,7 +1778,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1778
1778
  const _component_editor = resolveComponent("editor");
1779
1779
 
1780
1780
  return (openBlock(), createElementBlock(Fragment, null, [
1781
- _hoisted_1$7,
1781
+ _hoisted_1$8,
1782
1782
  createElementVNode("div", {
1783
1783
  onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
1784
1784
  class: "sh-editor w-100"
@@ -1803,16 +1803,16 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
1803
1803
  ], 64 /* STABLE_FRAGMENT */))
1804
1804
  }
1805
1805
 
1806
- script$7.render = render$6;
1807
- script$7.__file = "src/lib/components/FormComponent/ShEditor.vue";
1806
+ script$8.render = render$6;
1807
+ script$8.__file = "src/lib/components/FormComponent/ShEditor.vue";
1808
1808
 
1809
- const _hoisted_1$6 = {
1809
+ const _hoisted_1$7 = {
1810
1810
  key: 0,
1811
1811
  class: "dropdown sh-suggest"
1812
1812
  };
1813
- const _hoisted_2$6 = ["id"];
1814
- const _hoisted_3$6 = { class: "badge bg-secondary m-1 sh-selected-item" };
1815
- const _hoisted_4$6 = ["onClick"];
1813
+ const _hoisted_2$7 = ["id"];
1814
+ const _hoisted_3$7 = { class: "badge bg-secondary m-1 sh-selected-item" };
1815
+ const _hoisted_4$7 = ["onClick"];
1816
1816
  const _hoisted_5$5 = ["id"];
1817
1817
  const _hoisted_6$3 = ["id", "aria-labelledby"];
1818
1818
  const _hoisted_7$3 = { key: 0 };
@@ -1827,7 +1827,7 @@ const _hoisted_10$3 = {
1827
1827
  };
1828
1828
 
1829
1829
 
1830
- var script$6 = {
1830
+ var script$7 = {
1831
1831
  __name: 'ShSuggest',
1832
1832
  props: ['fillSelects','modelValue'],
1833
1833
  emits: ['update:modelValue'],
@@ -1908,7 +1908,7 @@ function filterData(e){
1908
1908
 
1909
1909
  return (_ctx, _cache) => {
1910
1910
  return (unref(id))
1911
- ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
1911
+ ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
1912
1912
  createElementVNode("div", {
1913
1913
  id: unref(id),
1914
1914
  "data-bs-toggle": "dropdown",
@@ -1917,14 +1917,14 @@ return (_ctx, _cache) => {
1917
1917
  }, [
1918
1918
  createElementVNode("div", null, [
1919
1919
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
1920
- return (openBlock(), createElementBlock("h5", _hoisted_3$6, [
1920
+ return (openBlock(), createElementBlock("h5", _hoisted_3$7, [
1921
1921
  createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
1922
1922
  createElementVNode("button", {
1923
1923
  onClick: $event => (removeSuggestion(sgt.id)),
1924
1924
  type: "button",
1925
1925
  class: "btn-close border-start border-1 ms-1",
1926
1926
  "aria-label": "Close"
1927
- }, null, 8 /* PROPS */, _hoisted_4$6)
1927
+ }, null, 8 /* PROPS */, _hoisted_4$7)
1928
1928
  ]))
1929
1929
  }), 256 /* UNKEYED_FRAGMENT */))
1930
1930
  ]),
@@ -1934,7 +1934,7 @@ return (_ctx, _cache) => {
1934
1934
  onInput: filterData,
1935
1935
  class: "flex-fill h-100 sh-suggestion-input"
1936
1936
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$5)
1937
- ], 8 /* PROPS */, _hoisted_2$6),
1937
+ ], 8 /* PROPS */, _hoisted_2$7),
1938
1938
  createElementVNode("ul", {
1939
1939
  class: "dropdown-menu w-100",
1940
1940
  id: 'dropwdown_section' + unref(id),
@@ -1967,15 +1967,15 @@ return (_ctx, _cache) => {
1967
1967
 
1968
1968
  };
1969
1969
 
1970
- script$6.__scopeId = "data-v-5b767123";
1971
- script$6.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1970
+ script$7.__scopeId = "data-v-5b767123";
1971
+ script$7.__file = "src/lib/components/FormComponent/ShSuggest.vue";
1972
1972
 
1973
- var script$5 = {
1973
+ var script$6 = {
1974
1974
  name: 'ShForm',
1975
1975
  components: {
1976
- ShSuggest: script$6,
1977
- ShEditor: script$7,
1978
- ShPhone: script$8
1976
+ ShSuggest: script$7,
1977
+ ShEditor: script$8,
1978
+ ShPhone: script$9
1979
1979
  },
1980
1980
  props: [
1981
1981
  'action',
@@ -2289,17 +2289,17 @@ var script$5 = {
2289
2289
  }
2290
2290
  };
2291
2291
 
2292
- const _hoisted_1$5 = {
2292
+ const _hoisted_1$6 = {
2293
2293
  ref: "ShAutoForm",
2294
2294
  class: "sh-form"
2295
2295
  };
2296
- const _hoisted_2$5 = {
2296
+ const _hoisted_2$6 = {
2297
2297
  key: 0,
2298
2298
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2299
2299
  role: "alert"
2300
2300
  };
2301
- const _hoisted_3$5 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2302
- const _hoisted_4$5 = { key: 0 };
2301
+ const _hoisted_3$6 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2302
+ const _hoisted_4$6 = { key: 0 };
2303
2303
  const _hoisted_5$4 = { key: 1 };
2304
2304
  const _hoisted_6$2 = { class: "row" };
2305
2305
  const _hoisted_7$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2354,14 +2354,14 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2354
2354
  const _component_ShSuggest = resolveComponent("ShSuggest");
2355
2355
  const _component_ShEditor = resolveComponent("ShEditor");
2356
2356
 
2357
- return (openBlock(), createElementBlock("form", _hoisted_1$5, [
2357
+ return (openBlock(), createElementBlock("form", _hoisted_1$6, [
2358
2358
  createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2359
2359
  createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2360
2360
  (_ctx.form_status == 3)
2361
- ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
2362
- _hoisted_3$5,
2361
+ ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
2362
+ _hoisted_3$6,
2363
2363
  (_ctx.errorText)
2364
- ? (openBlock(), createElementBlock("span", _hoisted_4$5, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2364
+ ? (openBlock(), createElementBlock("span", _hoisted_4$6, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2365
2365
  : (openBlock(), createElementBlock("span", _hoisted_5$4, "Unexpected Error Occurred")),
2366
2366
  createElementVNode("button", {
2367
2367
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.hideError && $options.hideError(...args))),
@@ -2559,10 +2559,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2559
2559
  ], 512 /* NEED_PATCH */))
2560
2560
  }
2561
2561
 
2562
- script$5.render = render$5;
2563
- script$5.__file = "src/lib/components/ShForm.vue";
2562
+ script$6.render = render$5;
2563
+ script$6.__file = "src/lib/components/ShForm.vue";
2564
2564
 
2565
- var script$4 = {
2565
+ var script$5 = {
2566
2566
  name: 'ShCanvas',
2567
2567
  props: ['canvasTitle', 'canvasId', 'position'],
2568
2568
  components: {
@@ -2579,13 +2579,13 @@ var script$4 = {
2579
2579
  }
2580
2580
  };
2581
2581
 
2582
- const _hoisted_1$4 = ["id"];
2583
- const _hoisted_2$4 = { class: "offcanvas-header" };
2584
- const _hoisted_3$4 = {
2582
+ const _hoisted_1$5 = ["id"];
2583
+ const _hoisted_2$5 = { class: "offcanvas-header" };
2584
+ const _hoisted_3$5 = {
2585
2585
  class: "offcanvas-title",
2586
2586
  id: "offcanvasScrollingLabel"
2587
2587
  };
2588
- const _hoisted_4$4 = { class: "offcanvas-body" };
2588
+ const _hoisted_4$5 = { class: "offcanvas-body" };
2589
2589
 
2590
2590
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2591
2591
  return (openBlock(), createElementBlock("div", {
@@ -2595,8 +2595,8 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2595
2595
  id: $props.canvasId,
2596
2596
  "aria-labelledby": "offcanvasScrollingLabel"
2597
2597
  }, [
2598
- createElementVNode("div", _hoisted_2$4, [
2599
- createElementVNode("h5", _hoisted_3$4, toDisplayString($props.canvasTitle), 1 /* TEXT */),
2598
+ createElementVNode("div", _hoisted_2$5, [
2599
+ createElementVNode("h5", _hoisted_3$5, toDisplayString($props.canvasTitle), 1 /* TEXT */),
2600
2600
  createElementVNode("button", {
2601
2601
  type: "button",
2602
2602
  ref: "closecanvas",
@@ -2606,26 +2606,26 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2606
2606
  "aria-label": "Close"
2607
2607
  }, null, 512 /* NEED_PATCH */)
2608
2608
  ]),
2609
- createElementVNode("div", _hoisted_4$4, [
2609
+ createElementVNode("div", _hoisted_4$5, [
2610
2610
  renderSlot(_ctx.$slots, "default")
2611
2611
  ])
2612
- ], 10 /* CLASS, PROPS */, _hoisted_1$4))
2612
+ ], 10 /* CLASS, PROPS */, _hoisted_1$5))
2613
2613
  }
2614
2614
 
2615
- script$4.render = render$4;
2616
- script$4.__file = "src/lib/components/ShCanvas.vue";
2615
+ script$5.render = render$4;
2616
+ script$5.__file = "src/lib/components/ShCanvas.vue";
2617
2617
 
2618
- var script$3 = {
2618
+ var script$4 = {
2619
2619
  name: 'ShModal',
2620
2620
  props: ['modalTitle', 'modalId', 'modalSize'],
2621
2621
  components: {
2622
2622
  }
2623
2623
  };
2624
2624
 
2625
- const _hoisted_1$3 = ["id"];
2626
- const _hoisted_2$3 = { class: "modal-content" };
2627
- const _hoisted_3$3 = { class: "modal-header" };
2628
- const _hoisted_4$3 = { class: "modal-title" };
2625
+ const _hoisted_1$4 = ["id"];
2626
+ const _hoisted_2$4 = { class: "modal-content" };
2627
+ const _hoisted_3$4 = { class: "modal-header" };
2628
+ const _hoisted_4$4 = { class: "modal-title" };
2629
2629
  const _hoisted_5$3 = /*#__PURE__*/createElementVNode("button", {
2630
2630
  class: "btn btn-danger btn-sm",
2631
2631
  "data-bs-dismiss": "modal",
@@ -2645,9 +2645,9 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2645
2645
  createElementVNode("div", {
2646
2646
  class: normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
2647
2647
  }, [
2648
- createElementVNode("div", _hoisted_2$3, [
2649
- createElementVNode("div", _hoisted_3$3, [
2650
- createElementVNode("h3", _hoisted_4$3, toDisplayString($props.modalTitle), 1 /* TEXT */),
2648
+ createElementVNode("div", _hoisted_2$4, [
2649
+ createElementVNode("div", _hoisted_3$4, [
2650
+ createElementVNode("h3", _hoisted_4$4, toDisplayString($props.modalTitle), 1 /* TEXT */),
2651
2651
  _hoisted_5$3
2652
2652
  ]),
2653
2653
  createElementVNode("div", _hoisted_6$1, [
@@ -2657,13 +2657,13 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2657
2657
  ])
2658
2658
  ])
2659
2659
  ], 2 /* CLASS */)
2660
- ], 8 /* PROPS */, _hoisted_1$3))
2660
+ ], 8 /* PROPS */, _hoisted_1$4))
2661
2661
  }
2662
2662
 
2663
- script$3.render = render$3;
2664
- script$3.__file = "src/lib/components/ShModal.vue";
2663
+ script$4.render = render$3;
2664
+ script$4.__file = "src/lib/components/ShModal.vue";
2665
2665
 
2666
- var script$2 = {
2666
+ var script$3 = {
2667
2667
  name: 'Pagination',
2668
2668
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
2669
2669
  data () {
@@ -2734,10 +2734,10 @@ var script$2 = {
2734
2734
  }
2735
2735
  };
2736
2736
 
2737
- const _hoisted_1$2 = { key: 0 };
2738
- const _hoisted_2$2 = { class: "record_count_body mb-3" };
2739
- const _hoisted_3$2 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
2740
- const _hoisted_4$2 = /*#__PURE__*/createTextVNode("  ");
2737
+ const _hoisted_1$3 = { key: 0 };
2738
+ const _hoisted_2$3 = { class: "record_count_body mb-3" };
2739
+ const _hoisted_3$3 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
2740
+ const _hoisted_4$3 = /*#__PURE__*/createTextVNode("  ");
2741
2741
  const _hoisted_5$2 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
2742
2742
  const _hoisted_10$1 = [
2743
2743
  _hoisted_5$2
@@ -2781,10 +2781,10 @@ const _hoisted_23$1 = {
2781
2781
 
2782
2782
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2783
2783
  return (!$props.loadMore)
2784
- ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
2785
- createElementVNode("div", _hoisted_2$2, [
2786
- _hoisted_3$2,
2787
- _hoisted_4$2,
2784
+ ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
2785
+ createElementVNode("div", _hoisted_2$3, [
2786
+ _hoisted_3$3,
2787
+ _hoisted_4$3,
2788
2788
  withDirectives(createElementVNode("select", {
2789
2789
  class: "select_per_page",
2790
2790
  onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
@@ -2853,8 +2853,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2853
2853
  ]))
2854
2854
  }
2855
2855
 
2856
- script$2.render = render$2;
2857
- script$2.__file = "src/lib/components/list_templates/Pagination.vue";
2856
+ script$3.render = render$2;
2857
+ script$3.__file = "src/lib/components/list_templates/Pagination.vue";
2858
2858
 
2859
2859
  function swalSuccess (message) {
2860
2860
  Swal.fire('Success!', message, 'success');
@@ -3028,7 +3028,7 @@ var helpers = {
3028
3028
  formatDate
3029
3029
  };
3030
3030
 
3031
- var script$1 = {
3031
+ var script$2 = {
3032
3032
  name: 'sh-table',
3033
3033
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover'],
3034
3034
  inject: ['channel', 'global'],
@@ -3227,7 +3227,7 @@ var script$1 = {
3227
3227
  this.reloadData();
3228
3228
  },
3229
3229
  components: {
3230
- pagination: script$2
3230
+ pagination: script$3
3231
3231
  },
3232
3232
  computed: {
3233
3233
  windowWidth: function () {
@@ -3245,13 +3245,13 @@ var script$1 = {
3245
3245
  }
3246
3246
  };
3247
3247
 
3248
- const _hoisted_1$1 = { class: "auto-table" };
3249
- const _hoisted_2$1 = {
3248
+ const _hoisted_1$2 = { class: "auto-table" };
3249
+ const _hoisted_2$2 = {
3250
3250
  key: 0,
3251
3251
  class: "col-md-4 mb-2"
3252
3252
  };
3253
- const _hoisted_3$1 = ["disabled"];
3254
- const _hoisted_4$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3253
+ const _hoisted_3$2 = ["disabled"];
3254
+ const _hoisted_4$2 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3255
3255
  const _hoisted_5$1 = /*#__PURE__*/createTextVNode(" Export ");
3256
3256
  const _hoisted_6 = /*#__PURE__*/createElementVNode("span", {
3257
3257
  class: "spinner-border spinner-border-sm",
@@ -3408,9 +3408,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3408
3408
  const _component_router_link = resolveComponent("router-link");
3409
3409
  const _component_pagination = resolveComponent("pagination");
3410
3410
 
3411
- return (openBlock(), createElementBlock("div", _hoisted_1$1, [
3411
+ return (openBlock(), createElementBlock("div", _hoisted_1$2, [
3412
3412
  ($props.hasDownload)
3413
- ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
3413
+ ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
3414
3414
  createElementVNode("button", {
3415
3415
  disabled: $data.downloading,
3416
3416
  class: "btn btn-warning btn-sm",
@@ -3418,14 +3418,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3418
3418
  }, [
3419
3419
  (!$data.downloading)
3420
3420
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3421
- _hoisted_4$1,
3421
+ _hoisted_4$2,
3422
3422
  _hoisted_5$1
3423
3423
  ], 64 /* STABLE_FRAGMENT */))
3424
3424
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3425
3425
  _hoisted_6,
3426
3426
  _hoisted_7
3427
3427
  ], 64 /* STABLE_FRAGMENT */))
3428
- ], 8 /* PROPS */, _hoisted_3$1)
3428
+ ], 8 /* PROPS */, _hoisted_3$2)
3429
3429
  ]))
3430
3430
  : createCommentVNode("v-if", true),
3431
3431
  (!$props.hideSearch)
@@ -3734,10 +3734,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3734
3734
  ]))
3735
3735
  }
3736
3736
 
3737
- script$1.render = render$1;
3738
- script$1.__file = "src/lib/components/ShTable.vue";
3737
+ script$2.render = render$1;
3738
+ script$2.__file = "src/lib/components/ShTable.vue";
3739
3739
 
3740
- var script = {
3740
+ var script$1 = {
3741
3741
  name: 'ShTabs',
3742
3742
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive'],
3743
3743
  data () {
@@ -3818,13 +3818,13 @@ var script = {
3818
3818
  }
3819
3819
  };
3820
3820
 
3821
- const _hoisted_1 = {
3821
+ const _hoisted_1$1 = {
3822
3822
  key: 0,
3823
3823
  class: "navbar navbar-expand-lg sh-horizontal-tabs"
3824
3824
  };
3825
- const _hoisted_2 = ["data-bs-target"];
3826
- const _hoisted_3 = /*#__PURE__*/createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3827
- const _hoisted_4 = ["id"];
3825
+ const _hoisted_2$1 = ["data-bs-target"];
3826
+ const _hoisted_3$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3827
+ const _hoisted_4$1 = ["id"];
3828
3828
  const _hoisted_5 = { class: "tab-content" };
3829
3829
 
3830
3830
  function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -3833,7 +3833,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3833
3833
 
3834
3834
  return (openBlock(), createElementBlock(Fragment, null, [
3835
3835
  ($data.generatedId)
3836
- ? (openBlock(), createElementBlock("nav", _hoisted_1, [
3836
+ ? (openBlock(), createElementBlock("nav", _hoisted_1$1, [
3837
3837
  ($data.isResponsive)
3838
3838
  ? (openBlock(), createElementBlock("a", {
3839
3839
  key: 0,
@@ -3846,8 +3846,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3846
3846
  "aria-label": "Toggle navigation"
3847
3847
  }, [
3848
3848
  createTextVNode(toDisplayString($data.currentTab) + " ", 1 /* TEXT */),
3849
- _hoisted_3
3850
- ], 8 /* PROPS */, _hoisted_2))
3849
+ _hoisted_3$1
3850
+ ], 8 /* PROPS */, _hoisted_2$1))
3851
3851
  : createCommentVNode("v-if", true),
3852
3852
  createElementVNode("div", {
3853
3853
  class: normalizeClass($data.isResponsive ? 'collapse navbar-collapse':''),
@@ -3876,7 +3876,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3876
3876
  ]))
3877
3877
  }), 128 /* KEYED_FRAGMENT */))
3878
3878
  ], 2 /* CLASS */)
3879
- ], 10 /* CLASS, PROPS */, _hoisted_4)
3879
+ ], 10 /* CLASS, PROPS */, _hoisted_4$1)
3880
3880
  ]))
3881
3881
  : createCommentVNode("v-if", true),
3882
3882
  createElementVNode("div", _hoisted_5, [
@@ -3889,7 +3889,66 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
3889
3889
  ], 64 /* STABLE_FRAGMENT */))
3890
3890
  }
3891
3891
 
3892
- script.render = render;
3893
- script.__file = "src/lib/components/ShTabs.vue";
3892
+ script$1.render = render;
3893
+ script$1.__file = "src/lib/components/ShTabs.vue";
3894
+
3895
+ const _hoisted_1 = {
3896
+ class: "nav nav-tabs",
3897
+ role: "tablist"
3898
+ };
3899
+ const _hoisted_2 = {
3900
+ class: "nav-item",
3901
+ role: "presentation"
3902
+ };
3903
+ const _hoisted_3 = ["onClick"];
3904
+ const _hoisted_4 = { class: "tab-content" };
3905
+
3906
+ var script = {
3907
+ __name: 'ShDynamicTabs',
3908
+ props: ['tabs'],
3909
+ setup(__props) {
3910
+
3911
+ const props = __props;
3912
+
3913
+
3914
+ const tabs = props.tabs;
3915
+ let currentTab = shallowRef(null);
3916
+ const generatedId = ref(null);
3917
+ ref(null);
3918
+ onMounted(()=>{
3919
+ generatedId.value = 'tab' + Math.random().toString(36).slice(2);
3920
+ if(tabs.length > 0) {
3921
+ currentTab.value = tabs[0];
3922
+ }
3923
+ });
3924
+
3925
+ function setTab(tab){
3926
+ currentTab.value = tab;
3927
+ }
3928
+
3929
+ return (_ctx, _cache) => {
3930
+ return (openBlock(), createElementBlock(Fragment, null, [
3931
+ createElementVNode("ul", _hoisted_1, [
3932
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab) => {
3933
+ return (openBlock(), createElementBlock("li", _hoisted_2, [
3934
+ createElementVNode("button", {
3935
+ onClick: $event => (setTab(tab)),
3936
+ class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
3937
+ }, toDisplayString(tab.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_3)
3938
+ ]))
3939
+ }), 256 /* UNKEYED_FRAGMENT */))
3940
+ ]),
3941
+ createElementVNode("div", _hoisted_4, [
3942
+ (unref(currentTab))
3943
+ ? (openBlock(), createBlock(resolveDynamicComponent(unref(currentTab).component), { key: 0 }))
3944
+ : createCommentVNode("v-if", true)
3945
+ ])
3946
+ ], 64 /* STABLE_FRAGMENT */))
3947
+ }
3948
+ }
3949
+
3950
+ };
3951
+
3952
+ script.__file = "src/lib/components/ShDynamicTabs.vue";
3894
3953
 
3895
- export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$8 as ShPhone, script$1 as ShTable, script as ShTabs, apis as shApis, helpers as shRepo, shstorage as shStorage, useUserStore };
3954
+ export { script$5 as ShCanvas, script as ShDynamicTabs, script$6 as ShForm, script$4 as ShModal, script$9 as ShPhone, script$2 as ShTable, script$1 as ShTabs, apis as shApis, helpers as shRepo, shstorage as shStorage, useUserStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",