@iankibetsh/shframework 5.2.5 → 5.2.8

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
@@ -283,8 +283,14 @@ const showModal = modalId => {
283
283
  };
284
284
 
285
285
  const hideModal = modalId => {
286
- const modal = new bootstrap.Modal(document.getElementById(modalId));
287
- modal.hide();
286
+ const modalElement = document.getElementById(modalId);
287
+ const button = modalElement.querySelector('.sh-modal-close');
288
+ if(button){
289
+ button.click();
290
+ } else {
291
+ const modal = new bootstrap.Modal(modalElement);
292
+ modal.hide();
293
+ }
288
294
  };
289
295
 
290
296
  const showOffCanvas = offCanvasId => {
@@ -293,8 +299,14 @@ const showOffCanvas = offCanvasId => {
293
299
  };
294
300
 
295
301
  const hideOffCanvas = offCanvasId => {
296
- const offCanvas = new bootstrap.Offcanvas(document.getElementById(offCanvasId));
297
- offCanvas.hide();
302
+ const element = document.getElementById(offCanvasId);
303
+ const button = element.querySelector('.sh-offcanvas-close');
304
+ if(button){
305
+ button.click();
306
+ } else {
307
+ const offCanvas = new bootstrap.Offcanvas(element);
308
+ offCanvas.hide();
309
+ }
298
310
  };
299
311
 
300
312
  var shRepo = {
@@ -2103,7 +2115,7 @@ const _hoisted_2$i = {
2103
2115
  };
2104
2116
  const _hoisted_3$g = ["src"];
2105
2117
  const _hoisted_4$g = ["value"];
2106
- const _hoisted_5$d = ["disabled"];
2118
+ const _hoisted_5$e = ["disabled"];
2107
2119
 
2108
2120
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2109
2121
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
@@ -2135,7 +2147,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2135
2147
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2136
2148
  placeholder: "712345678",
2137
2149
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2138
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2150
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$e), [
2139
2151
  [vue.vModelText, $data.input]
2140
2152
  ])
2141
2153
  ]))
@@ -2151,7 +2163,7 @@ const _hoisted_1$r = {
2151
2163
  const _hoisted_2$h = ["id"];
2152
2164
  const _hoisted_3$f = { class: "sh-suggestions-holder" };
2153
2165
  const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2154
- const _hoisted_5$c = ["onClick"];
2166
+ const _hoisted_5$d = ["onClick"];
2155
2167
  const _hoisted_6$a = ["id"];
2156
2168
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2157
2169
  const _hoisted_8$8 = ["onClick"];
@@ -2326,7 +2338,7 @@ return (_ctx, _cache) => {
2326
2338
  type: "button",
2327
2339
  class: "btn-close border-start border-1 ms-1",
2328
2340
  "aria-label": "Close"
2329
- }, null, 8 /* PROPS */, _hoisted_5$c)
2341
+ }, null, 8 /* PROPS */, _hoisted_5$d)
2330
2342
  ]))
2331
2343
  }), 256 /* UNKEYED_FRAGMENT */))
2332
2344
  ]),
@@ -2747,7 +2759,7 @@ const _hoisted_3$e = {
2747
2759
  role: "alert"
2748
2760
  };
2749
2761
  const _hoisted_4$e = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2750
- const _hoisted_5$b = { key: 0 };
2762
+ const _hoisted_5$c = { key: 0 };
2751
2763
  const _hoisted_6$9 = { key: 1 };
2752
2764
  const _hoisted_7$8 = { class: "row" };
2753
2765
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2811,7 +2823,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2811
2823
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$e, [
2812
2824
  _hoisted_4$e,
2813
2825
  (_ctx.errorText)
2814
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$b, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2826
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$c, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2815
2827
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2816
2828
  vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2817
2829
  ]))
@@ -3367,7 +3379,7 @@ const _hoisted_4$d = {
3367
3379
  key: 0,
3368
3380
  class: "text-danger sh-required"
3369
3381
  };
3370
- const _hoisted_5$a = ["innerHTML"];
3382
+ const _hoisted_5$b = ["innerHTML"];
3371
3383
  const _hoisted_6$8 = {
3372
3384
  key: 2,
3373
3385
  class: "form-notch"
@@ -3683,7 +3695,7 @@ return (_ctx, _cache) => {
3683
3695
  key: 1,
3684
3696
  class: vue.normalizeClass(getElementClass('formLabel')),
3685
3697
  innerHTML: field.label
3686
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3698
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$b))
3687
3699
  : vue.createCommentVNode("v-if", true),
