@iankibetsh/shframework 1.6.8 → 1.7.0
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 +27 -20
- package/dist/library.mjs +27 -20
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -5048,7 +5048,6 @@ return (_ctx, _cache) => {
|
|
|
5048
5048
|
const _component_router_view = vue.resolveComponent("router-view");
|
|
5049
5049
|
|
|
5050
5050
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5051
|
-
vue.createElementVNode("h3", null, vue.toDisplayString(path.value), 1 /* TEXT */),
|
|
5052
5051
|
vue.createElementVNode("ul", {
|
|
5053
5052
|
class: vue.normalizeClass(["nav nav-tabs sh-tabs", __props.classes])
|
|
5054
5053
|
}, [
|
|
@@ -5539,6 +5538,7 @@ script$4.__file = "src/lib/components/core/Departments/department/ManagePermissi
|
|
|
5539
5538
|
|
|
5540
5539
|
const _hoisted_1$3 = ["href"];
|
|
5541
5540
|
|
|
5541
|
+
|
|
5542
5542
|
var script$3 = {
|
|
5543
5543
|
__name: 'ShPopups',
|
|
5544
5544
|
setup(__props) {
|
|
@@ -5553,58 +5553,65 @@ const router = vueRouter.useRouter();
|
|
|
5553
5553
|
const position = vue.ref(null);
|
|
5554
5554
|
const size = vue.ref(null);
|
|
5555
5555
|
const popups = [];
|
|
5556
|
-
const popupPaths =[];
|
|
5557
|
-
vue.watch(()=>route.meta, meta=>{
|
|
5556
|
+
const popupPaths = [];
|
|
5557
|
+
vue.watch(() => route.meta, meta => {
|
|
5558
5558
|
popUp.value = meta.popUp ?? meta.popup;
|
|
5559
|
-
if(popUp.value){
|
|
5559
|
+
if (popUp.value) {
|
|
5560
5560
|
// popups.push(meta)
|
|
5561
5561
|
!popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta);
|
|
5562
5562
|
position.value = meta.position ?? meta.side;
|
|
5563
5563
|
size.value = meta.size;
|
|
5564
|
-
componentView.value = vue.markRaw(route.matched[route.matched.length-1].components.default);
|
|
5565
|
-
setTimeout(()=>{
|
|
5564
|
+
componentView.value = vue.markRaw(route.matched[route.matched.length - 1].components.default);
|
|
5565
|
+
setTimeout(() => {
|
|
5566
5566
|
initPopup();
|
|
5567
|
-
},100);
|
|
5567
|
+
}, 100);
|
|
5568
5568
|
} else {
|
|
5569
5569
|
//no pop up, check if we have any unclosed backdrop
|
|
5570
|
-
setTimeout(()=>{
|
|
5570
|
+
setTimeout(() => {
|
|
5571
5571
|
closeOrphanedBackdrops();
|
|
5572
|
-
},100);
|
|
5572
|
+
}, 100);
|
|
5573
5573
|
}
|
|
5574
5574
|
});
|
|
5575
|
-
const closeOrphanedBackdrops = ()=>{
|
|
5575
|
+
const closeOrphanedBackdrops = () => {
|
|
5576
5576
|
const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
|
|
5577
|
-
if(offCanvasBackdrop) {
|
|
5578
|
-
if(!document.querySelector('.offcanvas.show')){
|
|
5577
|
+
if (offCanvasBackdrop) {
|
|
5578
|
+
if (!document.querySelector('.offcanvas.show')) {
|
|
5579
5579
|
offCanvasBackdrop.remove();
|
|
5580
5580
|
}
|
|
5581
5581
|
}
|
|
5582
5582
|
const modalBackdrop = document.querySelector('.modal-backdrop');
|
|
5583
|
-
if(modalBackdrop) {
|
|
5584
|
-
if(!document.querySelector('.modal.show')){
|
|
5583
|
+
if (modalBackdrop) {
|
|
5584
|
+
if (!document.querySelector('.modal.show')) {
|
|
5585
5585
|
modalBackdrop.remove();
|
|
5586
5586
|
}
|
|
5587
5587
|
}
|
|
5588
5588
|
};
|
|
5589
|
-
const initPopup = ()=>{
|
|
5590
|
-
if(popUp.value === 'modal') {
|
|
5589
|
+
const initPopup = () => {
|
|
5590
|
+
if (popUp.value === 'modal') {
|
|
5591
5591
|
// modalButton.value.click()
|
|
5592
5592
|
const modal = document.getElementById(modalId);
|
|
5593
|
-
const bsModal = new bootstrap.Modal(modal,{});
|
|
5593
|
+
const bsModal = new bootstrap.Modal(modal, {});
|
|
5594
5594
|
bsModal.show();
|
|
5595
5595
|
modal.addEventListener('hidden.bs.modal', event => {
|
|
5596
5596
|
event.target.id === modalId && goBack();
|
|
5597
5597
|
});
|
|
5598
|
-
} else if (['offcanvas','canvas','offCanvas'].includes(popUp.value)){
|
|
5598
|
+
} else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
|
|
5599
5599
|
const offCanvas = document.getElementById(canvasId);
|
|
5600
|
-
const bsOffCanvas = new bootstrap.Offcanvas(offCanvas,{});
|
|
5600
|
+
const bsOffCanvas = new bootstrap.Offcanvas(offCanvas, {});
|
|
5601
5601
|
bsOffCanvas.show();
|
|
5602
5602
|
offCanvas.addEventListener('hidden.bs.offcanvas', event => {
|
|
5603
5603
|
event.target.id === canvasId && goBack();
|
|
5604
5604
|
});
|
|
5605
5605
|
}
|
|
5606
5606
|
};
|
|
5607
|
-
const goBack = ()=>
|
|
5607
|
+
const goBack = () => {
|
|
5608
|
+
if (route.matched.length) {
|
|
5609
|
+
let backUrl = route.matched[route.matched.length - 2].path;
|
|
5610
|
+
const params = route.params;
|
|
5611
|
+
Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]));
|
|
5612
|
+
router.push(backUrl);
|
|
5613
|
+
}
|
|
5614
|
+
};
|
|
5608
5615
|
|
|
5609
5616
|
return (_ctx, _cache) => {
|
|
5610
5617
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
package/dist/library.mjs
CHANGED
|
@@ -5035,7 +5035,6 @@ return (_ctx, _cache) => {
|
|
|
5035
5035
|
const _component_router_view = resolveComponent("router-view");
|
|
5036
5036
|
|
|
5037
5037
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
5038
|
-
createElementVNode("h3", null, toDisplayString(path.value), 1 /* TEXT */),
|
|
5039
5038
|
createElementVNode("ul", {
|
|
5040
5039
|
class: normalizeClass(["nav nav-tabs sh-tabs", __props.classes])
|
|
5041
5040
|
}, [
|
|
@@ -5526,6 +5525,7 @@ script$4.__file = "src/lib/components/core/Departments/department/ManagePermissi
|
|
|
5526
5525
|
|
|
5527
5526
|
const _hoisted_1$3 = ["href"];
|
|
5528
5527
|
|
|
5528
|
+
|
|
5529
5529
|
var script$3 = {
|
|
5530
5530
|
__name: 'ShPopups',
|
|
5531
5531
|
setup(__props) {
|
|
@@ -5540,58 +5540,65 @@ const router = useRouter();
|
|
|
5540
5540
|
const position = ref(null);
|
|
5541
5541
|
const size = ref(null);
|
|
5542
5542
|
const popups = [];
|
|
5543
|
-
const popupPaths =[];
|
|
5544
|
-
watch(()=>route.meta, meta=>{
|
|
5543
|
+
const popupPaths = [];
|
|
5544
|
+
watch(() => route.meta, meta => {
|
|
5545
5545
|
popUp.value = meta.popUp ?? meta.popup;
|
|
5546
|
-
if(popUp.value){
|
|
5546
|
+
if (popUp.value) {
|
|
5547
5547
|
// popups.push(meta)
|
|
5548
5548
|
!popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta);
|
|
5549
5549
|
position.value = meta.position ?? meta.side;
|
|
5550
5550
|
size.value = meta.size;
|
|
5551
|
-
componentView.value = markRaw(route.matched[route.matched.length-1].components.default);
|
|
5552
|
-
setTimeout(()=>{
|
|
5551
|
+
componentView.value = markRaw(route.matched[route.matched.length - 1].components.default);
|
|
5552
|
+
setTimeout(() => {
|
|
5553
5553
|
initPopup();
|
|
5554
|
-
},100);
|
|
5554
|
+
}, 100);
|
|
5555
5555
|
} else {
|
|
5556
5556
|
//no pop up, check if we have any unclosed backdrop
|
|
5557
|
-
setTimeout(()=>{
|
|
5557
|
+
setTimeout(() => {
|
|
5558
5558
|
closeOrphanedBackdrops();
|
|
5559
|
-
},100);
|
|
5559
|
+
}, 100);
|
|
5560
5560
|
}
|
|
5561
5561
|
});
|
|
5562
|
-
const closeOrphanedBackdrops = ()=>{
|
|
5562
|
+
const closeOrphanedBackdrops = () => {
|
|
5563
5563
|
const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
|
|
5564
|
-
if(offCanvasBackdrop) {
|
|
5565
|
-
if(!document.querySelector('.offcanvas.show')){
|
|
5564
|
+
if (offCanvasBackdrop) {
|
|
5565
|
+
if (!document.querySelector('.offcanvas.show')) {
|
|
5566
5566
|
offCanvasBackdrop.remove();
|
|
5567
5567
|
}
|
|
5568
5568
|
}
|
|
5569
5569
|
const modalBackdrop = document.querySelector('.modal-backdrop');
|
|
5570
|
-
if(modalBackdrop) {
|
|
5571
|
-
if(!document.querySelector('.modal.show')){
|
|
5570
|
+
if (modalBackdrop) {
|
|
5571
|
+
if (!document.querySelector('.modal.show')) {
|
|
5572
5572
|
modalBackdrop.remove();
|
|
5573
5573
|
}
|
|
5574
5574
|
}
|
|
5575
5575
|
};
|
|
5576
|
-
const initPopup = ()=>{
|
|
5577
|
-
if(popUp.value === 'modal') {
|
|
5576
|
+
const initPopup = () => {
|
|
5577
|
+
if (popUp.value === 'modal') {
|
|
5578
5578
|
// modalButton.value.click()
|
|
5579
5579
|
const modal = document.getElementById(modalId);
|
|
5580
|
-
const bsModal = new Modal(modal,{});
|
|
5580
|
+
const bsModal = new Modal(modal, {});
|
|
5581
5581
|
bsModal.show();
|
|
5582
5582
|
modal.addEventListener('hidden.bs.modal', event => {
|
|
5583
5583
|
event.target.id === modalId && goBack();
|
|
5584
5584
|
});
|
|
5585
|
-
} else if (['offcanvas','canvas','offCanvas'].includes(popUp.value)){
|
|
5585
|
+
} else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
|
|
5586
5586
|
const offCanvas = document.getElementById(canvasId);
|
|
5587
|
-
const bsOffCanvas = new Offcanvas(offCanvas,{});
|
|
5587
|
+
const bsOffCanvas = new Offcanvas(offCanvas, {});
|
|
5588
5588
|
bsOffCanvas.show();
|
|
5589
5589
|
offCanvas.addEventListener('hidden.bs.offcanvas', event => {
|
|
5590
5590
|
event.target.id === canvasId && goBack();
|
|
5591
5591
|
});
|
|
5592
5592
|
}
|
|
5593
5593
|
};
|
|
5594
|
-
const goBack = ()=>
|
|
5594
|
+
const goBack = () => {
|
|
5595
|
+
if (route.matched.length) {
|
|
5596
|
+
let backUrl = route.matched[route.matched.length - 2].path;
|
|
5597
|
+
const params = route.params;
|
|
5598
|
+
Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]));
|
|
5599
|
+
router.push(backUrl);
|
|
5600
|
+
}
|
|
5601
|
+
};
|
|
5595
5602
|
|
|
5596
5603
|
return (_ctx, _cache) => {
|
|
5597
5604
|
return (openBlock(), createElementBlock(Fragment, null, [
|