@iankibetsh/shframework 5.4.8 → 5.5.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 +104 -100
- package/dist/library.mjs +104 -100
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2116,7 +2116,7 @@ const _hoisted_2$j = {
|
|
|
2116
2116
|
style: {"display":"contents"}
|
|
2117
2117
|
};
|
|
2118
2118
|
const _hoisted_3$g = ["src"];
|
|
2119
|
-
const _hoisted_4$
|
|
2119
|
+
const _hoisted_4$f = ["value"];
|
|
2120
2120
|
const _hoisted_5$c = ["disabled"];
|
|
2121
2121
|
|
|
2122
2122
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -2136,7 +2136,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2136
2136
|
return (vue.openBlock(), vue.createElementBlock("option", {
|
|
2137
2137
|
value: country,
|
|
2138
2138
|
key: country.dialCode
|
|
2139
|
-
}, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$
|
|
2139
|
+
}, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$f))
|
|
2140
2140
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2141
2141
|
], 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
2142
2142
|
[vue.vModelSelect, $data.selectedCountry]
|
|
@@ -2164,7 +2164,7 @@ const _hoisted_1$q = {
|
|
|
2164
2164
|
};
|
|
2165
2165
|
const _hoisted_2$i = ["id"];
|
|
2166
2166
|
const _hoisted_3$f = { class: "sh-suggestions-holder" };
|
|
2167
|
-
const _hoisted_4$
|
|
2167
|
+
const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2168
2168
|
const _hoisted_5$b = ["onClick"];
|
|
2169
2169
|
const _hoisted_6$9 = ["id"];
|
|
2170
2170
|
const _hoisted_7$8 = ["id", "aria-labelledby"];
|
|
@@ -2333,7 +2333,7 @@ return (_ctx, _cache) => {
|
|
|
2333
2333
|
}, [
|
|
2334
2334
|
vue.createElementVNode("div", _hoisted_3$f, [
|
|
2335
2335
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(selectedSuggestions), (sgt) => {
|
|
2336
|
-
return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_4$
|
|
2336
|
+
return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_4$e, [
|
|
2337
2337
|
vue.createTextVNode(vue.toDisplayString(sgt.name) + " ", 1 /* TEXT */),
|
|
2338
2338
|
vue.createElementVNode("button", {
|
|
2339
2339
|
onClick: $event => (removeSuggestion(sgt.id)),
|
|
@@ -2760,7 +2760,7 @@ const _hoisted_2$h = {
|
|
|
2760
2760
|
role: "alert"
|
|
2761
2761
|
};
|
|
2762
2762
|
const _hoisted_3$e = { key: 0 };
|
|
2763
|
-
const _hoisted_4$
|
|
2763
|
+
const _hoisted_4$d = { key: 1 };
|
|
2764
2764
|
const _hoisted_5$a = { class: "row" };
|
|
2765
2765
|
const _hoisted_6$8 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2766
2766
|
const _hoisted_7$7 = { class: "col-md-12" };
|
|
@@ -2802,7 +2802,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2802
2802
|
_cache[2] || (_cache[2] = vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */)),
|
|
2803
2803
|
(_ctx.errorText)
|
|
2804
2804
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2805
|
-
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
2805
|
+
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, "Unexpected Error Occurred")),
|
|
2806
2806
|
vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2807
2807
|
]))
|
|
2808
2808
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -3373,7 +3373,7 @@ const _hoisted_3$d = {
|
|
|
3373
3373
|
key: 0,
|
|
3374
3374
|
class: "text-danger sh-required"
|
|
3375
3375
|
};
|
|
3376
|
-
const _hoisted_4$
|
|
3376
|
+
const _hoisted_4$c = ["innerHTML"];
|
|
3377
3377
|
const _hoisted_5$9 = {
|
|
3378
3378
|
key: 2,
|
|
3379
3379
|
class: "form-notch"
|
|
@@ -3680,7 +3680,7 @@ return (_ctx, _cache) => {
|
|
|
3680
3680
|
key: 1,
|
|
3681
3681
|
class: vue.normalizeClass(getElementClass('formLabel')),
|
|
3682
3682
|
innerHTML: field.label
|
|
3683
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_4$
|
|
3683
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_4$c))
|
|
3684
3684
|
: vue.createCommentVNode("v-if", true),
|
|
3685
3685
|
(vue.unref(isFloating))
|
|
3686
3686
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$9, [...(_cache[1] || (_cache[1] = [
|
|
@@ -3736,7 +3736,7 @@ script$q.__file = "src/lib/components/ShAutoForm.vue";
|
|
|
3736
3736
|
const _hoisted_1$l = ["id", "data-bs-backdrop"];
|
|
3737
3737
|
const _hoisted_2$f = { class: "modal-content" };
|
|
3738
3738
|
const _hoisted_3$c = { class: "modal-header" };
|
|
3739
|
-
const _hoisted_4$
|
|
3739
|
+
const _hoisted_4$b = { class: "modal-title flex-fill" };
|
|
3740
3740
|
const _hoisted_5$8 = { class: "modal-body" };
|
|
3741
3741
|
const _hoisted_6$6 = { class: "section" };
|
|
3742
3742
|
|
|
@@ -3801,7 +3801,7 @@ return (_ctx, _cache) => {
|
|
|
3801
3801
|
}, [
|
|
3802
3802
|
vue.createElementVNode("div", _hoisted_2$f, [
|
|
3803
3803
|
vue.createElementVNode("div", _hoisted_3$c, [
|
|
3804
|
-
vue.createElementVNode("h3", _hoisted_4$
|
|
3804
|
+
vue.createElementVNode("h3", _hoisted_4$b, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3805
3805
|
_cache[0] || (_cache[0] = vue.createElementVNode("button", {
|
|
3806
3806
|
type: "button",
|
|
3807
3807
|
class: "btn-close sh-modal-close",
|
|
@@ -4065,7 +4065,7 @@ const _hoisted_3$a = {
|
|
|
4065
4065
|
class: "offcanvas-title",
|
|
4066
4066
|
id: "offcanvasScrollingLabel"
|
|
4067
4067
|
};
|
|
4068
|
-
const _hoisted_4$
|
|
4068
|
+
const _hoisted_4$a = {
|
|
4069
4069
|
type: "button",
|
|
4070
4070
|
ref: "closecanvas",
|
|
4071
4071
|
class: "btn-close sh-offcanvas-close",
|
|
@@ -4122,7 +4122,7 @@ return (_ctx, _cache) => {
|
|
|
4122
4122
|
}, [
|
|
4123
4123
|
vue.createElementVNode("div", _hoisted_2$d, [
|
|
4124
4124
|
vue.createElementVNode("h5", _hoisted_3$a, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
4125
|
-
vue.createElementVNode("button", _hoisted_4$
|
|
4125
|
+
vue.createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
|
|
4126
4126
|
]),
|
|
4127
4127
|
vue.createElementVNode("div", _hoisted_5$7, [
|
|
4128
4128
|
vue.renderSlot(_ctx.$slots, "default")
|
|
@@ -4618,7 +4618,7 @@ const _hoisted_3$9 = {
|
|
|
4618
4618
|
key: 1,
|
|
4619
4619
|
class: "bi bi-three-dots"
|
|
4620
4620
|
};
|
|
4621
|
-
const _hoisted_4$
|
|
4621
|
+
const _hoisted_4$9 = {
|
|
4622
4622
|
key: 2,
|
|
4623
4623
|
class: "bi bi-three-dots-vertical"
|
|
4624
4624
|
};
|
|
@@ -4647,7 +4647,7 @@ return (_ctx, _cache) => {
|
|
|
4647
4647
|
}, null, 2 /* CLASS */))
|
|
4648
4648
|
: (vue.unref(type) === 'dropdown-horizontal')
|
|
4649
4649
|
? (vue.openBlock(), vue.createElementBlock("i", _hoisted_3$9))
|
|
4650
|
-
: (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$
|
|
4650
|
+
: (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$9))
|
|
4651
4651
|
]),
|
|
4652
4652
|
vue.createElementVNode("ul", _hoisted_5$6, [
|
|
4653
4653
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(actionItems), (act) => {
|
|
@@ -4765,7 +4765,7 @@ var script$f = {
|
|
|
4765
4765
|
const _hoisted_1$d = { key: 0 };
|
|
4766
4766
|
const _hoisted_2$a = { class: "record_count_body mb-3" };
|
|
4767
4767
|
const _hoisted_3$8 = ["value"];
|
|
4768
|
-
const _hoisted_4$
|
|
4768
|
+
const _hoisted_4$8 = { class: "record_counts" };
|
|
4769
4769
|
const _hoisted_5$5 = {
|
|
4770
4770
|
key: 0,
|
|
4771
4771
|
"aria-label": "Page navigation"
|
|
@@ -4816,7 +4816,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4816
4816
|
], 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
4817
4817
|
[vue.vModelSelect, $data.per_page]
|
|
4818
4818
|
]),
|
|
4819
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
4819
|
+
vue.createElementVNode("span", _hoisted_4$8, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
4820
4820
|
]),
|
|
4821
4821
|
($props.pagination_data != null)
|
|
4822
4822
|
? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_5$5, [
|
|
@@ -4898,7 +4898,7 @@ const _hoisted_3$7 = {
|
|
|
4898
4898
|
"data-bs-toggle": "dropdown",
|
|
4899
4899
|
"aria-expanded": "false"
|
|
4900
4900
|
};
|
|
4901
|
-
const _hoisted_4$
|
|
4901
|
+
const _hoisted_4$7 = ["innerHTML"];
|
|
4902
4902
|
const _hoisted_5$4 = {
|
|
4903
4903
|
class: "dropdown-menu sh-range-dropdown",
|
|
4904
4904
|
"aria-labelledby": "dropdownMenuLink"
|
|
@@ -5024,7 +5024,7 @@ return (_ctx, _cache) => {
|
|
|
5024
5024
|
vue.createElementVNode("div", _hoisted_3$7, [
|
|
5025
5025
|
_cache[2] || (_cache[2] = vue.createElementVNode("i", { class: "bi-calendar text-dark" }, null, -1 /* HOISTED */)),
|
|
5026
5026
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
5027
|
-
vue.createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$
|
|
5027
|
+
vue.createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$7)
|
|
5028
5028
|
]),
|
|
5029
5029
|
vue.createElementVNode("div", _hoisted_5$4, [
|
|
5030
5030
|
vue.createElementVNode("ul", _hoisted_6$4, [
|
|
@@ -5084,7 +5084,7 @@ const _hoisted_2$8 = {
|
|
|
5084
5084
|
class: "col-md-4 mb-2"
|
|
5085
5085
|
};
|
|
5086
5086
|
const _hoisted_3$6 = ["disabled"];
|
|
5087
|
-
const _hoisted_4$
|
|
5087
|
+
const _hoisted_4$6 = {
|
|
5088
5088
|
key: 1,
|
|
5089
5089
|
class: "row"
|
|
5090
5090
|
};
|
|
@@ -5586,7 +5586,7 @@ return (_ctx, _cache) => {
|
|
|
5586
5586
|
]))
|
|
5587
5587
|
: vue.createCommentVNode("v-if", true),
|
|
5588
5588
|
(!__props.hideSearch)
|
|
5589
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
5589
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$6, [
|
|
5590
5590
|
vue.createElementVNode("div", _hoisted_5$3, [
|
|
5591
5591
|
vue.createElementVNode("div", {
|
|
5592
5592
|
class: vue.normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
@@ -5995,11 +5995,15 @@ return (_ctx, _cache) => {
|
|
|
5995
5995
|
script$d.__file = "src/lib/components/ShTable.vue";
|
|
5996
5996
|
|
|
5997
5997
|
const _hoisted_1$a = {
|
|
5998
|
+
key: 0,
|
|
5999
|
+
class: "sh_tab_count"
|
|
6000
|
+
};
|
|
6001
|
+
const _hoisted_2$7 = {
|
|
5998
6002
|
key: 1,
|
|
5999
6003
|
class: "alert alert-warning"
|
|
6000
6004
|
};
|
|
6001
|
-
const
|
|
6002
|
-
const
|
|
6005
|
+
const _hoisted_3$5 = { key: 0 };
|
|
6006
|
+
const _hoisted_4$5 = { key: 1 };
|
|
6003
6007
|
|
|
6004
6008
|
|
|
6005
6009
|
var script$c = {
|
|
@@ -6044,16 +6048,27 @@ const currentTab = vue.ref('');
|
|
|
6044
6048
|
const path = vue.ref(route.path);
|
|
6045
6049
|
const allowedTabs = vue.ref([]);
|
|
6046
6050
|
const {user} = pinia.storeToRefs(useUserStore());
|
|
6051
|
+
const realTabCounts = vue.ref({});
|
|
6047
6052
|
vue.onMounted(()=>{
|
|
6048
6053
|
if(props.tabs.length === 0){
|
|
6049
6054
|
return;
|
|
6050
6055
|
}
|
|
6051
6056
|
allowedTabs.value = props.tabs.filter(tab=>{
|
|
6052
|
-
if(typeof tab === 'object'
|
|
6053
|
-
if(
|
|
6054
|
-
|
|
6057
|
+
if(typeof tab === 'object'){
|
|
6058
|
+
if(tab.count || tab.counts){
|
|
6059
|
+
realTabCounts.value[tab.name || tab.key] = tab.count || tab.counts;
|
|
6060
|
+
}
|
|
6061
|
+
if(tab.validator){
|
|
6062
|
+
if(tab.validator()){
|
|
6063
|
+
return tab
|
|
6064
|
+
}
|
|
6065
|
+
return false
|
|
6066
|
+
} else if(tab.permission){
|
|
6067
|
+
if(user.value && user.value.isAllowedTo(tab.permission)){
|
|
6068
|
+
return tab
|
|
6069
|
+
}
|
|
6070
|
+
return false
|
|
6055
6071
|
}
|
|
6056
|
-
return false
|
|
6057
6072
|
}
|
|
6058
6073
|
return tab
|
|
6059
6074
|
});
|
|
@@ -6063,9 +6078,12 @@ vue.onMounted(()=>{
|
|
|
6063
6078
|
}
|
|
6064
6079
|
});
|
|
6065
6080
|
|
|
6066
|
-
vue.watch(()=>props
|
|
6081
|
+
vue.watch(()=>props, () => {
|
|
6082
|
+
console.log('changed');
|
|
6067
6083
|
resetTabCounts();
|
|
6068
|
-
}
|
|
6084
|
+
},{
|
|
6085
|
+
deep: true}
|
|
6086
|
+
);
|
|
6069
6087
|
|
|
6070
6088
|
vue.watch(()=>route.path,()=>{
|
|
6071
6089
|
route.fullPath.split('/');
|
|
@@ -6086,16 +6104,6 @@ const setTab = (tab) => {
|
|
|
6086
6104
|
currentTab.value = label.replace(/_/g, ' ');
|
|
6087
6105
|
}
|
|
6088
6106
|
};
|
|
6089
|
-
const setTabCounts = (tabCounts) => {
|
|
6090
|
-
console.log('Setting tab counts', tabCounts);
|
|
6091
|
-
if (typeof tabCounts === 'object') {
|
|
6092
|
-
setCounts(tabCounts);
|
|
6093
|
-
} else {
|
|
6094
|
-
shApis.doGet(tabCounts).then(res => {
|
|
6095
|
-
setCounts(res.data);
|
|
6096
|
-
});
|
|
6097
|
-
}
|
|
6098
|
-
};
|
|
6099
6107
|
const resetTabCounts = () => {
|
|
6100
6108
|
const arr = route.fullPath.split('/');
|
|
6101
6109
|
if (!tabExistsInUrl()) {
|
|
@@ -6104,12 +6112,16 @@ const resetTabCounts = () => {
|
|
|
6104
6112
|
setTab(arr[arr.length - 1]);
|
|
6105
6113
|
}
|
|
6106
6114
|
let tbCounts = props.tabCounts;
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
if
|
|
6111
|
-
|
|
6115
|
+
// merge with realTabCounts
|
|
6116
|
+
if (tbCounts && typeof tbCounts === 'object') {
|
|
6117
|
+
realTabCounts.value = {...realTabCounts.value, ...tbCounts};
|
|
6118
|
+
} else if(typeof tbCounts === 'string') {
|
|
6119
|
+
// it is a string fetch from api
|
|
6120
|
+
shApis.doGet(tbCounts).then(res => {
|
|
6121
|
+
realTabCounts.value = {...realTabCounts.value, ...res.data};
|
|
6122
|
+
});
|
|
6112
6123
|
}
|
|
6124
|
+
|
|
6113
6125
|
};
|
|
6114
6126
|
const tabExistsInUrl = () => {
|
|
6115
6127
|
let exists = false;
|
|
@@ -6121,20 +6133,6 @@ const tabExistsInUrl = () => {
|
|
|
6121
6133
|
});
|
|
6122
6134
|
return exists
|
|
6123
6135
|
};
|
|
6124
|
-
const setCounts = (res) => {
|
|
6125
|
-
Object.keys(res).forEach(key => {
|
|
6126
|
-
console.log('Setting count for tab', key, res[key]);
|
|
6127
|
-
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
6128
|
-
if (elem.length > 0) {
|
|
6129
|
-
elem = elem[0];
|
|
6130
|
-
let txt = elem.innerHTML;
|
|
6131
|
-
txt = txt.split('<i class="d-none"></i>')[0];
|
|
6132
|
-
if (parseInt(res[key]) > 0) {
|
|
6133
|
-
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
6134
|
-
}
|
|
6135
|
-
}
|
|
6136
|
-
});
|
|
6137
|
-
};
|
|
6138
6136
|
|
|
6139
6137
|
const getTabKey = (tab)=>{
|
|
6140
6138
|
if(typeof tab === 'string') {
|
|
@@ -6165,49 +6163,55 @@ return (_ctx, _cache) => {
|
|
|
6165
6163
|
const _component_router_view = vue.resolveComponent("router-view");
|
|
6166
6164
|
const _directive_if_user_can = vue.resolveDirective("if-user-can");
|
|
6167
6165
|
|
|
6168
|
-
return (
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6166
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
6167
|
+
vue.createTextVNode(vue.toDisplayString(currentTab.value) + " ", 1 /* TEXT */),
|
|
6168
|
+
(allowedTabs.value.length > 0)
|
|
6169
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6170
|
+
vue.createElementVNode("ul", {
|
|
6171
|
+
class: vue.normalizeClass(["nav nav-tabs sh-tabs", __props.classes ?? vue.unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered')])
|
|
6172
|
+
}, [
|
|
6173
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(allowedTabs.value, (tab) => {
|
|
6174
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
6175
|
+
class: "nav-item",
|
|
6176
|
+
key: getTabKey(tab)
|
|
6177
|
+
}, [
|
|
6178
|
+
vue.createVNode(_component_router_link, {
|
|
6179
|
+
onClick: $event => (setTab(tab)),
|
|
6180
|
+
"active-class": 'active',
|
|
6181
|
+
class: vue.normalizeClass(["nav-link text-capitalize", 'sh_tab_' + getTabKey(tab)]),
|
|
6182
|
+
to: __props.baseUrl+'/tab/'+getTabKey(tab),
|
|
6183
|
+
role: "tab"
|
|
6184
|
+
}, {
|
|
6185
|
+
default: vue.withCtx(() => [
|
|
6186
|
+
vue.createTextVNode(vue.toDisplayString(getTabLabel(tab)) + " ", 1 /* TEXT */),
|
|
6187
|
+
(realTabCounts.value[getTabKey(tab)] !== undefined && realTabCounts.value[getTabKey(tab)] > 0)
|
|
6188
|
+
? (vue.openBlock(), vue.createElementBlock("sup", _hoisted_1$a, vue.toDisplayString(realTabCounts.value[getTabKey(tab)]), 1 /* TEXT */))
|
|
6189
|
+
: vue.createCommentVNode("v-if", true)
|
|
6190
|
+
]),
|
|
6191
|
+
_: 2 /* DYNAMIC */
|
|
6192
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
|
|
6193
|
+
])), [
|
|
6194
|
+
[_directive_if_user_can, getTabPermission(tab)]
|
|
6195
|
+
])
|
|
6196
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6197
|
+
], 2 /* CLASS */),
|
|
6198
|
+
vue.createElementVNode("div", {
|
|
6199
|
+
class: vue.normalizeClass(["tab-content", __props.classTwo])
|
|
6200
|
+
}, [
|
|
6201
|
+
(vue.openBlock(), vue.createBlock(_component_router_view, vue.mergeProps(_ctx.$attrs, {
|
|
6202
|
+
currentTab: currentTab.value,
|
|
6203
|
+
key: path.value,
|
|
6204
|
+
sharedData: __props.sharedData,
|
|
6205
|
+
tabCounts: __props.tabCounts
|
|
6206
|
+
}), null, 16 /* FULL_PROPS */, ["currentTab", "sharedData", "tabCounts"]))
|
|
6207
|
+
], 2 /* CLASS */)
|
|
6208
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6209
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
6210
|
+
(__props.tabs.length)
|
|
6211
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, " 403 Not Allowed "))
|
|
6212
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, " No tabs found "))
|
|
6213
|
+
]))
|
|
6214
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6211
6215
|
}
|
|
6212
6216
|
}
|
|
6213
6217
|
|
package/dist/library.mjs
CHANGED
|
@@ -2104,7 +2104,7 @@ const _hoisted_2$j = {
|
|
|
2104
2104
|
style: {"display":"contents"}
|
|
2105
2105
|
};
|
|
2106
2106
|
const _hoisted_3$g = ["src"];
|
|
2107
|
-
const _hoisted_4$
|
|
2107
|
+
const _hoisted_4$f = ["value"];
|
|
2108
2108
|
const _hoisted_5$c = ["disabled"];
|
|
2109
2109
|
|
|
2110
2110
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -2124,7 +2124,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2124
2124
|
return (openBlock(), createElementBlock("option", {
|
|
2125
2125
|
value: country,
|
|
2126
2126
|
key: country.dialCode
|
|
2127
|
-
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$
|
|
2127
|
+
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$f))
|
|
2128
2128
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2129
2129
|
], 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
2130
2130
|
[vModelSelect, $data.selectedCountry]
|
|
@@ -2152,7 +2152,7 @@ const _hoisted_1$q = {
|
|
|
2152
2152
|
};
|
|
2153
2153
|
const _hoisted_2$i = ["id"];
|
|
2154
2154
|
const _hoisted_3$f = { class: "sh-suggestions-holder" };
|
|
2155
|
-
const _hoisted_4$
|
|
2155
|
+
const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2156
2156
|
const _hoisted_5$b = ["onClick"];
|
|
2157
2157
|
const _hoisted_6$9 = ["id"];
|
|
2158
2158
|
const _hoisted_7$8 = ["id", "aria-labelledby"];
|
|
@@ -2321,7 +2321,7 @@ return (_ctx, _cache) => {
|
|
|
2321
2321
|
}, [
|
|
2322
2322
|
createElementVNode("div", _hoisted_3$f, [
|
|
2323
2323
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
|
|
2324
|
-
return (openBlock(), createElementBlock("h5", _hoisted_4$
|
|
2324
|
+
return (openBlock(), createElementBlock("h5", _hoisted_4$e, [
|
|
2325
2325
|
createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
|
|
2326
2326
|
createElementVNode("button", {
|
|
2327
2327
|
onClick: $event => (removeSuggestion(sgt.id)),
|
|
@@ -2748,7 +2748,7 @@ const _hoisted_2$h = {
|
|
|
2748
2748
|
role: "alert"
|
|
2749
2749
|
};
|
|
2750
2750
|
const _hoisted_3$e = { key: 0 };
|
|
2751
|
-
const _hoisted_4$
|
|
2751
|
+
const _hoisted_4$d = { key: 1 };
|
|
2752
2752
|
const _hoisted_5$a = { class: "row" };
|
|
2753
2753
|
const _hoisted_6$8 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2754
2754
|
const _hoisted_7$7 = { class: "col-md-12" };
|
|
@@ -2790,7 +2790,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2790
2790
|
_cache[2] || (_cache[2] = createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */)),
|
|
2791
2791
|
(_ctx.errorText)
|
|
2792
2792
|
? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2793
|
-
: (openBlock(), createElementBlock("span", _hoisted_4$
|
|
2793
|
+
: (openBlock(), createElementBlock("span", _hoisted_4$d, "Unexpected Error Occurred")),
|
|
2794
2794
|
createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2795
2795
|
]))
|
|
2796
2796
|
: createCommentVNode("v-if", true),
|
|
@@ -3361,7 +3361,7 @@ const _hoisted_3$d = {
|
|
|
3361
3361
|
key: 0,
|
|
3362
3362
|
class: "text-danger sh-required"
|
|
3363
3363
|
};
|
|
3364
|
-
const _hoisted_4$
|
|
3364
|
+
const _hoisted_4$c = ["innerHTML"];
|
|
3365
3365
|
const _hoisted_5$9 = {
|
|
3366
3366
|
key: 2,
|
|
3367
3367
|
class: "form-notch"
|
|
@@ -3668,7 +3668,7 @@ return (_ctx, _cache) => {
|
|
|
3668
3668
|
key: 1,
|
|
3669
3669
|
class: normalizeClass(getElementClass('formLabel')),
|
|
3670
3670
|
innerHTML: field.label
|
|
3671
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_4$
|
|
3671
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_4$c))
|
|
3672
3672
|
: createCommentVNode("v-if", true),
|
|
3673
3673
|
(unref(isFloating))
|
|
3674
3674
|
? (openBlock(), createElementBlock("div", _hoisted_5$9, [...(_cache[1] || (_cache[1] = [
|
|
@@ -3724,7 +3724,7 @@ script$q.__file = "src/lib/components/ShAutoForm.vue";
|
|
|
3724
3724
|
const _hoisted_1$l = ["id", "data-bs-backdrop"];
|
|
3725
3725
|
const _hoisted_2$f = { class: "modal-content" };
|
|
3726
3726
|
const _hoisted_3$c = { class: "modal-header" };
|
|
3727
|
-
const _hoisted_4$
|
|
3727
|
+
const _hoisted_4$b = { class: "modal-title flex-fill" };
|
|
3728
3728
|
const _hoisted_5$8 = { class: "modal-body" };
|
|
3729
3729
|
const _hoisted_6$6 = { class: "section" };
|
|
3730
3730
|
|
|
@@ -3789,7 +3789,7 @@ return (_ctx, _cache) => {
|
|
|
3789
3789
|
}, [
|
|
3790
3790
|
createElementVNode("div", _hoisted_2$f, [
|
|
3791
3791
|
createElementVNode("div", _hoisted_3$c, [
|
|
3792
|
-
createElementVNode("h3", _hoisted_4$
|
|
3792
|
+
createElementVNode("h3", _hoisted_4$b, toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3793
3793
|
_cache[0] || (_cache[0] = createElementVNode("button", {
|
|
3794
3794
|
type: "button",
|
|
3795
3795
|
class: "btn-close sh-modal-close",
|
|
@@ -4053,7 +4053,7 @@ const _hoisted_3$a = {
|
|
|
4053
4053
|
class: "offcanvas-title",
|
|
4054
4054
|
id: "offcanvasScrollingLabel"
|
|
4055
4055
|
};
|
|
4056
|
-
const _hoisted_4$
|
|
4056
|
+
const _hoisted_4$a = {
|
|
4057
4057
|
type: "button",
|
|
4058
4058
|
ref: "closecanvas",
|
|
4059
4059
|
class: "btn-close sh-offcanvas-close",
|
|
@@ -4110,7 +4110,7 @@ return (_ctx, _cache) => {
|
|
|
4110
4110
|
}, [
|
|
4111
4111
|
createElementVNode("div", _hoisted_2$d, [
|
|
4112
4112
|
createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
4113
|
-
createElementVNode("button", _hoisted_4$
|
|
4113
|
+
createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
|
|
4114
4114
|
]),
|
|
4115
4115
|
createElementVNode("div", _hoisted_5$7, [
|
|
4116
4116
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -4606,7 +4606,7 @@ const _hoisted_3$9 = {
|
|
|
4606
4606
|
key: 1,
|
|
4607
4607
|
class: "bi bi-three-dots"
|
|
4608
4608
|
};
|
|
4609
|
-
const _hoisted_4$
|
|
4609
|
+
const _hoisted_4$9 = {
|
|
4610
4610
|
key: 2,
|
|
4611
4611
|
class: "bi bi-three-dots-vertical"
|
|
4612
4612
|
};
|
|
@@ -4635,7 +4635,7 @@ return (_ctx, _cache) => {
|
|
|
4635
4635
|
}, null, 2 /* CLASS */))
|
|
4636
4636
|
: (unref(type) === 'dropdown-horizontal')
|
|
4637
4637
|
? (openBlock(), createElementBlock("i", _hoisted_3$9))
|
|
4638
|
-
: (openBlock(), createElementBlock("i", _hoisted_4$
|
|
4638
|
+
: (openBlock(), createElementBlock("i", _hoisted_4$9))
|
|
4639
4639
|
]),
|
|
4640
4640
|
createElementVNode("ul", _hoisted_5$6, [
|
|
4641
4641
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionItems), (act) => {
|
|
@@ -4753,7 +4753,7 @@ var script$f = {
|
|
|
4753
4753
|
const _hoisted_1$d = { key: 0 };
|
|
4754
4754
|
const _hoisted_2$a = { class: "record_count_body mb-3" };
|
|
4755
4755
|
const _hoisted_3$8 = ["value"];
|
|
4756
|
-
const _hoisted_4$
|
|
4756
|
+
const _hoisted_4$8 = { class: "record_counts" };
|
|
4757
4757
|
const _hoisted_5$5 = {
|
|
4758
4758
|
key: 0,
|
|
4759
4759
|
"aria-label": "Page navigation"
|
|
@@ -4804,7 +4804,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4804
4804
|
], 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
4805
4805
|
[vModelSelect, $data.per_page]
|
|
4806
4806
|
]),
|
|
4807
|
-
createElementVNode("span", _hoisted_4$
|
|
4807
|
+
createElementVNode("span", _hoisted_4$8, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
4808
4808
|
]),
|
|
4809
4809
|
($props.pagination_data != null)
|
|
4810
4810
|
? (openBlock(), createElementBlock("nav", _hoisted_5$5, [
|
|
@@ -4886,7 +4886,7 @@ const _hoisted_3$7 = {
|
|
|
4886
4886
|
"data-bs-toggle": "dropdown",
|
|
4887
4887
|
"aria-expanded": "false"
|
|
4888
4888
|
};
|
|
4889
|
-
const _hoisted_4$
|
|
4889
|
+
const _hoisted_4$7 = ["innerHTML"];
|
|
4890
4890
|
const _hoisted_5$4 = {
|
|
4891
4891
|
class: "dropdown-menu sh-range-dropdown",
|
|
4892
4892
|
"aria-labelledby": "dropdownMenuLink"
|
|
@@ -5012,7 +5012,7 @@ return (_ctx, _cache) => {
|
|
|
5012
5012
|
createElementVNode("div", _hoisted_3$7, [
|
|
5013
5013
|
_cache[2] || (_cache[2] = createElementVNode("i", { class: "bi-calendar text-dark" }, null, -1 /* HOISTED */)),
|
|
5014
5014
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
5015
|
-
createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$
|
|
5015
|
+
createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$7)
|
|
5016
5016
|
]),
|
|
5017
5017
|
createElementVNode("div", _hoisted_5$4, [
|
|
5018
5018
|
createElementVNode("ul", _hoisted_6$4, [
|
|
@@ -5072,7 +5072,7 @@ const _hoisted_2$8 = {
|
|
|
5072
5072
|
class: "col-md-4 mb-2"
|
|
5073
5073
|
};
|
|
5074
5074
|
const _hoisted_3$6 = ["disabled"];
|
|
5075
|
-
const _hoisted_4$
|
|
5075
|
+
const _hoisted_4$6 = {
|
|
5076
5076
|
key: 1,
|
|
5077
5077
|
class: "row"
|
|
5078
5078
|
};
|
|
@@ -5574,7 +5574,7 @@ return (_ctx, _cache) => {
|
|
|
5574
5574
|
]))
|
|
5575
5575
|
: createCommentVNode("v-if", true),
|
|
5576
5576
|
(!__props.hideSearch)
|
|
5577
|
-
? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
5577
|
+
? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
5578
5578
|
createElementVNode("div", _hoisted_5$3, [
|
|
5579
5579
|
createElementVNode("div", {
|
|
5580
5580
|
class: normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
@@ -5983,11 +5983,15 @@ return (_ctx, _cache) => {
|
|
|
5983
5983
|
script$d.__file = "src/lib/components/ShTable.vue";
|
|
5984
5984
|
|
|
5985
5985
|
const _hoisted_1$a = {
|
|
5986
|
+
key: 0,
|
|
5987
|
+
class: "sh_tab_count"
|
|
5988
|
+
};
|
|
5989
|
+
const _hoisted_2$7 = {
|
|
5986
5990
|
key: 1,
|
|
5987
5991
|
class: "alert alert-warning"
|
|
5988
5992
|
};
|
|
5989
|
-
const
|
|
5990
|
-
const
|
|
5993
|
+
const _hoisted_3$5 = { key: 0 };
|
|
5994
|
+
const _hoisted_4$5 = { key: 1 };
|
|
5991
5995
|
|
|
5992
5996
|
|
|
5993
5997
|
var script$c = {
|
|
@@ -6032,16 +6036,27 @@ const currentTab = ref('');
|
|
|
6032
6036
|
const path = ref(route.path);
|
|
6033
6037
|
const allowedTabs = ref([]);
|
|
6034
6038
|
const {user} = storeToRefs(useUserStore());
|
|
6039
|
+
const realTabCounts = ref({});
|
|
6035
6040
|
onMounted(()=>{
|
|
6036
6041
|
if(props.tabs.length === 0){
|
|
6037
6042
|
return;
|
|
6038
6043
|
}
|
|
6039
6044
|
allowedTabs.value = props.tabs.filter(tab=>{
|
|
6040
|
-
if(typeof tab === 'object'
|
|
6041
|
-
if(
|
|
6042
|
-
|
|
6045
|
+
if(typeof tab === 'object'){
|
|
6046
|
+
if(tab.count || tab.counts){
|
|
6047
|
+
realTabCounts.value[tab.name || tab.key] = tab.count || tab.counts;
|
|
6048
|
+
}
|
|
6049
|
+
if(tab.validator){
|
|
6050
|
+
if(tab.validator()){
|
|
6051
|
+
return tab
|
|
6052
|
+
}
|
|
6053
|
+
return false
|
|
6054
|
+
} else if(tab.permission){
|
|
6055
|
+
if(user.value && user.value.isAllowedTo(tab.permission)){
|
|
6056
|
+
return tab
|
|
6057
|
+
}
|
|
6058
|
+
return false
|
|
6043
6059
|
}
|
|
6044
|
-
return false
|
|
6045
6060
|
}
|
|
6046
6061
|
return tab
|
|
6047
6062
|
});
|
|
@@ -6051,9 +6066,12 @@ onMounted(()=>{
|
|
|
6051
6066
|
}
|
|
6052
6067
|
});
|
|
6053
6068
|
|
|
6054
|
-
watch(()=>props
|
|
6069
|
+
watch(()=>props, () => {
|
|
6070
|
+
console.log('changed');
|
|
6055
6071
|
resetTabCounts();
|
|
6056
|
-
}
|
|
6072
|
+
},{
|
|
6073
|
+
deep: true}
|
|
6074
|
+
);
|
|
6057
6075
|
|
|
6058
6076
|
watch(()=>route.path,()=>{
|
|
6059
6077
|
route.fullPath.split('/');
|
|
@@ -6074,16 +6092,6 @@ const setTab = (tab) => {
|
|
|
6074
6092
|
currentTab.value = label.replace(/_/g, ' ');
|
|
6075
6093
|
}
|
|
6076
6094
|
};
|
|
6077
|
-
const setTabCounts = (tabCounts) => {
|
|
6078
|
-
console.log('Setting tab counts', tabCounts);
|
|
6079
|
-
if (typeof tabCounts === 'object') {
|
|
6080
|
-
setCounts(tabCounts);
|
|
6081
|
-
} else {
|
|
6082
|
-
shApis.doGet(tabCounts).then(res => {
|
|
6083
|
-
setCounts(res.data);
|
|
6084
|
-
});
|
|
6085
|
-
}
|
|
6086
|
-
};
|
|
6087
6095
|
const resetTabCounts = () => {
|
|
6088
6096
|
const arr = route.fullPath.split('/');
|
|
6089
6097
|
if (!tabExistsInUrl()) {
|
|
@@ -6092,12 +6100,16 @@ const resetTabCounts = () => {
|
|
|
6092
6100
|
setTab(arr[arr.length - 1]);
|
|
6093
6101
|
}
|
|
6094
6102
|
let tbCounts = props.tabCounts;
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
if
|
|
6099
|
-
|
|
6103
|
+
// merge with realTabCounts
|
|
6104
|
+
if (tbCounts && typeof tbCounts === 'object') {
|
|
6105
|
+
realTabCounts.value = {...realTabCounts.value, ...tbCounts};
|
|
6106
|
+
} else if(typeof tbCounts === 'string') {
|
|
6107
|
+
// it is a string fetch from api
|
|
6108
|
+
shApis.doGet(tbCounts).then(res => {
|
|
6109
|
+
realTabCounts.value = {...realTabCounts.value, ...res.data};
|
|
6110
|
+
});
|
|
6100
6111
|
}
|
|
6112
|
+
|
|
6101
6113
|
};
|
|
6102
6114
|
const tabExistsInUrl = () => {
|
|
6103
6115
|
let exists = false;
|
|
@@ -6109,20 +6121,6 @@ const tabExistsInUrl = () => {
|
|
|
6109
6121
|
});
|
|
6110
6122
|
return exists
|
|
6111
6123
|
};
|
|
6112
|
-
const setCounts = (res) => {
|
|
6113
|
-
Object.keys(res).forEach(key => {
|
|
6114
|
-
console.log('Setting count for tab', key, res[key]);
|
|
6115
|
-
let elem = document.getElementsByClassName('sh_tab_' + key);
|
|
6116
|
-
if (elem.length > 0) {
|
|
6117
|
-
elem = elem[0];
|
|
6118
|
-
let txt = elem.innerHTML;
|
|
6119
|
-
txt = txt.split('<i class="d-none"></i>')[0];
|
|
6120
|
-
if (parseInt(res[key]) > 0) {
|
|
6121
|
-
elem.innerHTML = txt + '<i class="d-none"></i><sup class="sh_tab_count">' + res[key] + '</sup>';
|
|
6122
|
-
}
|
|
6123
|
-
}
|
|
6124
|
-
});
|
|
6125
|
-
};
|
|
6126
6124
|
|
|
6127
6125
|
const getTabKey = (tab)=>{
|
|
6128
6126
|
if(typeof tab === 'string') {
|
|
@@ -6153,49 +6151,55 @@ return (_ctx, _cache) => {
|
|
|
6153
6151
|
const _component_router_view = resolveComponent("router-view");
|
|
6154
6152
|
const _directive_if_user_can = resolveDirective("if-user-can");
|
|
6155
6153
|
|
|
6156
|
-
return (
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6154
|
+
return (openBlock(), createElementBlock(Fragment, null, [
|
|
6155
|
+
createTextVNode(toDisplayString(currentTab.value) + " ", 1 /* TEXT */),
|
|
6156
|
+
(allowedTabs.value.length > 0)
|
|
6157
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6158
|
+
createElementVNode("ul", {
|
|
6159
|
+
class: normalizeClass(["nav nav-tabs sh-tabs", __props.classes ?? unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered')])
|
|
6160
|
+
}, [
|
|
6161
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(allowedTabs.value, (tab) => {
|
|
6162
|
+
return withDirectives((openBlock(), createElementBlock("li", {
|
|
6163
|
+
class: "nav-item",
|
|
6164
|
+
key: getTabKey(tab)
|
|
6165
|
+
}, [
|
|
6166
|
+
createVNode(_component_router_link, {
|
|
6167
|
+
onClick: $event => (setTab(tab)),
|
|
6168
|
+
"active-class": 'active',
|
|
6169
|
+
class: normalizeClass(["nav-link text-capitalize", 'sh_tab_' + getTabKey(tab)]),
|
|
6170
|
+
to: __props.baseUrl+'/tab/'+getTabKey(tab),
|
|
6171
|
+
role: "tab"
|
|
6172
|
+
}, {
|
|
6173
|
+
default: withCtx(() => [
|
|
6174
|
+
createTextVNode(toDisplayString(getTabLabel(tab)) + " ", 1 /* TEXT */),
|
|
6175
|
+
(realTabCounts.value[getTabKey(tab)] !== undefined && realTabCounts.value[getTabKey(tab)] > 0)
|
|
6176
|
+
? (openBlock(), createElementBlock("sup", _hoisted_1$a, toDisplayString(realTabCounts.value[getTabKey(tab)]), 1 /* TEXT */))
|
|
6177
|
+
: createCommentVNode("v-if", true)
|
|
6178
|
+
]),
|
|
6179
|
+
_: 2 /* DYNAMIC */
|
|
6180
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
|
|
6181
|
+
])), [
|
|
6182
|
+
[_directive_if_user_can, getTabPermission(tab)]
|
|
6183
|
+
])
|
|
6184
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
6185
|
+
], 2 /* CLASS */),
|
|
6186
|
+
createElementVNode("div", {
|
|
6187
|
+
class: normalizeClass(["tab-content", __props.classTwo])
|
|
6188
|
+
}, [
|
|
6189
|
+
(openBlock(), createBlock(_component_router_view, mergeProps(_ctx.$attrs, {
|
|
6190
|
+
currentTab: currentTab.value,
|
|
6191
|
+
key: path.value,
|
|
6192
|
+
sharedData: __props.sharedData,
|
|
6193
|
+
tabCounts: __props.tabCounts
|
|
6194
|
+
}), null, 16 /* FULL_PROPS */, ["currentTab", "sharedData", "tabCounts"]))
|
|
6195
|
+
], 2 /* CLASS */)
|
|
6196
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6197
|
+
: (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
6198
|
+
(__props.tabs.length)
|
|
6199
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$5, " 403 Not Allowed "))
|
|
6200
|
+
: (openBlock(), createElementBlock("div", _hoisted_4$5, " No tabs found "))
|
|
6201
|
+
]))
|
|
6202
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6199
6203
|
}
|
|
6200
6204
|
}
|
|
6201
6205
|
|