@g1cloud/open-bluesea-core 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/bluesea.css +95 -0
- package/dist/blueseaPlugin.d.ts +36 -0
- package/dist/component/basic/PageNavigation.model.d.ts +5 -0
- package/dist/contextmenu/contextMenuPlugin.d.ts +36 -0
- package/dist/directive/vClickOutside.d.ts +20 -0
- package/dist/directive/vFocusOnLoad.d.ts +3 -0
- package/dist/directive/vTooltip.d.ts +7 -0
- package/dist/index.d.ts +35 -0
- package/dist/model/CommonTypes.d.ts +29 -0
- package/dist/model/DefaultImpl.d.ts +7 -0
- package/dist/model/FieldContext.d.ts +14 -0
- package/dist/notification/notificationPlugin.d.ts +31 -0
- package/dist/open-bluesea-core.css +1 -0
- package/dist/open-bluesea-core.es.js +2371 -0
- package/dist/open-bluesea-core.umd.js +1 -0
- package/dist/savepoint/SavePoint.d.ts +46 -0
- package/dist/util/componentUtil.d.ts +11 -0
- package/dist/util/debounceUtil.d.ts +16 -0
- package/dist/util/formatUtil.d.ts +67 -0
- package/dist/util/typeUtil.d.ts +18 -0
- package/dist/util/waitUtil.d.ts +19 -0
- package/dist/validator/FieldValidator.d.ts +43 -0
- package/package.json +44 -0
|
@@ -0,0 +1,2371 @@
|
|
|
1
|
+
import { ref as $, markRaw as be, inject as re, reactive as Te, defineComponent as z, withDirectives as Q, createBlock as R, openBlock as d, resolveDynamicComponent as xe, normalizeClass as O, withCtx as ee, createElementBlock as p, createCommentVNode as q, createElementVNode as I, toDisplayString as F, unref as D, computed as S, withModifiers as N, Fragment as K, renderList as J, onMounted as me, onBeforeUnmount as _, Teleport as nt, createVNode as U, Transition as Fe, normalizeStyle as ue, renderSlot as se, watch as Z, nextTick as ge, provide as ye, shallowRef as at, mergeProps as de, isRef as Oe, toHandlers as ce, vModelDynamic as ot, resolveDirective as lt, vModelText as it, useSlots as qe, withKeys as G, useTemplateRef as He, vShow as st, TransitionGroup as Pe, resolveComponent as Se } from "vue";
|
|
2
|
+
import Re from "dayjs";
|
|
3
|
+
const Ve = Symbol("BlueseaContextMenuPlugin");
|
|
4
|
+
class Ne {
|
|
5
|
+
contextMenuItems = $();
|
|
6
|
+
position = $();
|
|
7
|
+
options = $();
|
|
8
|
+
showContextMenu(n, t, a) {
|
|
9
|
+
this.position.value = { x: n.clientX, y: n.clientY }, this.markComponentRaw(t), this.contextMenuItems.value = t, this.options.value = a;
|
|
10
|
+
}
|
|
11
|
+
hideContextMenu() {
|
|
12
|
+
this.options.value?.onHideContextMenu && this.options.value.onHideContextMenu(), this.contextMenuItems.value = void 0, this.position.value = void 0, this.options.value = void 0;
|
|
13
|
+
}
|
|
14
|
+
// install(app: AbstractApp) {
|
|
15
|
+
// app.provide(contextMenuPluginKey, this)
|
|
16
|
+
// }
|
|
17
|
+
markComponentRaw(n) {
|
|
18
|
+
n.forEach((t) => {
|
|
19
|
+
t.component && (t.component = be(t.component)), t.children && this.markComponentRaw(t.children);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const ze = () => {
|
|
24
|
+
const e = re(Ve);
|
|
25
|
+
if (!e)
|
|
26
|
+
throw new Error("BSContextMenuPlugin is not initialized.");
|
|
27
|
+
return e;
|
|
28
|
+
}, ua = () => re(Ve), da = () => new Ne();
|
|
29
|
+
class rt {
|
|
30
|
+
dateFormat = "YYYY-MM-DD HH:mm Z";
|
|
31
|
+
dateFormatDay = "YYYY-MM-DD Z";
|
|
32
|
+
dateFormatMinute = "YYYY-MM-DD HH:mm Z";
|
|
33
|
+
dateFormatSecond = "YYYY-MM-DD HH:mm:ss Z";
|
|
34
|
+
minDateValue = "1920-01-01T00:00:00.000Z";
|
|
35
|
+
maxDateValue = "9000-12-31T23:59:59.999Z";
|
|
36
|
+
componentConfig;
|
|
37
|
+
constructor(n) {
|
|
38
|
+
this.dateFormat = n?.dateFormat || this.dateFormat, this.dateFormatDay = n?.dateFormatDay || this.dateFormatDay, this.dateFormatMinute = n?.dateFormatMinute || this.dateFormatMinute, this.dateFormatSecond = n?.dateFormatSecond || this.dateFormatSecond, this.minDateValue = n?.minDateValue || this.minDateValue, this.maxDateValue = n?.maxDateValue || this.maxDateValue, this.componentConfig = {
|
|
39
|
+
popup: { hideOnScroll: !1, ...n?.componentConfig?.popup }
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
resolveDisplayDateFormat(n) {
|
|
43
|
+
const t = n || this.dateFormat;
|
|
44
|
+
return t === "DAY" ? this.dateFormatDay : t === "MINUTE" ? this.dateFormatMinute : t === "SECOND" ? this.dateFormatSecond : t;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const Ae = Symbol("BlueseaConfig"), ut = () => re(Ae), ca = {
|
|
48
|
+
install(e, n) {
|
|
49
|
+
const t = new rt(n);
|
|
50
|
+
e.provide(Ae, t);
|
|
51
|
+
const a = new Ne();
|
|
52
|
+
e.provide(Ve, a);
|
|
53
|
+
}
|
|
54
|
+
}, dt = Te([]), ct = Te([]), X = $(), Ye = (e, n) => {
|
|
55
|
+
X.value = {
|
|
56
|
+
content: e,
|
|
57
|
+
target: be(n),
|
|
58
|
+
cursorInTooltip: !1
|
|
59
|
+
};
|
|
60
|
+
}, he = () => {
|
|
61
|
+
X.value && !X.value.cursorInTooltip && (X.value = void 0);
|
|
62
|
+
}, ke = () => !!X.value, vt = $(!1), ft = 800, mt = 0, $e = (e, n) => {
|
|
63
|
+
n && n.content ? (e.setAttribute("data-bs-tooltip-data", JSON.stringify(n)), ke() && Ye(n.content, e)) : (e.removeAttribute("data-bs-tooltip-data"), ke() && he());
|
|
64
|
+
}, Ue = {
|
|
65
|
+
mounted: (e, n) => {
|
|
66
|
+
$e(e, n.value), e.addEventListener("mouseover", () => {
|
|
67
|
+
const t = e.getAttribute("data-bs-tooltip-data"), a = t ? JSON.parse(t) : void 0;
|
|
68
|
+
a && a.content && (e.setAttribute("data-bs-tooltip", "true"), setTimeout(() => {
|
|
69
|
+
const u = e.getAttribute("data-bs-tooltip-data"), s = u ? JSON.parse(u) : void 0;
|
|
70
|
+
s && s.content && e.getAttribute("data-bs-tooltip") === "true" && window.document.contains(e) && Ye(s.content, e);
|
|
71
|
+
}, a.delay || ft));
|
|
72
|
+
}), e.addEventListener("mouseout", (t) => {
|
|
73
|
+
e.contains(t.relatedTarget) || (e.removeAttribute("data-bs-tooltip"), setTimeout(() => he(), mt));
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
updated: (e, n) => {
|
|
77
|
+
$e(e, n.value);
|
|
78
|
+
},
|
|
79
|
+
unmounted: () => {
|
|
80
|
+
he();
|
|
81
|
+
}
|
|
82
|
+
}, ht = ["textContent"], gt = /* @__PURE__ */ z({
|
|
83
|
+
__name: "BSButton",
|
|
84
|
+
props: {
|
|
85
|
+
caption: {},
|
|
86
|
+
buttonColor: { default: "default" },
|
|
87
|
+
leftIcon: {},
|
|
88
|
+
rightIcon: {},
|
|
89
|
+
disabled: { type: Boolean, default: !1 },
|
|
90
|
+
linkUrl: {},
|
|
91
|
+
linkTarget: {},
|
|
92
|
+
routePath: {},
|
|
93
|
+
tooltip: {}
|
|
94
|
+
},
|
|
95
|
+
setup(e) {
|
|
96
|
+
return (n, t) => Q((d(), R(xe(e.linkUrl ? "a" : e.routePath ? "router-link" : "button"), {
|
|
97
|
+
class: O([[e.buttonColor], "bs-button position-relative"]),
|
|
98
|
+
disabled: e.disabled,
|
|
99
|
+
href: e.linkUrl,
|
|
100
|
+
target: e.linkTarget,
|
|
101
|
+
to: e.routePath
|
|
102
|
+
}, {
|
|
103
|
+
default: ee(() => [
|
|
104
|
+
e.leftIcon ? (d(), p("span", {
|
|
105
|
+
key: 0,
|
|
106
|
+
class: O([{ "bs-mr-4": !!e.caption }, "font-icon left"])
|
|
107
|
+
}, F(e.leftIcon), 3)) : q("", !0),
|
|
108
|
+
I("span", {
|
|
109
|
+
textContent: F(e.caption)
|
|
110
|
+
}, null, 8, ht),
|
|
111
|
+
e.rightIcon ? (d(), p("span", {
|
|
112
|
+
key: 1,
|
|
113
|
+
class: O([{ "bs-ml-4": !!e.caption }, "font-icon right"])
|
|
114
|
+
}, F(e.rightIcon), 3)) : q("", !0)
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
}, 8, ["class", "disabled", "href", "target", "to"])), [
|
|
118
|
+
[D(Ue), { content: e.tooltip }]
|
|
119
|
+
]);
|
|
120
|
+
}
|
|
121
|
+
}), Ke = (e, n) => {
|
|
122
|
+
const t = e.__vccOpts || e;
|
|
123
|
+
for (const [a, u] of n)
|
|
124
|
+
t[a] = u;
|
|
125
|
+
return t;
|
|
126
|
+
}, va = /* @__PURE__ */ Ke(gt, [["__scopeId", "data-v-26726ef5"]]), pt = { class: "page-navigation" }, bt = ["data-page", "onClick"], fa = /* @__PURE__ */ z({
|
|
127
|
+
__name: "BSPageNavigation",
|
|
128
|
+
props: {
|
|
129
|
+
totalCount: { default: 0 },
|
|
130
|
+
offset: { default: 0 },
|
|
131
|
+
limit: { default: 10 },
|
|
132
|
+
visiblePageCount: { default: 10 },
|
|
133
|
+
maxPage: {}
|
|
134
|
+
},
|
|
135
|
+
emits: ["offsetChanged"],
|
|
136
|
+
setup(e, { emit: n }) {
|
|
137
|
+
const t = e, a = n, u = S(() => {
|
|
138
|
+
const x = Math.floor((t.totalCount - 1) / t.limit) + 1;
|
|
139
|
+
return t.totalCount < 1 ? 1 : t.maxPage && x > t.maxPage ? t.maxPage : x || 0;
|
|
140
|
+
}), s = S(() => Math.min(Math.floor(t.offset / t.limit) + 1, u.value)), m = S(() => Math.floor((s.value - 1) / t.visiblePageCount) * t.visiblePageCount + 1), f = S(() => Math.min(m.value + t.visiblePageCount - 1, u.value)), h = S(() => {
|
|
141
|
+
if (t.totalCount <= 0) return [];
|
|
142
|
+
const x = m.value, i = f.value, g = Array(i - x + 1);
|
|
143
|
+
for (let k = 0; k < g.length; k++) g[k] = k + x;
|
|
144
|
+
return g;
|
|
145
|
+
}), B = S(() => m.value - 1), w = S(() => f.value + 1), C = S(() => m.value <= 1), b = S(() => f.value >= u.value), y = (x) => {
|
|
146
|
+
const i = Math.max(1, Math.min(x, u.value));
|
|
147
|
+
if (s.value !== i) {
|
|
148
|
+
const g = (i - 1) * t.limit;
|
|
149
|
+
a(
|
|
150
|
+
"offsetChanged",
|
|
151
|
+
g,
|
|
152
|
+
{ offset: t.offset, limit: t.limit, totalCount: t.totalCount }
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
return (x, i) => (d(), p("div", pt, [
|
|
157
|
+
I("span", {
|
|
158
|
+
class: O([{ disabled: C.value }, "font-icon first"]),
|
|
159
|
+
onClick: i[0] || (i[0] = N((g) => !C.value && y(1), ["prevent"]))
|
|
160
|
+
}, "keyboard_double_arrow_left", 2),
|
|
161
|
+
I("span", {
|
|
162
|
+
class: O([{ disabled: C.value }, "font-icon prev"]),
|
|
163
|
+
onClick: i[1] || (i[1] = N((g) => !C.value && y(B.value), ["prevent"]))
|
|
164
|
+
}, "keyboard_arrow_left", 2),
|
|
165
|
+
(d(!0), p(K, null, J(h.value, (g) => (d(), p("span", {
|
|
166
|
+
key: g,
|
|
167
|
+
class: O([{ on: g === s.value }, "page"]),
|
|
168
|
+
"data-page": g,
|
|
169
|
+
onClick: N((k) => y(g), ["prevent"])
|
|
170
|
+
}, F(g), 11, bt))), 128)),
|
|
171
|
+
I("span", {
|
|
172
|
+
class: O([{ disabled: b.value }, "font-icon next"]),
|
|
173
|
+
onClick: i[2] || (i[2] = N((g) => !b.value && y(w.value), ["prevent"]))
|
|
174
|
+
}, "keyboard_arrow_right", 2),
|
|
175
|
+
I("span", {
|
|
176
|
+
class: O([{ disabled: b.value }, "font-icon last"]),
|
|
177
|
+
onClick: i[3] || (i[3] = N((g) => !b.value && y(u.value), ["prevent"]))
|
|
178
|
+
}, "keyboard_double_arrow_right", 2)
|
|
179
|
+
]));
|
|
180
|
+
}
|
|
181
|
+
}), xt = {}, yt = { class: "bs-loading-icon" };
|
|
182
|
+
function Vt(e, n) {
|
|
183
|
+
return d(), p("div", yt, [...n[0] || (n[0] = [
|
|
184
|
+
I("span", { class: "font-icon" }, "progress_activity", -1)
|
|
185
|
+
])]);
|
|
186
|
+
}
|
|
187
|
+
const wt = /* @__PURE__ */ Ke(xt, [["render", Vt]]), ma = async (e, n = 200, t = 15) => await new Promise((a) => {
|
|
188
|
+
let u = 0;
|
|
189
|
+
const s = setInterval(() => {
|
|
190
|
+
(u > t || e()) && (clearInterval(s), a(void 0)), u++;
|
|
191
|
+
}, n);
|
|
192
|
+
}), Ct = async (e = 2e3) => new Promise((n) => setTimeout(n, e)), ha = (e, n, t = 200, a = 15) => {
|
|
193
|
+
let u = 0;
|
|
194
|
+
const s = setInterval(() => {
|
|
195
|
+
u > a || e() ? clearInterval(s) : n?.(), u++;
|
|
196
|
+
}, t);
|
|
197
|
+
}, Mt = ["data-popup-id"], Pt = 8, je = /* @__PURE__ */ z({
|
|
198
|
+
__name: "BSPopup",
|
|
199
|
+
props: {
|
|
200
|
+
popupId: {},
|
|
201
|
+
maxHeight: { default: "360px" },
|
|
202
|
+
baseElement: {},
|
|
203
|
+
offsetFromBaseElement: {},
|
|
204
|
+
extraClass: {},
|
|
205
|
+
popupDirection: { default: "auto-down" },
|
|
206
|
+
popupAlign: { default: "auto" },
|
|
207
|
+
zIndex: {}
|
|
208
|
+
},
|
|
209
|
+
emits: ["requestClose", "click", "keydown"],
|
|
210
|
+
setup(e, { emit: n }) {
|
|
211
|
+
const t = e, a = n, u = ut(), s = u?.componentConfig?.popup?.container || ".bs-popup-container", m = $();
|
|
212
|
+
let f;
|
|
213
|
+
const h = $("-100000px"), B = $("-100000px"), w = () => t.baseElement instanceof HTMLElement ? y(t.baseElement) : t.baseElement ? x(t.baseElement) : { left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0 };
|
|
214
|
+
me(async () => {
|
|
215
|
+
if (await Ct(10), t.baseElement && m.value) {
|
|
216
|
+
f = w();
|
|
217
|
+
const l = m.value.getBoundingClientRect(), v = i(
|
|
218
|
+
f,
|
|
219
|
+
l,
|
|
220
|
+
t.popupDirection,
|
|
221
|
+
t.popupAlign
|
|
222
|
+
);
|
|
223
|
+
B.value = `${v.top}px`, h.value = `${v.left}px`;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
const C = $({ x: 0, y: 0 }), b = S(() => `translate(${C.value.x}px, ${C.value.y}px)`), y = (l) => {
|
|
227
|
+
const v = l.getBoundingClientRect(), o = {
|
|
228
|
+
left: v.left,
|
|
229
|
+
top: v.top,
|
|
230
|
+
right: v.right,
|
|
231
|
+
bottom: v.bottom,
|
|
232
|
+
width: v.width,
|
|
233
|
+
height: v.height
|
|
234
|
+
};
|
|
235
|
+
let r = l.offsetParent;
|
|
236
|
+
for (; r; )
|
|
237
|
+
o.top -= r.scrollTop || 0, o.bottom -= r.scrollTop || 0, o.left -= r.scrollLeft || 0, o.right -= r.scrollLeft || 0, r = r.offsetParent;
|
|
238
|
+
return o;
|
|
239
|
+
}, x = (l) => ({
|
|
240
|
+
left: l.left,
|
|
241
|
+
top: l.top,
|
|
242
|
+
right: l.left,
|
|
243
|
+
bottom: l.top,
|
|
244
|
+
width: 0,
|
|
245
|
+
height: 0
|
|
246
|
+
}), i = (l, v, o, r) => {
|
|
247
|
+
if (o === "auto-down")
|
|
248
|
+
if (l.bottom + v.height + (t.offsetFromBaseElement || 0) > window.innerHeight)
|
|
249
|
+
if (l.top - v.height - (t.offsetFromBaseElement || 0) < 0) {
|
|
250
|
+
const V = l.bottom + v.height + (t.offsetFromBaseElement || 0) - window.innerHeight;
|
|
251
|
+
return {
|
|
252
|
+
// down 인데 top 위치를 약간 조절함
|
|
253
|
+
top: l.bottom + (t.offsetFromBaseElement || 0) - V - Pt,
|
|
254
|
+
left: g(l, v, r)
|
|
255
|
+
};
|
|
256
|
+
} else
|
|
257
|
+
return {
|
|
258
|
+
// up
|
|
259
|
+
top: l.top - v.height - (t.offsetFromBaseElement || 0),
|
|
260
|
+
left: g(l, v, r)
|
|
261
|
+
};
|
|
262
|
+
else
|
|
263
|
+
return {
|
|
264
|
+
// down
|
|
265
|
+
top: l.bottom + (t.offsetFromBaseElement || 0),
|
|
266
|
+
left: g(l, v, r)
|
|
267
|
+
};
|
|
268
|
+
else return o === "down" ? {
|
|
269
|
+
top: l.bottom + (t.offsetFromBaseElement || 0),
|
|
270
|
+
left: g(l, v, r)
|
|
271
|
+
} : o === "up" ? {
|
|
272
|
+
top: l.top - v.height - (t.offsetFromBaseElement || 0),
|
|
273
|
+
left: g(l, v, r)
|
|
274
|
+
} : o === "auto-right" ? l.right + v.width > window.innerWidth ? { top: l.top, left: l.left - v.width } : { top: l.top, left: l.right } : o === "right" ? { top: l.top, left: l.right } : { left: 0, top: 0 };
|
|
275
|
+
}, g = (l, v, o) => o === "auto" ? l.left + v.width > window.innerWidth ? l.right - v.width < 0 ? l.left : l.left - (v.width - l.width) : l.left : o === "center" ? l.left - (v.width - l.width) / 2 : o === "left" ? l.left : o === "right" ? l.left - (v.width - l.width) : 0, k = () => {
|
|
276
|
+
a("requestClose");
|
|
277
|
+
}, P = [], c = () => {
|
|
278
|
+
if (u?.componentConfig?.popup?.hideOnScroll)
|
|
279
|
+
k();
|
|
280
|
+
else if (f) {
|
|
281
|
+
const l = w();
|
|
282
|
+
C.value.x = l.left - f.left, C.value.y = l.top - f.top;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
return me(() => {
|
|
286
|
+
if (t.baseElement instanceof HTMLElement && (window.addEventListener("scroll", c, { passive: !0 }), t.baseElement instanceof HTMLElement)) {
|
|
287
|
+
let l = t.baseElement;
|
|
288
|
+
for (; l; )
|
|
289
|
+
(l.scrollHeight > l.clientHeight || l.scrollWidth > l.clientWidth) && P.push(l), l = l.parentElement;
|
|
290
|
+
P.forEach(
|
|
291
|
+
(v) => v.addEventListener("scroll", c, { passive: !0 })
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
}), _(() => {
|
|
295
|
+
window.removeEventListener("scroll", c), P.forEach(
|
|
296
|
+
(l) => l.removeEventListener("scroll", c)
|
|
297
|
+
);
|
|
298
|
+
}), (l, v) => (d(), R(nt, { to: D(s) }, [
|
|
299
|
+
U(Fe, null, {
|
|
300
|
+
default: ee(() => [
|
|
301
|
+
I("div", {
|
|
302
|
+
ref_key: "root",
|
|
303
|
+
ref: m,
|
|
304
|
+
class: O([e.extraClass, "bs-popup overflow-auto"]),
|
|
305
|
+
"data-popup-id": e.popupId,
|
|
306
|
+
style: ue({ maxHeight: e.maxHeight, top: B.value, left: h.value, zIndex: e.zIndex, transform: b.value }),
|
|
307
|
+
onClick: v[0] || (v[0] = (o) => a("click", o)),
|
|
308
|
+
onKeydown: v[1] || (v[1] = (o) => a("keydown", o))
|
|
309
|
+
}, [
|
|
310
|
+
se(l.$slots, "default")
|
|
311
|
+
], 46, Mt)
|
|
312
|
+
]),
|
|
313
|
+
_: 3
|
|
314
|
+
})
|
|
315
|
+
], 8, ["to"]));
|
|
316
|
+
}
|
|
317
|
+
}), St = ["textContent"], kt = /* @__PURE__ */ z({
|
|
318
|
+
__name: "BSTooltip",
|
|
319
|
+
props: {
|
|
320
|
+
align: { default: "center" },
|
|
321
|
+
content: {},
|
|
322
|
+
target: {}
|
|
323
|
+
},
|
|
324
|
+
setup(e) {
|
|
325
|
+
const n = e, t = S(() => {
|
|
326
|
+
const a = {};
|
|
327
|
+
if (n.target) {
|
|
328
|
+
const u = n.target.getBoundingClientRect();
|
|
329
|
+
a.top = `${u.bottom + 8}px`, n.align === "left" ? a.left = `${u.left}px` : n.align === "right" ? a.right = `${u.right}px` : a.left = `${(u.left + u.right) / 2}px`;
|
|
330
|
+
}
|
|
331
|
+
return a;
|
|
332
|
+
});
|
|
333
|
+
return (a, u) => (d(), p("div", {
|
|
334
|
+
class: O([e.align, "bs-tooltip"]),
|
|
335
|
+
style: ue(t.value)
|
|
336
|
+
}, [
|
|
337
|
+
I("div", {
|
|
338
|
+
textContent: F(e.content)
|
|
339
|
+
}, null, 8, St)
|
|
340
|
+
], 6));
|
|
341
|
+
}
|
|
342
|
+
}), $t = (e, n) => {
|
|
343
|
+
e._bsFieldValidator = n, e.setAttribute("data-bs-field-validator", "");
|
|
344
|
+
}, ae = (e) => {
|
|
345
|
+
const n = $(), t = $(e.initialValue), a = $(!1), u = $([]), s = $(!1), m = (c) => e.convertToValue ? e.convertToValue(c) : c ?? "", f = (c) => e.convertFromValue ? e.convertFromValue(c) : c?.toString() ?? "", h = async (c, l) => {
|
|
346
|
+
const v = m(c);
|
|
347
|
+
await B(v, l);
|
|
348
|
+
}, B = async (c, l) => {
|
|
349
|
+
if (t.value = c, e.disabled?.value) {
|
|
350
|
+
a.value = !0;
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
a.value = !1;
|
|
354
|
+
const v = await e.isValid?.(t.value, l);
|
|
355
|
+
v && v.length > 0 ? (a.value = !1, u.value = v) : (a.value = !0, u.value = []);
|
|
356
|
+
}, w = (c) => c.target && "value" in c.target ? c.target.value : void 0, C = async (c = "form") => {
|
|
357
|
+
await B(t.value, c);
|
|
358
|
+
}, b = () => {
|
|
359
|
+
s.value = !1, u.value = [], a.value = !1;
|
|
360
|
+
}, y = async (c) => {
|
|
361
|
+
const l = w(c);
|
|
362
|
+
l !== void 0 && await h(l, "input");
|
|
363
|
+
}, P = {
|
|
364
|
+
stringValue: n,
|
|
365
|
+
value: t,
|
|
366
|
+
valid: a,
|
|
367
|
+
errors: u,
|
|
368
|
+
touched: s,
|
|
369
|
+
handleInput: async (c) => {
|
|
370
|
+
await y(c);
|
|
371
|
+
},
|
|
372
|
+
handleChange: async (c) => {
|
|
373
|
+
const l = w(c);
|
|
374
|
+
l !== void 0 && await h(l, "change");
|
|
375
|
+
},
|
|
376
|
+
handleFocus: (c) => {
|
|
377
|
+
s.value = !0;
|
|
378
|
+
},
|
|
379
|
+
handleBlur: async (c) => {
|
|
380
|
+
const l = w(c);
|
|
381
|
+
l !== void 0 && await h(l, "blur");
|
|
382
|
+
},
|
|
383
|
+
validateValue: B,
|
|
384
|
+
validate: C,
|
|
385
|
+
clearErrors: b,
|
|
386
|
+
getName: () => {
|
|
387
|
+
const c = e.field?.value;
|
|
388
|
+
return c ? c.getAttribute("name") ?? c.getAttribute("data-field-name") ?? "" : "";
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
return n.value = f(t.value), e.field && Z(e.field, (c) => {
|
|
392
|
+
c && $t(c, P);
|
|
393
|
+
}), P;
|
|
394
|
+
}, oe = async (e, n, t, a, u) => {
|
|
395
|
+
const s = [];
|
|
396
|
+
if (n) {
|
|
397
|
+
for (const m of n) {
|
|
398
|
+
const f = await m(e, a, u);
|
|
399
|
+
f && f.forEach((h) => s.push(h));
|
|
400
|
+
}
|
|
401
|
+
s.forEach((m) => t.push(m));
|
|
402
|
+
}
|
|
403
|
+
return s.length > 0;
|
|
404
|
+
}, we = (e, n, t, a) => n && (typeof e == "string" && !e || e === void 0) ? (a.push({ code: "required", message: t || "Required" }), !0) : !1, Bt = (e, n, t, a) => e && n && !new RegExp(n).test(e) ? (a.push({ code: "allowedPattern", message: t || "Invalid format" }), !0) : !1, Ze = (e, n, t, a, u, s, m) => {
|
|
405
|
+
const f = !!e && !!n && e.length < n, h = !!e && !!a && e.length > a;
|
|
406
|
+
return f && h ? m.push({
|
|
407
|
+
code: "betweenLength",
|
|
408
|
+
message: s || "Should be {0} ~ {1} characters"
|
|
409
|
+
// {
|
|
410
|
+
// key: 'bs.error.validation.lengthRange',
|
|
411
|
+
// args: [minLength, maxLength]
|
|
412
|
+
// }
|
|
413
|
+
}) : f ? m.push({
|
|
414
|
+
code: "minLength",
|
|
415
|
+
message: t || "Should be {0} characters or more"
|
|
416
|
+
// {
|
|
417
|
+
// key: 'bs.error.validation.lengthMin',
|
|
418
|
+
// args: [minLength]
|
|
419
|
+
// }
|
|
420
|
+
}) : h && m.push({
|
|
421
|
+
code: "maxLength",
|
|
422
|
+
message: u || "Should be {0} characters or less"
|
|
423
|
+
// {
|
|
424
|
+
// key: 'bs.error.validation.lengthMax',
|
|
425
|
+
// args: [maxLength]
|
|
426
|
+
// }
|
|
427
|
+
}), f || h;
|
|
428
|
+
}, Et = (e, n, t, a, u, s, m) => {
|
|
429
|
+
const f = n !== void 0 && e < n, h = a !== void 0 && e > a;
|
|
430
|
+
return f && h ? m.push({
|
|
431
|
+
code: "betweenValue",
|
|
432
|
+
message: s || "Should be {0} ~ {1}"
|
|
433
|
+
// {
|
|
434
|
+
// key: 'bs.error.validation.valueRange',
|
|
435
|
+
// args: [minValue, maxValue]
|
|
436
|
+
// }
|
|
437
|
+
}) : f ? m.push({
|
|
438
|
+
code: "minValue",
|
|
439
|
+
message: t || "Should be {0} or more"
|
|
440
|
+
// {
|
|
441
|
+
// key: 'bs.error.validation.valueMin',
|
|
442
|
+
// args: [minValue]
|
|
443
|
+
// }
|
|
444
|
+
}) : h && m.push({
|
|
445
|
+
code: "maxValue",
|
|
446
|
+
message: u || "Should be {0} or less"
|
|
447
|
+
// {
|
|
448
|
+
// key: 'bs.error.validation.valueMax',
|
|
449
|
+
// args: [maxValue]
|
|
450
|
+
// }
|
|
451
|
+
}), f || h;
|
|
452
|
+
};
|
|
453
|
+
let It = 0, Lt = 0;
|
|
454
|
+
const j = {
|
|
455
|
+
handleExternalErrorMessage(e, n, t) {
|
|
456
|
+
if (t) {
|
|
457
|
+
const a = document.getElementById(t);
|
|
458
|
+
a && (!e || !n || n.length === 0 ? a.style.display = "none" : (a.style.display = "", a.textContent = n || ""));
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
generateNextId(e) {
|
|
462
|
+
return `${e}-${++It}`;
|
|
463
|
+
},
|
|
464
|
+
generateNextName(e) {
|
|
465
|
+
return `${e}${++Lt}`;
|
|
466
|
+
},
|
|
467
|
+
isRelativeSize(e) {
|
|
468
|
+
return e?.endsWith("%") || !1;
|
|
469
|
+
},
|
|
470
|
+
delayed(e, n = 200) {
|
|
471
|
+
n <= 0 ? e() : window.setTimeout(e, n);
|
|
472
|
+
},
|
|
473
|
+
trimStringValue(e, n) {
|
|
474
|
+
return n ? e?.trim() : e;
|
|
475
|
+
},
|
|
476
|
+
getPrefixSuffixList(e) {
|
|
477
|
+
if (!e)
|
|
478
|
+
return [];
|
|
479
|
+
const n = Array.isArray(e) ? e : [e], t = [];
|
|
480
|
+
for (let a of n)
|
|
481
|
+
a && (typeof a == "object" && a.hasOwnProperty("type") && a.hasOwnProperty("value") ? t.push(a) : t.push({ type: "text", value: a }));
|
|
482
|
+
return t;
|
|
483
|
+
}
|
|
484
|
+
}, Ce = Symbol("SavePoint");
|
|
485
|
+
class We {
|
|
486
|
+
fields = be(/* @__PURE__ */ new Map());
|
|
487
|
+
children;
|
|
488
|
+
registerField(n) {
|
|
489
|
+
const t = new Dt({
|
|
490
|
+
getCurrentValue: n.getCurrentValue,
|
|
491
|
+
setCurrentValue: n.setCurrentValue,
|
|
492
|
+
compare: n.compare
|
|
493
|
+
});
|
|
494
|
+
return Z(n.field, (a) => {
|
|
495
|
+
a && this.fields.set(a, t);
|
|
496
|
+
}), t;
|
|
497
|
+
}
|
|
498
|
+
unregisterField(n) {
|
|
499
|
+
n.value && this.fields.delete(n.value);
|
|
500
|
+
}
|
|
501
|
+
addChild(n) {
|
|
502
|
+
this.children || (this.children = []), this.children.push(n);
|
|
503
|
+
}
|
|
504
|
+
removeChild(n) {
|
|
505
|
+
if (this.children) {
|
|
506
|
+
const t = this.children.findIndex((a) => a === n);
|
|
507
|
+
t >= 0 && this.children.splice(t, 1);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
set() {
|
|
511
|
+
this.fields.forEach((n) => n.saveValue()), this.children?.forEach((n) => n.set());
|
|
512
|
+
}
|
|
513
|
+
async setNextTick() {
|
|
514
|
+
await ge(), this.set();
|
|
515
|
+
}
|
|
516
|
+
rollback() {
|
|
517
|
+
this.fields.forEach((n) => n.rollbackValue()), this.children?.forEach((n) => n.rollback());
|
|
518
|
+
}
|
|
519
|
+
isModified() {
|
|
520
|
+
return Array.from(this.fields.values()).find((n) => n.isFieldModified()) ? !0 : this.children ? !!this.children.find((n) => n.isModified()) : !1;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const ga = () => {
|
|
524
|
+
const e = new We();
|
|
525
|
+
return ye(Ce, e), e;
|
|
526
|
+
}, pe = new We(), te = () => {
|
|
527
|
+
const e = re(Ce, pe);
|
|
528
|
+
return e === pe ? void 0 : e;
|
|
529
|
+
}, pa = () => {
|
|
530
|
+
ye(Ce, pe);
|
|
531
|
+
};
|
|
532
|
+
class Dt {
|
|
533
|
+
saved = !1;
|
|
534
|
+
savedValue = at();
|
|
535
|
+
valueProvider;
|
|
536
|
+
constructor(n) {
|
|
537
|
+
this.valueProvider = n;
|
|
538
|
+
}
|
|
539
|
+
saveValue() {
|
|
540
|
+
this.savedValue.value = this.valueProvider.getCurrentValue(), this.saved = !0;
|
|
541
|
+
}
|
|
542
|
+
getSavedValue() {
|
|
543
|
+
return this.savedValue.value;
|
|
544
|
+
}
|
|
545
|
+
rollbackValue() {
|
|
546
|
+
this.saved && this.valueProvider.setCurrentValue(this.savedValue.value);
|
|
547
|
+
}
|
|
548
|
+
isModified(n) {
|
|
549
|
+
return this.saved && (this.valueProvider.compare ? !this.valueProvider.compare(this.savedValue.value, n) : this.savedValue?.value !== n);
|
|
550
|
+
}
|
|
551
|
+
isFieldModified() {
|
|
552
|
+
return this.isModified(this.valueProvider.getCurrentValue());
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
const Tt = { key: 0 }, Ft = ["textContent"], le = /* @__PURE__ */ z({
|
|
556
|
+
__name: "ValidationErrors",
|
|
557
|
+
props: {
|
|
558
|
+
errors: {},
|
|
559
|
+
hideErrorMessage: { type: Boolean }
|
|
560
|
+
},
|
|
561
|
+
setup(e) {
|
|
562
|
+
return (n, t) => !e.hideErrorMessage && e.errors && e.errors.length > 0 ? (d(), p("div", Tt, [
|
|
563
|
+
(d(!0), p(K, null, J(e.errors, (a) => (d(), p("div", {
|
|
564
|
+
key: a.code,
|
|
565
|
+
textContent: F(a.message),
|
|
566
|
+
class: "bs-field-error"
|
|
567
|
+
}, null, 8, Ft))), 128))
|
|
568
|
+
])) : q("", !0);
|
|
569
|
+
}
|
|
570
|
+
}), Ge = Symbol("FieldContext"), ba = (e) => {
|
|
571
|
+
ye(Ge, e);
|
|
572
|
+
}, Be = {}, ie = () => {
|
|
573
|
+
const e = re(Ge, Be);
|
|
574
|
+
return e === Be ? void 0 : e;
|
|
575
|
+
}, Ot = ["textContent"], qt = { class: "font-icon" }, Ht = ["src", "alt"], W = /* @__PURE__ */ z({
|
|
576
|
+
__name: "BSPrefixSuffix",
|
|
577
|
+
props: {
|
|
578
|
+
value: {},
|
|
579
|
+
type: {}
|
|
580
|
+
},
|
|
581
|
+
setup(e) {
|
|
582
|
+
const n = e, t = S(() => j.getPrefixSuffixList(n.value));
|
|
583
|
+
return (a, u) => (d(!0), p(K, null, J(t.value, (s) => (d(), p(K, null, [
|
|
584
|
+
s.type === "text" ? (d(), p("span", {
|
|
585
|
+
textContent: F(s.value),
|
|
586
|
+
key: JSON.stringify(s.value),
|
|
587
|
+
class: O(e.type)
|
|
588
|
+
}, null, 10, Ot)) : s.type === "font-icon" ? (d(), p("span", {
|
|
589
|
+
key: 1,
|
|
590
|
+
class: O(e.type)
|
|
591
|
+
}, [
|
|
592
|
+
I("span", qt, F(s.value), 1)
|
|
593
|
+
], 2)) : s.type === "image-url" ? (d(), p("span", {
|
|
594
|
+
key: 2,
|
|
595
|
+
class: O(e.type)
|
|
596
|
+
}, [
|
|
597
|
+
I("img", {
|
|
598
|
+
src: s.value,
|
|
599
|
+
alt: e.type
|
|
600
|
+
}, null, 8, Ht)
|
|
601
|
+
], 2)) : q("", !0)
|
|
602
|
+
], 64))), 256));
|
|
603
|
+
}
|
|
604
|
+
}), Rt = {
|
|
605
|
+
key: 0,
|
|
606
|
+
class: "view-mode"
|
|
607
|
+
}, Nt = ["textContent"], zt = {
|
|
608
|
+
key: 1,
|
|
609
|
+
class: "input-area"
|
|
610
|
+
}, At = ["id", "placeholder", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"], xa = /* @__PURE__ */ z({
|
|
611
|
+
__name: "BSTextInput",
|
|
612
|
+
props: {
|
|
613
|
+
id: {},
|
|
614
|
+
placeholder: {},
|
|
615
|
+
name: { default: () => j.generateNextName("textInput") },
|
|
616
|
+
modelValue: {},
|
|
617
|
+
maxlength: {},
|
|
618
|
+
disabled: { type: Boolean },
|
|
619
|
+
forceValidateWhenDisabled: { type: Boolean },
|
|
620
|
+
viewMode: { type: Boolean },
|
|
621
|
+
width: { default: "200px" },
|
|
622
|
+
autocomplete: {},
|
|
623
|
+
tabindex: { default: 0 },
|
|
624
|
+
inputType: { default: "text" },
|
|
625
|
+
trimValue: { type: Boolean, default: !0 },
|
|
626
|
+
prefix: {},
|
|
627
|
+
suffix: {},
|
|
628
|
+
required: { type: Boolean },
|
|
629
|
+
minLength: {},
|
|
630
|
+
maxLength: {},
|
|
631
|
+
regExp: {},
|
|
632
|
+
validationMessageRequired: {},
|
|
633
|
+
validationMessageMinLength: {},
|
|
634
|
+
validationMessageMaxLength: {},
|
|
635
|
+
validationMessageBetweenLength: {},
|
|
636
|
+
validationMessageRegExp: {},
|
|
637
|
+
extraValidationRules: {},
|
|
638
|
+
ignoreSavePoint: { type: Boolean },
|
|
639
|
+
hideErrorMessage: { type: Boolean },
|
|
640
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
641
|
+
},
|
|
642
|
+
emits: ["update:modelValue"],
|
|
643
|
+
setup(e, { emit: n }) {
|
|
644
|
+
const t = e, a = n;
|
|
645
|
+
Z(
|
|
646
|
+
() => t.modelValue,
|
|
647
|
+
() => {
|
|
648
|
+
w.value = h(t.modelValue), i(t.modelValue || "", "change");
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
const u = $(), s = ie(), m = async (l, v) => {
|
|
652
|
+
const o = [], r = l ?? "";
|
|
653
|
+
return we(
|
|
654
|
+
r,
|
|
655
|
+
t.required,
|
|
656
|
+
t.validationMessageRequired,
|
|
657
|
+
o
|
|
658
|
+
) || Bt(
|
|
659
|
+
r,
|
|
660
|
+
t.regExp,
|
|
661
|
+
t.validationMessageRegExp,
|
|
662
|
+
o
|
|
663
|
+
) || Ze(
|
|
664
|
+
r,
|
|
665
|
+
t.minLength,
|
|
666
|
+
t.validationMessageMinLength,
|
|
667
|
+
t.maxLength,
|
|
668
|
+
t.validationMessageMaxLength,
|
|
669
|
+
t.validationMessageBetweenLength,
|
|
670
|
+
o
|
|
671
|
+
) || await oe(
|
|
672
|
+
r,
|
|
673
|
+
t.extraValidationRules,
|
|
674
|
+
o,
|
|
675
|
+
v,
|
|
676
|
+
s
|
|
677
|
+
), o;
|
|
678
|
+
}, f = (l) => String(
|
|
679
|
+
j.trimStringValue(l, t.trimValue) || ""
|
|
680
|
+
), h = (l) => j.trimStringValue(l, t.trimValue) ?? "", B = S(
|
|
681
|
+
() => t.viewMode || t.disabled && !t.forceValidateWhenDisabled
|
|
682
|
+
), {
|
|
683
|
+
stringValue: w,
|
|
684
|
+
errors: C,
|
|
685
|
+
handleInput: b,
|
|
686
|
+
handleFocus: y,
|
|
687
|
+
handleBlur: x,
|
|
688
|
+
validateValue: i
|
|
689
|
+
} = ae({
|
|
690
|
+
field: u,
|
|
691
|
+
disabled: B,
|
|
692
|
+
initialValue: t.modelValue,
|
|
693
|
+
isValid: m,
|
|
694
|
+
convertToValue: f,
|
|
695
|
+
convertFromValue: h
|
|
696
|
+
}), g = {
|
|
697
|
+
input: b,
|
|
698
|
+
focus: y,
|
|
699
|
+
blur: x,
|
|
700
|
+
change: () => {
|
|
701
|
+
a("update:modelValue", f(w.value));
|
|
702
|
+
}
|
|
703
|
+
}, k = t.ignoreSavePoint ? void 0 : te(), P = k?.registerField({
|
|
704
|
+
field: u,
|
|
705
|
+
getCurrentValue: () => t.modelValue || "",
|
|
706
|
+
setCurrentValue: (l) => a("update:modelValue", l || "")
|
|
707
|
+
}), c = S(
|
|
708
|
+
() => !!P?.isModified(t.modelValue || "")
|
|
709
|
+
);
|
|
710
|
+
return _(() => k?.unregisterField(u)), (l, v) => (d(), p("div", {
|
|
711
|
+
class: O([{ required: e.required, disabled: e.disabled, modified: c.value, error: D(C).length > 0 }, "bs-text-input"]),
|
|
712
|
+
style: ue({ width: e.width })
|
|
713
|
+
}, [
|
|
714
|
+
e.viewMode ? (d(), p("div", Rt, [
|
|
715
|
+
U(W, {
|
|
716
|
+
value: e.prefix,
|
|
717
|
+
type: "prefix"
|
|
718
|
+
}, null, 8, ["value"]),
|
|
719
|
+
I("span", {
|
|
720
|
+
textContent: F(D(w))
|
|
721
|
+
}, null, 8, Nt),
|
|
722
|
+
U(W, {
|
|
723
|
+
value: e.suffix,
|
|
724
|
+
type: "suffix"
|
|
725
|
+
}, null, 8, ["value"])
|
|
726
|
+
])) : (d(), p("div", zt, [
|
|
727
|
+
U(W, {
|
|
728
|
+
value: e.prefix,
|
|
729
|
+
type: "prefix"
|
|
730
|
+
}, null, 8, ["value"]),
|
|
731
|
+
Q(I("input", de({
|
|
732
|
+
id: e.id,
|
|
733
|
+
ref_key: "field",
|
|
734
|
+
ref: u,
|
|
735
|
+
"onUpdate:modelValue": v[0] || (v[0] = (o) => Oe(w) ? w.value = o : null),
|
|
736
|
+
placeholder: e.placeholder,
|
|
737
|
+
autocomplete: e.autocomplete,
|
|
738
|
+
disabled: e.disabled,
|
|
739
|
+
maxlength: e.maxlength,
|
|
740
|
+
name: e.name,
|
|
741
|
+
tabindex: e.tabindex,
|
|
742
|
+
type: e.inputType
|
|
743
|
+
}, ce(g, !0)), null, 16, At), [
|
|
744
|
+
[ot, D(w)]
|
|
745
|
+
]),
|
|
746
|
+
U(W, {
|
|
747
|
+
value: e.suffix,
|
|
748
|
+
type: "suffix"
|
|
749
|
+
}, null, 8, ["value"])
|
|
750
|
+
])),
|
|
751
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
752
|
+
key: 2,
|
|
753
|
+
errors: D(C),
|
|
754
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
755
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
756
|
+
], 6));
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
function Je(e) {
|
|
760
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
761
|
+
}
|
|
762
|
+
var ve = { exports: {} }, Yt = ve.exports, Ee;
|
|
763
|
+
function Ut() {
|
|
764
|
+
return Ee || (Ee = 1, (function(e, n) {
|
|
765
|
+
(function(t, a) {
|
|
766
|
+
e.exports = a();
|
|
767
|
+
})(Yt, (function() {
|
|
768
|
+
var t = "minute", a = /[+-]\d\d(?::?\d\d)?/g, u = /([+-]|\d\d)/g;
|
|
769
|
+
return function(s, m, f) {
|
|
770
|
+
var h = m.prototype;
|
|
771
|
+
f.utc = function(i) {
|
|
772
|
+
var g = { date: i, utc: !0, args: arguments };
|
|
773
|
+
return new m(g);
|
|
774
|
+
}, h.utc = function(i) {
|
|
775
|
+
var g = f(this.toDate(), { locale: this.$L, utc: !0 });
|
|
776
|
+
return i ? g.add(this.utcOffset(), t) : g;
|
|
777
|
+
}, h.local = function() {
|
|
778
|
+
return f(this.toDate(), { locale: this.$L, utc: !1 });
|
|
779
|
+
};
|
|
780
|
+
var B = h.parse;
|
|
781
|
+
h.parse = function(i) {
|
|
782
|
+
i.utc && (this.$u = !0), this.$utils().u(i.$offset) || (this.$offset = i.$offset), B.call(this, i);
|
|
783
|
+
};
|
|
784
|
+
var w = h.init;
|
|
785
|
+
h.init = function() {
|
|
786
|
+
if (this.$u) {
|
|
787
|
+
var i = this.$d;
|
|
788
|
+
this.$y = i.getUTCFullYear(), this.$M = i.getUTCMonth(), this.$D = i.getUTCDate(), this.$W = i.getUTCDay(), this.$H = i.getUTCHours(), this.$m = i.getUTCMinutes(), this.$s = i.getUTCSeconds(), this.$ms = i.getUTCMilliseconds();
|
|
789
|
+
} else w.call(this);
|
|
790
|
+
};
|
|
791
|
+
var C = h.utcOffset;
|
|
792
|
+
h.utcOffset = function(i, g) {
|
|
793
|
+
var k = this.$utils().u;
|
|
794
|
+
if (k(i)) return this.$u ? 0 : k(this.$offset) ? C.call(this) : this.$offset;
|
|
795
|
+
if (typeof i == "string" && (i = (function(v) {
|
|
796
|
+
v === void 0 && (v = "");
|
|
797
|
+
var o = v.match(a);
|
|
798
|
+
if (!o) return null;
|
|
799
|
+
var r = ("" + o[0]).match(u) || ["-", 0, 0], V = r[0], E = 60 * +r[1] + +r[2];
|
|
800
|
+
return E === 0 ? 0 : V === "+" ? E : -E;
|
|
801
|
+
})(i), i === null)) return this;
|
|
802
|
+
var P = Math.abs(i) <= 16 ? 60 * i : i;
|
|
803
|
+
if (P === 0) return this.utc(g);
|
|
804
|
+
var c = this.clone();
|
|
805
|
+
if (g) return c.$offset = P, c.$u = !1, c;
|
|
806
|
+
var l = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
807
|
+
return (c = this.local().add(P + l, t)).$offset = P, c.$x.$localOffset = l, c;
|
|
808
|
+
};
|
|
809
|
+
var b = h.format;
|
|
810
|
+
h.format = function(i) {
|
|
811
|
+
var g = i || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
812
|
+
return b.call(this, g);
|
|
813
|
+
}, h.valueOf = function() {
|
|
814
|
+
var i = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
815
|
+
return this.$d.valueOf() - 6e4 * i;
|
|
816
|
+
}, h.isUTC = function() {
|
|
817
|
+
return !!this.$u;
|
|
818
|
+
}, h.toISOString = function() {
|
|
819
|
+
return this.toDate().toISOString();
|
|
820
|
+
}, h.toString = function() {
|
|
821
|
+
return this.toDate().toUTCString();
|
|
822
|
+
};
|
|
823
|
+
var y = h.toDate;
|
|
824
|
+
h.toDate = function(i) {
|
|
825
|
+
return i === "s" && this.$offset ? f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
|
|
826
|
+
};
|
|
827
|
+
var x = h.diff;
|
|
828
|
+
h.diff = function(i, g, k) {
|
|
829
|
+
if (i && this.$u === i.$u) return x.call(this, i, g, k);
|
|
830
|
+
var P = this.local(), c = f(i).local();
|
|
831
|
+
return x.call(P, c, g, k);
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
}));
|
|
835
|
+
})(ve)), ve.exports;
|
|
836
|
+
}
|
|
837
|
+
var Kt = Ut();
|
|
838
|
+
const jt = /* @__PURE__ */ Je(Kt);
|
|
839
|
+
var fe = { exports: {} }, Zt = fe.exports, Ie;
|
|
840
|
+
function Wt() {
|
|
841
|
+
return Ie || (Ie = 1, (function(e, n) {
|
|
842
|
+
(function(t, a) {
|
|
843
|
+
e.exports = a();
|
|
844
|
+
})(Zt, (function() {
|
|
845
|
+
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
846
|
+
return function(u, s, m) {
|
|
847
|
+
var f, h = function(b, y, x) {
|
|
848
|
+
x === void 0 && (x = {});
|
|
849
|
+
var i = new Date(b), g = (function(k, P) {
|
|
850
|
+
P === void 0 && (P = {});
|
|
851
|
+
var c = P.timeZoneName || "short", l = k + "|" + c, v = a[l];
|
|
852
|
+
return v || (v = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: k, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: c }), a[l] = v), v;
|
|
853
|
+
})(y, x);
|
|
854
|
+
return g.formatToParts(i);
|
|
855
|
+
}, B = function(b, y) {
|
|
856
|
+
for (var x = h(b, y), i = [], g = 0; g < x.length; g += 1) {
|
|
857
|
+
var k = x[g], P = k.type, c = k.value, l = t[P];
|
|
858
|
+
l >= 0 && (i[l] = parseInt(c, 10));
|
|
859
|
+
}
|
|
860
|
+
var v = i[3], o = v === 24 ? 0 : v, r = i[0] + "-" + i[1] + "-" + i[2] + " " + o + ":" + i[4] + ":" + i[5] + ":000", V = +b;
|
|
861
|
+
return (m.utc(r).valueOf() - (V -= V % 1e3)) / 6e4;
|
|
862
|
+
}, w = s.prototype;
|
|
863
|
+
w.tz = function(b, y) {
|
|
864
|
+
b === void 0 && (b = f);
|
|
865
|
+
var x, i = this.utcOffset(), g = this.toDate(), k = g.toLocaleString("en-US", { timeZone: b }), P = Math.round((g - new Date(k)) / 1e3 / 60), c = 15 * -Math.round(g.getTimezoneOffset() / 15) - P;
|
|
866
|
+
if (!Number(c)) x = this.utcOffset(0, y);
|
|
867
|
+
else if (x = m(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(c, !0), y) {
|
|
868
|
+
var l = x.utcOffset();
|
|
869
|
+
x = x.add(i - l, "minute");
|
|
870
|
+
}
|
|
871
|
+
return x.$x.$timezone = b, x;
|
|
872
|
+
}, w.offsetName = function(b) {
|
|
873
|
+
var y = this.$x.$timezone || m.tz.guess(), x = h(this.valueOf(), y, { timeZoneName: b }).find((function(i) {
|
|
874
|
+
return i.type.toLowerCase() === "timezonename";
|
|
875
|
+
}));
|
|
876
|
+
return x && x.value;
|
|
877
|
+
};
|
|
878
|
+
var C = w.startOf;
|
|
879
|
+
w.startOf = function(b, y) {
|
|
880
|
+
if (!this.$x || !this.$x.$timezone) return C.call(this, b, y);
|
|
881
|
+
var x = m(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
882
|
+
return C.call(x, b, y).tz(this.$x.$timezone, !0);
|
|
883
|
+
}, m.tz = function(b, y, x) {
|
|
884
|
+
var i = x && y, g = x || y || f, k = B(+m(), g);
|
|
885
|
+
if (typeof b != "string") return m(b).tz(g);
|
|
886
|
+
var P = (function(o, r, V) {
|
|
887
|
+
var E = o - 60 * r * 1e3, Y = B(E, V);
|
|
888
|
+
if (r === Y) return [E, r];
|
|
889
|
+
var M = B(E -= 60 * (Y - r) * 1e3, V);
|
|
890
|
+
return Y === M ? [E, Y] : [o - 60 * Math.min(Y, M) * 1e3, Math.max(Y, M)];
|
|
891
|
+
})(m.utc(b, i).valueOf(), k, g), c = P[0], l = P[1], v = m(c).utcOffset(l);
|
|
892
|
+
return v.$x.$timezone = g, v;
|
|
893
|
+
}, m.tz.guess = function() {
|
|
894
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
895
|
+
}, m.tz.setDefault = function(b) {
|
|
896
|
+
f = b;
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
}));
|
|
900
|
+
})(fe)), fe.exports;
|
|
901
|
+
}
|
|
902
|
+
var Gt = Wt();
|
|
903
|
+
const Jt = /* @__PURE__ */ Je(Gt);
|
|
904
|
+
Re.extend(jt);
|
|
905
|
+
Re.extend(Jt);
|
|
906
|
+
const Xt = (e, n = 2) => {
|
|
907
|
+
const t = Math.pow(10, n);
|
|
908
|
+
return Math.round(e * t) / t;
|
|
909
|
+
}, Qt = {
|
|
910
|
+
/**
|
|
911
|
+
* 개행 문자('\r', '\n')를 '<br/>' 태그로 변경한다.
|
|
912
|
+
* @param str 변경할 String
|
|
913
|
+
* @return 개행문자가 '<br/>'로 변경된 String
|
|
914
|
+
*/
|
|
915
|
+
escapeNewLine(e) {
|
|
916
|
+
return e ? e.replace(/\r\n|\r|\n/g, "<br />") : "";
|
|
917
|
+
},
|
|
918
|
+
/**
|
|
919
|
+
* `str` 안의 `&<>"'` 문자를 escape 처리한다.
|
|
920
|
+
* @param str 변경할 String
|
|
921
|
+
*/
|
|
922
|
+
escapeHtml(e) {
|
|
923
|
+
return e ? e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
924
|
+
},
|
|
925
|
+
/**
|
|
926
|
+
* String 을 개행 문자('\r', '\n') 기준으로 나눈다.
|
|
927
|
+
* @param str
|
|
928
|
+
* @return 개행문자로 나누어진 string 의 array
|
|
929
|
+
*/
|
|
930
|
+
splitNewLine(e) {
|
|
931
|
+
return e ? e.split(/\r\n|\r|\n/g) : [];
|
|
932
|
+
},
|
|
933
|
+
/**
|
|
934
|
+
* ISO8601 형식의 string 을 주어진 format 으로 변환한다.
|
|
935
|
+
* @param utcDate
|
|
936
|
+
* @param format
|
|
937
|
+
* @param displayTimeZone
|
|
938
|
+
*/
|
|
939
|
+
// formatDateString(utcDate?: string, format?: string | DisplayDateResolution, displayTimeZone?: TimeZone) {
|
|
940
|
+
// return utcDate
|
|
941
|
+
// ? dayjs(utcDate)
|
|
942
|
+
// .tz(displayTimeZone || blueseaConfig.timeZone)
|
|
943
|
+
// .format(blueseaConfig.resolveDisplayDateFormat(format))
|
|
944
|
+
// : ''
|
|
945
|
+
// },
|
|
946
|
+
/**
|
|
947
|
+
* 숫자에 구분점을 넣는다. 소수점 이하가 있는 경우도 처리한다.
|
|
948
|
+
* * 12345 -> '12,345'
|
|
949
|
+
* * 12345.12345 -> '12,345.12345'
|
|
950
|
+
* * 0 -> '0'
|
|
951
|
+
* * undefined -> null
|
|
952
|
+
* * null -> null
|
|
953
|
+
*
|
|
954
|
+
* @param value
|
|
955
|
+
* @return
|
|
956
|
+
*/
|
|
957
|
+
formatNumber(e) {
|
|
958
|
+
if (e || typeof e == "number") {
|
|
959
|
+
const n = /\B(?=(\d{3})+(?!\d))/g, t = e.toString().split("."), a = t[0].replace(n, ","), u = t[1] ? `.${t[1]}` : "";
|
|
960
|
+
return a + u;
|
|
961
|
+
}
|
|
962
|
+
return null;
|
|
963
|
+
},
|
|
964
|
+
formatNumberByCode(e, n) {
|
|
965
|
+
return typeof e > "u" ? null : e || typeof e == "number" ? e.toLocaleString(n) : null;
|
|
966
|
+
},
|
|
967
|
+
/**
|
|
968
|
+
* 통화단위와 표시위치를 받아 출력한다
|
|
969
|
+
* @param value 값
|
|
970
|
+
* @param currencyUnit 통화단위
|
|
971
|
+
* @param prefix true 이면 withUnit을 앞에 붙이고, false 이면 뒤에 붙인다.
|
|
972
|
+
*/
|
|
973
|
+
formatPrice(e, n, t = !1) {
|
|
974
|
+
if (e || typeof e == "number") {
|
|
975
|
+
const a = this.formatNumber(e);
|
|
976
|
+
return t ? `${n} ${a}` : `${a} ${n}`;
|
|
977
|
+
}
|
|
978
|
+
return null;
|
|
979
|
+
},
|
|
980
|
+
/**
|
|
981
|
+
* rate 를 받아 percent 를 출력한다.
|
|
982
|
+
* * 0.1 -> 10%
|
|
983
|
+
* * 0.55 -> 55%
|
|
984
|
+
* * 0.551 -> 55.1%
|
|
985
|
+
* @param value 비율 값
|
|
986
|
+
* @param withUnit true 이면 % 를 붙이고, false 이면 붙이지 않는다.
|
|
987
|
+
* @param decimalPlace 소숫점 n번째에서 반올림한다.
|
|
988
|
+
*/
|
|
989
|
+
formatPercent(e, n = !0, t = 2) {
|
|
990
|
+
return e != null && !isNaN(Number(e)) ? `${Xt(Number(e) * 100, t)}${n ? "%" : ""}` : null;
|
|
991
|
+
},
|
|
992
|
+
/**
|
|
993
|
+
* 신용카드번호를 4자리 단위로 나누어 구분자를 넣는다.
|
|
994
|
+
* @param value
|
|
995
|
+
* @param separator 구분자
|
|
996
|
+
*/
|
|
997
|
+
formatCreditCardNo(e, n = "-") {
|
|
998
|
+
return e.match(/.{1,4}/g)?.join(n);
|
|
999
|
+
},
|
|
1000
|
+
/**
|
|
1001
|
+
* `HTML`태그가 포함된 문자열에서 text 만 남긴다.
|
|
1002
|
+
* @param textIncludedHTMLElement HTML 태그를 포함하는 문자열
|
|
1003
|
+
* @return HTML 태그가 제거된 문자열
|
|
1004
|
+
*/
|
|
1005
|
+
toPlainText(e) {
|
|
1006
|
+
const n = document.createElement("DIV");
|
|
1007
|
+
return n.innerHTML = e || "", n.textContent || n.innerText;
|
|
1008
|
+
}
|
|
1009
|
+
}, _t = {
|
|
1010
|
+
key: 0,
|
|
1011
|
+
class: "view-mode"
|
|
1012
|
+
}, en = ["textContent"], tn = {
|
|
1013
|
+
key: 1,
|
|
1014
|
+
class: "input-area"
|
|
1015
|
+
}, nn = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"], ya = /* @__PURE__ */ z({
|
|
1016
|
+
__name: "BSNumberInput",
|
|
1017
|
+
props: {
|
|
1018
|
+
id: {},
|
|
1019
|
+
placeholder: {},
|
|
1020
|
+
name: {},
|
|
1021
|
+
modelValue: {},
|
|
1022
|
+
maxlength: {},
|
|
1023
|
+
disabled: { type: Boolean },
|
|
1024
|
+
viewMode: { type: Boolean },
|
|
1025
|
+
width: { default: "200px" },
|
|
1026
|
+
autocomplete: {},
|
|
1027
|
+
tabindex: { default: 0 },
|
|
1028
|
+
prefix: {},
|
|
1029
|
+
suffix: {},
|
|
1030
|
+
format: { type: Boolean, default: !0 },
|
|
1031
|
+
formatInViewMode: { type: Boolean, default: !0 },
|
|
1032
|
+
formatOnBlur: { type: Boolean, default: !0 },
|
|
1033
|
+
required: { type: Boolean },
|
|
1034
|
+
minValue: {},
|
|
1035
|
+
maxValue: {},
|
|
1036
|
+
validationMessageRequired: {},
|
|
1037
|
+
validationMessageMinValue: {},
|
|
1038
|
+
validationMessageMaxValue: {},
|
|
1039
|
+
validationMessageBetweenValue: {},
|
|
1040
|
+
extraValidationRules: {},
|
|
1041
|
+
ignoreSavePoint: { type: Boolean },
|
|
1042
|
+
hideErrorMessage: { type: Boolean },
|
|
1043
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1044
|
+
},
|
|
1045
|
+
emits: ["update:modelValue"],
|
|
1046
|
+
setup(e, { emit: n }) {
|
|
1047
|
+
const t = e, a = n, u = (r) => r.replace(/[^\d-\\.,]/g, "");
|
|
1048
|
+
Z(
|
|
1049
|
+
() => t.modelValue,
|
|
1050
|
+
() => {
|
|
1051
|
+
y.value = C(t.modelValue), P(t.modelValue, "change");
|
|
1052
|
+
}
|
|
1053
|
+
);
|
|
1054
|
+
const s = $(), m = $(!1), f = S(
|
|
1055
|
+
() => t.format ? Qt.formatNumber(y.value) || "" : y.value || ""
|
|
1056
|
+
), h = ie(), B = async (r, V) => {
|
|
1057
|
+
const E = [];
|
|
1058
|
+
return we(
|
|
1059
|
+
r,
|
|
1060
|
+
t.required,
|
|
1061
|
+
t.validationMessageRequired,
|
|
1062
|
+
E
|
|
1063
|
+
) || r !== void 0 && Et(
|
|
1064
|
+
r,
|
|
1065
|
+
t.minValue,
|
|
1066
|
+
t.validationMessageMinValue,
|
|
1067
|
+
t.maxValue,
|
|
1068
|
+
t.validationMessageMaxValue,
|
|
1069
|
+
t.validationMessageBetweenValue,
|
|
1070
|
+
E
|
|
1071
|
+
) || await oe(
|
|
1072
|
+
r,
|
|
1073
|
+
t.extraValidationRules,
|
|
1074
|
+
E,
|
|
1075
|
+
V,
|
|
1076
|
+
h
|
|
1077
|
+
), E;
|
|
1078
|
+
}, w = (r) => {
|
|
1079
|
+
if (!r) return;
|
|
1080
|
+
const V = Number(r);
|
|
1081
|
+
return isNaN(V) ? void 0 : V;
|
|
1082
|
+
}, C = (r) => r !== void 0 ? String(r) : "", b = S(() => t.viewMode || t.disabled), {
|
|
1083
|
+
stringValue: y,
|
|
1084
|
+
errors: x,
|
|
1085
|
+
handleInput: i,
|
|
1086
|
+
handleFocus: g,
|
|
1087
|
+
handleBlur: k,
|
|
1088
|
+
validateValue: P
|
|
1089
|
+
} = ae({
|
|
1090
|
+
field: s,
|
|
1091
|
+
disabled: b,
|
|
1092
|
+
initialValue: t.modelValue,
|
|
1093
|
+
isValid: B,
|
|
1094
|
+
convertToValue: w,
|
|
1095
|
+
convertFromValue: C
|
|
1096
|
+
}), c = {
|
|
1097
|
+
input: async (r) => {
|
|
1098
|
+
y.value = u(
|
|
1099
|
+
r.target.value
|
|
1100
|
+
), await i(r);
|
|
1101
|
+
},
|
|
1102
|
+
focus: (r) => {
|
|
1103
|
+
m.value = !0, g(r);
|
|
1104
|
+
},
|
|
1105
|
+
blur: (r) => {
|
|
1106
|
+
m.value = !1, k(r);
|
|
1107
|
+
},
|
|
1108
|
+
change: () => {
|
|
1109
|
+
a("update:modelValue", w(y.value));
|
|
1110
|
+
}
|
|
1111
|
+
}, l = t.ignoreSavePoint ? void 0 : te(), v = l?.registerField({
|
|
1112
|
+
field: s,
|
|
1113
|
+
getCurrentValue: () => t.modelValue,
|
|
1114
|
+
setCurrentValue: (r) => a("update:modelValue", r)
|
|
1115
|
+
}), o = S(
|
|
1116
|
+
() => !!v?.isModified(t.modelValue)
|
|
1117
|
+
);
|
|
1118
|
+
return _(() => l?.unregisterField(s)), (r, V) => {
|
|
1119
|
+
const E = lt("t");
|
|
1120
|
+
return d(), p("div", {
|
|
1121
|
+
class: O([{ required: e.required, disabled: e.disabled, modified: o.value, error: D(x).length > 0 }, "bs-number-input"]),
|
|
1122
|
+
style: ue({ width: e.width })
|
|
1123
|
+
}, [
|
|
1124
|
+
e.viewMode ? (d(), p("div", _t, [
|
|
1125
|
+
U(W, {
|
|
1126
|
+
value: e.prefix,
|
|
1127
|
+
type: "prefix"
|
|
1128
|
+
}, null, 8, ["value"]),
|
|
1129
|
+
I("span", {
|
|
1130
|
+
textContent: F(e.formatInViewMode ? f.value : D(y))
|
|
1131
|
+
}, null, 8, en),
|
|
1132
|
+
U(W, {
|
|
1133
|
+
value: e.suffix,
|
|
1134
|
+
type: "suffix"
|
|
1135
|
+
}, null, 8, ["value"])
|
|
1136
|
+
])) : (d(), p("div", tn, [
|
|
1137
|
+
U(W, {
|
|
1138
|
+
value: e.prefix,
|
|
1139
|
+
type: "prefix"
|
|
1140
|
+
}, null, 8, ["value"]),
|
|
1141
|
+
Q(I("input", de({
|
|
1142
|
+
id: e.id,
|
|
1143
|
+
ref_key: "field",
|
|
1144
|
+
ref: s,
|
|
1145
|
+
autocomplete: e.autocomplete,
|
|
1146
|
+
disabled: e.disabled,
|
|
1147
|
+
maxlength: e.maxlength,
|
|
1148
|
+
name: e.name,
|
|
1149
|
+
tabindex: e.tabindex,
|
|
1150
|
+
value: m.value || !e.formatOnBlur ? D(y) : f.value,
|
|
1151
|
+
type: "text"
|
|
1152
|
+
}, ce(c, !0)), null, 16, nn), [
|
|
1153
|
+
[
|
|
1154
|
+
E,
|
|
1155
|
+
e.placeholder,
|
|
1156
|
+
void 0,
|
|
1157
|
+
{ placeholder: !0 }
|
|
1158
|
+
]
|
|
1159
|
+
]),
|
|
1160
|
+
U(W, {
|
|
1161
|
+
value: e.suffix,
|
|
1162
|
+
type: "suffix"
|
|
1163
|
+
}, null, 8, ["value"])
|
|
1164
|
+
])),
|
|
1165
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
1166
|
+
key: 2,
|
|
1167
|
+
errors: D(x),
|
|
1168
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
1169
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
1170
|
+
], 6);
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
}), an = {
|
|
1174
|
+
key: 0,
|
|
1175
|
+
class: "view-mode bs-layout-horizontal gap-8 align-items-start"
|
|
1176
|
+
}, on = ["textContent"], ln = {
|
|
1177
|
+
key: 1,
|
|
1178
|
+
class: "input-area bs-layout-horizontal align-items-start"
|
|
1179
|
+
}, sn = ["placeholder", "disabled", "maxlength", "name", "tabindex"], Va = /* @__PURE__ */ z({
|
|
1180
|
+
__name: "BSTextArea",
|
|
1181
|
+
props: {
|
|
1182
|
+
id: {},
|
|
1183
|
+
placeholder: {},
|
|
1184
|
+
name: {},
|
|
1185
|
+
modelValue: {},
|
|
1186
|
+
maxlength: {},
|
|
1187
|
+
disabled: { type: Boolean },
|
|
1188
|
+
viewMode: { type: Boolean },
|
|
1189
|
+
width: { default: "400px" },
|
|
1190
|
+
height: {},
|
|
1191
|
+
autocomplete: {},
|
|
1192
|
+
tabindex: { default: 0 },
|
|
1193
|
+
trimValue: { type: Boolean, default: !0 },
|
|
1194
|
+
prefix: {},
|
|
1195
|
+
suffix: {},
|
|
1196
|
+
required: { type: Boolean },
|
|
1197
|
+
minLength: {},
|
|
1198
|
+
maxLength: {},
|
|
1199
|
+
validationMessageRequired: {},
|
|
1200
|
+
validationMessageMinLength: {},
|
|
1201
|
+
validationMessageMaxLength: {},
|
|
1202
|
+
validationMessageBetweenLength: {},
|
|
1203
|
+
extraValidationRules: {},
|
|
1204
|
+
ignoreSavePoint: { type: Boolean },
|
|
1205
|
+
hideErrorMessage: { type: Boolean },
|
|
1206
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1207
|
+
},
|
|
1208
|
+
emits: ["update:modelValue"],
|
|
1209
|
+
setup(e, { emit: n }) {
|
|
1210
|
+
const t = e, a = n, u = (M) => String(j.trimStringValue(M, t.trimValue) || ""), s = (M) => j.trimStringValue(M, t.trimValue) ?? "";
|
|
1211
|
+
Z(
|
|
1212
|
+
() => t.modelValue,
|
|
1213
|
+
() => {
|
|
1214
|
+
w.value = s(t.modelValue), i(t.modelValue || "", "change");
|
|
1215
|
+
}
|
|
1216
|
+
);
|
|
1217
|
+
const m = $(), f = ie(), h = async (M, L) => {
|
|
1218
|
+
const H = [], T = M?.trim() ?? "";
|
|
1219
|
+
return we(T, t.required, t.validationMessageRequired, H) || Ze(
|
|
1220
|
+
T,
|
|
1221
|
+
t.minLength,
|
|
1222
|
+
t.validationMessageMinLength,
|
|
1223
|
+
t.maxLength,
|
|
1224
|
+
t.validationMessageMaxLength,
|
|
1225
|
+
t.validationMessageBetweenLength,
|
|
1226
|
+
H
|
|
1227
|
+
) || await oe(T, t.extraValidationRules, H, L, f), H;
|
|
1228
|
+
}, B = S(() => t.viewMode || t.disabled), {
|
|
1229
|
+
stringValue: w,
|
|
1230
|
+
errors: C,
|
|
1231
|
+
handleInput: b,
|
|
1232
|
+
handleFocus: y,
|
|
1233
|
+
handleBlur: x,
|
|
1234
|
+
validateValue: i
|
|
1235
|
+
} = ae({
|
|
1236
|
+
field: m,
|
|
1237
|
+
disabled: B,
|
|
1238
|
+
initialValue: t.modelValue,
|
|
1239
|
+
isValid: h,
|
|
1240
|
+
convertToValue: u,
|
|
1241
|
+
convertFromValue: s
|
|
1242
|
+
}), g = {
|
|
1243
|
+
input: b,
|
|
1244
|
+
focus: y,
|
|
1245
|
+
blur: x,
|
|
1246
|
+
change: () => {
|
|
1247
|
+
a("update:modelValue", u(w.value));
|
|
1248
|
+
}
|
|
1249
|
+
}, k = S(() => j.isRelativeSize(t.width) ? t.width : void 0), P = S(() => j.isRelativeSize(t.height) ? t.height : void 0), c = S(() => j.isRelativeSize(t.width) ? "100%" : t.width), l = S(() => V.value || (j.isRelativeSize(t.height) ? "100%" : t.height)), v = t.ignoreSavePoint ? void 0 : te(), o = v?.registerField({
|
|
1250
|
+
field: m,
|
|
1251
|
+
getCurrentValue: () => t.modelValue || "",
|
|
1252
|
+
setCurrentValue: (M) => a("update:modelValue", M || "")
|
|
1253
|
+
}), r = S(() => !!o?.isModified(t.modelValue || ""));
|
|
1254
|
+
_(() => v?.unregisterField(m));
|
|
1255
|
+
const V = $(), E = (M) => {
|
|
1256
|
+
m.value && m.value.setPointerCapture(M.pointerId);
|
|
1257
|
+
}, Y = (M) => {
|
|
1258
|
+
m.value && (V.value = `${m.value.offsetHeight}px`, m.value.releasePointerCapture(M.pointerId));
|
|
1259
|
+
};
|
|
1260
|
+
return (M, L) => (d(), p("div", {
|
|
1261
|
+
class: O([{ disabled: e.disabled, modified: r.value, error: D(C).length > 0 }, "bs-text-area"]),
|
|
1262
|
+
style: ue({ width: k.value, height: P.value })
|
|
1263
|
+
}, [
|
|
1264
|
+
e.viewMode ? (d(), p("div", an, [
|
|
1265
|
+
U(W, {
|
|
1266
|
+
value: e.prefix,
|
|
1267
|
+
type: "prefix"
|
|
1268
|
+
}, null, 8, ["value"]),
|
|
1269
|
+
I("div", {
|
|
1270
|
+
textContent: F(D(w))
|
|
1271
|
+
}, null, 8, on),
|
|
1272
|
+
U(W, {
|
|
1273
|
+
value: e.suffix,
|
|
1274
|
+
type: "suffix"
|
|
1275
|
+
}, null, 8, ["value"])
|
|
1276
|
+
])) : (d(), p("div", ln, [
|
|
1277
|
+
U(W, {
|
|
1278
|
+
value: e.prefix,
|
|
1279
|
+
type: "prefix"
|
|
1280
|
+
}, null, 8, ["value"]),
|
|
1281
|
+
Q(I("textarea", de({
|
|
1282
|
+
ref_key: "field",
|
|
1283
|
+
ref: m,
|
|
1284
|
+
"onUpdate:modelValue": L[0] || (L[0] = (H) => Oe(w) ? w.value = H : null),
|
|
1285
|
+
placeholder: e.placeholder,
|
|
1286
|
+
disabled: e.disabled,
|
|
1287
|
+
maxlength: e.maxlength,
|
|
1288
|
+
name: e.name,
|
|
1289
|
+
style: { width: c.value, height: l.value },
|
|
1290
|
+
tabindex: e.tabindex,
|
|
1291
|
+
class: "grow",
|
|
1292
|
+
onPointerdown: E,
|
|
1293
|
+
onPointerup: Y
|
|
1294
|
+
}, ce(g, !0)), null, 16, sn), [
|
|
1295
|
+
[it, D(w)]
|
|
1296
|
+
]),
|
|
1297
|
+
U(W, {
|
|
1298
|
+
value: e.suffix,
|
|
1299
|
+
type: "suffix"
|
|
1300
|
+
}, null, 8, ["value"])
|
|
1301
|
+
])),
|
|
1302
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
1303
|
+
key: 2,
|
|
1304
|
+
errors: D(C),
|
|
1305
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
1306
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
1307
|
+
], 6));
|
|
1308
|
+
}
|
|
1309
|
+
}), rn = ["id", "checked", "disabled", "name", "tabindex"], un = ["textContent", "for"], dn = ["for"], cn = /* @__PURE__ */ z({
|
|
1310
|
+
__name: "BSCheckbox",
|
|
1311
|
+
props: {
|
|
1312
|
+
id: { default: () => j.generateNextId("checkbox") },
|
|
1313
|
+
name: {},
|
|
1314
|
+
label: {},
|
|
1315
|
+
modelValue: { type: Boolean },
|
|
1316
|
+
disabled: { type: Boolean },
|
|
1317
|
+
viewMode: { type: Boolean },
|
|
1318
|
+
tabindex: { default: 0 },
|
|
1319
|
+
disableSavePoint: { type: Boolean },
|
|
1320
|
+
ignoreSavePoint: { type: Boolean }
|
|
1321
|
+
},
|
|
1322
|
+
emits: ["update:modelValue"],
|
|
1323
|
+
setup(e, { emit: n }) {
|
|
1324
|
+
const t = e, a = n, u = $(t.modelValue), s = qe(), m = S(() => !!s?.default), f = {
|
|
1325
|
+
change: (b) => {
|
|
1326
|
+
u.value = b.target.checked, t.modelValue !== u.value && a("update:modelValue", u.value);
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
Z(
|
|
1330
|
+
() => t.modelValue,
|
|
1331
|
+
() => u.value = t.modelValue
|
|
1332
|
+
);
|
|
1333
|
+
const h = $(), B = t.ignoreSavePoint ? void 0 : te(), w = B?.registerField({
|
|
1334
|
+
field: h,
|
|
1335
|
+
getCurrentValue: () => t.modelValue || !1,
|
|
1336
|
+
setCurrentValue: (b) => {
|
|
1337
|
+
t.disableSavePoint || a("update:modelValue", b || !1);
|
|
1338
|
+
}
|
|
1339
|
+
}), C = S(() => !!w?.isModified(t.modelValue));
|
|
1340
|
+
return _(() => B?.unregisterField(h)), (b, y) => (d(), p("span", {
|
|
1341
|
+
class: O([{ checked: u.value, disabled: e.disabled, modified: C.value }, "bs-checkbox"])
|
|
1342
|
+
}, [
|
|
1343
|
+
I("input", de({
|
|
1344
|
+
id: e.id,
|
|
1345
|
+
ref_key: "field",
|
|
1346
|
+
ref: h,
|
|
1347
|
+
checked: u.value,
|
|
1348
|
+
disabled: e.disabled || e.viewMode,
|
|
1349
|
+
name: e.name,
|
|
1350
|
+
tabindex: e.tabindex,
|
|
1351
|
+
class: "",
|
|
1352
|
+
type: "checkbox"
|
|
1353
|
+
}, ce(f, !0)), null, 16, rn),
|
|
1354
|
+
e.label ? (d(), p("label", {
|
|
1355
|
+
key: 0,
|
|
1356
|
+
textContent: F(e.label),
|
|
1357
|
+
for: e.id,
|
|
1358
|
+
class: "text-label"
|
|
1359
|
+
}, null, 8, un)) : q("", !0),
|
|
1360
|
+
m.value ? (d(), p("label", {
|
|
1361
|
+
key: 1,
|
|
1362
|
+
for: e.id,
|
|
1363
|
+
class: "slot-label cursor-pointer"
|
|
1364
|
+
}, [
|
|
1365
|
+
se(b.$slots, "default", { disabled: e.disabled })
|
|
1366
|
+
], 8, dn)) : q("", !0)
|
|
1367
|
+
], 2));
|
|
1368
|
+
}
|
|
1369
|
+
}), Xe = (e) => e ? typeof e == "string" ? e : String(e) : "", Qe = (e, n, t) => {
|
|
1370
|
+
if (n) {
|
|
1371
|
+
const a = n(e);
|
|
1372
|
+
if (a !== void 0)
|
|
1373
|
+
return a;
|
|
1374
|
+
}
|
|
1375
|
+
return t(e);
|
|
1376
|
+
}, Me = (e, n, t) => {
|
|
1377
|
+
if (n) {
|
|
1378
|
+
const a = n(e);
|
|
1379
|
+
if (a)
|
|
1380
|
+
return a;
|
|
1381
|
+
}
|
|
1382
|
+
return t(e);
|
|
1383
|
+
}, vn = ["data-field-name"], fn = { class: "items" }, mn = ["textContent"], wa = /* @__PURE__ */ z({
|
|
1384
|
+
__name: "BSCheckboxGroup",
|
|
1385
|
+
props: {
|
|
1386
|
+
name: {},
|
|
1387
|
+
modelValue: { default: () => [] },
|
|
1388
|
+
items: { default: () => [] },
|
|
1389
|
+
valueProvider: {},
|
|
1390
|
+
labelProvider: {},
|
|
1391
|
+
keyProvider: {},
|
|
1392
|
+
enabledItemProvider: {},
|
|
1393
|
+
tabindex: { default: 0 },
|
|
1394
|
+
disabled: { type: Boolean },
|
|
1395
|
+
viewMode: { type: Boolean },
|
|
1396
|
+
required: { type: Boolean },
|
|
1397
|
+
validationMessageRequired: {},
|
|
1398
|
+
extraValidationRules: {},
|
|
1399
|
+
ignoreSavePoint: { type: Boolean },
|
|
1400
|
+
hideErrorMessage: { type: Boolean },
|
|
1401
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1402
|
+
},
|
|
1403
|
+
emits: ["update:modelValue"],
|
|
1404
|
+
setup(e, { emit: n }) {
|
|
1405
|
+
const t = e, a = n, u = (o) => t.labelProvider ? t.labelProvider(o) : String(o), s = (o) => t.valueProvider ? t.valueProvider(o) : o, m = (o) => Me(o, t.keyProvider, () => String(s(o))), f = (o) => t.enabledItemProvider ? !t.enabledItemProvider(o) : !1, h = $({}), B = (o, r, V) => {
|
|
1406
|
+
t.items.forEach((E) => o[m(E)] = r.includes(s(E))), V && k(t.modelValue, "change");
|
|
1407
|
+
}, w = (o, r) => {
|
|
1408
|
+
const V = s(r), E = t.modelValue.includes(V);
|
|
1409
|
+
if (o && !E) {
|
|
1410
|
+
const Y = [...t.modelValue, V], M = t.items.map((L) => s(L)).filter((L) => Y.includes(L));
|
|
1411
|
+
a("update:modelValue", M);
|
|
1412
|
+
} else if (!o && E) {
|
|
1413
|
+
const Y = t.modelValue.indexOf(V), M = t.modelValue.toSpliced(Y, 1);
|
|
1414
|
+
a("update:modelValue", M);
|
|
1415
|
+
}
|
|
1416
|
+
}, C = S(() => t.items.filter((o) => t.modelValue.includes(s(o))).map(u).join(", ")), b = $(), y = ie(), x = async (o, r) => {
|
|
1417
|
+
const V = [];
|
|
1418
|
+
return t.required && (o === void 0 || o.length === 0) ? V.push({ code: "required", message: t.validationMessageRequired || "Required" }) : o !== void 0 && await oe(o, t.extraValidationRules, V, r, y), V;
|
|
1419
|
+
}, i = S(() => t.viewMode || t.disabled), { errors: g, validateValue: k } = ae({
|
|
1420
|
+
field: b,
|
|
1421
|
+
disabled: i,
|
|
1422
|
+
initialValue: t.modelValue,
|
|
1423
|
+
isValid: x
|
|
1424
|
+
}), P = (o) => {
|
|
1425
|
+
const r = {};
|
|
1426
|
+
t.items.forEach((V) => r[m(V)] = !1), B(r, t.modelValue, o), h.value = r;
|
|
1427
|
+
};
|
|
1428
|
+
Z(() => t.items, () => P(!1)), Z(
|
|
1429
|
+
() => t.modelValue,
|
|
1430
|
+
(o) => B(h.value, o, !0)
|
|
1431
|
+
), me(() => {
|
|
1432
|
+
P(!1);
|
|
1433
|
+
});
|
|
1434
|
+
const c = t.ignoreSavePoint ? void 0 : te(), l = c?.registerField({
|
|
1435
|
+
field: b,
|
|
1436
|
+
getCurrentValue: () => [...t.modelValue],
|
|
1437
|
+
setCurrentValue: (o) => a("update:modelValue", [...o || []]),
|
|
1438
|
+
compare: (o, r) => o?.toSorted().join(",") === r?.toSorted().join(",")
|
|
1439
|
+
}), v = S(() => !!l?.isModified(t.modelValue || []));
|
|
1440
|
+
return _(() => c?.unregisterField(b)), (o, r) => (d(), p("div", {
|
|
1441
|
+
ref_key: "field",
|
|
1442
|
+
ref: b,
|
|
1443
|
+
class: O([{ required: e.required, disabled: e.disabled, modified: v.value, error: D(g).length > 0 }, "bs-checkbox-group bs-layout-vertical"]),
|
|
1444
|
+
"data-field-name": e.name,
|
|
1445
|
+
role: "group"
|
|
1446
|
+
}, [
|
|
1447
|
+
I("div", fn, [
|
|
1448
|
+
e.viewMode ? (d(), p("div", {
|
|
1449
|
+
key: 0,
|
|
1450
|
+
class: "view-mode",
|
|
1451
|
+
textContent: F(C.value)
|
|
1452
|
+
}, null, 8, mn)) : (d(!0), p(K, { key: 1 }, J(e.items, (V) => (d(), R(cn, {
|
|
1453
|
+
key: m(V),
|
|
1454
|
+
disabled: e.disabled || f(V),
|
|
1455
|
+
label: u(V),
|
|
1456
|
+
"model-value": h.value[m(V)],
|
|
1457
|
+
name: `${e.name || ""}_${m(V)}`,
|
|
1458
|
+
tabindex: e.tabindex,
|
|
1459
|
+
"disable-save-point": "",
|
|
1460
|
+
"onUpdate:modelValue": (E) => w(E, V)
|
|
1461
|
+
}, null, 8, ["disabled", "label", "model-value", "name", "tabindex", "onUpdate:modelValue"]))), 128))
|
|
1462
|
+
]),
|
|
1463
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
1464
|
+
key: 0,
|
|
1465
|
+
errors: D(g),
|
|
1466
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
1467
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
1468
|
+
], 10, vn));
|
|
1469
|
+
}
|
|
1470
|
+
}), hn = ["id", "checked", "disabled", "name", "tabindex"], gn = ["for"], pn = {
|
|
1471
|
+
key: 0,
|
|
1472
|
+
class: "font-icon"
|
|
1473
|
+
}, bn = ["textContent"], xn = ["for"], yn = /* @__PURE__ */ z({
|
|
1474
|
+
__name: "BSRadioButton",
|
|
1475
|
+
props: {
|
|
1476
|
+
id: { default: () => j.generateNextId("radio") },
|
|
1477
|
+
name: { default: () => j.generateNextName("radio") },
|
|
1478
|
+
label: {},
|
|
1479
|
+
icon: {},
|
|
1480
|
+
modelValue: {},
|
|
1481
|
+
itemValue: {},
|
|
1482
|
+
disabled: { type: Boolean },
|
|
1483
|
+
viewMode: { type: Boolean },
|
|
1484
|
+
tabindex: { default: 0 }
|
|
1485
|
+
},
|
|
1486
|
+
emits: ["update:modelValue"],
|
|
1487
|
+
setup(e, { emit: n }) {
|
|
1488
|
+
const t = e, a = n, u = S(() => t.itemValue !== void 0 && t.itemValue === t.modelValue || !1), s = qe(), m = S(() => !!s?.default), h = {
|
|
1489
|
+
change: (B) => {
|
|
1490
|
+
B.target.checked && a("update:modelValue", t.itemValue);
|
|
1491
|
+
}
|
|
1492
|
+
// click: handleClick
|
|
1493
|
+
};
|
|
1494
|
+
return (B, w) => (d(), p("span", {
|
|
1495
|
+
class: O([{ checked: u.value, disabled: e.disabled }, "bs-radio-button"])
|
|
1496
|
+
}, [
|
|
1497
|
+
I("input", de({
|
|
1498
|
+
id: e.id,
|
|
1499
|
+
checked: u.value,
|
|
1500
|
+
disabled: e.disabled || e.viewMode,
|
|
1501
|
+
name: e.name,
|
|
1502
|
+
tabindex: e.tabindex,
|
|
1503
|
+
class: "",
|
|
1504
|
+
role: "radio",
|
|
1505
|
+
type: "radio"
|
|
1506
|
+
}, ce(h, !0)), null, 16, hn),
|
|
1507
|
+
I("label", { for: e.id }, [
|
|
1508
|
+
e.icon ? (d(), p("span", pn, F(e.icon), 1)) : q("", !0),
|
|
1509
|
+
e.label ? (d(), p("span", {
|
|
1510
|
+
key: 1,
|
|
1511
|
+
textContent: F(e.label),
|
|
1512
|
+
class: "text-label"
|
|
1513
|
+
}, null, 8, bn)) : q("", !0)
|
|
1514
|
+
], 8, gn),
|
|
1515
|
+
m.value ? (d(), p("label", {
|
|
1516
|
+
key: 0,
|
|
1517
|
+
for: e.id,
|
|
1518
|
+
class: "slot-label cursor-pointer"
|
|
1519
|
+
}, [
|
|
1520
|
+
se(B.$slots, "default", { disabled: e.disabled })
|
|
1521
|
+
], 8, xn)) : q("", !0)
|
|
1522
|
+
], 2));
|
|
1523
|
+
}
|
|
1524
|
+
}), Vn = ["data-field-name"], wn = ["textContent"], Cn = {
|
|
1525
|
+
key: 1,
|
|
1526
|
+
class: "radio-button-group",
|
|
1527
|
+
role: "radiogroup"
|
|
1528
|
+
}, Ca = /* @__PURE__ */ z({
|
|
1529
|
+
__name: "BSRadioButtonGroup",
|
|
1530
|
+
props: {
|
|
1531
|
+
name: { default: () => j.generateNextName("radioGroup") },
|
|
1532
|
+
modelValue: {},
|
|
1533
|
+
items: { default: () => [] },
|
|
1534
|
+
valueProvider: {},
|
|
1535
|
+
labelProvider: {},
|
|
1536
|
+
iconProvider: {},
|
|
1537
|
+
keyProvider: {},
|
|
1538
|
+
enabledItemProvider: {},
|
|
1539
|
+
tooltipProvider: {},
|
|
1540
|
+
tabindex: { default: 0 },
|
|
1541
|
+
disabled: { type: Boolean },
|
|
1542
|
+
viewMode: { type: Boolean },
|
|
1543
|
+
required: { type: Boolean },
|
|
1544
|
+
validationMessageRequired: {},
|
|
1545
|
+
extraValidationRules: {},
|
|
1546
|
+
ignoreSavePoint: { type: Boolean },
|
|
1547
|
+
hideErrorMessage: { type: Boolean },
|
|
1548
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1549
|
+
},
|
|
1550
|
+
emits: ["update:modelValue"],
|
|
1551
|
+
setup(e, { emit: n }) {
|
|
1552
|
+
const t = e, a = n, u = (c) => Qe(c, t.labelProvider, () => String(c)), s = (c) => t.valueProvider ? t.valueProvider(c) : c, m = (c) => Me(c, t.keyProvider, () => String(s(c))), f = (c) => t.enabledItemProvider ? !t.enabledItemProvider(c) : !1, h = S(() => {
|
|
1553
|
+
const c = t.items.find((l) => s(l) === t.modelValue);
|
|
1554
|
+
return c ? u(c) : "";
|
|
1555
|
+
}), B = (c) => {
|
|
1556
|
+
a("update:modelValue", c);
|
|
1557
|
+
};
|
|
1558
|
+
Z(
|
|
1559
|
+
() => t.modelValue,
|
|
1560
|
+
() => i(t.modelValue, "change")
|
|
1561
|
+
);
|
|
1562
|
+
const w = $(), C = ie(), b = async (c, l) => {
|
|
1563
|
+
const v = [];
|
|
1564
|
+
return t.required && c === void 0 ? v.push({ code: "required", message: t.validationMessageRequired || "Required" }) : c !== void 0 && await oe(c, t.extraValidationRules, v, l, C), v;
|
|
1565
|
+
}, y = S(() => t.viewMode || t.disabled), { errors: x, validateValue: i } = ae({
|
|
1566
|
+
field: w,
|
|
1567
|
+
disabled: y,
|
|
1568
|
+
initialValue: t.modelValue,
|
|
1569
|
+
isValid: b
|
|
1570
|
+
}), g = t.ignoreSavePoint ? void 0 : te(), k = g?.registerField({
|
|
1571
|
+
field: w,
|
|
1572
|
+
getCurrentValue: () => t.modelValue,
|
|
1573
|
+
setCurrentValue: (c) => a("update:modelValue", c)
|
|
1574
|
+
}), P = S(() => !!k?.isModified(t.modelValue));
|
|
1575
|
+
return _(() => g?.unregisterField(w)), (c, l) => (d(), p("div", {
|
|
1576
|
+
ref_key: "field",
|
|
1577
|
+
ref: w,
|
|
1578
|
+
class: O([{ required: e.required, disabled: e.disabled, modified: P.value, error: D(x).length > 0 }, "bs-radio-button-group"]),
|
|
1579
|
+
"data-field-name": e.name
|
|
1580
|
+
}, [
|
|
1581
|
+
e.viewMode ? (d(), p("div", {
|
|
1582
|
+
key: 0,
|
|
1583
|
+
textContent: F(h.value)
|
|
1584
|
+
}, null, 8, wn)) : (d(), p("div", Cn, [
|
|
1585
|
+
(d(!0), p(K, null, J(e.items, (v) => Q((d(), R(yn, {
|
|
1586
|
+
key: m(v),
|
|
1587
|
+
disabled: e.disabled || f(v),
|
|
1588
|
+
icon: e.iconProvider?.(v),
|
|
1589
|
+
"item-value": s(v),
|
|
1590
|
+
label: u(v),
|
|
1591
|
+
"model-value": e.modelValue,
|
|
1592
|
+
name: e.name,
|
|
1593
|
+
tabindex: e.tabindex,
|
|
1594
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => B(o))
|
|
1595
|
+
}, null, 8, ["disabled", "icon", "item-value", "label", "model-value", "name", "tabindex"])), [
|
|
1596
|
+
[D(Ue), { content: e.tooltipProvider?.(v) }]
|
|
1597
|
+
])), 128))
|
|
1598
|
+
])),
|
|
1599
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
1600
|
+
key: 2,
|
|
1601
|
+
errors: D(x),
|
|
1602
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
1603
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
1604
|
+
], 10, Vn));
|
|
1605
|
+
}
|
|
1606
|
+
});
|
|
1607
|
+
function _e(e) {
|
|
1608
|
+
return e != null;
|
|
1609
|
+
}
|
|
1610
|
+
function Le(e) {
|
|
1611
|
+
e.focus();
|
|
1612
|
+
}
|
|
1613
|
+
const Mn = {
|
|
1614
|
+
mounted: (e, n) => {
|
|
1615
|
+
(n.value === void 0 || String(n.value) === "true" || typeof n.value == "number") && (typeof n.value == "number" ? setTimeout(() => Le(e), n.value) : Le(e));
|
|
1616
|
+
}
|
|
1617
|
+
}, Pn = (e, n) => {
|
|
1618
|
+
let t;
|
|
1619
|
+
return (...a) => new Promise((u, s) => {
|
|
1620
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
1621
|
+
try {
|
|
1622
|
+
const m = e(...a);
|
|
1623
|
+
u(m);
|
|
1624
|
+
} catch (m) {
|
|
1625
|
+
s(m);
|
|
1626
|
+
} finally {
|
|
1627
|
+
t = void 0;
|
|
1628
|
+
}
|
|
1629
|
+
}, n);
|
|
1630
|
+
});
|
|
1631
|
+
}, Sn = {
|
|
1632
|
+
key: 0,
|
|
1633
|
+
class: "popup-search pa-4"
|
|
1634
|
+
}, kn = ["data-value", "onMouseover", "onClick"], $n = ["textContent"], Bn = ["textContent"], et = /* @__PURE__ */ z({
|
|
1635
|
+
__name: "BSSelectPopup",
|
|
1636
|
+
props: {
|
|
1637
|
+
items: {},
|
|
1638
|
+
initialItem: {},
|
|
1639
|
+
selectedItems: {},
|
|
1640
|
+
valueProvider: {},
|
|
1641
|
+
labelProvider: {},
|
|
1642
|
+
allowNull: { type: Boolean },
|
|
1643
|
+
nullLabel: {},
|
|
1644
|
+
maxHeight: {},
|
|
1645
|
+
showSearch: { type: [Boolean, String], default: "auto" },
|
|
1646
|
+
baseElement: {},
|
|
1647
|
+
popupAlign: {},
|
|
1648
|
+
popupDirection: {}
|
|
1649
|
+
},
|
|
1650
|
+
emits: ["itemSelected", "requestClose"],
|
|
1651
|
+
setup(e, { expose: n, emit: t }) {
|
|
1652
|
+
const a = e, u = t, s = $();
|
|
1653
|
+
Z(
|
|
1654
|
+
() => a.items,
|
|
1655
|
+
async () => {
|
|
1656
|
+
const o = await a.items, r = a.allowNull ? [void 0, ...o] : o;
|
|
1657
|
+
s.value = r.map((V) => {
|
|
1658
|
+
if (V !== void 0) {
|
|
1659
|
+
const E = a.labelProvider(V), Y = E ? E.toLowerCase() : "";
|
|
1660
|
+
return { original: V, value: a.valueProvider(V), label: E, keyword: Y };
|
|
1661
|
+
} else return;
|
|
1662
|
+
});
|
|
1663
|
+
},
|
|
1664
|
+
{ immediate: !0 }
|
|
1665
|
+
);
|
|
1666
|
+
const m = S(() => a.showSearch === "auto" ? s.value && s.value.length > 10 : a.showSearch), f = $(""), h = S(() => {
|
|
1667
|
+
if (s.value !== void 0)
|
|
1668
|
+
return f.value ? s.value.filter((o) => o?.keyword?.includes(f.value)) : s.value;
|
|
1669
|
+
}), B = Pn((o) => {
|
|
1670
|
+
f.value = o;
|
|
1671
|
+
}, 300), w = (o) => {
|
|
1672
|
+
const r = o.target.value.trim().toLowerCase();
|
|
1673
|
+
B(r);
|
|
1674
|
+
}, C = (o) => h.value?.findIndex((r) => r === void 0 && o === void 0 ? !0 : r && o ? r.value === a.valueProvider(o) : !1) ?? -1, b = () => {
|
|
1675
|
+
if (h.value && h.value.length > 0) {
|
|
1676
|
+
const o = Math.min(C(g.value) + 1, h.value.length - 1);
|
|
1677
|
+
k(h.value[o]?.original, o);
|
|
1678
|
+
}
|
|
1679
|
+
}, y = () => {
|
|
1680
|
+
if (h.value && h.value.length > 0) {
|
|
1681
|
+
const o = Math.max(0, C(g.value) - 1);
|
|
1682
|
+
k(h.value[o]?.original, o);
|
|
1683
|
+
}
|
|
1684
|
+
}, x = () => {
|
|
1685
|
+
v(g.value);
|
|
1686
|
+
}, i = (o) => {
|
|
1687
|
+
switch (o.key) {
|
|
1688
|
+
case "Enter":
|
|
1689
|
+
x();
|
|
1690
|
+
break;
|
|
1691
|
+
case "ArrowDown":
|
|
1692
|
+
b();
|
|
1693
|
+
break;
|
|
1694
|
+
case "ArrowUp":
|
|
1695
|
+
y();
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
1698
|
+
}, g = $();
|
|
1699
|
+
g.value = a.initialItem;
|
|
1700
|
+
const k = (o, r) => {
|
|
1701
|
+
g.value = o, r !== void 0 && c(r);
|
|
1702
|
+
}, P = $(), c = (o) => {
|
|
1703
|
+
const r = P.value?.querySelectorAll(".popup-item")[o];
|
|
1704
|
+
if (P.value && r) {
|
|
1705
|
+
const V = P.value.getBoundingClientRect(), E = r.getBoundingClientRect();
|
|
1706
|
+
(E.top < V.top || E.bottom > V.bottom) && (P.value.scrollTop = r.offsetTop - (P.value.offsetHeight - r.offsetHeight) / 2);
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
me(async () => {
|
|
1710
|
+
await ge(), await ge();
|
|
1711
|
+
const o = g.value || a.selectedItems?.[0];
|
|
1712
|
+
o && c(C(o));
|
|
1713
|
+
});
|
|
1714
|
+
const l = (o) => {
|
|
1715
|
+
const r = g.value;
|
|
1716
|
+
return r === void 0 && o === void 0 ? !0 : r !== void 0 && o !== void 0 ? a.valueProvider(r) === a.valueProvider(o) : !1;
|
|
1717
|
+
}, v = (o) => {
|
|
1718
|
+
o && s.value && (o = s.value.filter(_e).find((r) => r && r.value === a.valueProvider(o))?.original), u("itemSelected", o);
|
|
1719
|
+
};
|
|
1720
|
+
return n({
|
|
1721
|
+
handleKeyboard: i
|
|
1722
|
+
}), (o, r) => (d(), R(je, {
|
|
1723
|
+
"base-element": e.baseElement,
|
|
1724
|
+
"max-height": e.maxHeight,
|
|
1725
|
+
"offset-from-base-element": 4,
|
|
1726
|
+
"popup-align": e.popupAlign,
|
|
1727
|
+
"popup-direction": e.popupDirection,
|
|
1728
|
+
"extra-class": "bs-select-popup bs-layout-vertical",
|
|
1729
|
+
onRequestClose: r[2] || (r[2] = (V) => u("requestClose")),
|
|
1730
|
+
onKeydown: G(N(i, ["stop", "prevent"]), ["enter", "down", "up"])
|
|
1731
|
+
}, {
|
|
1732
|
+
default: ee(() => [
|
|
1733
|
+
m.value ? (d(), p("div", Sn, [
|
|
1734
|
+
Q(I("input", {
|
|
1735
|
+
type: "text",
|
|
1736
|
+
onInput: w,
|
|
1737
|
+
onKeydown: r[0] || (r[0] = G(N(() => {
|
|
1738
|
+
}, ["stop"]), ["space"])),
|
|
1739
|
+
onClick: r[1] || (r[1] = N(() => {
|
|
1740
|
+
}, ["stop"]))
|
|
1741
|
+
}, null, 544), [
|
|
1742
|
+
[D(Mn)]
|
|
1743
|
+
])
|
|
1744
|
+
])) : q("", !0),
|
|
1745
|
+
I("div", {
|
|
1746
|
+
ref_key: "popupItems",
|
|
1747
|
+
ref: P,
|
|
1748
|
+
class: "popup-items grow h-full overflow-auto"
|
|
1749
|
+
}, [
|
|
1750
|
+
(d(!0), p(K, null, J(h.value, (V) => (d(), p("div", {
|
|
1751
|
+
key: V !== void 0 ? String(V) : "",
|
|
1752
|
+
class: O([{
|
|
1753
|
+
hovered: l(V?.original),
|
|
1754
|
+
"selected-item": V !== void 0 && e.selectedItems?.includes(V?.original)
|
|
1755
|
+
}, "popup-item"]),
|
|
1756
|
+
"data-value": V?.value || "",
|
|
1757
|
+
onMouseover: (E) => k(V?.original),
|
|
1758
|
+
onClick: N((E) => v(V?.original), ["stop"])
|
|
1759
|
+
}, [
|
|
1760
|
+
r[3] || (r[3] = I("span", { class: "checkbox" }, null, -1)),
|
|
1761
|
+
V !== void 0 ? (d(), p("label", {
|
|
1762
|
+
key: 0,
|
|
1763
|
+
textContent: F(V?.label),
|
|
1764
|
+
class: "label"
|
|
1765
|
+
}, null, 8, $n)) : (d(), p("label", {
|
|
1766
|
+
key: 1,
|
|
1767
|
+
textContent: F(e.nullLabel),
|
|
1768
|
+
class: "label null-label"
|
|
1769
|
+
}, null, 8, Bn))
|
|
1770
|
+
], 42, kn))), 128))
|
|
1771
|
+
], 512)
|
|
1772
|
+
]),
|
|
1773
|
+
_: 1
|
|
1774
|
+
}, 8, ["base-element", "max-height", "popup-align", "popup-direction", "onKeydown"]));
|
|
1775
|
+
}
|
|
1776
|
+
}), De = (e, n) => {
|
|
1777
|
+
e.vClickOutsideContext = {
|
|
1778
|
+
enabled: n?.enabled ?? !0,
|
|
1779
|
+
handler: typeof n == "function" ? n : n?.handler,
|
|
1780
|
+
insideElements: n?.insideElements
|
|
1781
|
+
};
|
|
1782
|
+
}, En = (e, n) => n ? n.some((t) => {
|
|
1783
|
+
if (t instanceof HTMLElement)
|
|
1784
|
+
return t.contains(e);
|
|
1785
|
+
if (typeof t == "string")
|
|
1786
|
+
return document.querySelector(t)?.contains(e);
|
|
1787
|
+
}) : !1, tt = {
|
|
1788
|
+
mounted: (e, n) => {
|
|
1789
|
+
const t = (a) => {
|
|
1790
|
+
let u = a.target;
|
|
1791
|
+
if (!e.contains(u)) {
|
|
1792
|
+
const s = e.vClickOutsideContext;
|
|
1793
|
+
s && s.enabled && (En(u, s.insideElements) || s.handler?.());
|
|
1794
|
+
}
|
|
1795
|
+
};
|
|
1796
|
+
e.vClickOutsideListener = t, De(e, n.value), window.addEventListener("click", t);
|
|
1797
|
+
},
|
|
1798
|
+
updated: (e, n) => {
|
|
1799
|
+
De(e, n.value);
|
|
1800
|
+
},
|
|
1801
|
+
unmounted: (e) => {
|
|
1802
|
+
const n = e.vClickOutsideListener;
|
|
1803
|
+
n && window.removeEventListener("click", n), delete e.vClickOutsideContext;
|
|
1804
|
+
}
|
|
1805
|
+
}, In = ["tabindex", "onKeydown"], Ln = ["textContent"], Dn = ["data-field-name"], Tn = ["textContent"], Fn = ["textContent"], On = {
|
|
1806
|
+
key: 2,
|
|
1807
|
+
class: "small-progress"
|
|
1808
|
+
}, Ma = /* @__PURE__ */ z({
|
|
1809
|
+
__name: "BSSelect",
|
|
1810
|
+
props: {
|
|
1811
|
+
modelValue: {},
|
|
1812
|
+
items: { default: () => [] },
|
|
1813
|
+
name: {},
|
|
1814
|
+
valueProvider: { type: Function, default: (e) => e },
|
|
1815
|
+
labelProvider: { type: Function, default: Xe },
|
|
1816
|
+
selectedLabelProvider: {},
|
|
1817
|
+
placeholder: { default: () => "" },
|
|
1818
|
+
allowNull: { type: Boolean },
|
|
1819
|
+
nullLabel: {},
|
|
1820
|
+
disabled: { type: Boolean },
|
|
1821
|
+
viewMode: { type: Boolean },
|
|
1822
|
+
tabindex: { default: 0 },
|
|
1823
|
+
required: { type: Boolean },
|
|
1824
|
+
validationMessageRequired: {},
|
|
1825
|
+
extraValidationRules: {},
|
|
1826
|
+
ignoreSavePoint: { type: Boolean },
|
|
1827
|
+
popupAlign: {},
|
|
1828
|
+
popupDirection: {},
|
|
1829
|
+
popupMaxHeight: {},
|
|
1830
|
+
showPopupSearch: { type: [Boolean, String], default: "auto" },
|
|
1831
|
+
hideErrorMessage: { type: Boolean },
|
|
1832
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1833
|
+
},
|
|
1834
|
+
emits: ["update:modelValue"],
|
|
1835
|
+
setup(e, { emit: n }) {
|
|
1836
|
+
const t = e, a = n, u = $(), s = $(!1);
|
|
1837
|
+
Z(
|
|
1838
|
+
() => t.items,
|
|
1839
|
+
async () => {
|
|
1840
|
+
s.value = !0, u.value = await t.items, s.value = !1;
|
|
1841
|
+
},
|
|
1842
|
+
{ immediate: !0 }
|
|
1843
|
+
);
|
|
1844
|
+
const m = (T) => t.labelProvider ? t.labelProvider(T) : String(T), f = (T) => t.valueProvider ? t.valueProvider(T) : T, h = (T) => T !== void 0 ? u.value?.find((A) => f(A) === T) : void 0, B = S(() => !t.modelValue), w = S(() => h(t.modelValue)), C = S(() => w.value !== void 0 ? [w.value] : []), b = S(() => w.value !== void 0 ? t.selectedLabelProvider ? t.selectedLabelProvider(w.value) : m(w.value) : ""), y = $(!1), x = (T) => {
|
|
1845
|
+
!t.disabled && !t.viewMode && (y.value = T === void 0 ? !y.value : T);
|
|
1846
|
+
}, i = (T) => {
|
|
1847
|
+
y.value ? T.stopPropagation() : x(!1);
|
|
1848
|
+
}, g = $(), k = (T) => {
|
|
1849
|
+
y.value ? g.value && g.value.handleKeyboard(T) : x(!0);
|
|
1850
|
+
}, P = (T) => {
|
|
1851
|
+
const A = T ? f(T) : void 0;
|
|
1852
|
+
a("update:modelValue", A), y.value = !1, l();
|
|
1853
|
+
}, c = He("root"), l = () => c.value?.focus();
|
|
1854
|
+
Z(
|
|
1855
|
+
() => t.modelValue,
|
|
1856
|
+
() => Y(t.modelValue, "change")
|
|
1857
|
+
);
|
|
1858
|
+
const v = $(), o = ie(), r = async (T, A) => {
|
|
1859
|
+
const ne = [];
|
|
1860
|
+
return t.required && T === void 0 ? ne.push({ code: "required", message: t.validationMessageRequired || "Required" }) : T !== void 0 && await oe(T, t.extraValidationRules, ne, A, o), ne;
|
|
1861
|
+
}, V = S(() => t.viewMode || t.disabled), { errors: E, validateValue: Y } = ae({
|
|
1862
|
+
field: v,
|
|
1863
|
+
disabled: V,
|
|
1864
|
+
initialValue: t.modelValue,
|
|
1865
|
+
isValid: r
|
|
1866
|
+
}), M = t.ignoreSavePoint ? void 0 : te(), L = M?.registerField({
|
|
1867
|
+
field: v,
|
|
1868
|
+
getCurrentValue: () => t.modelValue,
|
|
1869
|
+
setCurrentValue: (T) => a("update:modelValue", T)
|
|
1870
|
+
}), H = S(() => !!L?.isModified(t.modelValue));
|
|
1871
|
+
return _(() => M?.unregisterField(v)), (T, A) => Q((d(), p("div", {
|
|
1872
|
+
ref: "root",
|
|
1873
|
+
class: O([{ "popup-open": y.value, disabled: e.disabled, modified: H.value, error: D(E).length > 0, empty: B.value, "view-mode": e.viewMode }, "bs-select"]),
|
|
1874
|
+
tabindex: e.disabled ? -1 : e.tabindex,
|
|
1875
|
+
onClick: A[1] || (A[1] = (ne) => x()),
|
|
1876
|
+
onKeydown: [
|
|
1877
|
+
A[2] || (A[2] = G(N((ne) => x(), ["stop", "prevent"]), ["space"])),
|
|
1878
|
+
G(N(k, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
1879
|
+
A[3] || (A[3] = G(N((ne) => {
|
|
1880
|
+
x(!1), l();
|
|
1881
|
+
}, ["stop", "prevent"]), ["esc"])),
|
|
1882
|
+
G(i, ["tab"])
|
|
1883
|
+
]
|
|
1884
|
+
}, [
|
|
1885
|
+
e.viewMode ? (d(), p("div", {
|
|
1886
|
+
key: 0,
|
|
1887
|
+
textContent: F(b.value)
|
|
1888
|
+
}, null, 8, Ln)) : (d(), p(K, { key: 1 }, [
|
|
1889
|
+
I("div", {
|
|
1890
|
+
ref_key: "field",
|
|
1891
|
+
ref: v,
|
|
1892
|
+
"data-field-name": e.name,
|
|
1893
|
+
class: "selected w-full",
|
|
1894
|
+
role: "listbox"
|
|
1895
|
+
}, [
|
|
1896
|
+
w.value === void 0 ? (d(), p("span", {
|
|
1897
|
+
key: 0,
|
|
1898
|
+
textContent: F(e.placeholder),
|
|
1899
|
+
class: "placeholder grow"
|
|
1900
|
+
}, null, 8, Tn)) : (d(), p("span", {
|
|
1901
|
+
key: 1,
|
|
1902
|
+
textContent: F(b.value),
|
|
1903
|
+
class: "label"
|
|
1904
|
+
}, null, 8, Fn)),
|
|
1905
|
+
A[4] || (A[4] = I("span", { class: "dropdown-btn" }, "expand_more", -1)),
|
|
1906
|
+
s.value ? (d(), p("span", On, "progress_activity")) : q("", !0)
|
|
1907
|
+
], 8, Dn),
|
|
1908
|
+
!e.disabled && y.value ? (d(), R(et, {
|
|
1909
|
+
key: 0,
|
|
1910
|
+
ref_key: "selectPopup",
|
|
1911
|
+
ref: g,
|
|
1912
|
+
"allow-null": e.allowNull,
|
|
1913
|
+
"base-element": c.value,
|
|
1914
|
+
"initial-item": w.value,
|
|
1915
|
+
items: e.items,
|
|
1916
|
+
"label-provider": e.labelProvider,
|
|
1917
|
+
"max-height": e.popupMaxHeight,
|
|
1918
|
+
"null-label": e.nullLabel,
|
|
1919
|
+
"popup-align": e.popupAlign,
|
|
1920
|
+
"popup-direction": e.popupDirection,
|
|
1921
|
+
"selected-items": C.value,
|
|
1922
|
+
"show-search": e.showPopupSearch,
|
|
1923
|
+
"value-provider": e.valueProvider,
|
|
1924
|
+
onItemSelected: P,
|
|
1925
|
+
onRequestClose: A[0] || (A[0] = (ne) => {
|
|
1926
|
+
x(!1), l();
|
|
1927
|
+
})
|
|
1928
|
+
}, null, 8, ["allow-null", "base-element", "initial-item", "items", "label-provider", "max-height", "null-label", "popup-align", "popup-direction", "selected-items", "show-search", "value-provider"])) : q("", !0),
|
|
1929
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
1930
|
+
key: 1,
|
|
1931
|
+
errors: D(E),
|
|
1932
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
1933
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
1934
|
+
], 64))
|
|
1935
|
+
], 42, In)), [
|
|
1936
|
+
[D(tt), () => x(!1)]
|
|
1937
|
+
]);
|
|
1938
|
+
}
|
|
1939
|
+
}), qn = ["tabindex", "onKeydown"], Hn = { key: 0 }, Rn = ["textContent"], Nn = ["textContent"], zn = ["data-field-name"], An = ["textContent"], Yn = {
|
|
1940
|
+
key: 1,
|
|
1941
|
+
class: "text-truncate"
|
|
1942
|
+
}, Un = ["textContent"], Kn = ["textContent"], jn = {
|
|
1943
|
+
key: 2,
|
|
1944
|
+
class: "small-progress"
|
|
1945
|
+
}, Pa = /* @__PURE__ */ z({
|
|
1946
|
+
__name: "BSMultiSelect",
|
|
1947
|
+
props: {
|
|
1948
|
+
modelValue: { default: () => [] },
|
|
1949
|
+
items: { default: () => [] },
|
|
1950
|
+
name: {},
|
|
1951
|
+
valueProvider: { type: Function, default: (e) => e },
|
|
1952
|
+
labelProvider: { type: Function, default: Xe },
|
|
1953
|
+
selectedLabelProvider: {},
|
|
1954
|
+
keyProvider: {},
|
|
1955
|
+
placeholder: {},
|
|
1956
|
+
tabindex: { default: 0 },
|
|
1957
|
+
disabled: { type: Boolean },
|
|
1958
|
+
viewMode: { type: Boolean },
|
|
1959
|
+
required: { type: Boolean },
|
|
1960
|
+
validationMessageRequired: {},
|
|
1961
|
+
extraValidationRules: {},
|
|
1962
|
+
ignoreSavePoint: { type: Boolean },
|
|
1963
|
+
popupAlign: {},
|
|
1964
|
+
popupDirection: {},
|
|
1965
|
+
popupMaxHeight: {},
|
|
1966
|
+
showPopupSearch: { type: [Boolean, String], default: "auto" },
|
|
1967
|
+
hideErrorMessage: { type: Boolean },
|
|
1968
|
+
showErrorMessageOnDisabled: { type: Boolean }
|
|
1969
|
+
},
|
|
1970
|
+
emits: ["update:modelValue"],
|
|
1971
|
+
setup(e, { emit: n }) {
|
|
1972
|
+
const t = e, a = n, u = $(), s = $(!1);
|
|
1973
|
+
Z(
|
|
1974
|
+
() => t.items,
|
|
1975
|
+
async () => {
|
|
1976
|
+
s.value = !0, u.value = await t.items, s.value = !1;
|
|
1977
|
+
},
|
|
1978
|
+
{ immediate: !0 }
|
|
1979
|
+
);
|
|
1980
|
+
const m = (M) => Qe(M, t.labelProvider, () => String(M)), f = (M) => t.valueProvider ? t.valueProvider(M) : M, h = (M) => Me(M, t.keyProvider, () => String(M)), B = (M) => M ? u.value?.find((L) => f(L) === M) : void 0, w = S(() => !t.modelValue || t.modelValue.length === 0), C = S(() => t.modelValue.map(B).filter(_e)), b = $(!1), y = (M) => {
|
|
1981
|
+
!t.disabled && !t.viewMode && (b.value = M === void 0 ? !b.value : M);
|
|
1982
|
+
}, x = $(), i = (M) => {
|
|
1983
|
+
b.value ? x.value && x.value.handleKeyboard(M) : y(!0);
|
|
1984
|
+
}, g = (M) => {
|
|
1985
|
+
if (M && u.value) {
|
|
1986
|
+
let L = [...C.value];
|
|
1987
|
+
const H = L.indexOf(M);
|
|
1988
|
+
H >= 0 ? L.splice(H, 1) : L = u.value.filter((A) => L.includes(A) || A === M);
|
|
1989
|
+
const T = L.map(f);
|
|
1990
|
+
a("update:modelValue", T);
|
|
1991
|
+
}
|
|
1992
|
+
}, k = He("root");
|
|
1993
|
+
Z(
|
|
1994
|
+
() => t.modelValue,
|
|
1995
|
+
() => r(t.modelValue, "change")
|
|
1996
|
+
);
|
|
1997
|
+
const P = $(), c = ie(), l = async (M, L) => {
|
|
1998
|
+
const H = [];
|
|
1999
|
+
return t.required && (M === void 0 || M.length === 0) ? H.push({ code: "required", message: t.validationMessageRequired || "Required" }) : M !== void 0 && await oe(M, t.extraValidationRules, H, L, c), H;
|
|
2000
|
+
}, v = S(() => t.viewMode || t.disabled), { errors: o, validateValue: r } = ae({
|
|
2001
|
+
field: P,
|
|
2002
|
+
disabled: v,
|
|
2003
|
+
initialValue: t.modelValue,
|
|
2004
|
+
isValid: l
|
|
2005
|
+
}), V = t.ignoreSavePoint ? void 0 : te(), E = V?.registerField({
|
|
2006
|
+
field: P,
|
|
2007
|
+
getCurrentValue: () => [...t.modelValue],
|
|
2008
|
+
setCurrentValue: (M) => a("update:modelValue", [...M || []]),
|
|
2009
|
+
compare: (M, L) => M?.toSorted().join(",") === L?.toSorted().join(",")
|
|
2010
|
+
}), Y = S(() => !!E?.isModified(t.modelValue || []));
|
|
2011
|
+
return _(() => V?.unregisterField(P)), (M, L) => Q((d(), p("div", {
|
|
2012
|
+
ref: "root",
|
|
2013
|
+
class: O([{ "popup-open": b.value, disabled: e.disabled, modified: Y.value, error: D(o).length > 0, empty: w.value, "view-mode": e.viewMode }, "bs-multi-select"]),
|
|
2014
|
+
tabindex: e.disabled ? -1 : e.tabindex,
|
|
2015
|
+
onClick: L[1] || (L[1] = (H) => y()),
|
|
2016
|
+
onKeydown: [
|
|
2017
|
+
L[2] || (L[2] = G(N((H) => y(), ["stop", "prevent"]), ["space"])),
|
|
2018
|
+
G(N(i, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
2019
|
+
L[3] || (L[3] = G(N((H) => y(!1), ["stop", "prevent"]), ["esc"])),
|
|
2020
|
+
L[4] || (L[4] = G((H) => y(!1), ["tab"]))
|
|
2021
|
+
]
|
|
2022
|
+
}, [
|
|
2023
|
+
e.viewMode ? (d(), p("div", Hn, [
|
|
2024
|
+
e.selectedLabelProvider ? (d(), p("span", {
|
|
2025
|
+
key: 0,
|
|
2026
|
+
textContent: F(e.selectedLabelProvider(C.value)),
|
|
2027
|
+
class: "label"
|
|
2028
|
+
}, null, 8, Rn)) : (d(!0), p(K, { key: 1 }, J(C.value, (H) => (d(), p("span", {
|
|
2029
|
+
key: h(H),
|
|
2030
|
+
textContent: F(m(H)),
|
|
2031
|
+
class: "label"
|
|
2032
|
+
}, null, 8, Nn))), 128))
|
|
2033
|
+
])) : (d(), p(K, { key: 1 }, [
|
|
2034
|
+
I("div", {
|
|
2035
|
+
ref_key: "field",
|
|
2036
|
+
ref: P,
|
|
2037
|
+
"data-field-name": e.name,
|
|
2038
|
+
class: "selected w-full",
|
|
2039
|
+
role: "listbox"
|
|
2040
|
+
}, [
|
|
2041
|
+
C.value.length === 0 ? (d(), p("span", {
|
|
2042
|
+
key: 0,
|
|
2043
|
+
textContent: F(e.placeholder),
|
|
2044
|
+
class: "placeholder grow"
|
|
2045
|
+
}, null, 8, An)) : (d(), p("span", Yn, [
|
|
2046
|
+
e.selectedLabelProvider ? (d(), p("span", {
|
|
2047
|
+
key: 0,
|
|
2048
|
+
textContent: F(e.selectedLabelProvider(C.value)),
|
|
2049
|
+
class: "label"
|
|
2050
|
+
}, null, 8, Un)) : (d(!0), p(K, { key: 1 }, J(C.value, (H) => (d(), p("span", {
|
|
2051
|
+
key: h(H),
|
|
2052
|
+
textContent: F(m(H)),
|
|
2053
|
+
class: "label"
|
|
2054
|
+
}, null, 8, Kn))), 128))
|
|
2055
|
+
])),
|
|
2056
|
+
L[5] || (L[5] = I("span", { class: "dropdown-btn" }, "expand_more", -1)),
|
|
2057
|
+
s.value ? (d(), p("span", jn, "progress_activity")) : q("", !0)
|
|
2058
|
+
], 8, zn),
|
|
2059
|
+
!e.disabled && b.value ? (d(), R(et, {
|
|
2060
|
+
key: 0,
|
|
2061
|
+
ref_key: "selectPopup",
|
|
2062
|
+
ref: x,
|
|
2063
|
+
"base-element": k.value,
|
|
2064
|
+
"initial-item": C.value[0],
|
|
2065
|
+
items: e.items,
|
|
2066
|
+
"label-provider": e.labelProvider,
|
|
2067
|
+
"max-height": e.popupMaxHeight,
|
|
2068
|
+
"popup-align": e.popupAlign,
|
|
2069
|
+
"popup-direction": e.popupDirection,
|
|
2070
|
+
"selected-items": C.value,
|
|
2071
|
+
"show-search": e.showPopupSearch,
|
|
2072
|
+
"value-provider": e.valueProvider,
|
|
2073
|
+
onItemSelected: g,
|
|
2074
|
+
onRequestClose: L[0] || (L[0] = (H) => y(!1))
|
|
2075
|
+
}, null, 8, ["base-element", "initial-item", "items", "label-provider", "max-height", "popup-align", "popup-direction", "selected-items", "show-search", "value-provider"])) : q("", !0)
|
|
2076
|
+
], 64)),
|
|
2077
|
+
e.viewMode ? q("", !0) : (d(), R(le, {
|
|
2078
|
+
key: 2,
|
|
2079
|
+
errors: D(o),
|
|
2080
|
+
"hide-error-message": e.hideErrorMessage || e.disabled && !e.showErrorMessageOnDisabled
|
|
2081
|
+
}, null, 8, ["errors", "hide-error-message"]))
|
|
2082
|
+
], 42, qn)), [
|
|
2083
|
+
[D(tt), () => y(!1)]
|
|
2084
|
+
]);
|
|
2085
|
+
}
|
|
2086
|
+
}), Zn = /* @__PURE__ */ z({
|
|
2087
|
+
__name: "SlideDownTransition",
|
|
2088
|
+
setup(e) {
|
|
2089
|
+
const n = (f) => {
|
|
2090
|
+
f instanceof HTMLElement && requestAnimationFrame(() => {
|
|
2091
|
+
f.style.maxHeight = "0px";
|
|
2092
|
+
});
|
|
2093
|
+
}, t = (f) => {
|
|
2094
|
+
f instanceof HTMLElement && requestAnimationFrame(() => {
|
|
2095
|
+
requestAnimationFrame(() => {
|
|
2096
|
+
f.style.maxHeight = `${f.scrollHeight}px`;
|
|
2097
|
+
});
|
|
2098
|
+
});
|
|
2099
|
+
}, a = (f) => {
|
|
2100
|
+
f instanceof HTMLElement && (f.style.maxHeight = "none");
|
|
2101
|
+
}, u = (f) => {
|
|
2102
|
+
f instanceof HTMLElement && requestAnimationFrame(() => {
|
|
2103
|
+
f.style.maxHeight = `${f.scrollHeight}px`;
|
|
2104
|
+
});
|
|
2105
|
+
}, s = (f) => {
|
|
2106
|
+
f instanceof HTMLElement && requestAnimationFrame(() => {
|
|
2107
|
+
requestAnimationFrame(() => {
|
|
2108
|
+
f.style.maxHeight = "0px";
|
|
2109
|
+
});
|
|
2110
|
+
});
|
|
2111
|
+
}, m = (f) => {
|
|
2112
|
+
f instanceof HTMLElement && (f.style.maxHeight = "none");
|
|
2113
|
+
};
|
|
2114
|
+
return (f, h) => (d(), R(Fe, {
|
|
2115
|
+
name: "slide-down",
|
|
2116
|
+
onEnter: t,
|
|
2117
|
+
onLeave: s,
|
|
2118
|
+
onBeforeEnter: n,
|
|
2119
|
+
onAfterEnter: a,
|
|
2120
|
+
onBeforeLeave: u,
|
|
2121
|
+
onAfterLeave: m
|
|
2122
|
+
}, {
|
|
2123
|
+
default: ee(() => [
|
|
2124
|
+
se(f.$slots, "default")
|
|
2125
|
+
]),
|
|
2126
|
+
_: 3
|
|
2127
|
+
}));
|
|
2128
|
+
}
|
|
2129
|
+
}), Wn = {
|
|
2130
|
+
key: 0,
|
|
2131
|
+
class: "card-layout-header bs-layout-horizontal flex-align-center"
|
|
2132
|
+
}, Gn = ["textContent"], Sa = /* @__PURE__ */ z({
|
|
2133
|
+
__name: "BSCardLayout",
|
|
2134
|
+
props: {
|
|
2135
|
+
title: {},
|
|
2136
|
+
hideTitle: { type: Boolean },
|
|
2137
|
+
cardBodyClass: {}
|
|
2138
|
+
},
|
|
2139
|
+
setup(e) {
|
|
2140
|
+
const n = $(!0), t = () => n.value = !n.value;
|
|
2141
|
+
return (a, u) => (d(), p("div", {
|
|
2142
|
+
class: O([{ expanded: n.value }, "bs-card-layout"])
|
|
2143
|
+
}, [
|
|
2144
|
+
e.hideTitle ? q("", !0) : (d(), p("div", Wn, [
|
|
2145
|
+
I("span", {
|
|
2146
|
+
class: "expand-btn font-icon bs-clickable",
|
|
2147
|
+
onClick: t
|
|
2148
|
+
}, "label"),
|
|
2149
|
+
I("div", {
|
|
2150
|
+
textContent: F(e.title),
|
|
2151
|
+
class: "card-layout-title"
|
|
2152
|
+
}, null, 8, Gn),
|
|
2153
|
+
u[0] || (u[0] = I("div", { class: "grow" }, null, -1)),
|
|
2154
|
+
I("div", null, [
|
|
2155
|
+
se(a.$slots, "title-right")
|
|
2156
|
+
])
|
|
2157
|
+
])),
|
|
2158
|
+
U(Zn, null, {
|
|
2159
|
+
default: ee(() => [
|
|
2160
|
+
Q(I("div", {
|
|
2161
|
+
class: O(e.cardBodyClass)
|
|
2162
|
+
}, [
|
|
2163
|
+
se(a.$slots, "default")
|
|
2164
|
+
], 2), [
|
|
2165
|
+
[st, n.value]
|
|
2166
|
+
])
|
|
2167
|
+
]),
|
|
2168
|
+
_: 3
|
|
2169
|
+
})
|
|
2170
|
+
], 2));
|
|
2171
|
+
}
|
|
2172
|
+
}), Jn = { class: "bs-notification-container" }, Xn = { class: "top-notification bs-layout-vertical-inline flex-align-center gap-4" }, Qn = ["textContent"], _n = { class: "bottom-notification bs-layout-vertical-inline flex-align-end gap-4" }, ea = { class: "tooltip-container" }, ka = /* @__PURE__ */ z({
|
|
2173
|
+
__name: "BSNotificationContainer",
|
|
2174
|
+
setup(e) {
|
|
2175
|
+
const n = $(), t = (a, u) => {
|
|
2176
|
+
X.value && n.value && !n.value.$el?.contains(u.relatedTarget) && (X.value.cursorInTooltip = a, a || he());
|
|
2177
|
+
};
|
|
2178
|
+
return (a, u) => (d(), p("div", Jn, [
|
|
2179
|
+
I("div", Xn, [
|
|
2180
|
+
U(Pe, { name: "notification" }, {
|
|
2181
|
+
default: ee(() => [
|
|
2182
|
+
(d(!0), p(K, null, J(D(dt), (s) => (d(), p("div", {
|
|
2183
|
+
key: s.entryId,
|
|
2184
|
+
textContent: F(s.message),
|
|
2185
|
+
class: O(s.style)
|
|
2186
|
+
}, null, 10, Qn))), 128))
|
|
2187
|
+
]),
|
|
2188
|
+
_: 1
|
|
2189
|
+
})
|
|
2190
|
+
]),
|
|
2191
|
+
I("div", _n, [
|
|
2192
|
+
U(Pe, { name: "alarm" }, {
|
|
2193
|
+
default: ee(() => [
|
|
2194
|
+
(d(!0), p(K, null, J(D(ct), (s) => (d(), R(xe(s.component), {
|
|
2195
|
+
key: s.entryId,
|
|
2196
|
+
"alarm-entry-id": s.entryId,
|
|
2197
|
+
class: "bs-alarm-frame"
|
|
2198
|
+
}, null, 8, ["alarm-entry-id"]))), 128))
|
|
2199
|
+
]),
|
|
2200
|
+
_: 1
|
|
2201
|
+
})
|
|
2202
|
+
]),
|
|
2203
|
+
I("div", ea, [
|
|
2204
|
+
D(X) ? (d(), R(kt, {
|
|
2205
|
+
key: 0,
|
|
2206
|
+
ref_key: "tooltip",
|
|
2207
|
+
ref: n,
|
|
2208
|
+
content: D(X).content,
|
|
2209
|
+
target: D(X).target,
|
|
2210
|
+
onMouseout: u[0] || (u[0] = (s) => t(!1, s)),
|
|
2211
|
+
onMouseover: u[1] || (u[1] = (s) => t(!0, s))
|
|
2212
|
+
}, null, 8, ["content", "target"])) : q("", !0)
|
|
2213
|
+
]),
|
|
2214
|
+
D(vt) ? (d(), R(wt, { key: 0 })) : q("", !0)
|
|
2215
|
+
]));
|
|
2216
|
+
}
|
|
2217
|
+
}), ta = ["data-menu-id"], na = ["textContent", "href", "target"], aa = ["data-menu-id"], oa = ["textContent", "data-menu-id", "onMouseenter", "onClick"], la = /* @__PURE__ */ z({
|
|
2218
|
+
__name: "BSContextMenu",
|
|
2219
|
+
props: {
|
|
2220
|
+
menuItems: {},
|
|
2221
|
+
popupId: {},
|
|
2222
|
+
baseElement: {},
|
|
2223
|
+
left: {},
|
|
2224
|
+
top: {},
|
|
2225
|
+
zIndex: {},
|
|
2226
|
+
direction: {}
|
|
2227
|
+
},
|
|
2228
|
+
emits: ["menuClicked", "requestClose"],
|
|
2229
|
+
setup(e, { emit: n }) {
|
|
2230
|
+
const t = n, a = ze(), u = (C) => {
|
|
2231
|
+
C.disabled || C.children || (C.handler?.(), a.hideContextMenu(), t("menuClicked", C));
|
|
2232
|
+
}, s = () => {
|
|
2233
|
+
a.hideContextMenu();
|
|
2234
|
+
}, m = () => {
|
|
2235
|
+
w(), t("requestClose");
|
|
2236
|
+
}, f = $(), h = $(), B = (C, b) => {
|
|
2237
|
+
b.children ? (h.value = C.target, f.value = b.children) : (f.value = void 0, h.value = void 0);
|
|
2238
|
+
}, w = () => {
|
|
2239
|
+
a.hideContextMenu();
|
|
2240
|
+
};
|
|
2241
|
+
return (C, b) => {
|
|
2242
|
+
const y = Se("router-link"), x = Se("BSContextMenu", !0);
|
|
2243
|
+
return d(), R(je, {
|
|
2244
|
+
ref: "root",
|
|
2245
|
+
"base-element": e.baseElement || { left: e.left || 0, top: e.top || 0 },
|
|
2246
|
+
"popup-direction": e.direction,
|
|
2247
|
+
"popup-id": e.popupId,
|
|
2248
|
+
"z-index": e.zIndex,
|
|
2249
|
+
"extra-class": "bs-context-menu",
|
|
2250
|
+
onRequestClose: m,
|
|
2251
|
+
onKeydown: G(w, ["esc"])
|
|
2252
|
+
}, {
|
|
2253
|
+
default: ee(() => [
|
|
2254
|
+
(d(!0), p(K, null, J(e.menuItems, (i) => (d(), p(K, { key: i }, [
|
|
2255
|
+
i.type === "separator" ? (d(), p("div", {
|
|
2256
|
+
key: 0,
|
|
2257
|
+
class: "menu separator",
|
|
2258
|
+
onClick: b[0] || (b[0] = N(() => {
|
|
2259
|
+
}, ["stop"]))
|
|
2260
|
+
})) : i.type === "custom" && i.component ? (d(), R(xe(i.component), {
|
|
2261
|
+
key: 1,
|
|
2262
|
+
class: "menu custom"
|
|
2263
|
+
})) : i.type === "link" ? (d(), p("div", {
|
|
2264
|
+
key: 2,
|
|
2265
|
+
"data-menu-id": i.menuId,
|
|
2266
|
+
class: "menu no-padding",
|
|
2267
|
+
"data-id": "context-menu-item"
|
|
2268
|
+
}, [
|
|
2269
|
+
I("a", {
|
|
2270
|
+
textContent: F(i.caption),
|
|
2271
|
+
href: i.href,
|
|
2272
|
+
target: i.target,
|
|
2273
|
+
onClick: N(s, ["stop"])
|
|
2274
|
+
}, null, 8, na)
|
|
2275
|
+
], 8, ta)) : i.type === "route" ? (d(), p("div", {
|
|
2276
|
+
key: 3,
|
|
2277
|
+
"data-menu-id": i.menuId,
|
|
2278
|
+
class: "menu no-padding",
|
|
2279
|
+
"data-id": "context-menu-item"
|
|
2280
|
+
}, [
|
|
2281
|
+
U(y, {
|
|
2282
|
+
textContent: F(i.caption),
|
|
2283
|
+
to: i.href || "",
|
|
2284
|
+
onClick: N(s, ["stop"])
|
|
2285
|
+
}, null, 8, ["textContent", "to"])
|
|
2286
|
+
], 8, aa)) : (d(), p("div", {
|
|
2287
|
+
key: 4,
|
|
2288
|
+
textContent: F(i.caption),
|
|
2289
|
+
class: O([{ "has-submenu": i.children, disabled: i.disabled }, "menu"]),
|
|
2290
|
+
"data-menu-id": i.menuId,
|
|
2291
|
+
"data-id": "context-menu-item",
|
|
2292
|
+
onMouseenter: (g) => B(g, i),
|
|
2293
|
+
onClick: N((g) => u(i), ["stop"])
|
|
2294
|
+
}, null, 42, oa))
|
|
2295
|
+
], 64))), 128)),
|
|
2296
|
+
f.value && h.value ? (d(), R(x, {
|
|
2297
|
+
key: 0,
|
|
2298
|
+
"base-element": h.value,
|
|
2299
|
+
"menu-items": f.value,
|
|
2300
|
+
direction: "auto-right"
|
|
2301
|
+
}, null, 8, ["base-element", "menu-items"])) : q("", !0)
|
|
2302
|
+
]),
|
|
2303
|
+
_: 1
|
|
2304
|
+
}, 8, ["base-element", "popup-direction", "popup-id", "z-index"]);
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
2307
|
+
}), ia = { class: "bs-context-menu-container" }, $a = /* @__PURE__ */ z({
|
|
2308
|
+
__name: "BSContextMenuContainer",
|
|
2309
|
+
setup(e) {
|
|
2310
|
+
const n = ze(), t = S(() => n.contextMenuItems.value), a = S(() => n.position.value || { x: 0, y: 0 }), u = S(() => n.options.value), s = () => {
|
|
2311
|
+
n.hideContextMenu();
|
|
2312
|
+
};
|
|
2313
|
+
return (m, f) => (d(), p("div", ia, [
|
|
2314
|
+
t.value ? (d(), p("div", {
|
|
2315
|
+
key: 0,
|
|
2316
|
+
class: "context-menu-curtain",
|
|
2317
|
+
tabindex: "0",
|
|
2318
|
+
onClick: N(s, ["prevent"]),
|
|
2319
|
+
onContextmenu: N(s, ["prevent"])
|
|
2320
|
+
}, null, 32)) : q("", !0),
|
|
2321
|
+
t.value ? (d(), R(la, {
|
|
2322
|
+
key: 1,
|
|
2323
|
+
left: a.value.x,
|
|
2324
|
+
"menu-items": t.value,
|
|
2325
|
+
top: a.value.y,
|
|
2326
|
+
"z-index": u.value?.zIndex
|
|
2327
|
+
}, null, 8, ["left", "menu-items", "top", "z-index"])) : q("", !0),
|
|
2328
|
+
f[0] || (f[0] = I("div", { class: "bs-popup-container" }, null, -1))
|
|
2329
|
+
]));
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
export {
|
|
2333
|
+
va as BSButton,
|
|
2334
|
+
Sa as BSCardLayout,
|
|
2335
|
+
cn as BSCheckbox,
|
|
2336
|
+
wa as BSCheckboxGroup,
|
|
2337
|
+
la as BSContextMenu,
|
|
2338
|
+
$a as BSContextMenuContainer,
|
|
2339
|
+
Ne as BSContextMenuPlugin,
|
|
2340
|
+
wt as BSLoadingIcon,
|
|
2341
|
+
Pa as BSMultiSelect,
|
|
2342
|
+
ka as BSNotificationContainer,
|
|
2343
|
+
ya as BSNumberInput,
|
|
2344
|
+
fa as BSPageNavigation,
|
|
2345
|
+
je as BSPopup,
|
|
2346
|
+
yn as BSRadioButton,
|
|
2347
|
+
Ca as BSRadioButtonGroup,
|
|
2348
|
+
Ma as BSSelect,
|
|
2349
|
+
Va as BSTextArea,
|
|
2350
|
+
xa as BSTextInput,
|
|
2351
|
+
kt as BSTooltip,
|
|
2352
|
+
ca as BlueseaPlugin,
|
|
2353
|
+
Ve as ContextMenuPluginKey,
|
|
2354
|
+
We as SavePointImpl,
|
|
2355
|
+
pa as cancelProvidedSavePoint,
|
|
2356
|
+
da as createContextMenuPlugin,
|
|
2357
|
+
Pn as debounce,
|
|
2358
|
+
_e as notNull,
|
|
2359
|
+
ba as provideFieldContext,
|
|
2360
|
+
ga as provideSavePoint,
|
|
2361
|
+
ha as tryUntil,
|
|
2362
|
+
ze as useContextMenu,
|
|
2363
|
+
ua as useContextMenuOptional,
|
|
2364
|
+
ie as useFieldContext,
|
|
2365
|
+
te as useSavePoint,
|
|
2366
|
+
tt as vClickOutside,
|
|
2367
|
+
Mn as vFocusOnLoad,
|
|
2368
|
+
Ue as vTooltip,
|
|
2369
|
+
Ct as waitDuring,
|
|
2370
|
+
ma as waitUntil
|
|
2371
|
+
};
|