@iankibetsh/shframework 5.5.1 → 5.5.2

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
@@ -280,13 +280,16 @@ const showModal = modalId => {
280
280
  };
281
281
 
282
282
  const hideModal = modalId => {
283
- const modalElement = document.getElementById(modalId);
284
- const button = modalElement.querySelector('.sh-modal-close');
285
- if(button){
286
- button.click();
287
- } else {
288
- const modal = new bootstrap.Modal(modalElement);
289
- modal.hide();
283
+ const cleanedId = modalId.replace('#','');
284
+ const modalElement = document.getElementById(cleanedId);
285
+ if(modalElement){
286
+ const button = modalElement.querySelector('.sh-modal-close');
287
+ if(button){
288
+ button.click();
289
+ } else {
290
+ const modal = new bootstrap.Modal(modalElement);
291
+ modal.hide();
292
+ }
290
293
  }
291
294
  };
292
295
 
package/dist/library.mjs CHANGED
@@ -268,13 +268,16 @@ const showModal = modalId => {
268
268
  };
269
269
 
270
270
  const hideModal = modalId => {
271
- const modalElement = document.getElementById(modalId);
272
- const button = modalElement.querySelector('.sh-modal-close');
273
- if(button){
274
- button.click();
275
- } else {
276
- const modal = new Modal(modalElement);
277
- modal.hide();
271
+ const cleanedId = modalId.replace('#','');
272
+ const modalElement = document.getElementById(cleanedId);
273
+ if(modalElement){
274
+ const button = modalElement.querySelector('.sh-modal-close');
275
+ if(button){
276
+ button.click();
277
+ } else {
278
+ const modal = new Modal(modalElement);
279
+ modal.hide();
280
+ }
278
281
  }
279
282
  };
280
283
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.5.1",
3
+ "version": "5.5.2",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",