bootstrap-vue-wrapper 2.1.7 → 2.1.8
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 +1286 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/components/bs-breadcrumb/BsBreadcrumb.vue.js +0 -32
- package/dist/components/bs-breadcrumb/BsBreadcrumb.vue2.js +0 -27
- package/dist/components/bs-checkbox/BsCheckbox.vue.js +0 -43
- package/dist/components/bs-checkbox/BsCheckbox.vue2.js +0 -104
- package/dist/components/bs-form/BsForm.vue.js +0 -18
- package/dist/components/bs-form/BsForm.vue2.js +0 -23
- package/dist/components/bs-input/BsInput.vue.js +0 -39
- package/dist/components/bs-input/BsInput.vue2.js +0 -78
- package/dist/components/bs-modal/BsModal.vue.js +0 -51
- package/dist/components/bs-modal/BsModal.vue2.js +0 -59
- package/dist/components/bs-offcanvas/BsOffcanvas.vue.js +0 -34
- package/dist/components/bs-offcanvas/BsOffcanvas.vue2.js +0 -43
- package/dist/components/bs-paginator/BsPaginator.vue.js +0 -63
- package/dist/components/bs-paginator/BsPaginator.vue2.js +0 -114
- package/dist/components/bs-paginator/BsPaginator.vue3.js +0 -1
- package/dist/components/bs-radio/BsRadio.vue.js +0 -43
- package/dist/components/bs-radio/BsRadio.vue2.js +0 -97
- package/dist/components/bs-select/BsSelect.vue.js +0 -50
- package/dist/components/bs-select/BsSelect.vue2.js +0 -92
- package/dist/components/bs-table/BsTable.vue.js +0 -75
- package/dist/components/bs-table/BsTable.vue2.js +0 -108
- package/dist/components/bs-table/BsTable.vue3.js +0 -1
- package/dist/components/bs-textarea/BsTextarea.vue.js +0 -39
- package/dist/components/bs-textarea/BsTextarea.vue2.js +0 -78
- package/dist/components/bs-toast/BsToast.vue.js +0 -19
- package/dist/components/bs-toast/BsToast.vue2.js +0 -34
- package/dist/components/validator/Validator.js +0 -54
- package/dist/index.js +0 -28
|
@@ -0,0 +1,1286 @@
|
|
|
1
|
+
import { defineComponent as m, resolveComponent as E, openBlock as a, createElementBlock as i, createElementVNode as s, Fragment as b, renderList as y, normalizeClass as h, createBlock as w, withCtx as H, createTextVNode as S, toDisplayString as l, renderSlot as g, ref as C, createCommentVNode as u, mergeProps as k, resolveDirective as M, withDirectives as R, pushScopeId as A, popScopeId as L } from "vue";
|
|
2
|
+
import { useI18n as N } from "vue-i18n";
|
|
3
|
+
import B from "bootstrap/js/dist/toast";
|
|
4
|
+
import P from "bootstrap/js/dist/modal";
|
|
5
|
+
import V from "bootstrap/js/dist/offcanvas";
|
|
6
|
+
const O = m({
|
|
7
|
+
name: "BsBreadcrumb",
|
|
8
|
+
props: {
|
|
9
|
+
/**
|
|
10
|
+
* List of breadcrumb items.
|
|
11
|
+
*/
|
|
12
|
+
items: {
|
|
13
|
+
type: Array,
|
|
14
|
+
required: !0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
methods: {
|
|
18
|
+
/**
|
|
19
|
+
* Is route available
|
|
20
|
+
*
|
|
21
|
+
* @param item
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
isRouteAvailable(e) {
|
|
25
|
+
return e.route !== void 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}), c = (e, t) => {
|
|
29
|
+
const r = e.__vccOpts || e;
|
|
30
|
+
for (const [d, v] of t)
|
|
31
|
+
r[d] = v;
|
|
32
|
+
return r;
|
|
33
|
+
}, _ = { "aria-label": "breadcrumb" }, D = { class: "breadcrumb" }, q = ["textContent"];
|
|
34
|
+
function T(e, t, r, d, v, f) {
|
|
35
|
+
const o = E("router-link");
|
|
36
|
+
return a(), i("nav", _, [
|
|
37
|
+
s("ol", D, [
|
|
38
|
+
(a(!0), i(b, null, y(e.items, (n, p) => (a(), i("li", {
|
|
39
|
+
key: p,
|
|
40
|
+
class: h(["breadcrumb-item", { active: !e.isRouteAvailable(n) }])
|
|
41
|
+
}, [
|
|
42
|
+
e.isRouteAvailable(n) ? (a(), w(o, {
|
|
43
|
+
key: 0,
|
|
44
|
+
to: n.route
|
|
45
|
+
}, {
|
|
46
|
+
default: H(() => [
|
|
47
|
+
S(l(n.title), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1032, ["to"])) : (a(), i("span", {
|
|
51
|
+
key: 1,
|
|
52
|
+
textContent: l(n.title)
|
|
53
|
+
}, null, 8, q))
|
|
54
|
+
], 2))), 128))
|
|
55
|
+
])
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
const ut = /* @__PURE__ */ c(O, [["render", T]]), F = m({
|
|
59
|
+
name: "BsForm",
|
|
60
|
+
emits: ["submit"],
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
submitClicked: !1
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
/**
|
|
68
|
+
* On submit event.
|
|
69
|
+
*
|
|
70
|
+
* @param event
|
|
71
|
+
*/
|
|
72
|
+
onSubmit(e) {
|
|
73
|
+
e.preventDefault(), this.submitClicked = !0, this.$emit("submit", e);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
function z(e, t, r, d, v, f) {
|
|
78
|
+
return a(), i("form", {
|
|
79
|
+
class: h(["needs-validation", {
|
|
80
|
+
"was-validated": e.submitClicked
|
|
81
|
+
}]),
|
|
82
|
+
novalidate: "",
|
|
83
|
+
onSubmit: t[0] || (t[0] = (...o) => e.onSubmit && e.onSubmit(...o))
|
|
84
|
+
}, [
|
|
85
|
+
g(e.$slots, "default")
|
|
86
|
+
], 34);
|
|
87
|
+
}
|
|
88
|
+
const vt = /* @__PURE__ */ c(F, [["render", z]]);
|
|
89
|
+
function I(e) {
|
|
90
|
+
const { t } = N(), r = C(null);
|
|
91
|
+
function d(n) {
|
|
92
|
+
const p = e.value;
|
|
93
|
+
p !== null && (n !== null ? p.setCustomValidity(n) : p.setCustomValidity(""), r.value = v(p));
|
|
94
|
+
}
|
|
95
|
+
function v(n) {
|
|
96
|
+
if (n.validity.valueMissing)
|
|
97
|
+
return t("validator.error.value_missing");
|
|
98
|
+
if (n.validity.tooShort)
|
|
99
|
+
return t("validator.error.too_short", [n.minLength]);
|
|
100
|
+
if (n.validity.tooLong)
|
|
101
|
+
return t("validator.error.too_long", [n.maxLength]);
|
|
102
|
+
if (n.validity.rangeUnderflow)
|
|
103
|
+
return t("validator.error.range_underflow", [n.min]);
|
|
104
|
+
if (n.validity.rangeOverflow)
|
|
105
|
+
return t("validator.error.range_overflow", [n.max]);
|
|
106
|
+
if (n.validity.typeMismatch) {
|
|
107
|
+
if (n.type === "email")
|
|
108
|
+
return t("validator.error.type_mismatch.email");
|
|
109
|
+
if (n.type === "url")
|
|
110
|
+
return t("validator.error.type_mismatch.url");
|
|
111
|
+
}
|
|
112
|
+
if (n.validity.badInput) {
|
|
113
|
+
if (n.type === "number")
|
|
114
|
+
return t("validator.error.bad_input.number");
|
|
115
|
+
if (n.type === "date")
|
|
116
|
+
return t("validator.error.bad_input.date");
|
|
117
|
+
}
|
|
118
|
+
if (n.validity.patternMismatch)
|
|
119
|
+
return t("validator.error.pattern_mismatch");
|
|
120
|
+
if (n.validity.stepMismatch) {
|
|
121
|
+
const p = Math.floor(Number(n.value) / Number(n.step)) * Number(n.step), $ = Math.ceil(Number(n.value) / Number(n.step)) * Number(n.step);
|
|
122
|
+
return t("validator.error.step_mismatch", [p, $]);
|
|
123
|
+
}
|
|
124
|
+
return n.validity.customError ? n.validationMessage : null;
|
|
125
|
+
}
|
|
126
|
+
function f(n) {
|
|
127
|
+
n.target !== null && (r.value = v(n.target));
|
|
128
|
+
}
|
|
129
|
+
function o() {
|
|
130
|
+
return r.value;
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
onInvalid: f,
|
|
134
|
+
getInvalidMessage: o,
|
|
135
|
+
setCustomError: d
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const j = m({
|
|
139
|
+
name: "BsInput",
|
|
140
|
+
props: {
|
|
141
|
+
/**
|
|
142
|
+
* Value for v-model
|
|
143
|
+
*/
|
|
144
|
+
modelValue: {
|
|
145
|
+
type: [String, Number],
|
|
146
|
+
default: null
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Html id
|
|
150
|
+
*/
|
|
151
|
+
id: {
|
|
152
|
+
type: String,
|
|
153
|
+
required: !0
|
|
154
|
+
},
|
|
155
|
+
/**
|
|
156
|
+
* Label for input
|
|
157
|
+
*/
|
|
158
|
+
label: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: void 0
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* Attribute hint
|
|
164
|
+
*/
|
|
165
|
+
hint: {
|
|
166
|
+
type: String,
|
|
167
|
+
default: void 0
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Enable or disable validator
|
|
171
|
+
*/
|
|
172
|
+
validatorEnabled: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: !0
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
emits: ["update:modelValue"],
|
|
178
|
+
setup() {
|
|
179
|
+
const e = C(null);
|
|
180
|
+
return {
|
|
181
|
+
inputRef: e,
|
|
182
|
+
validator: I(e)
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
methods: {
|
|
186
|
+
/**
|
|
187
|
+
* Hint id is generated
|
|
188
|
+
*/
|
|
189
|
+
getHintId() {
|
|
190
|
+
return this.id + "Hint";
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* On input event
|
|
194
|
+
*
|
|
195
|
+
* @param event
|
|
196
|
+
*/
|
|
197
|
+
onInput(e) {
|
|
198
|
+
const t = e.target;
|
|
199
|
+
this.$emit("update:modelValue", t.value);
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* On invalid event
|
|
203
|
+
*
|
|
204
|
+
* @param event
|
|
205
|
+
*/
|
|
206
|
+
onInvalid(e) {
|
|
207
|
+
this.validatorEnabled && this.validator.onInvalid(e);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}), U = ["for", "textContent"], G = ["id", "value", "aria-describedby"], J = ["textContent"], K = ["id", "textContent"];
|
|
211
|
+
function Q(e, t, r, d, v, f) {
|
|
212
|
+
return a(), i(b, null, [
|
|
213
|
+
e.label !== void 0 ? (a(), i("label", {
|
|
214
|
+
key: 0,
|
|
215
|
+
for: e.id,
|
|
216
|
+
class: "form-label",
|
|
217
|
+
textContent: l(e.label)
|
|
218
|
+
}, null, 8, U)) : u("", !0),
|
|
219
|
+
s("input", k({
|
|
220
|
+
id: e.id,
|
|
221
|
+
ref: "inputRef",
|
|
222
|
+
value: e.modelValue,
|
|
223
|
+
class: "form-control"
|
|
224
|
+
}, e.$attrs, {
|
|
225
|
+
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
226
|
+
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
227
|
+
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
228
|
+
}), null, 16, G),
|
|
229
|
+
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
230
|
+
key: 1,
|
|
231
|
+
class: "invalid-feedback",
|
|
232
|
+
textContent: l(e.validator.getInvalidMessage())
|
|
233
|
+
}, null, 8, J)) : u("", !0),
|
|
234
|
+
e.hint !== void 0 ? (a(), i("div", {
|
|
235
|
+
key: 2,
|
|
236
|
+
id: e.getHintId(),
|
|
237
|
+
class: "form-text",
|
|
238
|
+
textContent: l(e.hint)
|
|
239
|
+
}, null, 8, K)) : u("", !0)
|
|
240
|
+
], 64);
|
|
241
|
+
}
|
|
242
|
+
const ht = /* @__PURE__ */ c(j, [["render", Q]]), W = m({
|
|
243
|
+
name: "BsCheckbox",
|
|
244
|
+
props: {
|
|
245
|
+
/**
|
|
246
|
+
* Value for checkbox if v-model is array.
|
|
247
|
+
*/
|
|
248
|
+
value: {
|
|
249
|
+
type: String,
|
|
250
|
+
default: null
|
|
251
|
+
},
|
|
252
|
+
/**
|
|
253
|
+
* Value for v-model
|
|
254
|
+
*/
|
|
255
|
+
modelValue: {
|
|
256
|
+
type: [Array, Boolean],
|
|
257
|
+
default: null
|
|
258
|
+
},
|
|
259
|
+
/**
|
|
260
|
+
* Html id
|
|
261
|
+
*/
|
|
262
|
+
id: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: !0
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Label for input
|
|
268
|
+
*/
|
|
269
|
+
label: {
|
|
270
|
+
type: String,
|
|
271
|
+
default: void 0
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
* Attribute hint
|
|
275
|
+
*/
|
|
276
|
+
hint: {
|
|
277
|
+
type: String,
|
|
278
|
+
default: void 0
|
|
279
|
+
},
|
|
280
|
+
/**
|
|
281
|
+
* Input container div class.
|
|
282
|
+
*/
|
|
283
|
+
classContainer: {
|
|
284
|
+
type: String,
|
|
285
|
+
default: void 0
|
|
286
|
+
},
|
|
287
|
+
/**
|
|
288
|
+
* Enable or disable validator
|
|
289
|
+
*/
|
|
290
|
+
validatorEnabled: {
|
|
291
|
+
type: Boolean,
|
|
292
|
+
default: !0
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
emits: ["update:modelValue"],
|
|
296
|
+
setup() {
|
|
297
|
+
const e = C(null);
|
|
298
|
+
return {
|
|
299
|
+
inputRef: e,
|
|
300
|
+
validator: I(e)
|
|
301
|
+
};
|
|
302
|
+
},
|
|
303
|
+
computed: {
|
|
304
|
+
/**
|
|
305
|
+
* Checkbox is checked or not.
|
|
306
|
+
*/
|
|
307
|
+
isChecked() {
|
|
308
|
+
return this.modelValue instanceof Array ? this.modelValue.includes(this.value) : this.modelValue === !0;
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
methods: {
|
|
312
|
+
/**
|
|
313
|
+
* Hint id is generated
|
|
314
|
+
*/
|
|
315
|
+
getHintId() {
|
|
316
|
+
return this.id + "Hint";
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* On input event
|
|
320
|
+
*
|
|
321
|
+
* @param event
|
|
322
|
+
*/
|
|
323
|
+
onInput(e) {
|
|
324
|
+
const r = e.target.checked;
|
|
325
|
+
if (this.modelValue instanceof Array) {
|
|
326
|
+
const d = [...this.modelValue];
|
|
327
|
+
r ? d.push(this.value) : d.splice(d.indexOf(this.value), 1), this.$emit("update:modelValue", d);
|
|
328
|
+
} else
|
|
329
|
+
this.$emit("update:modelValue", r);
|
|
330
|
+
},
|
|
331
|
+
/**
|
|
332
|
+
* On invalid event
|
|
333
|
+
*
|
|
334
|
+
* @param event
|
|
335
|
+
*/
|
|
336
|
+
onInvalid(e) {
|
|
337
|
+
this.validatorEnabled && this.validator.onInvalid(e);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}), X = ["id", "value", "checked", "aria-describedby"], Y = ["for", "textContent"], Z = ["textContent"], x = ["id", "textContent"];
|
|
341
|
+
function ee(e, t, r, d, v, f) {
|
|
342
|
+
return a(), i("div", {
|
|
343
|
+
class: h(["form-check", e.classContainer])
|
|
344
|
+
}, [
|
|
345
|
+
s("input", k({
|
|
346
|
+
id: e.id,
|
|
347
|
+
ref: "inputRef",
|
|
348
|
+
value: e.modelValue
|
|
349
|
+
}, e.$attrs, {
|
|
350
|
+
type: "checkbox",
|
|
351
|
+
class: "form-check-input",
|
|
352
|
+
checked: e.isChecked,
|
|
353
|
+
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
354
|
+
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
355
|
+
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
356
|
+
}), null, 16, X),
|
|
357
|
+
e.label !== void 0 ? (a(), i("label", {
|
|
358
|
+
key: 0,
|
|
359
|
+
for: e.id,
|
|
360
|
+
class: "form-check-label",
|
|
361
|
+
textContent: l(e.label)
|
|
362
|
+
}, null, 8, Y)) : u("", !0),
|
|
363
|
+
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
364
|
+
key: 1,
|
|
365
|
+
class: "invalid-feedback",
|
|
366
|
+
textContent: l(e.validator.getInvalidMessage())
|
|
367
|
+
}, null, 8, Z)) : u("", !0),
|
|
368
|
+
e.hint !== void 0 ? (a(), i("div", {
|
|
369
|
+
key: 2,
|
|
370
|
+
id: e.getHintId(),
|
|
371
|
+
class: "form-text",
|
|
372
|
+
textContent: l(e.hint)
|
|
373
|
+
}, null, 8, x)) : u("", !0)
|
|
374
|
+
], 2);
|
|
375
|
+
}
|
|
376
|
+
const ft = /* @__PURE__ */ c(W, [["render", ee]]), te = m({
|
|
377
|
+
name: "BsTextarea",
|
|
378
|
+
props: {
|
|
379
|
+
/**
|
|
380
|
+
* Value for v-model
|
|
381
|
+
*/
|
|
382
|
+
modelValue: {
|
|
383
|
+
type: [String, Number],
|
|
384
|
+
default: null
|
|
385
|
+
},
|
|
386
|
+
/**
|
|
387
|
+
* Html id
|
|
388
|
+
*/
|
|
389
|
+
id: {
|
|
390
|
+
type: String,
|
|
391
|
+
required: !0
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
* Label for textarea
|
|
395
|
+
*/
|
|
396
|
+
label: {
|
|
397
|
+
type: String,
|
|
398
|
+
default: void 0
|
|
399
|
+
},
|
|
400
|
+
/**
|
|
401
|
+
* Attribute hint
|
|
402
|
+
*/
|
|
403
|
+
hint: {
|
|
404
|
+
type: String,
|
|
405
|
+
default: void 0
|
|
406
|
+
},
|
|
407
|
+
/**
|
|
408
|
+
* Enable or disable validator
|
|
409
|
+
*/
|
|
410
|
+
validatorEnabled: {
|
|
411
|
+
type: Boolean,
|
|
412
|
+
default: !0
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
emits: ["update:modelValue"],
|
|
416
|
+
setup() {
|
|
417
|
+
const e = C(null);
|
|
418
|
+
return {
|
|
419
|
+
inputRef: e,
|
|
420
|
+
validator: I(e)
|
|
421
|
+
};
|
|
422
|
+
},
|
|
423
|
+
methods: {
|
|
424
|
+
/**
|
|
425
|
+
* Hint id is generated
|
|
426
|
+
*/
|
|
427
|
+
getHintId() {
|
|
428
|
+
return this.id + "Hint";
|
|
429
|
+
},
|
|
430
|
+
/**
|
|
431
|
+
* On input event
|
|
432
|
+
*
|
|
433
|
+
* @param event
|
|
434
|
+
*/
|
|
435
|
+
onInput(e) {
|
|
436
|
+
const t = e.target;
|
|
437
|
+
this.$emit("update:modelValue", t.value);
|
|
438
|
+
},
|
|
439
|
+
/**
|
|
440
|
+
* On invalid event
|
|
441
|
+
*
|
|
442
|
+
* @param event
|
|
443
|
+
*/
|
|
444
|
+
onInvalid(e) {
|
|
445
|
+
this.validatorEnabled && this.validator.onInvalid(e);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}), ne = ["for", "textContent"], ae = ["id", "value", "aria-describedby"], ie = ["textContent"], oe = ["id", "textContent"];
|
|
449
|
+
function se(e, t, r, d, v, f) {
|
|
450
|
+
return a(), i(b, null, [
|
|
451
|
+
e.label !== void 0 ? (a(), i("label", {
|
|
452
|
+
key: 0,
|
|
453
|
+
for: e.id,
|
|
454
|
+
class: "form-label",
|
|
455
|
+
textContent: l(e.label)
|
|
456
|
+
}, null, 8, ne)) : u("", !0),
|
|
457
|
+
s("textarea", k({
|
|
458
|
+
id: e.id,
|
|
459
|
+
ref: "inputRef",
|
|
460
|
+
value: e.modelValue
|
|
461
|
+
}, e.$attrs, {
|
|
462
|
+
class: "form-control",
|
|
463
|
+
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
464
|
+
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
465
|
+
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
466
|
+
}), null, 16, ae),
|
|
467
|
+
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
468
|
+
key: 1,
|
|
469
|
+
class: "invalid-feedback",
|
|
470
|
+
textContent: l(e.validator.getInvalidMessage())
|
|
471
|
+
}, null, 8, ie)) : u("", !0),
|
|
472
|
+
e.hint !== void 0 ? (a(), i("div", {
|
|
473
|
+
key: 2,
|
|
474
|
+
id: e.getHintId(),
|
|
475
|
+
class: "form-text",
|
|
476
|
+
textContent: l(e.hint)
|
|
477
|
+
}, null, 8, oe)) : u("", !0)
|
|
478
|
+
], 64);
|
|
479
|
+
}
|
|
480
|
+
const pt = /* @__PURE__ */ c(te, [["render", se]]), le = m({
|
|
481
|
+
name: "BsPaginator",
|
|
482
|
+
props: {
|
|
483
|
+
/**
|
|
484
|
+
* Total count of items.
|
|
485
|
+
*/
|
|
486
|
+
totalCount: {
|
|
487
|
+
type: Number,
|
|
488
|
+
required: !0
|
|
489
|
+
},
|
|
490
|
+
/**
|
|
491
|
+
* Page size
|
|
492
|
+
*/
|
|
493
|
+
pageSize: {
|
|
494
|
+
type: Number,
|
|
495
|
+
required: !0
|
|
496
|
+
},
|
|
497
|
+
/**
|
|
498
|
+
* Current page
|
|
499
|
+
*/
|
|
500
|
+
currentPage: {
|
|
501
|
+
type: Number,
|
|
502
|
+
required: !0
|
|
503
|
+
},
|
|
504
|
+
/**
|
|
505
|
+
* Max visible page
|
|
506
|
+
*/
|
|
507
|
+
maxVisiblePage: {
|
|
508
|
+
type: Number,
|
|
509
|
+
default: 5
|
|
510
|
+
},
|
|
511
|
+
/**
|
|
512
|
+
* First page label
|
|
513
|
+
*/
|
|
514
|
+
firstPageLabel: {
|
|
515
|
+
type: String,
|
|
516
|
+
default: "«"
|
|
517
|
+
},
|
|
518
|
+
/**
|
|
519
|
+
* Previous page label
|
|
520
|
+
*/
|
|
521
|
+
previousPageLabel: {
|
|
522
|
+
type: String,
|
|
523
|
+
default: "‹"
|
|
524
|
+
},
|
|
525
|
+
/**
|
|
526
|
+
* Next page label
|
|
527
|
+
*/
|
|
528
|
+
nextPageLabel: {
|
|
529
|
+
type: String,
|
|
530
|
+
default: "›"
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* Last page label
|
|
534
|
+
*/
|
|
535
|
+
lastPageLabel: {
|
|
536
|
+
type: String,
|
|
537
|
+
default: "»"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
emits: ["pageChanged"],
|
|
541
|
+
methods: {
|
|
542
|
+
/**
|
|
543
|
+
* Count of pages
|
|
544
|
+
*
|
|
545
|
+
* @returns {number}
|
|
546
|
+
*/
|
|
547
|
+
getPageCount() {
|
|
548
|
+
return Math.ceil(this.totalCount / this.pageSize);
|
|
549
|
+
},
|
|
550
|
+
/**
|
|
551
|
+
* Visible page list
|
|
552
|
+
*
|
|
553
|
+
* @returns {*[]}
|
|
554
|
+
*/
|
|
555
|
+
getVisiblePages() {
|
|
556
|
+
const e = [], t = this.getPageRange();
|
|
557
|
+
for (let r = t.beginPage; r <= t.endPage; r += 1)
|
|
558
|
+
e.push(r + 1);
|
|
559
|
+
return e;
|
|
560
|
+
},
|
|
561
|
+
/**
|
|
562
|
+
* Is page active, or not
|
|
563
|
+
*
|
|
564
|
+
* @param page
|
|
565
|
+
* @returns {boolean}
|
|
566
|
+
*/
|
|
567
|
+
isPageActive(e) {
|
|
568
|
+
return e === this.currentPage;
|
|
569
|
+
},
|
|
570
|
+
/**
|
|
571
|
+
* On page click
|
|
572
|
+
*/
|
|
573
|
+
onPageClick(e) {
|
|
574
|
+
this.isPageActive(e) || this.$emit("pageChanged", e);
|
|
575
|
+
},
|
|
576
|
+
/**
|
|
577
|
+
* Page range, example: 3 available page, current page 3, range is: [1, 3] (zero-based)
|
|
578
|
+
*
|
|
579
|
+
* @returns {{beginPage: number, endPage: number}}
|
|
580
|
+
*/
|
|
581
|
+
getPageRange() {
|
|
582
|
+
let e = Math.max(0, this.currentPage - this.maxVisiblePage / 2), t = e + this.maxVisiblePage - 1;
|
|
583
|
+
return t >= this.getPageCount() && (t = this.getPageCount() - 1, e = Math.max(0, t - this.maxVisiblePage + 1)), {
|
|
584
|
+
beginPage: Math.floor(e),
|
|
585
|
+
endPage: Math.floor(t)
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}), re = { class: "pagination" }, de = ["textContent"], ue = ["textContent"], ve = ["onClick", "textContent"], he = ["textContent"], fe = ["textContent"];
|
|
590
|
+
function pe(e, t, r, d, v, f) {
|
|
591
|
+
return a(), i("nav", null, [
|
|
592
|
+
s("ul", re, [
|
|
593
|
+
s("li", {
|
|
594
|
+
class: h(["page-item page-item-first", { disabled: e.isPageActive(1) }])
|
|
595
|
+
}, [
|
|
596
|
+
s("div", {
|
|
597
|
+
class: "page-link",
|
|
598
|
+
onClick: t[0] || (t[0] = (o) => e.onPageClick(1)),
|
|
599
|
+
textContent: l(e.firstPageLabel)
|
|
600
|
+
}, null, 8, de)
|
|
601
|
+
], 2),
|
|
602
|
+
s("li", {
|
|
603
|
+
class: h(["page-item page-item-previous", { disabled: e.isPageActive(1) }])
|
|
604
|
+
}, [
|
|
605
|
+
s("div", {
|
|
606
|
+
class: "page-link",
|
|
607
|
+
onClick: t[1] || (t[1] = (o) => e.onPageClick(e.currentPage - 1)),
|
|
608
|
+
textContent: l(e.previousPageLabel)
|
|
609
|
+
}, null, 8, ue)
|
|
610
|
+
], 2),
|
|
611
|
+
(a(!0), i(b, null, y(e.getVisiblePages(), (o, n) => (a(), i("li", {
|
|
612
|
+
key: n,
|
|
613
|
+
class: h(["page-item page-item-number", {
|
|
614
|
+
active: e.isPageActive(o)
|
|
615
|
+
}])
|
|
616
|
+
}, [
|
|
617
|
+
s("div", {
|
|
618
|
+
class: "page-link",
|
|
619
|
+
onClick: (p) => e.onPageClick(o),
|
|
620
|
+
textContent: l(o)
|
|
621
|
+
}, null, 8, ve)
|
|
622
|
+
], 2))), 128)),
|
|
623
|
+
s("li", {
|
|
624
|
+
class: h(["page-item page-item-next", { disabled: e.isPageActive(e.getPageCount()) }])
|
|
625
|
+
}, [
|
|
626
|
+
s("div", {
|
|
627
|
+
class: "page-link",
|
|
628
|
+
onClick: t[2] || (t[2] = (o) => e.onPageClick(e.currentPage + 1)),
|
|
629
|
+
textContent: l(e.nextPageLabel)
|
|
630
|
+
}, null, 8, he)
|
|
631
|
+
], 2),
|
|
632
|
+
s("li", {
|
|
633
|
+
class: h(["page-item page-item-last", { disabled: e.isPageActive(e.getPageCount()) }])
|
|
634
|
+
}, [
|
|
635
|
+
s("div", {
|
|
636
|
+
class: "page-link",
|
|
637
|
+
onClick: t[3] || (t[3] = (o) => e.onPageClick(e.getPageCount())),
|
|
638
|
+
textContent: l(e.lastPageLabel)
|
|
639
|
+
}, null, 8, fe)
|
|
640
|
+
], 2)
|
|
641
|
+
])
|
|
642
|
+
]);
|
|
643
|
+
}
|
|
644
|
+
const mt = /* @__PURE__ */ c(le, [["render", pe], ["__scopeId", "data-v-ff85ae67"]]), me = m({
|
|
645
|
+
name: "BsTable",
|
|
646
|
+
props: {
|
|
647
|
+
/**
|
|
648
|
+
* Field list
|
|
649
|
+
*/
|
|
650
|
+
fields: {
|
|
651
|
+
type: Array,
|
|
652
|
+
required: !0
|
|
653
|
+
},
|
|
654
|
+
/**
|
|
655
|
+
* Item list
|
|
656
|
+
*/
|
|
657
|
+
items: {
|
|
658
|
+
type: Array,
|
|
659
|
+
required: !0
|
|
660
|
+
},
|
|
661
|
+
/**
|
|
662
|
+
* Items loading
|
|
663
|
+
*/
|
|
664
|
+
isLoading: {
|
|
665
|
+
type: Boolean,
|
|
666
|
+
default: !1
|
|
667
|
+
},
|
|
668
|
+
/**
|
|
669
|
+
* Order by field name
|
|
670
|
+
*/
|
|
671
|
+
orderBy: {
|
|
672
|
+
type: String,
|
|
673
|
+
default: void 0
|
|
674
|
+
},
|
|
675
|
+
/**
|
|
676
|
+
* Sort is descending or ascending
|
|
677
|
+
*/
|
|
678
|
+
sortDesc: {
|
|
679
|
+
type: Boolean,
|
|
680
|
+
default: void 0
|
|
681
|
+
},
|
|
682
|
+
/**
|
|
683
|
+
* th element css lass
|
|
684
|
+
*/
|
|
685
|
+
thClass: {
|
|
686
|
+
type: String,
|
|
687
|
+
default: void 0
|
|
688
|
+
},
|
|
689
|
+
/**
|
|
690
|
+
* td element css class
|
|
691
|
+
*/
|
|
692
|
+
tdClass: {
|
|
693
|
+
type: String,
|
|
694
|
+
default: void 0
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
emits: ["orderChanged"],
|
|
698
|
+
methods: {
|
|
699
|
+
/**
|
|
700
|
+
* Is order by active by field?
|
|
701
|
+
*
|
|
702
|
+
* @param fieldKey
|
|
703
|
+
* @returns {boolean}
|
|
704
|
+
*/
|
|
705
|
+
isActiveOrderBy(e) {
|
|
706
|
+
return e === this.orderBy;
|
|
707
|
+
},
|
|
708
|
+
/**
|
|
709
|
+
* Is field sortable?
|
|
710
|
+
*
|
|
711
|
+
* @param field
|
|
712
|
+
* @returns {boolean}
|
|
713
|
+
*/
|
|
714
|
+
isSortableField(e) {
|
|
715
|
+
return e.sort === void 0 || e.sort;
|
|
716
|
+
},
|
|
717
|
+
/**
|
|
718
|
+
* Sort icon class.
|
|
719
|
+
*
|
|
720
|
+
* @returns {string}
|
|
721
|
+
*/
|
|
722
|
+
getSortIconClass() {
|
|
723
|
+
if (this.sortDesc === void 0)
|
|
724
|
+
throw new Error("Sort desc value is null, cannot calculate the sort icon!");
|
|
725
|
+
return this.sortDesc ? "bi bi-caret-up-fill" : "bi bi-caret-down-fill";
|
|
726
|
+
},
|
|
727
|
+
/**
|
|
728
|
+
* Calcuate sort desc value on click
|
|
729
|
+
* Returns null if there is no sortDesc value.
|
|
730
|
+
*/
|
|
731
|
+
calcSortDesc(e) {
|
|
732
|
+
return this.sortDesc === void 0 ? null : this.isOrderByChanged(e) ? !1 : !this.sortDesc;
|
|
733
|
+
},
|
|
734
|
+
/**
|
|
735
|
+
* Is order by changed?
|
|
736
|
+
*/
|
|
737
|
+
isOrderByChanged(e) {
|
|
738
|
+
return this.orderBy !== e;
|
|
739
|
+
},
|
|
740
|
+
/**
|
|
741
|
+
* Table head clicked.
|
|
742
|
+
*/
|
|
743
|
+
onHeadClick(e) {
|
|
744
|
+
this.isSortableField(e) && this.$emit("orderChanged", { sortDesc: this.calcSortDesc(e.key), orderBy: e.key });
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}), ce = (e) => (A("data-v-7c949d62"), e = e(), L(), e), ge = { class: "table" }, be = ["onClick"], $e = { key: 0 }, ye = ["colspan"], Ce = /* @__PURE__ */ ce(() => /* @__PURE__ */ s("div", { class: "d-flex justify-content-center p-2" }, [
|
|
748
|
+
/* @__PURE__ */ s("div", { class: "spinner-border spinner-border-sm" })
|
|
749
|
+
], -1)), ke = { key: 1 }, Ie = ["colspan"], Se = { class: "text-center text-muted small" };
|
|
750
|
+
function Be(e, t, r, d, v, f) {
|
|
751
|
+
const o = M("t");
|
|
752
|
+
return a(), i("table", ge, [
|
|
753
|
+
s("thead", null, [
|
|
754
|
+
s("tr", null, [
|
|
755
|
+
(a(!0), i(b, null, y(e.fields, (n) => (a(), i("th", {
|
|
756
|
+
key: n.key,
|
|
757
|
+
class: h({
|
|
758
|
+
"cursor-pointer": e.isSortableField(n),
|
|
759
|
+
"text-decoration-underline": e.isActiveOrderBy(n.key),
|
|
760
|
+
thClass: e.thClass
|
|
761
|
+
}),
|
|
762
|
+
onClick: (p) => e.onHeadClick(n)
|
|
763
|
+
}, [
|
|
764
|
+
g(e.$slots, "tr", {}, () => [
|
|
765
|
+
S(l(n.label) + " ", 1),
|
|
766
|
+
e.isActiveOrderBy(n.key) && e.sortDesc !== void 0 ? (a(), i("i", {
|
|
767
|
+
key: 0,
|
|
768
|
+
class: h(e.getSortIconClass())
|
|
769
|
+
}, null, 2)) : u("", !0)
|
|
770
|
+
], !0)
|
|
771
|
+
], 10, be))), 128))
|
|
772
|
+
])
|
|
773
|
+
]),
|
|
774
|
+
s("tbody", null, [
|
|
775
|
+
e.isLoading ? (a(), i("tr", $e, [
|
|
776
|
+
s("td", {
|
|
777
|
+
colspan: e.fields.length
|
|
778
|
+
}, [
|
|
779
|
+
g(e.$slots, "loading", {}, () => [
|
|
780
|
+
Ce
|
|
781
|
+
], !0)
|
|
782
|
+
], 8, ye)
|
|
783
|
+
])) : e.items.length === 0 ? (a(), i("tr", ke, [
|
|
784
|
+
s("td", {
|
|
785
|
+
colspan: e.fields.length
|
|
786
|
+
}, [
|
|
787
|
+
g(e.$slots, "empty", {}, () => [
|
|
788
|
+
R(s("div", Se, null, 512), [
|
|
789
|
+
[o, "table.empty_text"]
|
|
790
|
+
])
|
|
791
|
+
], !0)
|
|
792
|
+
], 8, Ie)
|
|
793
|
+
])) : (a(!0), i(b, { key: 2 }, y(e.items, (n, p) => (a(), i("tr", {
|
|
794
|
+
key: p,
|
|
795
|
+
class: h(n.trClass)
|
|
796
|
+
}, [
|
|
797
|
+
(a(!0), i(b, null, y(e.fields, ($) => (a(), i("td", {
|
|
798
|
+
key: $.key,
|
|
799
|
+
class: h(e.tdClass)
|
|
800
|
+
}, [
|
|
801
|
+
g(e.$slots, "td", {
|
|
802
|
+
key: p,
|
|
803
|
+
field: $.key,
|
|
804
|
+
row: n,
|
|
805
|
+
value: $.key in n ? n[$.key] : null
|
|
806
|
+
}, () => [
|
|
807
|
+
S(l(n[$.key]), 1)
|
|
808
|
+
], !0)
|
|
809
|
+
], 2))), 128))
|
|
810
|
+
], 2))), 128))
|
|
811
|
+
])
|
|
812
|
+
]);
|
|
813
|
+
}
|
|
814
|
+
const ct = /* @__PURE__ */ c(me, [["render", Be], ["__scopeId", "data-v-7c949d62"]]), Pe = m({
|
|
815
|
+
name: "BsToast",
|
|
816
|
+
emits: ["shown", "hidden"],
|
|
817
|
+
mounted() {
|
|
818
|
+
const e = this.$refs.toastRef;
|
|
819
|
+
B.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.toast", this.onShown), e.addEventListener("hidden.bs.toast", this.onHidden);
|
|
820
|
+
},
|
|
821
|
+
methods: {
|
|
822
|
+
/**
|
|
823
|
+
* Trigger toast hide event.
|
|
824
|
+
*/
|
|
825
|
+
hide() {
|
|
826
|
+
const e = this.$refs.toastRef;
|
|
827
|
+
B.getOrCreateInstance(e).hide();
|
|
828
|
+
},
|
|
829
|
+
/**
|
|
830
|
+
* Hidden event.
|
|
831
|
+
*/
|
|
832
|
+
onShown() {
|
|
833
|
+
this.$emit("shown");
|
|
834
|
+
},
|
|
835
|
+
/**
|
|
836
|
+
* Hidden event.
|
|
837
|
+
*/
|
|
838
|
+
onHidden() {
|
|
839
|
+
this.$emit("hidden");
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}), Ve = {
|
|
843
|
+
ref: "toastRef",
|
|
844
|
+
class: "toast hide",
|
|
845
|
+
role: "alert",
|
|
846
|
+
"aria-live": "assertive",
|
|
847
|
+
"aria-atomic": "true"
|
|
848
|
+
};
|
|
849
|
+
function Ee(e, t, r, d, v, f) {
|
|
850
|
+
return a(), i("div", Ve, [
|
|
851
|
+
g(e.$slots, "default")
|
|
852
|
+
], 512);
|
|
853
|
+
}
|
|
854
|
+
const gt = /* @__PURE__ */ c(Pe, [["render", Ee]]), we = m({
|
|
855
|
+
name: "BsModal",
|
|
856
|
+
props: {
|
|
857
|
+
/**
|
|
858
|
+
* Modal title
|
|
859
|
+
*/
|
|
860
|
+
title: {
|
|
861
|
+
type: String,
|
|
862
|
+
required: !0
|
|
863
|
+
},
|
|
864
|
+
classDialog: {
|
|
865
|
+
type: [String, Object],
|
|
866
|
+
default: null
|
|
867
|
+
},
|
|
868
|
+
hideHeader: {
|
|
869
|
+
type: Boolean,
|
|
870
|
+
default: !1
|
|
871
|
+
},
|
|
872
|
+
hideBody: {
|
|
873
|
+
type: Boolean,
|
|
874
|
+
default: !1
|
|
875
|
+
},
|
|
876
|
+
hideFooter: {
|
|
877
|
+
type: Boolean,
|
|
878
|
+
default: !1
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
emits: ["shown", "hidden"],
|
|
882
|
+
mounted() {
|
|
883
|
+
const e = this.$refs.modalRef;
|
|
884
|
+
P.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.modal", this.onShown), e.addEventListener("hidden.bs.modal", this.onHidden);
|
|
885
|
+
},
|
|
886
|
+
methods: {
|
|
887
|
+
/**
|
|
888
|
+
* Trigger modal hide event.
|
|
889
|
+
*/
|
|
890
|
+
hide() {
|
|
891
|
+
const e = this.$refs.modalRef;
|
|
892
|
+
P.getOrCreateInstance(e).hide();
|
|
893
|
+
},
|
|
894
|
+
/**
|
|
895
|
+
* Shown event.
|
|
896
|
+
*/
|
|
897
|
+
onShown() {
|
|
898
|
+
this.$emit("shown");
|
|
899
|
+
},
|
|
900
|
+
/**
|
|
901
|
+
* Hidden event.
|
|
902
|
+
*/
|
|
903
|
+
onHidden() {
|
|
904
|
+
this.$emit("hidden");
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}), He = {
|
|
908
|
+
ref: "modalRef",
|
|
909
|
+
class: "modal fade",
|
|
910
|
+
tabindex: "-1",
|
|
911
|
+
"aria-hidden": "true"
|
|
912
|
+
}, Me = { class: "modal-content" }, Re = {
|
|
913
|
+
key: 0,
|
|
914
|
+
class: "modal-header"
|
|
915
|
+
}, Ae = ["textContent"], Le = /* @__PURE__ */ s("button", {
|
|
916
|
+
type: "button",
|
|
917
|
+
class: "btn-close",
|
|
918
|
+
"data-bs-dismiss": "modal"
|
|
919
|
+
}, null, -1), Ne = {
|
|
920
|
+
key: 1,
|
|
921
|
+
class: "modal-body"
|
|
922
|
+
}, Oe = {
|
|
923
|
+
key: 2,
|
|
924
|
+
class: "modal-footer"
|
|
925
|
+
};
|
|
926
|
+
function _e(e, t, r, d, v, f) {
|
|
927
|
+
return a(), i("div", He, [
|
|
928
|
+
s("div", {
|
|
929
|
+
class: h(["modal-dialog", e.classDialog])
|
|
930
|
+
}, [
|
|
931
|
+
s("div", Me, [
|
|
932
|
+
e.hideHeader ? u("", !0) : (a(), i("div", Re, [
|
|
933
|
+
g(e.$slots, "header", {}, () => [
|
|
934
|
+
s("div", {
|
|
935
|
+
class: "h5 modal-title",
|
|
936
|
+
textContent: l(e.title)
|
|
937
|
+
}, null, 8, Ae),
|
|
938
|
+
Le
|
|
939
|
+
])
|
|
940
|
+
])),
|
|
941
|
+
e.hideBody ? u("", !0) : (a(), i("div", Ne, [
|
|
942
|
+
g(e.$slots, "body")
|
|
943
|
+
])),
|
|
944
|
+
e.hideFooter ? u("", !0) : (a(), i("div", Oe, [
|
|
945
|
+
g(e.$slots, "footer")
|
|
946
|
+
]))
|
|
947
|
+
])
|
|
948
|
+
], 2)
|
|
949
|
+
], 512);
|
|
950
|
+
}
|
|
951
|
+
const bt = /* @__PURE__ */ c(we, [["render", _e]]), De = m({
|
|
952
|
+
name: "BsSelect",
|
|
953
|
+
props: {
|
|
954
|
+
/**
|
|
955
|
+
* Value for v-model
|
|
956
|
+
*/
|
|
957
|
+
modelValue: {
|
|
958
|
+
type: [String, Number, Array],
|
|
959
|
+
default: null
|
|
960
|
+
},
|
|
961
|
+
/**
|
|
962
|
+
* Html id
|
|
963
|
+
*/
|
|
964
|
+
id: {
|
|
965
|
+
type: String,
|
|
966
|
+
required: !0
|
|
967
|
+
},
|
|
968
|
+
/**
|
|
969
|
+
* Label for input
|
|
970
|
+
*/
|
|
971
|
+
label: {
|
|
972
|
+
type: String,
|
|
973
|
+
default: void 0
|
|
974
|
+
},
|
|
975
|
+
/**
|
|
976
|
+
* Attribute hint
|
|
977
|
+
*/
|
|
978
|
+
hint: {
|
|
979
|
+
type: String,
|
|
980
|
+
default: void 0
|
|
981
|
+
},
|
|
982
|
+
/**
|
|
983
|
+
* Options
|
|
984
|
+
*/
|
|
985
|
+
options: {
|
|
986
|
+
type: Array,
|
|
987
|
+
required: !0
|
|
988
|
+
},
|
|
989
|
+
/**
|
|
990
|
+
* Placeholder
|
|
991
|
+
*/
|
|
992
|
+
placeholder: {
|
|
993
|
+
type: String,
|
|
994
|
+
default: void 0
|
|
995
|
+
},
|
|
996
|
+
/**
|
|
997
|
+
* Enable or disable validator
|
|
998
|
+
*/
|
|
999
|
+
validatorEnabled: {
|
|
1000
|
+
type: Boolean,
|
|
1001
|
+
default: !0
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
emits: ["update:modelValue"],
|
|
1005
|
+
setup() {
|
|
1006
|
+
const e = C(null);
|
|
1007
|
+
return {
|
|
1008
|
+
inputRef: e,
|
|
1009
|
+
validator: I(e)
|
|
1010
|
+
};
|
|
1011
|
+
},
|
|
1012
|
+
methods: {
|
|
1013
|
+
/**
|
|
1014
|
+
* Hint id is generated
|
|
1015
|
+
*/
|
|
1016
|
+
getHintId() {
|
|
1017
|
+
return this.id + "Hint";
|
|
1018
|
+
},
|
|
1019
|
+
/**
|
|
1020
|
+
* On input event
|
|
1021
|
+
*
|
|
1022
|
+
* @param event
|
|
1023
|
+
*/
|
|
1024
|
+
onInput(e) {
|
|
1025
|
+
const t = e.target;
|
|
1026
|
+
this.$emit("update:modelValue", t.value);
|
|
1027
|
+
},
|
|
1028
|
+
/**
|
|
1029
|
+
* On invalid event
|
|
1030
|
+
*
|
|
1031
|
+
* @param event
|
|
1032
|
+
*/
|
|
1033
|
+
onInvalid(e) {
|
|
1034
|
+
this.validatorEnabled && this.validator.onInvalid(e);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}), qe = ["for", "textContent"], Te = ["id", "value", "aria-labelledby"], Fe = {
|
|
1038
|
+
key: 0,
|
|
1039
|
+
value: "",
|
|
1040
|
+
disabled: "",
|
|
1041
|
+
hidden: ""
|
|
1042
|
+
}, ze = ["value"], je = ["textContent"], Ue = ["id", "textContent"];
|
|
1043
|
+
function Ge(e, t, r, d, v, f) {
|
|
1044
|
+
return a(), i(b, null, [
|
|
1045
|
+
e.label !== void 0 ? (a(), i("label", {
|
|
1046
|
+
key: 0,
|
|
1047
|
+
for: e.id,
|
|
1048
|
+
class: "form-label",
|
|
1049
|
+
textContent: l(e.label)
|
|
1050
|
+
}, null, 8, qe)) : u("", !0),
|
|
1051
|
+
s("select", k({
|
|
1052
|
+
id: e.id,
|
|
1053
|
+
ref: "inputRef",
|
|
1054
|
+
class: "form-select",
|
|
1055
|
+
value: e.modelValue,
|
|
1056
|
+
"aria-labelledby": e.hint !== void 0 ? e.getHintId() : void 0
|
|
1057
|
+
}, e.$attrs, {
|
|
1058
|
+
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
1059
|
+
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
1060
|
+
}), [
|
|
1061
|
+
e.placeholder !== void 0 ? (a(), i("option", Fe, l(e.placeholder), 1)) : u("", !0),
|
|
1062
|
+
(a(!0), i(b, null, y(e.options, (o, n) => (a(), i("option", {
|
|
1063
|
+
key: n,
|
|
1064
|
+
value: o.value
|
|
1065
|
+
}, l(o.text), 9, ze))), 128))
|
|
1066
|
+
], 16, Te),
|
|
1067
|
+
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
1068
|
+
key: 1,
|
|
1069
|
+
class: "invalid-feedback",
|
|
1070
|
+
textContent: l(e.validator.getInvalidMessage())
|
|
1071
|
+
}, null, 8, je)) : u("", !0),
|
|
1072
|
+
e.hint !== void 0 ? (a(), i("div", {
|
|
1073
|
+
key: 2,
|
|
1074
|
+
id: e.getHintId(),
|
|
1075
|
+
class: "form-text",
|
|
1076
|
+
textContent: l(e.hint)
|
|
1077
|
+
}, null, 8, Ue)) : u("", !0)
|
|
1078
|
+
], 64);
|
|
1079
|
+
}
|
|
1080
|
+
const $t = /* @__PURE__ */ c(De, [["render", Ge]]), Je = m({
|
|
1081
|
+
name: "BsRadio",
|
|
1082
|
+
props: {
|
|
1083
|
+
/**
|
|
1084
|
+
* Radio value
|
|
1085
|
+
*/
|
|
1086
|
+
value: {
|
|
1087
|
+
type: [String, Number],
|
|
1088
|
+
default: null
|
|
1089
|
+
},
|
|
1090
|
+
/**
|
|
1091
|
+
* Value for v-model
|
|
1092
|
+
*/
|
|
1093
|
+
modelValue: {
|
|
1094
|
+
type: [String, Number],
|
|
1095
|
+
default: null
|
|
1096
|
+
},
|
|
1097
|
+
/**
|
|
1098
|
+
* Html id
|
|
1099
|
+
*/
|
|
1100
|
+
id: {
|
|
1101
|
+
type: String,
|
|
1102
|
+
required: !0
|
|
1103
|
+
},
|
|
1104
|
+
/**
|
|
1105
|
+
* Label for input
|
|
1106
|
+
*/
|
|
1107
|
+
label: {
|
|
1108
|
+
type: String,
|
|
1109
|
+
default: void 0
|
|
1110
|
+
},
|
|
1111
|
+
/**
|
|
1112
|
+
* Attribute hint
|
|
1113
|
+
*/
|
|
1114
|
+
hint: {
|
|
1115
|
+
type: String,
|
|
1116
|
+
default: void 0
|
|
1117
|
+
},
|
|
1118
|
+
/**
|
|
1119
|
+
* Input container div class.
|
|
1120
|
+
*/
|
|
1121
|
+
classContainer: {
|
|
1122
|
+
type: String,
|
|
1123
|
+
default: void 0
|
|
1124
|
+
},
|
|
1125
|
+
/**
|
|
1126
|
+
* Enable or disable validator
|
|
1127
|
+
*/
|
|
1128
|
+
validatorEnabled: {
|
|
1129
|
+
type: Boolean,
|
|
1130
|
+
default: !0
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
emits: ["update:modelValue"],
|
|
1134
|
+
setup() {
|
|
1135
|
+
const e = C(null);
|
|
1136
|
+
return {
|
|
1137
|
+
inputRef: e,
|
|
1138
|
+
validator: I(e)
|
|
1139
|
+
};
|
|
1140
|
+
},
|
|
1141
|
+
computed: {
|
|
1142
|
+
/**
|
|
1143
|
+
* Radio is checked or not.
|
|
1144
|
+
*/
|
|
1145
|
+
isChecked() {
|
|
1146
|
+
return this.modelValue === this.value;
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
methods: {
|
|
1150
|
+
/**
|
|
1151
|
+
* Hint id is generated
|
|
1152
|
+
*/
|
|
1153
|
+
getHintId() {
|
|
1154
|
+
return this.id + "Hint";
|
|
1155
|
+
},
|
|
1156
|
+
/**
|
|
1157
|
+
* On input event
|
|
1158
|
+
*/
|
|
1159
|
+
onInput() {
|
|
1160
|
+
this.$emit("update:modelValue", this.value);
|
|
1161
|
+
},
|
|
1162
|
+
/**
|
|
1163
|
+
* On invalid event
|
|
1164
|
+
*
|
|
1165
|
+
* @param event
|
|
1166
|
+
*/
|
|
1167
|
+
onInvalid(e) {
|
|
1168
|
+
this.validatorEnabled && this.validator.onInvalid(e);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
}), Ke = ["id", "value", "checked", "aria-describedby"], Qe = ["for", "textContent"], We = ["textContent"], Xe = ["id", "textContent"];
|
|
1172
|
+
function Ye(e, t, r, d, v, f) {
|
|
1173
|
+
return a(), i("div", {
|
|
1174
|
+
class: h(["form-check", e.classContainer])
|
|
1175
|
+
}, [
|
|
1176
|
+
s("input", k({
|
|
1177
|
+
id: e.id,
|
|
1178
|
+
ref: "inputRef",
|
|
1179
|
+
value: e.modelValue
|
|
1180
|
+
}, e.$attrs, {
|
|
1181
|
+
type: "radio",
|
|
1182
|
+
class: "form-check-input",
|
|
1183
|
+
checked: e.isChecked,
|
|
1184
|
+
"aria-describedby": e.hint !== void 0 ? e.getHintId() : void 0,
|
|
1185
|
+
onInput: t[0] || (t[0] = (...o) => e.onInput && e.onInput(...o)),
|
|
1186
|
+
onInvalid: t[1] || (t[1] = (...o) => e.onInvalid && e.onInvalid(...o))
|
|
1187
|
+
}), null, 16, Ke),
|
|
1188
|
+
e.label !== void 0 ? (a(), i("label", {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
for: e.id,
|
|
1191
|
+
class: "form-check-label",
|
|
1192
|
+
textContent: l(e.label)
|
|
1193
|
+
}, null, 8, Qe)) : u("", !0),
|
|
1194
|
+
e.validatorEnabled && e.validator.getInvalidMessage() !== null ? (a(), i("div", {
|
|
1195
|
+
key: 1,
|
|
1196
|
+
class: "invalid-feedback",
|
|
1197
|
+
textContent: l(e.validator.getInvalidMessage())
|
|
1198
|
+
}, null, 8, We)) : u("", !0),
|
|
1199
|
+
e.hint !== void 0 ? (a(), i("div", {
|
|
1200
|
+
key: 2,
|
|
1201
|
+
id: e.getHintId(),
|
|
1202
|
+
class: "form-text",
|
|
1203
|
+
textContent: l(e.hint)
|
|
1204
|
+
}, null, 8, Xe)) : u("", !0)
|
|
1205
|
+
], 2);
|
|
1206
|
+
}
|
|
1207
|
+
const yt = /* @__PURE__ */ c(Je, [["render", Ye]]), Ze = m({
|
|
1208
|
+
name: "BsOffcanvas",
|
|
1209
|
+
props: {
|
|
1210
|
+
/**
|
|
1211
|
+
* Offcanvas title
|
|
1212
|
+
*/
|
|
1213
|
+
title: {
|
|
1214
|
+
type: String,
|
|
1215
|
+
required: !0
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
emits: ["shown", "hidden"],
|
|
1219
|
+
mounted() {
|
|
1220
|
+
const e = this.$refs.offcanvasRef;
|
|
1221
|
+
V.getOrCreateInstance(e).show(), e.addEventListener("shown.bs.offcanvas", this.onShown), e.addEventListener("hidden.bs.offcanvas", this.onHidden);
|
|
1222
|
+
},
|
|
1223
|
+
methods: {
|
|
1224
|
+
/**
|
|
1225
|
+
* Trigger offcanvas hide event.
|
|
1226
|
+
*/
|
|
1227
|
+
hide() {
|
|
1228
|
+
const e = this.$refs.offcanvasRef;
|
|
1229
|
+
V.getOrCreateInstance(e).hide();
|
|
1230
|
+
},
|
|
1231
|
+
/**
|
|
1232
|
+
* Shown event.
|
|
1233
|
+
*/
|
|
1234
|
+
onShown() {
|
|
1235
|
+
this.$emit("shown");
|
|
1236
|
+
},
|
|
1237
|
+
/**
|
|
1238
|
+
* Hidden event.
|
|
1239
|
+
*/
|
|
1240
|
+
onHidden() {
|
|
1241
|
+
this.$emit("hidden");
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
}), xe = {
|
|
1245
|
+
ref: "offcanvasRef",
|
|
1246
|
+
class: "offcanvas",
|
|
1247
|
+
tabindex: "-1",
|
|
1248
|
+
"aria-labelledby": "offcanvasTitle"
|
|
1249
|
+
}, et = { class: "offcanvas-header" }, tt = ["textContent"], nt = /* @__PURE__ */ s("button", {
|
|
1250
|
+
type: "button",
|
|
1251
|
+
class: "btn-close text-reset",
|
|
1252
|
+
"data-bs-dismiss": "offcanvas"
|
|
1253
|
+
}, null, -1), at = { class: "offcanvas-body" };
|
|
1254
|
+
function it(e, t, r, d, v, f) {
|
|
1255
|
+
return a(), i("div", xe, [
|
|
1256
|
+
s("div", et, [
|
|
1257
|
+
g(e.$slots, "header", {}, () => [
|
|
1258
|
+
s("div", {
|
|
1259
|
+
id: "offcanvasTitle",
|
|
1260
|
+
class: "h5 mb-0",
|
|
1261
|
+
textContent: l(e.title)
|
|
1262
|
+
}, null, 8, tt),
|
|
1263
|
+
nt
|
|
1264
|
+
])
|
|
1265
|
+
]),
|
|
1266
|
+
s("div", at, [
|
|
1267
|
+
g(e.$slots, "body")
|
|
1268
|
+
])
|
|
1269
|
+
], 512);
|
|
1270
|
+
}
|
|
1271
|
+
const Ct = /* @__PURE__ */ c(Ze, [["render", it]]);
|
|
1272
|
+
export {
|
|
1273
|
+
ut as BsBreadcrumb,
|
|
1274
|
+
ft as BsCheckbox,
|
|
1275
|
+
vt as BsForm,
|
|
1276
|
+
ht as BsInput,
|
|
1277
|
+
bt as BsModal,
|
|
1278
|
+
Ct as BsOffcanvas,
|
|
1279
|
+
mt as BsPaginator,
|
|
1280
|
+
yt as BsRadio,
|
|
1281
|
+
$t as BsSelect,
|
|
1282
|
+
ct as BsTable,
|
|
1283
|
+
pt as BsTextarea,
|
|
1284
|
+
gt as BsToast,
|
|
1285
|
+
I as useValidator
|
|
1286
|
+
};
|