3688
3700
  (vue.unref(isFloating))
3689
3701
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3736,11 +3748,12 @@ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3736
3748
  const _hoisted_2$e = { class: "modal-content" };
3737
3749
  const _hoisted_3$c = { class: "modal-header" };
3738
3750
  const _hoisted_4$c = { class: "modal-title flex-fill" };
3739
- const _hoisted_5$9 = /*#__PURE__*/vue.createElementVNode("button", {
3740
- class: "btn btn-danger btn-sm",
3751
+ const _hoisted_5$a = /*#__PURE__*/vue.createElementVNode("button", {
3752
+ type: "button",
3753
+ class: "btn-close sh-modal-close",
3741
3754
  "data-bs-dismiss": "modal",
3742
- "data-dismiss": "modal"
3743
- }, "×", -1 /* HOISTED */);
3755
+ "aria-label": "Close"
3756
+ }, null, -1 /* HOISTED */);
3744
3757
  const _hoisted_6$7 = { class: "modal-body" };
3745
3758
  const _hoisted_7$6 = { class: "section" };
3746
3759
 
@@ -3806,7 +3819,7 @@ return (_ctx, _cache) => {
3806
3819
  vue.createElementVNode("div", _hoisted_2$e, [
3807
3820
  vue.createElementVNode("div", _hoisted_3$c, [
3808
3821
  vue.createElementVNode("h3", _hoisted_4$c, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3809
- _hoisted_5$9
3822
+ _hoisted_5$a
3810
3823
  ]),
3811
3824
  vue.createElementVNode("div", _hoisted_6$7, [
3812
3825
  vue.createElementVNode("div", _hoisted_7$6, [
@@ -3824,7 +3837,7 @@ return (_ctx, _cache) => {
3824
3837
  script$p.__file = "src/lib/components/ShModal.vue";
3825
3838
 
3826
3839
  const _hoisted_1$l = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3827
- const _hoisted_2$d = { class: "dropdown" };
3840
+ const _hoisted_2$d = { class: "dropdown sh-dropdown-form" };
3828
3841
  const _hoisted_3$b = ["id"];
3829
3842
  const _hoisted_4$b = ["aria-labelledby"];
3830
3843
 
@@ -4063,7 +4076,14 @@ const _hoisted_3$a = {
4063
4076
  class: "offcanvas-title",
4064
4077
  id: "offcanvasScrollingLabel"
4065
4078
  };
4066
- const _hoisted_4$a = { class: "offcanvas-body" };
4079
+ const _hoisted_4$a = {
4080
+ type: "button",
4081
+ ref: "closecanvas",
4082
+ class: "btn-close sh-offcanvas-close",
4083
+ "data-bs-dismiss": "offcanvas",
4084
+ "aria-label": "Close"
4085
+ };
4086
+ const _hoisted_5$9 = { class: "offcanvas-body" };
4067
4087
 
4068
4088
  var script$l = {
4069
4089
  __name: 'ShCanvas',
@@ -4113,16 +4133,9 @@ return (_ctx, _cache) => {
4113
4133
  }, [
4114
4134
  vue.createElementVNode("div", _hoisted_2$c, [
4115
4135
  vue.createElementVNode("h5", _hoisted_3$a, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4116
- vue.createElementVNode("button", {
4117
- type: "button",
4118
- ref: "closecanvas",
4119
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.offcanvasClosed && _ctx.offcanvasClosed(...args))),
4120
- class: "btn-close text-reset",
4121
- "data-bs-dismiss": "offcanvas",
4122
- "aria-label": "Close"
4123
- }, null, 512 /* NEED_PATCH */)
4136
+ vue.createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
4124
4137
  ]),
4125
- vue.createElementVNode("div", _hoisted_4$a, [
4138
+ vue.createElementVNode("div", _hoisted_5$9, [
4126
4139
  vue.renderSlot(_ctx.$slots, "default")
4127
4140
  ])
4128
4141
  ], 10 /* CLASS, PROPS */, _hoisted_1$i))
package/dist/library.mjs CHANGED
@@ -271,8 +271,14 @@ const showModal = modalId => {
271
271
  };
272
272
 
273
273
  const hideModal = modalId => {
274
- const modal = new Modal(document.getElementById(modalId));
275
- modal.hide();
274
+ const modalElement = document.getElementById(modalId);
275
+ const button = modalElement.querySelector('.sh-modal-close');
276
+ if(button){
277
+ button.click();
278
+ } else {
279
+ const modal = new Modal(modalElement);
280
+ modal.hide();
281
+ }
276
282
  };
277
283
 
278
284
  const showOffCanvas = offCanvasId => {
@@ -281,8 +287,14 @@ const showOffCanvas = offCanvasId => {
281
287
  };
282
288
 
283
289
  const hideOffCanvas = offCanvasId => {
284
- const offCanvas = new Offcanvas(document.getElementById(offCanvasId));
285
- offCanvas.hide();
290
+ const element = document.getElementById(offCanvasId);
291
+ const button = element.querySelector('.sh-offcanvas-close');
292
+ if(button){
293
+ button.click();
294
+ } else {
295
+ const offCanvas = new Offcanvas(element);
296
+ offCanvas.hide();
297
+ }
286
298
  };
287
299
 
288
300
  var shRepo = {
@@ -2091,7 +2103,7 @@ const _hoisted_2$i = {
2091
2103
  };
2092
2104
  const _hoisted_3$g = ["src"];
2093
2105
  const _hoisted_4$g = ["value"];
2094
- const _hoisted_5$d = ["disabled"];
2106
+ const _hoisted_5$e = ["disabled"];
2095
2107
 
2096
2108
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2097
2109
  return (openBlock(), createElementBlock("div", _hoisted_1$s, [
@@ -2123,7 +2135,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2123
2135
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2124
2136
  placeholder: "712345678",
2125
2137
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2126
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2138
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$e), [
2127
2139
  [vModelText, $data.input]
2128
2140
  ])
2129
2141
  ]))
@@ -2139,7 +2151,7 @@ const _hoisted_1$r = {
2139
2151
  const _hoisted_2$h = ["id"];
2140
2152
  const _hoisted_3$f = { class: "sh-suggestions-holder" };
2141
2153
  const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2142
- const _hoisted_5$c = ["onClick"];
2154
+ const _hoisted_5$d = ["onClick"];
2143
2155
  const _hoisted_6$a = ["id"];
2144
2156
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2145
2157
  const _hoisted_8$8 = ["onClick"];
@@ -2314,7 +2326,7 @@ return (_ctx, _cache) => {
2314
2326
  type: "button",
2315
2327
  class: "btn-close border-start border-1 ms-1",
2316
2328
  "aria-label": "Close"
2317
- }, null, 8 /* PROPS */, _hoisted_5$c)
2329
+ }, null, 8 /* PROPS */, _hoisted_5$d)
2318
2330
  ]))
2319
2331
  }), 256 /* UNKEYED_FRAGMENT */))
