@iankibetsh/shframework 5.5.9 → 5.6.1
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 +32 -32
- package/dist/library.js +169 -76
- package/dist/library.mjs +169 -76
- package/package.json +1 -1
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
.colored-toast.swal2-icon-success {
|
|
3
|
-
background-color: #a5dc86 !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.colored-toast.swal2-icon-error {
|
|
7
|
-
background-color: #f27474 !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.colored-toast.swal2-icon-warning {
|
|
11
|
-
background-color: #f8bb86 !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.colored-toast.swal2-icon-info {
|
|
15
|
-
background-color: #3fc3ee !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.colored-toast.swal2-icon-question {
|
|
19
|
-
background-color: #87adbd !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.colored-toast .swal2-title {
|
|
23
|
-
color: white;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.colored-toast .swal2-close {
|
|
27
|
-
color: white;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.colored-toast .swal2-html-container {
|
|
31
|
-
color: white;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
2
|
.sh-phone{
|
|
35
3
|
display: flex;
|
|
36
4
|
width: 100%;
|
|
@@ -63,6 +31,38 @@
|
|
|
63
31
|
opacity: 0.5;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.colored-toast.swal2-icon-success {
|
|
35
|
+
background-color: #a5dc86 !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.colored-toast.swal2-icon-error {
|
|
39
|
+
background-color: #f27474 !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.colored-toast.swal2-icon-warning {
|
|
43
|
+
background-color: #f8bb86 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.colored-toast.swal2-icon-info {
|
|
47
|
+
background-color: #3fc3ee !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.colored-toast.swal2-icon-question {
|
|
51
|
+
background-color: #87adbd !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.colored-toast .swal2-title {
|
|
55
|
+
color: white;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.colored-toast .swal2-close {
|
|
59
|
+
color: white;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.colored-toast .swal2-html-container {
|
|
63
|
+
color: white;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
.permissions-main {
|
|
67
67
|
background: #edeff2;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -2150,7 +2150,7 @@ const _hoisted_2$i = {
|
|
|
2150
2150
|
};
|
|
2151
2151
|
const _hoisted_3$f = ["src"];
|
|
2152
2152
|
const _hoisted_4$f = ["value"];
|
|
2153
|
-
const _hoisted_5$
|
|
2153
|
+
const _hoisted_5$d = ["disabled"];
|
|
2154
2154
|
|
|
2155
2155
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2156
2156
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
@@ -2182,7 +2182,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2182
2182
|
onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
|
|
2183
2183
|
placeholder: "712345678",
|
|
2184
2184
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
|
|
2185
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$
|
|
2185
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
|
|
2186
2186
|
[vue.vModelText, $data.input]
|
|
2187
2187
|
])
|
|
2188
2188
|
]))
|
|
@@ -2198,7 +2198,7 @@ const _hoisted_1$p = {
|
|
|
2198
2198
|
const _hoisted_2$h = ["id"];
|
|
2199
2199
|
const _hoisted_3$e = { class: "sh-suggestions-holder" };
|
|
2200
2200
|
const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2201
|
-
const _hoisted_5$
|
|
2201
|
+
const _hoisted_5$c = ["onClick"];
|
|
2202
2202
|
const _hoisted_6$9 = ["id"];
|
|
2203
2203
|
const _hoisted_7$8 = ["id", "aria-labelledby"];
|
|
2204
2204
|
const _hoisted_8$7 = ["onClick"];
|
|
@@ -2374,7 +2374,7 @@ return (_ctx, _cache) => {
|
|
|
2374
2374
|
type: "button",
|
|
2375
2375
|
class: "btn-close border-start border-1 ms-1",
|
|
2376
2376
|
"aria-label": "Close"
|
|
2377
|
-
}, null, 8 /* PROPS */, _hoisted_5$
|
|
2377
|
+
}, null, 8 /* PROPS */, _hoisted_5$c)
|
|
2378
2378
|
]))
|
|
2379
2379
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
2380
2380
|
]),
|
|
@@ -2795,7 +2795,7 @@ const _hoisted_2$g = {
|
|
|
2795
2795
|
};
|
|
2796
2796
|
const _hoisted_3$d = { key: 0 };
|
|
2797
2797
|
const _hoisted_4$d = { key: 1 };
|
|
2798
|
-
const _hoisted_5$
|
|
2798
|
+
const _hoisted_5$b = { class: "row" };
|
|
2799
2799
|
const _hoisted_6$8 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2800
2800
|
const _hoisted_7$7 = { class: "col-md-12" };
|
|
2801
2801
|
const _hoisted_8$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
@@ -2846,7 +2846,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2846
2846
|
}, null, 512 /* NEED_PATCH */), [
|
|
2847
2847
|
[vue.vModelText, _ctx.form_elements['id']]
|
|
2848
2848
|
]),
|
|
2849
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
2849
|
+
vue.createElementVNode("div", _hoisted_5$b, [
|
|
2850
2850
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.fields, (field) => {
|
|
2851
2851
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2852
2852
|
class: vue.normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
@@ -3408,7 +3408,7 @@ const _hoisted_3$c = {
|
|
|
3408
3408
|
class: "text-danger sh-required"
|
|
3409
3409
|
};
|
|
3410
3410
|
const _hoisted_4$c = ["innerHTML"];
|
|
3411
|
-
const _hoisted_5$
|
|
3411
|
+
const _hoisted_5$a = {
|
|
3412
3412
|
key: 2,
|
|
3413
3413
|
class: "form-notch"
|
|
3414
3414
|
};
|
|
@@ -3719,7 +3719,7 @@ return (_ctx, _cache) => {
|
|
|
3719
3719
|
}, null, 10 /* CLASS, PROPS */, _hoisted_4$c))
|
|
3720
3720
|
: vue.createCommentVNode("v-if", true),
|
|
3721
3721
|
(vue.unref(isFloating))
|
|
3722
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
3722
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$a, [...(_cache[1] || (_cache[1] = [
|
|
3723
3723
|
vue.createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* CACHED */),
|
|
3724
3724
|
vue.createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* CACHED */),
|
|
3725
3725
|
vue.createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* CACHED */)
|
|
@@ -3772,7 +3772,7 @@ const _hoisted_1$k = ["id", "data-bs-backdrop"];
|
|
|
3772
3772
|
const _hoisted_2$e = { class: "modal-content" };
|
|
3773
3773
|
const _hoisted_3$b = { class: "modal-header" };
|
|
3774
3774
|
const _hoisted_4$b = { class: "modal-title flex-fill" };
|
|
3775
|
-
const _hoisted_5$
|
|
3775
|
+
const _hoisted_5$9 = { class: "modal-body" };
|
|
3776
3776
|
const _hoisted_6$6 = { class: "section" };
|
|
3777
3777
|
|
|
3778
3778
|
|
|
@@ -3844,7 +3844,7 @@ return (_ctx, _cache) => {
|
|
|
3844
3844
|
"aria-label": "Close"
|
|
3845
3845
|
}, null, -1 /* CACHED */))
|
|
3846
3846
|
]),
|
|
3847
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
3847
|
+
vue.createElementVNode("div", _hoisted_5$9, [
|
|
3848
3848
|
vue.createElementVNode("div", _hoisted_6$6, [
|
|
3849
3849
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3850
3850
|
])
|
|
@@ -3859,7 +3859,11 @@ return (_ctx, _cache) => {
|
|
|
3859
3859
|
|
|
3860
3860
|
script$p.__file = "src/lib/components/ShModal.vue";
|
|
3861
3861
|
|
|
3862
|
-
const _hoisted_1$j = {
|
|
3862
|
+
const _hoisted_1$j = {
|
|
3863
|
+
class: "dropdown sh-dropdown-form",
|
|
3864
|
+
"data-bs-auto-close": "outside",
|
|
3865
|
+
"aria-expanded": "false"
|
|
3866
|
+
};
|
|
3863
3867
|
|
|
3864
3868
|
var script$o = {
|
|
3865
3869
|
__name: 'ShDropDownForm',
|
|
@@ -3907,36 +3911,38 @@ const formError = (res)=>{
|
|
|
3907
3911
|
emit('formError',res);
|
|
3908
3912
|
};
|
|
3909
3913
|
const dropdownId = 'dropdown' + (Math.random() + 1).toString(36).substring(2);
|
|
3914
|
+
const cleanedProp = vue.computed(()=>{
|
|
3915
|
+
const p = {...props};
|
|
3916
|
+
delete p.class;
|
|
3917
|
+
return p
|
|
3918
|
+
});
|
|
3910
3919
|
|
|
3911
3920
|
return (_ctx, _cache) => {
|
|
3912
|
-
return (vue.openBlock(), vue.createElementBlock(
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
key: JSON.stringify(__props.currentData ?? {})
|
|
3936
|
-
}, props), null, 16 /* FULL_PROPS */))
|
|
3937
|
-
])
|
|
3921
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
3922
|
+
vue.createElementVNode("a", {
|
|
3923
|
+
class: vue.normalizeClass(vue.unref(btnClass)),
|
|
3924
|
+
href: "#",
|
|
3925
|
+
role: "button",
|
|
3926
|
+
id: dropdownId,
|
|
3927
|
+
"data-bs-toggle": "dropdown",
|
|
3928
|
+
"data-bs-auto-close": "outside",
|
|
3929
|
+
"aria-expanded": "false"
|
|
3930
|
+
}, [
|
|
3931
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
3932
|
+
], 2 /* CLASS */),
|
|
3933
|
+
vue.createElementVNode("div", {
|
|
3934
|
+
class: "dropdown-menu px-2 py-1",
|
|
3935
|
+
"aria-labelledby": dropdownId
|
|
3936
|
+
}, [
|
|
3937
|
+
(vue.openBlock(), vue.createBlock(script$q, vue.mergeProps({
|
|
3938
|
+
onSuccess: success,
|
|
3939
|
+
onFieldChanged: fieldChanged,
|
|
3940
|
+
onFormSubmitted: formSubmitted,
|
|
3941
|
+
onFormError: formError,
|
|
3942
|
+
key: JSON.stringify(__props.currentData ?? {})
|
|
3943
|
+
}, cleanedProp.value), null, 16 /* FULL_PROPS */))
|
|
3938
3944
|
])
|
|
3939
|
-
]
|
|
3945
|
+
]))
|
|
3940
3946
|
}
|
|
3941
3947
|
}
|
|
3942
3948
|
|
|
@@ -4073,7 +4079,7 @@ const _hoisted_4$a = {
|
|
|
4073
4079
|
"data-bs-dismiss": "offcanvas",
|
|
4074
4080
|
"aria-label": "Close"
|
|
4075
4081
|
};
|
|
4076
|
-
const _hoisted_5$
|
|
4082
|
+
const _hoisted_5$8 = { class: "offcanvas-body" };
|
|
4077
4083
|
|
|
4078
4084
|
var script$l = {
|
|
4079
4085
|
__name: 'ShCanvas',
|
|
@@ -4125,7 +4131,7 @@ return (_ctx, _cache) => {
|
|
|
4125
4131
|
vue.createElementVNode("h5", _hoisted_3$a, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
4126
4132
|
vue.createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
|
|
4127
4133
|
]),
|
|
4128
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
4134
|
+
vue.createElementVNode("div", _hoisted_5$8, [
|
|
4129
4135
|
vue.renderSlot(_ctx.$slots, "default")
|
|
4130
4136
|
])
|
|
4131
4137
|
], 10 /* CLASS, PROPS */, _hoisted_1$h))
|
|
@@ -4623,7 +4629,7 @@ const _hoisted_4$9 = {
|
|
|
4623
4629
|
key: 2,
|
|
4624
4630
|
class: "bi bi-three-dots-vertical"
|
|
4625
4631
|
};
|
|
4626
|
-
const _hoisted_5$
|
|
4632
|
+
const _hoisted_5$7 = { class: "dropdown-menu" };
|
|
4627
4633
|
|
|
4628
4634
|
|
|
4629
4635
|
var script$g = {
|
|
@@ -4650,7 +4656,7 @@ return (_ctx, _cache) => {
|
|
|
4650
4656
|
? (vue.openBlock(), vue.createElementBlock("i", _hoisted_3$9))
|
|
4651
4657
|
: (vue.openBlock(), vue.createElementBlock("i", _hoisted_4$9))
|
|
4652
4658
|
]),
|
|
4653
|
-
vue.createElementVNode("ul", _hoisted_5$
|
|
4659
|
+
vue.createElementVNode("ul", _hoisted_5$7, [
|
|
4654
4660
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(actionItems), (act) => {
|
|
4655
4661
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
4656
4662
|
key: act.label
|
|
@@ -4695,7 +4701,7 @@ const _hoisted_3$8 = {
|
|
|
4695
4701
|
"aria-expanded": "false"
|
|
4696
4702
|
};
|
|
4697
4703
|
const _hoisted_4$8 = ["innerHTML"];
|
|
4698
|
-
const _hoisted_5$
|
|
4704
|
+
const _hoisted_5$6 = {
|
|
4699
4705
|
class: "dropdown-menu sh-range-dropdown",
|
|
4700
4706
|
"aria-labelledby": "dropdownMenuLink"
|
|
4701
4707
|
};
|
|
@@ -4836,7 +4842,7 @@ return (_ctx, _cache) => {
|
|
|
4836
4842
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
4837
4843
|
vue.createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$8)
|
|
4838
4844
|
]),
|
|
4839
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
4845
|
+
vue.createElementVNode("div", _hoisted_5$6, [
|
|
4840
4846
|
vue.createElementVNode("ul", _hoisted_6$5, [
|
|
4841
4847
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(dates.value, (date) => {
|
|
4842
4848
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
@@ -4971,7 +4977,7 @@ const _hoisted_1$c = { key: 0 };
|
|
|
4971
4977
|
const _hoisted_2$9 = { class: "record_count_body mb-3" };
|
|
4972
4978
|
const _hoisted_3$7 = ["value"];
|
|
4973
4979
|
const _hoisted_4$7 = { class: "record_counts" };
|
|
4974
|
-
const _hoisted_5$
|
|
4980
|
+
const _hoisted_5$5 = {
|
|
4975
4981
|
key: 0,
|
|
4976
4982
|
"aria-label": "Page navigation"
|
|
4977
4983
|
};
|
|
@@ -5024,7 +5030,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5024
5030
|
vue.createElementVNode("span", _hoisted_4$7, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
5025
5031
|
]),
|
|
5026
5032
|
($props.pagination_data != null)
|
|
5027
|
-
? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_5$
|
|
5033
|
+
? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_5$5, [
|
|
5028
5034
|
vue.createElementVNode("ul", _hoisted_6$4, [
|
|
5029
5035
|
vue.createElementVNode("li", {
|
|
5030
5036
|
class: vue.normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
|
|
@@ -5103,7 +5109,7 @@ const _hoisted_4$6 = {
|
|
|
5103
5109
|
key: 1,
|
|
5104
5110
|
class: "row"
|
|
5105
5111
|
};
|
|
5106
|
-
const _hoisted_5$
|
|
5112
|
+
const _hoisted_5$4 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
5107
5113
|
const _hoisted_6$3 = ["placeholder"];
|
|
5108
5114
|
const _hoisted_7$3 = {
|
|
5109
5115
|
key: 0,
|
|
@@ -5590,7 +5596,7 @@ return (_ctx, _cache) => {
|
|
|
5590
5596
|
: vue.createCommentVNode("v-if", true),
|
|
5591
5597
|
(!__props.hideSearch)
|
|
5592
5598
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$6, [
|
|
5593
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5599
|
+
vue.createElementVNode("div", _hoisted_5$4, [
|
|
5594
5600
|
vue.createElementVNode("div", {
|
|
5595
5601
|
class: vue.normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
5596
5602
|
}, [
|
|
@@ -6222,59 +6228,146 @@ const _hoisted_1$9 = {
|
|
|
6222
6228
|
};
|
|
6223
6229
|
const _hoisted_2$6 = ["onClick"];
|
|
6224
6230
|
const _hoisted_3$4 = { class: "sh_tab_count" };
|
|
6225
|
-
const _hoisted_4$4 = { class: "
|
|
6231
|
+
const _hoisted_4$4 = { class: "sh_tab_count" };
|
|
6232
|
+
const _hoisted_5$3 = { class: "tab-content" };
|
|
6233
|
+
|
|
6234
|
+
// const props = defineProps(['tabs', 'data', 'classes', 'currentTab', 'component', 'baseUrl', 'defaultComponent','addTabQuery'])
|
|
6226
6235
|
|
|
6227
6236
|
var script$b = {
|
|
6228
6237
|
__name: 'ShDynamicTabs',
|
|
6229
|
-
props:
|
|
6238
|
+
props: {
|
|
6239
|
+
tabs: {
|
|
6240
|
+
type: Array,
|
|
6241
|
+
required: true
|
|
6242
|
+
},
|
|
6243
|
+
data: {
|
|
6244
|
+
type: Object,
|
|
6245
|
+
default: () => ({})
|
|
6246
|
+
},
|
|
6247
|
+
classes: {
|
|
6248
|
+
type: String,
|
|
6249
|
+
default: ''
|
|
6250
|
+
},
|
|
6251
|
+
currentTab: {
|
|
6252
|
+
type: String,
|
|
6253
|
+
default: null
|
|
6254
|
+
},
|
|
6255
|
+
component: {
|
|
6256
|
+
type: Object,
|
|
6257
|
+
default: null
|
|
6258
|
+
},
|
|
6259
|
+
baseUrl: {
|
|
6260
|
+
type: String,
|
|
6261
|
+
default: null
|
|
6262
|
+
},
|
|
6263
|
+
defaultComponent: {
|
|
6264
|
+
type: Object,
|
|
6265
|
+
default: () => ({ template: '<div></div>' })
|
|
6266
|
+
},
|
|
6267
|
+
addTabQuery: {
|
|
6268
|
+
type: Boolean,
|
|
6269
|
+
default: false
|
|
6270
|
+
}
|
|
6271
|
+
},
|
|
6230
6272
|
setup(__props) {
|
|
6231
6273
|
|
|
6232
6274
|
const props = __props;
|
|
6233
|
-
const
|
|
6275
|
+
const route = vueRouter.useRoute();
|
|
6276
|
+
const router = vueRouter.useRouter();
|
|
6277
|
+
const formattedTabs = vue.computed(() => {
|
|
6278
|
+
if (!props.tabs || props.tabs.length === 0) {
|
|
6279
|
+
return []
|
|
6280
|
+
}
|
|
6281
|
+
return props.tabs.map(tab => {
|
|
6282
|
+
if (typeof tab === 'string') {
|
|
6283
|
+
return {key: tab, label: tab.replace(/_/g, ' ')}
|
|
6284
|
+
}
|
|
6285
|
+
if (typeof tab === 'function') {
|
|
6286
|
+
return tab(props.data)
|
|
6287
|
+
}
|
|
6288
|
+
return tab
|
|
6289
|
+
})
|
|
6290
|
+
});
|
|
6291
|
+
const tabsBaseUrl = props.baseUrl ?? route.path;
|
|
6234
6292
|
let currentTab = vue.shallowRef(null);
|
|
6235
6293
|
const generatedId = vue.ref(null);
|
|
6236
6294
|
vue.ref(null);
|
|
6237
|
-
vue.onMounted(()=>{
|
|
6238
|
-
generatedId.value =
|
|
6239
|
-
if(
|
|
6240
|
-
|
|
6241
|
-
currentTab.value =
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6295
|
+
vue.onMounted(() => {
|
|
6296
|
+
generatedId.value = 'tab' + Math.random().toString(36).slice(2);
|
|
6297
|
+
if (formattedTabs.value.length > 0) {
|
|
6298
|
+
if (props.currentTab) {
|
|
6299
|
+
currentTab.value = formattedTabs.value.find(tab => tab.label === props.currentTab);
|
|
6300
|
+
} else {
|
|
6301
|
+
currentTab.value = formattedTabs.value[0];
|
|
6302
|
+
}
|
|
6303
|
+
const tabParam = route.query.tab;
|
|
6304
|
+
if (tabParam) {
|
|
6305
|
+
const tabFromParam = formattedTabs.value.find(tab => getTabKey(tab) === tabParam);
|
|
6306
|
+
if (tabFromParam) {
|
|
6307
|
+
currentTab.value = tabFromParam;
|
|
6308
|
+
}
|
|
6309
|
+
} else if(currentTab.value && props.addTabQuery) {
|
|
6310
|
+
router.replace({path: tabsBaseUrl, query: {...route.query, tab: getTabKey(currentTab.value)}});
|
|
6311
|
+
}
|
|
6312
|
+
|
|
6245
6313
|
}
|
|
6246
6314
|
});
|
|
6247
6315
|
|
|
6248
|
-
function setTab(tab){
|
|
6316
|
+
function setTab(tab) {
|
|
6249
6317
|
currentTab.value = tab;
|
|
6250
6318
|
}
|
|
6251
6319
|
|
|
6320
|
+
const getTabKey = (tab) => {
|
|
6321
|
+
return tab.key ?? tab.label.replace(/\s+/g, '_').toLowerCase()
|
|
6322
|
+
};
|
|
6323
|
+
|
|
6252
6324
|
return (_ctx, _cache) => {
|
|
6325
|
+
const _component_router_link = vue.resolveComponent("router-link");
|
|
6326
|
+
|
|
6253
6327
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
6254
6328
|
vue.createElementVNode("ul", {
|
|
6255
|
-
class: vue.normalizeClass(["nav nav-tabs", vue.unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered') + __props.classes]),
|
|
6329
|
+
class: vue.normalizeClass(["nav nav-tabs nav-tabs-bordered", vue.unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered') + __props.classes]),
|
|
6256
6330
|
role: "tablist"
|
|
6257
6331
|
}, [
|
|
6258
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
6332
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(formattedTabs.value, (tab) => {
|
|
6259
6333
|
return (vue.openBlock(), vue.createElementBlock("li", _hoisted_1$9, [
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
vue.
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6334
|
+
(!__props.addTabQuery)
|
|
6335
|
+
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
6336
|
+
key: 0,
|
|
6337
|
+
onClick: $event => (setTab(tab)),
|
|
6338
|
+
class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
|
|
6339
|
+
}, [
|
|
6340
|
+
vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
6341
|
+
(tab.count || tab.tabCount)
|
|
6342
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6343
|
+
_cache[0] || (_cache[0] = vue.createElementVNode("i", { class: "d-none" }, null, -1 /* CACHED */)),
|
|
6344
|
+
vue.createElementVNode("sup", _hoisted_3$4, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
6345
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6346
|
+
: vue.createCommentVNode("v-if", true)
|
|
6347
|
+
], 10 /* CLASS, PROPS */, _hoisted_2$6))
|
|
6348
|
+
: (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
6349
|
+
key: 1,
|
|
6350
|
+
to: `${vue.unref(tabsBaseUrl)}?tab=${getTabKey(tab)}`,
|
|
6351
|
+
onClick: $event => (setTab(tab)),
|
|
6352
|
+
class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
|
|
6353
|
+
}, {
|
|
6354
|
+
default: vue.withCtx(() => [
|
|
6355
|
+
vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
6356
|
+
(tab.count || tab.tabCount)
|
|
6357
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6358
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("i", { class: "d-none" }, null, -1 /* CACHED */)),
|
|
6359
|
+
vue.createElementVNode("sup", _hoisted_4$4, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
6360
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6361
|
+
: vue.createCommentVNode("v-if", true)
|
|
6362
|
+
]),
|
|
6363
|
+
_: 2 /* DYNAMIC */
|
|
6364
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["to", "onClick", "class"]))
|
|
6272
6365
|
]))
|
|
6273
6366
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
6274
6367
|
], 2 /* CLASS */),
|
|
6275
|
-
vue.createElementVNode("div",
|
|
6368
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
6276
6369
|
(vue.unref(currentTab))
|
|
6277
|
-
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentTab).component), vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
6370
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentTab).component ?? __props.defaultComponent), vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
6278
6371
|
: vue.createCommentVNode("v-if", true)
|
|
6279
6372
|
])
|
|
6280
6373
|
], 64 /* STABLE_FRAGMENT */))
|
package/dist/library.mjs
CHANGED
|
@@ -2139,7 +2139,7 @@ const _hoisted_2$i = {
|
|
|
2139
2139
|
};
|
|
2140
2140
|
const _hoisted_3$f = ["src"];
|
|
2141
2141
|
const _hoisted_4$f = ["value"];
|
|
2142
|
-
const _hoisted_5$
|
|
2142
|
+
const _hoisted_5$d = ["disabled"];
|
|
2143
2143
|
|
|
2144
2144
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2145
2145
|
return (openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
@@ -2171,7 +2171,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2171
2171
|
onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
|
|
2172
2172
|
placeholder: "712345678",
|
|
2173
2173
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
|
|
2174
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$
|
|
2174
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
|
|
2175
2175
|
[vModelText, $data.input]
|
|
2176
2176
|
])
|
|
2177
2177
|
]))
|
|
@@ -2187,7 +2187,7 @@ const _hoisted_1$p = {
|
|
|
2187
2187
|
const _hoisted_2$h = ["id"];
|
|
2188
2188
|
const _hoisted_3$e = { class: "sh-suggestions-holder" };
|
|
2189
2189
|
const _hoisted_4$e = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2190
|
-
const _hoisted_5$
|
|
2190
|
+
const _hoisted_5$c = ["onClick"];
|
|
2191
2191
|
const _hoisted_6$9 = ["id"];
|
|
2192
2192
|
const _hoisted_7$8 = ["id", "aria-labelledby"];
|
|
2193
2193
|
const _hoisted_8$7 = ["onClick"];
|
|
@@ -2363,7 +2363,7 @@ return (_ctx, _cache) => {
|
|
|
2363
2363
|
type: "button",
|
|
2364
2364
|
class: "btn-close border-start border-1 ms-1",
|
|
2365
2365
|
"aria-label": "Close"
|
|
2366
|
-
}, null, 8 /* PROPS */, _hoisted_5$
|
|
2366
|
+
}, null, 8 /* PROPS */, _hoisted_5$c)
|
|
2367
2367
|
]))
|
|
2368
2368
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
2369
2369
|
]),
|
|
@@ -2784,7 +2784,7 @@ const _hoisted_2$g = {
|
|
|
2784
2784
|
};
|
|
2785
2785
|
const _hoisted_3$d = { key: 0 };
|
|
2786
2786
|
const _hoisted_4$d = { key: 1 };
|
|
2787
|
-
const _hoisted_5$
|
|
2787
|
+
const _hoisted_5$b = { class: "row" };
|
|
2788
2788
|
const _hoisted_6$8 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2789
2789
|
const _hoisted_7$7 = { class: "col-md-12" };
|
|
2790
2790
|
const _hoisted_8$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
@@ -2835,7 +2835,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2835
2835
|
}, null, 512 /* NEED_PATCH */), [
|
|
2836
2836
|
[vModelText, _ctx.form_elements['id']]
|
|
2837
2837
|
]),
|
|
2838
|
-
createElementVNode("div", _hoisted_5$
|
|
2838
|
+
createElementVNode("div", _hoisted_5$b, [
|
|
2839
2839
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
|
|
2840
2840
|
return (openBlock(), createElementBlock("div", {
|
|
2841
2841
|
class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
@@ -3397,7 +3397,7 @@ const _hoisted_3$c = {
|
|
|
3397
3397
|
class: "text-danger sh-required"
|
|
3398
3398
|
};
|
|
3399
3399
|
const _hoisted_4$c = ["innerHTML"];
|
|
3400
|
-
const _hoisted_5$
|
|
3400
|
+
const _hoisted_5$a = {
|
|
3401
3401
|
key: 2,
|
|
3402
3402
|
class: "form-notch"
|
|
3403
3403
|
};
|
|
@@ -3708,7 +3708,7 @@ return (_ctx, _cache) => {
|
|
|
3708
3708
|
}, null, 10 /* CLASS, PROPS */, _hoisted_4$c))
|
|
3709
3709
|
: createCommentVNode("v-if", true),
|
|
3710
3710
|
(unref(isFloating))
|
|
3711
|
-
? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
3711
|
+
? (openBlock(), createElementBlock("div", _hoisted_5$a, [...(_cache[1] || (_cache[1] = [
|
|
3712
3712
|
createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* CACHED */),
|
|
3713
3713
|
createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* CACHED */),
|
|
3714
3714
|
createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* CACHED */)
|
|
@@ -3761,7 +3761,7 @@ const _hoisted_1$k = ["id", "data-bs-backdrop"];
|
|
|
3761
3761
|
const _hoisted_2$e = { class: "modal-content" };
|
|
3762
3762
|
const _hoisted_3$b = { class: "modal-header" };
|
|
3763
3763
|
const _hoisted_4$b = { class: "modal-title flex-fill" };
|
|
3764
|
-
const _hoisted_5$
|
|
3764
|
+
const _hoisted_5$9 = { class: "modal-body" };
|
|
3765
3765
|
const _hoisted_6$6 = { class: "section" };
|
|
3766
3766
|
|
|
3767
3767
|
|
|
@@ -3833,7 +3833,7 @@ return (_ctx, _cache) => {
|
|
|
3833
3833
|
"aria-label": "Close"
|
|
3834
3834
|
}, null, -1 /* CACHED */))
|
|
3835
3835
|
]),
|
|
3836
|
-
createElementVNode("div", _hoisted_5$
|
|
3836
|
+
createElementVNode("div", _hoisted_5$9, [
|
|
3837
3837
|
createElementVNode("div", _hoisted_6$6, [
|
|
3838
3838
|
renderSlot(_ctx.$slots, "default")
|
|
3839
3839
|
])
|
|
@@ -3848,7 +3848,11 @@ return (_ctx, _cache) => {
|
|
|
3848
3848
|
|
|
3849
3849
|
script$p.__file = "src/lib/components/ShModal.vue";
|
|
3850
3850
|
|
|
3851
|
-
const _hoisted_1$j = {
|
|
3851
|
+
const _hoisted_1$j = {
|
|
3852
|
+
class: "dropdown sh-dropdown-form",
|
|
3853
|
+
"data-bs-auto-close": "outside",
|
|
3854
|
+
"aria-expanded": "false"
|
|
3855
|
+
};
|
|
3852
3856
|
|
|
3853
3857
|
var script$o = {
|
|
3854
3858
|
__name: 'ShDropDownForm',
|
|
@@ -3896,36 +3900,38 @@ const formError = (res)=>{
|
|
|
3896
3900
|
emit('formError',res);
|
|
3897
3901
|
};
|
|
3898
3902
|
const dropdownId = 'dropdown' + (Math.random() + 1).toString(36).substring(2);
|
|
3903
|
+
const cleanedProp = computed(()=>{
|
|
3904
|
+
const p = {...props};
|
|
3905
|
+
delete p.class;
|
|
3906
|
+
return p
|
|
3907
|
+
});
|
|
3899
3908
|
|
|
3900
3909
|
return (_ctx, _cache) => {
|
|
3901
|
-
return (openBlock(), createElementBlock(
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
key: JSON.stringify(__props.currentData ?? {})
|
|
3925
|
-
}, props), null, 16 /* FULL_PROPS */))
|
|
3926
|
-
])
|
|
3910
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
3911
|
+
createElementVNode("a", {
|
|
3912
|
+
class: normalizeClass(unref(btnClass)),
|
|
3913
|
+
href: "#",
|
|
3914
|
+
role: "button",
|
|
3915
|
+
id: dropdownId,
|
|
3916
|
+
"data-bs-toggle": "dropdown",
|
|
3917
|
+
"data-bs-auto-close": "outside",
|
|
3918
|
+
"aria-expanded": "false"
|
|
3919
|
+
}, [
|
|
3920
|
+
renderSlot(_ctx.$slots, "default")
|
|
3921
|
+
], 2 /* CLASS */),
|
|
3922
|
+
createElementVNode("div", {
|
|
3923
|
+
class: "dropdown-menu px-2 py-1",
|
|
3924
|
+
"aria-labelledby": dropdownId
|
|
3925
|
+
}, [
|
|
3926
|
+
(openBlock(), createBlock(script$q, mergeProps({
|
|
3927
|
+
onSuccess: success,
|
|
3928
|
+
onFieldChanged: fieldChanged,
|
|
3929
|
+
onFormSubmitted: formSubmitted,
|
|
3930
|
+
onFormError: formError,
|
|
3931
|
+
key: JSON.stringify(__props.currentData ?? {})
|
|
3932
|
+
}, cleanedProp.value), null, 16 /* FULL_PROPS */))
|
|
3927
3933
|
])
|
|
3928
|
-
]
|
|
3934
|
+
]))
|
|
3929
3935
|
}
|
|
3930
3936
|
}
|
|
3931
3937
|
|
|
@@ -4062,7 +4068,7 @@ const _hoisted_4$a = {
|
|
|
4062
4068
|
"data-bs-dismiss": "offcanvas",
|
|
4063
4069
|
"aria-label": "Close"
|
|
4064
4070
|
};
|
|
4065
|
-
const _hoisted_5$
|
|
4071
|
+
const _hoisted_5$8 = { class: "offcanvas-body" };
|
|
4066
4072
|
|
|
4067
4073
|
var script$l = {
|
|
4068
4074
|
__name: 'ShCanvas',
|
|
@@ -4114,7 +4120,7 @@ return (_ctx, _cache) => {
|
|
|
4114
4120
|
createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
4115
4121
|
createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
|
|
4116
4122
|
]),
|
|
4117
|
-
createElementVNode("div", _hoisted_5$
|
|
4123
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
4118
4124
|
renderSlot(_ctx.$slots, "default")
|
|
4119
4125
|
])
|
|
4120
4126
|
], 10 /* CLASS, PROPS */, _hoisted_1$h))
|
|
@@ -4612,7 +4618,7 @@ const _hoisted_4$9 = {
|
|
|
4612
4618
|
key: 2,
|
|
4613
4619
|
class: "bi bi-three-dots-vertical"
|
|
4614
4620
|
};
|
|
4615
|
-
const _hoisted_5$
|
|
4621
|
+
const _hoisted_5$7 = { class: "dropdown-menu" };
|
|
4616
4622
|
|
|
4617
4623
|
|
|
4618
4624
|
var script$g = {
|
|
@@ -4639,7 +4645,7 @@ return (_ctx, _cache) => {
|
|
|
4639
4645
|
? (openBlock(), createElementBlock("i", _hoisted_3$9))
|
|
4640
4646
|
: (openBlock(), createElementBlock("i", _hoisted_4$9))
|
|
4641
4647
|
]),
|
|
4642
|
-
createElementVNode("ul", _hoisted_5$
|
|
4648
|
+
createElementVNode("ul", _hoisted_5$7, [
|
|
4643
4649
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionItems), (act) => {
|
|
4644
4650
|
return (openBlock(), createElementBlock("li", {
|
|
4645
4651
|
key: act.label
|
|
@@ -4684,7 +4690,7 @@ const _hoisted_3$8 = {
|
|
|
4684
4690
|
"aria-expanded": "false"
|
|
4685
4691
|
};
|
|
4686
4692
|
const _hoisted_4$8 = ["innerHTML"];
|
|
4687
|
-
const _hoisted_5$
|
|
4693
|
+
const _hoisted_5$6 = {
|
|
4688
4694
|
class: "dropdown-menu sh-range-dropdown",
|
|
4689
4695
|
"aria-labelledby": "dropdownMenuLink"
|
|
4690
4696
|
};
|
|
@@ -4825,7 +4831,7 @@ return (_ctx, _cache) => {
|
|
|
4825
4831
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
4826
4832
|
createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_4$8)
|
|
4827
4833
|
]),
|
|
4828
|
-
createElementVNode("div", _hoisted_5$
|
|
4834
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
4829
4835
|
createElementVNode("ul", _hoisted_6$5, [
|
|
4830
4836
|
(openBlock(true), createElementBlock(Fragment, null, renderList(dates.value, (date) => {
|
|
4831
4837
|
return (openBlock(), createElementBlock("li", {
|
|
@@ -4960,7 +4966,7 @@ const _hoisted_1$c = { key: 0 };
|
|
|
4960
4966
|
const _hoisted_2$9 = { class: "record_count_body mb-3" };
|
|
4961
4967
|
const _hoisted_3$7 = ["value"];
|
|
4962
4968
|
const _hoisted_4$7 = { class: "record_counts" };
|
|
4963
|
-
const _hoisted_5$
|
|
4969
|
+
const _hoisted_5$5 = {
|
|
4964
4970
|
key: 0,
|
|
4965
4971
|
"aria-label": "Page navigation"
|
|
4966
4972
|
};
|
|
@@ -5013,7 +5019,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5013
5019
|
createElementVNode("span", _hoisted_4$7, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
5014
5020
|
]),
|
|
5015
5021
|
($props.pagination_data != null)
|
|
5016
|
-
? (openBlock(), createElementBlock("nav", _hoisted_5$
|
|
5022
|
+
? (openBlock(), createElementBlock("nav", _hoisted_5$5, [
|
|
5017
5023
|
createElementVNode("ul", _hoisted_6$4, [
|
|
5018
5024
|
createElementVNode("li", {
|
|
5019
5025
|
class: normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
|
|
@@ -5092,7 +5098,7 @@ const _hoisted_4$6 = {
|
|
|
5092
5098
|
key: 1,
|
|
5093
5099
|
class: "row"
|
|
5094
5100
|
};
|
|
5095
|
-
const _hoisted_5$
|
|
5101
|
+
const _hoisted_5$4 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
5096
5102
|
const _hoisted_6$3 = ["placeholder"];
|
|
5097
5103
|
const _hoisted_7$3 = {
|
|
5098
5104
|
key: 0,
|
|
@@ -5579,7 +5585,7 @@ return (_ctx, _cache) => {
|
|
|
5579
5585
|
: createCommentVNode("v-if", true),
|
|
5580
5586
|
(!__props.hideSearch)
|
|
5581
5587
|
? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
5582
|
-
createElementVNode("div", _hoisted_5$
|
|
5588
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
5583
5589
|
createElementVNode("div", {
|
|
5584
5590
|
class: normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
5585
5591
|
}, [
|
|
@@ -6211,59 +6217,146 @@ const _hoisted_1$9 = {
|
|
|
6211
6217
|
};
|
|
6212
6218
|
const _hoisted_2$6 = ["onClick"];
|
|
6213
6219
|
const _hoisted_3$4 = { class: "sh_tab_count" };
|
|
6214
|
-
const _hoisted_4$4 = { class: "
|
|
6220
|
+
const _hoisted_4$4 = { class: "sh_tab_count" };
|
|
6221
|
+
const _hoisted_5$3 = { class: "tab-content" };
|
|
6222
|
+
|
|
6223
|
+
// const props = defineProps(['tabs', 'data', 'classes', 'currentTab', 'component', 'baseUrl', 'defaultComponent','addTabQuery'])
|
|
6215
6224
|
|
|
6216
6225
|
var script$b = {
|
|
6217
6226
|
__name: 'ShDynamicTabs',
|
|
6218
|
-
props:
|
|
6227
|
+
props: {
|
|
6228
|
+
tabs: {
|
|
6229
|
+
type: Array,
|
|
6230
|
+
required: true
|
|
6231
|
+
},
|
|
6232
|
+
data: {
|
|
6233
|
+
type: Object,
|
|
6234
|
+
default: () => ({})
|
|
6235
|
+
},
|
|
6236
|
+
classes: {
|
|
6237
|
+
type: String,
|
|
6238
|
+
default: ''
|
|
6239
|
+
},
|
|
6240
|
+
currentTab: {
|
|
6241
|
+
type: String,
|
|
6242
|
+
default: null
|
|
6243
|
+
},
|
|
6244
|
+
component: {
|
|
6245
|
+
type: Object,
|
|
6246
|
+
default: null
|
|
6247
|
+
},
|
|
6248
|
+
baseUrl: {
|
|
6249
|
+
type: String,
|
|
6250
|
+
default: null
|
|
6251
|
+
},
|
|
6252
|
+
defaultComponent: {
|
|
6253
|
+
type: Object,
|
|
6254
|
+
default: () => ({ template: '<div></div>' })
|
|
6255
|
+
},
|
|
6256
|
+
addTabQuery: {
|
|
6257
|
+
type: Boolean,
|
|
6258
|
+
default: false
|
|
6259
|
+
}
|
|
6260
|
+
},
|
|
6219
6261
|
setup(__props) {
|
|
6220
6262
|
|
|
6221
6263
|
const props = __props;
|
|
6222
|
-
const
|
|
6264
|
+
const route = useRoute();
|
|
6265
|
+
const router = useRouter();
|
|
6266
|
+
const formattedTabs = computed(() => {
|
|
6267
|
+
if (!props.tabs || props.tabs.length === 0) {
|
|
6268
|
+
return []
|
|
6269
|
+
}
|
|
6270
|
+
return props.tabs.map(tab => {
|
|
6271
|
+
if (typeof tab === 'string') {
|
|
6272
|
+
return {key: tab, label: tab.replace(/_/g, ' ')}
|
|
6273
|
+
}
|
|
6274
|
+
if (typeof tab === 'function') {
|
|
6275
|
+
return tab(props.data)
|
|
6276
|
+
}
|
|
6277
|
+
return tab
|
|
6278
|
+
})
|
|
6279
|
+
});
|
|
6280
|
+
const tabsBaseUrl = props.baseUrl ?? route.path;
|
|
6223
6281
|
let currentTab = shallowRef(null);
|
|
6224
6282
|
const generatedId = ref(null);
|
|
6225
6283
|
ref(null);
|
|
6226
|
-
onMounted(()=>{
|
|
6227
|
-
generatedId.value =
|
|
6228
|
-
if(
|
|
6229
|
-
|
|
6230
|
-
currentTab.value =
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6284
|
+
onMounted(() => {
|
|
6285
|
+
generatedId.value = 'tab' + Math.random().toString(36).slice(2);
|
|
6286
|
+
if (formattedTabs.value.length > 0) {
|
|
6287
|
+
if (props.currentTab) {
|
|
6288
|
+
currentTab.value = formattedTabs.value.find(tab => tab.label === props.currentTab);
|
|
6289
|
+
} else {
|
|
6290
|
+
currentTab.value = formattedTabs.value[0];
|
|
6291
|
+
}
|
|
6292
|
+
const tabParam = route.query.tab;
|
|
6293
|
+
if (tabParam) {
|
|
6294
|
+
const tabFromParam = formattedTabs.value.find(tab => getTabKey(tab) === tabParam);
|
|
6295
|
+
if (tabFromParam) {
|
|
6296
|
+
currentTab.value = tabFromParam;
|
|
6297
|
+
}
|
|
6298
|
+
} else if(currentTab.value && props.addTabQuery) {
|
|
6299
|
+
router.replace({path: tabsBaseUrl, query: {...route.query, tab: getTabKey(currentTab.value)}});
|
|
6300
|
+
}
|
|
6301
|
+
|
|
6234
6302
|
}
|
|
6235
6303
|
});
|
|
6236
6304
|
|
|
6237
|
-
function setTab(tab){
|
|
6305
|
+
function setTab(tab) {
|
|
6238
6306
|
currentTab.value = tab;
|
|
6239
6307
|
}
|
|
6240
6308
|
|
|
6309
|
+
const getTabKey = (tab) => {
|
|
6310
|
+
return tab.key ?? tab.label.replace(/\s+/g, '_').toLowerCase()
|
|
6311
|
+
};
|
|
6312
|
+
|
|
6241
6313
|
return (_ctx, _cache) => {
|
|
6314
|
+
const _component_router_link = resolveComponent("router-link");
|
|
6315
|
+
|
|
6242
6316
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
6243
6317
|
createElementVNode("ul", {
|
|
6244
|
-
class: normalizeClass(["nav nav-tabs", unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered') + __props.classes]),
|
|
6318
|
+
class: normalizeClass(["nav nav-tabs nav-tabs-bordered", unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered') + __props.classes]),
|
|
6245
6319
|
role: "tablist"
|
|
6246
6320
|
}, [
|
|
6247
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
6321
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(formattedTabs.value, (tab) => {
|
|
6248
6322
|
return (openBlock(), createElementBlock("li", _hoisted_1$9, [
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6323
|
+
(!__props.addTabQuery)
|
|
6324
|
+
? (openBlock(), createElementBlock("button", {
|
|
6325
|
+
key: 0,
|
|
6326
|
+
onClick: $event => (setTab(tab)),
|
|
6327
|
+
class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
|
|
6328
|
+
}, [
|
|
6329
|
+
createTextVNode(toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
6330
|
+
(tab.count || tab.tabCount)
|
|
6331
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6332
|
+
_cache[0] || (_cache[0] = createElementVNode("i", { class: "d-none" }, null, -1 /* CACHED */)),
|
|
6333
|
+
createElementVNode("sup", _hoisted_3$4, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
6334
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6335
|
+
: createCommentVNode("v-if", true)
|
|
6336
|
+
], 10 /* CLASS, PROPS */, _hoisted_2$6))
|
|
6337
|
+
: (openBlock(), createBlock(_component_router_link, {
|
|
6338
|
+
key: 1,
|
|
6339
|
+
to: `${unref(tabsBaseUrl)}?tab=${getTabKey(tab)}`,
|
|
6340
|
+
onClick: $event => (setTab(tab)),
|
|
6341
|
+
class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
|
|
6342
|
+
}, {
|
|
6343
|
+
default: withCtx(() => [
|
|
6344
|
+
createTextVNode(toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
6345
|
+
(tab.count || tab.tabCount)
|
|
6346
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6347
|
+
_cache[1] || (_cache[1] = createElementVNode("i", { class: "d-none" }, null, -1 /* CACHED */)),
|
|
6348
|
+
createElementVNode("sup", _hoisted_4$4, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
6349
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6350
|
+
: createCommentVNode("v-if", true)
|
|
6351
|
+
]),
|
|
6352
|
+
_: 2 /* DYNAMIC */
|
|
6353
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["to", "onClick", "class"]))
|
|
6261
6354
|
]))
|
|
6262
6355
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
6263
6356
|
], 2 /* CLASS */),
|
|
6264
|
-
createElementVNode("div",
|
|
6357
|
+
createElementVNode("div", _hoisted_5$3, [
|
|
6265
6358
|
(unref(currentTab))
|
|
6266
|
-
? (openBlock(), createBlock(resolveDynamicComponent(unref(currentTab).component), normalizeProps(mergeProps({ key: 0 }, unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
6359
|
+
? (openBlock(), createBlock(resolveDynamicComponent(unref(currentTab).component ?? __props.defaultComponent), normalizeProps(mergeProps({ key: 0 }, unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
6267
6360
|
: createCommentVNode("v-if", true)
|
|
6268
6361
|
])
|
|
6269
6362
|
], 64 /* STABLE_FRAGMENT */))
|