@g1cloud/bluesea 5.0.0-alpha.67 → 5.0.0-alpha.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BSAlertModal-CBZa5cAf.js → BSAlertModal-Bs3lYNkZ.js} +1 -1
- package/dist/{BSYesNoModal-JYOz2tTx.js → BSYesNoModal-BJ4DrPki.js} +1 -1
- package/dist/bluesea.js +1 -1
- package/dist/bluesea.umd.cjs +64 -52
- package/dist/directive/vClickOutside.d.ts +13 -1
- package/dist/{index-B3EFTf4_.js → index-B-PTkzdW.js} +66 -54
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, unref } from "vue";
|
|
2
|
-
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, a as vT } from "./index-
|
|
2
|
+
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, a as vT } from "./index-B-PTkzdW.js";
|
|
3
3
|
const _hoisted_1 = { class: "text-right" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "BSAlertModal",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, withDirectives, unref } from "vue";
|
|
2
|
-
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, a as vT } from "./index-
|
|
2
|
+
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, a as vT } from "./index-B-PTkzdW.js";
|
|
3
3
|
const _hoisted_1 = { class: "text-right" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "BSYesNoModal",
|
package/dist/bluesea.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag, ah, b0, b1, b, a1, a6, B, l, m, O, s, t, a3, p, i, a7, bB, j, q, r, N, c, J, L, K, a2, H, g, R, Q, Z, bl, a4, _, I, X, Y, W, V, U, A, $, a5, n, k, e, E, o, h, w, x, G, z, P, a0, F, M, f, S, T, D, C, y, d, b8, b7, al, a9, bF, a8, as, ap, am, b6, au, at, bJ, a_, b4, ar, b5, av, ad, ae, ac, af, b3, b2, ao, a$, aR, bi, aC, bh, bT, br, b9, bg, bf, aj, aU, bt, ak, bE, bG, aq, bo, an, az, ai, aA, be, aO, aP, aQ, aL, aN, aM, aK, aH, aE, bM, bz, bw, bK, bc, ab, bU, bR, bV, aV, bS, aW, aD, bd, aG, bW, bb, bL, bp, ba, bQ, bH, bj, bn, aS, aw, aZ, aX, aY, bs, by, bx, bq, bv, aF, aB, bu, bP, bC, bD, bI, bk, bm, u, aT, ax, ay, aa, a, aI, aJ, bO, bN, bA } from "./index-
|
|
1
|
+
import { ag, ah, b0, b1, b, a1, a6, B, l, m, O, s, t, a3, p, i, a7, bB, j, q, r, N, c, J, L, K, a2, H, g, R, Q, Z, bl, a4, _, I, X, Y, W, V, U, A, $, a5, n, k, e, E, o, h, w, x, G, z, P, a0, F, M, f, S, T, D, C, y, d, b8, b7, al, a9, bF, a8, as, ap, am, b6, au, at, bJ, a_, b4, ar, b5, av, ad, ae, ac, af, b3, b2, ao, a$, aR, bi, aC, bh, bT, br, b9, bg, bf, aj, aU, bt, ak, bE, bG, aq, bo, an, az, ai, aA, be, aO, aP, aQ, aL, aN, aM, aK, aH, aE, bM, bz, bw, bK, bc, ab, bU, bR, bV, aV, bS, aW, aD, bd, aG, bW, bb, bL, bp, ba, bQ, bH, bj, bn, aS, aw, aZ, aX, aY, bs, by, bx, bq, bv, aF, aB, bu, bP, bC, bD, bI, bk, bm, u, aT, ax, ay, aa, a, aI, aJ, bO, bN, bA } from "./index-B-PTkzdW.js";
|
|
2
2
|
export {
|
|
3
3
|
ag as ADDRESS_COUNTRY_CONFIGS,
|
|
4
4
|
ah as ADDRESS_COUNTRY_CONFIG_DEFAULT,
|
package/dist/bluesea.umd.cjs
CHANGED
|
@@ -631,6 +631,38 @@ var __publicField = (obj, key, value) => {
|
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
|
+
const updateContext = (el, value) => {
|
|
635
|
+
el.vClickOutsideContext = {
|
|
636
|
+
enabled: (value == null ? void 0 : value.enabled) ?? true,
|
|
637
|
+
handler: typeof value === "function" ? value : value == null ? void 0 : value.handler
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
const vClickOutside = {
|
|
641
|
+
mounted: (el, binding) => {
|
|
642
|
+
const clickListener = (event) => {
|
|
643
|
+
var _a2;
|
|
644
|
+
let target = event.target;
|
|
645
|
+
if (!el.contains(target)) {
|
|
646
|
+
const context = el.vClickOutsideContext;
|
|
647
|
+
if (context && context.enabled) {
|
|
648
|
+
(_a2 = context.handler) == null ? void 0 : _a2.call(context);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
el.vClickOutsideListener = clickListener;
|
|
653
|
+
updateContext(el, binding.value);
|
|
654
|
+
window.addEventListener("click", clickListener);
|
|
655
|
+
},
|
|
656
|
+
updated: (el, binding) => {
|
|
657
|
+
updateContext(el, binding.value);
|
|
658
|
+
},
|
|
659
|
+
unmounted: (el) => {
|
|
660
|
+
const clickListener = el.vClickOutsideListener;
|
|
661
|
+
if (clickListener)
|
|
662
|
+
window.removeEventListener("click", clickListener);
|
|
663
|
+
delete el.vClickOutsideContext;
|
|
664
|
+
}
|
|
665
|
+
};
|
|
634
666
|
const storeFieldValidator = (field, validator) => {
|
|
635
667
|
field._bsFieldValidator = validator;
|
|
636
668
|
field.setAttribute("data-bs-field-validator", "");
|
|
@@ -1117,15 +1149,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1117
1149
|
const modified = vue.computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
1118
1150
|
vue.onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
1119
1151
|
return (_ctx, _cache) => {
|
|
1120
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1152
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
1121
1153
|
class: vue.normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0, empty: isEmpty2.value }, "bs-select"]),
|
|
1122
1154
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
1123
|
-
|
|
1124
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
1155
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
1125
1156
|
onKeydown: [
|
|
1126
|
-
_cache[
|
|
1157
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
1127
1158
|
vue.withKeys(vue.withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
1128
|
-
_cache[
|
|
1159
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
1160
|
+
_cache[3] || (_cache[3] = vue.withKeys(($event) => togglePopup(false), ["tab"]))
|
|
1129
1161
|
]
|
|
1130
1162
|
}, [
|
|
1131
1163
|
_ctx.viewMode ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$V, null, 512)), [
|
|
@@ -1161,7 +1193,9 @@ var __publicField = (obj, key, value) => {
|
|
|
1161
1193
|
}, null, 8, ["allow-null", "class", "initial-item", "items", "label-provider", "selected-items", "value-provider"])) : vue.createCommentVNode("", true),
|
|
1162
1194
|
vue.createVNode(_sfc_main$1q, { errors: vue.unref(errors) }, null, 8, ["errors"])
|
|
1163
1195
|
], 64))
|
|
1164
|
-
], 42, _hoisted_1$1a)
|
|
1196
|
+
], 42, _hoisted_1$1a)), [
|
|
1197
|
+
[vue.unref(vClickOutside), () => togglePopup(false)]
|
|
1198
|
+
]);
|
|
1165
1199
|
};
|
|
1166
1200
|
}
|
|
1167
1201
|
});
|
|
@@ -1209,34 +1243,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1209
1243
|
};
|
|
1210
1244
|
}
|
|
1211
1245
|
});
|
|
1212
|
-
const isInsideElement = (el, maybeChild) => {
|
|
1213
|
-
let target = maybeChild;
|
|
1214
|
-
while (target) {
|
|
1215
|
-
if (el === target) {
|
|
1216
|
-
return true;
|
|
1217
|
-
}
|
|
1218
|
-
target = target.parentElement;
|
|
1219
|
-
}
|
|
1220
|
-
return false;
|
|
1221
|
-
};
|
|
1222
|
-
const vClickOutside = {
|
|
1223
|
-
mounted: (el, binding) => {
|
|
1224
|
-
const clickListener = (event) => {
|
|
1225
|
-
let target = event.target;
|
|
1226
|
-
if (!isInsideElement(el, target)) {
|
|
1227
|
-
const handler = binding.value;
|
|
1228
|
-
if (handler && typeof handler === "function")
|
|
1229
|
-
handler();
|
|
1230
|
-
}
|
|
1231
|
-
};
|
|
1232
|
-
el.vClickOutsideListener = clickListener;
|
|
1233
|
-
window.addEventListener("click", clickListener);
|
|
1234
|
-
},
|
|
1235
|
-
unmounted: (el) => {
|
|
1236
|
-
const clickListener = el.vClickOutsideListener;
|
|
1237
|
-
window.removeEventListener("click", clickListener);
|
|
1238
|
-
}
|
|
1239
|
-
};
|
|
1240
1246
|
const contextMenuKey = Symbol();
|
|
1241
1247
|
class BSContextMenuPlugin {
|
|
1242
1248
|
constructor() {
|
|
@@ -4383,15 +4389,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4383
4389
|
const modified = vue.computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue || [])));
|
|
4384
4390
|
vue.onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
4385
4391
|
return (_ctx, _cache) => {
|
|
4386
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4392
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
4387
4393
|
class: vue.normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0, empty: isEmpty2.value }, "bs-multi-select"]),
|
|
4388
4394
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
4389
|
-
|
|
4390
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
4395
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
4391
4396
|
onKeydown: [
|
|
4392
|
-
_cache[
|
|
4397
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
4393
4398
|
vue.withKeys(vue.withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
4394
|
-
_cache[
|
|
4399
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
4400
|
+
_cache[3] || (_cache[3] = vue.withKeys(($event) => togglePopup(false), ["tab"]))
|
|
4395
4401
|
]
|
|
4396
4402
|
}, [
|
|
4397
4403
|
_ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$D, [
|
|
@@ -4438,7 +4444,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4438
4444
|
}, null, 8, ["initial-item", "items", "label-provider", "selected-items", "value-provider"])) : vue.createCommentVNode("", true)
|
|
4439
4445
|
], 64)),
|
|
4440
4446
|
vue.createVNode(_sfc_main$1q, { errors: vue.unref(errors) }, null, 8, ["errors"])
|
|
4441
|
-
], 42, _hoisted_1$S)
|
|
4447
|
+
], 42, _hoisted_1$S)), [
|
|
4448
|
+
[vue.unref(vClickOutside), () => togglePopup(false)]
|
|
4449
|
+
]);
|
|
4442
4450
|
};
|
|
4443
4451
|
}
|
|
4444
4452
|
});
|
|
@@ -5495,15 +5503,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5495
5503
|
const modified = vue.computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
5496
5504
|
vue.onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
5497
5505
|
return (_ctx, _cache) => {
|
|
5498
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
5506
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
5499
5507
|
class: vue.normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0, empty: isEmpty2.value }, "bs-tree-select"]),
|
|
5500
5508
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
5501
|
-
|
|
5502
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
5509
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
5503
5510
|
onKeydown: [
|
|
5504
|
-
_cache[
|
|
5511
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
5505
5512
|
vue.withKeys(vue.withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
5506
|
-
_cache[
|
|
5513
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
5514
|
+
_cache[3] || (_cache[3] = vue.withKeys(($event) => togglePopup(false), ["tab"]))
|
|
5507
5515
|
]
|
|
5508
5516
|
}, [
|
|
5509
5517
|
_ctx.viewMode ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$B, null, 512)), [
|
|
@@ -5535,7 +5543,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5535
5543
|
})) : vue.createCommentVNode("", true),
|
|
5536
5544
|
vue.createVNode(_sfc_main$1q, { errors: vue.unref(errors) }, null, 8, ["errors"])
|
|
5537
5545
|
], 64))
|
|
5538
|
-
], 42, _hoisted_1$Q)
|
|
5546
|
+
], 42, _hoisted_1$Q)), [
|
|
5547
|
+
[vue.unref(vClickOutside), () => togglePopup(false)]
|
|
5548
|
+
]);
|
|
5539
5549
|
};
|
|
5540
5550
|
}
|
|
5541
5551
|
});
|
|
@@ -5670,15 +5680,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5670
5680
|
const modified = vue.computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
5671
5681
|
vue.onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
5672
5682
|
return (_ctx, _cache) => {
|
|
5673
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
5683
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
5674
5684
|
class: vue.normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0, empty: isEmpty2.value }, "bs-multi-tree-select"]),
|
|
5675
5685
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
5676
|
-
|
|
5677
|
-
onClick: _cache[2] || (_cache[2] = ($event) => togglePopup()),
|
|
5686
|
+
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
5678
5687
|
onKeydown: [
|
|
5679
|
-
_cache[
|
|
5688
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
5680
5689
|
vue.withKeys(vue.withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
5681
|
-
_cache[
|
|
5690
|
+
_cache[3] || (_cache[3] = vue.withKeys(vue.withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
5691
|
+
_cache[4] || (_cache[4] = vue.withKeys(($event) => togglePopup(false), ["tab"]))
|
|
5682
5692
|
]
|
|
5683
5693
|
}, [
|
|
5684
5694
|
_ctx.viewMode ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$A, null, 512)), [
|
|
@@ -5712,7 +5722,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5712
5722
|
})) : vue.createCommentVNode("", true),
|
|
5713
5723
|
vue.createVNode(_sfc_main$1q, { errors: vue.unref(errors) }, null, 8, ["errors"])
|
|
5714
5724
|
], 64))
|
|
5715
|
-
], 42, _hoisted_1$P)
|
|
5725
|
+
], 42, _hoisted_1$P)), [
|
|
5726
|
+
[vue.unref(vClickOutside), () => togglePopup(false)]
|
|
5727
|
+
]);
|
|
5716
5728
|
};
|
|
5717
5729
|
}
|
|
5718
5730
|
});
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { DirectiveBinding } from 'vue';
|
|
2
2
|
|
|
3
|
+
type ClickOutsideContext = {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
handler: () => void;
|
|
6
|
+
};
|
|
3
7
|
declare global {
|
|
4
8
|
interface HTMLElement {
|
|
5
|
-
vClickOutsideListener
|
|
9
|
+
vClickOutsideListener?: (event: MouseEvent) => void;
|
|
10
|
+
vClickOutsideContext?: ClickOutsideContext;
|
|
6
11
|
}
|
|
7
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* ```
|
|
15
|
+
* v-click-outside="() => someFunction()"
|
|
16
|
+
* v-click-outside="{enabled: true, handler: () => someFunction()}"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
8
19
|
declare const vClickOutside: {
|
|
9
20
|
mounted: (el: HTMLElement, binding: DirectiveBinding) => void;
|
|
21
|
+
updated: (el: HTMLElement, binding: DirectiveBinding) => void;
|
|
10
22
|
unmounted: (el: HTMLElement) => void;
|
|
11
23
|
};
|
|
12
24
|
export default vClickOutside;
|
|
@@ -630,6 +630,38 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
+
const updateContext = (el, value) => {
|
|
634
|
+
el.vClickOutsideContext = {
|
|
635
|
+
enabled: (value == null ? void 0 : value.enabled) ?? true,
|
|
636
|
+
handler: typeof value === "function" ? value : value == null ? void 0 : value.handler
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
const vClickOutside = {
|
|
640
|
+
mounted: (el, binding) => {
|
|
641
|
+
const clickListener = (event) => {
|
|
642
|
+
var _a2;
|
|
643
|
+
let target = event.target;
|
|
644
|
+
if (!el.contains(target)) {
|
|
645
|
+
const context = el.vClickOutsideContext;
|
|
646
|
+
if (context && context.enabled) {
|
|
647
|
+
(_a2 = context.handler) == null ? void 0 : _a2.call(context);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
el.vClickOutsideListener = clickListener;
|
|
652
|
+
updateContext(el, binding.value);
|
|
653
|
+
window.addEventListener("click", clickListener);
|
|
654
|
+
},
|
|
655
|
+
updated: (el, binding) => {
|
|
656
|
+
updateContext(el, binding.value);
|
|
657
|
+
},
|
|
658
|
+
unmounted: (el) => {
|
|
659
|
+
const clickListener = el.vClickOutsideListener;
|
|
660
|
+
if (clickListener)
|
|
661
|
+
window.removeEventListener("click", clickListener);
|
|
662
|
+
delete el.vClickOutsideContext;
|
|
663
|
+
}
|
|
664
|
+
};
|
|
633
665
|
const storeFieldValidator = (field, validator) => {
|
|
634
666
|
field._bsFieldValidator = validator;
|
|
635
667
|
field.setAttribute("data-bs-field-validator", "");
|
|
@@ -1116,15 +1148,15 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
1116
1148
|
const modified = computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
1117
1149
|
onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
1118
1150
|
return (_ctx, _cache) => {
|
|
1119
|
-
return openBlock(), createElementBlock("div", {
|
|
1151
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1120
1152
|
class: normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0, empty: isEmpty2.value }, "bs-select"]),
|
|
1121
1153
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
1122
|
-
|
|
1123
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
1154
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
1124
1155
|
onKeydown: [
|
|
1125
|
-
_cache[
|
|
1156
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
1126
1157
|
withKeys(withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
1127
|
-
_cache[
|
|
1158
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
1159
|
+
_cache[3] || (_cache[3] = withKeys(($event) => togglePopup(false), ["tab"]))
|
|
1128
1160
|
]
|
|
1129
1161
|
}, [
|
|
1130
1162
|
_ctx.viewMode ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2$V, null, 512)), [
|
|
@@ -1160,7 +1192,9 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
1160
1192
|
}, null, 8, ["allow-null", "class", "initial-item", "items", "label-provider", "selected-items", "value-provider"])) : createCommentVNode("", true),
|
|
1161
1193
|
createVNode(_sfc_main$1o, { errors: unref(errors) }, null, 8, ["errors"])
|
|
1162
1194
|
], 64))
|
|
1163
|
-
], 42, _hoisted_1$18)
|
|
1195
|
+
], 42, _hoisted_1$18)), [
|
|
1196
|
+
[unref(vClickOutside), () => togglePopup(false)]
|
|
1197
|
+
]);
|
|
1164
1198
|
};
|
|
1165
1199
|
}
|
|
1166
1200
|
});
|
|
@@ -1208,34 +1242,6 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
1208
1242
|
};
|
|
1209
1243
|
}
|
|
1210
1244
|
});
|
|
1211
|
-
const isInsideElement = (el, maybeChild) => {
|
|
1212
|
-
let target = maybeChild;
|
|
1213
|
-
while (target) {
|
|
1214
|
-
if (el === target) {
|
|
1215
|
-
return true;
|
|
1216
|
-
}
|
|
1217
|
-
target = target.parentElement;
|
|
1218
|
-
}
|
|
1219
|
-
return false;
|
|
1220
|
-
};
|
|
1221
|
-
const vClickOutside = {
|
|
1222
|
-
mounted: (el, binding) => {
|
|
1223
|
-
const clickListener = (event) => {
|
|
1224
|
-
let target = event.target;
|
|
1225
|
-
if (!isInsideElement(el, target)) {
|
|
1226
|
-
const handler = binding.value;
|
|
1227
|
-
if (handler && typeof handler === "function")
|
|
1228
|
-
handler();
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
|
-
el.vClickOutsideListener = clickListener;
|
|
1232
|
-
window.addEventListener("click", clickListener);
|
|
1233
|
-
},
|
|
1234
|
-
unmounted: (el) => {
|
|
1235
|
-
const clickListener = el.vClickOutsideListener;
|
|
1236
|
-
window.removeEventListener("click", clickListener);
|
|
1237
|
-
}
|
|
1238
|
-
};
|
|
1239
1245
|
const contextMenuKey = Symbol();
|
|
1240
1246
|
class BSContextMenuPlugin {
|
|
1241
1247
|
constructor() {
|
|
@@ -4382,15 +4388,15 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
4382
4388
|
const modified = computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue || [])));
|
|
4383
4389
|
onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
4384
4390
|
return (_ctx, _cache) => {
|
|
4385
|
-
return openBlock(), createElementBlock("div", {
|
|
4391
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
4386
4392
|
class: normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0, empty: isEmpty2.value }, "bs-multi-select"]),
|
|
4387
4393
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
4388
|
-
|
|
4389
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
4394
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
4390
4395
|
onKeydown: [
|
|
4391
|
-
_cache[
|
|
4396
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
4392
4397
|
withKeys(withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
4393
|
-
_cache[
|
|
4398
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
4399
|
+
_cache[3] || (_cache[3] = withKeys(($event) => togglePopup(false), ["tab"]))
|
|
4394
4400
|
]
|
|
4395
4401
|
}, [
|
|
4396
4402
|
_ctx.viewMode ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
@@ -4437,7 +4443,9 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
4437
4443
|
}, null, 8, ["initial-item", "items", "label-provider", "selected-items", "value-provider"])) : createCommentVNode("", true)
|
|
4438
4444
|
], 64)),
|
|
4439
4445
|
createVNode(_sfc_main$1o, { errors: unref(errors) }, null, 8, ["errors"])
|
|
4440
|
-
], 42, _hoisted_1$Q)
|
|
4446
|
+
], 42, _hoisted_1$Q)), [
|
|
4447
|
+
[unref(vClickOutside), () => togglePopup(false)]
|
|
4448
|
+
]);
|
|
4441
4449
|
};
|
|
4442
4450
|
}
|
|
4443
4451
|
});
|
|
@@ -4910,7 +4918,7 @@ class BSModal {
|
|
|
4910
4918
|
}
|
|
4911
4919
|
openAlert(title, message, clickHandler2) {
|
|
4912
4920
|
const option = {
|
|
4913
|
-
component: defineAsyncComponent(() => import("./BSAlertModal-
|
|
4921
|
+
component: defineAsyncComponent(() => import("./BSAlertModal-Bs3lYNkZ.js")),
|
|
4914
4922
|
bind: {
|
|
4915
4923
|
title,
|
|
4916
4924
|
message
|
|
@@ -4923,7 +4931,7 @@ class BSModal {
|
|
|
4923
4931
|
}
|
|
4924
4932
|
openYesNo(title, message, yesHandler, noHandler) {
|
|
4925
4933
|
const option = {
|
|
4926
|
-
component: defineAsyncComponent(() => import("./BSYesNoModal-
|
|
4934
|
+
component: defineAsyncComponent(() => import("./BSYesNoModal-BJ4DrPki.js")),
|
|
4927
4935
|
bind: {
|
|
4928
4936
|
title,
|
|
4929
4937
|
message
|
|
@@ -5494,15 +5502,15 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
5494
5502
|
const modified = computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
5495
5503
|
onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
5496
5504
|
return (_ctx, _cache) => {
|
|
5497
|
-
return openBlock(), createElementBlock("div", {
|
|
5505
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
5498
5506
|
class: normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0, empty: isEmpty2.value }, "bs-tree-select"]),
|
|
5499
5507
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
5500
|
-
|
|
5501
|
-
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
5508
|
+
onClick: _cache[0] || (_cache[0] = ($event) => togglePopup()),
|
|
5502
5509
|
onKeydown: [
|
|
5503
|
-
_cache[
|
|
5510
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
5504
5511
|
withKeys(withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
5505
|
-
_cache[
|
|
5512
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
5513
|
+
_cache[3] || (_cache[3] = withKeys(($event) => togglePopup(false), ["tab"]))
|
|
5506
5514
|
]
|
|
5507
5515
|
}, [
|
|
5508
5516
|
_ctx.viewMode ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2$B, null, 512)), [
|
|
@@ -5534,7 +5542,9 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
5534
5542
|
})) : createCommentVNode("", true),
|
|
5535
5543
|
createVNode(_sfc_main$1o, { errors: unref(errors) }, null, 8, ["errors"])
|
|
5536
5544
|
], 64))
|
|
5537
|
-
], 42, _hoisted_1$O)
|
|
5545
|
+
], 42, _hoisted_1$O)), [
|
|
5546
|
+
[unref(vClickOutside), () => togglePopup(false)]
|
|
5547
|
+
]);
|
|
5538
5548
|
};
|
|
5539
5549
|
}
|
|
5540
5550
|
});
|
|
@@ -5669,15 +5679,15 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
5669
5679
|
const modified = computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
|
|
5670
5680
|
onBeforeUnmount(() => savePoint == null ? void 0 : savePoint.unregisterField(field));
|
|
5671
5681
|
return (_ctx, _cache) => {
|
|
5672
|
-
return openBlock(), createElementBlock("div", {
|
|
5682
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
5673
5683
|
class: normalizeClass([{ "popup-open": showPopup.value, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0, empty: isEmpty2.value }, "bs-multi-tree-select"]),
|
|
5674
5684
|
tabindex: _ctx.disabled ? -1 : _ctx.tabindex,
|
|
5675
|
-
|
|
5676
|
-
onClick: _cache[2] || (_cache[2] = ($event) => togglePopup()),
|
|
5685
|
+
onClick: _cache[1] || (_cache[1] = ($event) => togglePopup()),
|
|
5677
5686
|
onKeydown: [
|
|
5678
|
-
_cache[
|
|
5687
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => togglePopup(), ["stop", "prevent"]), ["space"])),
|
|
5679
5688
|
withKeys(withModifiers(handleKeyboardEvent, ["stop", "prevent"]), ["enter", "down", "up"]),
|
|
5680
|
-
_cache[
|
|
5689
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => togglePopup(false), ["stop", "prevent"]), ["esc"])),
|
|
5690
|
+
_cache[4] || (_cache[4] = withKeys(($event) => togglePopup(false), ["tab"]))
|
|
5681
5691
|
]
|
|
5682
5692
|
}, [
|
|
5683
5693
|
_ctx.viewMode ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2$A, null, 512)), [
|
|
@@ -5711,7 +5721,9 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
5711
5721
|
})) : createCommentVNode("", true),
|
|
5712
5722
|
createVNode(_sfc_main$1o, { errors: unref(errors) }, null, 8, ["errors"])
|
|
5713
5723
|
], 64))
|
|
5714
|
-
], 42, _hoisted_1$N)
|
|
5724
|
+
], 42, _hoisted_1$N)), [
|
|
5725
|
+
[unref(vClickOutside), () => togglePopup(false)]
|
|
5726
|
+
]);
|
|
5715
5727
|
};
|
|
5716
5728
|
}
|
|
5717
5729
|
});
|