2320
2332
  ]),
@@ -2735,7 +2747,7 @@ const _hoisted_3$e = {
2735
2747
  role: "alert"
2736
2748
  };
2737
2749
  const _hoisted_4$e = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2738
- const _hoisted_5$b = { key: 0 };
2750
+ const _hoisted_5$c = { key: 0 };
2739
2751
  const _hoisted_6$9 = { key: 1 };
2740
2752
  const _hoisted_7$8 = { class: "row" };
2741
2753
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2799,7 +2811,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2799
2811
  ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
2800
2812
  _hoisted_4$e,
2801
2813
  (_ctx.errorText)
2802
- ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2814
+ ? (openBlock(), createElementBlock("span", _hoisted_5$c, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2803
2815
  : (openBlock(), createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2804
2816
  createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2805
2817
  ]))
@@ -3355,7 +3367,7 @@ const _hoisted_4$d = {
3355
3367
  key: 0,
3356
3368
  class: "text-danger sh-required"
3357
3369
  };
3358
- const _hoisted_5$a = ["innerHTML"];
3370
+ const _hoisted_5$b = ["innerHTML"];
3359
3371
  const _hoisted_6$8 = {
3360
3372
  key: 2,
3361
3373
  class: "form-notch"
@@ -3671,7 +3683,7 @@ return (_ctx, _cache) => {
3671
3683
  key: 1,
3672
3684
  class: normalizeClass(getElementClass('formLabel')),
3673
3685
  innerHTML: field.label
3674
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3686
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$b))
3675
3687
  : createCommentVNode("v-if", true),
