@iankibetsh/shframework 1.6.7 → 1.6.9
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/dist/library.mjs.css +15 -15
- package/dist/library.js +152 -121
- package/dist/library.mjs +152 -121
- package/package.json +1 -1
|
@@ -95,21 +95,6 @@
|
|
|
95
95
|
flex-grow: 1;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.sh-selected-item{
|
|
99
|
-
line-height: unset!important;
|
|
100
|
-
}
|
|
101
|
-
.sh-suggestion-input{
|
|
102
|
-
padding: 0.375rem 0.75rem;
|
|
103
|
-
}
|
|
104
|
-
.sh-suggest{
|
|
105
|
-
margin-bottom: 1rem;
|
|
106
|
-
}
|
|
107
|
-
.sh-suggest-control::after{
|
|
108
|
-
margin-top: auto;
|
|
109
|
-
margin-bottom: auto;
|
|
110
|
-
margin-right: 0.255em;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
98
|
:root {
|
|
114
99
|
--ck-z-default: 10555 !important;
|
|
115
100
|
--ck-z-modal: calc(var(--ck-z-default) + 999) !important;
|
|
@@ -131,6 +116,21 @@
|
|
|
131
116
|
}
|
|
132
117
|
}
|
|
133
118
|
|
|
119
|
+
.sh-selected-item{
|
|
120
|
+
line-height: unset!important;
|
|
121
|
+
}
|
|
122
|
+
.sh-suggestion-input{
|
|
123
|
+
padding: 0.375rem 0.75rem;
|
|
124
|
+
}
|
|
125
|
+
.sh-suggest{
|
|
126
|
+
margin-bottom: 1rem;
|
|
127
|
+
}
|
|
128
|
+
.sh-suggest-control::after{
|
|
129
|
+
margin-top: auto;
|
|
130
|
+
margin-bottom: auto;
|
|
131
|
+
margin-right: 0.255em;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
134
|
.sh-forgot-link, .sh-register-link{
|
|
135
135
|
cursor: pointer;
|
|
136
136
|
}
|
package/dist/library.js
CHANGED
|
@@ -1945,7 +1945,7 @@ const _hoisted_2$d = {
|
|
|
1945
1945
|
const _hoisted_3$c = ["src"];
|
|
1946
1946
|
const _hoisted_4$c = ["value"];
|
|
1947
1947
|
|
|
1948
|
-
function render$
|
|
1948
|
+
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1949
1949
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
1950
1950
|
($data.selectedCountry)
|
|
1951
1951
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$d, [
|
|
@@ -1980,7 +1980,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1980
1980
|
]))
|
|
1981
1981
|
}
|
|
1982
1982
|
|
|
1983
|
-
script$s.render = render$
|
|
1983
|
+
script$s.render = render$4;
|
|
1984
1984
|
script$s.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1985
1985
|
|
|
1986
1986
|
var script$r = {
|
|
@@ -2028,7 +2028,7 @@ const _hoisted_1$m = /*#__PURE__*/vue.createElementVNode("textarea", {
|
|
|
2028
2028
|
"data-cy": "tinymce_editor"
|
|
2029
2029
|
}, null, -1 /* HOISTED */);
|
|
2030
2030
|
|
|
2031
|
-
function render$
|
|
2031
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2032
2032
|
const _component_editor = vue.resolveComponent("editor");
|
|
2033
2033
|
|
|
2034
2034
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
@@ -2057,7 +2057,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2057
2057
|
], 64 /* STABLE_FRAGMENT */))
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
2060
|
-
script$r.render = render$
|
|
2060
|
+
script$r.render = render$3;
|
|
2061
2061
|
script$r.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2062
2062
|
|
|
2063
2063
|
const _hoisted_1$l = {
|
|
@@ -2609,7 +2609,7 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
2609
2609
|
"aria-hidden": "true"
|
|
2610
2610
|
}, null, -1 /* HOISTED */);
|
|
2611
2611
|
|
|
2612
|
-
function render$
|
|
2612
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2613
2613
|
const _component_phone_input = vue.resolveComponent("phone-input");
|
|
2614
2614
|
const _component_ShSuggest = vue.resolveComponent("ShSuggest");
|
|
2615
2615
|
const _component_ShEditor = vue.resolveComponent("ShEditor");
|
|
@@ -2832,7 +2832,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2832
2832
|
], 64 /* STABLE_FRAGMENT */))
|
|
2833
2833
|
}
|
|
2834
2834
|
|
|
2835
|
-
script$p.render = render$
|
|
2835
|
+
script$p.render = render$2;
|
|
2836
2836
|
script$p.__file = "src/lib/components/ShForm.vue";
|
|
2837
2837
|
|
|
2838
2838
|
var script$o = {
|
|
@@ -3798,7 +3798,7 @@ const _hoisted_22$1 = {
|
|
|
3798
3798
|
class: "text-center"
|
|
3799
3799
|
};
|
|
3800
3800
|
|
|
3801
|
-
function render$
|
|
3801
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3802
3802
|
return ($props.paginationStyle !== 'loadMore')
|
|
3803
3803
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
3804
3804
|
vue.createElementVNode("div", _hoisted_2$6, [
|
|
@@ -3872,7 +3872,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3872
3872
|
]))
|
|
3873
3873
|
}
|
|
3874
3874
|
|
|
3875
|
-
script$c.render = render$
|
|
3875
|
+
script$c.render = render$1;
|
|
3876
3876
|
script$c.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3877
3877
|
|
|
3878
3878
|
const _hoisted_1$a = /*#__PURE__*/vue.createElementVNode("span", {
|
|
@@ -4481,7 +4481,7 @@ const _hoisted_63 = { key: 0 };
|
|
|
4481
4481
|
const _hoisted_64 = ["href"];
|
|
4482
4482
|
const _hoisted_65 = ["title", "onClick"];
|
|
4483
4483
|
|
|
4484
|
-
function render
|
|
4484
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4485
4485
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
4486
4486
|
const _component_sh_confirm_action = vue.resolveComponent("sh-confirm-action");
|
|
4487
4487
|
const _component_sh_silent_action = vue.resolveComponent("sh-silent-action");
|
|
@@ -4582,11 +4582,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4582
4582
|
class: "text-capitalize",
|
|
4583
4583
|
onClick: $event => ($options.changeKey('order_by',title(null)))
|
|
4584
4584
|
}, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
4585
|
-
: (
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4585
|
+
: (typeof title !== 'undefined')
|
|
4586
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
4587
|
+
key: 2,
|
|
4588
|
+
class: "text-capitalize",
|
|
4589
|
+
onClick: $event => ($options.changeKey('order_by',title))
|
|
4590
|
+
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
4591
|
+
: vue.createCommentVNode("v-if", true)
|
|
4590
4592
|
]))
|
|
4591
4593
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4592
4594
|
($props.actions)
|
|
@@ -4624,9 +4626,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4624
4626
|
onClick: $event => ($options.rowSelected(record))
|
|
4625
4627
|
}, [
|
|
4626
4628
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
|
|
4627
|
-
return (vue.openBlock(), vue.createElementBlock("td", {
|
|
4628
|
-
key: key[0]
|
|
4629
|
-
}, [
|
|
4629
|
+
return (vue.openBlock(), vue.createElementBlock("td", { key: key }, [
|
|
4630
4630
|
(typeof key === 'string' && $props.links && $props.links[key])
|
|
4631
4631
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4632
4632
|
key: 0,
|
|
@@ -4940,108 +4940,128 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4940
4940
|
]))
|
|
4941
4941
|
}
|
|
4942
4942
|
|
|
4943
|
-
script$9.render = render
|
|
4943
|
+
script$9.render = render;
|
|
4944
4944
|
script$9.__file = "src/lib/components/ShTable.vue";
|
|
4945
4945
|
|
|
4946
4946
|
var script$8 = {
|
|
4947
|
-
|
|
4948
|
-
props:
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
generatedId: null,
|
|
4953
|
-
isResponsive: typeof this.responsive !== 'undefined'
|
|
4954
|
-
}
|
|
4947
|
+
__name: 'ShTabs',
|
|
4948
|
+
props: {
|
|
4949
|
+
tabs: {
|
|
4950
|
+
type: Array,
|
|
4951
|
+
required: true
|
|
4955
4952
|
},
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
if (this.tabCounts) {
|
|
4960
|
-
this.setTabCounts(this.tabCounts);
|
|
4961
|
-
}
|
|
4962
|
-
}
|
|
4963
|
-
},
|
|
4964
|
-
tabCounts: function () {
|
|
4965
|
-
this.resetTabCounts();
|
|
4966
|
-
}
|
|
4953
|
+
baseUrl: {
|
|
4954
|
+
type: String,
|
|
4955
|
+
required: true
|
|
4967
4956
|
},
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
}
|
|
4957
|
+
sharedData: {
|
|
4958
|
+
type: Object
|
|
4971
4959
|
},
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
this.resetTabCounts();
|
|
4975
|
-
this.setTab(this.tabs[0]);
|
|
4960
|
+
tabCounts: {
|
|
4961
|
+
type: Object
|
|
4976
4962
|
},
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4963
|
+
responsive: {
|
|
4964
|
+
type: Object
|
|
4965
|
+
},
|
|
4966
|
+
classes: {
|
|
4967
|
+
type: String
|
|
4968
|
+
},
|
|
4969
|
+
classOne: {
|
|
4970
|
+
type: String
|
|
4971
|
+
},
|
|
4972
|
+
classTwo: {
|
|
4973
|
+
type: String
|
|
4974
|
+
}
|
|
4975
|
+
},
|
|
4976
|
+
setup(__props) {
|
|
4977
|
+
|
|
4978
|
+
const props = __props;
|
|
4979
|
+
|
|
4980
|
+
|
|
4981
|
+
const route = vueRouter.useRoute();
|
|
4982
|
+
const router = vueRouter.useRouter();
|
|
4983
|
+
const currentTab = vue.ref('');
|
|
4984
|
+
const path = vue.ref(route.path);
|
|
4985
|
+
|
|
4986
|
+
vue.onMounted(()=>{
|
|
4987
|
+
resetTabCounts();
|
|
4988
|
+
setTab(props.tabs[0]);
|
|
4989
|
+
});
|
|
4990
|
+
|
|
4991
|
+
vue.watch(()=>props.tabCounts, () => {
|
|
4992
|
+
resetTabCounts();
|
|
4993
|
+
});
|
|
4994
|
+
|
|
4995
|
+
vue.watch(()=>route.path,(newPath)=>{
|
|
4996
|
+
path.value = newPath;
|
|
4997
|
+
});
|
|
4998
|
+
|
|
4999
|
+
const setTab = (tab) => {
|
|
5000
|
+
if (tab) {
|
|
5001
|
+
currentTab.value = tab.replace(/_/g, ' ');
|
|
5002
|
+
}
|
|
5003
|
+
};
|
|
5004
|
+
const setTabCounts = (tabCounts) => {
|
|
5005
|
+
if (typeof tabCounts === 'object') {
|
|
5006
|
+
setCounts(tabCounts);
|
|
5007
|
+
} else {
|
|
5008
|
+
shApis.doGet(tabCounts).then(res => {
|
|
5009
|
+
setCounts(res.data);
|
|
5010
|
+
});
|
|
5011
|
+
}
|
|
5012
|
+
};
|
|
5013
|
+
const resetTabCounts = () => {
|
|
5014
|
+
const arr = route.fullPath.split('/');
|
|
5015
|
+
if (!tabExistsInUrl()) {
|
|
5016
|
+
router.push(route.fullPath + '/tab/' + props.tabs[0]);
|
|
5017
|
+
} else {
|
|
5018
|
+
currentTab.value = arr[arr.length - 1];
|
|
5019
|
+
}
|
|
5020
|
+
if (props.tabCounts) {
|
|
5021
|
+
setTabCounts(props.tabCounts);
|
|
5022
|
+
}
|
|
5023
|
+
};
|
|
5024
|
+
const tabExistsInUrl = () => {
|
|
5025
|
+
let exists = false;
|
|
5026
|
+
props.tabs.forEach(tab => {
|
|
5027
|
+
if (route.fullPath.includes(`/${tab}`)) {
|
|
5028
|
+
exists = true;
|
|
5029
|
+
}
|
|
5030
|
+
});
|
|
5031
|
+
return exists
|
|
5032
|
+
};
|
|
5033
|
+
const setCounts = (res) => {
|
|
5034
|
+
Object.keys(res).forEach(key => {
|
|
5035
|
+
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
5036
|
+
if (elem) {
|
|
5037
|
+
let txt = elem.innerHTML;
|
|
5038
|
+
txt = txt.split('<i class="d-none"></i>')[0];
|
|
5039
|
+
if (parseInt(res[key]) > 0) {
|
|
5040
|
+
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
5001
5041
|
}
|
|
5002
|
-
},
|
|
5003
|
-
tabExistsInUrl: function () {
|
|
5004
|
-
let exists = false;
|
|
5005
|
-
this.tabs.forEach(tab => {
|
|
5006
|
-
if (this.$route.fullPath.includes(tab)) {
|
|
5007
|
-
exists = true;
|
|
5008
|
-
}
|
|
5009
|
-
});
|
|
5010
|
-
return exists
|
|
5011
|
-
},
|
|
5012
|
-
setCounts: function (res) {
|
|
5013
|
-
Object.keys(res).forEach(key => {
|
|
5014
|
-
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
5015
|
-
if (elem) {
|
|
5016
|
-
let txt = elem.innerHTML;
|
|
5017
|
-
txt = txt.split('<i class="d-none"></i>')[0];
|
|
5018
|
-
if (parseInt(res[key]) > 0) {
|
|
5019
|
-
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
5020
|
-
}
|
|
5021
|
-
}
|
|
5022
|
-
});
|
|
5023
5042
|
}
|
|
5024
|
-
}
|
|
5043
|
+
});
|
|
5025
5044
|
};
|
|
5026
5045
|
|
|
5027
|
-
|
|
5046
|
+
return (_ctx, _cache) => {
|
|
5028
5047
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
5029
5048
|
const _component_router_view = vue.resolveComponent("router-view");
|
|
5030
5049
|
|
|
5031
5050
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5051
|
+
vue.createElementVNode("h3", null, vue.toDisplayString(path.value), 1 /* TEXT */),
|
|
5032
5052
|
vue.createElementVNode("ul", {
|
|
5033
|
-
class: vue.normalizeClass(["nav nav-tabs sh-tabs",
|
|
5053
|
+
class: vue.normalizeClass(["nav nav-tabs sh-tabs", __props.classes])
|
|
5034
5054
|
}, [
|
|
5035
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
5055
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.tabs, (tab) => {
|
|
5036
5056
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
5037
5057
|
class: "nav-item",
|
|
5038
5058
|
key: tab
|
|
5039
5059
|
}, [
|
|
5040
5060
|
vue.createVNode(_component_router_link, {
|
|
5041
|
-
onClick: $event => (
|
|
5061
|
+
onClick: $event => (setTab(tab)),
|
|
5042
5062
|
"active-class": 'active',
|
|
5043
5063
|
class: vue.normalizeClass(["nav-link text-capitalize", 'sh_tab_' + tab]),
|
|
5044
|
-
to:
|
|
5064
|
+
to: __props.baseUrl+'/tab/'+tab,
|
|
5045
5065
|
role: "tab"
|
|
5046
5066
|
}, {
|
|
5047
5067
|
default: vue.withCtx(() => [
|
|
@@ -5053,18 +5073,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5053
5073
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5054
5074
|
], 2 /* CLASS */),
|
|
5055
5075
|
vue.createElementVNode("div", {
|
|
5056
|
-
class: vue.normalizeClass(["tab-content",
|
|
5076
|
+
class: vue.normalizeClass(["tab-content", __props.classTwo])
|
|
5057
5077
|
}, [
|
|
5058
|
-
vue.
|
|
5059
|
-
currentTab:
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5078
|
+
(vue.openBlock(), vue.createBlock(_component_router_view, {
|
|
5079
|
+
currentTab: currentTab.value,
|
|
5080
|
+
key: path.value,
|
|
5081
|
+
sharedData: __props.sharedData,
|
|
5082
|
+
tabCounts: __props.tabCounts
|
|
5083
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"]))
|
|
5063
5084
|
], 2 /* CLASS */)
|
|
5064
5085
|
], 64 /* STABLE_FRAGMENT */))
|
|
5065
5086
|
}
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
};
|
|
5066
5090
|
|
|
5067
|
-
script$8.render = render;
|
|
5068
5091
|
script$8.__file = "src/lib/components/ShTabs.vue";
|
|
5069
5092
|
|
|
5070
5093
|
const _hoisted_1$7 = {
|
|
@@ -5516,6 +5539,7 @@ script$4.__file = "src/lib/components/core/Departments/department/ManagePermissi
|
|
|
5516
5539
|
|
|
5517
5540
|
const _hoisted_1$3 = ["href"];
|
|
5518
5541
|
|
|
5542
|
+
|
|
5519
5543
|
var script$3 = {
|
|
5520
5544
|
__name: 'ShPopups',
|
|
5521
5545
|
setup(__props) {
|
|
@@ -5530,58 +5554,65 @@ const router = vueRouter.useRouter();
|
|
|
5530
5554
|
const position = vue.ref(null);
|
|
5531
5555
|
const size = vue.ref(null);
|
|
5532
5556
|
const popups = [];
|
|
5533
|
-
const popupPaths =[];
|
|
5534
|
-
vue.watch(()=>route.meta, meta=>{
|
|
5557
|
+
const popupPaths = [];
|
|
5558
|
+
vue.watch(() => route.meta, meta => {
|
|
5535
5559
|
popUp.value = meta.popUp ?? meta.popup;
|
|
5536
|
-
if(popUp.value){
|
|
5560
|
+
if (popUp.value) {
|
|
5537
5561
|
// popups.push(meta)
|
|
5538
5562
|
!popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta);
|
|
5539
5563
|
position.value = meta.position ?? meta.side;
|
|
5540
5564
|
size.value = meta.size;
|
|
5541
|
-
componentView.value = vue.markRaw(route.matched[route.matched.length-1].components.default);
|
|
5542
|
-
setTimeout(()=>{
|
|
5565
|
+
componentView.value = vue.markRaw(route.matched[route.matched.length - 1].components.default);
|
|
5566
|
+
setTimeout(() => {
|
|
5543
5567
|
initPopup();
|
|
5544
|
-
},100);
|
|
5568
|
+
}, 100);
|
|
5545
5569
|
} else {
|
|
5546
5570
|
//no pop up, check if we have any unclosed backdrop
|
|
5547
|
-
setTimeout(()=>{
|
|
5571
|
+
setTimeout(() => {
|
|
5548
5572
|
closeOrphanedBackdrops();
|
|
5549
|
-
},100);
|
|
5573
|
+
}, 100);
|
|
5550
5574
|
}
|
|
5551
5575
|
});
|
|
5552
|
-
const closeOrphanedBackdrops = ()=>{
|
|
5576
|
+
const closeOrphanedBackdrops = () => {
|
|
5553
5577
|
const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
|
|
5554
|
-
if(offCanvasBackdrop) {
|
|
5555
|
-
if(!document.querySelector('.offcanvas.show')){
|
|
5578
|
+
if (offCanvasBackdrop) {
|
|
5579
|
+
if (!document.querySelector('.offcanvas.show')) {
|
|
5556
5580
|
offCanvasBackdrop.remove();
|
|
5557
5581
|
}
|
|
5558
5582
|
}
|
|
5559
5583
|
const modalBackdrop = document.querySelector('.modal-backdrop');
|
|
5560
|
-
if(modalBackdrop) {
|
|
5561
|
-
if(!document.querySelector('.modal.show')){
|
|
5584
|
+
if (modalBackdrop) {
|
|
5585
|
+
if (!document.querySelector('.modal.show')) {
|
|
5562
5586
|
modalBackdrop.remove();
|
|
5563
5587
|
}
|
|
5564
5588
|
}
|
|
5565
5589
|
};
|
|
5566
|
-
const initPopup = ()=>{
|
|
5567
|
-
if(popUp.value === 'modal') {
|
|
5590
|
+
const initPopup = () => {
|
|
5591
|
+
if (popUp.value === 'modal') {
|
|
5568
5592
|
// modalButton.value.click()
|
|
5569
5593
|
const modal = document.getElementById(modalId);
|
|
5570
|
-
const bsModal = new bootstrap.Modal(modal,{});
|
|
5594
|
+
const bsModal = new bootstrap.Modal(modal, {});
|
|
5571
5595
|
bsModal.show();
|
|
5572
5596
|
modal.addEventListener('hidden.bs.modal', event => {
|
|
5573
5597
|
event.target.id === modalId && goBack();
|
|
5574
5598
|
});
|
|
5575
|
-
} else if (['offcanvas','canvas','offCanvas'].includes(popUp.value)){
|
|
5599
|
+
} else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
|
|
5576
5600
|
const offCanvas = document.getElementById(canvasId);
|
|
5577
|
-
const bsOffCanvas = new bootstrap.Offcanvas(offCanvas,{});
|
|
5601
|
+
const bsOffCanvas = new bootstrap.Offcanvas(offCanvas, {});
|
|
5578
5602
|
bsOffCanvas.show();
|
|
5579
5603
|
offCanvas.addEventListener('hidden.bs.offcanvas', event => {
|
|
5580
5604
|
event.target.id === canvasId && goBack();
|
|
5581
5605
|
});
|
|
5582
5606
|
}
|
|
5583
5607
|
};
|
|
5584
|
-
const goBack = ()=>
|
|
5608
|
+
const goBack = () => {
|
|
5609
|
+
if (route.matched.length) {
|
|
5610
|
+
let backUrl = route.matched[route.matched.length - 2].path;
|
|
5611
|
+
const params = route.params;
|
|
5612
|
+
Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]));
|
|
5613
|
+
router.push(backUrl);
|
|
5614
|
+
}
|
|
5615
|
+
};
|
|
5585
5616
|
|
|
5586
5617
|
return (_ctx, _cache) => {
|
|
5587
5618
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
package/dist/library.mjs
CHANGED
|
@@ -1932,7 +1932,7 @@ const _hoisted_2$d = {
|
|
|
1932
1932
|
const _hoisted_3$c = ["src"];
|
|
1933
1933
|
const _hoisted_4$c = ["value"];
|
|
1934
1934
|
|
|
1935
|
-
function render$
|
|
1935
|
+
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1936
1936
|
return (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
1937
1937
|
($data.selectedCountry)
|
|
1938
1938
|
? (openBlock(), createElementBlock("div", _hoisted_2$d, [
|
|
@@ -1967,7 +1967,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1967
1967
|
]))
|
|
1968
1968
|
}
|
|
1969
1969
|
|
|
1970
|
-
script$s.render = render$
|
|
1970
|
+
script$s.render = render$4;
|
|
1971
1971
|
script$s.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1972
1972
|
|
|
1973
1973
|
var script$r = {
|
|
@@ -2015,7 +2015,7 @@ const _hoisted_1$m = /*#__PURE__*/createElementVNode("textarea", {
|
|
|
2015
2015
|
"data-cy": "tinymce_editor"
|
|
2016
2016
|
}, null, -1 /* HOISTED */);
|
|
2017
2017
|
|
|
2018
|
-
function render$
|
|
2018
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2019
2019
|
const _component_editor = resolveComponent("editor");
|
|
2020
2020
|
|
|
2021
2021
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -2044,7 +2044,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2044
2044
|
], 64 /* STABLE_FRAGMENT */))
|
|
2045
2045
|
}
|
|
2046
2046
|
|
|
2047
|
-
script$r.render = render$
|
|
2047
|
+
script$r.render = render$3;
|
|
2048
2048
|
script$r.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2049
2049
|
|
|
2050
2050
|
const _hoisted_1$l = {
|
|
@@ -2596,7 +2596,7 @@ const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
|
|
|
2596
2596
|
"aria-hidden": "true"
|
|
2597
2597
|
}, null, -1 /* HOISTED */);
|
|
2598
2598
|
|
|
2599
|
-
function render$
|
|
2599
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2600
2600
|
const _component_phone_input = resolveComponent("phone-input");
|
|
2601
2601
|
const _component_ShSuggest = resolveComponent("ShSuggest");
|
|
2602
2602
|
const _component_ShEditor = resolveComponent("ShEditor");
|
|
@@ -2819,7 +2819,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2819
2819
|
], 64 /* STABLE_FRAGMENT */))
|
|
2820
2820
|
}
|
|
2821
2821
|
|
|
2822
|
-
script$p.render = render$
|
|
2822
|
+
script$p.render = render$2;
|
|
2823
2823
|
script$p.__file = "src/lib/components/ShForm.vue";
|
|
2824
2824
|
|
|
2825
2825
|
var script$o = {
|
|
@@ -3785,7 +3785,7 @@ const _hoisted_22$1 = {
|
|
|
3785
3785
|
class: "text-center"
|
|
3786
3786
|
};
|
|
3787
3787
|
|
|
3788
|
-
function render$
|
|
3788
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3789
3789
|
return ($props.paginationStyle !== 'loadMore')
|
|
3790
3790
|
? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
3791
3791
|
createElementVNode("div", _hoisted_2$6, [
|
|
@@ -3859,7 +3859,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3859
3859
|
]))
|
|
3860
3860
|
}
|
|
3861
3861
|
|
|
3862
|
-
script$c.render = render$
|
|
3862
|
+
script$c.render = render$1;
|
|
3863
3863
|
script$c.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3864
3864
|
|
|
3865
3865
|
const _hoisted_1$a = /*#__PURE__*/createElementVNode("span", {
|
|
@@ -4468,7 +4468,7 @@ const _hoisted_63 = { key: 0 };
|
|
|
4468
4468
|
const _hoisted_64 = ["href"];
|
|
4469
4469
|
const _hoisted_65 = ["title", "onClick"];
|
|
4470
4470
|
|
|
4471
|
-
function render
|
|
4471
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4472
4472
|
const _component_router_link = resolveComponent("router-link");
|
|
4473
4473
|
const _component_sh_confirm_action = resolveComponent("sh-confirm-action");
|
|
4474
4474
|
const _component_sh_silent_action = resolveComponent("sh-silent-action");
|
|
@@ -4569,11 +4569,13 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4569
4569
|
class: "text-capitalize",
|
|
4570
4570
|
onClick: $event => ($options.changeKey('order_by',title(null)))
|
|
4571
4571
|
}, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
4572
|
-
: (
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4572
|
+
: (typeof title !== 'undefined')
|
|
4573
|
+
? (openBlock(), createElementBlock("a", {
|
|
4574
|
+
key: 2,
|
|
4575
|
+
class: "text-capitalize",
|
|
4576
|
+
onClick: $event => ($options.changeKey('order_by',title))
|
|
4577
|
+
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
4578
|
+
: createCommentVNode("v-if", true)
|
|
4577
4579
|
]))
|
|
4578
4580
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4579
4581
|
($props.actions)
|
|
@@ -4611,9 +4613,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4611
4613
|
onClick: $event => ($options.rowSelected(record))
|
|
4612
4614
|
}, [
|
|
4613
4615
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.headers, (key) => {
|
|
4614
|
-
return (openBlock(), createElementBlock("td", {
|
|
4615
|
-
key: key[0]
|
|
4616
|
-
}, [
|
|
4616
|
+
return (openBlock(), createElementBlock("td", { key: key }, [
|
|
4617
4617
|
(typeof key === 'string' && $props.links && $props.links[key])
|
|
4618
4618
|
? (openBlock(), createBlock(_component_router_link, {
|
|
4619
4619
|
key: 0,
|
|
@@ -4927,108 +4927,128 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4927
4927
|
]))
|
|
4928
4928
|
}
|
|
4929
4929
|
|
|
4930
|
-
script$9.render = render
|
|
4930
|
+
script$9.render = render;
|
|
4931
4931
|
script$9.__file = "src/lib/components/ShTable.vue";
|
|
4932
4932
|
|
|
4933
4933
|
var script$8 = {
|
|
4934
|
-
|
|
4935
|
-
props:
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
generatedId: null,
|
|
4940
|
-
isResponsive: typeof this.responsive !== 'undefined'
|
|
4941
|
-
}
|
|
4934
|
+
__name: 'ShTabs',
|
|
4935
|
+
props: {
|
|
4936
|
+
tabs: {
|
|
4937
|
+
type: Array,
|
|
4938
|
+
required: true
|
|
4942
4939
|
},
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
if (this.tabCounts) {
|
|
4947
|
-
this.setTabCounts(this.tabCounts);
|
|
4948
|
-
}
|
|
4949
|
-
}
|
|
4950
|
-
},
|
|
4951
|
-
tabCounts: function () {
|
|
4952
|
-
this.resetTabCounts();
|
|
4953
|
-
}
|
|
4940
|
+
baseUrl: {
|
|
4941
|
+
type: String,
|
|
4942
|
+
required: true
|
|
4954
4943
|
},
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
}
|
|
4944
|
+
sharedData: {
|
|
4945
|
+
type: Object
|
|
4958
4946
|
},
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
this.resetTabCounts();
|
|
4962
|
-
this.setTab(this.tabs[0]);
|
|
4947
|
+
tabCounts: {
|
|
4948
|
+
type: Object
|
|
4963
4949
|
},
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4950
|
+
responsive: {
|
|
4951
|
+
type: Object
|
|
4952
|
+
},
|
|
4953
|
+
classes: {
|
|
4954
|
+
type: String
|
|
4955
|
+
},
|
|
4956
|
+
classOne: {
|
|
4957
|
+
type: String
|
|
4958
|
+
},
|
|
4959
|
+
classTwo: {
|
|
4960
|
+
type: String
|
|
4961
|
+
}
|
|
4962
|
+
},
|
|
4963
|
+
setup(__props) {
|
|
4964
|
+
|
|
4965
|
+
const props = __props;
|
|
4966
|
+
|
|
4967
|
+
|
|
4968
|
+
const route = useRoute();
|
|
4969
|
+
const router = useRouter();
|
|
4970
|
+
const currentTab = ref('');
|
|
4971
|
+
const path = ref(route.path);
|
|
4972
|
+
|
|
4973
|
+
onMounted(()=>{
|
|
4974
|
+
resetTabCounts();
|
|
4975
|
+
setTab(props.tabs[0]);
|
|
4976
|
+
});
|
|
4977
|
+
|
|
4978
|
+
watch(()=>props.tabCounts, () => {
|
|
4979
|
+
resetTabCounts();
|
|
4980
|
+
});
|
|
4981
|
+
|
|
4982
|
+
watch(()=>route.path,(newPath)=>{
|
|
4983
|
+
path.value = newPath;
|
|
4984
|
+
});
|
|
4985
|
+
|
|
4986
|
+
const setTab = (tab) => {
|
|
4987
|
+
if (tab) {
|
|
4988
|
+
currentTab.value = tab.replace(/_/g, ' ');
|
|
4989
|
+
}
|
|
4990
|
+
};
|
|
4991
|
+
const setTabCounts = (tabCounts) => {
|
|
4992
|
+
if (typeof tabCounts === 'object') {
|
|
4993
|
+
setCounts(tabCounts);
|
|
4994
|
+
} else {
|
|
4995
|
+
shApis.doGet(tabCounts).then(res => {
|
|
4996
|
+
setCounts(res.data);
|
|
4997
|
+
});
|
|
4998
|
+
}
|
|
4999
|
+
};
|
|
5000
|
+
const resetTabCounts = () => {
|
|
5001
|
+
const arr = route.fullPath.split('/');
|
|
5002
|
+
if (!tabExistsInUrl()) {
|
|
5003
|
+
router.push(route.fullPath + '/tab/' + props.tabs[0]);
|
|
5004
|
+
} else {
|
|
5005
|
+
currentTab.value = arr[arr.length - 1];
|
|
5006
|
+
}
|
|
5007
|
+
if (props.tabCounts) {
|
|
5008
|
+
setTabCounts(props.tabCounts);
|
|
5009
|
+
}
|
|
5010
|
+
};
|
|
5011
|
+
const tabExistsInUrl = () => {
|
|
5012
|
+
let exists = false;
|
|
5013
|
+
props.tabs.forEach(tab => {
|
|
5014
|
+
if (route.fullPath.includes(`/${tab}`)) {
|
|
5015
|
+
exists = true;
|
|
5016
|
+
}
|
|
5017
|
+
});
|
|
5018
|
+
return exists
|
|
5019
|
+
};
|
|
5020
|
+
const setCounts = (res) => {
|
|
5021
|
+
Object.keys(res).forEach(key => {
|
|
5022
|
+
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
5023
|
+
if (elem) {
|
|
5024
|
+
let txt = elem.innerHTML;
|
|
5025
|
+
txt = txt.split('<i class="d-none"></i>')[0];
|
|
5026
|
+
if (parseInt(res[key]) > 0) {
|
|
5027
|
+
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
4988
5028
|
}
|
|
4989
|
-
},
|
|
4990
|
-
tabExistsInUrl: function () {
|
|
4991
|
-
let exists = false;
|
|
4992
|
-
this.tabs.forEach(tab => {
|
|
4993
|
-
if (this.$route.fullPath.includes(tab)) {
|
|
4994
|
-
exists = true;
|
|
4995
|
-
}
|
|
4996
|
-
});
|
|
4997
|
-
return exists
|
|
4998
|
-
},
|
|
4999
|
-
setCounts: function (res) {
|
|
5000
|
-
Object.keys(res).forEach(key => {
|
|
5001
|
-
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
5002
|
-
if (elem) {
|
|
5003
|
-
let txt = elem.innerHTML;
|
|
5004
|
-
txt = txt.split('<i class="d-none"></i>')[0];
|
|
5005
|
-
if (parseInt(res[key]) > 0) {
|
|
5006
|
-
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
5007
|
-
}
|
|
5008
|
-
}
|
|
5009
|
-
});
|
|
5010
5029
|
}
|
|
5011
|
-
}
|
|
5030
|
+
});
|
|
5012
5031
|
};
|
|
5013
5032
|
|
|
5014
|
-
|
|
5033
|
+
return (_ctx, _cache) => {
|
|
5015
5034
|
const _component_router_link = resolveComponent("router-link");
|
|
5016
5035
|
const _component_router_view = resolveComponent("router-view");
|
|
5017
5036
|
|
|
5018
5037
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
5038
|
+
createElementVNode("h3", null, toDisplayString(path.value), 1 /* TEXT */),
|
|
5019
5039
|
createElementVNode("ul", {
|
|
5020
|
-
class: normalizeClass(["nav nav-tabs sh-tabs",
|
|
5040
|
+
class: normalizeClass(["nav nav-tabs sh-tabs", __props.classes])
|
|
5021
5041
|
}, [
|
|
5022
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
5042
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
|
|
5023
5043
|
return (openBlock(), createElementBlock("li", {
|
|
5024
5044
|
class: "nav-item",
|
|
5025
5045
|
key: tab
|
|
5026
5046
|
}, [
|
|
5027
5047
|
createVNode(_component_router_link, {
|
|
5028
|
-
onClick: $event => (
|
|
5048
|
+
onClick: $event => (setTab(tab)),
|
|
5029
5049
|
"active-class": 'active',
|
|
5030
5050
|
class: normalizeClass(["nav-link text-capitalize", 'sh_tab_' + tab]),
|
|
5031
|
-
to:
|
|
5051
|
+
to: __props.baseUrl+'/tab/'+tab,
|
|
5032
5052
|
role: "tab"
|
|
5033
5053
|
}, {
|
|
5034
5054
|
default: withCtx(() => [
|
|
@@ -5040,18 +5060,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5040
5060
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5041
5061
|
], 2 /* CLASS */),
|
|
5042
5062
|
createElementVNode("div", {
|
|
5043
|
-
class: normalizeClass(["tab-content",
|
|
5063
|
+
class: normalizeClass(["tab-content", __props.classTwo])
|
|
5044
5064
|
}, [
|
|
5045
|
-
|
|
5046
|
-
currentTab:
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5065
|
+
(openBlock(), createBlock(_component_router_view, {
|
|
5066
|
+
currentTab: currentTab.value,
|
|
5067
|
+
key: path.value,
|
|
5068
|
+
sharedData: __props.sharedData,
|
|
5069
|
+
tabCounts: __props.tabCounts
|
|
5070
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"]))
|
|
5050
5071
|
], 2 /* CLASS */)
|
|
5051
5072
|
], 64 /* STABLE_FRAGMENT */))
|
|
5052
5073
|
}
|
|
5074
|
+
}
|
|
5075
|
+
|
|
5076
|
+
};
|
|
5053
5077
|
|
|
5054
|
-
script$8.render = render;
|
|
5055
5078
|
script$8.__file = "src/lib/components/ShTabs.vue";
|
|
5056
5079
|
|
|
5057
5080
|
const _hoisted_1$7 = {
|
|
@@ -5503,6 +5526,7 @@ script$4.__file = "src/lib/components/core/Departments/department/ManagePermissi
|
|
|
5503
5526
|
|
|
5504
5527
|
const _hoisted_1$3 = ["href"];
|
|
5505
5528
|
|
|
5529
|
+
|
|
5506
5530
|
var script$3 = {
|
|
5507
5531
|
__name: 'ShPopups',
|
|
5508
5532
|
setup(__props) {
|
|
@@ -5517,58 +5541,65 @@ const router = useRouter();
|
|
|
5517
5541
|
const position = ref(null);
|
|
5518
5542
|
const size = ref(null);
|
|
5519
5543
|
const popups = [];
|
|
5520
|
-
const popupPaths =[];
|
|
5521
|
-
watch(()=>route.meta, meta=>{
|
|
5544
|
+
const popupPaths = [];
|
|
5545
|
+
watch(() => route.meta, meta => {
|
|
5522
5546
|
popUp.value = meta.popUp ?? meta.popup;
|
|
5523
|
-
if(popUp.value){
|
|
5547
|
+
if (popUp.value) {
|
|
5524
5548
|
// popups.push(meta)
|
|
5525
5549
|
!popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta);
|
|
5526
5550
|
position.value = meta.position ?? meta.side;
|
|
5527
5551
|
size.value = meta.size;
|
|
5528
|
-
componentView.value = markRaw(route.matched[route.matched.length-1].components.default);
|
|
5529
|
-
setTimeout(()=>{
|
|
5552
|
+
componentView.value = markRaw(route.matched[route.matched.length - 1].components.default);
|
|
5553
|
+
setTimeout(() => {
|
|
5530
5554
|
initPopup();
|
|
5531
|
-
},100);
|
|
5555
|
+
}, 100);
|
|
5532
5556
|
} else {
|
|
5533
5557
|
//no pop up, check if we have any unclosed backdrop
|
|
5534
|
-
setTimeout(()=>{
|
|
5558
|
+
setTimeout(() => {
|
|
5535
5559
|
closeOrphanedBackdrops();
|
|
5536
|
-
},100);
|
|
5560
|
+
}, 100);
|
|
5537
5561
|
}
|
|
5538
5562
|
});
|
|
5539
|
-
const closeOrphanedBackdrops = ()=>{
|
|
5563
|
+
const closeOrphanedBackdrops = () => {
|
|
5540
5564
|
const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
|
|
5541
|
-
if(offCanvasBackdrop) {
|
|
5542
|
-
if(!document.querySelector('.offcanvas.show')){
|
|
5565
|
+
if (offCanvasBackdrop) {
|
|
5566
|
+
if (!document.querySelector('.offcanvas.show')) {
|
|
5543
5567
|
offCanvasBackdrop.remove();
|
|
5544
5568
|
}
|
|
5545
5569
|
}
|
|
5546
5570
|
const modalBackdrop = document.querySelector('.modal-backdrop');
|
|
5547
|
-
if(modalBackdrop) {
|
|
5548
|
-
if(!document.querySelector('.modal.show')){
|
|
5571
|
+
if (modalBackdrop) {
|
|
5572
|
+
if (!document.querySelector('.modal.show')) {
|
|
5549
5573
|
modalBackdrop.remove();
|
|
5550
5574
|
}
|
|
5551
5575
|
}
|
|
5552
5576
|
};
|
|
5553
|
-
const initPopup = ()=>{
|
|
5554
|
-
if(popUp.value === 'modal') {
|
|
5577
|
+
const initPopup = () => {
|
|
5578
|
+
if (popUp.value === 'modal') {
|
|
5555
5579
|
// modalButton.value.click()
|
|
5556
5580
|
const modal = document.getElementById(modalId);
|
|
5557
|
-
const bsModal = new Modal(modal,{});
|
|
5581
|
+
const bsModal = new Modal(modal, {});
|
|
5558
5582
|
bsModal.show();
|
|
5559
5583
|
modal.addEventListener('hidden.bs.modal', event => {
|
|
5560
5584
|
event.target.id === modalId && goBack();
|
|
5561
5585
|
});
|
|
5562
|
-
} else if (['offcanvas','canvas','offCanvas'].includes(popUp.value)){
|
|
5586
|
+
} else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
|
|
5563
5587
|
const offCanvas = document.getElementById(canvasId);
|
|
5564
|
-
const bsOffCanvas = new Offcanvas(offCanvas,{});
|
|
5588
|
+
const bsOffCanvas = new Offcanvas(offCanvas, {});
|
|
5565
5589
|
bsOffCanvas.show();
|
|
5566
5590
|
offCanvas.addEventListener('hidden.bs.offcanvas', event => {
|
|
5567
5591
|
event.target.id === canvasId && goBack();
|
|
5568
5592
|
});
|
|
5569
5593
|
}
|
|
5570
5594
|
};
|
|
5571
|
-
const goBack = ()=>
|
|
5595
|
+
const goBack = () => {
|
|
5596
|
+
if (route.matched.length) {
|
|
5597
|
+
let backUrl = route.matched[route.matched.length - 2].path;
|
|
5598
|
+
const params = route.params;
|
|
5599
|
+
Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]));
|
|
5600
|
+
router.push(backUrl);
|
|
5601
|
+
}
|
|
5602
|
+
};
|
|
5572
5603
|
|
|
5573
5604
|
return (_ctx, _cache) => {
|
|
5574
5605
|
return (openBlock(), createElementBlock(Fragment, null, [
|