bootstrap-vue-wrapper 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap-vue-wrapper.js +104 -104
- package/dist/bootstrap-vue-wrapper.umd.cjs +1 -1
- package/dist/index.d.ts +13 -14
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as m, resolveComponent as
|
|
1
|
+
import { defineComponent as m, resolveComponent as w, openBlock as a, createElementBlock as i, createElementVNode as s, Fragment as b, renderList as y, normalizeClass as h, createBlock as M, withCtx as H, createTextVNode as S, toDisplayString as l, renderSlot as g, ref as C, createCommentVNode as u, mergeProps as k, resolveDirective as R, withDirectives as A, pushScopeId as L, popScopeId as O } from "vue";
|
|
2
2
|
import { useI18n as N } from "vue-i18n";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import * as B from "bootstrap";
|
|
4
|
+
const _ = m({
|
|
5
5
|
name: "BsBreadcrumb",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -28,16 +28,16 @@ const O = m({
|
|
|
28
28
|
for (const [d, v] of t)
|
|
29
29
|
r[d] = v;
|
|
30
30
|
return r;
|
|
31
|
-
},
|
|
32
|
-
function
|
|
33
|
-
const o =
|
|
34
|
-
return a(), i("nav",
|
|
35
|
-
s("ol",
|
|
31
|
+
}, D = { "aria-label": "breadcrumb" }, q = { class: "breadcrumb" }, T = ["textContent"];
|
|
32
|
+
function F(e, t, r, d, v, f) {
|
|
33
|
+
const o = w("router-link");
|
|
34
|
+
return a(), i("nav", D, [
|
|
35
|
+
s("ol", q, [
|
|
36
36
|
(a(!0), i(b, null, y(e.items, (n, p) => (a(), i("li", {
|
|
37
37
|
key: p,
|
|
38
38
|
class: h(["breadcrumb-item", { active: !e.isRouteAvailable(n) }])
|
|
39
39
|
}, [
|
|
40
|
-
e.isRouteAvailable(n) ? (a(),
|
|
40
|
+
e.isRouteAvailable(n) ? (a(), M(o, {
|
|
41
41
|
key: 0,
|
|
42
42
|
to: n.route
|
|
43
43
|
}, {
|
|
@@ -48,12 +48,12 @@ function T(e, t, r, d, v, f) {
|
|
|
48
48
|
}, 1032, ["to"])) : (a(), i("span", {
|
|
49
49
|
key: 1,
|
|
50
50
|
textContent: l(n.title)
|
|
51
|
-
}, null, 8,
|
|
51
|
+
}, null, 8, T))
|
|
52
52
|
], 2))), 128))
|
|
53
53
|
])
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
|
-
const rt = /* @__PURE__ */ c(
|
|
56
|
+
const rt = /* @__PURE__ */ c(_, [["render", F]]), z = m({
|
|
57
57
|
name: "BsForm",
|
|
58
58
|
emits: ["submit"],
|
|
59
59
|
data() {
|
|
@@ -72,7 +72,7 @@ const rt = /* @__PURE__ */ c(O, [["render", T]]), F = m({
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
function
|
|
75
|
+
function j(e, t, r, d, v, f) {
|
|
76
76
|
return a(), i("form", {
|
|
77
77
|
class: h(["needs-validation", {
|
|
78
78
|
"was-validated": e.submitClicked
|
|
@@ -83,7 +83,7 @@ function z(e, t, r, d, v, f) {
|
|
|
83
83
|
g(e.$slots, "default")
|
|
84
84
|
], 34);
|
|
85
85
|
}
|
|
86
|
-
const dt = /* @__PURE__ */ c(
|
|
86
|
+
const dt = /* @__PURE__ */ c(z, [["render", j]]);
|
|
87
87
|
function I(e) {
|
|
88
88
|
const { t } = N(), r = C(null);
|
|
89
89
|
function d(n) {
|
|
@@ -133,7 +133,7 @@ function I(e) {
|
|
|
133
133
|
setCustomError: d
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const U = m({
|
|
137
137
|
name: "BsInput",
|
|
138
138
|
props: {
|
|
139
139
|
/**
|
|
@@ -205,15 +205,15 @@ const j = m({
|
|
|
205
205
|
this.validatorEnabled && this.validator.onInvalid(e);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
}),
|
|
209
|
-
function
|
|
208
|
+
}), G = ["for", "textContent"], J = ["id", "value", "aria-describedby"], K = ["textContent"], Q = ["id", "textContent"];
|
|
209
|
+
function W(e, t, r, d, v, f) {
|
|
210
210
|
return a(), i(b, null, [
|
|
211
211
|
e.label !== void 0 ? (a(), i("label", {
|
|
212
212
|
key: 0,
|
|
213
213
|
for: e.id,
|
|
214
214
|
class: "form-label",
|
|
215
215
|
textContent: l(e.label)
|
|
216
|
-
}, null, 8,
|
|
216
|
+
}, null, 8, G)) : u("", !0),
|
|
217
217
|
s("input", k({
|
|
218
218
|
id: e.id,
|
|
219
219
|
ref: "inputRef",
|
|
@@ -223,21 +223,21 @@ function Q(e, t, r, d, v, f) {
|
|
|
223
223
|
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
224
224
|
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
225
225
|
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
226
|
-
}), null, 16,
|
|
226
|
+
}), null, 16, J),
|
|
227
227
|
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
228
228
|
key: 1,
|
|
229
229
|
class: "invalid-feedback",
|
|
230
230
|
textContent: l(e.validator.getInvalidMessage())
|
|
231
|
-
}, null, 8,
|
|
231
|
+
}, null, 8, K)) : u("", !0),
|
|
232
232
|
e.hint !== void 0 ? (a(), i("div", {
|
|
233
233
|
key: 2,
|
|
234
234
|
id: e.getHintId(),
|
|
235
235
|
class: "form-text",
|
|
236
236
|
textContent: l(e.hint)
|
|
237
|
-
}, null, 8,
|
|
237
|
+
}, null, 8, Q)) : u("", !0)
|
|
238
238
|
], 64);
|
|
239
239
|
}
|
|
240
|
-
const ut = /* @__PURE__ */ c(
|
|
240
|
+
const ut = /* @__PURE__ */ c(U, [["render", W]]), X = m({
|
|
241
241
|
name: "BsCheckbox",
|
|
242
242
|
props: {
|
|
243
243
|
/**
|
|
@@ -335,8 +335,8 @@ const ut = /* @__PURE__ */ c(j, [["render", Q]]), W = m({
|
|
|
335
335
|
this.validatorEnabled && this.validator.onInvalid(e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
}),
|
|
339
|
-
function
|
|
338
|
+
}), Y = ["id", "value", "checked", "aria-describedby"], Z = ["for", "textContent"], x = ["textContent"], ee = ["id", "textContent"];
|
|
339
|
+
function te(e, t, r, d, v, f) {
|
|
340
340
|
return a(), i("div", {
|
|
341
341
|
class: h(["form-check", e.classContainer])
|
|
342
342
|
}, [
|
|
@@ -351,27 +351,27 @@ function ee(e, t, r, d, v, f) {
|
|
|
351
351
|
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
352
352
|
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
353
353
|
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
354
|
-
}), null, 16,
|
|
354
|
+
}), null, 16, Y),
|
|
355
355
|
e.label !== void 0 ? (a(), i("label", {
|
|
356
356
|
key: 0,
|
|
357
357
|
for: e.id,
|
|
358
358
|
class: "form-check-label",
|
|
359
359
|
textContent: l(e.label)
|
|
360
|
-
}, null, 8,
|
|
360
|
+
}, null, 8, Z)) : u("", !0),
|
|
361
361
|
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
362
362
|
key: 1,
|
|
363
363
|
class: "invalid-feedback",
|
|
364
364
|
textContent: l(e.validator.getInvalidMessage())
|
|
365
|
-
}, null, 8,
|
|
365
|
+
}, null, 8, x)) : u("", !0),
|
|
366
366
|
e.hint !== void 0 ? (a(), i("div", {
|
|
367
367
|
key: 2,
|
|
368
368
|
id: e.getHintId(),
|
|
369
369
|
class: "form-text",
|
|
370
370
|
textContent: l(e.hint)
|
|
371
|
-
}, null, 8,
|
|
371
|
+
}, null, 8, ee)) : u("", !0)
|
|
372
372
|
], 2);
|
|
373
373
|
}
|
|
374
|
-
const vt = /* @__PURE__ */ c(
|
|
374
|
+
const vt = /* @__PURE__ */ c(X, [["render", te]]), ne = m({
|
|
375
375
|
name: "BsTextarea",
|
|
376
376
|
props: {
|
|
377
377
|
/**
|
|
@@ -443,15 +443,15 @@ const vt = /* @__PURE__ */ c(W, [["render", ee]]), te = m({
|
|
|
443
443
|
this.validatorEnabled && this.validator.onInvalid(e);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
}),
|
|
447
|
-
function
|
|
446
|
+
}), ae = ["for", "textContent"], ie = ["id", "value", "aria-describedby"], oe = ["textContent"], se = ["id", "textContent"];
|
|
447
|
+
function le(e, t, r, d, v, f) {
|
|
448
448
|
return a(), i(b, null, [
|
|
449
449
|
e.label !== void 0 ? (a(), i("label", {
|
|
450
450
|
key: 0,
|
|
451
451
|
for: e.id,
|
|
452
452
|
class: "form-label",
|
|
453
453
|
textContent: l(e.label)
|
|
454
|
-
}, null, 8,
|
|
454
|
+
}, null, 8, ae)) : u("", !0),
|
|
455
455
|
s("textarea", k({
|
|
456
456
|
id: e.id,
|
|
457
457
|
ref: "inputRef",
|
|
@@ -461,21 +461,21 @@ function se(e, t, r, d, v, f) {
|
|
|
461
461
|
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
462
462
|
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
463
463
|
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
464
|
-
}), null, 16,
|
|
464
|
+
}), null, 16, ie),
|
|
465
465
|
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
466
466
|
key: 1,
|
|
467
467
|
class: "invalid-feedback",
|
|
468
468
|
textContent: l(e.validator.getInvalidMessage())
|
|
469
|
-
}, null, 8,
|
|
469
|
+
}, null, 8, oe)) : u("", !0),
|
|
470
470
|
e.hint !== void 0 ? (a(), i("div", {
|
|
471
471
|
key: 2,
|
|
472
472
|
id: e.getHintId(),
|
|
473
473
|
class: "form-text",
|
|
474
474
|
textContent: l(e.hint)
|
|
475
|
-
}, null, 8,
|
|
475
|
+
}, null, 8, se)) : u("", !0)
|
|
476
476
|
], 64);
|
|
477
477
|
}
|
|
478
|
-
const ht = /* @__PURE__ */ c(
|
|
478
|
+
const ht = /* @__PURE__ */ c(ne, [["render", le]]), re = m({
|
|
479
479
|
name: "BsPaginator",
|
|
480
480
|
props: {
|
|
481
481
|
/**
|
|
@@ -584,10 +584,10 @@ const ht = /* @__PURE__ */ c(te, [["render", se]]), le = m({
|
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
}),
|
|
588
|
-
function
|
|
587
|
+
}), de = { class: "pagination" }, ue = ["textContent"], ve = ["textContent"], he = ["onClick", "textContent"], fe = ["textContent"], pe = ["textContent"];
|
|
588
|
+
function me(e, t, r, d, v, f) {
|
|
589
589
|
return a(), i("nav", null, [
|
|
590
|
-
s("ul",
|
|
590
|
+
s("ul", de, [
|
|
591
591
|
s("li", {
|
|
592
592
|
class: h(["page-item page-item-first", { disabled: e.isPageActive(1) }])
|
|
593
593
|
}, [
|
|
@@ -595,7 +595,7 @@ function pe(e, t, r, d, v, f) {
|
|
|
595
595
|
class: "page-link",
|
|
596
596
|
onClick: t[0] || (t[0] = (o) => e.onPageClick(1)),
|
|
597
597
|
textContent: l(e.firstPageLabel)
|
|
598
|
-
}, null, 8,
|
|
598
|
+
}, null, 8, ue)
|
|
599
599
|
], 2),
|
|
600
600
|
s("li", {
|
|
601
601
|
class: h(["page-item page-item-previous", { disabled: e.isPageActive(1) }])
|
|
@@ -604,7 +604,7 @@ function pe(e, t, r, d, v, f) {
|
|
|
604
604
|
class: "page-link",
|
|
605
605
|
onClick: t[1] || (t[1] = (o) => e.onPageClick(e.currentPage - 1)),
|
|
606
606
|
textContent: l(e.previousPageLabel)
|
|
607
|
-
}, null, 8,
|
|
607
|
+
}, null, 8, ve)
|
|
608
608
|
], 2),
|
|
609
609
|
(a(!0), i(b, null, y(e.getVisiblePages(), (o, n) => (a(), i("li", {
|
|
610
610
|
key: n,
|
|
@@ -616,7 +616,7 @@ function pe(e, t, r, d, v, f) {
|
|
|
616
616
|
class: "page-link",
|
|
617
617
|
onClick: (p) => e.onPageClick(o),
|
|
618
618
|
textContent: l(o)
|
|
619
|
-
}, null, 8,
|
|
619
|
+
}, null, 8, he)
|
|
620
620
|
], 2))), 128)),
|
|
621
621
|
s("li", {
|
|
622
622
|
class: h(["page-item page-item-next", { disabled: e.isPageActive(e.getPageCount()) }])
|
|
@@ -625,7 +625,7 @@ function pe(e, t, r, d, v, f) {
|
|
|
625
625
|
class: "page-link",
|
|
626
626
|
onClick: t[2] || (t[2] = (o) => e.onPageClick(e.currentPage + 1)),
|
|
627
627
|
textContent: l(e.nextPageLabel)
|
|
628
|
-
}, null, 8,
|
|
628
|
+
}, null, 8, fe)
|
|
629
629
|
], 2),
|
|
630
630
|
s("li", {
|
|
631
631
|
class: h(["page-item page-item-last", { disabled: e.isPageActive(e.getPageCount()) }])
|
|
@@ -634,12 +634,12 @@ function pe(e, t, r, d, v, f) {
|
|
|
634
634
|
class: "page-link",
|
|
635
635
|
onClick: t[3] || (t[3] = (o) => e.onPageClick(e.getPageCount())),
|
|
636
636
|
textContent: l(e.lastPageLabel)
|
|
637
|
-
}, null, 8,
|
|
637
|
+
}, null, 8, pe)
|
|
638
638
|
], 2)
|
|
639
639
|
])
|
|
640
640
|
]);
|
|
641
641
|
}
|
|
642
|
-
const ft = /* @__PURE__ */ c(
|
|
642
|
+
const ft = /* @__PURE__ */ c(re, [["render", me], ["__scopeId", "data-v-ff85ae67"]]), ce = m({
|
|
643
643
|
name: "BsTable",
|
|
644
644
|
props: {
|
|
645
645
|
/**
|
|
@@ -742,12 +742,12 @@ const ft = /* @__PURE__ */ c(le, [["render", pe], ["__scopeId", "data-v-ff85ae67
|
|
|
742
742
|
this.isSortableField(e) && this.$emit("orderChanged", { sortDesc: this.calcSortDesc(e.key), orderBy: e.key });
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
745
|
+
}), ge = (e) => (L("data-v-7c949d62"), e = e(), O(), e), be = { class: "table" }, $e = ["onClick"], ye = { key: 0 }, Ce = ["colspan"], ke = /* @__PURE__ */ ge(() => /* @__PURE__ */ s("div", { class: "d-flex justify-content-center p-2" }, [
|
|
746
746
|
/* @__PURE__ */ s("div", { class: "spinner-border spinner-border-sm" })
|
|
747
|
-
], -1)),
|
|
748
|
-
function
|
|
749
|
-
const o =
|
|
750
|
-
return a(), i("table",
|
|
747
|
+
], -1)), Ie = { key: 1 }, Se = ["colspan"], Be = { class: "text-center text-muted small" };
|
|
748
|
+
function Pe(e, t, r, d, v, f) {
|
|
749
|
+
const o = R("t");
|
|
750
|
+
return a(), i("table", be, [
|
|
751
751
|
s("thead", null, [
|
|
752
752
|
s("tr", null, [
|
|
753
753
|
(a(!0), i(b, null, y(e.fields, (n) => (a(), i("th", {
|
|
@@ -766,28 +766,28 @@ function Be(e, t, r, d, v, f) {
|
|
|
766
766
|
class: h(e.getSortIconClass())
|
|
767
767
|
}, null, 2)) : u("", !0)
|
|
768
768
|
], !0)
|
|
769
|
-
], 10,
|
|
769
|
+
], 10, $e))), 128))
|
|
770
770
|
])
|
|
771
771
|
]),
|
|
772
772
|
s("tbody", null, [
|
|
773
|
-
e.isLoading ? (a(), i("tr",
|
|
773
|
+
e.isLoading ? (a(), i("tr", ye, [
|
|
774
774
|
s("td", {
|
|
775
775
|
colspan: e.fields.length
|
|
776
776
|
}, [
|
|
777
777
|
g(e.$slots, "loading", {}, () => [
|
|
778
|
-
|
|
778
|
+
ke
|
|
779
779
|
], !0)
|
|
780
|
-
], 8,
|
|
781
|
-
])) : e.items.length === 0 ? (a(), i("tr",
|
|
780
|
+
], 8, Ce)
|
|
781
|
+
])) : e.items.length === 0 ? (a(), i("tr", Ie, [
|
|
782
782
|
s("td", {
|
|
783
783
|
colspan: e.fields.length
|
|
784
784
|
}, [
|
|
785
785
|
g(e.$slots, "empty", {}, () => [
|
|
786
|
-
|
|
786
|
+
A(s("div", Be, null, 512), [
|
|
787
787
|
[o, "table.empty_text"]
|
|
788
788
|
])
|
|
789
789
|
], !0)
|
|
790
|
-
], 8,
|
|
790
|
+
], 8, Se)
|
|
791
791
|
])) : (a(!0), i(b, { key: 2 }, y(e.items, (n, p) => (a(), i("tr", {
|
|
792
792
|
key: p,
|
|
793
793
|
class: h(n.trClass)
|
|
@@ -809,12 +809,12 @@ function Be(e, t, r, d, v, f) {
|
|
|
809
809
|
])
|
|
810
810
|
]);
|
|
811
811
|
}
|
|
812
|
-
const pt = /* @__PURE__ */ c(
|
|
812
|
+
const pt = /* @__PURE__ */ c(ce, [["render", Pe], ["__scopeId", "data-v-7c949d62"]]), P = B.Toast, Ve = m({
|
|
813
813
|
name: "BsToast",
|
|
814
814
|
emits: ["shown", "hidden"],
|
|
815
815
|
mounted() {
|
|
816
816
|
const e = this.$refs.toastRef;
|
|
817
|
-
|
|
817
|
+
P.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.toast", this.onShown), e.addEventListener("hidden.bs.toast", this.onHidden);
|
|
818
818
|
},
|
|
819
819
|
methods: {
|
|
820
820
|
/**
|
|
@@ -822,7 +822,7 @@ const pt = /* @__PURE__ */ c(me, [["render", Be], ["__scopeId", "data-v-7c949d62
|
|
|
822
822
|
*/
|
|
823
823
|
hide() {
|
|
824
824
|
const e = this.$refs.toastRef;
|
|
825
|
-
|
|
825
|
+
P.getOrCreateInstance(e).hide();
|
|
826
826
|
},
|
|
827
827
|
/**
|
|
828
828
|
* Hidden event.
|
|
@@ -837,19 +837,19 @@ const pt = /* @__PURE__ */ c(me, [["render", Be], ["__scopeId", "data-v-7c949d62
|
|
|
837
837
|
this.$emit("hidden");
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
840
|
+
}), Ee = {
|
|
841
841
|
ref: "toastRef",
|
|
842
842
|
class: "toast hide",
|
|
843
843
|
role: "alert",
|
|
844
844
|
"aria-live": "assertive",
|
|
845
845
|
"aria-atomic": "true"
|
|
846
846
|
};
|
|
847
|
-
function
|
|
848
|
-
return a(), i("div",
|
|
847
|
+
function we(e, t, r, d, v, f) {
|
|
848
|
+
return a(), i("div", Ee, [
|
|
849
849
|
g(e.$slots, "default")
|
|
850
850
|
], 512);
|
|
851
851
|
}
|
|
852
|
-
const mt = /* @__PURE__ */ c(
|
|
852
|
+
const mt = /* @__PURE__ */ c(Ve, [["render", we]]), V = B.Modal, Me = m({
|
|
853
853
|
name: "BsModal",
|
|
854
854
|
props: {
|
|
855
855
|
/**
|
|
@@ -879,7 +879,7 @@ const mt = /* @__PURE__ */ c(Pe, [["render", Ee]]), we = m({
|
|
|
879
879
|
emits: ["shown", "hidden"],
|
|
880
880
|
mounted() {
|
|
881
881
|
const e = this.$refs.modalRef;
|
|
882
|
-
|
|
882
|
+
V.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.modal", this.onShown), e.addEventListener("hidden.bs.modal", this.onHidden);
|
|
883
883
|
},
|
|
884
884
|
methods: {
|
|
885
885
|
/**
|
|
@@ -887,7 +887,7 @@ const mt = /* @__PURE__ */ c(Pe, [["render", Ee]]), we = m({
|
|
|
887
887
|
*/
|
|
888
888
|
hide() {
|
|
889
889
|
const e = this.$refs.modalRef;
|
|
890
|
-
|
|
890
|
+
V.getOrCreateInstance(e).hide();
|
|
891
891
|
},
|
|
892
892
|
/**
|
|
893
893
|
* Shown event.
|
|
@@ -907,46 +907,46 @@ const mt = /* @__PURE__ */ c(Pe, [["render", Ee]]), we = m({
|
|
|
907
907
|
class: "modal fade",
|
|
908
908
|
tabindex: "-1",
|
|
909
909
|
"aria-hidden": "true"
|
|
910
|
-
},
|
|
910
|
+
}, Re = { class: "modal-content" }, Ae = {
|
|
911
911
|
key: 0,
|
|
912
912
|
class: "modal-header"
|
|
913
|
-
},
|
|
913
|
+
}, Le = ["textContent"], Oe = /* @__PURE__ */ s("button", {
|
|
914
914
|
type: "button",
|
|
915
915
|
class: "btn-close",
|
|
916
916
|
"data-bs-dismiss": "modal"
|
|
917
917
|
}, null, -1), Ne = {
|
|
918
918
|
key: 1,
|
|
919
919
|
class: "modal-body"
|
|
920
|
-
},
|
|
920
|
+
}, _e = {
|
|
921
921
|
key: 2,
|
|
922
922
|
class: "modal-footer"
|
|
923
923
|
};
|
|
924
|
-
function
|
|
924
|
+
function De(e, t, r, d, v, f) {
|
|
925
925
|
return a(), i("div", He, [
|
|
926
926
|
s("div", {
|
|
927
927
|
class: h(["modal-dialog", e.classDialog])
|
|
928
928
|
}, [
|
|
929
|
-
s("div",
|
|
930
|
-
e.hideHeader ? u("", !0) : (a(), i("div",
|
|
929
|
+
s("div", Re, [
|
|
930
|
+
e.hideHeader ? u("", !0) : (a(), i("div", Ae, [
|
|
931
931
|
g(e.$slots, "header", {}, () => [
|
|
932
932
|
s("div", {
|
|
933
933
|
class: "h5 modal-title",
|
|
934
934
|
textContent: l(e.title)
|
|
935
|
-
}, null, 8,
|
|
936
|
-
|
|
935
|
+
}, null, 8, Le),
|
|
936
|
+
Oe
|
|
937
937
|
])
|
|
938
938
|
])),
|
|
939
939
|
e.hideBody ? u("", !0) : (a(), i("div", Ne, [
|
|
940
940
|
g(e.$slots, "body")
|
|
941
941
|
])),
|
|
942
|
-
e.hideFooter ? u("", !0) : (a(), i("div",
|
|
942
|
+
e.hideFooter ? u("", !0) : (a(), i("div", _e, [
|
|
943
943
|
g(e.$slots, "footer")
|
|
944
944
|
]))
|
|
945
945
|
])
|
|
946
946
|
], 2)
|
|
947
947
|
], 512);
|
|
948
948
|
}
|
|
949
|
-
const ct = /* @__PURE__ */ c(
|
|
949
|
+
const ct = /* @__PURE__ */ c(Me, [["render", De]]), qe = m({
|
|
950
950
|
name: "BsSelect",
|
|
951
951
|
props: {
|
|
952
952
|
/**
|
|
@@ -1032,20 +1032,20 @@ const ct = /* @__PURE__ */ c(we, [["render", _e]]), De = m({
|
|
|
1032
1032
|
this.validatorEnabled && this.validator.onInvalid(e);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
}),
|
|
1035
|
+
}), Te = ["for", "textContent"], Fe = ["id", "value", "aria-labelledby"], ze = {
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
value: "",
|
|
1038
1038
|
disabled: "",
|
|
1039
1039
|
hidden: ""
|
|
1040
|
-
},
|
|
1041
|
-
function
|
|
1040
|
+
}, je = ["value"], Ue = ["textContent"], Ge = ["id", "textContent"];
|
|
1041
|
+
function Je(e, t, r, d, v, f) {
|
|
1042
1042
|
return a(), i(b, null, [
|
|
1043
1043
|
e.label !== void 0 ? (a(), i("label", {
|
|
1044
1044
|
key: 0,
|
|
1045
1045
|
for: e.id,
|
|
1046
1046
|
class: "form-label",
|
|
1047
1047
|
textContent: l(e.label)
|
|
1048
|
-
}, null, 8,
|
|
1048
|
+
}, null, 8, Te)) : u("", !0),
|
|
1049
1049
|
s("select", k({
|
|
1050
1050
|
id: e.id,
|
|
1051
1051
|
ref: "inputRef",
|
|
@@ -1056,26 +1056,26 @@ function Ge(e, t, r, d, v, f) {
|
|
|
1056
1056
|
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
1057
1057
|
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
1058
1058
|
}), [
|
|
1059
|
-
e.placeholder !== void 0 ? (a(), i("option",
|
|
1059
|
+
e.placeholder !== void 0 ? (a(), i("option", ze, l(e.placeholder), 1)) : u("", !0),
|
|
1060
1060
|
(a(!0), i(b, null, y(e.options, (o, n) => (a(), i("option", {
|
|
1061
1061
|
key: n,
|
|
1062
1062
|
value: o.value
|
|
1063
|
-
}, l(o.text), 9,
|
|
1064
|
-
], 16,
|
|
1063
|
+
}, l(o.text), 9, je))), 128))
|
|
1064
|
+
], 16, Fe),
|
|
1065
1065
|
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
1066
1066
|
key: 1,
|
|
1067
1067
|
class: "invalid-feedback",
|
|
1068
1068
|
textContent: l(e.validator.getInvalidMessage())
|
|
1069
|
-
}, null, 8,
|
|
1069
|
+
}, null, 8, Ue)) : u("", !0),
|
|
1070
1070
|
e.hint !== void 0 ? (a(), i("div", {
|
|
1071
1071
|
key: 2,
|
|
1072
1072
|
id: e.getHintId(),
|
|
1073
1073
|
class: "form-text",
|
|
1074
1074
|
textContent: l(e.hint)
|
|
1075
|
-
}, null, 8,
|
|
1075
|
+
}, null, 8, Ge)) : u("", !0)
|
|
1076
1076
|
], 64);
|
|
1077
1077
|
}
|
|
1078
|
-
const gt = /* @__PURE__ */ c(
|
|
1078
|
+
const gt = /* @__PURE__ */ c(qe, [["render", Je]]), Ke = m({
|
|
1079
1079
|
name: "BsRadio",
|
|
1080
1080
|
props: {
|
|
1081
1081
|
/**
|
|
@@ -1166,8 +1166,8 @@ const gt = /* @__PURE__ */ c(De, [["render", Ge]]), Je = m({
|
|
|
1166
1166
|
this.validatorEnabled && this.validator.onInvalid(e);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
}),
|
|
1170
|
-
function
|
|
1169
|
+
}), Qe = ["id", "value", "checked", "aria-describedby"], We = ["for", "textContent"], Xe = ["textContent"], Ye = ["id", "textContent"];
|
|
1170
|
+
function Ze(e, t, r, d, v, f) {
|
|
1171
1171
|
return a(), i("div", {
|
|
1172
1172
|
class: h(["form-check", e.classContainer])
|
|
1173
1173
|
}, [
|
|
@@ -1182,27 +1182,27 @@ function Ye(e, t, r, d, v, f) {
|
|
|
1182
1182
|
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
1183
1183
|
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
1184
1184
|
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
1185
|
-
}), null, 16,
|
|
1185
|
+
}), null, 16, Qe),
|
|
1186
1186
|
e.label !== void 0 ? (a(), i("label", {
|
|
1187
1187
|
key: 0,
|
|
1188
1188
|
for: e.id,
|
|
1189
1189
|
class: "form-check-label",
|
|
1190
1190
|
textContent: l(e.label)
|
|
1191
|
-
}, null, 8,
|
|
1191
|
+
}, null, 8, We)) : u("", !0),
|
|
1192
1192
|
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
1193
1193
|
key: 1,
|
|
1194
1194
|
class: "invalid-feedback",
|
|
1195
1195
|
textContent: l(e.validator.getInvalidMessage())
|
|
1196
|
-
}, null, 8,
|
|
1196
|
+
}, null, 8, Xe)) : u("", !0),
|
|
1197
1197
|
e.hint !== void 0 ? (a(), i("div", {
|
|
1198
1198
|
key: 2,
|
|
1199
1199
|
id: e.getHintId(),
|
|
1200
1200
|
class: "form-text",
|
|
1201
1201
|
textContent: l(e.hint)
|
|
1202
|
-
}, null, 8,
|
|
1202
|
+
}, null, 8, Ye)) : u("", !0)
|
|
1203
1203
|
], 2);
|
|
1204
1204
|
}
|
|
1205
|
-
const bt = /* @__PURE__ */ c(
|
|
1205
|
+
const bt = /* @__PURE__ */ c(Ke, [["render", Ze]]), E = B.Offcanvas, xe = m({
|
|
1206
1206
|
name: "BsOffcanvas",
|
|
1207
1207
|
props: {
|
|
1208
1208
|
/**
|
|
@@ -1216,7 +1216,7 @@ const bt = /* @__PURE__ */ c(Je, [["render", Ye]]), Ze = m({
|
|
|
1216
1216
|
emits: ["shown", "hidden"],
|
|
1217
1217
|
mounted() {
|
|
1218
1218
|
const e = this.$refs.offcanvasRef;
|
|
1219
|
-
|
|
1219
|
+
E.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.offcanvas", this.onShown), e.addEventListener("hidden.bs.offcanvas", this.onHidden);
|
|
1220
1220
|
},
|
|
1221
1221
|
methods: {
|
|
1222
1222
|
/**
|
|
@@ -1224,7 +1224,7 @@ const bt = /* @__PURE__ */ c(Je, [["render", Ye]]), Ze = m({
|
|
|
1224
1224
|
*/
|
|
1225
1225
|
hide() {
|
|
1226
1226
|
const e = this.$refs.offcanvasRef;
|
|
1227
|
-
|
|
1227
|
+
E.getOrCreateInstance(e).hide();
|
|
1228
1228
|
},
|
|
1229
1229
|
/**
|
|
1230
1230
|
* Shown event.
|
|
@@ -1239,34 +1239,34 @@ const bt = /* @__PURE__ */ c(Je, [["render", Ye]]), Ze = m({
|
|
|
1239
1239
|
this.$emit("hidden");
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
}),
|
|
1242
|
+
}), et = {
|
|
1243
1243
|
ref: "offcanvasRef",
|
|
1244
1244
|
class: "offcanvas",
|
|
1245
1245
|
tabindex: "-1",
|
|
1246
1246
|
"aria-labelledby": "offcanvasTitle"
|
|
1247
|
-
},
|
|
1247
|
+
}, tt = { class: "offcanvas-header" }, nt = ["textContent"], at = /* @__PURE__ */ s("button", {
|
|
1248
1248
|
type: "button",
|
|
1249
1249
|
class: "btn-close text-reset",
|
|
1250
1250
|
"data-bs-dismiss": "offcanvas"
|
|
1251
|
-
}, null, -1),
|
|
1252
|
-
function
|
|
1253
|
-
return a(), i("div",
|
|
1254
|
-
s("div",
|
|
1251
|
+
}, null, -1), it = { class: "offcanvas-body" };
|
|
1252
|
+
function ot(e, t, r, d, v, f) {
|
|
1253
|
+
return a(), i("div", et, [
|
|
1254
|
+
s("div", tt, [
|
|
1255
1255
|
g(e.$slots, "header", {}, () => [
|
|
1256
1256
|
s("div", {
|
|
1257
1257
|
id: "offcanvasTitle",
|
|
1258
1258
|
class: "h5 mb-0",
|
|
1259
1259
|
textContent: l(e.title)
|
|
1260
|
-
}, null, 8,
|
|
1261
|
-
|
|
1260
|
+
}, null, 8, nt),
|
|
1261
|
+
at
|
|
1262
1262
|
])
|
|
1263
1263
|
]),
|
|
1264
|
-
s("div",
|
|
1264
|
+
s("div", it, [
|
|
1265
1265
|
g(e.$slots, "body")
|
|
1266
1266
|
])
|
|
1267
1267
|
], 512);
|
|
1268
1268
|
}
|
|
1269
|
-
const $t = /* @__PURE__ */ c(
|
|
1269
|
+
const $t = /* @__PURE__ */ c(xe, [["render", ot]]);
|
|
1270
1270
|
export {
|
|
1271
1271
|
rt as BsBreadcrumb,
|
|
1272
1272
|
vt as BsCheckbox,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-i18n"),require("bootstrap")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","bootstrap"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.BootstrapVueWrapper={},i.Vue,i.vueI18n,i.bootstrap))})(this,function(i,t,g,f){"use strict";const u=t.defineComponent({name:"BsBreadcrumb",props:{items:{type:Array,required:!0}},methods:{isRouteAvailable(e){return e.route!==void 0}}}),m=(e,n)=>{const l=e.__vccOpts||e;for(const[r,s]of n)l[r]=s;return l},k={"aria-label":"breadcrumb"},y={class:"breadcrumb"},b=["textContent"];function B(e,n,l,r,s,d){const a=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("nav",k,[t.createElementVNode("ol",y,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,c)=>(t.openBlock(),t.createElementBlock("li",{key:c,class:t.normalizeClass(["breadcrumb-item",{active:!e.isRouteAvailable(o)}])},[e.isRouteAvailable(o)?(t.openBlock(),t.createBlock(a,{key:0,to:o.route},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.title),1)]),_:2},1032,["to"])):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(o.title)},null,8,b))],2))),128))])])}const $=m(u,[["render",B]]),C=t.defineComponent({name:"BsForm",emits:["submit"],data(){return{submitClicked:!1}},methods:{onSubmit(e){e.preventDefault(),this.submitClicked=!0,this.$emit("submit",e)}}});function E(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("form",{class:t.normalizeClass(["needs-validation",{"was-validated":e.submitClicked}]),novalidate:"",onSubmit:n[0]||(n[0]=(...a)=>e.onSubmit&&e.onSubmit(...a))},[t.renderSlot(e.$slots,"default")],34)}const S=m(C,[["render",E]]);function h(e){const{t:n}=g.useI18n(),l=t.ref(null);function r(o){const c=e.value;c!==null&&(o!==null?c.setCustomValidity(o):c.setCustomValidity(""),l.value=s(c))}function s(o){if(o.validity.valueMissing)return n("validator.error.value_missing");if(o.validity.tooShort)return n("validator.error.too_short",[o.minLength]);if(o.validity.tooLong)return n("validator.error.too_long",[o.maxLength]);if(o.validity.rangeUnderflow)return n("validator.error.range_underflow",[o.min]);if(o.validity.rangeOverflow)return n("validator.error.range_overflow",[o.max]);if(o.validity.typeMismatch){if(o.type==="email")return n("validator.error.type_mismatch.email");if(o.type==="url")return n("validator.error.type_mismatch.url")}if(o.validity.badInput){if(o.type==="number")return n("validator.error.bad_input.number");if(o.type==="date")return n("validator.error.bad_input.date")}if(o.validity.patternMismatch)return n("validator.error.pattern_mismatch");if(o.validity.stepMismatch){const c=Math.floor(Number(o.value)/Number(o.step))*Number(o.step),p=Math.ceil(Number(o.value)/Number(o.step))*Number(o.step);return n("validator.error.step_mismatch",[c,p])}return o.validity.customError?o.validationMessage:null}function d(o){o.target!==null&&(l.value=s(o.target))}function a(){return l.value}return{onInvalid:d,getInvalidMessage:a,setCustomError:r}}const V=t.defineComponent({name:"BsInput",props:{modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:h(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),I=["for","textContent"],N=["id","value","aria-describedby"],P=["textContent"],D=["id","textContent"];function v(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,I)):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue,class:"form-control"},e.$attrs,{"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,N),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,P)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,D)):t.createCommentVNode("",!0)],64)}const M=m(V,[["render",v]]),w=t.defineComponent({name:"BsCheckbox",props:{value:{type:String,default:null},modelValue:{type:[Array,Boolean],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},classContainer:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:h(e)}},computed:{isChecked(){return this.modelValue instanceof Array?this.modelValue.includes(this.value):this.modelValue===!0}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const l=e.target.checked;if(this.modelValue instanceof Array){const r=[...this.modelValue];l?r.push(this.value):r.splice(r.indexOf(this.value),1),this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",l)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),H=["id","value","checked","aria-describedby"],R=["for","textContent"],L=["textContent"],A=["id","textContent"];function O(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-check",e.classContainer])},[t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{type:"checkbox",class:"form-check-input",checked:e.isChecked,"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,H),e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-check-label",textContent:t.toDisplayString(e.label)},null,8,R)):t.createCommentVNode("",!0),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,L)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,A)):t.createCommentVNode("",!0)],2)}const T=m(w,[["render",O]]),_=t.defineComponent({name:"BsTextarea",props:{modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:h(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),q=["for","textContent"],F=["id","value","aria-describedby"],z=["textContent"],j=["id","textContent"];function U(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,q)):t.createCommentVNode("",!0),t.createElementVNode("textarea",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{class:"form-control","aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,F),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,z)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,j)):t.createCommentVNode("",!0)],64)}const W=m(_,[["render",U]]),G=t.defineComponent({name:"BsPaginator",props:{totalCount:{type:Number,required:!0},pageSize:{type:Number,required:!0},currentPage:{type:Number,required:!0},maxVisiblePage:{type:Number,default:5},firstPageLabel:{type:String,default:"«"},previousPageLabel:{type:String,default:"‹"},nextPageLabel:{type:String,default:"›"},lastPageLabel:{type:String,default:"»"}},emits:["pageChanged"],methods:{getPageCount(){return Math.ceil(this.totalCount/this.pageSize)},getVisiblePages(){const e=[],n=this.getPageRange();for(let l=n.beginPage;l<=n.endPage;l+=1)e.push(l+1);return e},isPageActive(e){return e===this.currentPage},onPageClick(e){this.isPageActive(e)||this.$emit("pageChanged",e)},getPageRange(){let e=Math.max(0,this.currentPage-this.maxVisiblePage/2),n=e+this.maxVisiblePage-1;return n>=this.getPageCount()&&(n=this.getPageCount()-1,e=Math.max(0,n-this.maxVisiblePage+1)),{beginPage:Math.floor(e),endPage:Math.floor(n)}}}}),J={class:"pagination"},K=["textContent"],Q=["textContent"],X=["onClick","textContent"],Y=["textContent"],Z=["textContent"];function x(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("nav",null,[t.createElementVNode("ul",J,[t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-first",{disabled:e.isPageActive(1)}])},[t.createElementVNode("div",{class:"page-link",onClick:n[0]||(n[0]=a=>e.onPageClick(1)),textContent:t.toDisplayString(e.firstPageLabel)},null,8,K)],2),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-previous",{disabled:e.isPageActive(1)}])},[t.createElementVNode("div",{class:"page-link",onClick:n[1]||(n[1]=a=>e.onPageClick(e.currentPage-1)),textContent:t.toDisplayString(e.previousPageLabel)},null,8,Q)],2),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getVisiblePages(),(a,o)=>(t.openBlock(),t.createElementBlock("li",{key:o,class:t.normalizeClass(["page-item page-item-number",{active:e.isPageActive(a)}])},[t.createElementVNode("div",{class:"page-link",onClick:c=>e.onPageClick(a),textContent:t.toDisplayString(a)},null,8,X)],2))),128)),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-next",{disabled:e.isPageActive(e.getPageCount())}])},[t.createElementVNode("div",{class:"page-link",onClick:n[2]||(n[2]=a=>e.onPageClick(e.currentPage+1)),textContent:t.toDisplayString(e.nextPageLabel)},null,8,Y)],2),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-last",{disabled:e.isPageActive(e.getPageCount())}])},[t.createElementVNode("div",{class:"page-link",onClick:n[3]||(n[3]=a=>e.onPageClick(e.getPageCount())),textContent:t.toDisplayString(e.lastPageLabel)},null,8,Z)],2)])])}const ee=m(G,[["render",x],["__scopeId","data-v-ff85ae67"]]),te=t.defineComponent({name:"BsTable",props:{fields:{type:Array,required:!0},items:{type:Array,required:!0},isLoading:{type:Boolean,default:!1},orderBy:{type:String,default:void 0},sortDesc:{type:Boolean,default:void 0},thClass:{type:String,default:void 0},tdClass:{type:String,default:void 0}},emits:["orderChanged"],methods:{isActiveOrderBy(e){return e===this.orderBy},isSortableField(e){return e.sort===void 0||e.sort},getSortIconClass(){if(this.sortDesc===void 0)throw new Error("Sort desc value is null, cannot calculate the sort icon!");return this.sortDesc?"bi bi-caret-up-fill":"bi bi-caret-down-fill"},calcSortDesc(e){return this.sortDesc===void 0?null:this.isOrderByChanged(e)?!1:!this.sortDesc},isOrderByChanged(e){return this.orderBy!==e},onHeadClick(e){this.isSortableField(e)&&this.$emit("orderChanged",{sortDesc:this.calcSortDesc(e.key),orderBy:e.key})}}}),ne=e=>(t.pushScopeId("data-v-7c949d62"),e=e(),t.popScopeId(),e),oe={class:"table"},ae=["onClick"],le={key:0},ie=["colspan"],re=ne(()=>t.createElementVNode("div",{class:"d-flex justify-content-center p-2"},[t.createElementVNode("div",{class:"spinner-border spinner-border-sm"})],-1)),se={key:1},de=["colspan"],ce={class:"text-center text-muted small"};function me(e,n,l,r,s,d){const a=t.resolveDirective("t");return t.openBlock(),t.createElementBlock("table",oe,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,o=>(t.openBlock(),t.createElementBlock("th",{key:o.key,class:t.normalizeClass({"cursor-pointer":e.isSortableField(o),"text-decoration-underline":e.isActiveOrderBy(o.key),thClass:e.thClass}),onClick:c=>e.onHeadClick(o)},[t.renderSlot(e.$slots,"tr",{},()=>[t.createTextVNode(t.toDisplayString(o.label)+" ",1),e.isActiveOrderBy(o.key)&&e.sortDesc!==void 0?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(e.getSortIconClass())},null,2)):t.createCommentVNode("",!0)],!0)],10,ae))),128))])]),t.createElementVNode("tbody",null,[e.isLoading?(t.openBlock(),t.createElementBlock("tr",le,[t.createElementVNode("td",{colspan:e.fields.length},[t.renderSlot(e.$slots,"loading",{},()=>[re],!0)],8,ie)])):e.items.length===0?(t.openBlock(),t.createElementBlock("tr",se,[t.createElementVNode("td",{colspan:e.fields.length},[t.renderSlot(e.$slots,"empty",{},()=>[t.withDirectives(t.createElementVNode("div",ce,null,512),[[a,"table.empty_text"]])],!0)],8,de)])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.items,(o,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass(o.trClass)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,p=>(t.openBlock(),t.createElementBlock("td",{key:p.key,class:t.normalizeClass(e.tdClass)},[t.renderSlot(e.$slots,"td",{key:c,field:p.key,row:o,value:p.key in o?o[p.key]:null},()=>[t.createTextVNode(t.toDisplayString(o[p.key]),1)],!0)],2))),128))],2))),128))])])}const pe=m(te,[["render",me],["__scopeId","data-v-7c949d62"]]),fe=t.defineComponent({name:"BsToast",emits:["shown","hidden"],mounted(){const e=this.$refs.toastRef;f.Toast.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.toast",this.onShown),e.addEventListener("hidden.bs.toast",this.onHidden)},methods:{hide(){const e=this.$refs.toastRef;f.Toast.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),he={ref:"toastRef",class:"toast hide",role:"alert","aria-live":"assertive","aria-atomic":"true"};function ge(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",he,[t.renderSlot(e.$slots,"default")],512)}const ue=m(fe,[["render",ge]]),ke=t.defineComponent({name:"BsModal",props:{title:{type:String,required:!0},classDialog:{type:[String,Object],default:null},hideHeader:{type:Boolean,default:!1},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1}},emits:["shown","hidden"],mounted(){const e=this.$refs.modalRef;f.Modal.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.modal",this.onShown),e.addEventListener("hidden.bs.modal",this.onHidden)},methods:{hide(){const e=this.$refs.modalRef;f.Modal.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),ye={ref:"modalRef",class:"modal fade",tabindex:"-1","aria-hidden":"true"},be={class:"modal-content"},Be={key:0,class:"modal-header"},$e=["textContent"],Ce=t.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal"},null,-1),Ee={key:1,class:"modal-body"},Se={key:2,class:"modal-footer"};function Ve(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",ye,[t.createElementVNode("div",{class:t.normalizeClass(["modal-dialog",e.classDialog])},[t.createElementVNode("div",be,[e.hideHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Be,[t.renderSlot(e.$slots,"header",{},()=>[t.createElementVNode("div",{class:"h5 modal-title",textContent:t.toDisplayString(e.title)},null,8,$e),Ce])])),e.hideBody?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ee,[t.renderSlot(e.$slots,"body")])),e.hideFooter?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Se,[t.renderSlot(e.$slots,"footer")]))])],2)],512)}const Ie=m(ke,[["render",Ve]]),Ne=t.defineComponent({name:"BsSelect",props:{modelValue:{type:[String,Number,Array],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},options:{type:Array,required:!0},placeholder:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:h(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),Pe=["for","textContent"],De=["id","value","aria-labelledby"],ve={key:0,value:"",disabled:"",hidden:""},Me=["value"],we=["textContent"],He=["id","textContent"];function Re(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,Pe)):t.createCommentVNode("",!0),t.createElementVNode("select",t.mergeProps({id:e.id,ref:"inputRef",class:"form-select",value:e.modelValue,"aria-labelledby":e.hint!==void 0?e.getHintId():void 0},e.$attrs,{onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),[e.placeholder!==void 0?(t.openBlock(),t.createElementBlock("option",ve,t.toDisplayString(e.placeholder),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(a,o)=>(t.openBlock(),t.createElementBlock("option",{key:o,value:a.value},t.toDisplayString(a.text),9,Me))),128))],16,De),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,we)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,He)):t.createCommentVNode("",!0)],64)}const Le=m(Ne,[["render",Re]]),Ae=t.defineComponent({name:"BsRadio",props:{value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},classContainer:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:h(e)}},computed:{isChecked(){return this.modelValue===this.value}},methods:{getHintId(){return this.id+"Hint"},onInput(){this.$emit("update:modelValue",this.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),Oe=["id","value","checked","aria-describedby"],Te=["for","textContent"],_e=["textContent"],qe=["id","textContent"];function Fe(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-check",e.classContainer])},[t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{type:"radio",class:"form-check-input",checked:e.isChecked,"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,Oe),e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-check-label",textContent:t.toDisplayString(e.label)},null,8,Te)):t.createCommentVNode("",!0),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,_e)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,qe)):t.createCommentVNode("",!0)],2)}const ze=m(Ae,[["render",Fe]]),je=t.defineComponent({name:"BsOffcanvas",props:{title:{type:String,required:!0}},emits:["shown","hidden"],mounted(){const e=this.$refs.offcanvasRef;f.Offcanvas.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.offcanvas",this.onShown),e.addEventListener("hidden.bs.offcanvas",this.onHidden)},methods:{hide(){const e=this.$refs.offcanvasRef;f.Offcanvas.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),Ue={ref:"offcanvasRef",class:"offcanvas",tabindex:"-1","aria-labelledby":"offcanvasTitle"},We={class:"offcanvas-header"},Ge=["textContent"],Je=t.createElementVNode("button",{type:"button",class:"btn-close text-reset","data-bs-dismiss":"offcanvas"},null,-1),Ke={class:"offcanvas-body"};function Qe(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",Ue,[t.createElementVNode("div",We,[t.renderSlot(e.$slots,"header",{},()=>[t.createElementVNode("div",{id:"offcanvasTitle",class:"h5 mb-0",textContent:t.toDisplayString(e.title)},null,8,Ge),Je])]),t.createElementVNode("div",Ke,[t.renderSlot(e.$slots,"body")])],512)}const Xe=m(je,[["render",Qe]]);i.BsBreadcrumb=$,i.BsCheckbox=T,i.BsForm=S,i.BsInput=M,i.BsModal=Ie,i.BsOffcanvas=Xe,i.BsPaginator=ee,i.BsRadio=ze,i.BsSelect=Le,i.BsTable=pe,i.BsTextarea=W,i.BsToast=ue,i.useValidator=h,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-i18n"),require("bootstrap")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","bootstrap"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.BootstrapVueWrapper={},i.Vue,i.vueI18n,i.bootstrap))})(this,function(i,t,b,k){"use strict";function B(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(n,l,r.get?r:{enumerable:!0,get:()=>e[l]})}}return n.default=e,Object.freeze(n)}const h=B(k),$=t.defineComponent({name:"BsBreadcrumb",props:{items:{type:Array,required:!0}},methods:{isRouteAvailable(e){return e.route!==void 0}}}),m=(e,n)=>{const l=e.__vccOpts||e;for(const[r,s]of n)l[r]=s;return l},C={"aria-label":"breadcrumb"},E={class:"breadcrumb"},S=["textContent"];function V(e,n,l,r,s,d){const a=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("nav",C,[t.createElementVNode("ol",E,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,c)=>(t.openBlock(),t.createElementBlock("li",{key:c,class:t.normalizeClass(["breadcrumb-item",{active:!e.isRouteAvailable(o)}])},[e.isRouteAvailable(o)?(t.openBlock(),t.createBlock(a,{key:0,to:o.route},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.title),1)]),_:2},1032,["to"])):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(o.title)},null,8,S))],2))),128))])])}const I=m($,[["render",V]]),N=t.defineComponent({name:"BsForm",emits:["submit"],data(){return{submitClicked:!1}},methods:{onSubmit(e){e.preventDefault(),this.submitClicked=!0,this.$emit("submit",e)}}});function P(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("form",{class:t.normalizeClass(["needs-validation",{"was-validated":e.submitClicked}]),novalidate:"",onSubmit:n[0]||(n[0]=(...a)=>e.onSubmit&&e.onSubmit(...a))},[t.renderSlot(e.$slots,"default")],34)}const D=m(N,[["render",P]]);function f(e){const{t:n}=b.useI18n(),l=t.ref(null);function r(o){const c=e.value;c!==null&&(o!==null?c.setCustomValidity(o):c.setCustomValidity(""),l.value=s(c))}function s(o){if(o.validity.valueMissing)return n("validator.error.value_missing");if(o.validity.tooShort)return n("validator.error.too_short",[o.minLength]);if(o.validity.tooLong)return n("validator.error.too_long",[o.maxLength]);if(o.validity.rangeUnderflow)return n("validator.error.range_underflow",[o.min]);if(o.validity.rangeOverflow)return n("validator.error.range_overflow",[o.max]);if(o.validity.typeMismatch){if(o.type==="email")return n("validator.error.type_mismatch.email");if(o.type==="url")return n("validator.error.type_mismatch.url")}if(o.validity.badInput){if(o.type==="number")return n("validator.error.bad_input.number");if(o.type==="date")return n("validator.error.bad_input.date")}if(o.validity.patternMismatch)return n("validator.error.pattern_mismatch");if(o.validity.stepMismatch){const c=Math.floor(Number(o.value)/Number(o.step))*Number(o.step),p=Math.ceil(Number(o.value)/Number(o.step))*Number(o.step);return n("validator.error.step_mismatch",[c,p])}return o.validity.customError?o.validationMessage:null}function d(o){o.target!==null&&(l.value=s(o.target))}function a(){return l.value}return{onInvalid:d,getInvalidMessage:a,setCustomError:r}}const v=t.defineComponent({name:"BsInput",props:{modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:f(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),M=["for","textContent"],w=["id","value","aria-describedby"],H=["textContent"],R=["id","textContent"];function O(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,M)):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue,class:"form-control"},e.$attrs,{"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,w),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,H)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,R)):t.createCommentVNode("",!0)],64)}const L=m(v,[["render",O]]),A=t.defineComponent({name:"BsCheckbox",props:{value:{type:String,default:null},modelValue:{type:[Array,Boolean],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},classContainer:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:f(e)}},computed:{isChecked(){return this.modelValue instanceof Array?this.modelValue.includes(this.value):this.modelValue===!0}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const l=e.target.checked;if(this.modelValue instanceof Array){const r=[...this.modelValue];l?r.push(this.value):r.splice(r.indexOf(this.value),1),this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",l)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),T=["id","value","checked","aria-describedby"],_=["for","textContent"],q=["textContent"],z=["id","textContent"];function F(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-check",e.classContainer])},[t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{type:"checkbox",class:"form-check-input",checked:e.isChecked,"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,T),e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-check-label",textContent:t.toDisplayString(e.label)},null,8,_)):t.createCommentVNode("",!0),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,q)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,z)):t.createCommentVNode("",!0)],2)}const j=m(A,[["render",F]]),U=t.defineComponent({name:"BsTextarea",props:{modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:f(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),W=["for","textContent"],G=["id","value","aria-describedby"],J=["textContent"],K=["id","textContent"];function Q(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,W)):t.createCommentVNode("",!0),t.createElementVNode("textarea",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{class:"form-control","aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,G),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,J)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,K)):t.createCommentVNode("",!0)],64)}const X=m(U,[["render",Q]]),Y=t.defineComponent({name:"BsPaginator",props:{totalCount:{type:Number,required:!0},pageSize:{type:Number,required:!0},currentPage:{type:Number,required:!0},maxVisiblePage:{type:Number,default:5},firstPageLabel:{type:String,default:"«"},previousPageLabel:{type:String,default:"‹"},nextPageLabel:{type:String,default:"›"},lastPageLabel:{type:String,default:"»"}},emits:["pageChanged"],methods:{getPageCount(){return Math.ceil(this.totalCount/this.pageSize)},getVisiblePages(){const e=[],n=this.getPageRange();for(let l=n.beginPage;l<=n.endPage;l+=1)e.push(l+1);return e},isPageActive(e){return e===this.currentPage},onPageClick(e){this.isPageActive(e)||this.$emit("pageChanged",e)},getPageRange(){let e=Math.max(0,this.currentPage-this.maxVisiblePage/2),n=e+this.maxVisiblePage-1;return n>=this.getPageCount()&&(n=this.getPageCount()-1,e=Math.max(0,n-this.maxVisiblePage+1)),{beginPage:Math.floor(e),endPage:Math.floor(n)}}}}),Z={class:"pagination"},x=["textContent"],ee=["textContent"],te=["onClick","textContent"],ne=["textContent"],oe=["textContent"];function ae(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("nav",null,[t.createElementVNode("ul",Z,[t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-first",{disabled:e.isPageActive(1)}])},[t.createElementVNode("div",{class:"page-link",onClick:n[0]||(n[0]=a=>e.onPageClick(1)),textContent:t.toDisplayString(e.firstPageLabel)},null,8,x)],2),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-previous",{disabled:e.isPageActive(1)}])},[t.createElementVNode("div",{class:"page-link",onClick:n[1]||(n[1]=a=>e.onPageClick(e.currentPage-1)),textContent:t.toDisplayString(e.previousPageLabel)},null,8,ee)],2),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getVisiblePages(),(a,o)=>(t.openBlock(),t.createElementBlock("li",{key:o,class:t.normalizeClass(["page-item page-item-number",{active:e.isPageActive(a)}])},[t.createElementVNode("div",{class:"page-link",onClick:c=>e.onPageClick(a),textContent:t.toDisplayString(a)},null,8,te)],2))),128)),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-next",{disabled:e.isPageActive(e.getPageCount())}])},[t.createElementVNode("div",{class:"page-link",onClick:n[2]||(n[2]=a=>e.onPageClick(e.currentPage+1)),textContent:t.toDisplayString(e.nextPageLabel)},null,8,ne)],2),t.createElementVNode("li",{class:t.normalizeClass(["page-item page-item-last",{disabled:e.isPageActive(e.getPageCount())}])},[t.createElementVNode("div",{class:"page-link",onClick:n[3]||(n[3]=a=>e.onPageClick(e.getPageCount())),textContent:t.toDisplayString(e.lastPageLabel)},null,8,oe)],2)])])}const le=m(Y,[["render",ae],["__scopeId","data-v-ff85ae67"]]),re=t.defineComponent({name:"BsTable",props:{fields:{type:Array,required:!0},items:{type:Array,required:!0},isLoading:{type:Boolean,default:!1},orderBy:{type:String,default:void 0},sortDesc:{type:Boolean,default:void 0},thClass:{type:String,default:void 0},tdClass:{type:String,default:void 0}},emits:["orderChanged"],methods:{isActiveOrderBy(e){return e===this.orderBy},isSortableField(e){return e.sort===void 0||e.sort},getSortIconClass(){if(this.sortDesc===void 0)throw new Error("Sort desc value is null, cannot calculate the sort icon!");return this.sortDesc?"bi bi-caret-up-fill":"bi bi-caret-down-fill"},calcSortDesc(e){return this.sortDesc===void 0?null:this.isOrderByChanged(e)?!1:!this.sortDesc},isOrderByChanged(e){return this.orderBy!==e},onHeadClick(e){this.isSortableField(e)&&this.$emit("orderChanged",{sortDesc:this.calcSortDesc(e.key),orderBy:e.key})}}}),ie=e=>(t.pushScopeId("data-v-7c949d62"),e=e(),t.popScopeId(),e),se={class:"table"},de=["onClick"],ce={key:0},me=["colspan"],pe=ie(()=>t.createElementVNode("div",{class:"d-flex justify-content-center p-2"},[t.createElementVNode("div",{class:"spinner-border spinner-border-sm"})],-1)),fe={key:1},he=["colspan"],ge={class:"text-center text-muted small"};function ue(e,n,l,r,s,d){const a=t.resolveDirective("t");return t.openBlock(),t.createElementBlock("table",se,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,o=>(t.openBlock(),t.createElementBlock("th",{key:o.key,class:t.normalizeClass({"cursor-pointer":e.isSortableField(o),"text-decoration-underline":e.isActiveOrderBy(o.key),thClass:e.thClass}),onClick:c=>e.onHeadClick(o)},[t.renderSlot(e.$slots,"tr",{},()=>[t.createTextVNode(t.toDisplayString(o.label)+" ",1),e.isActiveOrderBy(o.key)&&e.sortDesc!==void 0?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(e.getSortIconClass())},null,2)):t.createCommentVNode("",!0)],!0)],10,de))),128))])]),t.createElementVNode("tbody",null,[e.isLoading?(t.openBlock(),t.createElementBlock("tr",ce,[t.createElementVNode("td",{colspan:e.fields.length},[t.renderSlot(e.$slots,"loading",{},()=>[pe],!0)],8,me)])):e.items.length===0?(t.openBlock(),t.createElementBlock("tr",fe,[t.createElementVNode("td",{colspan:e.fields.length},[t.renderSlot(e.$slots,"empty",{},()=>[t.withDirectives(t.createElementVNode("div",ge,null,512),[[a,"table.empty_text"]])],!0)],8,he)])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.items,(o,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass(o.trClass)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,p=>(t.openBlock(),t.createElementBlock("td",{key:p.key,class:t.normalizeClass(e.tdClass)},[t.renderSlot(e.$slots,"td",{key:c,field:p.key,row:o,value:p.key in o?o[p.key]:null},()=>[t.createTextVNode(t.toDisplayString(o[p.key]),1)],!0)],2))),128))],2))),128))])])}const ye=m(re,[["render",ue],["__scopeId","data-v-7c949d62"]]),g=h.Toast,be=t.defineComponent({name:"BsToast",emits:["shown","hidden"],mounted(){const e=this.$refs.toastRef;g.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.toast",this.onShown),e.addEventListener("hidden.bs.toast",this.onHidden)},methods:{hide(){const e=this.$refs.toastRef;g.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),ke={ref:"toastRef",class:"toast hide",role:"alert","aria-live":"assertive","aria-atomic":"true"};function Be(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",ke,[t.renderSlot(e.$slots,"default")],512)}const $e=m(be,[["render",Be]]),u=h.Modal,Ce=t.defineComponent({name:"BsModal",props:{title:{type:String,required:!0},classDialog:{type:[String,Object],default:null},hideHeader:{type:Boolean,default:!1},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1}},emits:["shown","hidden"],mounted(){const e=this.$refs.modalRef;u.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.modal",this.onShown),e.addEventListener("hidden.bs.modal",this.onHidden)},methods:{hide(){const e=this.$refs.modalRef;u.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),Ee={ref:"modalRef",class:"modal fade",tabindex:"-1","aria-hidden":"true"},Se={class:"modal-content"},Ve={key:0,class:"modal-header"},Ie=["textContent"],Ne=t.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal"},null,-1),Pe={key:1,class:"modal-body"},De={key:2,class:"modal-footer"};function ve(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",Ee,[t.createElementVNode("div",{class:t.normalizeClass(["modal-dialog",e.classDialog])},[t.createElementVNode("div",Se,[e.hideHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ve,[t.renderSlot(e.$slots,"header",{},()=>[t.createElementVNode("div",{class:"h5 modal-title",textContent:t.toDisplayString(e.title)},null,8,Ie),Ne])])),e.hideBody?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Pe,[t.renderSlot(e.$slots,"body")])),e.hideFooter?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",De,[t.renderSlot(e.$slots,"footer")]))])],2)],512)}const Me=m(Ce,[["render",ve]]),we=t.defineComponent({name:"BsSelect",props:{modelValue:{type:[String,Number,Array],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},options:{type:Array,required:!0},placeholder:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:f(e)}},methods:{getHintId(){return this.id+"Hint"},onInput(e){const n=e.target;this.$emit("update:modelValue",n.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),He=["for","textContent"],Re=["id","value","aria-labelledby"],Oe={key:0,value:"",disabled:"",hidden:""},Le=["value"],Ae=["textContent"],Te=["id","textContent"];function _e(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-label",textContent:t.toDisplayString(e.label)},null,8,He)):t.createCommentVNode("",!0),t.createElementVNode("select",t.mergeProps({id:e.id,ref:"inputRef",class:"form-select",value:e.modelValue,"aria-labelledby":e.hint!==void 0?e.getHintId():void 0},e.$attrs,{onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),[e.placeholder!==void 0?(t.openBlock(),t.createElementBlock("option",Oe,t.toDisplayString(e.placeholder),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(a,o)=>(t.openBlock(),t.createElementBlock("option",{key:o,value:a.value},t.toDisplayString(a.text),9,Le))),128))],16,Re),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,Ae)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,Te)):t.createCommentVNode("",!0)],64)}const qe=m(we,[["render",_e]]),ze=t.defineComponent({name:"BsRadio",props:{value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:null},id:{type:String,required:!0},label:{type:String,default:void 0},hint:{type:String,default:void 0},classContainer:{type:String,default:void 0},validatorEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(){const e=t.ref(null);return{inputRef:e,validator:f(e)}},computed:{isChecked(){return this.modelValue===this.value}},methods:{getHintId(){return this.id+"Hint"},onInput(){this.$emit("update:modelValue",this.value)},onInvalid(e){this.validatorEnabled&&this.validator.onInvalid(e)}}}),Fe=["id","value","checked","aria-describedby"],je=["for","textContent"],Ue=["textContent"],We=["id","textContent"];function Ge(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-check",e.classContainer])},[t.createElementVNode("input",t.mergeProps({id:e.id,ref:"inputRef",value:e.modelValue},e.$attrs,{type:"radio",class:"form-check-input",checked:e.isChecked,"aria-describedby":e.hint!==void 0?e.getHintId():void 0,onInput:n[0]||(n[0]=(...a)=>e.onInput&&e.onInput(...a)),onInvalid:n[1]||(n[1]=(...a)=>e.onInvalid&&e.onInvalid(...a))}),null,16,Fe),e.label!==void 0?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:"form-check-label",textContent:t.toDisplayString(e.label)},null,8,je)):t.createCommentVNode("",!0),e.validatorEnabled&&e.validator.getInvalidMessage()!==null?(t.openBlock(),t.createElementBlock("div",{key:1,class:"invalid-feedback",textContent:t.toDisplayString(e.validator.getInvalidMessage())},null,8,Ue)):t.createCommentVNode("",!0),e.hint!==void 0?(t.openBlock(),t.createElementBlock("div",{key:2,id:e.getHintId(),class:"form-text",textContent:t.toDisplayString(e.hint)},null,8,We)):t.createCommentVNode("",!0)],2)}const Je=m(ze,[["render",Ge]]),y=h.Offcanvas,Ke=t.defineComponent({name:"BsOffcanvas",props:{title:{type:String,required:!0}},emits:["shown","hidden"],mounted(){const e=this.$refs.offcanvasRef;y.getOrCreateInstance(e).show(),e.addEventListener("shown.bs.offcanvas",this.onShown),e.addEventListener("hidden.bs.offcanvas",this.onHidden)},methods:{hide(){const e=this.$refs.offcanvasRef;y.getOrCreateInstance(e).hide()},onShown(){this.$emit("shown")},onHidden(){this.$emit("hidden")}}}),Qe={ref:"offcanvasRef",class:"offcanvas",tabindex:"-1","aria-labelledby":"offcanvasTitle"},Xe={class:"offcanvas-header"},Ye=["textContent"],Ze=t.createElementVNode("button",{type:"button",class:"btn-close text-reset","data-bs-dismiss":"offcanvas"},null,-1),xe={class:"offcanvas-body"};function et(e,n,l,r,s,d){return t.openBlock(),t.createElementBlock("div",Qe,[t.createElementVNode("div",Xe,[t.renderSlot(e.$slots,"header",{},()=>[t.createElementVNode("div",{id:"offcanvasTitle",class:"h5 mb-0",textContent:t.toDisplayString(e.title)},null,8,Ye),Ze])]),t.createElementVNode("div",xe,[t.renderSlot(e.$slots,"body")])],512)}const tt=m(Ke,[["render",et]]);i.BsBreadcrumb=I,i.BsCheckbox=j,i.BsForm=D,i.BsInput=L,i.BsModal=Me,i.BsOffcanvas=tt,i.BsPaginator=le,i.BsRadio=Je,i.BsSelect=qe,i.BsTable=ye,i.BsTextarea=X,i.BsToast=$e,i.useValidator=f,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { BsBreadcrumb, BsForm, BsInput, BsCheckbox, BsTextarea, BsPaginator, BsTable, BsToast, BsModal, BsSelect, BsRadio, BsOffcanvas, useValidator, };
|
|
1
|
+
export { default as BsBreadcrumb } from './components/bs-breadcrumb/BsBreadcrumb.vue';
|
|
2
|
+
export { default as BsForm } from './components/bs-form/BsForm.vue';
|
|
3
|
+
export { default as BsInput } from './components/bs-input/BsInput.vue';
|
|
4
|
+
export { default as BsCheckbox } from './components/bs-checkbox/BsCheckbox.vue';
|
|
5
|
+
export { default as BsTextarea } from './components/bs-textarea/BsTextarea.vue';
|
|
6
|
+
export { default as BsPaginator } from './components/bs-paginator/BsPaginator.vue';
|
|
7
|
+
export { default as BsTable } from './components/bs-table/BsTable.vue';
|
|
8
|
+
export { default as BsToast } from './components/bs-toast/BsToast.vue';
|
|
9
|
+
export { default as BsModal } from './components/bs-modal/BsModal.vue';
|
|
10
|
+
export { default as BsSelect } from './components/bs-select/BsSelect.vue';
|
|
11
|
+
export { default as BsRadio } from './components/bs-radio/BsRadio.vue';
|
|
12
|
+
export { default as BsOffcanvas } from './components/bs-offcanvas/BsOffcanvas.vue';
|
|
13
|
+
export { useValidator } from './components/validator/Validator.ts';
|