3676
3688
  (unref(isFloating))
3677
3689
  ? (openBlock(), createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3724,11 +3736,12 @@ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3724
3736
  const _hoisted_2$e = { class: "modal-content" };
3725
3737
  const _hoisted_3$c = { class: "modal-header" };
3726
3738
  const _hoisted_4$c = { class: "modal-title flex-fill" };
3727
- const _hoisted_5$9 = /*#__PURE__*/createElementVNode("button", {
3728
- class: "btn btn-danger btn-sm",
3739
+ const _hoisted_5$a = /*#__PURE__*/createElementVNode("button", {
3740
+ type: "button",
3741
+ class: "btn-close sh-modal-close",
3729
3742
  "data-bs-dismiss": "modal",
3730
- "data-dismiss": "modal"
3731
- }, "×", -1 /* HOISTED */);
3743
+ "aria-label": "Close"
3744
+ }, null, -1 /* HOISTED */);
3732
3745
  const _hoisted_6$7 = { class: "modal-body" };
3733
3746
  const _hoisted_7$6 = { class: "section" };
3734
3747
 
@@ -3794,7 +3807,7 @@ return (_ctx, _cache) => {
3794
3807
  createElementVNode("div", _hoisted_2$e, [
3795
3808
  createElementVNode("div", _hoisted_3$c, [
3796
3809
  createElementVNode("h3", _hoisted_4$c, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3797
- _hoisted_5$9
3810
+ _hoisted_5$a
3798
3811
  ]),
3799
3812
  createElementVNode("div", _hoisted_6$7, [
3800
3813
  createElementVNode("div", _hoisted_7$6, [
@@ -3812,7 +3825,7 @@ return (_ctx, _cache) => {
3812
3825
  script$p.__file = "src/lib/components/ShModal.vue";
3813
3826
 
3814
3827
  const _hoisted_1$l = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3815
- const _hoisted_2$d = { class: "dropdown" };
3828
+ const _hoisted_2$d = { class: "dropdown sh-dropdown-form" };
3816
3829
  const _hoisted_3$b = ["id"];
3817
3830
  const _hoisted_4$b = ["aria-labelledby"];
3818
3831
 
@@ -4051,7 +4064,14 @@ const _hoisted_3$a = {
4051
4064
  class: "offcanvas-title",
4052
4065
  id: "offcanvasScrollingLabel"
4053
4066
  };
4054
- const _hoisted_4$a = { class: "offcanvas-body" };
4067
+ const _hoisted_4$a = {
4068
+ type: "button",
4069
+ ref: "closecanvas",
4070
+ class: "btn-close sh-offcanvas-close",
4071
+ "data-bs-dismiss": "offcanvas",
4072
+ "aria-label": "Close"
4073
+ };
4074
+ const _hoisted_5$9 = { class: "offcanvas-body" };
4055
4075
 
4056
4076
  var script$l = {
4057
4077
  __name: 'ShCanvas',
@@ -4101,16 +4121,9 @@ return (_ctx, _cache) => {
4101
4121
  }, [
4102
4122
  createElementVNode("div", _hoisted_2$c, [
4103
4123
  createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4104
- createElementVNode("button", {
4105
- type: "button",
4106
- ref: "closecanvas",
4107
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.offcanvasClosed && _ctx.offcanvasClosed(...args))),
4108
- class: "btn-close text-reset",
4109
- "data-bs-dismiss": "offcanvas",
4110
- "aria-label": "Close"
4111
- }, null, 512 /* NEED_PATCH */)
4124
+ createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
4112
4125
  ]),
4113
- createElementVNode("div", _hoisted_4$a, [
4126
+ createElementVNode("div", _hoisted_5$9, [
4114
4127
  renderSlot(_ctx.$slots, "default")
4115
4128
  ])
4116
4129
  ], 10 /* CLASS, PROPS */, _hoisted_1$i))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.2.5",
3
+ "version": "5.2.8",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",